/* ==========================================================================
   RipCo marketing site
   Design system: "Sunlit Coast"

   Light, warm, beach-toned theme with real tonal range. Editorial serif
   headlines (Newsreader, one italic accent word per heading), Geist
   body, a deep oceanic accent, and a
   small number of deep Coastline-navy product bands that showcase the dark
   app UI in device frames.

   Every colour is a token in :root below. Nothing outside :root declares a
   raw colour value. Retune the tokens and the whole site follows.
   ========================================================================== */

/* ------------------------------ Fonts ---------------------------------- */

@font-face {
  font-family: 'Newsreader';
  src: url('assets/fonts/newsreader-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('assets/fonts/newsreader-latin-wght-italic.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('assets/fonts/geist-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------ Tokens --------------------------------- */

:root {
  /* Crisp warm near-white canvas with a subtle alternating band */
  --paper: #FDFBF7;         /* primary canvas                         */
  --paper-2: #F6F2EA;       /* alternating band, used sparingly       */
  --surface: #FFFFFF;       /* cards and panels float on this         */

  /* Ink ramp, editorial contrast. Three steps only: headings, body,
     captions. Every grey on the site is one of these. */
  --ink: #0E1A24;
  --ink-secondary: #3A4650; /* body text, comfortably AA on paper and band */
  --ink-muted: #626D78;     /* captions and labels, AA at small sizes on both papers */

  /* Deep Coastline bands, tying the site to the app */
  --deep: #0E1E30;
  --deep-2: #0A1624;
  --deep-raised: #152A40;
  --deep-line: rgb(242 239 232 / 0.14);
  --on-deep: #F2EFE8;
  --on-deep-soft: #A7B3BD;

  /* Deep oceanic accent: the ONE decorative colour. Everything
     interactive or highlighted is a step of this ramp. */
  --accent: #10577D;        /* buttons, links, accent word on light   */
  --accent-hover: #0C4462;
  --accent-pressed: #093750;
  --accent-bright: #3E9FC9; /* accent word on deep, small highlights  */
  --accent-tint: #DEEAF1;   /* pale ocean tint: selection, live tag, icon tiles */
  --on-accent: #FFFFFF;
  --on-accent-soft: rgb(255 255 255 / 0.8);
  --on-accent-line: rgb(255 255 255 / 0.38);

  /* LOCKED safety colours. Meaning only, never decoration.
     green = calmer water, amber = caution, red = rip / hazard. */
  --safety-green: #1B7F38;
  --safety-amber: #F4A50C;
  --safety-red: #D93025;
  --safety-red-deep: #B3261C;
  --safety-red-fill: rgb(217 48 37 / 0.16);

  /* Gradient washes: the pale ocean sky only, always at low opacity.
     Explicitly no peach, apricot, gold or amber: those sit in the
     hazard signal family. */
  --wash-sky: rgb(62 159 201 / 0.12);
  --wash-sky-faint: rgb(62 159 201 / 0.07);

  /* Hairlines at ten percent ink, soft warm shadows */
  --line: rgb(12 23 32 / 0.14);
  --line-soft: rgb(12 23 32 / 0.09);
  --shadow-card: 0 1px 2px rgb(58 46 28 / 0.05), 0 20px 50px -22px rgb(58 46 28 / 0.18);
  --shadow-device: 0 34px 80px -30px rgb(18 22 26 / 0.5);
  --shadow-device-soft: 0 2px 6px rgb(58 46 28 / 0.08), 0 24px 60px -28px rgb(58 46 28 / 0.35);
  --shadow-btn: 0 10px 26px -12px rgb(16 87 125 / 0.55);
  --focus-ring: 0 0 0 3px rgb(62 159 201 / 0.5);
  --scrim-photo: linear-gradient(to top, rgb(12 23 32 / 0.16), rgb(12 23 32 / 0) 45%);

  /* Type. The display serif is confident and substantial, never
     delicate: weight around 550, tight but not fashion-tight tracking. */
  --font-serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --display-weight: 550;

  /* TYPE SCALE. Eight static steps for UI and running text, eight fluid
     steps for display. Every font-size on the site is one of these, so a
     size that is not listed here does not exist. Each step has a matched
     leading below. */
  --text-3xs: 0.6875rem;   /* 11px, micro labels                    */
  --text-2xs: 0.75rem;     /* 12px, small caps labels               */
  --text-xs: 0.8125rem;    /* 13px, eyebrows, meta                  */
  --text-sm: 0.875rem;     /* 14px, captions, notes                 */
  --text-base: 1rem;       /* 16px, body                            */
  --text-md: 1.125rem;     /* 18px, emphasised body                 */
  --text-lg: 1.25rem;      /* 20px, small headings                  */
  --text-xl: 1.5rem;       /* 24px, card and panel titles           */

  --text-lead: clamp(1.0625rem, 1rem + 0.4vw, 1.1875rem); /* section leads  */
  --text-h3: clamp(1.2rem, 1.05rem + 0.7vw, 1.55rem);
  --text-h2: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem);
  --text-h1: clamp(2.1rem, 1.25rem + 3.1vw, 3.4rem);      /* section titles */
  --text-display: clamp(2.4rem, 1.4rem + 4.4vw, 4.6rem);  /* page heroes    */
  --text-hero: clamp(2.75rem, 6vw, 5.25rem);              /* home hero only */
  --text-stat: clamp(3rem, 2rem + 4vw, 4.75rem);          /* survey figures */
  --text-wordmark: clamp(7rem, 23vw, 21rem);              /* footer mark    */

  /* Matched leadings. Display type is tight, running text is relaxed. */
  --leading-none: 1;
  --leading-tight: 1.05;
  --leading-snug: 1.2;
  --leading-heading: 1.35;
  --leading-normal: 1.5;
  --leading-relaxed: 1.6;

  /* Tracking. Display type tightens, uppercase labels open up. */
  --tracking-tight: -0.015em;
  --tracking-snug: -0.01em;
  --tracking-wide: 0.02em;
  --tracking-caps: 0.08em;
  --tracking-caps-wide: 0.14em;

  /* SPACING SCALE, 4px base with 2px half steps where a component needs
     one. Every margin, padding and gap resolves to one of these. */
  --space-05: 0.125rem;    /* 2px  */
  --space-1: 0.25rem;      /* 4px  */
  --space-1-5: 0.375rem;   /* 6px  */
  --space-2: 0.5rem;       /* 8px  */
  --space-2-5: 0.625rem;   /* 10px */
  --space-3: 0.75rem;      /* 12px */
  --space-3-5: 0.875rem;   /* 14px */
  --space-4: 1rem;         /* 16px */
  --space-4-5: 1.25rem;    /* 20px */
  --space-5: 1.5rem;       /* 24px */
  --space-5-5: 1.75rem;    /* 28px */
  --space-6: 2.25rem;      /* 36px */
  --space-7: 3.5rem;       /* 56px */
  --space-8: 5rem;         /* 80px */

  --content-max: 75rem;    /* readable column: running text, standard sections */
  --wide-max: 87.5rem;     /* hero bands, grids, full-width band sections      */
  --measure: 68ch;         /* readable measure for running text               */
  --measure-tight: 54ch;   /* hero and two-column body copy                   */
  --container-pad: clamp(1.25rem, 4vw, 3rem);

  /* VERTICAL RHYTHM. Three section paddings only, so a section on one
     page is spaced like the same section on every other page. */
  --section-pad: clamp(4rem, 9vw, 6.75rem);
  --section-pad-snug: clamp(2.25rem, 5vw, 3.75rem);
  --section-pad-tight: clamp(1.5rem, 3.5vw, 2.5rem);
  --section-gap: clamp(2.5rem, 6vw, 4rem);  /* section head to its content */
  --gap-grid: clamp(1.5rem, 4vw, 3rem);
  --gap-grid-lg: clamp(2.25rem, 6vw, 4rem);
  --gap-split: clamp(2.5rem, 6vw, 5rem);    /* two-column splits           */
  --brand-pull: clamp(0.5rem, 2vw, 2rem);   /* header brand optical inset  */

  --radius-sm: 10px;
  --radius-tile: 18px;     /* 72px icon tiles, one modest radius     */
  --radius-device: 44px;   /* iPhone silhouette; screen derives from it */
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-btn: 12px;      /* shared buttons: modest corner, not a pill */
  --radius-pill: 999px;    /* chips, badges and dots only            */

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 4.25rem;
}


/* ------------------------------ Base ----------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 { margin: 0; line-height: var(--leading-snug); }
p, ul, ol, dl, figure, blockquote { margin: 0; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent-hover); }
a:active { color: var(--accent-pressed); }

::selection { background: var(--accent-tint); color: var(--ink); }

/* The soft ring is the visible state in normal rendering. The transparent
   outline is what carries it into forced-colors mode, where box-shadow is
   dropped and a bare outline:none would leave no focus indicator at all. */
:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}
@media (forced-colors: active) {
  :focus-visible { outline-color: Highlight; }
}

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

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 100;
  padding: var(--space-2-5) var(--space-4);
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-sm);
}
.skip-link:focus { top: 0.75rem; color: var(--paper); }


/* Print-grade grain: barely perceptible, fixed, never interactive */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --------------------------- Layout helpers ---------------------------- */

.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
.container--wide { max-width: var(--wide-max); }

.section { padding-block: var(--section-pad); }
.section--tint {
  background: var(--paper-2);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.section--snug { padding-block: var(--section-pad-snug); }
.section--flush { padding-top: 0; }
.section--snug-top { padding-top: var(--section-pad-snug); }
.section--snug-bottom { padding-bottom: var(--section-pad-snug); }

/* -------------------------- Editorial type ----------------------------- */

.eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-caps-wide);
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow--alert { color: var(--safety-red-deep); }

/* Marketing section headers are centred: eyebrow label, serif headline,
   optional subhead. Left alignment remains only inside genuine
   two-column splits (feature rows). */
.section-head {
  max-width: 46rem;
  margin-inline: auto;
  margin-bottom: var(--section-gap);
  text-align: center;
}
.section-head .section-lead { margin-inline: auto; max-width: var(--measure); }

.section-title {
  margin-top: var(--space-4);
  font-family: var(--font-serif);
  font-weight: var(--display-weight);
  font-size: var(--text-h1);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
  text-wrap: balance;
}

.section-lead {
  margin-top: var(--space-5);
  font-size: var(--text-lead);
  line-height: var(--leading-relaxed);
  color: var(--ink-secondary);
  max-width: var(--measure);
}

/* Exactly one key word per heading: italic serif in the accent colour */
em.accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: inherit;
  color: var(--accent);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1-5);
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: var(--space-05);
}
.text-link:hover { color: var(--accent-hover); border-color: var(--accent); }
.text-link:active { color: var(--accent-pressed); }
.text-link__arrow { display: inline-block; transition: transform 200ms var(--ease-out); }
.text-link:hover .text-link__arrow { transform: translateX(3px); }

/* ------------------------------ Buttons -------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3-5) var(--space-5-5);
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: var(--leading-snug);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out),
              border-color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.btn:focus-visible { box-shadow: var(--focus-ring); border-radius: var(--radius-btn); }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-btn);
}
.btn--primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn--primary:active { background: var(--accent-pressed); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--ink-muted); color: var(--ink); background: var(--surface); }

.btn--lg { padding: var(--space-4) var(--space-6); font-size: var(--text-md); }

/* App Store placeholder button */
.btn--app {
  background: var(--ink);
  color: var(--paper);
  padding: var(--space-2-5) var(--space-5);
  gap: var(--space-3);
}
.btn--app:hover { background: var(--deep-raised); color: var(--paper); }
.btn__apple { width: 1.35rem; height: 1.55rem; fill: currentColor; flex: none; }
.btn__stack { display: flex; flex-direction: column; align-items: flex-start; line-height: var(--leading-snug); }
.btn__stack small { font-size: var(--text-3xs); font-weight: 500; letter-spacing: var(--tracking-wide); }
.btn__stack b { font-size: var(--text-base); font-weight: 600; letter-spacing: var(--tracking-wide); }

/* ------------------------------- Header -------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease-out);
}
.site-header.is-scrolled { border-bottom-color: var(--line-soft); }

.scroll-progress {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 1;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  min-height: var(--header-h);
}
/* Pull the header brand out towards the left edge */
.site-header .brand { margin-left: calc(var(--brand-pull) * -1); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2-5);
  text-decoration: none;
  color: var(--ink);
}
.brand__mark { width: 1.75rem; height: 1.75rem; flex: none; }
/* Serif masthead wordmark, matching the giant footer RipCo */
.brand__name {
  font-family: var(--font-serif);
  font-weight: var(--display-weight);
  font-size: var(--text-xl);
  letter-spacing: var(--tracking-snug);
  line-height: var(--leading-none);
  color: var(--ink);
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav__link {
  display: inline-block;
  padding: var(--space-1-5) var(--space-3);
  border-radius: var(--radius-pill);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--ink-secondary);
  text-decoration: none;
  transition: color 160ms var(--ease-out), background-color 160ms var(--ease-out);
}
.site-nav__link:hover { color: var(--ink); background: var(--paper-2); }
.site-nav__link:active { background: var(--accent-tint); }
.site-nav__link.is-active { color: var(--ink); font-weight: 600; }
.site-nav__cta-item { margin-left: var(--space-3); }
.site-nav__cta { white-space: nowrap; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle__box { display: flex; flex-direction: column; gap: var(--space-1-5); width: 1.15rem; }
.nav-toggle__bar {
  height: 2px;
  background: var(--ink);
  border-radius: var(--radius-pill);
  transition: transform 220ms var(--ease-out);
}
.nav-open .nav-toggle__bar:first-child { transform: translateY(4.5px) rotate(45deg); }
.nav-open .nav-toggle__bar:last-child { transform: translateY(-4.5px) rotate(-45deg); }

@media (max-width: 56em) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: var(--space-4) var(--container-pad) var(--space-6);
    display: none;
  }
  .nav-open .site-nav { display: block; }
  .site-nav__list { flex-direction: column; align-items: stretch; gap: var(--space-1); }
  .site-nav__link { display: block; padding: var(--space-3-5) var(--space-3); font-size: var(--text-md); }
  .site-nav__cta-item { margin: var(--space-4) 0 0; }
  .site-nav__cta { width: 100%; padding: var(--space-3-5) var(--space-5); }
}

/* ------------------------------ Home hero ------------------------------ */

.hero {
  position: relative;
  padding-block: var(--section-pad-snug);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(56rem 34rem at 85% -12%, var(--wash-sky-faint), transparent 65%),
    radial-gradient(60rem 38rem at -10% 110%, var(--wash-sky-faint), transparent 65%);
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 6.5fr) minmax(0, 5.5fr);
  align-items: center;
  gap: var(--gap-split);
}

.hero__title {
  font-family: var(--font-serif);
  font-weight: var(--display-weight);
  font-size: var(--text-hero);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
  max-width: 16ch;
  text-wrap: balance;
}

.hero__lead {
  margin-top: var(--space-5-5);
  max-width: var(--measure-tight);
  font-size: var(--text-lead);
  line-height: var(--leading-relaxed);
  color: var(--ink-secondary);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-7);
}

/* The safety line is a designed element: a solid signal-red flag sized
   to the type and aligned to the optical centre of the first line. */
.hero__note {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2-5);
  margin-top: var(--space-6);
  max-width: 30rem;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--ink-secondary);
}
.hero__note svg {
  width: 1em;
  height: 1em;
  flex: none;
  margin-top: var(--space-1);
  /* Inherits the note's ink. The locked signal colours never decorate:
     a red glyph here would read as an alert the site cannot issue. */
  color: inherit;
}

/* The dark app in its frame sits directly on the light paper: the
   device is the focal object, no panel around it. */
.hero__visual { display: flex; justify-content: center; }
.hero__product { display: flex; flex-direction: column; align-items: center; }
.hero .device {
  width: min(20rem, 74vw);
  border-color: var(--line);
  box-shadow: var(--shadow-device-soft);
}
.hero__caption {
  margin-top: var(--space-4);
  text-align: center;
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--ink-secondary);
}

/* ----------------------------- iPhone frame ---------------------------- */

.device {
  position: relative;
  width: min(17.5rem, 68vw);
  border-radius: var(--radius-device);
  padding: var(--space-2-5);
  background: var(--ink);
  border: 1px solid var(--deep-line);
  box-shadow: var(--shadow-device);
}
.device__notch {
  position: absolute;
  top: 20px; left: 50%;
  transform: translateX(-50%);
  width: 34%; height: 22px;
  background: var(--ink);
  border-radius: var(--radius-pill);
  z-index: 2;
}
.device__screen {
  position: relative;
  aspect-ratio: 390 / 844;
  border-radius: calc(var(--radius-device) - 10px);
  overflow: hidden;
  background: var(--deep);
}
/* Missing screenshot: a quiet navy slot with a neutral label. Never a fake UI. */
.device__screen::before {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--on-deep-soft);
  background: linear-gradient(170deg, var(--deep-raised), var(--deep));
}
.device__screen img {
  position: relative;
  z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover;
}
.device.is-empty .device__screen img { display: none; }

/* ------------------------------- Stats --------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
}
.stat {
  border-top: 2px solid var(--ink);
  padding-top: var(--space-5);
  display: flex;
  flex-direction: column;
}
.stat__value {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: var(--display-weight);
  font-size: var(--text-stat);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.stat__label {
  margin-top: var(--space-4);
  font-size: var(--text-base);
  color: var(--ink-secondary);
  max-width: 17rem;
}
.stats__source {
  margin-top: var(--space-6);
  font-size: var(--text-xs);
  color: var(--ink-secondary);
}
@media (max-width: 48em) {
  .stats { grid-template-columns: 1fr; gap: var(--space-5); }
}

/* ----------------------------- Icon tiles -------------------------------
   ONE restrained treatment for every topic tile on the site: a soft
   ocean tint square with a solid navy glyph. Tiles differ by GLYPH
   only, never by colour. Each tile is a static topic icon; no tile
   colour encodes a condition, verdict or state.
   Alternative: a monochrome no-tile look is one edit away, set
   background transparent and drop the box-shadow, keeping the glyph. */

.tile {
  /* Custom property so glyph cutout strokes in inline SVGs can
     reference the tile background via var(--tile-bg). */
  --tile-bg: var(--accent-tint);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: var(--radius-tile);
  background: var(--tile-bg);
  color: var(--accent-hover);
  /* Inset hairline ring to define the tile on warm paper, plus a
     subtle neutral lift. Not a card border. */
  box-shadow:
    inset 0 0 0 1px var(--line-soft),
    0 10px 24px -14px var(--line);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.tile svg { width: 2rem; height: 2rem; }

/* Hover on the parent cell lifts the tile only; no colour change */
.card:hover .tile {
  transform: translateY(-2px);
  box-shadow:
    inset 0 0 0 1px var(--line-soft),
    0 14px 30px -14px var(--line);
}
@media (prefers-reduced-motion: reduce) {
  .tile { transition: none; }
  .card:hover .tile { transform: none; }
}

/* --------------------------- Navy product band ------------------------- */

.band {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--deep), var(--deep-2));
  color: var(--on-deep);
  padding-block: var(--section-pad);
}
.band::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(50rem 30rem at 82% -5%, var(--wash-sky-faint), transparent 60%);
}
.band > .container { position: relative; max-width: var(--wide-max); }
.band .eyebrow { color: var(--accent-bright); }
.band em.accent { color: var(--accent-bright); }
.band .section-title { color: var(--on-deep); }
.band .section-lead { color: var(--on-deep-soft); }
.band .btn--ghost { color: var(--on-deep); border-color: var(--deep-line); }
.band .btn--ghost:hover { background: var(--deep-raised); color: var(--on-deep); border-color: var(--on-deep-soft); }
.band .text-link { color: var(--accent-bright); border-color: var(--deep-line); }
.band .text-link:hover { color: var(--on-deep); border-color: var(--accent-bright); }

.band__more { margin-top: var(--section-gap); text-align: center; }

/* ----------------------------- Pinned moment --------------------------- */

.pin {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--gap-split);
  align-items: start;
}
.pin--reverse .pin__visual { order: 2; }
.pin--reverse .pin__steps { order: 1; }

.pin__visual {
  position: sticky;
  top: calc(var(--header-h) + 2.5rem);
  display: flex;
  justify-content: center;
}

.pin__steps {
  display: flex;
  flex-direction: column;
  gap: var(--gap-split);
  padding-block: var(--section-pad-snug);
}
.pin__step {
  max-width: 26rem;
  transition: opacity 300ms var(--ease-out);
}
html.js .pin__step { opacity: 0.35; }
html.js .pin__step.is-active { opacity: 1; }

.pin__step-index {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-caps-wide);
  text-transform: uppercase;
  color: var(--accent);
}
.band .pin__step-index { color: var(--accent-bright); }
.pin__step-title {
  margin-top: var(--space-3);
  font-family: var(--font-serif);
  font-weight: var(--display-weight);
  font-size: var(--text-h3);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-snug);
}
.pin__step-body { margin-top: var(--space-3); color: var(--ink-secondary); }
.band .pin__step-body { color: var(--on-deep-soft); }

@media (max-width: 56em) {
  .pin { grid-template-columns: 1fr; }
  .pin--reverse .pin__visual { order: 0; }
  .pin--reverse .pin__steps { order: 1; }
  .pin__visual { position: static; }
  .pin__steps { gap: var(--space-7); padding-block: var(--space-6) 0; }
  html.js .pin__step { opacity: 1; }
}

/* ------------------------------- Cards --------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap-grid-lg) var(--space-6);
}
@media (max-width: 62em) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40em) { .cards { grid-template-columns: 1fr; } }

.card { text-align: center; }
.card__icon { margin-inline: auto; }
.card__title {
  margin-top: var(--space-5);
  font-family: var(--font-serif);
  font-weight: var(--display-weight);
  font-size: var(--text-xl);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-snug);
  color: var(--ink);
}
.card__body {
  margin: var(--space-3) auto 0;
  max-width: 26rem;
  font-size: var(--text-base);
  color: var(--ink-secondary);
}
.card--link { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.card--link .card__more { margin-top: var(--space-4); }

/* --------------------------- Free statement ---------------------------- */

.free { text-align: center; }
.free__title {
  font-family: var(--font-serif);
  font-weight: var(--display-weight);
  font-size: var(--text-h2);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  text-wrap: balance;
}
.free__body {
  margin: var(--space-5) auto 0;
  max-width: 34rem;
  color: var(--ink-secondary);
  font-size: var(--text-lead);
}

/* ---------------------------- Safety strip ----------------------------- */

/* Centred and stacked so nothing floats alone in empty space */
.safety-strip {
  max-width: 46rem;
  margin-inline: auto;
  text-align: center;
}
.safety-strip__title {
  margin-top: var(--space-4);
  font-family: var(--font-serif);
  font-weight: var(--display-weight);
  font-size: var(--text-h1);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-snug);
}
.safety-strip__body { margin: var(--space-4) auto 0; max-width: var(--measure-tight); color: var(--ink-secondary); }
.safety-strip .btn { margin-top: var(--space-5); }

/* -------------------------------- CTA ----------------------------------
   The closing CTA is LIGHT on every page: warm paper with a soft
   gradient wash, centred serif headline, primary and ghost buttons.
   The deep navy is reserved for the single product band. */

.cta {
  background: var(--paper);
  color: var(--on-accent);
  padding-block: var(--section-pad-snug);
}
/* The closing CTA is a rounded ocean-blue band inset from the page
   edges, with a slow liquid wash drifting behind the copy. The motion
   is decorative only and fully stops under reduced motion. */
.cta__inner {
  position: relative;
  overflow: hidden;
  text-align: center;
  max-width: var(--wide-max);
  border-radius: var(--radius-xl);
  background: linear-gradient(150deg, var(--accent), var(--accent-hover));
  padding: var(--section-pad) var(--container-pad);
}
.cta__inner::before,
.cta__inner::after {
  content: '';
  position: absolute;
  inset: -35%;
  pointer-events: none;
  filter: blur(48px);
  will-change: transform;
}
.cta__inner::before {
  background:
    radial-gradient(34% 30% at 24% 32%, var(--accent-bright), transparent 70%),
    radial-gradient(26% 26% at 78% 18%, var(--accent-bright), transparent 70%);
  opacity: 0.42;
}
.cta__inner::after {
  background:
    radial-gradient(30% 28% at 70% 76%, var(--accent-bright), transparent 70%),
    radial-gradient(36% 30% at 18% 82%, var(--accent-hover), transparent 72%);
  opacity: 0.36;
}
/* The drift runs on the About-page hero band only; every other page
   keeps the same liquid texture as a still image. */
@media (prefers-reduced-motion: no-preference) {
  .page-home .cta__inner::before { animation: cta-liquid-a 26s ease-in-out infinite alternate; }
  .page-home .cta__inner::after { animation: cta-liquid-b 34s ease-in-out infinite alternate; }
}
@keyframes cta-liquid-a {
  from { transform: translate3d(-5%, -4%, 0) rotate(0deg) scale(1); }
  to { transform: translate3d(6%, 5%, 0) rotate(24deg) scale(1.18); }
}
@keyframes cta-liquid-b {
  from { transform: translate3d(5%, 4%, 0) rotate(0deg) scale(1.12); }
  to { transform: translate3d(-6%, -5%, 0) rotate(-20deg) scale(0.96); }
}
.cta__inner > * { position: relative; }
/* Soft white puffs rise from a single source at the centre of the band
   and drift up and away like clouds. Purely decorative: white only, no
   signal colours, transform and opacity only, and the puffs are invisible
   wherever the animation does not run (other pages, reduced motion). */
.cta__smoke {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.cta__smoke span {
  --puff: clamp(9rem, 22vw, 18rem);
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--puff);
  height: var(--puff);
  margin: calc(var(--puff) / -2) 0 0 calc(var(--puff) / -2);
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--on-accent-soft), transparent 65%);
  filter: blur(30px);
  opacity: 0;
  will-change: transform, opacity;
}
.cta__smoke span:nth-child(1) { --smoke-x: -20%; --smoke-peak: 0.3; --smoke-dur: 17s; --smoke-delay: -2s; }
.cta__smoke span:nth-child(2) { --puff: clamp(7rem, 17vw, 14rem); --smoke-x: 24%; --smoke-peak: 0.25; --smoke-dur: 21s; --smoke-delay: -9s; }
.cta__smoke span:nth-child(3) { --smoke-x: 7%; --smoke-peak: 0.31; --smoke-dur: 19s; --smoke-delay: -14s; }
.cta__smoke span:nth-child(4) { --puff: clamp(11rem, 26vw, 21rem); --smoke-x: -14%; --smoke-peak: 0.22; --smoke-dur: 24s; --smoke-delay: -6s; }
.cta__smoke span:nth-child(5) { --puff: clamp(8rem, 19vw, 15rem); --smoke-x: 15%; --smoke-peak: 0.28; --smoke-dur: 16s; --smoke-delay: -12s; }
/* The rise runs on the About-page band only, matching the liquid wash. */
@media (prefers-reduced-motion: no-preference) {
  .page-home .cta__smoke span {
    animation: cta-smoke var(--smoke-dur, 19s) linear infinite;
    animation-delay: var(--smoke-delay, 0s);
  }
}
@keyframes cta-smoke {
  0% { transform: translate3d(0, 16%, 0) scale(0.4); opacity: 0; }
  30% { opacity: var(--smoke-peak, 0.24); }
  65% { opacity: calc(var(--smoke-peak, 0.24) * 0.5); }
  100% { transform: translate3d(var(--smoke-x, 0%), -135%, 0) scale(1.55); opacity: 0; }
}
.cta__title {
  font-family: var(--font-serif);
  font-weight: var(--display-weight);
  font-size: var(--text-display);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  color: var(--on-accent);
  text-wrap: balance;
}
.cta em.accent { color: var(--accent-tint); }
.cta__lead {
  margin: var(--space-5) auto 0;
  max-width: 34rem;
  font-size: var(--text-md);
  /* Full white, not the soft tone: the smoke wash drifts behind this line,
     and the lead must hold 4.5:1 at the lightest animation frame. */
  color: var(--on-accent);
}
.cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
}
.cta .btn--primary { background: var(--on-accent); color: var(--accent); box-shadow: none; }
.cta .btn--primary:hover { background: var(--accent-tint); color: var(--accent-hover); }
.cta .btn--ghost { color: var(--on-accent); border-color: var(--on-accent-line); }
.cta .btn--ghost:hover { background: var(--on-accent-line); color: var(--on-accent); border-color: var(--on-accent); }
.cta__note { margin-top: var(--space-6); font-size: var(--text-sm); color: var(--on-accent-soft); }

/* ----------------------------- Page heroes ----------------------------- */

.page-hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--section-pad) var(--section-pad-snug);
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(50rem 30rem at 88% -20%, var(--wash-sky-faint), transparent 62%),
    radial-gradient(54rem 34rem at -12% 120%, var(--wash-sky-faint), transparent 62%);
}
.page-hero .container { position: relative; }
.page-hero__inner { max-width: 50rem; }

/* Centred page-hero variant: eyebrow label, centred serif headline and
   subhead, compact padding so the first row starts within reach. */
.page-hero--centred { padding-block: var(--section-pad-snug); }
.page-hero--centred .page-hero__inner {
  max-width: 46rem;
  margin-inline: auto;
  text-align: center;
}
.page-hero--centred .page-hero__lead { margin-inline: auto; max-width: var(--measure); }
.page-hero__title {
  margin-top: var(--space-4-5);
  font-family: var(--font-serif);
  font-weight: var(--display-weight);
  font-size: var(--text-display);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}
.page-hero__lead {
  margin-top: var(--space-5-5);
  max-width: var(--measure);
  font-size: var(--text-lead);
  line-height: var(--leading-relaxed);
  color: var(--ink-secondary);
}
.page-hero__photo { margin-top: var(--section-gap); }

/* ---------------------------- Feature rows -----------------------------
   Compact two-column rows on light paper, alternating base and band per
   strip. The dark device frame is the focal object on the light page.
   The text column is a single top-to-bottom stack: tile, plain eyebrow,
   serif heading, body. Nothing sits beside the tile. */


.feature-row {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  align-items: center;
  gap: var(--gap-split);
}
.feature-row__text { order: 1; }
.feature-row__media { order: 2; display: flex; justify-content: center; }
.feature-row--reverse { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.feature-row--reverse .feature-row__media { order: 1; }
.feature-row--reverse .feature-row__text { order: 2; }

.feature-row__icon { display: flex; margin-bottom: var(--space-5); }
.feature-row__text .eyebrow { display: block; }
.feature-row__title {
  margin-top: var(--space-3);
  font-family: var(--font-serif);
  font-weight: var(--display-weight);
  font-size: var(--text-h2);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-snug);
}
.feature-row__body { margin-top: var(--space-4); color: var(--ink-secondary); max-width: var(--measure-tight); }

/* A considered product shot, not an oversized frame */
.feature-row .device {
  width: min(14.5rem, 58vw);
  border-color: var(--line);
  box-shadow: var(--shadow-device-soft);
}

@media (max-width: 56em) {
  .feature-row { grid-template-columns: 1fr; }
  .feature-row--reverse { grid-template-columns: 1fr; }
  .feature-row__text,
  .feature-row--reverse .feature-row__text { order: 1; }
  .feature-row__media,
  .feature-row--reverse .feature-row__media { order: 2; }
}

/* ---------------- Deep-band variants for components inside .band -------- */

.band .pin__step-title { color: var(--on-deep); }

/* --------------------------- Sources (beaches) ------------------------- */

/* A card that is itself a link (the beaches condition cards). Same card,
   with the whole tile clickable and the source pinned to the bottom. */
.card--action {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
}
.card--action:hover { color: var(--ink); }
.card--action:active .card__from { color: var(--accent-pressed); }
.card--action .card__body { flex: 1; }
.card--action:hover .card__icon { transform: translateY(-3px); }
.card__icon { transition: transform 200ms var(--ease-out); }
.card__from {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent);
}
.card--action:hover .card__from { color: var(--accent-hover); }
.card__arrow { display: inline-block; transition: transform 200ms var(--ease-out); }
.card--action:hover .card__arrow { transform: translateX(3px); }

.origins {
  margin-top: var(--section-gap);
  border-top: 1px solid var(--line);
  padding-top: var(--space-6);
  max-width: 46rem;
}
.origins__title {
  font-family: var(--font-serif);
  font-weight: var(--display-weight);
  font-size: var(--text-xl);
  letter-spacing: var(--tracking-tight);
}
.origins__body { margin-top: var(--space-4); color: var(--ink-secondary); }

/* ------------------------------ Safety page ---------------------------- */

.pledge {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6) var(--space-7);
}
@media (max-width: 48em) { .pledge { grid-template-columns: 1fr; } }
.pledge__item { border-top: 1px solid var(--line); padding-top: var(--space-5); }
.pledge__title {
  font-family: var(--font-serif);
  font-weight: var(--display-weight);
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
}
.pledge__body { margin-top: var(--space-3); color: var(--ink-secondary); }

.banner {
  display: flex;
  align-items: center;
  gap: var(--gap-grid);
  max-width: 54rem;
  margin-inline: auto;
}
.banner__flags { display: flex; gap: var(--space-2-5); flex: none; color: var(--ink); }
.banner__flag { width: clamp(2.5rem, 6vw, 3.5rem); height: auto; }
.banner__title {
  font-family: var(--font-serif);
  font-weight: var(--display-weight);
  font-size: var(--text-h2);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}
@media (max-width: 40em) { .banner { flex-direction: column; align-items: flex-start; } }

.rip-guide__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}
@media (max-width: 48em) { .rip-guide__steps { grid-template-columns: 1fr; } }
.rip-guide__step {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
}
.rip-guide__num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem; height: 2.25rem;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: var(--text-base);
}
.rip-guide__step p { color: var(--ink-secondary); }
.rip-guide__step strong { color: var(--ink); }

/* --------------------------------- FAQ --------------------------------- */

.faq { max-width: 46rem; margin-inline: auto; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item h3 { margin: 0; }
.faq__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  width: 100%;
  padding: var(--space-5) 0;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--ink);
}
.faq__btn:hover { color: var(--accent-hover); }
.faq__btn:active { color: var(--accent-pressed); }
.faq__marker {
  position: relative;
  flex: none;
  width: 1.05rem; height: 1.05rem;
}
.faq__marker::before, .faq__marker::after {
  content: '';
  position: absolute;
  top: 50%; left: 0;
  width: 100%; height: 2px;
  background: var(--accent);
  border-radius: var(--radius-pill);
  transform: translateY(-50%);
  transition: transform 220ms var(--ease-out);
}
.faq__marker::after { transform: translateY(-50%) rotate(90deg); }
.faq__item.is-open .faq__marker::after { transform: translateY(-50%) rotate(0deg); }

html.js .faq__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 300ms var(--ease-out);
}
html.js .faq__item.is-open .faq__panel { grid-template-rows: 1fr; }
html.js .faq__panel-inner { overflow: hidden; }
.faq__answer {
  padding-bottom: var(--space-5);
  color: var(--ink-secondary);
  max-width: 40rem;
}

/* ----------------------------- Early access ---------------------------- */

.auth {
  position: relative;
  overflow: hidden;
  padding-block: var(--section-pad);
}
.auth::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(46rem 28rem at 90% -15%, var(--wash-sky-faint), transparent 62%),
    radial-gradient(50rem 32rem at -10% 115%, var(--wash-sky-faint), transparent 62%);
}
.auth .container { position: relative; }
.auth__grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: var(--gap-split);
  align-items: start;
}
@media (max-width: 56em) { .auth__grid { grid-template-columns: 1fr; } }

.auth__title {
  margin-top: var(--space-5);
  font-family: var(--font-serif);
  font-weight: var(--display-weight);
  font-size: var(--text-display);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}
.auth__lead { margin-top: var(--space-5); color: var(--ink-secondary); max-width: 32rem; }
.auth__points {
  list-style: none;
  margin: var(--space-6) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.auth__point {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2-5);
  color: var(--ink-secondary);
}
/* Accent ticks: green stays a locked safety signal, never decoration */
.auth__point svg { width: 1.1rem; height: 1.1rem; flex: none; margin-top: var(--space-1); color: var(--accent); }
.auth__soon { margin-top: var(--space-7); }
.auth__soon-note { margin-top: var(--space-3); font-size: var(--text-xs); color: var(--ink-secondary); }

.auth-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-card);
}
.auth-card [data-auth-state] { display: none; }
.auth-card [data-auth-state].is-current { display: block; }
.auth-card__title {
  font-family: var(--font-serif);
  font-weight: var(--display-weight);
  font-size: var(--text-xl);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-snug);
}
.auth-card__body { margin-top: var(--space-4); color: var(--ink-secondary); font-size: var(--text-base); }

.field { margin-top: var(--space-5); }
.field__label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--space-2);
}
.field__input {
  width: 100%;
  padding: var(--space-3-5) var(--space-4);
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  /* Matches the button radius so the form reads as one shape system */
  border-radius: var(--radius-btn);
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.field__input::placeholder { color: var(--ink-muted); }
.field__input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }

.auth form .btn { margin-top: var(--space-5); width: 100%; }
.auth-msg {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--safety-red-deep);
}
.auth-msg--ok { color: var(--safety-green); }
.auth-account__email { margin-top: var(--space-4); font-weight: 600; }
.auth-account__status { margin-top: var(--space-3); color: var(--ink-secondary); font-size: var(--text-base); }
.auth-card [data-auth-state] .btn--ghost { margin-top: var(--space-5); }


/* ------------------------------- Footer --------------------------------
   ReFresh-style closing: a centred italic tagline above the link columns,
   and a giant serif wordmark cropped by the bottom edge of the page. The
   wordmark is paper-white over a faint sky wash: a watermark, present but
   quiet, and always aria-hidden. */

.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--paper-2);
  border-top: 1px solid var(--line-soft);
  padding-top: var(--space-8);
}
/* Soft sky wash rising from the page bottom, behind the wordmark */
.site-footer::before {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: clamp(12rem, 32vw, 24rem);
  pointer-events: none;
  background: linear-gradient(to top, var(--wash-sky), transparent);
}
.site-footer > .container { position: relative; }

.site-footer__tagline {
  margin: 0 auto var(--section-gap);
  max-width: 42rem;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: var(--text-h3);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-heading);
  color: var(--ink);
  text-wrap: balance;
}

.site-footer__wordmark {
  position: relative;
  height: clamp(3.9rem, 12.5vw, 11.5rem);
  margin-top: var(--section-gap);
  overflow: hidden;
  text-align: center;
}
.site-footer__wordmark span {
  display: inline-block;
  font-family: var(--font-serif);
  font-weight: var(--display-weight);
  font-size: var(--text-wordmark);
  line-height: var(--leading-none);
  letter-spacing: var(--tracking-snug);
  white-space: nowrap;
  color: var(--surface);
  user-select: none;
}
/* The wave mark sits beside the giant wordmark in the same
   watermark surface white, cap-height sized */
.site-footer__wordmark svg {
  display: inline-block;
  height: 0.68em;
  width: auto;
  margin-right: var(--space-1);
  vertical-align: baseline;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr));
  gap: var(--space-6);
}
@media (max-width: 62em) { .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40em) { .site-footer__grid { grid-template-columns: 1fr; } }

.site-footer__line {
  margin-top: var(--space-4);
  max-width: 20rem;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--ink-secondary);
}
.site-footer__col h2 {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--ink-muted);
}
.site-footer__col ul {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.site-footer__col a {
  color: var(--ink-secondary);
  text-decoration: none;
  font-size: var(--text-base);
}
.site-footer__col a:hover { color: var(--accent-hover); text-decoration: underline; }
.site-footer__col a:active { color: var(--accent-pressed); }

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  justify-content: space-between;
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
  font-size: var(--text-xs);
  color: var(--ink-secondary);
}

.site-footer__base a { color: var(--accent); }
.site-footer__base a:hover { color: var(--accent-hover); }
.site-footer__base a:active { color: var(--accent-pressed); }
/* Marks the reference links as references, so the column cannot be read
   as a partner or endorsement list. */
.site-footer__note {
  margin-top: var(--space-3);
  font-size: var(--text-3xs);
  line-height: var(--leading-normal);
  color: var(--ink-muted);
  max-width: 22ch;
}

@media (max-width: 40em) {
  .site-footer__base { flex-direction: column; }
}

/* ------------------------------ Reveal --------------------------------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}
html.js .reveal.is-visible { opacity: 1; transform: none; }
html.js .stagger .reveal:nth-child(2) { transition-delay: 70ms; }
html.js .stagger .reveal:nth-child(3) { transition-delay: 140ms; }
html.js .stagger .reveal:nth-child(4) { transition-delay: 210ms; }
html.js .stagger .reveal:nth-child(5) { transition-delay: 280ms; }
html.js .stagger .reveal:nth-child(6) { transition-delay: 350ms; }

/* --------------------------- Reduced motion ---------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  html.js .reveal { opacity: 1; transform: none; }
  html.js .pin__step { opacity: 1; }
}

/* ---------------------------- Small screens ---------------------------- */

@media (max-width: 56em) {
  .hero { min-height: 0; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { order: 2; }
}

/* --------------------------- Sydney beaches map ------------------------- */
/* The map card, pins, details panel and locked block reuse the existing
   token set only. Pins are neutral brand blue, never a safety colour. */

.map-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.map-canvas {
  width: 100%;
  height: clamp(420px, 62vh, 580px);
  background: var(--paper-2);
  z-index: 0;
}
@media (max-width: 40em) { .map-canvas { height: 420px; } }

.map-fallback {
  padding: var(--space-7) var(--space-5);
  text-align: center;
  color: var(--ink-secondary);
}

/* Leaflet chrome, restyled to the site */
#beach-map.leaflet-container {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  background: var(--paper-2);
}
#beach-map .leaflet-bar {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
#beach-map .leaflet-bar a {
  background: var(--surface);
  color: var(--ink);
  border-bottom: 1px solid var(--line-soft);
}
#beach-map .leaflet-bar a:last-child { border-bottom: 0; }
#beach-map .leaflet-bar a:hover { background: var(--paper-2); color: var(--ink); }
#beach-map .leaflet-bar a.leaflet-disabled { background: var(--paper-2); color: var(--ink-muted); }
#beach-map .leaflet-control-attribution {
  background: var(--surface);
  color: var(--ink-muted);
  font-size: var(--text-3xs);
  padding: var(--space-05) var(--space-2);
  border-top-left-radius: var(--radius-sm);
}
#beach-map .leaflet-control-attribution a { color: var(--accent); }

/* Pins (Leaflet divIcons) */
.map-pin { background: transparent; border: 0; }
.map-pin svg { display: block; }
.map-pin:hover { cursor: pointer; }

/* Permanent "Live" label beside the Manly pin */
.map-live-label {
  background: var(--surface);
  color: var(--accent-hover);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-card);
  padding: var(--space-1) var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--text-3xs);
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}
.map-live-label::before { display: none; }

/* Details panel */
.map-panel {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 1100;
  width: min(21.5rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: var(--space-4);
}
@media (max-width: 40em) {
  .map-panel {
    top: auto;
    bottom: var(--space-2);
    left: var(--space-2);
    right: var(--space-2);
    width: auto;
    max-height: 78%;
  }
}

.map-panel__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.map-panel__name {
  font-family: var(--font-serif);
  font-weight: var(--display-weight);
  font-size: var(--text-lg);
  letter-spacing: var(--tracking-tight);
}
.map-panel__close {
  margin-left: auto;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink-secondary);
  cursor: pointer;
}
.map-panel__close:hover { background: var(--paper-2); color: var(--ink); }
.map-panel__close svg { width: 0.9rem; height: 0.9rem; }

.map-tag {
  flex: none;
  padding: var(--space-1) var(--space-2-5);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-pill);
  background: var(--paper-2);
  color: var(--ink-secondary);
  font-size: var(--text-3xs);
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  white-space: nowrap;
}
.map-tag--live {
  background: var(--accent-tint);
  color: var(--accent-hover);
}

.map-panel__stats {
  margin-top: var(--space-3);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}
.map-stat {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: var(--space-2);
  align-items: center;
  padding: var(--space-3);
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}
/* Data context: the same single tile treatment, smaller */
.map-stat__icon {
  grid-row: 1 / 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  background: var(--accent-tint);
  color: var(--accent-hover);
}
.map-stat__icon svg { width: 1.1rem; height: 1.1rem; }
.map-stat__label {
  font-size: var(--text-2xs);
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--ink-muted);
}
.map-stat__value {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.map-stat__na { color: var(--ink-secondary); font-weight: 500; }

.map-skel {
  display: inline-block;
  width: 3.2rem;
  height: 0.85em;
  border-radius: var(--radius-pill);
  background: var(--paper-2);
}

/* Honest recency line under the stats grid */
.map-asat {
  margin: var(--space-2) 0 0;
  font-size: var(--text-2xs);
  color: var(--ink-secondary);
}

/* Locked, app-only safety read. A lock and abstract shimmer bars only,
   never a number, colour rating or anything that could read as a value. */
.map-locked {
  margin-top: var(--space-3);
  padding: var(--space-4) var(--space-4) var(--space-4);
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
}
.map-locked__head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.map-locked__lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: var(--radius-sm);
  background: var(--accent-tint);
  color: var(--accent-hover);
}
.map-locked__lock svg { width: 1rem; height: 1rem; }
.map-locked__title { font-size: var(--text-base); font-weight: 700; color: var(--ink); }
.map-locked__shimmer {
  display: grid;
  gap: var(--space-1-5);
  margin-top: var(--space-3);
}
.map-locked__shimmer span {
  height: 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--paper-2);
}
.map-locked__shimmer span:nth-child(1) { width: 62%; }
.map-locked__shimmer span:nth-child(2) { width: 40%; }
.map-locked__shimmer span:nth-child(3) { width: 74%; }
.map-locked__body {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--ink-secondary);
}
.map-locked__cta {
  margin-top: var(--space-3);
  width: 100%;
  padding: var(--space-2-5) var(--space-4-5);
  font-size: var(--text-sm);
}

/* Legend under the map */
.map-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-5);
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--line-soft);
  background: var(--surface);
}
.map-legend__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-secondary);
}
.map-legend__pin { width: 0.85rem; height: auto; flex: none; }
.map-legend__note { margin-left: auto; font-size: var(--text-xs); color: var(--ink-secondary); }
.map-legend__note a { color: inherit; text-underline-offset: 2px; }
@media (max-width: 48em) { .map-legend__note { margin-left: 0; width: 100%; } }

/* Map motion, fully disabled under reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .map-panel:not([hidden]) { animation: map-panel-in 240ms var(--ease-out); }
  .map-skel {
    background-image: linear-gradient(90deg, var(--paper-2), var(--accent-tint), var(--paper-2));
    background-size: 200% 100%;
    animation: map-shimmer 1.3s linear infinite;
  }
  .map-locked__shimmer span {
    background-image: linear-gradient(90deg, var(--paper-2), var(--line-soft), var(--paper-2));
    background-size: 200% 100%;
    animation: map-shimmer 2.2s linear infinite;
  }
}
@keyframes map-panel-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes map-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* --------------------------- Home page layout --------------------------
   Scoped to .page-home. Vertical rhythm is NOT overridden here: every
   section on this page uses the same --section-pad tokens as the same
   section on every other page. What remains is one genuine layout
   difference, the two-column "Free" block. */

/* The stacked step column beside the device runs tighter than a
   standalone section, since the steps read as one unit. */
.page-home .pin__steps {
  gap: var(--gap-grid-lg);
  padding-block: var(--section-pad-tight);
}

/* "Free. For every beachgoer." becomes a two-column block: the serif
   statement on the left, the three supporting facts as a compact
   hairline-separated stack on the right. */
.page-home .free {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  align-items: center;
  gap: var(--gap-split);
  text-align: left;
}
.page-home .free__body { margin: var(--space-4) 0 0; max-width: 34rem; }
.page-home .free__points {
  list-style: none;
  margin: 0;
  padding: 0;
}
.page-home .free__points li {
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: var(--text-md);
  color: var(--ink);
}
.page-home .free__points li:first-child { border-top: 1px solid var(--line); }
@media (max-width: 56em) {
  .page-home .free { grid-template-columns: 1fr; }
}
