/* LocalSide landing page. Palette taken from the app (mobile/src/screens):
   forest #1F3D2B, cream #F4EBDC, teal #2F6F6D, terracotta #C45C2E, sand #E5D4C1.
   Every text/background pair below meets WCAG AA (4.5:1) or better. */

@font-face {
  font-family: "Junge";
  src: url("assets/Junge-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #F4EBDC;
  --surface: #FFFBF4;
  --surface-2: #EADBC6;
  --text: #1F3D2B;
  --muted: #5C4A36;
  --accent: #A2461F;          /* terracotta, text-safe on cream (5.2:1) */
  --accent-deco: #C45C2E;     /* decorative only */
  --teal: #2F6F6D;
  --line: #D4C3B0;
  --btn-bg: #1F3D2B;
  --btn-text: #F4EBDC;
  --focus: #2F6F6D;
  --ok: #2F6F6D;
  --err: #B0413E;
  --shadow: 0 1px 2px rgba(31, 61, 43, .08), 0 8px 24px rgba(31, 61, 43, .08);
  --radius: 18px;
  --serif: "Junge", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #13241A;
    --surface: #1A3024;
    --surface-2: #22392C;
    --text: #F4EBDC;
    --muted: #C9BBA6;
    --accent: #E39A73;
    --accent-deco: #E39A73;
    --teal: #8FC7B8;
    --line: #34503F;
    --btn-bg: #E39A73;
    --btn-text: #13241A;
    --focus: #8FC7B8;
    --ok: #8FC7B8;
    --err: #F2A19E;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

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

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 7vw, 4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--btn-bg); color: var(--btn-text);
  padding: .6rem 1rem; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

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

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Header */
.site-header { padding: 1rem 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--serif); font-size: 1.6rem; color: var(--text); text-decoration: none;
}
.brand svg { width: 34px; height: 34px; }
.nav { display: none; gap: 1.5rem; }
.nav a { color: var(--text); text-decoration: none; font-weight: 500; }
.nav a:hover { text-decoration: underline; }
@media (min-width: 760px) { .nav { display: flex; } }
@media (max-width: 380px) {
  .brand { font-size: 1.35rem; }
  .site-header .btn { min-height: 44px; padding: .5rem .9rem; font-size: .9rem; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .75rem 1.4rem;
  border: 2px solid var(--btn-bg); border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-text);
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: none; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn[disabled] { opacity: .7; cursor: progress; transform: none; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:hover { transform: none; } }

/* Hero */
.hero { padding: 2rem 0 3.5rem; }
.hero .wrap { display: grid; gap: 2.5rem; align-items: center; }
.eyebrow {
  display: inline-block; margin-bottom: 1rem; padding: .3rem .8rem;
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); font-size: .9rem; font-weight: 500;
}
.hero .lede { font-size: 1.15rem; color: var(--muted); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.hero-note { margin-top: 1rem; font-size: .9rem; color: var(--muted); }
.hero-art { max-width: 420px; margin: 0 auto; width: 100%; }
@media (min-width: 900px) {
  .hero { padding: 3.5rem 0 5rem; }
  .hero .wrap { grid-template-columns: 1.1fr .9fr; }
}

/* Sections */
section { padding: 3.5rem 0; }
.section-head { max-width: 40rem; margin-bottom: 2rem; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.alt { background: var(--surface); border-block: 1px solid var(--line); }

/* How it works */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; counter-reset: step; }
.steps li {
  position: relative; padding: 1.5rem 1.5rem 1.5rem 1.5rem;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
}
.alt .steps li { background: var(--bg); }
.step-num {
  display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; margin-bottom: .75rem;
  border-radius: 50%; background: var(--btn-bg); color: var(--btn-text);
  font-family: var(--serif); font-size: 1.15rem;
}
.steps p { color: var(--muted); margin: 0; }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); } }

/* Features */
.features { display: grid; gap: 1rem; }
.feature {
  padding: 1.5rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
.feature svg { width: 44px; height: 44px; margin-bottom: .9rem; }
.feature p { color: var(--muted); margin: 0; }
@media (min-width: 700px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(3, 1fr); } }

.interests { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.interests li {
  padding: .35rem .85rem; border-radius: 999px; font-size: .92rem;
  background: var(--surface-2); color: var(--text);
}

/* Waitlist */
.waitlist-card {
  display: grid; gap: 1.5rem; padding: 2rem 1.5rem;
  border-radius: calc(var(--radius) + 6px);
  background: var(--btn-bg); color: var(--btn-text);
}
.waitlist-card h2 { color: inherit; }
.waitlist-card p { color: inherit; opacity: .92; }
@media (min-width: 900px) {
  .waitlist-card { grid-template-columns: 1fr 1fr; align-items: center; padding: 3rem; }
}
.waitlist-form label { display: block; font-weight: 600; margin-bottom: .4rem; }
.field-row { display: flex; flex-direction: column; gap: .6rem; }
@media (min-width: 520px) { .field-row { flex-direction: row; } }
.waitlist-form input[type="email"] {
  flex: 1; min-height: 50px; padding: .7rem 1rem;
  border: 2px solid transparent; border-radius: 999px;
  background: var(--bg); color: var(--text); font: 1rem var(--sans);
}
.waitlist-form input[type="email"]::placeholder { color: var(--muted); opacity: 1; }
.waitlist-form input[type="email"]:focus-visible { outline: 3px solid var(--btn-text); outline-offset: 2px; }
.waitlist-form input[aria-invalid="true"] { border-color: var(--err); }
.waitlist-form .btn { background: var(--bg); color: var(--text); border-color: var(--bg); }
.waitlist-form .btn:focus-visible { outline-color: var(--btn-text); }
.form-hint { font-size: .88rem; margin: .6rem 0 0; opacity: .9; }
.form-hint a { color: inherit; }
.form-status { min-height: 1.5em; margin: .75rem 0 0; font-weight: 600; }
.form-status.is-error { color: inherit; }
.form-status.is-error::before { content: "! "; }
.thanks { display: flex; gap: .9rem; align-items: flex-start; }
.thanks svg { flex: none; width: 40px; height: 40px; }
.thanks h3 { margin-bottom: .25rem; color: inherit; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* FAQ */
.faq { max-width: 48rem; }
.faq details {
  border-bottom: 1px solid var(--line); padding: 1rem 0;
}
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem;
  font-weight: 600; font-size: 1.08rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--accent); }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin: .75rem 0 0; color: var(--muted); }

/* Footer */
.site-footer { padding: 2.5rem 0 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
.site-footer .wrap { display: flex; flex-direction: column; gap: 1rem; }
.site-footer nav ul { display: flex; flex-wrap: wrap; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-footer a { color: var(--text); }
@media (min-width: 700px) { .site-footer .wrap { flex-direction: row; justify-content: space-between; align-items: center; } }

/* Legal pages */
.legal { padding: 2rem 0 4rem; }
.legal .wrap { max-width: 46rem; }
.legal h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.legal h2 { font-size: 1.5rem; margin-top: 2rem; }
.legal h3 { font-size: 1.15rem; margin-top: 1.5rem; font-family: var(--sans); font-weight: 700; }
.legal li { margin-bottom: .35rem; }
.legal table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: .95rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: .55rem .6rem; border-bottom: 1px solid var(--line); }
.legal th { background: var(--surface-2); }
.table-scroll { overflow-x: auto; }
.draft-banner {
  margin: 0 0 2rem; padding: 1rem 1.25rem; border-radius: 12px;
  border: 2px solid var(--err); background: var(--surface); font-weight: 600;
}
