/* waycairn.com — the landing page (task 26.5).

   The same "field notebook + trail" direction as the app (Epic 31): paper surface, ink
   text, the roadmap's green, rust for "you are here", Georgia display headings and mono
   eyebrows. The tokens below are COPIED from styles.css (the notebook skin, both modes)
   rather than imported, because the app stylesheet is 3,000 lines of screens this page
   does not have. If the notebook palette changes, change it here too. */

:root {
  --surface: #f6f2e9;
  --surface-raised: #fffdf8;
  --surface-sunken: #e9e3d6;
  --text-1: #221f1a;
  --text-2: #4f4a41;
  --text-3: #676055;
  --accent: #2f6f5e;
  --accent-on: #fffdf8;
  --accent-soft: #cfe0d8;
  --accent-current: #a4442f;
  --state-alert: #a33224;
  --border-hairline: #ddd5c4;
  --border-strong: #8a7e64;
  --rule-margin: #c2705f;
  --rule-line: rgb(34 31 26 / 5%);
  --shadow-raised: 0 1px 2px rgb(34 31 26 / 6%), 0 8px 24px rgb(34 31 26 / 6%);

  --font-display: Georgia, 'Noto Serif', 'Liberation Serif', serif;
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  --weight-display: 600;
  --weight-strong: 600;

  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;

  --text-xs: clamp(0.6875rem, 0.66rem + 0.15vw, 0.75rem);
  --text-sm: clamp(0.8125rem, 0.78rem + 0.2vw, 0.875rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  --text-lg: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.8vw, 1.625rem);
  --text-2xl: clamp(1.6rem, 1.3rem + 1.6vw, 2.4rem);
  --text-hero: clamp(2.3rem, 1.6rem + 3.6vw, 4rem);

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 12px;
  --radius-pill: 999px;
  --wrap: 72rem;
  --gutter: max(var(--sp-4), env(safe-area-inset-left), env(safe-area-inset-right));
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #15171a;
    --surface-raised: #1c1f23;
    --surface-sunken: #101215;
    --text-1: #e6e1d6;
    --text-2: #b4afa3;
    --text-3: #8b867c;
    --accent: #7fb8a6;
    --accent-on: #10201c;
    --accent-soft: #24443b;
    --accent-current: #c07b6e;
    --state-alert: #e08a7d;
    --border-hairline: #2c3034;
    --border-strong: #6a737d;
    --rule-margin: #5c4b47;
    --rule-line: rgb(230 225 214 / 4%);
    --shadow-raised: none;
    --weight-display: 500;
    --weight-strong: 500;
  }
}

/* ── Base ──────────────────────────────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--sp-6);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: var(--text-base);
  line-height: 1.6;
  padding-top: env(safe-area-inset-top);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 var(--sp-4);
  text-wrap: balance;
}

h1 {
  font-size: var(--text-hero);
}

h2 {
  font-size: var(--text-2xl);
}

h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--sp-2);
}

p {
  margin: 0 0 var(--sp-4);
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

strong {
  font-weight: var(--weight-strong);
}

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

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.narrow {
  max-width: 46rem;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--sp-3);
}

.lede {
  font-size: var(--text-lg);
  color: var(--text-2);
  max-width: 38rem;
}

.skip-link {
  position: absolute;
  left: var(--sp-2);
  top: calc(var(--sp-2) + env(safe-area-inset-top));
  z-index: 10;
  padding: var(--sp-2) var(--sp-3);
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: var(--sp-2) var(--sp-5);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font: inherit;
  font-weight: var(--weight-strong);
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-on);
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-secondary {
  background: transparent;
  color: var(--text-1);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--surface-raised);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

/* ── Header ────────────────────────────────────────────────────────────────── */

.site-header {
  border-bottom: 1px solid var(--border-hairline);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--text-1);
  text-decoration: none;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  flex: none;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: var(--text-lg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-1) var(--sp-4);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  color: var(--text-2);
  text-decoration: none;
  font-size: var(--text-sm);
  padding: var(--sp-2) 0;
}

.site-nav a:hover {
  color: var(--text-1);
  text-decoration: underline;
}

.site-nav .lang-link {
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-pill);
  padding: var(--sp-1) var(--sp-3);
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

@media (max-width: 40rem) {
  .site-nav a:not(.lang-link) {
    display: none;
  }
}

/* ── Hero ──────────────────────────────────────────────────────────────────── */

.hero {
  padding-block: var(--sp-7) var(--sp-8);
}

.hero-grid {
  display: grid;
  gap: var(--sp-7);
  align-items: center;
}

@media (min-width: 60rem) {
  .hero-grid {
    grid-template-columns: 1.15fr 1fr;
  }
}

.hero h1 {
  margin-bottom: var(--sp-5);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin: var(--sp-5) 0 var(--sp-4);
}

.hero-note {
  font-size: var(--text-sm);
  color: var(--text-3);
}

/* The example roadmap: a notebook page with ruled lines, a margin rule, and the trail
   drawn down it — done stops in green, the current one in rust, the rest open. */
.trail-card {
  margin: 0;
  padding: var(--sp-5) var(--sp-5) var(--sp-5) var(--sp-6);
  background-color: var(--surface-raised);
  background-image:
    linear-gradient(
      90deg,
      transparent 1.15rem,
      var(--rule-margin) 1.15rem,
      var(--rule-margin) calc(1.15rem + 1px),
      transparent calc(1.15rem + 1px)
    ),
    repeating-linear-gradient(180deg, transparent 0 1.95rem, var(--rule-line) 1.95rem 2rem);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-raised);
}

.trail-head .eyebrow {
  margin-bottom: var(--sp-1);
}

.trail-title {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: var(--text-xl);
  margin: 0;
}

.trail-meta {
  font-size: var(--text-sm);
  color: var(--text-3);
  margin: var(--sp-1) 0 var(--sp-4);
}

.trail {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.trail::before {
  content: '';
  position: absolute;
  left: 0.55rem;
  top: 0.9rem;
  bottom: 0.9rem;
  border-left: 2px dotted var(--border-strong);
}

.stop {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-3);
  padding: var(--sp-2) 0 var(--sp-2) 2rem;
  color: var(--text-3);
}

.stop .dot {
  position: absolute;
  left: 0.15rem;
  top: 50%;
  width: 0.9rem;
  height: 0.9rem;
  margin-top: -0.45rem;
  border-radius: 50%;
  background: var(--surface-raised);
  border: 2px solid var(--border-strong);
}

.stop.done {
  color: var(--text-2);
}

.stop.done .dot {
  background: var(--accent);
  border-color: var(--accent);
}

.stop.current {
  color: var(--text-1);
  font-weight: var(--weight-strong);
}

.stop.current .dot {
  border-color: var(--accent-current);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-current) 20%, transparent);
  background: var(--accent-current);
}

.stop.current .tag {
  color: var(--accent-current);
  border-color: var(--accent-current);
}

.trail-foot {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}

.chip,
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem var(--sp-3);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-hairline);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: var(--text-2);
  background: var(--surface);
  font-weight: normal;
}

.chip-ok {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Sections ──────────────────────────────────────────────────────────────── */

.section,
.band {
  padding-block: var(--sp-8);
}

.section-alt {
  background: var(--surface-raised);
  border-block: 1px solid var(--border-hairline);
}

.band {
  background: var(--surface-sunken);
}

.band p:not(.eyebrow) {
  font-size: var(--text-lg);
  color: var(--text-2);
}

.steps {
  list-style: none;
  margin: var(--sp-6) 0 0;
  padding: 0;
  display: grid;
  gap: var(--sp-6);
  counter-reset: step;
}

@media (min-width: 48rem) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  position: relative;
  padding-top: var(--sp-6);
  border-top: 2px dotted var(--border-strong);
}

.step-num {
  position: absolute;
  top: -1.05rem;
  left: 0;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-on);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--weight-strong);
}

.step:last-child .step-num {
  background: var(--accent-current);
}

.step p,
.card p {
  color: var(--text-2);
  margin: 0;
}

.cards {
  display: grid;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.card {
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
}

.card h3::before {
  content: '';
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: var(--sp-2);
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 0.15em;
}

.privacy-grid {
  display: grid;
  gap: var(--sp-6);
  align-items: start;
}

@media (min-width: 56rem) {
  .privacy-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--sp-4);
}

.checklist li {
  position: relative;
  padding-left: 2rem;
  color: var(--text-2);
}

.checklist li::before {
  content: '';
  position: absolute;
  left: 0.2rem;
  top: 0.45em;
  width: 0.9rem;
  height: 0.5rem;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* ── Platforms ─────────────────────────────────────────────────────────────── */

.platforms {
  list-style: none;
  margin: var(--sp-6) 0 0;
  padding: 0;
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.platform {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
}

/* An empty, sized slot for a store badge or OS logo, until the artwork exists. */
.platform-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
}

.platform-icon:not(:empty) {
  border: 0;
}

.platform-icon > img,
.platform-icon > svg {
  max-width: 100%;
  max-height: 100%;
}

.platform-text {
  display: grid;
  flex: 1;
  min-width: 0;
}

.platform-name {
  font-weight: var(--weight-strong);
}

.platform-sub {
  font-size: var(--text-sm);
  color: var(--text-3);
}

/* ── Signup ────────────────────────────────────────────────────────────────── */

.signup-grid {
  display: grid;
  gap: var(--sp-5);
  align-items: start;
}

@media (min-width: 60rem) {
  .signup-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.panel {
  padding: var(--sp-6) var(--sp-5);
  background: var(--surface-raised);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-raised);
}

.panel h2 {
  font-size: var(--text-xl);
}

.panel > p {
  color: var(--text-2);
}

.signup {
  display: grid;
  gap: var(--sp-4);
  margin-top: var(--sp-5);
}

.field {
  display: grid;
  gap: var(--sp-1);
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.field > label,
.field > legend {
  font-weight: var(--weight-strong);
  font-size: var(--text-sm);
  padding: 0;
  margin-bottom: var(--sp-1);
}

input[type='email'],
textarea {
  width: 100%;
  min-height: 44px;
  padding: var(--sp-2) var(--sp-3);
  font: inherit;
  color: var(--text-1);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
}

textarea {
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-3);
}

input[aria-invalid='true'],
textarea[aria-invalid='true'] {
  border-color: var(--state-alert);
}

.hint {
  font-size: var(--text-sm);
  color: var(--text-3);
  margin: 0;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  color: var(--text-2);
  min-height: 44px;
  padding-block: var(--sp-2);
  cursor: pointer;
}

.check input {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.15rem 0 0;
  accent-color: var(--accent);
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
  column-gap: var(--sp-3);
}

.platforms-field[aria-invalid='true'] legend {
  color: var(--state-alert);
}

.signup .btn {
  justify-self: start;
}

.form-status {
  margin: 0;
  font-size: var(--text-sm);
  min-height: 1.4em;
}

.form-status.is-error {
  color: var(--state-alert);
}

.form-success {
  margin: 0;
  padding: var(--sp-4);
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--text-1);
  font-weight: var(--weight-strong);
}

/* Honeypot: off-screen, not display:none, so naive bots still fill it in. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ── FAQ ───────────────────────────────────────────────────────────────────── */

.faq {
  margin-top: var(--sp-5);
  border-top: 1px solid var(--border-hairline);
}

.faq details {
  border-bottom: 1px solid var(--border-hairline);
}

.faq summary {
  cursor: pointer;
  padding: var(--sp-4) 0;
  min-height: 44px;
  font-weight: var(--weight-strong);
  list-style-position: outside;
}

.faq summary::marker {
  color: var(--accent);
}

.faq details p {
  color: var(--text-2);
  padding-bottom: var(--sp-2);
}

/* ── Footer ────────────────────────────────────────────────────────────────── */

.site-footer {
  padding-block: var(--sp-7) max(var(--sp-7), env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-hairline);
  font-size: var(--text-sm);
  color: var(--text-2);
}

.footer-grid {
  display: grid;
  gap: var(--sp-5);
}

@media (min-width: 48rem) {
  .footer-grid {
    grid-template-columns: 1fr auto;
  }
}

.footer-tagline {
  margin: var(--sp-2) 0 0;
  color: var(--text-3);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-5);
  align-content: start;
}

.footer-links a {
  color: var(--text-2);
  padding: var(--sp-2) 0;
}

.footer-legal {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--text-3);
  font-size: var(--text-xs);
}

/* ── Simple pages: thanks, 404, legal documents ───────────────────────────── */

.page-simple {
  padding-block: var(--sp-8);
  min-height: 50vh;
}

.legal-doc {
  padding-block: var(--sp-7);
}

.legal-doc h1 {
  font-size: var(--text-2xl);
}

.legal-doc h2 {
  font-size: var(--text-xl);
  margin-top: var(--sp-7);
}

.legal-doc h3 {
  margin-top: var(--sp-5);
}

.legal-doc ul,
.legal-doc ol {
  padding-left: var(--sp-5);
}

.legal-doc li {
  margin-bottom: var(--sp-2);
}

.legal-doc table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--sp-5);
  font-size: var(--text-sm);
  display: block;
  overflow-x: auto;
}

.legal-doc th,
.legal-doc td {
  text-align: left;
  vertical-align: top;
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--border-hairline);
}

.legal-doc code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-sunken);
  padding: 0.05em 0.3em;
  border-radius: var(--radius-sm);
  overflow-wrap: anywhere;
}

.legal-doc a {
  overflow-wrap: anywhere;
}

.legal-other {
  font-size: var(--text-sm);
}

.license {
  white-space: pre-wrap;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-2);
}
