/* ─────────────────────────────────────────────────────────────────────────────
   Walkabout — design system
   Single source of visual truth for the web presence (landing, privacy,
   account-deletion). Pure CSS, no build step, no external requests.

   Sections:
     1. @font-face          — self-hosted IBM Plex Sans 400/600, Mono 400/500
     2. :root tokens        — ink scale, text, green, amber, type vars
     3. Derived alpha tokens — scrims & glows via color-mix
     4. Base reset          — box-sizing, body, links, focus, mono data
     5. Page frame          — main
     6. Reduced-motion      — kill all transitions/animation
     7. Chrome: site-header & brand
     8. Chrome: site-footer
     9. Chrome: .btn / .btn-primary
    10. Chrome: .hero
    11. Chrome: .beats / .beat
    12. Chrome: .legal
   ─────────────────────────────────────────────────────────────────────────────

   Token discipline: every color/spacing/type value must be a var(--…) reference.
   No bare hex, no bare em letter-spacing, no inline color-mix() in rules.
   ───────────────────────────────────────────────────────────────────────────── */


/* ── 1. @font-face ─────────────────────────────────────────────────────────── */

/* IBM Plex Sans — UI / labels / prose */
@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/ibm-plex-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/ibm-plex-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* IBM Plex Mono — ALL data, numbers, technical labels */
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}


/* ── 2. :root design tokens ────────────────────────────────────────────────── */
/*
   Hex values are verbatim from apps/mobile/src/constants/theme.ts.
   Components reference var(--…) only — zero hardcoded hex in rules below.
*/

:root {
  /* Ink scale — near-black with faint cool-green tint */
  --ink-850: #0B0F0E;   /* page background */
  --line:    #243029;   /* dividers, borders */

  /* Text */
  --paper:   #E7EFEA;   /* primary text */
  --muted:   #8A988F;   /* secondary / descriptive text */

  /* Green — the current walk / the ONE primary action */
  --green:        #1EC775;
  --green-bright: #54E89A;  /* glow, live indicator */
  --green-deep:   #0E8F50;  /* pressed / fill */
  --on-green:     #04140C;  /* text placed on a green surface */

  /* Amber — accumulated history / coverage accents (map layer only on this site) */
  --amber: #E0A23C;

  /* Type stacks */
  --font-sans: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  /* ── Spacing scale (4pt base) ─────────────────────────────────────────── */
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  24px;
  --sp-6:  32px;
  --sp-7:  48px;
  --sp-8:  64px;
  --sp-9:  96px;

  /* ── Type scale ───────────────────────────────────────────────────────── */
  /* Fluid: clamp(min, preferred, max). Body = 1rem base. */
  --text-xs:   0.75rem;      /* 12px — legal, captions */
  --text-sm:   0.875rem;     /* 14px — meta, timestamps, footer */
  --text-base: 1rem;         /* 16px — body */
  --text-lg:   1.125rem;     /* 18px — lead / intro */
  --text-xl:   clamp(1.25rem,  2vw + 0.5rem, 1.5rem);   /* subheadings */
  --text-2xl:  clamp(1.5rem,   3vw + 0.75rem, 2rem);    /* h2 */
  --text-3xl:  clamp(2rem,     5vw + 0.5rem,  3rem);    /* h1 */
  --text-hero: clamp(2.5rem,   8vw + 0.5rem,  4.5rem);  /* hero headline */

  /* ── Line-height (dark-bg: add ~0.05 for perceived weight) ───────────── */
  --lh-display: 1.05; /* hero headline — tighter at display scale */
  --lh-tight:   1.15; /* headlines */
  --lh-body:    1.65; /* prose — extra room on dark bg */

  /* ── Letter-spacing ───────────────────────────────────────────────────── */
  --ls-tight:  -0.02em;  /* large headlines */
  --ls-body:    0;
  --ls-snug:    0.01em;  /* wordmarks / button labels — barely-there tracking */
  --ls-wider:   0.12em;  /* mono eyebrows / small-cap labels */
}


/* ── 3. Derived alpha tokens (color-mix, no raw rgba) ──────────────────────── */

:root {
  /* Sticky header scrim — semi-transparent ink for backdrop-filter depth */
  --scrim-header: color-mix(in srgb, var(--ink-850) 92%, transparent);

  /* Green glow — for the CTA shadow, meaningful not decorative */
  --glow-green: color-mix(in srgb, var(--green) 30%, transparent);

  /* Focus ring */
  --focus-ring: var(--green-bright);
}


/* ── 4. Base reset ──────────────────────────────────────────────────────────── */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  hanging-punctuation: first last;
  font-kerning: normal;
}

body {
  background-color: var(--ink-850);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--paper);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); margin-top: var(--sp-8); margin-bottom: var(--sp-4); }
h3 { font-size: var(--text-xl);  margin-top: var(--sp-6); margin-bottom: var(--sp-3); }

/* Body prose */
p {
  max-width: 65ch;
  margin-bottom: var(--sp-5);
  color: var(--paper);
}

p:last-child { margin-bottom: 0; }

/* Lists */
ul, ol {
  padding-left: var(--sp-5);
  margin-bottom: var(--sp-5);
}

li {
  margin-bottom: var(--sp-2);
  max-width: 65ch;
}

li:last-child { margin-bottom: 0; }

/* Inline code — data/technical labels use Mono */
code, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.875em;
  font-variant-numeric: tabular-nums;
}

/* Links — green, underline on hover */
a {
  color: var(--green);
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color 0.15s ease, opacity 0.15s ease;
}

a:hover {
  color: var(--green-bright);
  text-decoration: underline;
}

a:active {
  color: var(--green-deep);
}

/* Visible focus — AA+ compliant */
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Mono data selectors — data/number elements */
[data-value],
time {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--ls-body);
}


/* Strong / bold */
strong, b { font-weight: 600; }

/* HR / divider */
hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: var(--sp-7) 0;
}

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


/* ── 5. Page frame ──────────────────────────────────────────────────────────── */

/* Main content flex-grows to push footer down */
main {
  flex: 1;
}


/* ── 6. Reduced-motion ──────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* ── 7. .site-header / .brand ───────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--scrim-header);
  border-bottom: 1px solid var(--line);
  /* Backdrop blur for depth — purposeful, not decorative */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-header__inner {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: var(--sp-5);
  padding-block: var(--sp-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
}

/* Brand wordmark */
.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  color: var(--paper);
  transition: opacity 0.15s ease;
}

.brand:hover {
  color: var(--paper);
  text-decoration: none;
  opacity: 0.85;
}

.brand:active { opacity: 0.7; }

.brand__logo {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.brand__name {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: var(--ls-snug);
  line-height: 1;
}

/* ── 8. .site-footer ────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: var(--sp-9);
  padding-block: var(--sp-7);
  color: var(--muted);
  font-size: var(--text-sm);
}

.site-footer__inner {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: var(--sp-5);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-5);
}

/* Footer link group */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  list-style: none;
}

.footer-links a {
  color: var(--muted);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-links a:hover { color: var(--paper); }

/* Legal / credit Mono line */
.legal-credit,
.updated {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted);
  font-weight: 400;
  letter-spacing: var(--ls-body);
  /* Tabular numbers for dates */
  font-variant-numeric: tabular-nums;
}


/* ── 9. .btn / .btn-primary ─────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1;
  letter-spacing: var(--ls-snug);
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  /* Min 44px touch target */
  min-height: 44px;
  transition: background-color 0.15s ease, color 0.15s ease,
              border-color 0.15s ease, box-shadow 0.15s ease;
  /* Prevent text-select on tap */
  user-select: none;
  -webkit-user-select: none;
}

/* Primary — the green action. Only one per page. */
.btn-primary {
  color: var(--on-green);
  background-color: var(--green);
  border-color: var(--green);
  /* Meaningful glow: signals the live/action state */
  box-shadow: 0 0 0 0 var(--glow-green);
}

.btn-primary:hover {
  background-color: var(--green-bright);
  border-color: var(--green-bright);
  color: var(--on-green);
  text-decoration: none;
  /* Glow expands on hover — earned, not decorative */
  box-shadow: 0 0 16px 2px var(--glow-green);
}

.btn-primary:active {
  background-color: var(--green-deep);
  border-color: var(--green-deep);
  color: var(--on-green);
  box-shadow: none;
}

.btn-primary:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}


/* ── 10. .hero ──────────────────────────────────────────────────────────────── */

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

.hero__inner {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

/* Eyebrow above the headline */
.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--green);            /* green — the one primary accent */
  margin-bottom: var(--sp-4);
  display: block;
}

/* Main headline */
.hero__headline {
  font-size: var(--text-hero);
  font-weight: 600;
  line-height: var(--lh-display);
  letter-spacing: var(--ls-tight);
  color: var(--paper);
  max-width: 18ch;
  margin-bottom: var(--sp-5);
}

/* Supporting descriptor — one sentence, prose width */
.hero__desc {
  font-size: var(--text-lg);
  line-height: var(--lh-body);
  color: var(--muted);
  max-width: 52ch;
  margin-bottom: var(--sp-6);
}

/* CTA row */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4);
}



/* ── 11. .beats / .beat ─────────────────────────────────────────────────────── */

/*
   "Beats" = feature callouts — a horizontal scan of key product ideas.
   Deliberately NOT card-grid — uses flow + subtle left-border accent.
   No icon + heading + body repeated 3×, which reads as templated.
*/

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

.beats__inner {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

.beats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-6) var(--sp-7);
  margin-top: var(--sp-6);
}

/* Individual beat — no card border; spacing and left-rule provide rhythm */
.beat {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  border-left: 2px solid var(--line);
  padding-left: var(--sp-5);
  /* Elevate on hover — subtle depth, not a glow */
  transition: border-color 0.2s ease;
}

.beat:hover {
  border-left-color: var(--green);
}

/* Mono label — the "data point" that anchors each beat */
.beat__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--amber);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.beat__body {
  font-size: var(--text-base);
  color: var(--muted);
  line-height: var(--lh-body);
  max-width: 42ch;
  margin-bottom: 0;
}


/* ── 12. .legal ─────────────────────────────────────────────────────────────── */

/*
   Long-form legal pages (Privacy Policy, Account Deletion).
   Prioritises readability: tight measure, generous vertical rhythm.
*/

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

.legal__inner {
  width: 100%;
  max-width: 68ch;
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

.legal h1 {
  font-size: var(--text-3xl);
  margin-bottom: var(--sp-3);
}

/* Mono "last updated" datestamp — instrument readout */
.legal .updated {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--ls-body);
  display: block;
  margin-bottom: var(--sp-7);
}

.legal h2 {
  font-size: var(--text-xl);
  margin-top: var(--sp-7);
  margin-bottom: var(--sp-3);
  color: var(--paper);
}

.legal h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-top: var(--sp-5);
  margin-bottom: var(--sp-2);
  color: var(--paper);
  letter-spacing: var(--ls-body);   /* suppress headline tight-tracking at body size */
}

.legal p {
  max-width: none;   /* container already provides reading measure */
  font-size: var(--text-base);
  color: var(--paper);
  line-height: var(--lh-body);
  margin-bottom: var(--sp-5);
}

.legal ul,
.legal ol {
  margin-bottom: var(--sp-5);
}

.legal li {
  max-width: none;
  line-height: var(--lh-body);
  color: var(--paper);
}

.legal a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal a:hover {
  color: var(--green-bright);
}

/* Divider between major sections */
.legal hr {
  margin: var(--sp-8) 0;
}
