/* ════════════════════════════════════════════════════════════════
   PSA.xyz — Waitlist fork · "Open Line" design system
   Forked from web/index.html. Dark default, warm-paper light theme.
   ════════════════════════════════════════════════════════════════ */

:root {
  --bg: #faf8f3;
  --bg-2: #ffffff;
  --bg-3: #f3efe5;
  --ink: #1a1814;
  --ink-2: #44403a;
  --ink-3: #8a857a;
  --ink-4: #c8c2b3;
  --rule: #e5dfd0;
  --rule-2: #ede7d6;

  --clay-1: oklch(0.660 0.115 55);
  --clay-2: oklch(0.565 0.130 47);
  --clay-3: oklch(0.475 0.115 40);
  --hot-1: var(--clay-1);
  --hot-2: var(--clay-2);
  --hot-3: var(--clay-3);
  --clay-shadow: 0 6px 18px rgba(178, 90, 41, 0.30);

  --shadow-sm: 0 1px 2px rgba(26, 24, 20, 0.04);
  --shadow-md: 0 4px 12px rgba(26, 24, 20, 0.06);
  --shadow-lg: 0 12px 32px rgba(26, 24, 20, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 920px; margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ───── NAV ───── */
nav {
  padding: 22px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
}
.brand {
  font-family: 'Source Serif 4', serif;
  font-variation-settings: "opsz" 36;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  color: var(--clay-2);
  flex-shrink: 0;
}
.brand .tld { color: var(--clay-2); margin-left: -0.04em; }

nav .sign-in {
  border: 1px solid var(--rule);
  background: var(--bg-2);
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
}
nav .sign-in:hover { border-color: var(--ink-2); color: var(--ink); }
nav .sign-in.solid {
  background: var(--clay-2);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(178, 90, 41, 0.22);
}
nav .sign-in.solid:hover { transform: translateY(-1px); color: #fff; }

.nav-actions { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule);
  background: var(--bg-2);
  border-radius: 50%;
  cursor: pointer;
  font-size: 15px; line-height: 1;
  color: var(--ink-2);
  padding: 0;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.theme-toggle:hover { border-color: var(--ink-3); color: var(--ink); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-menu a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: color 0.15s;
  position: relative;
  padding: 4px 0;
}
.nav-menu a:hover { color: var(--ink); }
.nav-menu a.active { color: var(--clay-2); }
@media (max-width: 760px) { .nav-menu { display: none; } }

/* ───── HERO + SHARED TYPE ───── */
h1 {
  font-family: 'Source Serif 4', serif;
  font-variation-settings: "opsz" 144;
  font-weight: 400;
  font-size: clamp(46px, 7.2vw, 86px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
h1 .grad {
  color: var(--clay-2);
  font-style: italic;
}
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--clay-2);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--clay-2);
  box-shadow: 0 0 0 0 rgba(178,90,41,0.5);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(178,90,41,0.45); }
  70% { box-shadow: 0 0 0 8px rgba(178,90,41,0); }
  100% { box-shadow: 0 0 0 0 rgba(178,90,41,0); }
}

.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--clay-2);
  color: white;
  padding: 13px 26px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  border: none;
  cursor: pointer;
  box-shadow: var(--clay-shadow);
  transition: transform 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
.cta-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(178, 90, 41, 0.40); }
.cta-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--ink-2);
  padding: 13px 22px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  border: 1px solid var(--rule);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.cta-ghost:hover { border-color: var(--ink-3); color: var(--ink); }

/* ───── SECTION HEADERS ───── */
section { padding: 80px 0 20px; }
.section-eyebrow {
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--hot-2);
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.section-eyebrow::before { content: "•"; color: var(--hot-1); }
h2.section-title {
  font-family: 'Source Serif 4', serif;
  font-variation-settings: "opsz" 60;
  font-weight: 400;
  font-size: clamp(32px, 4.2vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-align: center;
  margin-bottom: 56px;
}
h2.section-title em { font-style: italic; color: var(--clay-2); }

/* ───── STEPS ───── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step-card {
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
}
.step-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.step-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(200, 126, 73, 0.15), rgba(144, 66, 37, 0.18));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  color: var(--hot-2);
}
.step-card h3 {
  font-family: 'Source Serif 4', serif;
  font-variation-settings: "opsz" 24;
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.step-card p { font-size: 14px; line-height: 1.5; color: var(--ink-2); }

/* ───── USE CASES ───── */
.cases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.case-card {
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 24px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}
.case-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.case-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(200, 126, 73, 0.15), rgba(144, 66, 37, 0.18));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  color: var(--hot-2);
}
.case-card h3 {
  font-family: 'Source Serif 4', serif;
  font-variation-settings: "opsz" 24;
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.case-card p { font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }

/* ───── HEAR IT (samples) ───── */
.hear-it { text-align: center; }
.hear-it-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 40px;
  margin-top: -36px;
}
.samples { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.sample {
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 24px 22px 20px;
  box-shadow: var(--shadow-sm);
  text-align: left;
  display: flex;
  flex-direction: column;
  min-height: 240px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.sample:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.sample-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.12em;
  color: var(--ink-3); text-transform: uppercase;
}
.sample-id { color: var(--hot-2); font-weight: 500; }
.sample-quote {
  font-family: 'Source Serif 4', serif;
  font-variation-settings: "opsz" 18;
  font-size: 15px; line-height: 1.5;
  color: var(--ink); flex: 1; margin-bottom: 18px;
}
.sample-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 14px; border-top: 1px solid var(--rule);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.1em;
  color: var(--ink-3); text-transform: uppercase;
}
.sample-play {
  background: var(--bg-3); border: none;
  padding: 6px 14px 6px 12px; border-radius: 100px;
  color: var(--ink); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 500; transition: all 0.15s;
}
.sample-play:hover { background: var(--ink); color: white; }
.sample-play::before {
  content: ""; width: 0; height: 0;
  border-left: 6px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  margin-right: 2px;
}

/* ───── FAQ ───── */
.faqs-wrap { max-width: 720px; margin: 0 auto; }
.faq {
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.faq:hover { border-color: var(--ink-4); }
.faq summary {
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'Source Serif 4', serif;
  font-variation-settings: "opsz" 18;
  font-size: 16px; font-weight: 500; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "▾"; font-size: 12px; color: var(--ink-3); transition: transform 0.2s;
}
.faq[open] summary::after { transform: rotate(180deg); }
.faq-body {
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--rule);
  font-size: 14.5px; line-height: 1.6; color: var(--ink-2);
}
.faq-body em { font-style: italic; color: var(--hot-2); }

/* ───── WAITLIST FORM ───── */
.signup-card {
  margin: 0 auto;
  max-width: 520px;
  text-align: center;
}
.wl-form {
  display: flex;
  gap: 10px;
  margin: 0 auto;
  max-width: 460px;
}
.wl-input {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 100px;
  padding: 13px 20px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-width: 0;
}
.wl-input::placeholder { color: var(--ink-3); }
.wl-input:focus { border-color: var(--clay-2); box-shadow: 0 0 0 3px rgba(178,90,41,0.12); }
.wl-submit {
  background: var(--clay-2);
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 13px 24px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--clay-shadow);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.wl-submit:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(178,90,41,0.40); }
.wl-submit:disabled { opacity: 0.6; cursor: default; transform: none; box-shadow: none; }
.wl-fine {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 14px;
}
.wl-msg {
  margin-top: 16px;
  font-size: 14.5px;
  min-height: 22px;
  color: var(--ink-2);
}
.wl-msg.error { color: #c0392b; }
.wl-success {
  display: none;
  text-align: center;
}
.wl-success.show { display: block; }
.wl-success .pos {
  font-family: 'Source Serif 4', serif;
  font-variation-settings: "opsz" 60;
  font-size: clamp(40px, 6vw, 56px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--clay-2);
  margin-bottom: 8px;
}
.wl-success .pos sup { font-size: 0.5em; top: -0.6em; position: relative; color: var(--ink-3); }
.wl-success p { color: var(--ink-2); max-width: 42ch; margin: 0 auto; font-size: 15px; }
@media (max-width: 520px) {
  .wl-form { flex-direction: column; }
  .wl-input, .wl-submit { width: 100%; }
}

/* ───── FINAL CTA BAND ───── */
.final {
  margin: 80px auto 80px;
  max-width: 920px;
  background: linear-gradient(160deg, #fff5ee 0%, #fde8df 60%, #f8d6cf 100%);
  border-radius: 18px;
  padding: 56px 32px;
  text-align: center;
  border: 1px solid rgba(178, 90, 41, 0.12);
}
.final h2 {
  font-family: 'Source Serif 4', serif;
  font-variation-settings: "opsz" 60;
  font-weight: 400;
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 14px;
}
.final p { color: var(--ink-2); max-width: 48ch; margin: 0 auto 26px; font-size: 15px; }

/* ───── FOOTER ───── */
footer { margin-top: 60px; padding: 60px 24px 28px; border-top: 1px solid var(--rule); }
.foot-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
  max-width: 920px; margin: 0 auto 40px;
}
.foot-col h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.2em;
  color: var(--ink-3); text-transform: uppercase;
  margin-bottom: 14px; font-weight: 500;
}
.foot-col ul { list-style: none; }
.foot-col li { margin-bottom: 8px; }
.foot-col a { color: var(--ink-2); text-decoration: none; font-size: 13.5px; transition: color 0.15s; }
.foot-col a:hover { color: var(--hot-2); }
.foot-bottom {
  text-align: center; font-size: 12px; color: var(--ink-3);
  line-height: 1.6; padding-top: 28px; border-top: 1px solid var(--rule);
}
.foot-bottom .heart { color: var(--clay-2); }

/* ───── RESPONSIVE ───── */
@media (max-width: 880px) {
  .steps { grid-template-columns: 1fr; }
  .cases { grid-template-columns: 1fr 1fr; }
  .samples { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  nav { padding: 18px 20px; }
}
@media (max-width: 480px) {
  .cases { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
}

/* ═════ DARK THEME ═════ */
:root[data-theme="dark"] {
  --bg:    #0c0c0b;
  --bg-2:  #1f1c19;
  --bg-3:  #29251f;
  --ink:   #f3eee6;
  --ink-2: #bcb4a7;
  --ink-3: #8b8276;
  --ink-4: #50493f;
  --rule:  #302b25;
  --rule-2:#3a342c;

  --clay-1: oklch(0.715 0.120 58);
  --clay-2: oklch(0.640 0.135 51);
  --clay-3: oklch(0.560 0.125 45);
  --clay-shadow: 0 6px 20px rgba(196, 102, 51, 0.34);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.40);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.46);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);
}
[data-theme="dark"] .final {
  background: linear-gradient(160deg, #221912 0%, #281a12 55%, #301c14 100%);
  border-color: rgba(196, 102, 51, 0.22);
}
[data-theme="dark"] .step-icon,
[data-theme="dark"] .case-icon {
  background: linear-gradient(135deg, rgba(200, 126, 73, 0.20), rgba(196, 102, 51, 0.16));
}
[data-theme="dark"] .sample-play:hover { background: var(--clay-2); color: #fff; }
