/* Layout: coluna de leitura larga + blocos de cor em faixa cheia; o "semáforo" de triagem é o elemento-assinatura. */
:root {
  --paper: #f2f5f3;
  --card: #ffffff;
  --ink: #14302a;
  --muted: #566a64;
  --line: #d5dfdb;
  --water: #1c6f80;
  --water-soft: #dcecef;
  --sun: #f0b032;
  --sun-ink: #2a2005;
  --red: #c2412a;
  --red-soft: #f8e1dc;
  --amber: #b77806;
  --amber-soft: #fbefd5;
  --green: #2f7d4a;
  --green-soft: #def0e3;

  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.7rem;
  --step-3: 2.3rem;
  --step-4: clamp(2.4rem, 6vw, 3.9rem);
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1a18; --card: #16231f; --ink: #e4eeea; --muted: #9db1aa; --line: #2a3a35;
    --water: #63b8c8; --water-soft: #173238; --sun: #f2c25e; --sun-ink: #241a02;
    --red: #ef7a62; --red-soft: #3a1c16; --amber: #e8b04a; --amber-soft: #352a12;
    --green: #6cc48a; --green-soft: #15301f; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1a18; --card: #16231f; --ink: #e4eeea; --muted: #9db1aa; --line: #2a3a35;
  --water: #63b8c8; --water-soft: #173238; --sun: #f2c25e; --sun-ink: #241a02;
  --red: #ef7a62; --red-soft: #3a1c16; --amber: #e8b04a; --amber-soft: #352a12;
  --green: #6cc48a; --green-soft: #15301f; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: var(--step-0); line-height: 1.6;
}
img, svg { max-width: 100%; }
img { height: auto; }
[hidden] { display: none !important; }
a { color: var(--water); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 6px;
}
h1, h2, h3 { font-family: var(--display); line-height: 1.12; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: var(--step-4); font-weight: 800; }
h2 { font-size: var(--step-3); font-weight: 750; }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0; }

.wrap {
  width: 100%; max-width: 1120px; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.narrow { max-width: 760px; }
.eyebrow {
  font-family: var(--mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--water); font-weight: 500;
}
.lead { font-size: var(--step-1); color: var(--muted); max-width: 38ch; }
.muted { color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 1rem; }

/* Cabeçalho */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); }
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.7rem; }
.brand { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 800; font-size: 1.15rem; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand small { display: block; font-family: var(--mono); font-weight: 500; font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.95rem; }
.nav a:hover { color: var(--water); }
@media (max-width: 640px) { .nav .hide-sm { display: none; } }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: 700 1rem/1 var(--body); padding: 0.95rem 1.35rem; border-radius: 999px;
  border: 2px solid transparent; cursor: pointer; text-decoration: none; transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-sun { background: var(--sun); color: var(--sun-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-small { padding: 0.6rem 1rem; font-size: 0.92rem; }

/* Seções */
.section { padding-block: clamp(2.75rem, 6vw, 4.5rem); }
.section-head { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1.6rem; max-width: 720px; }
.band-water { background: var(--water); color: #fff; }
.band-water .eyebrow { color: color-mix(in srgb, #fff 80%, var(--water)); }
.band-water a { color: #fff; }
.band-ink { background: var(--ink); color: var(--paper); }

/* Semáforo de triagem (assinatura) */
.triage { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 820px) { .triage { grid-template-columns: 1fr; } }
.lamp { border-radius: var(--radius); padding: 1.3rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: 0.7rem; border: 1px solid var(--line); background: var(--card); min-width: 0; }
.lamp header { display: flex; align-items: center; gap: 0.75rem; }
.lamp .dot { width: 1.35rem; height: 1.35rem; border-radius: 50%; flex: none; box-shadow: 0 0 0 5px var(--lamp-soft); background: var(--lamp); }
.lamp h3 { font-size: 1.15rem; }
.lamp .when { font-family: var(--mono); font-size: 0.8rem; color: var(--lamp); font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; }
.lamp ul { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.35rem; }
.lamp.red { --lamp: var(--red); --lamp-soft: var(--red-soft); border-top: 6px solid var(--red); }
.lamp.amber { --lamp: var(--amber); --lamp-soft: var(--amber-soft); border-top: 6px solid var(--amber); }
.lamp.green { --lamp: var(--green); --lamp-soft: var(--green-soft); border-top: 6px solid var(--green); }

.foot { border-top: 1px solid var(--line); padding-block: 2.5rem; font-size: 0.92rem; color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; justify-content: space-between; }
.foot strong { color: var(--ink); }
