/* ============================================================
   Lather landing page — styles.css

   Approach: type-first, near-monochromatic, system-aware.
   The display font and accent color are deliberately omitted
   — those decisions belong to the designer per Project
   Instructions Section 26. When the designer ships, swap the
   CSS custom properties below and (optionally) add a
   @font-face for the display font. No structural rewrite needed.
   ============================================================ */

/* :root holds the design tokens for light mode.
   Dark mode overrides them below via prefers-color-scheme. */
:root {
  /* Color palette — off-shades, not pure black/white.
     Reads as intentional rather than default. */
  --bg: #FAFAF9;
  --text-primary: #1A1A1A;
  --text-secondary: #6B6B6B;
  --text-muted: #9A9A9A;
  --rule: #E5E5E2;

  /* Type stack: SF Pro on Apple devices, native sans elsewhere.
     SF Pro is locked for UI per Brand Direction Brief Section 8. */
  --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;

  /* Spacing scale — strict 8pt grid per Project Instructions Section 26.
     Every spacing value in the page is one of these. */
  --space-1: 0.5rem;   /* 8px  */
  --space-2: 1rem;     /* 16px */
  --space-3: 1.5rem;   /* 24px */
  --space-4: 2rem;     /* 32px */
  --space-6: 3rem;     /* 48px */
  --space-8: 4rem;     /* 64px */
  --space-12: 6rem;    /* 96px */
}

/* Dark mode override.
   System-aware: the OS preference wins. No toggle button —
   that's deliberate per brief Section 7. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F0F0F;
    --text-primary: #F5F5F4;
    --text-secondary: #A8A8A6;
    --text-muted: #6B6B6B;
    --rule: #2A2A2A;
  }
}

/* Minimal reset — only what we use. */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-system);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* min-height + flex column keeps the footer at the bottom
     on tall viewports without absolute positioning. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Container: max-width caps line length for comfortable reading.
   Generous top padding gives the wordmark breathing room. */
.container {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-12) var(--space-4) var(--space-8);
}

/* Wordmark: small, letter-spaced, all-caps.
   A type-only logotype placeholder. Replaced when designer ships. */
.wordmark {
  margin: 0 0 var(--space-12) 0;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--text-primary);
}

/* Hero: the brand's locked voice line.
   clamp() scales the size between mobile (1.75rem) and desktop (2.5rem)
   fluidly based on viewport width. Tight line-height because display
   type at this scale needs less vertical air than body text. */
.hero {
  margin: 0 0 var(--space-6) 0;
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  /* Slightly tighter than the container so the line wraps gracefully
     on wide screens — long display lines look weak when stretched. */
  max-width: 22ch;
}

/* Body paragraphs: comfortable reading size, secondary color
   so the hero stays the visual anchor. */
.body p {
  margin: 0 0 var(--space-3) 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.body p:last-child {
  margin-bottom: var(--space-6);
}

/* Status: small, muted. */
.status {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Footer: thin rule separator, small type, split left and right.
   On narrow screens it wraps to two lines naturally via flex-wrap. */
.footer {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-4) var(--space-6);
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer p {
  margin: 0;
}

.footer a {
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: color 150ms ease, border-color 150ms ease;
}

.footer a:hover,
.footer a:focus-visible {
  color: var(--text-primary);
  border-bottom-color: var(--text-primary);
}

/* Visible keyboard focus for accessibility. */
a:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Narrow viewports: tighten the top padding so the wordmark
   sits in a sensible position without the page feeling empty above. */
@media (max-width: 600px) {
  .container {
    padding-top: var(--space-8);
  }

  .wordmark {
    margin-bottom: var(--space-8);
  }
}