/* Nagwell web: one stylesheet, no framework, no third-party requests.
   Tokens mirror docs/DESIGN-SYSTEM.md §2. Contrast ratios (WCAG 2.x) are noted
   next to each pairing; re-check them if a value changes.
   The accent is a FILL only (with --on-accent text). Never use it as text or
   an icon on light surfaces: it fails contrast there. */

:root {
  color-scheme: light dark;

  --surface: #f8f7f4;      /* nwSurface */
  --card: #ffffff;         /* nwCard */
  --text: #16191f;         /* on surface 16.4:1 */
  --text-muted: #4a5263;   /* on surface 7.3:1, on card 7.8:1 */
  --brand: #063a72;        /* nwNavy: links. On surface 10.6:1, on card 11.3:1 */
  --border: #d9d6ce;
  --hero-bg: #063a72;      /* navy band */
  --hero-fg: #ffffff;      /* on hero 11.3:1 */
  --hero-muted: #d4e0f2;   /* on hero 8.5:1 */
  --accent: #e3963e;       /* nwAccent, fill only. Against the hero 4.7:1 (non-text) */
  --on-accent: #1a1a1a;    /* on accent 7.2:1 */
  --focus: #063a72;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --measure: 40rem;
  --page: 64rem;
  --radius: 12px;
  --radius-card: 20px;
  /* Spacing scale: 4 8 12 16 24 32 48 (DESIGN-SYSTEM.md §4) */
  --s1: 0.25rem; --s2: 0.5rem; --s3: 0.75rem; --s4: 1rem;
  --s5: 1.5rem; --s6: 2rem; --s7: 3rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #0e1116;
    --card: #1c2230;
    --text: #eef0f4;       /* on surface 16.6:1, on card 13.9:1 */
    --text-muted: #a9b1c1; /* on surface 8.8:1, on card 7.4:1 */
    --brand: #8fb2f0;      /* on surface 8.8:1, on card 7.4:1 */
    --border: #2c3445;
    --hero-bg: #13294a;
    --hero-fg: #ffffff;    /* on hero 14.5:1 */
    --hero-muted: #c9d6ec; /* on hero 9.9:1 */
    --accent: #f0a95a;
    --on-accent: #0e1116;  /* on accent 9.5:1 */
    --focus: #8fb2f0;
  }
}

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

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-wrap: break-word;
}

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

a { color: var(--brand); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

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

h1, h2, h3 { line-height: 1.2; margin: 0 0 var(--s4); font-weight: 600; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.75rem); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.75rem); }
h3 { font-size: 1.125rem; }
p, ul, ol { margin: 0 0 var(--s4); }

.skip-link {
  position: absolute;
  left: var(--s4);
  top: -100px;
  z-index: 10;
  padding: var(--s2) var(--s4);
  background: var(--card);
  color: var(--brand);
  border-radius: var(--radius);
}
.skip-link:focus { top: var(--s4); }

.wrap {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--s4);
}
@media (min-width: 40rem) { .wrap { padding: 0 var(--s6); } }

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3) var(--s5);
  padding-top: var(--s3);
  padding-bottom: var(--s3);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 44px;
  color: var(--text);
  font-weight: 600;
  font-size: 1.125rem;
  text-decoration: none;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s4);
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--s1);
}
.site-nav a[aria-current="page"] { font-weight: 600; text-decoration-thickness: 2px; }

/* Main content */
main { display: block; }
.section { padding: var(--s7) 0; }
.section + .section { border-top: 1px solid var(--border); }
.prose { max-width: var(--measure); }
.muted { color: var(--text-muted); }

/* Hero: navy band. The accent appears only as the CTA fill. */
.hero {
  background: var(--hero-bg);
  color: var(--hero-fg);
  padding: var(--s7) 0;
}
.hero .lede { color: var(--hero-muted); font-size: 1.1875rem; max-width: var(--measure); }
.hero h1 { max-width: 22em; }
.hero a:not(.button) { color: var(--hero-fg); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: var(--s3) var(--s5);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
  transition: transform 150ms ease, filter 150ms ease;
}
.button:hover { filter: brightness(1.05); transform: translateY(-1px); }
.hero .button:focus-visible { outline-color: var(--hero-fg); }

.steps {
  display: grid;
  gap: var(--s4);
  grid-template-columns: 1fr;
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--s5);
}
.steps .card { counter-increment: step; }
.steps .card::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: var(--s3);
  border-radius: 50%;
  background: var(--brand);
  color: var(--surface); /* light 10.6:1, dark 8.8:1 */
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--s6) 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s4);
  list-style: none;
  margin: 0 0 var(--s3);
  padding: 0;
}
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
  .button:hover { transform: none; }
}

@media (forced-colors: active) {
  .button { border: 2px solid ButtonText; }
}
