/* Landing styles. Mobile first. No external fonts or frameworks. */

/* Colors come from palette.css, shared with the app (frontend/src/assets/tailwind.css). */
@import "palette.css";

:root {
  --radius: 10px;
  --max: 1080px;
  --gutter: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 var(--font);
  overflow-x: hidden;
}

img, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 5vw, 3rem); font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); font-weight: 750; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }

a { color: var(--brand-ink); text-underline-offset: 3px; }
a:hover { color: var(--brand); }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-width: 0;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 650;
  text-decoration: none;
  border: 2px solid transparent;
  text-align: center;
  max-width: 100%;
}
.btn-primary { background: var(--brand); color: #ffffff; }
.btn-primary:hover { background: var(--brand-ink); color: #ffffff; }
.btn-secondary { background: var(--paper); color: var(--brand-ink); border-color: var(--brand); }
.btn-secondary:hover { background: var(--brand-soft); color: var(--brand-ink); }
.btn-on-dark { background: transparent; color: #ffffff; border-color: #ffffff; }
.btn-on-dark:hover { background: #ffffff; color: var(--brand-ink); }

.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 5;
}
.header-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.1rem;
}
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 0.95rem;
}
.nav-list a { color: var(--ink-soft); text-decoration: none; padding: 4px 0; display: inline-block; }
.nav-list a:hover { color: var(--brand-ink); text-decoration: underline; }

/* Hero */
.hero { padding: 40px 0 48px; }
.eyebrow {
  color: var(--brand-ink);
  font-weight: 650;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 36em; margin-top: 8px; }

.media-slot { margin: 32px 0 0; min-width: 0; }
.media-slot img, .media-slot video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}
.media-slot figcaption { font-size: 0.9rem; color: var(--ink-soft); margin-top: 8px; }

/* Sections */
.section { padding: 56px 0; }
.section.alt { background: var(--paper-alt); }
.section-sub { color: var(--ink-soft); margin-top: -0.25em; }

.problem-list, .checklist, .plain {
  padding-left: 0;
  list-style: none;
  margin: 0;
}
.problem-list li {
  font-size: 1.15rem;
  padding: 12px 0 12px 20px;
  border-left: 4px solid var(--brand);
  margin-bottom: 12px;
}
.checklist li {
  position: relative;
  padding: 10px 0 10px 32px;
  border-bottom: 1px solid var(--line);
}
.checklist li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 10px;
  color: var(--brand);
  font-weight: 800;
}

/* Steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
}
.step {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 20px 20px 72px;
  min-width: 0;
}
.step-num {
  position: absolute;
  left: 20px;
  top: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand);
  color: #ffffff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step p { margin: 0; color: var(--ink-soft); }

/* Cards */
.cards {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.card p { color: var(--ink-soft); }
.card ul { padding-left: 20px; margin: 0 0 16px; color: var(--ink-soft); }
.card .btn { margin-top: auto; }
.plan-tag {
  display: inline-block;
  align-self: flex-start;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-size: 0.85rem;
  font-weight: 650;
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

/* FAQ */
.faq details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
  padding: 0;
}
.faq summary {
  cursor: pointer;
  padding: 16px 44px 16px 18px;
  font-weight: 650;
  position: relative;
  list-style: none;
  min-height: 48px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 12px;
  font-size: 1.4rem;
  color: var(--brand);
  line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p {
  padding: 0 18px 16px;
  margin: 0;
  color: var(--ink-soft);
}

/* CTA */
.cta {
  background: var(--brand-ink);
  color: #ffffff;
  padding: 56px 0;
}
.cta h2 { color: #ffffff; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 24px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr);
}
.footer-title {
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--ink);
}
.plain li { margin-bottom: 8px; }
.brand-small { font-weight: 800; color: var(--ink); margin-bottom: 4px; }
.draft-tag {
  display: inline-block;
  background: var(--draft-bg);
  color: var(--draft);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 4px;
  vertical-align: middle;
}
.copyright { margin-top: 24px; font-size: 0.85rem; }

/* Legal drafts */
.draft-banner {
  background: var(--draft-bg);
  color: var(--draft);
  border: 2px solid var(--draft);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 24px 0;
  font-weight: 650;
}
.legal { padding: 32px 0 48px; }
.legal h2 { font-size: 1.25rem; margin-top: 28px; }
.legal .pending { color: var(--ink-soft); font-style: italic; }

/* Wider screens */
@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .header-inner { flex-direction: row; align-items: center; justify-content: space-between; }
  .actions { flex-direction: row; flex-wrap: wrap; }
  .actions .btn { flex: 0 0 auto; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
  .cards.plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { padding: 64px 0 72px; }
  .hero .media-slot { max-width: 880px; }
}

/* Additions: nav button, beta block, FAQ page */
.nav-list .nav-cta {
  color: var(--brand-ink);
  font-weight: 650;
}
.section-note { color: var(--ink-soft); margin: 20px 0 0; font-size: 0.95rem; }
.eyebrow-on-dark { color: #c7d7ff; }
.btn-primary-on-dark { background: #ffffff; color: var(--brand-ink); }
.btn-primary-on-dark:hover { background: var(--brand-soft); color: var(--brand-ink); }
.cta .lead, .cta-note { color: #dbe6ff; margin: 20px 0 0; }
.faq-more { margin: 20px 0 0; font-weight: 650; }
main.section h1 { margin-bottom: 0.3em; }

/* Waitlist form (beta section). White card on the dark CTA; mobile first. */
.waitlist-form {
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 24px;
  max-width: 36rem;
  display: grid;
  gap: 14px;
  text-align: left;
}
.waitlist-form .field { display: grid; gap: 6px; min-width: 0; }
.waitlist-form label { font-weight: 650; font-size: 0.95rem; }
.waitlist-form .optional { font-weight: 400; color: var(--ink-soft); }
.waitlist-form input[type="text"],
.waitlist-form input[type="email"],
.waitlist-form select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
}
.waitlist-form input:focus-visible, .waitlist-form select:focus-visible { outline: 3px solid var(--brand); outline-offset: 1px; }
.waitlist-form .field-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.waitlist-form .field-consent { grid-template-columns: 24px minmax(0, 1fr); align-items: start; gap: 10px; }
.waitlist-form .field-consent input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--brand); }
.waitlist-form .field-consent label { font-weight: 400; font-size: 0.95rem; color: var(--ink-soft); }
.waitlist-form .actions-form { margin-top: 4px; }
.waitlist-form .btn-primary-on-dark { background: var(--brand); color: #ffffff; }
.waitlist-form .btn-primary-on-dark:hover { background: var(--brand-ink); color: #ffffff; }
.waitlist-form .btn-primary-on-dark[disabled] { opacity: 0.6; cursor: not-allowed; }
.waitlist-form .btn-on-dark { background: var(--paper); color: var(--brand-ink); border-color: var(--brand); }
.waitlist-form .btn-on-dark:hover { background: var(--brand-soft); color: var(--brand-ink); }
.form-status { margin: 0; min-height: 1.5em; font-weight: 650; }
.form-status.is-ok { color: #166534; }
.form-status.is-error { color: #b91c1c; }
.form-status.is-sending { color: var(--ink-soft); }
.waitlist-form .cta-note { color: var(--ink-soft); margin: 0; }
.cta .lead { max-width: 36em; }
.cta .cta-note a { color: #ffffff; text-decoration: underline; }
.cta .cta-note a:hover { color: #dbe6ff; }
