/* ==========================================================================
   Clay Seal — design system
   Palette: fired clay + ink on warm paper. Sea-teal as the working accent.
   Type: Fraunces (display serif, self-hosted) over a native UI stack.
   One layout primitive: the receipt card.
   ========================================================================== */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-var.woff2") format("woff2");
  font-weight: 300 700;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-italic-var.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}

:root {
  /* paper */
  --paper: #faf6ef;
  --paper-raised: #fffdf8;
  --paper-sunken: #f3ecdf;
  --hairline: #e2d7c3;
  --hairline-strong: #cfc0a6;

  /* ink */
  --ink: #26292b;
  --ink-2: #4a5053;
  --ink-3: #74797c;

  /* clay */
  --clay: #c08b62;
  --clay-deep: #9c6239;
  --clay-press: #82502e;
  --clay-tint: #f0e0d1;
  --clay-line: #cfa183;

  /* sea */
  --sea: #22635e;
  --sea-bright: #2e7d76;
  --sea-tint: #dcebe6;

  /* semantic */
  --ok: #2e7d4f;
  --bg-code: #26292b;
  --bg-code-line: #3a3f42;
  --code-text: #ece5d8;
  --code-dim: #9aa0a3;
  --code-clay: #dfb08a;
  --code-sea: #8fd0c6;
  --code-gold: #d9c48a;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 1px 2px rgba(60, 42, 25, 0.06), 0 8px 28px -12px rgba(60, 42, 25, 0.18);
  --shadow-pop: 0 2px 4px rgba(60, 42, 25, 0.08), 0 18px 50px -18px rgba(60, 42, 25, 0.30);

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --measure: 68ch;
  --page-max: 1120px;
  --pad-x: clamp(20px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #191713;
    --paper-raised: #211e19;
    --paper-sunken: #14120f;
    --hairline: #37322a;
    --hairline-strong: #4d463a;

    --ink: #ece6da;
    --ink-2: #bcb4a6;
    --ink-3: #8d8678;

    --clay: #c99268;
    --clay-deep: #b97f52;
    --clay-press: #a56d42;
    --clay-tint: #33291f;
    --clay-line: #8a674c;

    --sea: #63b0a7;
    --sea-bright: #7cc4bb;
    --sea-tint: #1d2c29;

    --ok: #6cbb8f;
    --bg-code: #211e19;
    --bg-code-line: #37322a;

    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 28px -12px rgba(0, 0, 0, 0.55);
    --shadow-pop: 0 2px 4px rgba(0, 0, 0, 0.45), 0 18px 50px -18px rgba(0, 0, 0, 0.7);
  }
}

/* ------------------------------------------------------------------ base */

* { 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(--font-body);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "ss01";
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 560;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 0.4em;
  text-wrap: balance;
}

h1 { font-size: clamp(38px, 5.4vw, 62px); font-variation-settings: "opsz" 100; }
h2 { font-size: clamp(28px, 3.4vw, 40px); font-variation-settings: "opsz" 60; }
h3 { font-size: 21px; font-variation-settings: "opsz" 30; }

p { margin: 0 0 1em; max-width: var(--measure); }

a { color: var(--sea); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--sea-bright); }

code, pre, kbd { font-family: var(--font-mono); }
:not(pre) > code {
  background: var(--paper-sunken);
  border: 1px solid var(--hairline);
  border-radius: 5px;
  padding: 0.08em 0.35em;
  font-size: 0.86em;
}

::selection { background: var(--clay-tint); }

.wrap {
  max-width: var(--page-max);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 10px 16px;
  z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ------------------------------------------------ atmosphere (dark mode) */
/* Two layers under the content: a terracotta glow behind the hero copy
   (z -2), then warm film grain across the whole page (z -1) on top of it. */

@media (prefers-color-scheme: dark) {
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.788 0 0 0 0 0.573 0 0 0 0 0.408 0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 160px 160px;
    opacity: 0.1;
  }

  .hero { position: relative; }
  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background: radial-gradient(
      55% 55% at 28% 44%,
      color-mix(in srgb, var(--clay) 9%, transparent),
      transparent 70%
    );
  }
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}
.brand img { height: 30px; width: auto; display: block; }
.brand .brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 15px;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

@media (max-width: 860px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--paper-raised);
    border-bottom: 1px solid var(--hairline);
    flex-direction: column;
    align-items: flex-start;
    padding: 18px var(--pad-x) 22px;
    gap: 16px;
    box-shadow: var(--shadow-card);
  }
  .site-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .header-actions .btn-ghost { display: none; }
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 15.5px/1 var(--font-body);
  border-radius: 9px;
  padding: 13px 22px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.06s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--clay-deep);
  color: #fffdf8;
}
.btn-primary:hover { background: var(--clay-press); color: #fffdf8; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--hairline-strong);
}
.btn-ghost:hover { border-color: var(--ink-3); background: var(--paper-raised); color: var(--ink); }

.btn-small { padding: 9px 16px; font-size: 14px; }

/* ------------------------------------------------------------------ hero */

.hero { padding: clamp(48px, 8vh, 96px) 0 clamp(40px, 6vh, 72px); overflow: hidden; }

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .hero-copy,
  .demo-stack,
  .code-window,
  .receipt-card {
    min-width: 0;
    max-width: 100%;
  }
  .hero-ctas {
    align-items: stretch;
    flex-direction: column;
  }
  .hero-ctas .btn {
    justify-content: center;
    width: 100%;
  }
  .section-head,
  .qa-cell,
  .layer-row,
  .layer-row > *,
  .trail-step,
  .story-copy,
  .standards,
  .cta-final {
    min-width: 0;
    max-width: 100%;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--clay-deep);
  font-weight: 600;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--clay-line);
}

.hero-copy .lede {
  font-size: 19px;
  color: var(--ink-2);
  max-width: 54ch;
  margin: 18px 0 30px;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.hero-note {
  margin-top: 18px;
  font-size: 14px;
  color: var(--ink-3);
}

/* --------------------------------------------------------- code + receipt */

.demo-stack { position: relative; }

.code-window {
  background: var(--bg-code);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--bg-code-line);
  overflow: hidden;
}
.code-window .code-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--bg-code-line);
  color: var(--code-dim);
  font: 12.5px/1 var(--font-mono);
}
.code-titlebar .dots { display: flex; gap: 6px; }
.code-titlebar .dots i {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--bg-code-line); display: block;
}
pre.code {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--code-text);
}
pre.code .c  { color: var(--code-dim); }    /* comment  */
pre.code .k  { color: var(--code-clay); }   /* keyword  */
pre.code .s  { color: var(--code-sea); }    /* string   */
pre.code .f  { color: var(--code-gold); }   /* function */

.receipt-card {
  position: relative;
  background: var(--paper-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  padding: 20px 22px 18px;
  font: 13px/1.7 var(--font-mono);
  color: var(--ink-2);
}
.demo-stack .receipt-card {
  margin: -26px 0 0 clamp(16px, 4vw, 56px);
  max-width: 430px;
}
@media (max-width: 520px) {
  .demo-stack .receipt-card {
    margin-left: 0;
  }
}
.receipt-card .receipt-head {
  display: flex;
  justify-content: space-between;
  color: var(--ink-3);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--hairline-strong);
}
.receipt-card table { border-collapse: collapse; width: 100%; }
.receipt-card td { padding: 2px 0; vertical-align: top; }
.receipt-card td:first-child {
  color: var(--ink-3);
  width: 4.5em;
  padding-right: 12px;
}
.receipt-card .sig { color: var(--ok); }
.receipt-card .blocked { color: var(--clay-deep); }

/* pressed wax/clay stamp */
.stamp {
  position: absolute;
  right: 14px;
  bottom: 12px;
  width: 92px;
  height: 92px;
  transform: rotate(-9deg);
  opacity: 0.94;
  pointer-events: none;
}
.stamp-inline { position: static; transform: rotate(-6deg); display: inline-block; }

@media (prefers-reduced-motion: no-preference) {
  .stamp.stamp-press {
    animation: stamp-press 0.5s cubic-bezier(0.2, 1.6, 0.35, 1) 0.9s both;
  }
  @keyframes stamp-press {
    0%   { opacity: 0; transform: rotate(-9deg) scale(1.9); }
    62%  { opacity: 1; transform: rotate(-9deg) scale(0.94); }
    100% { opacity: 0.94; transform: rotate(-9deg) scale(1); }
  }
  .fade-rise { opacity: 0; animation: fade-rise 0.7s ease 0.15s both; }
  .fade-rise-late { opacity: 0; animation: fade-rise 0.7s ease 0.45s both; }
  @keyframes fade-rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
  }
}

/* -------------------------------------------------------------- sections */

.section { padding: clamp(56px, 9vh, 110px) 0; }
.section + .section { border-top: 1px solid var(--hairline); }
.section-tight { padding: clamp(36px, 6vh, 64px) 0; }

.section-head { max-width: 720px; margin-bottom: clamp(28px, 4vh, 48px); }
.section-head .kicker {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--clay-deep);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-head .kicker::before { content: ""; width: 22px; height: 1px; background: var(--clay-line); }
.section-head p { color: var(--ink-2); font-size: 18px; }

/* three questions row */
.qa-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (max-width: 860px) { .qa-row { grid-template-columns: 1fr; } }
.qa-cell { background: var(--paper-raised); padding: 26px 26px 22px; }
.qa-cell .q {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 560;
  margin-bottom: 8px;
}
.qa-cell .q em { color: var(--clay-deep); font-style: italic; }
.qa-cell p { font-size: 15.5px; color: var(--ink-2); margin: 0; }
.qa-cell .layer-tag {
  font: 600 11.5px/1 var(--font-mono);
  color: var(--sea);
  margin-bottom: 14px;
  display: block;
}

/* alternating layer rows */
.layer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: clamp(30px, 5vh, 52px) 0;
}
.layer-row + .layer-row { border-top: 1px dashed var(--hairline-strong); }
@media (max-width: 900px) {
  .layer-row { grid-template-columns: 1fr; }
  .layer-row > .layer-visual { order: 2; }
}
.layer-row.flip > .layer-copy { order: 2; }
.layer-row.flip > .layer-visual { order: 1; }
@media (max-width: 900px) {
  .layer-row.flip > .layer-copy { order: 1; }
  .layer-row.flip > .layer-visual { order: 2; }
}

.layer-copy .layer-no {
  font: 600 12px/1 var(--font-mono);
  color: var(--sea);
  display: block;
  margin-bottom: 12px;
}
.layer-copy h3 { font-size: clamp(22px, 2.4vw, 28px); }
.layer-copy p { color: var(--ink-2); font-size: 16.5px; }
.layer-copy .layer-more { font-size: 15px; }

/* paper trail (how it works) */
.trail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  counter-reset: trail;
  margin-top: 8px;
}
@media (max-width: 860px) { .trail { grid-template-columns: 1fr 1fr; row-gap: 34px; } }
@media (max-width: 520px) { .trail { grid-template-columns: 1fr; } }

.trail-step { position: relative; padding: 0 26px 0 0; }
.trail-step::before {
  counter-increment: trail;
  content: counter(trail, lower-roman);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  color: var(--clay-deep);
  display: block;
  margin-bottom: 10px;
}
.trail-step::after {
  content: "";
  position: absolute;
  top: 9px;
  left: 28px;   /* start just past the roman numeral */
  right: 10px;  /* stretch across to just before the next step's numeral */
  border-top: 1px dashed var(--hairline-strong);
}
.trail-step:last-child::after { display: none; }
@media (max-width: 860px) { .trail-step::after { display: none; } }

.trail-step h3 { font-size: 18px; margin-bottom: 6px; }
.trail-step p { font-size: 15px; color: var(--ink-2); margin: 0; }
.trail-step code { font-size: 12.5px; }

/* story */
.story .wrap {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
@media (max-width: 900px) { .story .wrap { grid-template-columns: 1fr; } }

.story-figure {
  background: var(--paper-sunken);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 52px);
  text-align: center;
  position: relative;
}
.story-figure img { max-width: min(260px, 70%); height: auto; }
.story-figure figcaption {
  margin-top: 18px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-3);
}
.story-copy p { color: var(--ink-2); }
.story-copy .drop {
  font-size: 19px;
  color: var(--ink);
}

/* standards strip */
.standards {
  border-top: 1px solid var(--hairline);
  background: var(--paper-sunken);
}
.standards .wrap { padding-top: 34px; padding-bottom: 34px; }
.standards p.label {
  text-align: center;
  font-size: 14px;
  color: var(--ink-3);
  margin: 0 auto 18px;
}
.standards ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  margin: 0; padding: 0;
}
.standards li {
  font: 500 13.5px/1 var(--font-mono);
  color: var(--ink-2);
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--paper-raised);
}

/* FAQ */
.faq-list { max-width: 780px; }
.faq-list details {
  border-bottom: 1px solid var(--hairline);
  padding: 4px 0;
}
.faq-list details:first-child { border-top: 1px solid var(--hairline); }
.faq-list summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding: 16px 2px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 560;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--clay-deep);
  font-size: 20px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list .faq-a { padding: 0 2px 20px; color: var(--ink-2); font-size: 16px; }
.faq-list .faq-a p { margin-bottom: 0.6em; }

/* final CTA */
.cta-final {
  background: var(--ink);
  color: var(--paper);
}
@media (prefers-color-scheme: dark) {
  .cta-final { background: var(--paper-sunken); }
}
.cta-final .wrap {
  padding-top: clamp(56px, 9vh, 96px);
  padding-bottom: clamp(56px, 9vh, 96px);
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
@media (max-width: 860px) { .cta-final .wrap { grid-template-columns: 1fr; } }
.cta-final h2 { color: inherit; }
.cta-final p { color: color-mix(in srgb, currentColor 72%, transparent); font-size: 18px; }
.cta-final .btn-primary { background: var(--clay); color: #241a12; }
.cta-final .btn-primary:hover { background: var(--clay-line); }
.cta-final .cta-art { text-align: center; }
.cta-final .cta-art svg { width: min(190px, 50vw); height: auto; }

/* ---------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 40px 0 48px;
  font-size: 14.5px;
  color: var(--ink-3);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
  justify-content: space-between;
  align-items: flex-start;
}
.site-footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--ink-2); }
.footer-brand img { height: 24px; }

/* ------------------------------------------------------------ forms/pages */

.page-head { padding: clamp(44px, 7vh, 80px) 0 clamp(20px, 3vh, 36px); }
.page-head h1 { font-size: clamp(34px, 4.4vw, 52px); }
.page-head .lede { font-size: 18.5px; color: var(--ink-2); max-width: 58ch; }

.form-card {
  background: var(--paper-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(24px, 4vw, 40px);
  max-width: 560px;
}
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 7px;
}
.form-row .hint { font-weight: 400; color: var(--ink-3); }
.form-row input[type="email"],
.form-row input[type="text"],
.form-row input[type="password"],
.form-row select,
.form-row textarea {
  width: 100%;
  font: 16px/1.4 var(--font-body);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  padding: 12px 14px;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: 2px solid var(--clay);
  outline-offset: 1px;
  border-color: var(--clay);
}
.form-row select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.form-foot { font-size: 13.5px; color: var(--ink-3); margin-top: 14px; }
.form-error {
  display: none;
  background: var(--clay-tint);
  border: 1px solid var(--clay-line);
  color: var(--clay-press);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14.5px;
  margin-bottom: 16px;
}
.form-error.show { display: block; }

.success-panel { display: none; text-align: center; padding: 12px 0 4px; }
.success-panel.show { display: block; }
.success-panel .stamp-wrap { position: relative; height: 120px; margin-bottom: 6px; }
.success-panel .stamp { position: static; width: 110px; height: 110px; }
.success-panel h2 { font-size: 26px; }
.success-panel p { margin-left: auto; margin-right: auto; color: var(--ink-2); font-size: 16px; }

.two-col-page {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  padding-bottom: clamp(56px, 9vh, 110px);
}
@media (max-width: 900px) { .two-col-page { grid-template-columns: 1fr; } }

.aside-list { list-style: none; margin: 0; padding: 0; }
.aside-list li {
  padding: 16px 0;
  border-bottom: 1px dashed var(--hairline-strong);
  font-size: 15.5px;
  color: var(--ink-2);
}
.aside-list li:first-child { border-top: 1px dashed var(--hairline-strong); }
.aside-list strong { color: var(--ink); display: block; margin-bottom: 3px; font-size: 16px; }

/* ------------------------------------------------------------------ docs */

.docs-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  padding: 40px 0 90px;
}
@media (max-width: 860px) { .docs-layout { grid-template-columns: 1fr; } }

.docs-nav {
  position: sticky;
  top: 88px;
  align-self: start;
  font-size: 14.5px;
}
@media (max-width: 860px) {
  .docs-nav { position: static; border-bottom: 1px solid var(--hairline); padding-bottom: 18px; }
}
.docs-nav .docs-nav-title {
  font: 600 12px/1 var(--font-mono);
  color: var(--ink-3);
  margin-bottom: 12px;
}
.docs-nav ul { list-style: none; margin: 0 0 20px; padding: 0; }
.docs-nav li { margin: 2px 0; }
.docs-nav a {
  display: block;
  color: var(--ink-2);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 7px;
  border-left: 2px solid transparent;
}
.docs-nav a:hover { background: var(--paper-sunken); color: var(--ink); }
.docs-nav a[aria-current="page"] {
  color: var(--clay-press);
  font-weight: 600;
  background: var(--clay-tint);
}

.docs-body h1 { font-size: clamp(30px, 3.6vw, 42px); }
.docs-body h2 {
  font-size: 24px;
  margin-top: 1.9em;
  padding-top: 0.9em;
  border-top: 1px solid var(--hairline);
}
.docs-body h3 { margin-top: 1.5em; }
.docs-body .docs-lede { font-size: 18px; color: var(--ink-2); }
.docs-body pre.code { border-radius: var(--radius); border: 1px solid var(--bg-code-line); margin: 18px 0 24px; }
.docs-body table.env-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14.5px;
  margin: 18px 0 26px;
}
.docs-body table.env-table th {
  text-align: left;
  font: 600 12.5px/1.4 var(--font-mono);
  color: var(--ink-3);
  border-bottom: 1px solid var(--hairline-strong);
  padding: 8px 14px 8px 0;
}
.docs-body table.env-table td {
  border-bottom: 1px solid var(--hairline);
  padding: 9px 14px 9px 0;
  vertical-align: top;
}
.docs-body table.env-table code { white-space: nowrap; }

.docs-callout {
  border: 1px solid var(--clay-line);
  background: var(--clay-tint);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 15px;
  color: var(--ink);
  margin: 18px 0 24px;
  max-width: var(--measure);
}
.docs-callout strong { color: var(--clay-press); }

.copy-btn {
  position: absolute;
  top: 8px; right: 8px;
  font: 600 11.5px/1 var(--font-mono);
  color: var(--code-dim);
  background: transparent;
  border: 1px solid var(--bg-code-line);
  border-radius: 6px;
  padding: 5px 9px;
  cursor: pointer;
}
.copy-btn:hover { color: var(--code-text); border-color: var(--code-dim); }
.code-holder { position: relative; }

.docs-next {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px dashed var(--hairline-strong);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 15px;
}

/* ---------------------------------------------------- hero waitlist ticket */
/* The signup styled as a physical claim stub: perforated header, punched
   notches, serial number, and the clay stamp pressed on success. */
.waitlist-ticket {
  position: relative;
  background: var(--paper-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  padding: 20px 24px 22px;
  max-width: 428px;
}
.demo-stack .waitlist-ticket { margin-left: clamp(0px, 3vw, 40px); }

.ticket-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font: 600 11.5px/1.4 var(--font-mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.ticket-head .serial { color: var(--clay-deep); }

.ticket-perf {
  position: relative;
  height: 1px;
  margin: 14px -25px 20px;
  border-top: 1px dashed var(--hairline-strong);
}
.ticket-perf::before,
.ticket-perf::after {
  content: "";
  position: absolute;
  top: -8px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--hairline);
}
.ticket-perf::before { left: -8px; }
.ticket-perf::after { right: -8px; }

.waitlist-ticket .form-row { margin-bottom: 14px; }
.waitlist-ticket .form-row:last-of-type { margin-bottom: 18px; }
.waitlist-ticket .btn { width: 100%; justify-content: center; }
.ticket-foot {
  font-size: 12.5px;
  color: var(--ink-3);
  margin: 12px 0 0;
  display: flex;
  align-items: center;
  gap: 7px;
}
.ticket-foot::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok);
  flex-shrink: 0;
}
.demo-stack .success-panel .stamp { width: 104px; height: 104px; }
