/* ==========================================================================
   Centelha Serena — single page site
   Dark by default. No JavaScript, no external assets.
   ========================================================================== */

:root {
  --bg:            #0a0b0d;
  --bg-alt:        #0e1013;
  --surface:       #121418;
  --surface-hi:    #16191e;
  --line:          rgba(255, 255, 255, 0.09);
  --line-soft:     rgba(255, 255, 255, 0.055);

  --text:          #e8eaed;
  --text-dim:      #a2a8b0;
  --text-faint:    #767c85;

  --accent:        #d9a066;   /* ember — "centelha". used sparingly */
  --accent-soft:   rgba(217, 160, 102, 0.13);

  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino,
           "Book Antiqua", Georgia, serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
           Helvetica, Arial, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1090px;
  --pad: clamp(1.25rem, 5vw, 2.5rem);
  --radius: 3px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

a { color: inherit; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--text);
  padding: 0.75rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0; }

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

/* ── Typography ──────────────────────────────────────────────────────────── */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.011em;
  margin: 0;
}

h1 {
  font-size: clamp(2.2rem, 5.4vw, 3.6rem);
  line-height: 1.14;
  letter-spacing: -0.022em;
  margin-bottom: 1.6rem;
}

h1 .quiet { color: var(--text-dim); }

h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.15rem);
  line-height: 1.24;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.16rem;
  line-height: 1.4;
  margin-bottom: 0.6rem;
}

p { margin: 0 0 1rem; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.688rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 1.1rem;
}

.lede {
  font-size: 1.09rem;
  line-height: 1.72;
  color: var(--text-dim);
  max-width: 62ch;
  margin-bottom: 2.4rem;
}

.section-sub {
  color: var(--text-dim);
  max-width: 64ch;
  margin-bottom: 0;
}

/* ── Header ──────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 11, 13, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 19px;
  height: 19px;
  flex: none;
  fill: var(--accent);
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.02rem;
  letter-spacing: 0.012em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.9rem;
  font-size: 0.875rem;
}

.site-nav a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.18s ease;
}

.site-nav a:hover { color: var(--text); }

.nav-cta {
  color: var(--text) !important;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.4rem 0.9rem;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.nav-cta:hover {
  border-color: rgba(217, 160, 102, 0.5);
  background: var(--accent-soft);
}

@media (max-width: 640px) {
  .site-nav { gap: 1.1rem; font-size: 0.82rem; }
  .site-nav a:not(.nav-cta) { display: none; }
}

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding: clamp(4.5rem, 12vw, 8.5rem) 0 clamp(3.5rem, 8vw, 6rem);
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40% 0 auto -10%;
  height: 80%;
  background: radial-gradient(
    50% 60% at 30% 50%,
    rgba(217, 160, 102, 0.07) 0%,
    rgba(217, 160, 102, 0) 70%
  );
  pointer-events: none;
}

.hero .wrap { position: relative; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3.4rem;
}

.btn {
  display: inline-block;
  font-size: 0.9rem;
  letter-spacing: 0.005em;
  text-decoration: none;
  padding: 0.72rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn-primary {
  background: var(--text);
  color: #0a0b0d;
  font-weight: 500;
}
.btn-primary:hover { background: #fff; }

.btn-ghost {
  border-color: var(--line);
  color: var(--text-dim);
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.22); color: var(--text); }

.tagstrip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  list-style: none;
  margin: 0;
  padding: 1.4rem 0 0;
  border-top: 1px solid var(--line-soft);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--text-faint);
}

/* ── Sections ────────────────────────────────────────────────────────────── */

.section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  border-bottom: 1px solid var(--line-soft);
}

.section-alt { background: var(--bg-alt); }

.section-head { margin-bottom: clamp(2.2rem, 5vw, 3.2rem); }

/* ── Cards ───────────────────────────────────────────────────────────────── */

.grid { display: grid; gap: 1px; }

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}

@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.card {
  position: relative;
  background: var(--surface);
  padding: clamp(1.6rem, 3.5vw, 2.3rem);
  transition: background-color 0.2s ease;
}

.card:hover { background: var(--surface-hi); }

.card .num {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  opacity: 0.75;
  margin-bottom: 1.15rem;
}

.card p {
  color: var(--text-dim);
  font-size: 0.945rem;
  margin: 0;
}

/* ── Steps ───────────────────────────────────────────────────────────────── */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: none;
  border-top: 1px solid var(--line-soft);
}

.steps li {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 0 1.4rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.step-n {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  padding-top: 0.4rem;
  letter-spacing: 0.08em;
}

.steps h3 { margin-bottom: 0.4rem; }

.steps p {
  color: var(--text-dim);
  font-size: 0.945rem;
  max-width: 66ch;
  margin: 0;
}

@media (max-width: 560px) {
  .steps li { grid-template-columns: 2.2rem 1fr; gap: 0 0.9rem; }
}

/* ── Split (AI section) ──────────────────────────────────────────────────── */

.split {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
}

.cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem clamp(1.5rem, 4vw, 3rem);
  margin-top: 2.6rem;
}

@media (max-width: 700px) {
  .cols { grid-template-columns: 1fr; }
}

.col-head {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line-soft);
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.93rem;
  color: var(--text-dim);
}

.list li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.85rem;
  line-height: 1.6;
}

.list li::before {
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--mono);
  font-size: 0.85rem;
}

.list-yes li::before { content: "+"; color: var(--accent); opacity: 0.8; }
.list-no  li::before { content: "−"; color: var(--text-faint); }

.note {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-left: 2px solid rgba(217, 160, 102, 0.4);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
}

.note p:last-child {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-dim);
}

/* ── Diagram ─────────────────────────────────────────────────────────────── */

.diagram {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}

@media (max-width: 720px) {
  .diagram { grid-template-columns: 1fr; }
}

.diagram-panel {
  margin: 0;
  background: var(--surface);
  padding: clamp(1.3rem, 3vw, 2rem);
}

.diagram-panel svg {
  display: block;
  width: 100%;
  height: auto;
}

.diagram svg .edges path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 1;
}

.diagram svg .edges-clean path {
  stroke: rgba(217, 160, 102, 0.55);
  stroke-width: 1.25;
}

.diagram svg .nodes circle {
  fill: var(--bg-alt);
  stroke: rgba(255, 255, 255, 0.34);
  stroke-width: 1.25;
}

.diagram svg .nodes-clean circle {
  fill: var(--bg-alt);
  stroke: var(--accent);
  stroke-width: 1.5;
}

.diagram figcaption {
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.85rem;
  color: var(--text-faint);
  line-height: 1.55;
}

.diagram figcaption strong {
  display: block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}

.diagram-foot {
  margin: 1.3rem 0 0;
  font-size: 0.83rem;
  color: var(--text-faint);
  max-width: 60ch;
}

/* ── Fit ─────────────────────────────────────────────────────────────────── */

.grid-2.tight { background: transparent; border: none; gap: 1px; }

.fit {
  background: var(--surface);
  margin: 0;
  padding: 1.4rem 1.5rem;
  font-size: 0.945rem;
  color: var(--text-dim);
  border-left: 1px solid rgba(217, 160, 102, 0.28);
}

/* ── Contact ─────────────────────────────────────────────────────────────── */

.contact { text-align: center; }

.contact .section-sub {
  margin-inline: auto;
  margin-bottom: 2.4rem;
}

.mailto {
  margin: 0 0 0.9rem;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 4vw, 2rem);
}

.mailto a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(217, 160, 102, 0.3);
  padding-bottom: 0.15rem;
  transition: border-color 0.18s ease;
  overflow-wrap: anywhere;
}

.mailto a:hover { border-bottom-color: var(--accent); }

.fineprint {
  margin: 0;
  font-size: 0.83rem;
  color: var(--text-faint);
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

.site-footer {
  padding: 2.6rem 0;
  background: var(--bg-alt);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem 2rem;
  align-items: flex-end;
  justify-content: space-between;
}

.footer-name {
  font-family: var(--serif);
  font-size: 1rem;
  margin: 0 0 0.35rem;
}

.footer-meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-faint);
}

.footer-meta a {
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.footer-meta a:hover { color: var(--text); }

/* Statutory mentions (CSC art. 171.º) — present, deliberately quiet. */
.footer-legal {
  margin: 0;
  max-width: 46ch;
  font-size: 0.74rem;
  line-height: 1.65;
  color: var(--text-faint);
  opacity: 0.8;
}
