/* ============================================================
   CinderWatch — stylesheet
   Palette derived from the logo: warm charcoal + copper ember
   on a cream "ash" surface. Dark "watch" theme up top,
   light editorial sections below.
   ============================================================ */

:root {
  /* Brand */
  --ink:          #16140F;  /* warm charcoal (house, nozzle)        */
  --ink-2:        #1F1B14;  /* raised panel on dark                 */
  --ink-3:        #2C261C;  /* hairlines / borders on dark          */
  --ember:        #C75B2A;  /* copper ember — accents, arcs, icons  */
  --ember-bright: #ED7B33;  /* glow / hover                          */
  --ember-deep:   #A8431C;  /* text links + buttons on light (AA)   */
  --ash:          #EFEAE1;  /* cream surface / text on dark         */
  --ash-2:        #F6F3ED;  /* lighter cream                         */
  --ash-dim:      #B9B1A2;  /* muted text on dark                    */
  --ash-mute:     #6B645A;  /* muted text on cream                   */

  /* Type */
  --display: "Archivo", system-ui, sans-serif;
  --body:    "Inter", system-ui, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  /* Scale & rhythm */
  --maxw: 1120px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 4px;
  --shadow: 0 18px 50px -24px rgba(0,0,0,.55);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: clamp(1rem, 0.5vw + 0.95rem, 1.075rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--ash);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; margin: 0; }
p { margin: 0 0 1rem; }
a { color: var(--ember-deep); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

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

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute; left: 0; top: -100px;
  background: var(--ember-deep); color: #fff; padding: .75rem 1.25rem;
  z-index: 1000; font-weight: 600; border-radius: 0 0 var(--radius) 0;
  transition: top .15s ease;
}
.skip-link:focus { top: 0; color: #fff; }

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

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

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.eyebrow {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ember); margin: 0 0 1rem;
  display: inline-flex; align-items: center; gap: .55rem;
}
.eyebrow::before { content: ""; width: 1.75rem; height: 1px; background: var(--ember); }
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section-lead { max-width: 42ch; color: var(--ash-mute); font-size: 1.1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--body); font-weight: 600; font-size: 1rem;
  padding: .85rem 1.5rem; border-radius: var(--radius);
  border: 2px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn-primary { background: var(--ember-deep); color: #fff; }
.btn-primary:hover { background: var(--ember-bright); color: var(--ink); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ash); border-color: var(--ink-3); }
.btn-ghost:hover { border-color: var(--ember); color: var(--ash); transform: translateY(-1px); }
.btn-ghost-dark { background: transparent; color: var(--ink); border-color: rgba(22,20,15,.25); }
.btn-ghost-dark:hover { border-color: var(--ember-deep); color: var(--ink); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(22,20,15,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ink-3);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ash); }
.brand:hover { color: var(--ash); }
.brand svg { width: 30px; height: 36px; }
.brand .wordmark { font-family: var(--display); font-weight: 800; font-size: 1.3rem; letter-spacing: -.01em; }
.brand .wordmark b { color: var(--ember); font-weight: 800; }

.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a { color: var(--ash-dim); text-decoration: none; font-size: .95rem; font-weight: 500; }
.nav a:hover, .nav a:focus-visible { color: var(--ash); }
.nav .btn-primary { color: #fff; }
.nav .btn-primary:hover { color: var(--ink); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--ink-3);
  color: var(--ash); border-radius: var(--radius); padding: .5rem .65rem; cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: 72px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink); border-bottom: 1px solid var(--ink-3);
    padding: .5rem var(--gutter) 1.25rem; transform: translateY(-120%);
    transition: transform .25s ease; box-shadow: var(--shadow);
  }
  .nav[data-open="true"] { transform: translateY(0); }
  .nav a { padding: .9rem 0; border-bottom: 1px solid var(--ink-3); }
  .nav .btn-primary { margin-top: .9rem; justify-content: center; }
}

/* ============================================================
   Hero (dark "watch" panel with drifting embers)
   ============================================================ */
.hero { position: relative; background: var(--ink); color: var(--ash); overflow: hidden; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero::after { /* warm glow rising from the roofline */
  content: ""; position: absolute; left: 50%; bottom: -30%; transform: translateX(-50%);
  width: 120%; height: 70%; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(199,91,42,.28), transparent 62%);
}
.hero .wrap { position: relative; z-index: 2; padding-block: clamp(4rem, 11vw, 8rem); }
.hero-status {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ash-dim); border: 1px solid var(--ink-3); border-radius: 100px;
  padding: .4rem .85rem; margin-bottom: 1.75rem;
}
.hero-status .dot {
  width: .55rem; height: .55rem; border-radius: 50%; background: var(--ember-bright);
  box-shadow: 0 0 0 0 rgba(237,123,51,.7); animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(237,123,51,.6); }
  70%  { box-shadow: 0 0 0 9px rgba(237,123,51,0); }
  100% { box-shadow: 0 0 0 0 rgba(237,123,51,0); }
}
.hero h1 {
  font-size: clamp(2.5rem, 6.5vw, 4.75rem); font-weight: 900;
  max-width: 16ch; margin-bottom: 1.25rem;
}
.hero h1 .glow { color: var(--ember); }
.hero-sub { max-width: 52ch; font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--ash-dim); margin-bottom: 2rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; }

/* roofline divider that caps the dark hero */
.roofline { display: block; width: 100%; height: 46px; color: var(--ash); position: relative; z-index: 2; }

/* ============================================================
   Stat / risk strip
   ============================================================ */
.risk { background: var(--ash-2); border-bottom: 1px solid rgba(22,20,15,.08); }
.risk .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 3rem); padding-block: clamp(2.5rem, 6vw, 4rem); }
.stat .num { font-family: var(--display); font-weight: 900; font-size: clamp(2.25rem, 4vw, 3rem); color: var(--ember-deep); line-height: 1; }
.stat .lbl { color: var(--ash-mute); margin: .5rem 0 0; font-size: .98rem; }
@media (max-width: 680px) { .risk .wrap { grid-template-columns: 1fr; } }

/* ============================================================
   Generic content blocks
   ============================================================ */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.h-lg { font-size: clamp(1.9rem, 4vw, 3rem); margin-bottom: 1.25rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; margin-top: 2.5rem; }
.card {
  background: var(--ash-2); border: 1px solid rgba(22,20,15,.09);
  border-radius: var(--radius); padding: 1.75rem; position: relative;
  transition: transform .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); border-color: rgba(168,67,28,.45); }
.card .ico {
  width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(199,91,42,.12); color: var(--ember-deep); margin-bottom: 1rem;
}
.card .ico svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.card p { color: var(--ash-mute); margin: 0; font-size: .98rem; }

/* numbered approach */
.steps { counter-reset: step; display: grid; gap: 1.1rem; margin-top: 2.5rem; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: start; padding: 1.25rem 0; border-top: 1px solid rgba(22,20,15,.12); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--mono); font-size: .85rem; color: var(--ember-deep);
  border: 1px solid rgba(168,67,28,.4); border-radius: 50%;
  width: 2.6rem; height: 2.6rem; display: grid; place-items: center;
}
.step h3 { font-size: 1.15rem; margin-bottom: .35rem; }
.step p { margin: 0; color: var(--ash-mute); }

/* dark partner section */
.partners { background: var(--ink); color: var(--ash); }
.partners .eyebrow { color: var(--ember-bright); }
.partners .eyebrow::before { background: var(--ember-bright); }
.partners .section-lead { color: var(--ash-dim); }
.partner-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 2.5rem; }
@media (max-width: 680px) { .partner-grid { grid-template-columns: 1fr; } }
.partner {
  border: 1px solid var(--ink-3); border-radius: var(--radius);
  padding: 1.75rem; background: var(--ink-2);
}
.partner h3 { color: var(--ash); font-size: 1.25rem; margin-bottom: .5rem; }
.partner p { color: var(--ash-dim); margin: 0; }
.partner .tag {
  display: inline-block; font-family: var(--mono); font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ember-bright); margin-bottom: .9rem;
}

/* roadmap / under development */
.dev-banner {
  background: rgba(199,91,42,.1); border: 1px solid rgba(199,91,42,.3);
  border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.25rem);
  display: flex; gap: 1.25rem; align-items: flex-start;
}
.dev-banner svg { width: 34px; height: 34px; color: var(--ember-deep); flex: none; margin-top: 2px; }
.dev-banner h3 { font-size: 1.3rem; margin-bottom: .4rem; }
.dev-banner p { margin: 0; color: var(--ash-mute); }

/* ============================================================
   Newsletter
   ============================================================ */
.newsletter { background: var(--ash-2); }
.newsletter .panel {
  background: var(--ink); color: var(--ash); border-radius: 12px;
  padding: clamp(2rem, 5vw, 3.5rem); box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.newsletter .panel::before {
  content: ""; position: absolute; right: -40px; top: -40px; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(199,91,42,.35), transparent 65%); pointer-events: none;
}
.newsletter h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); max-width: 16ch; margin-bottom: .75rem; position: relative; }
.newsletter .panel p { color: var(--ash-dim); max-width: 48ch; position: relative; }
.subscribe-form { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.75rem; position: relative; }
.field { flex: 1 1 260px; display: flex; flex-direction: column; gap: .4rem; }
.field label { font-size: .85rem; color: var(--ash-dim); font-weight: 500; }
.field input {
  font-family: var(--body); font-size: 1rem; color: var(--ash);
  background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: var(--radius);
  padding: .85rem 1rem;
}
.field input::placeholder { color: #7c7468; }
.field input:focus-visible { border-color: var(--ember); outline-offset: 1px; }
.subscribe-form .btn-primary { align-self: flex-end; min-height: 3.05rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; } /* honeypot */
.form-note { font-size: .82rem; color: var(--ash-dim); margin: 1rem 0 0; position: relative; }
.form-msg { margin-top: 1rem; font-weight: 500; position: relative; min-height: 1.4em; }
.form-msg.ok { color: #7fd1a0; }
.form-msg.err { color: var(--ember-bright); }
@media (max-width: 560px) { .subscribe-form .btn-primary { width: 100%; align-self: stretch; } }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--ink); color: var(--ash-dim); padding-block: 3.5rem 2rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2.5rem; }
@media (max-width: 720px) { .site-footer .cols { grid-template-columns: 1fr; gap: 1.75rem; } }
.site-footer .brand { margin-bottom: 1rem; }
.site-footer p { color: var(--ash-dim); font-size: .92rem; max-width: 38ch; }
.site-footer h4 { font-family: var(--body); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ash); margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.site-footer a { color: var(--ash-dim); text-decoration: none; font-size: .95rem; }
.site-footer a:hover, .site-footer button.linklike:hover { color: var(--ember-bright); }
button.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--ash-dim); cursor: pointer; font-size: .95rem; }
.footer-base {
  border-top: 1px solid var(--ink-3); margin-top: 2.5rem; padding-top: 1.5rem;
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between; font-size: .85rem;
}

/* ============================================================
   Cookie consent
   ============================================================ */
.cookie {
  position: fixed; inset: auto 1rem 1rem 1rem; z-index: 200;
  max-width: 460px; margin-inline: auto;
  background: var(--ink-2); color: var(--ash); border: 1px solid var(--ink-3);
  border-radius: 10px; padding: 1.4rem 1.4rem 1.25rem; box-shadow: var(--shadow);
  transform: translateY(150%); transition: transform .3s ease;
}
.cookie[data-show="true"] { transform: translateY(0); }
.cookie h2 { font-size: 1.1rem; margin-bottom: .5rem; }
.cookie p { font-size: .9rem; color: var(--ash-dim); margin-bottom: 1rem; }
.cookie p a { color: var(--ember-bright); }
.cookie .row { display: flex; flex-wrap: wrap; gap: .6rem; }
.cookie .btn { padding: .65rem 1.1rem; font-size: .92rem; }
.cookie .btn-primary { color: #fff; }
.cookie .btn-primary:hover { color: var(--ink); }

/* small print page (privacy / accessibility) */
.doc { max-width: 760px; }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: .5rem; }
.doc h2 { font-size: 1.4rem; margin: 2.25rem 0 .75rem; }
.doc .meta { font-family: var(--mono); font-size: .8rem; color: var(--ash-mute); margin-bottom: 2rem; }
.doc ul { padding-left: 1.25rem; }
.doc li { margin-bottom: .5rem; }
.back { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; text-decoration: none; margin-bottom: 2rem; }
