/*
 * Plum — the public front door. Hand-written on purpose: this repository has no npm or
 * Vite build step (README), and the page is served as static bytes by the edge with
 * no PHP in the path (ADR 6), so there is nothing here to compile.
 */

/* ---------------------------------------------------------------- tokens */
:root {
  --paper:         #FFFFFF;
  --surface:       #FAF6F9;
  --ink:           #17111A;
  --ink-2:         #453B48;
  --muted:         #74697A;
  --line:          #E9E1EA;
  --line-2:        #D6CBD8;

  /* Deep plum measures 8.6:1 on white, which means it clears AA BOTH as a fill under
     white text and as text on paper — so --accent and --accent-text share a value
     here. The roles stay separate tokens because the next palette may not be so
     obliging, and because the CTA band still needs an accent that inverts. */
  --accent:        #7B2D6B;  /* fills — buttons, the free plan, the mark      */
  --accent-hi:     #8F3A7E;  /* hover on those fills                          */
  --accent-ink:    #FFFFFF;  /* white text ON the accent ............ 8.6:1   */
  --accent-text:   #7B2D6B;  /* the accent AS text on paper ......... 8.6:1   */
  --accent-on-ink: #CE7FC0;  /* the accent on the inverted CTA band           */
  --wash:          #F6E9F3;
  --warn-on-ink:   #FFB4A8;

  --shadow:      0 1px 2px rgba(23,17,26,.04), 0 10px 30px -16px rgba(23,17,26,.16);
  --shadow-lift: 0 1px 2px rgba(23,17,26,.05), 0 18px 44px -20px rgba(23,17,26,.28);

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body:    "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:         #120E15;
    --surface:       #1A141E;
    --ink:           #F1EBF3;
    --ink-2:         #C0B4C5;
    --muted:         #91849A;
    --line:          #2A2130;
    --line-2:        #3A2F41;

    /* Deep plum disappears on a dark ground, so the accent lifts to a light plum
       and the ink on it goes dark. --accent-on-ink inverts, because the CTA band
       flips to a light ground in this theme. */
    --accent:        #CE7FC0;
    --accent-hi:     #DE9AD2;
    --accent-ink:    #1C0A18;
    --accent-text:   #CE7FC0;
    --accent-on-ink: #7B2D6B;
    --wash:          #2A162A;
    --warn-on-ink:   #B42318;
    --shadow:      0 1px 2px rgba(0,0,0,.5), 0 10px 30px -16px rgba(0,0,0,.7);
    --shadow-lift: 0 1px 2px rgba(0,0,0,.5), 0 18px 44px -20px rgba(0,0,0,.8);
  }
}

:root[data-theme="dark"] {
  --paper:         #120E15;
  --surface:       #1A141E;
  --ink:           #F1EBF3;
  --ink-2:         #C0B4C5;
  --muted:         #91849A;
  --line:          #2A2130;
  --line-2:        #3A2F41;

  /* Deep plum disappears on a dark ground, so the accent lifts to a light plum
     and the ink on it goes dark. --accent-on-ink inverts, because the CTA band
     flips to a light ground in this theme. */
  --accent:        #CE7FC0;
  --accent-hi:     #DE9AD2;
  --accent-ink:    #1C0A18;
  --accent-text:   #CE7FC0;
  --accent-on-ink: #7B2D6B;
  --wash:          #2A162A;
  --warn-on-ink:   #B42318;
  --shadow:      0 1px 2px rgba(0,0,0,.5), 0 10px 30px -16px rgba(0,0,0,.7);
  --shadow-lift: 0 1px 2px rgba(0,0,0,.5), 0 18px 44px -20px rgba(0,0,0,.8);
}

/* ---------------------------------------------------------------- base */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--display);
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin: 0;
  line-height: 1.05;
}

p { margin: 0; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}

.band { padding-block: clamp(64px, 9vw, 120px); }
.band-tint { background: var(--surface); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin: 0 0 18px;
}

.band-head { max-width: 44ch; margin-bottom: clamp(36px, 5vw, 56px); }
.band-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); font-weight: 800; }
.band-head p { margin-top: 16px; color: var(--muted); font-size: 1.0625rem; max-width: 58ch; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--body);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hi); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }

/* ---------------------------------------------------------------- nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 68px;
}
.mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.035em;
  text-decoration: none;
}
/* The mark: a plum, drawn once and themed through the same tokens as everything
   else. The cleft is stroked in --paper rather than a darker plum, so it reads as a
   cut-out in both themes — light on the deep fill, dark on the light one. */
.mark-glyph { width: 23px; height: 23px; flex: none; }
.mark-body,
.mark-leaf { fill: var(--accent); }
.mark-stem {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.4;
  stroke-linecap: round;
}
.mark-cleft {
  fill: none;
  stroke: var(--paper);
  stroke-width: 1.3;
  stroke-linecap: round;
  opacity: .35;
}
.nav-links { display: flex; gap: 28px; margin-left: 8px; }
.nav-links a {
  font-size: 0.9375rem;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 500;
}
.nav-links a:hover { color: var(--ink); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.nav-right .signin { font-size: 0.9375rem; font-weight: 500; color: var(--ink-2); text-decoration: none; }
.nav-right .signin:hover { color: var(--ink); }
@media (max-width: 780px) { .nav-links { display: none; } }

/* ---------------------------------------------------------------- hero */
.hero { padding-block: clamp(56px, 8vw, 104px) clamp(64px, 9vw, 112px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(40px, 6vw, 76px);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.6rem, 5.6vw, 4.25rem);
  font-weight: 800;
}
.swipe { position: relative; white-space: nowrap; color: var(--accent-text); }
.swipe svg {
  position: absolute;
  left: -1%;
  bottom: -0.16em;
  width: 102%;
  height: 0.28em;
  overflow: visible;
}
.swipe path { stroke: var(--accent); stroke-width: 7; fill: none; stroke-linecap: round; opacity: .85; }

.hero-sub {
  margin-top: 22px;
  font-size: 1.125rem;
  color: var(--ink-2);
  max-width: 46ch;
}
.hero-cta { margin-top: 34px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 0.875rem; color: var(--muted); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------- hero mechanism figure */
.figure { display: grid; gap: 12px; justify-items: stretch; }

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.panel-body { padding: 8px 16px 14px; }

.frow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 7px 0;
  font-family: var(--mono);
  font-size: 0.8125rem;
  border-bottom: 1px dashed var(--line);
}
.frow:last-child { border-bottom: 0; }
.frow span:first-child { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.frow span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }

.arrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 18px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.arrow-line { width: 1px; height: 22px; background: var(--line-2); margin-left: 4px; }

.deploy { border-color: var(--line-2); box-shadow: var(--shadow-lift); }
.deploy-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--wash);
  border-bottom: 1px solid var(--line);
}
.deploy-url {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  font-family: var(--body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 4px 9px;
  border-radius: 999px;
}
.pill::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent-ink);
}
.deploy-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px 16px;
  padding: 14px 16px 16px;
}
.meta-k {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.meta-v {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------------------------------------------------------------- steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  border-top: 1px solid var(--line);
}
.step { padding: 32px 28px 0 0; border-top: 3px solid var(--accent); margin-top: -1px; }
.step:nth-child(2) { border-top-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.step:nth-child(3) { border-top-color: color-mix(in srgb, var(--accent) 25%, var(--line)); }
.step-n {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent-text);
  letter-spacing: 0.1em;
}
.step h3 { font-size: 1.25rem; font-weight: 700; margin: 12px 0 10px; }
.step p { color: var(--muted); font-size: 0.9375rem; }
.step code {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--ink-2);
  background: var(--wash);
  padding: 1px 5px;
  border-radius: 4px;
}
@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr; gap: 0; }
  .step { padding: 26px 0 0; }
}

/* ---------------------------------------------------------------- features */
.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.feature { background: var(--paper); padding: 30px 28px 32px; }
.feature h3 { font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 10px; }
.feature p { color: var(--muted); font-size: 0.9375rem; }
.feature-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--wash);
  color: var(--accent-text);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.feature-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 880px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- pricing */
.price-head { text-align: center; max-width: 46ch; margin-inline: auto; }
.price-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); font-weight: 800; }
.price-head p { margin-top: 16px; color: var(--muted); }

.toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 32px 0 44px;
  font-size: 0.9375rem;
  font-weight: 500;
}
.toggle-btn {
  width: 46px; height: 26px;
  border-radius: 999px;
  border: 0;
  background: var(--line-2);
  padding: 3px;
  cursor: pointer;
  transition: background-color .18s ease;
}
.toggle-btn[aria-checked="true"] { background: var(--accent); }
.toggle-knob {
  display: block;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--paper);
  transition: transform .18s ease;
}
.toggle-btn[aria-checked="true"] .toggle-knob { transform: translateX(20px); }
.toggle .off { color: var(--muted); }
.badge {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  padding: 4px 8px;
  border-radius: 999px;
}

.plans {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.plan {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.plan-free {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.plan-name { font-family: var(--display); font-size: 1.0625rem; font-weight: 700; }
.plan-price { display: flex; align-items: baseline; gap: 6px; }
.plan-amount { font-family: var(--display); font-size: 2.75rem; font-weight: 800; letter-spacing: -0.04em; }
.plan-per { font-size: 0.875rem; color: var(--muted); }
.plan-free .plan-per { color: color-mix(in srgb, var(--accent-ink) 78%, transparent); }
.plan-billed { font-size: 0.8125rem; color: var(--muted); min-height: 1.2em; }
.plan-free .plan-billed { color: color-mix(in srgb, var(--accent-ink) 78%, transparent); }
.plan-cta { justify-content: center; width: 100%; }
.plan .btn-outline {
  background: transparent;
  border-color: var(--line-2);
  color: var(--ink);
}
.plan .btn-outline:hover { border-color: var(--accent-text); color: var(--accent-text); }
.plan-free .btn {
  background: var(--paper);
  color: var(--accent-text);
}
.plan-free .btn:hover { background: color-mix(in srgb, var(--paper) 88%, var(--accent)); }

.plan-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.plan-list li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 0.875rem;
  color: var(--ink-2);
}
.plan-free .plan-list li { color: color-mix(in srgb, var(--accent-ink) 92%, transparent); }
.tick { width: 16px; height: 16px; margin-top: 3px; flex: none; stroke: var(--accent-text); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.plan-free .tick { stroke: var(--accent-ink); }
.plan-list strong { font-weight: 600; color: var(--ink); }
.plan-free .plan-list strong { color: var(--accent-ink); }

.price-foot {
  margin-top: 28px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
}
@media (max-width: 980px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .plans { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- faq */
.faq-grid h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); font-weight: 800; }
.faq-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(32px, 5vw, 64px); }
.faq-list { display: grid; gap: 0; }
details {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
details:first-child { border-top: 1px solid var(--line); }
summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  list-style: none;
  font-family: var(--display);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 1.125rem;
  color: var(--accent-text);
  flex: none;
  transition: transform .18s ease;
}
details[open] summary::after { content: "\2212"; }
details p { margin-top: 12px; color: var(--muted); font-size: 0.9375rem; max-width: 62ch; }
details code { font-family: var(--mono); font-size: 0.8125rem; color: var(--ink-2); }
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- waitlist */
.cta-band { background: var(--ink); color: var(--paper); }
.cta-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: clamp(32px, 5vw, 72px); align-items: center; }
.cta-band h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); font-weight: 800; color: var(--paper); }
.cta-band p { margin-top: 14px; color: color-mix(in srgb, var(--paper) 66%, transparent); max-width: 46ch; }

.wl { display: flex; gap: 10px; flex-wrap: wrap; }
.wl input[type="email"] {
  flex: 1 1 220px;
  min-width: 0;
  font-family: var(--body);
  font-size: 0.9375rem;
  padding: 13px 16px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--paper) 24%, transparent);
  background: color-mix(in srgb, var(--paper) 8%, transparent);
  color: var(--paper);
}
.wl input[type="email"]::placeholder { color: color-mix(in srgb, var(--paper) 44%, transparent); }
.wl input[type="email"]:focus { border-color: var(--accent-on-ink); outline: none; }
.wl .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.wl-note { margin-top: 14px; font-size: 0.8125rem; color: color-mix(in srgb, var(--paper) 52%, transparent); }
.wl-done {
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--accent-on-ink);
  padding: 13px 0;
}
.wl-error {
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--warn-on-ink);
}
@media (max-width: 860px) { .cta-inner { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- footer */
.foot { border-top: 1px solid var(--line); padding-block: 40px 48px; }
.foot-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.foot p { font-size: 0.875rem; color: var(--muted); }
.foot-links { margin-left: auto; display: flex; gap: 24px; }
.foot-links a { font-size: 0.875rem; color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
