:root {
  --paper: #eef1f0;
  --paper-raised: #f7f9f8;
  --line: #d7dedb;
  --line-strong: #b9c3bf;
  --ink: #14201d;
  --ink-soft: #55635f;
  --ink-faint: #8b9895;
  --accent: #b5432a;
  --accent-soft: #f3e1da;
  --authority: #1f4743;
  --authority-soft: #dde7e5;
  --ok: #2f6d4f;
  --ok-soft: #dbe9e0;

  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Archivo", -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* ---------- topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 64px);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.mark {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.mark__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.topnav {
  display: flex;
  gap: clamp(16px, 3vw, 32px);
}

.topnav a {
  text-decoration: none;
  font-size: 0.86rem;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.topnav a:hover,
.topnav a:focus-visible {
  color: var(--ink);
  border-color: var(--accent);
}

/* ---------- shared ---------- */

main {
  position: relative;
  z-index: 2;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.15;
  margin: 0 0 clamp(36px, 6vw, 56px);
  max-width: 20ch;
  text-wrap: balance;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 3px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn--primary {
  background: var(--ink);
  color: var(--paper-raised);
}
.btn--primary:hover { background: var(--authority); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--ink); }

.btn--lg { padding: 15px 26px; font-size: 0.98rem; }

/* ---------- hero cover (abertura escura) ---------- */

.hero-cover {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: #0a0a0a;
  color: #f4f4f2;
  overflow: hidden;
}

.hero-cover__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(20px, 4vw, 32px);
  z-index: 3;
}

.hero-cover__menu { position: relative; }

.hero-cover__menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.hero-cover__menu-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: #f4f4f2;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hero-cover__menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hero-cover__menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hero-cover__menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.hero-cover__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 180px;
  background: #141412;
  border: 1px solid #2a2a26;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 20px 40px -12px rgba(0,0,0,.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.hero-cover__dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.hero-cover__dropdown a {
  display: block;
  padding: 9px 12px;
  border-radius: 5px;
  font-family: var(--font-body);
  font-size: 0.94rem;
  font-weight: 600;
  color: #f4f4f2;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.hero-cover__dropdown a:hover { background: #1f1f1b; color: var(--cover-accent, #c3e41d); }

.hero-cover__sig {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.6rem;
  color: #f4f4f2;
  opacity: 0.85;
}

.hero-cover__center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}

.hero-cover__namewrap {
  position: relative;
  text-align: center;
}

.hero-cover__name {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(2.6rem, 12vw, 7.5rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--cover-accent, #c3e41d);
  white-space: nowrap;
}

.hero-cover__badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(58px, 9vw, 96px);
  height: clamp(58px, 9vw, 96px);
  border-radius: 50%;
  overflow: hidden;
  background: #f4f4f2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #0a0a0a;
  box-shadow: 0 16px 32px -10px rgba(0,0,0,.6), 0 0 0 2px color-mix(in srgb, var(--cover-accent, #c3e41d) 60%, transparent);
}

.hero-cover__badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.hero-cover__tagline {
  text-align: center;
  padding: 0 20px clamp(56px, 9vw, 92px);
  font-family: var(--font-body);
  font-size: clamp(0.94rem, 1.6vw, 1.1rem);
  color: #9a9a94;
}

.hero-cover__scroll {
  position: absolute;
  bottom: clamp(18px, 3vw, 28px);
  left: 50%;
  transform: translateX(-50%);
  color: #9a9a94;
  transition: color 0.2s ease;
  animation: hero-cover-bounce 2.2s ease-in-out infinite;
}

.hero-cover__scroll:hover { color: #f4f4f2; }

@keyframes hero-cover-bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* animação de blur-reveal (letras/palavras) — aplicada via JS em main.js */
.blur-reveal .char,
.blur-reveal .word {
  display: inline-block;
  filter: blur(10px);
  opacity: 0;
  transform: translateY(-18px);
  transition: filter 0.5s ease-out, opacity 0.5s ease-out, transform 0.5s ease-out;
}

.blur-reveal.is-visible .char,
.blur-reveal.is-visible .word {
  filter: blur(0);
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .hero-cover__scroll { animation: none; }
}

@media (max-width: 640px) {
  .hero-cover__name { font-size: clamp(2.2rem, 15vw, 4rem); }
}

/* ---------- method ---------- */

.method {
  padding: clamp(48px, 8vw, 88px) clamp(20px, 5vw, 64px);
  border-top: 1px solid var(--line);
}

.method__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(28px, 4vw, 40px);
  max-width: 760px;
}

.method__step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(18px, 3vw, 28px);
  align-items: start;
}

.method__num {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--authority);
  background: var(--authority-soft);
  padding: 5px 10px;
  border-radius: 3px;
  font-variant-numeric: tabular-nums;
}

.method__step h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.32rem;
  margin: 0 0 8px;
}

.method__step p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 58ch;
}

/* ---------- cases ---------- */

.cases {
  padding: clamp(48px, 8vw, 88px) clamp(20px, 5vw, 64px);
  border-top: 1px solid var(--line);
  display: grid;
  gap: clamp(28px, 4vw, 40px);
}

.case {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(24px, 4vw, 38px);
  position: relative;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.case.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.case::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  bottom: 22px;
  width: 3px;
  background: var(--line-strong);
}

.case__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--line);
}

.case__id {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  margin: 0 0 6px;
}

.case__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  margin: 0 0 4px;
}

.case__segment {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.stamp {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.stamp--ok {
  color: var(--ok);
  background: var(--ok-soft);
  border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent);
}

.stamp--pending {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

.stamp--neutral {
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--ink-soft) 12%, transparent);
  border: 1px solid var(--line-strong);
}

.case__chart {
  display: grid;
  gap: 18px;
  margin: 0 0 26px;
}

.case__chart dt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--authority);
  margin: 0 0 5px;
}

.case__chart dd {
  margin: 0;
  color: var(--ink-soft);
  max-width: 68ch;
}

.case__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--ink-faint);
  padding-bottom: 2px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.case__link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- intake ---------- */

.intake {
  padding: clamp(56px, 9vw, 100px) clamp(20px, 5vw, 64px);
  border-top: 1px solid var(--line);
  max-width: 760px;
}

.intake__body {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 56ch;
  margin: 0 0 32px;
}

.intake__row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

.footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 28px clamp(20px, 5vw, 64px) 40px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-faint);
  position: relative;
  z-index: 2;
}

/* ---------- dark mode ---------- */

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12100e;
    --paper-raised: #1a1815;
    --line: #322e29;
    --line-strong: #453f38;
    --ink: #f2ede4;
    --ink-soft: #b5aea1;
    --ink-faint: #7d766a;
    --accent: #e0714f;
    --accent-soft: #2e1e17;
    --authority: #6fb8ac;
    --authority-soft: #16302b;
    --ok: #7ac79c;
    --ok-soft: #142822;
  }

  .grain { opacity: 0.05; mix-blend-mode: overlay; }
}

/* ---------- responsive ---------- */

@media (max-width: 640px) {
  .topnav { gap: 14px; }
  .method__step { grid-template-columns: 1fr; }
  .case__head { flex-direction: column; }
}
