/* =====================================================================
   OpenEar — Phase 1 Home
   Single stylesheet. Organised top-to-bottom:
   1. Fonts        2. Design tokens (the locked design system)
   3. Base/reset   4. Layout helpers   5. Components   6. Sections
   7. Responsive
   The whole visual system lives in the tokens in :root — change a value
   there and it cascades everywhere. Avoid hard-coding colours/sizes below.
   ===================================================================== */

/* 1. FONTS — self-hosted variable woff2 (latin). See /assets/fonts. */
@font-face {
  font-family: "Fraunces";
  src: url("../assets/fonts/fraunces-var.woff2") format("woff2");
  font-weight: 400 600;          /* variable weight axis */
  font-style: normal;
  font-display: swap;            /* show fallback text immediately, swap when ready */
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

/* 2. DESIGN TOKENS (locked) */
:root {
  /* colour */
  --bg:        #FAF7F0;  /* warm off-white */
  --surface:   #FFFFFF;  /* cards */
  --text:      #1A1A17;  /* warm near-black */
  --muted:     #6B675E;  /* secondary text */
  --hairline:  #ECE7DC;  /* borders */
  --accent:    #2F6850;  /* pine green — used sparingly */
  --accent-700:#25503F;  /* hover / pressed */

  /* type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* spacing / rhythm */
  --section-y: clamp(64px, 11vw, 128px); /* vertical rhythm: 64 mobile → 128 desktop */
  --gap: clamp(24px, 4vw, 40px);
  --maxw: 1140px;        /* page max width */
  --maxw-read: 680px;    /* narrower measure for reading columns */
  --radius: 14px;
  --radius-btn: 10px;

  /* effects */
  --shadow-soft: 0 1px 2px rgba(26,26,23,.04), 0 8px 24px rgba(26,26,23,.05);
  --focus: 0 0 0 3px rgba(47,104,80,.35);
}

/* 3. BASE / RESET */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--accent-700); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(40px, 6vw, 64px); letter-spacing: -0.02em; }
h2 { font-size: clamp(28px, 4vw, 32px); letter-spacing: -0.01em; }
h3 { font-size: 20px; }
p  { margin: 0; }

/* Visible focus for keyboard users on every interactive element */
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

/* Screen-reader-only utility + skip link */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--accent); color: var(--bg); padding: 10px 16px;
  border-radius: var(--radius-btn); transition: top .15s ease;
}
.skip-link:focus { top: 16px; color: var(--bg); }

/* 4. LAYOUT */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { padding-block: var(--section-y); }
.measure { max-width: var(--maxw-read); }       /* readable text column */
.center  { margin-inline: auto; text-align: center; }
.eyebrow {
  font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 14px;
}
.lead { font-size: clamp(17px, 2.2vw, 19px); color: var(--muted); margin-top: 18px; }

/* 5. COMPONENTS */
.btn {
  display: inline-block; font-family: var(--font-body); font-size: 16px; font-weight: 500;
  padding: 12px 20px; border-radius: var(--radius-btn); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; transition: background .15s ease, transform .05s ease;
}
.btn--primary { background: var(--accent); color: var(--bg); }
.btn--primary:hover { background: var(--accent-700); color: var(--bg); }
.btn--primary:active { transform: translateY(1px); }

.card {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: clamp(24px, 3vw, 32px);
}

/* 6. SECTIONS */

/* Top nav — wordmark left, single CTA right. Subtle sticky. */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.nav.is-scrolled { border-bottom-color: var(--hairline); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; padding-block: 16px; }
.nav__logo { display: inline-flex; }
.nav__logo img { height: 30px; width: auto; }

/* Hero */
.hero .container { display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (min-width: 880px) {
  .hero .container { grid-template-columns: 1.05fr .95fr; }
}
.hero__copy { max-width: 600px; }
.hero h1 { margin-bottom: 8px; }
.hero .lead { margin-bottom: 28px; }
.hero__cta { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.hero__note { font-size: 14px; color: var(--muted); margin: 0; }
/* Temporary hero illustration — a vertical pencil drawing on white.
   `multiply` tones the white background into the page cream so there's no hard
   rectangle edge (white × cream = cream); the dark linework stays. The radial
   mask feathers any content that reaches the frame. No border — it floats. */
.hero__visual {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 78%;
  border: none; border-radius: 0; background: transparent;
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(125% 115% at 50% 42%, #000 70%, transparent 100%);
          mask-image: radial-gradient(125% 115% at 50% 42%, #000 70%, transparent 100%);
}

/* How it works — numbered steps */
.steps { display: grid; gap: var(--gap); margin-top: 48px; list-style: none; padding: 0; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { }
.step__num {
  font-family: var(--font-display); font-size: 18px; font-weight: 600;
  color: var(--accent); display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 1.5px solid var(--accent); border-radius: 50%;
  margin-bottom: 18px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); }

/* Cities & tours — cards grid */
.tours { display: grid; gap: var(--gap); margin-top: 48px; }
@media (min-width: 720px) { .tours { grid-template-columns: repeat(2, 1fr); } }
.tour { display: flex; flex-direction: column; }
/* Tour image — uniform 3:2 frame so differing source sizes read evenly */
.tour__img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--hairline);
  margin-bottom: 20px;
}
.tour__city { font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.tour h3 { margin-bottom: 10px; }
.tour p { color: var(--muted); margin-bottom: 20px; }
.tour__meta {
  margin-top: auto; padding-top: 16px; border-top: 1px solid var(--hairline);
  font-size: 14px; color: var(--text); font-weight: 500;
}
.tour__meta .dot { color: var(--accent); }

/* Why OpenEar — three principles, no boxes (lighter than cards) */
.principles { display: grid; gap: var(--gap); margin-top: 48px; }
@media (min-width: 760px) { .principles { grid-template-columns: repeat(3, 1fr); } }
.principle h3 { margin-bottom: 10px; }
.principle h3::after {
  content: ""; display: block; width: 32px; height: 2px;
  background: var(--accent); margin-top: 12px;     /* the one small green underline */
}
.principle p { color: var(--muted); }

/* FAQ — accordion using native <details> (no JS dependency) */
.faq { margin-top: 40px; display: grid; gap: 14px; }
.faq__item { border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--surface); }
.faq__item summary {
  list-style: none; cursor: pointer; padding: 22px 24px;
  font-family: var(--font-display); font-size: 19px; font-weight: 600;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary .chev { flex: none; width: 18px; height: 18px; color: var(--accent); transition: transform .2s ease; }
.faq__item[open] summary .chev { transform: rotate(45deg); }
.faq__answer { padding: 0 24px 24px; color: var(--muted); }
.faq__answer p { max-width: var(--maxw-read); }

/* Early access — green is allowed as the focal surface here (it passes AA both ways),
   but used as one calm band, not a loud block. */
.signup { }
.signup__card {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: clamp(32px, 5vw, 56px); text-align: center;
}
.signup h2 { margin-bottom: 0; }
.form {
  margin: 28px auto 0; max-width: 460px;
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
}
.form__input {
  flex: 1 1 240px; min-width: 0; font-family: var(--font-body); font-size: 16px;
  padding: 12px 16px; border: 1px solid var(--hairline); border-radius: var(--radius-btn);
  background: var(--bg); color: var(--text);
}
.form__input::placeholder { color: var(--muted); }
.form__input:focus-visible { box-shadow: var(--focus); border-color: var(--accent); }
.form__note { font-size: 14px; color: var(--muted); margin-top: 16px; }
.form__msg { font-size: 16px; margin-top: 18px; min-height: 1.2em; font-weight: 500; }
.form__msg--error { color: #9a3b2e; }
.form__msg--success { color: var(--accent); }
.form[hidden] { display: none; }

/* Footer */
.footer { border-top: 1px solid var(--hairline); padding-block: 56px; color: var(--muted); }
.footer__inner { display: grid; gap: 22px; }
.footer__logo { color: var(--muted); }
.footer__logo svg { height: 26px; width: auto; }
.footer p, .footer a { font-size: 14px; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }
.footer__links { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.footer__sep { color: var(--hairline); }
.footer__copy { color: var(--muted); }
.footer__photo { margin-top: 14px; }
@media (min-width: 720px) {
  .footer__inner { grid-template-columns: 1fr auto; align-items: center; }
}
