/* =============================================================
 * Drip Meter — marketing site styles
 *
 * Self-contained. Borrows BRAND TOKENS (accent, type scale, spacing, voice)
 * from design-system/colors_and_type.css but is its OWN marketing layout — the
 * design system is explicitly "not for a marketing landing page", so we reuse
 * token VALUES, not the product component CSS.
 *
 * No external requests at render time: a system-font stack (matching the app's
 * "defer to platform fonts" decision — nothing to host), self-hosted SVGs, no
 * web fonts, no JS. Mobile-first; one breakpoint.
 * ============================================================= */

:root {
  /* --- Accent (PLACEHOLDER, pending designer pass) -----------------------
   * Mirrors design-system/colors_and_type.css --accent-600 AND the app's
   * core/theme BrandSeed.accent (Color(0xFF007C77)). Per task 0026 the accent
   * is being LOCKED via a designer pass; until that lands, this teal is the
   * documented placeholder. A designer recolor must update all three in
   * lockstep: app BrandSeed, design-system token, this file (+ golden regen).
   * --------------------------------------------------------------------- */
  --accent: #007c77;
  --accent-strong: #005f5d;
  --accent-tint: #d1f3f2;
  --on-accent: #fffdfa;

  /* Warm-neutral surfaces + foreground ramp (light) */
  --fg-1: #1f1915;
  --fg-2: #58514b;
  --fg-3: #8a8279;
  --bg-base: #fffdfa;
  --bg-raised: #fbf8f4;
  --bg-sunken: #f2eee9;
  --border-1: #dcd7d0;

  /* Draft / warning callout (restrained crimson family) */
  --warn-fg: #5a0e0c;
  --warn-bg: #ffe7e4;
  --warn-edge: #b24743;

  /* Single system-font stack — no web font fetched */
  --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Helvetica, Arial, sans-serif;

  /* Type scale (Apple-leaning, from the design system) */
  --t-13: 0.8125rem;
  --t-15: 0.9375rem;
  --t-17: 1.0625rem;
  --t-22: 1.375rem;
  --t-28: 1.75rem;
  --t-34: 2.125rem;

  /* Spacing (4px base) */
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;

  --radius-md: 12px;
  --measure: 70ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* "Candle-lit charcoal", warmed neutrals; accent lifts to carry on dark. */
    --accent: #41c1ba;
    --accent-strong: #41c1ba;
    --accent-tint: #004b4c;
    --on-accent: #001d21;
    --fg-1: #f2eee9;
    --fg-2: #afaaa4;
    --fg-3: #6b645e;
    --bg-base: #15110d;
    --bg-raised: #1a1612;
    --bg-sunken: #241e19;
    --border-1: #2e2723;
    --warn-fg: #ffe7e4;
    --warn-bg: #621817;
    --warn-edge: #f07f77;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-system);
  font-size: var(--t-17);
  line-height: 1.5;
  color: var(--fg-1);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Accessible skip link — visible on focus only. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--on-accent);
  padding: var(--space-2) var(--space-4);
  border-radius: 0 0 var(--radius-md) 0;
  z-index: 10;
}
.skip-link:focus {
  left: 0;
}

a {
  color: var(--accent-strong);
}

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

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

.site-header,
.site-footer {
  padding: var(--space-5) var(--space-5);
}

.site-header {
  border-bottom: 1px solid var(--border-1);
}

.brand {
  display: inline-flex;
}

.wordmark {
  display: block;
  height: 2.25rem;
  width: auto;
  color: var(--fg-1);
}

main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: var(--space-8) var(--space-5);
}

.site-footer {
  border-top: 1px solid var(--border-1);
  color: var(--fg-2);
  font-size: var(--t-15);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
}

.footer-contact {
  margin: 0;
}

/* --- Hero (PR-A skeleton; refined in PR-B) ----------------------------- */

.hero h1 {
  font-size: var(--t-34);
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-3);
}

.hero .lead {
  font-size: var(--t-22);
  color: var(--fg-2);
  margin: 0;
}

/* --- Prose / legal pages ----------------------------------------------- */

.prose {
  max-width: var(--measure);
}

.prose h1 {
  font-size: var(--t-34);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.prose h2 {
  font-size: var(--t-28);
  letter-spacing: -0.01em;
  margin-top: var(--space-8);
}
.prose h3 {
  font-size: var(--t-22);
  margin-top: var(--space-6);
}

.prose p,
.prose li {
  color: var(--fg-1);
}

.prose a {
  color: var(--accent-strong);
}

.prose table {
  border-collapse: collapse;
  width: 100%;
  margin: var(--space-5) 0;
  font-size: var(--t-15);
}
.prose th,
.prose td {
  border: 1px solid var(--border-1);
  padding: var(--space-2) var(--space-3);
  text-align: left;
  vertical-align: top;
}
.prose th {
  background: var(--bg-sunken);
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--bg-sunken);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

/* The first blockquote in each legal doc is the DRAFT banner. Render it as a
 * prominent warning callout — never hidden or softened. */
.legal blockquote {
  margin: 0 0 var(--space-6);
  padding: var(--space-4) var(--space-5);
  border-left: 4px solid var(--warn-edge);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--warn-bg);
  color: var(--warn-fg);
}
.legal blockquote p {
  margin: 0;
  color: inherit;
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* --- Wider viewports ---------------------------------------------------- */

@media (min-width: 48rem) {
  .site-header,
  .site-footer {
    padding-left: var(--space-10);
    padding-right: var(--space-10);
  }
  main {
    padding: var(--space-10) var(--space-10);
  }
  .hero h1 {
    font-size: 3rem;
  }
}
