/* Nagwell web: one stylesheet, no framework, no third-party requests.
   Tokens port the Night Call color/type/space system, docs/DESIGN-SYSTEM.md §2-4
   (ink & bone canvas, one warm accent, condensed display type). 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) or the eyebrow "live" dot.
   Never use it as body text or an icon on the canvas: it isn't tested for that. */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/archivo-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;

  /* Night Call: bone canvas, ink text (design system §2, "Night Call tokens") */
  --canvas: #f5f1e8;          /* nwBone / nwCanvas (light) */
  --on-canvas: #08090e;       /* nwInk / nwOnCanvas (light). On canvas: 17.6:1 */
  --canvas-muted: color-mix(in srgb, var(--on-canvas) 65%, var(--canvas));
                               /* secondary text. On canvas: 6.1:1 */
  --ink: #08090e;             /* fixed ink, both modes */
  --bone: #f5f1e8;            /* fixed bone, both modes */

  --card: color-mix(in srgb, var(--on-canvas) 5%, var(--canvas));   /* NWTint.card */
  --card-selected: color-mix(in srgb, var(--on-canvas) 9%, var(--canvas));
  --quiet-fill: color-mix(in srgb, var(--on-canvas) 10%, var(--canvas)); /* NWTint.quietFill */
  --hairline: color-mix(in srgb, var(--on-canvas) 15%, transparent);     /* NWTint.hairline */
  --border: color-mix(in srgb, var(--on-canvas) 45%, transparent);  /* visible outlines, ~3:1 */

  --accent: #e3963e;          /* nwAccent (light). Call moments + the one CTA, never text-on-canvas */
  --on-accent: #1a1a1a;       /* nwOnAccent (light). On accent: 7.2:1 */
  --focus: var(--on-canvas);  /* always ≥17:1 against canvas, whatever else is nearby */

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-display: "Archivo", var(--font);
  --measure: 38rem;
  --page: 68rem;
  --radius: 12px;       /* Radius.control */
  --radius-card: 20px;  /* Radius.card */
  --radius-pill: 999px;
  /* 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; --s8: 4rem;

  --motion-fast: 150ms ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #08090e;          /* nwCanvas (dark) */
    --on-canvas: #f5f1e8;       /* nwOnCanvas (dark). On canvas: 17.6:1 */
    --accent: #f0a95a;          /* nwAccent (dark) */
    --on-accent: #0e1116;       /* nwOnAccent (dark). On accent: 9.5:1 */
  }
}

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

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

body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--on-canvas);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-wrap: break-word;
  overflow-x: hidden; /* .shot-glow bleeds past its .shot-frame by design (#191); the
                          #184 screenshots section now repeats that frame 5x, so the
                          bleed needs clipping at the page edge instead of causing a
                          few extra px of horizontal scroll. */
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--on-canvas); 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 {
  font-family: var(--font-display);
  line-height: 1.05;
  margin: 0 0 var(--s4);
  font-weight: 800;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.25rem, 1.4rem + 4vw, 4rem); }
h2 { font-size: clamp(1.75rem, 1.35rem + 2vw, 2.75rem); }
h3 { font-family: var(--font); font-size: 1.125rem; font-weight: 700; letter-spacing: -0.01em; }
p, ul, ol { margin: 0 0 var(--s4); }

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

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

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

/* Header */
.site-header { border-bottom: 1px solid var(--hairline); }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3) var(--s5);
  padding-top: var(--s4);
  padding-bottom: var(--s4);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 44px;
  color: var(--on-canvas);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.1875rem;
  text-decoration: none;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s5);
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--s1);
  text-decoration: none;
  color: var(--canvas-muted);
  font-weight: 600;
}
@media (max-width: 34rem) { .site-nav ul { gap: var(--s1) var(--s3); } } /* keeps the four links on one row inside the wider phone gutter (#289) */
.site-nav a:hover { color: var(--on-canvas); }
.site-nav a[aria-current="page"] { color: var(--on-canvas); text-decoration-thickness: 2px; text-underline-offset: 0.2em; text-decoration-line: underline; }

/* Main content */
main { display: block; }
.section { padding-block: var(--s8); } /* block only: .section is paired with .wrap, which owns the side gutter (#289) */
.section + .section,
.site-footer { border-top: 1px solid var(--hairline); }
.prose { max-width: var(--measure); }
.prose h2 { margin-top: var(--s7); font-size: 1.5rem; }
.prose h3 { margin-top: var(--s5); }
.muted { color: var(--canvas-muted); }

/* Eyebrow: small-caps structure token, design system §3 (NWEyebrow).
   The dot is the one place color repeats the app's "live call" motif. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  margin: 0 0 var(--s4);
  color: var(--canvas-muted);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.eyebrow .dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.eyebrow .dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  animation: nw-ping 2.4s ease-out infinite;
}

/* Hero */
.hero {
  padding-block: var(--s8) var(--s7); /* block only, like .section (#289) */
  display: grid;
  gap: var(--s7);
  align-items: center;
}
@media (min-width: 56rem) {
  .hero { grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr); }
}
.lede {
  color: var(--canvas-muted);
  font-size: 1.1875rem;
  max-width: var(--measure);
}
.hero h1 { max-width: 18em; }
.section-lede { margin-bottom: var(--s6); }

.cta-row { display: flex; flex-wrap: wrap; gap: var(--s3); }
.cta-note { margin-top: var(--s3); color: var(--canvas-muted); font-size: 0.875rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: var(--s3) var(--s5);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--motion-fast), filter var(--motion-fast);
}
.button:hover { filter: brightness(1.06); transform: translateY(-1px); }
.button[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }

/* NWSecondaryButton: quiet capsule, not the accent */
.button-secondary {
  background: var(--quiet-fill);
  color: var(--on-canvas);
  border: 1px solid var(--hairline);
}
.button-secondary:hover { background: var(--card-selected); filter: none; }

/* Screenshot slot for #184 (app-screenshots): an empty device frame other
   workers can drop an <img class="shot"> or fill this figure into. Not filled
   here on purpose — no images added by this issue. */
.shot-frame {
  position: relative;
  width: min(300px, 78vw);
  aspect-ratio: 9 / 18.6;
  margin: 0 auto;
  padding: 10px;
  border: 2px solid var(--on-canvas);
  border-radius: 44px;
  background: var(--ink);
}
.shot-frame .shot-glow {
  position: absolute;
  inset: -15%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 28%, transparent), transparent 70%);
}
.shot {
  width: 100%;
  height: 100%;
  display: block;
  overflow: hidden;
  border-radius: 34px;
  background: var(--ink);
}
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* App screenshots grid (#184): a row of .shot-frame devices, scaled down to
   fit a grid cell instead of the hero's fixed width. */
.shots-grid {
  display: grid;
  gap: var(--s5);
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 40rem) { .shots-grid { grid-template-columns: repeat(4, 1fr); } }
.shots-grid figure { margin: 0; }
.shots-grid .shot-frame { width: 100%; max-width: 220px; margin: 0 auto; }
.shots-grid figcaption { margin-top: var(--s3); text-align: center; color: var(--canvas-muted); font-size: 0.875rem; }

/* Decorative rings: the app's call motif (docs/ui-directions-103), used once
   as hero art, never as a stand-in for real content. */
.rings { display: block; margin: 0 auto; }
.rings .ring { fill: none; stroke: var(--accent); opacity: 0.55; }
.rings .dial { fill: var(--accent); }
.rings .glyph { fill: var(--ink); }

.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); } }
@media (min-width: 34rem) and (max-width: 48rem) { .steps { grid-template-columns: repeat(2, 1fr); } }

.card {
  background: var(--card);
  border: 1px solid var(--hairline);
  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(--on-canvas);
  color: var(--canvas);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Highlights strip under the hero */
.proof-strip {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: var(--s4);
  align-items: center;
  text-align: center;
  margin-bottom: var(--s7);
}
.proof-strip small { display: block; margin-bottom: var(--s1); color: var(--canvas-muted); font-size: 0.8rem; }
.proof-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); justify-self: center; }
@media (max-width: 34rem) {
  .proof-strip { grid-template-columns: 1fr; gap: var(--s3); }
  .proof-strip .proof-dot { display: none; }
}

/* Pull quote */
.quote {
  margin: 0 0 var(--s6);
  max-width: 34rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
/* Accent is never text on the light canvas (2.1:1): ink text with an accent underline there,
   accent text only in dark mode, where it's 10:1 (#280). */
.quote em {
  font-style: normal;
  text-decoration: underline var(--accent);
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.14em;
}
@media (prefers-color-scheme: dark) { .quote em { color: var(--accent); } }

/* Example / row cards inside a .steps grid */
.row-card strong { display: block; }
.row-card .row-meta { margin: var(--s1) 0 0; }
.row-card .row-time { margin: var(--s3) 0 0; font-weight: 700; }

.closing-panel { padding: var(--s7) var(--s6); border-width: 2px; }

/* Principles / feature list */
.principles {
  display: grid;
  gap: var(--s5);
}
@media (min-width: 48rem) { .principles { grid-template-columns: repeat(3, 1fr); } }
.principle { padding: var(--s5); background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius-card); }
.principle h3 { margin-bottom: var(--s2); font-family: var(--font-display); font-size: 1.0625rem; font-weight: 800; line-height: 1.3; letter-spacing: -0.01em; }
.principle p { margin: 0; color: var(--canvas-muted); font-size: 0.9375rem; }

/* Pricing */
.pricing-grid {
  display: grid;
  gap: var(--s4);
  grid-template-columns: 1fr;
  max-width: 44rem;
}
@media (min-width: 40rem) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
.price-card {
  position: relative;
  padding: var(--s6) var(--s5) var(--s5);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--card);
}
.price-card.featured { border: 2px solid var(--on-canvas); }
.price-card h3 {
  margin: 0 0 var(--s2);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--canvas-muted);
}
.price-badge {
  position: absolute;
  top: -14px;
  left: var(--s5);
  padding: 5px var(--s3);
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.price {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 3.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.price small { font-family: var(--font); font-size: 1rem; font-weight: 500; letter-spacing: 0; color: var(--canvas-muted); }
.price-list {
  list-style: none;
  margin: var(--s5) 0 0;
  padding: var(--s5) 0 0;
  border-top: 1px solid var(--hairline);
  display: grid;
  gap: var(--s3);
  color: var(--canvas-muted);
  font-size: 0.9375rem;
}
.price-list li { display: flex; gap: var(--s2); align-items: baseline; }
.price-list li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-1px);
}
.price-note { max-width: 44rem; margin: var(--s5) 0 0; color: var(--canvas-muted); font-size: 0.875rem; }

/* FAQ */
.faq { max-width: 44rem; }
.faq details { border-top: 1px solid var(--hairline); padding: var(--s1) 0; }
.faq details:last-child { border-bottom: 1px solid var(--hairline); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s4);
  padding: var(--s4) 0;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  list-style: none;
  min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--canvas-muted);
}
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin: 0 0 var(--s5); max-width: 42rem; color: var(--canvas-muted); font-size: 0.9375rem; }

/* Footer */
.site-footer {
  padding: var(--s6) 0;
  color: var(--canvas-muted);
  font-size: 0.9375rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s3) var(--s5);
  align-items: center;
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s4);
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--canvas-muted); }
.site-footer a:hover { color: var(--on-canvas); }

@keyframes nw-ping {
  0% { transform: scale(0.7); opacity: 0.9; }
  75%, 100% { transform: scale(1.6); opacity: 0; }
}

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

@media (forced-colors: active) {
  .button, .button-secondary { border: 2px solid ButtonText; }
  .card, .price-card, .principle, .shot-frame { border: 1px solid CanvasText; }
}
