/* ═══════════════════════════════════════════════════════════
   TRIAGI — Design Tokens + Base
   These map 1:1 to a Tailwind config in production.
   See HANDOFF.md for the migration table.
   ═══════════════════════════════════════════════════════════ */

@font-face {
  font-family: "Agrandir";
  src: url("../fonts/pp-agrandir-variable.woff2?v=t003") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2?v=t003") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Color — neutral */
  --bg:        #fafaf9;
  --bg-warm:   #f5f4f1;
  --bg-dark:   #0a0a0b;
  --ink:       #0a0a0b;
  --ink-2:     #5a5a60;
  --ink-3:     #9a9aa3;
  --line:      rgba(10, 10, 11, 0.08);
  --line-2:    rgba(10, 10, 11, 0.14);
  --line-dark: rgba(255, 255, 255, 0.10);
  --line-dark-2: rgba(255, 255, 255, 0.18);

  /* Color — accent (used sparingly) */
  --accent:        #2563ff;     /* triagi blue */
  --accent-soft:   #3b82f622;
  --green:         #34c759;
  --green-soft:    #34c75922;
  --amber:         #ff9500;
  --rose:          #d2526b;

  /* Type */
  --font-display: "Agrandir", "Inter", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, sans-serif;
  --font-mono:    ui-monospace, "SF Mono", Menlo, monospace;

  /* Radius */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* Shadow */
  --sh-sm:   0 1px 2px rgba(0,0,0,0.04), 0 1px 1px rgba(0,0,0,0.03);
  --sh-md:   0 8px 24px -8px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.04);
  --sh-lg:   0 30px 60px -20px rgba(0,0,0,0.18), 0 8px 24px -8px rgba(0,0,0,0.08);
  --sh-glow: 0 30px 80px -20px rgba(37, 99, 255, 0.35);

  /* Layout */
  --container: 1240px;
  --container-narrow: 980px;

  /* Easing (matches motion-v defaults — handoff 1:1) */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.2, .8, .2, 1.2);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* clip (não hidden): hidden cria scroll container no body e MATA position:sticky
     dos descendentes (barra do deck). clip clipa sem criar scrollport. */
  overflow-x: hidden;
  overflow-x: clip;
  font-feature-settings: "ss01", "cv11";
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; padding: 0; }

/* ─── Typography scale ─────────────────────────────────── */
.t-eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.t-display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.95;
  margin: 0;
}
.t-display em { font-style: normal; color: var(--ink-3); }
.t-h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 4.6vw, 64px);
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin: 0;
}
.t-h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 2.8vw, 36px);
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0;
}
.t-h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}
.t-body {
  font-size: clamp(16px, 1.2vw, 19px);
  line-height: 1.55;
  color: var(--ink-2);
  letter-spacing: -0.005em;
}
.t-body-lg {
  font-size: clamp(16px, 1.15vw, 19px);
  line-height: 1.5;
  color: var(--ink-2);
  letter-spacing: -0.005em;
  max-width: 36em;
}
.t-small { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.t-tnum  { font-feature-settings: "tnum"; }

/* ─── Container ─────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container.narrow { max-width: var(--container-narrow); }
@media (min-width: 768px) { .container { padding: 0 48px; } }

.section {
  padding: clamp(80px, 12vw, 160px) 0;
}
.section.dense { padding: clamp(64px, 9vw, 120px) 0; }
.section.dark {
  background: var(--bg-dark);
  color: white;
}
.section.dark .t-body,
.section.dark .t-body-lg { color: rgba(255,255,255,0.65); }

/* ─── Section head ──────────────────────────────────────── */
.section-head {
  display: grid;
  gap: 20px;
  margin-bottom: clamp(48px, 6vw, 80px);
  max-width: 920px;
}
.section-head .t-h2 { max-width: 16ch; }

/* ─── Grids ─────────────────────────────────────────────── */
.grid-2 { display: grid; gap: 32px; }
.grid-3 { display: grid; gap: 24px; }
@media (min-width: 800px) {
  .grid-2 { grid-template-columns: 1fr 1fr; gap: 48px; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 24px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: white;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: background 200ms var(--ease-out), transform 120ms;
  position: relative;
  isolation: isolate;
}
.btn:hover { background: #1c1c20; }
.btn:active { transform: translateY(1px); }
.btn .ph { font-size: 16px; transition: transform 240ms var(--ease-out); }
.btn:hover .ph { transform: translateX(3px); }

.btn.invert { background: white; color: var(--ink); }
.btn.invert:hover { background: #ececea; }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-2);
}
.btn.ghost:hover { background: rgba(10,10,11,0.04); }

.btn.sm { height: 38px; padding: 0 16px; font-size: 13px; }

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.005em;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: opacity 180ms;
}
.btn-link:hover { opacity: 0.55; }

/* ─── Reduced motion ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
