/* ==========================================================
   Capi · base do site
   Ordem: reset, tokens, base, botões, topo, rodapé.
   Usado por todas as páginas; landing.css e legal.css vêm por cima.
   ========================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
img, svg, canvas { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; }

[hidden] { display: none !important; }

/* ---------- Tokens ---------- */
:root {
  /* Brand (site tokens) */
  --green-50: #f1fae6;
  --green-100: #dff3c8;
  --green-500: #58cc02;      /* --primary-green-hover */
  --green-600: #46a302;      /* --primary-green-dark */
  --green-700: #2f7a00;
  --green-900: #1e3a00;
  --orange-100: #ffe9d6;
  --orange-500: #ff8a2a;     /* --secondary-orange */
  --orange-700: #c75a0e;
  --orange-800: #9a4208;     /* small orange text on cream */
  --blue-50: #e8f6ff;
  --blue-500: #2bb0ff;       /* --accent-blue */
  --blue-700: #1c8ed6;
  --yellow-300: #ffe58a;
  --yellow-400: #ffd84d;     /* --accent-yellow */
  --purple-500: #a78bfa;     /* --accent-purple */
  --purple-700: #5b3bb8;
  --pink-500: #ff4b94;       /* --accent-pink */
  --red-500: #ff4b4b;
  --red-700: #c4161c;
  --red-50: #ffeaea;

  --ink: #3c3c3c;            /* --text-dark */
  --ink-soft: #6b6b6b;       /* darker than --text-medium for 4.5:1 */
  --line: #e5e5e5;           /* --bg-gray */
  --paper: #ffffff;
  --paper-2: #f7f7f7;        /* --bg-light */
  --night-900: #0b1636;

  --focus: #1c8ed6;

  /* Type */
  --font: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --fs-display: clamp(2.5rem, 1.55rem + 4.1vw, 5rem);
  --fs-h2: clamp(2rem, 1.45rem + 2.4vw, 3.25rem);
  --fs-h3: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --fs-lead: clamp(1.125rem, 1.02rem + 0.45vw, 1.375rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-kicker: 0.875rem;

  /* Space (one scale) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  --section-y: clamp(var(--s-8), 5vw + 2rem, var(--s-10));
  --gutter: clamp(var(--s-4), 3vw, var(--s-6));
  --max: 1200px;

  /* Shape */
  --r-sm: 12px; --r-md: 16px; --r-lg: 24px; --r-xl: 32px; --r-pill: 999px;
  --lip: 4px;
  --lip-lg: 6px;

  /* Motion (Iris valores.md) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --dur-press: 140ms;
  --dur-color: 150ms;
  --dur-reveal: 640ms;
  --dur-panel: 240ms;

  --nav-h: 72px;

  /* Scene backgrounds */
  --scene-sky: var(--blue-50);
  --scene-mint: var(--green-50);
  --scene-lilac: #f1ecff;
  --scene-sun: #fff4cc;
  --scene-night: var(--night-900);
  --scene-cream: #fff7ec;
  --stage-pad: max(var(--gutter), 5vw);
}

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + var(--s-4)); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { line-height: 1.08; font-weight: 900; letter-spacing: -0.02em; text-wrap: balance; }
p { text-wrap: pretty; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.kicker {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: var(--fs-kicker); font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--green-700);
}
.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--ink-soft); }

/* ---------- Skip link ---------- */
.skip {
  position: absolute; left: var(--s-4); top: -100px; z-index: 100;
  padding: var(--s-3) var(--s-4); border-radius: var(--r-sm);
  background: var(--paper); color: var(--ink); font-weight: 800;
}
.skip:focus { top: var(--s-4); }

/* ---------- Buttons: chunky, with a pressable lip ---------- */
.btn {
  --btn-bg: var(--paper);
  --btn-fg: var(--green-700);
  --btn-lip: var(--line);
  --btn-border: var(--line);
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 52px; padding: 0 var(--s-5);
  border-radius: var(--r-md);
  font-size: 1.1875rem; font-weight: 800; line-height: 1; text-decoration: none;
  color: var(--btn-fg);
  background: transparent;
  border: 2px solid var(--btn-border);
  user-select: none;
  touch-action: manipulation;
  transition-property: transform, background-color, color;
  transition-duration: var(--dur-press), var(--dur-color), var(--dur-color);
  transition-timing-function: var(--ease-out), ease, ease;
}
.btn::after { /* the lip: a pseudo-element, so the press only moves transforms */
  content: ''; position: absolute; inset: -2px; z-index: -2;
  border-radius: inherit; background: var(--btn-lip);
  transform: translateY(var(--lip));
  transition: transform var(--dur-press) var(--ease-out);
}
.btn::before { /* face of the button, above the lip */
  content: ''; position: absolute; inset: -2px; z-index: -1; border-radius: inherit;
  background: var(--btn-bg); border: 2px solid var(--btn-border);
  transition: background-color var(--dur-color) ease;
}
.btn:active { transform: translateY(var(--lip)); }
.btn:active::after { transform: translateY(0); }
.btn--primary { --btn-bg: var(--green-600); --btn-fg: #fff; --btn-lip: var(--green-700); --btn-border: var(--green-600); }
.btn--sun { --btn-bg: var(--yellow-400); --btn-fg: var(--ink); --btn-lip: #d9a400; --btn-border: var(--yellow-400); }
.btn--small { min-height: 44px; padding: 0 var(--s-4); font-size: 1rem; border-radius: var(--r-sm); white-space: nowrap; }
.btn--small:active { transform: translateY(3px); }
.btn--small::after { transform: translateY(3px); }
.btn__icon { width: 20px; height: 20px; flex: none; }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { --btn-bg: var(--green-500); --btn-fg: var(--green-900); }
  .btn:not(.btn--primary):not(.btn--sun):hover { --btn-bg: var(--paper-2); }
  .btn--sun:hover { --btn-bg: var(--yellow-300); }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .btn::after { transition-property: background-color, color; }
  .btn:active { transform: none; }
  .btn:active::after { transform: translateY(var(--lip)); }
}

/* ---------- Header (sits on the first band of the page, not sticky) ---------- */
.top {
  position: absolute; z-index: 20; inset: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  height: var(--nav-h); padding: 0 var(--stage-pad);
  padding-top: env(safe-area-inset-top);
}
.top__brand { display: inline-flex; align-items: center; gap: var(--s-2); text-decoration: none; font-weight: 900; font-size: 1.5rem; color: var(--ink); }
.top__brand img { width: 40px; height: 40px; border-radius: var(--r-sm); }
.top__actions { display: flex; align-items: center; gap: var(--s-2); }

/* ---------- Footer ---------- */
.foot { background: var(--night-900); color: #c9d6ff; padding: var(--s-7) 0 calc(var(--s-7) + env(safe-area-inset-bottom)); }
.foot__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-4); }
.foot nav { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); }
.foot a { display: inline-flex; align-items: center; min-height: 44px; color: #fff; font-weight: 800; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .foot a:hover { text-decoration: underline; } }
.foot a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
/* who owns the brand: company name and CNPJ, on every page */
.foot__legal { margin-top: var(--s-5); padding-top: var(--s-5); border-top: 2px solid rgb(255 255 255 / 0.2); }
.foot small { display: block; font-size: var(--fs-small); line-height: 1.5; font-variant-numeric: tabular-nums; }
