/* Shelf website: the static pages (features, guide, pricing, legal, account,
   checkout). Light only, matching the React home page (site/src/index.css):
   same colours, type, hairlines, header, footer and ASCII background.
   Colour values live in :root and nowhere else. */

/* Body: Manrope (OFL-1.1). Headings: Neue Montreal (Pangram Pangram). */
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Neue Montreal";
  src: url("../fonts/neue-montreal-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Neue Montreal";
  src: url("../fonts/neue-montreal-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Neue Montreal";
  src: url("../fonts/neue-montreal-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f8f8fa;
  --surface: #ffffff;
  --sunken: #f3f3f6;
  --ink: #14141c;
  --ink-2: #4f5162;
  --ink-3: #6c6e7d;
  --line: #14141c17;
  --line-strong: #14141c2e;
  --brand: #4642ff;
  --brand-edge: #2e2bbe;
  --brand-soft: #e9e8ff;
  --brand-ink: #3430d9;
  --accent: #4642ff; /* read by clerk.js */
  --danger: #c4302b;
  --danger-soft: #fdecec;

  --sans: "Manrope", "Inter", system-ui, "Segoe UI", sans-serif;
  --display: "Neue Montreal", "Manrope", "Inter", system-ui, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --radius: 0.85rem;
  --radius-lg: 1.25rem;
}

/* ------------------------------------------------------------------ base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-family: var(--display);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
}

::selection {
  background: var(--brand-soft);
  color: var(--brand-ink);
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

.ico {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
}
.skip:focus {
  top: 1rem;
}

.wrap {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px) {
  .wrap {
    padding: 0 1.5rem;
  }
}

.muted {
  color: var(--ink-3);
}

.lede {
  color: var(--ink-2);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-wrap: pretty;
}
@media (min-width: 640px) {
  .lede {
    font-size: 1.125rem;
  }
}

kbd,
code {
  font-family: var(--mono);
  font-size: 0.85em;
  padding: 0.1em 0.4em;
  border-radius: 0.35rem;
  background: var(--sunken);
  border: 1px solid var(--line);
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.5rem;
  padding: 0 1.05rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms var(--ease), background-color 160ms, border-color 160ms, color 160ms;
}
.btn:hover {
  border-color: var(--line-strong);
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.btn-primary:hover {
  background: #26263a;
  border-color: #26263a;
}
.btn-brand {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn-brand:hover {
  background: var(--brand-edge);
  border-color: var(--brand-edge);
}
.btn-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--ink-2);
}
.btn-ghost:hover {
  border-color: transparent;
  background: #14141c0a;
  color: var(--ink);
}
.btn-lg {
  height: 3rem;
  padding: 0 1.4rem;
  font-size: 0.95rem;
  border-radius: 0.85rem;
}
.btn-block {
  width: 100%;
}
.btn[hidden] {
  display: none;
}

/* ---------------------------------------------------------------- header */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid #14141c10;
  background: #f8f8fabf;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 4rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand img {
  width: 22px;
  height: 18px;
}
.nav-links {
  display: none;
  align-items: center;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  color: var(--ink-2);
}
.nav-links a {
  text-decoration: none;
  transition: color 150ms;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
}
.nav-links a[aria-current="page"] {
  font-weight: 500;
}
.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}
.nav-toggle {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  order: 3;
  margin-left: -0.75rem;
  border: 0;
  border-radius: 0.7rem;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
}
@media (max-width: 767px) {
  .nav.is-open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: 4rem;
    left: 0;
    right: 0;
    padding: 0.5rem 1rem 1rem;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    font-size: 1rem;
  }
  .nav.is-open .nav-links a {
    display: block;
    padding: 0.7rem 0.25rem;
  }
}

/* ------------------------------------------------- ASCII background (JS) */

.ascii-host {
  position: relative;
  isolation: isolate;
}
.ascii-layer {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.ascii-layer canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 35%, #000 35%, transparent 80%);
  mask-image: radial-gradient(120% 90% at 50% 35%, #000 35%, transparent 80%);
}
/* On the checkout page the field spans the window, not just the column. */
.auth.ascii-host > .ascii-layer {
  left: 50%;
  right: auto;
  width: 100vw;
  transform: translateX(-50%);
}

/* Quiet zone behind the copy so the glyphs never fight the words. */
.ascii-hush {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 62% 55% at 50% 50%, var(--paper) 45%, #f8f8fab3 70%, transparent 100%);
}
@media (min-width: 1100px) {
  .ascii-hush {
    background: radial-gradient(ellipse 40% 55% at 50% 50%, var(--paper) 45%, #f8f8fab3 70%, transparent 100%);
  }
}

/* ------------------------------------------------------------- page head */

.page-head {
  padding: 5.5rem 0 4.5rem;
  text-align: center;
}
.page-head h1 {
  max-width: 52rem;
  margin: 0 auto;
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1.03;
}
.page-head .lede {
  max-width: 38rem;
  margin: 1.5rem auto 0;
}
@media (min-width: 640px) {
  .page-head {
    padding: 7rem 0 5.5rem;
  }
}

/* -------------------------------------------------------------- sections */

.section {
  padding: 5rem 0;
}
.section-tight {
  padding-top: 0;
}
@media (min-width: 640px) {
  .section {
    padding: 6.5rem 0;
  }
  .section-tight {
    padding-top: 0;
  }
}
.section-head {
  max-width: 42rem;
  margin: 0 auto 3rem;
  text-align: center;
}
.section-head h2,
.cta h2 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.06;
}

.notice {
  padding: 0.85rem 1rem;
  border: 1px solid #c4302b33;
  border-radius: var(--radius);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.9375rem;
}

.callout {
  display: flex;
  gap: 0.75rem;
  margin: 1.25rem 0;
  padding: 1rem 1.15rem;
  border: 1px solid #4642ff2e;
  border-radius: var(--radius);
  background: var(--brand-soft);
  color: var(--brand-ink);
}
.callout .ico {
  margin-top: 0.15rem;
}
.callout p {
  margin: 0 !important;
  color: inherit !important;
}

.tag {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-size: 0.6875rem;
  font-weight: 500;
}

.fine {
  margin-top: 1.25rem;
  color: var(--ink-3);
  font-size: 0.8125rem;
  line-height: 1.55;
  text-align: center;
}

/* -------------------------------------------------------------- features */

.feature-group {
  margin-bottom: 4.5rem;
}
.feature-group > header {
  max-width: 40rem;
  margin-bottom: 1.75rem;
}
.feature-group h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}
.feature-group > header p {
  margin-top: 0.6rem;
  color: var(--ink-2);
}
.features {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--line);
}
@media (min-width: 640px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .features {
    grid-template-columns: repeat(3, 1fr);
  }
}
.features li {
  padding: 1.75rem;
  background: var(--surface);
}
.features h3 {
  margin-top: 1.25rem;
  font-size: 1rem;
}
.features p {
  margin-top: 0.5rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.6;
}
.ico-tile {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--paper);
  color: var(--brand);
}

/* ------------------------------------------------------------------- CTA */

.cta {
  padding: 5rem 1rem;
  text-align: center;
}
.cta .lede {
  margin-top: 1rem;
}
.store-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

/* --------------------------------------------------------------- pricing */

.plans {
  display: grid;
  gap: 1rem;
  max-width: 56rem;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .plans {
    grid-template-columns: repeat(2, 1fr);
  }
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.plan.is-featured {
  border-color: #4642ff4d;
  background: linear-gradient(180deg, var(--brand-soft), var(--surface) 55%);
}
.plan .tag {
  position: absolute;
  top: 1.75rem;
  right: 1.75rem;
}
.plan h2 {
  font-size: 1rem;
}
.price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0.75rem;
}
.price strong {
  font-size: 3rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
}
.price span {
  color: var(--ink-3);
  font-size: 0.875rem;
}
.plan > .muted {
  font-size: 0.9375rem;
  margin-bottom: 0.4rem;
}
.checks {
  flex: 1;
  margin: 1.25rem 0 2rem;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
  font-size: 0.9375rem;
}
.checks li {
  display: flex;
  gap: 0.75rem;
  padding: 0.35rem 0;
}
.checks .ico {
  width: 1rem;
  height: 1rem;
  margin-top: 0.25rem;
  color: var(--brand);
  stroke-width: 2.2;
}

.plans-note {
  max-width: 40rem;
  margin: 1.5rem auto 0;
  color: var(--ink-3);
  font-size: 0.9375rem;
  text-align: center;
}

.checkout {
  max-width: 56rem;
  margin: 1rem auto 0;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.checkout p {
  margin-top: 0.75rem;
  color: var(--ink-2);
}
.checkout .muted {
  color: var(--ink-3);
  font-size: 0.9375rem;
}
.checkout-title {
  font-size: 1.25rem;
}

/* ------------------------------------------------------------------- FAQ */

.faq {
  max-width: 48rem;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.faq details + details {
  border-top: 1px solid var(--line);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.5rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  flex: none;
  color: var(--ink-3);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1;
  transition: transform 200ms var(--ease);
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details p {
  padding: 0 1.5rem 1.25rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

/* -------------------------------------------------- long-form documents */

.doc {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 6rem;
}
@media (min-width: 960px) {
  .doc {
    grid-template-columns: 13rem minmax(0, 46rem);
    justify-content: center;
    gap: 4rem;
  }
  .doc > .prose:only-child {
    grid-column: 1 / -1;
    justify-self: center;
    width: 100%;
    max-width: 46rem;
  }
}
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  align-self: start;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.875rem;
}
.toc p {
  width: 100%;
  margin-bottom: 0.25rem;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.toc a {
  color: var(--ink-2);
  text-decoration: none;
  transition: color 150ms;
}
.toc a:hover {
  color: var(--brand-ink);
}
@media (min-width: 960px) {
  .toc {
    position: sticky;
    top: 5.5rem;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0.55rem;
    padding: 0;
    border: 0;
    background: none;
  }
}

.prose {
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.75;
}
.prose h2 {
  margin: 3.25rem 0 1rem;
  color: var(--ink);
  font-size: 1.6rem;
  scroll-margin-top: 5.5rem;
}
.prose h2:first-child {
  margin-top: 0;
}
.prose h3 {
  margin: 2rem 0 0.6rem;
  color: var(--ink);
  font-size: 1.0625rem;
  scroll-margin-top: 5.5rem;
}
.prose p,
.prose ul,
.prose ol {
  margin: 0 0 1rem;
}
.prose ul,
.prose ol {
  padding-left: 1.25rem;
}
.prose li {
  margin: 0.35rem 0;
  padding-left: 0.25rem;
}
.prose li::marker {
  color: var(--ink-3);
}
.prose strong {
  color: var(--ink);
  font-weight: 600;
}
.prose a {
  color: var(--brand-ink);
  text-decoration: underline;
  text-decoration-color: #4642ff4d;
  text-underline-offset: 3px;
  transition: text-decoration-color 150ms;
}
.prose a:hover {
  text-decoration-color: currentColor;
}

.table-scroll {
  margin: 1.25rem 0 1.5rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.55;
}
.table th,
.table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.table tr:last-child td {
  border-bottom: 0;
}
.table th {
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.8125rem;
}
.table td:first-child {
  color: var(--ink);
}

/* ------------------------------------------- account and checkout pages */

.auth {
  display: grid;
  gap: 1.5rem;
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem 1rem 5rem;
}
@media (min-width: 640px) {
  .auth {
    padding: 3.5rem 1.5rem 6rem;
  }
}
@media (min-width: 900px) {
  .auth:has(.auth-side) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: stretch;
    gap: 2rem;
  }
  .auth-wide:has(.auth-side) {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
  }
}
.auth-side {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  min-height: 34rem;
  padding: 2.5rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
@media (min-width: 900px) {
  .auth-side {
    display: flex;
  }
}
.auth-side .ascii-hush {
  background: linear-gradient(180deg, var(--surface) 30%, #ffffffb3 55%, transparent 85%);
}
.auth-side h2 {
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  line-height: 1.05;
}
.auth-side p {
  max-width: 24rem;
  margin-top: 1rem;
  color: var(--ink-2);
}
.auth-stack {
  display: grid;
  gap: 0.5rem;
  max-width: 22rem;
}
.mini-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  height: 2.6rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  background: var(--surface);
  font-size: 0.875rem;
}
.mini-row i {
  width: 1rem;
  height: 1rem;
  border-radius: 0.3rem;
  background: var(--brand);
}
.mini-row:nth-child(2) i {
  background: #0f8f80;
}
.mini-row:nth-child(3) i {
  background: #f76b15;
}
.mini-row em {
  margin-left: auto;
  color: var(--ink-3);
  font-size: 0.75rem;
  font-style: normal;
}

.auth-main {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
@media (min-width: 900px) {
  .auth-main {
    align-items: center;
  }
}
.auth-card {
  width: 100%;
  max-width: 28rem;
}
.auth-wide .auth-card {
  max-width: none;
}
.auth:not(:has(.auth-side)) .auth-card {
  max-width: 34rem;
  padding: 2.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.auth-card > p {
  margin-top: 0.85rem;
  color: var(--ink-2);
}
.auth-card > p.muted {
  color: var(--ink-3);
  font-size: 0.9375rem;
}
.auth-card a {
  color: var(--brand-ink);
}
.clerk-mount {
  display: flex;
  justify-content: center;
  min-height: 12rem;
}
.clerk-mount > p {
  align-self: center;
}

/* ---------------------------------------------------------------- footer */

.footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
  color: var(--ink-3);
  font-size: 0.875rem;
}
.footer .brand {
  gap: 0.5rem;
  font-size: 1rem;
}
.footer .brand img {
  width: 19px;
  height: 15px;
}
.footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer ul a {
  text-decoration: none;
  transition: color 150ms;
}
.footer ul a:hover {
  color: var(--ink);
}
@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
  }
  .footer-inner > p {
    margin-left: auto;
  }
}

/* ---------------------------------------------------------------- motion */

.page-head > .wrap > * {
  animation: rise 900ms var(--ease) both;
}
.page-head > .wrap > :nth-child(2) {
  animation-delay: 80ms;
}
.page-head > .wrap > :nth-child(3) {
  animation-delay: 160ms;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms var(--ease), transform 900ms var(--ease);
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .page-head > .wrap > * {
    animation: none;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
