/* ============================================================================
   I_DEAL · DESIGN SYSTEM — BASE
   Reset, fundação tipográfica, grain, aurora ambiente, grafismo de medição.
   Depende de tokens.css.
   ============================================================================ */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg-0);
  color: var(--text-body);
  font-family: var(--f-body);
  font-weight: 400;
  line-height: var(--lh-body);
  font-size: var(--t-body-md);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background var(--dur-base) var(--ease-soft), color var(--dur-base) var(--ease-soft);
}

::selection { background: rgba(242,162,61,.28); color: var(--text-strong); }

/* ---- GRAIN global — assinatura tátil (BG §10.3) ------------------------- */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
  background-image: var(--grain-svg);
}

/* ---- scrollbar ---------------------------------------------------------- */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--glass-br); border-radius: var(--r-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ============================================================================
   TIPOGRAFIA — fundação (BG §7)
   ============================================================================ */
.display, h1.display {
  font-family: var(--f-display); font-weight: 300;
  text-transform: uppercase; letter-spacing: var(--tr-caps);
  font-size: var(--t-display); line-height: .94; color: var(--text-strong);
}
.sec-title {
  font-family: var(--f-display); font-weight: 300;
  text-transform: uppercase; letter-spacing: var(--tr-caps);
  font-size: var(--t-h1); line-height: var(--lh-tight);
  color: var(--text-strong); margin-bottom: var(--sp-5);
}
.sec-title .hl { color: var(--accent); font-weight: 400; }
.sec-lead {
  font-size: var(--t-body-lg); font-weight: 300;
  max-width: 62ch; color: var(--text-body); margin-bottom: var(--sp-12);
}
h3, .h3 {
  font-family: var(--f-display); font-weight: 500;
  text-transform: uppercase; letter-spacing: .04em;
  font-size: var(--t-h3); color: var(--text-strong);
}
.serif-italic {
  font-family: var(--f-display); font-style: italic; font-weight: 400;
  text-transform: none; letter-spacing: 0; color: var(--text-strong);
  line-height: var(--lh-snug);
}
.mono { font-family: var(--f-mono); }
code, .code { font-family: var(--f-mono); font-size: 12.5px; }

/* ---- eyebrow — label mono com régua de medição (BG §10.5) --------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-3);
  font-family: var(--f-mono); font-size: 13px; font-weight: 500;
  letter-spacing: var(--tr-label); text-transform: uppercase;
  color: var(--accent); margin-bottom: var(--sp-5);
}
.eyebrow::before {
  content: ""; width: 46px; height: 9px; flex-shrink: 0;
  background:
    repeating-linear-gradient(90deg, var(--tick) 0 1px, transparent 1px 7px)  bottom/100% 55%  no-repeat,
    repeating-linear-gradient(90deg, var(--tick) 0 1px, transparent 1px 28px) bottom/100% 100% no-repeat;
}
.coord { font-family: var(--f-mono); font-size: 12px; color: var(--text-mute); letter-spacing: .05em; }

/* ============================================================================
   GRAFISMO DE MEDIÇÃO — o lado "análise" (BG §10.5). Alvo/mira PROIBIDO.
   ============================================================================ */
.ruler {
  height: 14px; width: 100%; margin-top: var(--sp-2);
  background:
    repeating-linear-gradient(90deg, var(--tick) 0 1px, transparent 1px 9px)  bottom/100% 50%  no-repeat,
    repeating-linear-gradient(90deg, var(--tick) 0 1px, transparent 1px 45px) bottom/100% 100% no-repeat;
}
.dashline {
  height: 1px; width: 100%;
  background-image: linear-gradient(90deg, var(--line) 0 5px, transparent 5px 12px);
  background-size: 12px 1px;
}
.colorbar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; }
.colorbar i { flex: 1; }
/* anel: contínuo + pontilhado (lente/órbita) — nunca cruz */
.ring circle { fill: none; stroke: var(--accent); stroke-width: 1; }
.ring .dot { stroke-dasharray: 1.5 4; stroke-linecap: round; }

/* ============================================================================
   AURORA AMBIENTE — blobs com drift dessincronizado (BG §10.2)
   ============================================================================ */
.aurora-field { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora-blob {
  position: absolute; border-radius: var(--r-full);
  filter: blur(90px); opacity: .5;
  animation: drift 16s var(--ease-soft) infinite alternate;
}
.aurora-blob.b1 { width: 620px; height: 620px; top: -12%; left: -8%;
  background: var(--ideal-cobalt-500); opacity: .35; animation-duration: 18s; }
.aurora-blob.b2 { width: 520px; height: 520px; bottom: -14%; right: -6%;
  background: var(--ideal-red); opacity: .22; animation-duration: 24s; animation-delay: -6s; }
.aurora-blob.b3 { width: 460px; height: 460px; top: 42%; left: 34%;
  background: var(--ideal-amber); opacity: .20; animation-duration: 28s; animation-delay: -12s; }

/* grid sutil opcional de fundo */
.grid-overlay {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(var(--hair) 1px, transparent 1px),
    linear-gradient(90deg, var(--hair) 1px, transparent 1px);
  background-size: 104px 104px;
  opacity: .35;
  mask-image: radial-gradient(120% 100% at 50% 0%, #000 30%, transparent 80%);
}

/* ============================================================================
   LAYOUT
   ============================================================================ */
.wrap { max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-8); }
section.block { padding: var(--sp-24) 0; border-top: 1px solid var(--hair); position: relative; }
.stack > * + * { margin-top: var(--sp-4); }

.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
