/* ============================================================
   GloboMondo — Design tokens + componentes base
   Geist Sans / Geist Mono · azul→teal · radius 10px · claro/oscuro
   ============================================================ */

:root {
  --background: #ffffff;
  --foreground: #232323;
  --card: #ffffff;
  --card-foreground: #232323;
  --popover: #ffffff;

  --primary: oklch(0.5 0.16 262);
  --primary-strong: oklch(0.44 0.17 262);
  --primary-foreground: #fafafa;

  --teal: oklch(0.71 0.13 185);
  --teal-strong: oklch(0.63 0.13 185);

  --muted: #f7f7f7;
  --muted-2: #f1f2f4;
  --muted-foreground: #74747a;
  --subtle-foreground: #54545a;

  --border: #e7e7ea;
  --border-strong: #dadadf;
  --input: #e5e5e5;
  --ring: oklch(0.5 0.16 262);
  --destructive: #e5484d;
  --success: oklch(0.62 0.14 152);
  --warning: oklch(0.74 0.14 75);

  --radius: 10px;
  --radius-sm: 7px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-2xl: 28px;
  --radius-pill: 999px;

  --grad: linear-gradient(135deg, oklch(0.5 0.16 262), oklch(0.71 0.13 185));
  --grad-soft: linear-gradient(135deg, oklch(0.5 0.16 262 / 0.12), oklch(0.71 0.13 185 / 0.12));

  --shadow-xs: 0 1px 2px oklch(0.3 0.04 262 / 0.06);
  --shadow-sm: 0 1px 2px oklch(0.3 0.04 262 / 0.05), 0 2px 6px oklch(0.3 0.04 262 / 0.05);
  --shadow-md: 0 4px 10px oklch(0.3 0.04 262 / 0.06), 0 12px 26px oklch(0.3 0.04 262 / 0.08);
  --shadow-lg: 0 10px 24px oklch(0.3 0.04 262 / 0.08), 0 28px 60px oklch(0.3 0.04 262 / 0.12);
  --shadow-glow: 0 20px 70px oklch(0.5 0.16 262 / 0.18);

  --maxw: 1200px;
  --header-h: 68px;

  --ff-sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ff-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

[data-theme="dark"] {
  --background: #1e1e20;
  --foreground: #fafafa;
  --card: #2a2a2d;
  --card-foreground: #fafafa;
  --popover: #2a2a2d;

  --primary: oklch(0.66 0.15 258);
  --primary-strong: oklch(0.72 0.15 258);
  --primary-foreground: #0e1116;

  --teal: oklch(0.74 0.13 185);
  --teal-strong: oklch(0.8 0.13 185);

  --muted: #2a2a2d;
  --muted-2: #303034;
  --muted-foreground: #a3a3ab;
  --subtle-foreground: #c4c4cc;

  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.16);
  --input: rgba(255, 255, 255, 0.14);
  --ring: oklch(0.66 0.15 258);

  --grad-soft: linear-gradient(135deg, oklch(0.66 0.15 258 / 0.2), oklch(0.74 0.13 185 / 0.18));

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.4), 0 12px 26px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.5), 0 28px 60px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 20px 80px oklch(0.66 0.15 258 / 0.28);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: var(--ff-sans);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv01", "ss01";
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font-family: inherit; color: inherit; }
ul { list-style: none; }

::selection { background: oklch(0.71 0.13 185 / 0.3); }

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--ring);
  border-radius: var(--radius-sm);
}

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; position: relative; }
.section-sm { padding: 64px 0; }
@media (max-width: 768px) { .section { padding: 64px 0; } }

.eyebrow {
  font-family: var(--ff-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.h-display { font-size: clamp(40px, 6vw, 66px); line-height: 1.02; font-weight: 700; letter-spacing: -0.03em; text-wrap: balance; }
.h1 { font-size: clamp(32px, 4.4vw, 48px); line-height: 1.06; font-weight: 700; letter-spacing: -0.028em; text-wrap: balance; }
.h2 { font-size: clamp(26px, 3vw, 34px); line-height: 1.12; font-weight: 650; letter-spacing: -0.022em; text-wrap: balance; }
.h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.012em; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--subtle-foreground); line-height: 1.55; text-wrap: pretty; }
.muted { color: var(--muted-foreground); }
.mono { font-family: var(--ff-mono); }

.section-head { max-width: 640px; }
.section-head .h2 { margin-top: 14px; }
.section-head .lead { margin-top: 14px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 550; font-size: 15px; letter-spacing: -0.01em;
  border-radius: var(--radius);
  padding: 0 18px; height: 44px; min-height: 44px;
  white-space: nowrap;
  transition: transform 0.18s cubic-bezier(0.2,0.7,0.3,1), box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(0) scale(0.99); }

.btn-primary { background: var(--primary); color: var(--primary-foreground); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-grad { background: var(--grad); color: #fff; box-shadow: 0 6px 18px oklch(0.5 0.16 262 / 0.28); }
.btn-grad:hover { transform: translateY(-2px); box-shadow: 0 12px 30px oklch(0.5 0.16 262 / 0.34); }

.btn-outline { background: var(--card); border: 1px solid var(--border-strong); color: var(--foreground); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.btn-ghost { background: transparent; color: var(--foreground); }
.btn-ghost:hover { background: var(--muted); }

.btn-lg { height: 52px; min-height: 52px; padding: 0 26px; font-size: 16px; border-radius: var(--radius-lg); }
.btn-sm { height: 38px; min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn-block { width: 100%; }

/* ---------- badges / chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 550; line-height: 1;
  padding: 5px 11px; border-radius: var(--radius-pill);
  background: var(--muted); color: var(--subtle-foreground);
  border: 1px solid var(--border);
}
.badge svg { width: 13px; height: 13px; }
.badge-primary { background: oklch(0.5 0.16 262 / 0.1); color: var(--primary); border-color: transparent; }
.badge-teal { background: oklch(0.71 0.13 185 / 0.14); color: var(--teal-strong); border-color: transparent; }
.badge-success { background: oklch(0.62 0.14 152 / 0.14); color: var(--success); border-color: transparent; }
.badge-warn { background: oklch(0.74 0.14 75 / 0.16); color: var(--warning); border-color: transparent; }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: var(--radius-pill);
  background: var(--card); border: 1px solid var(--border);
  font-size: 14px; font-weight: 500; color: var(--subtle-foreground);
  transition: all 0.18s ease; cursor: pointer;
}
.chip svg { width: 15px; height: 15px; }
.chip:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow-xs); }
.chip.is-active { background: var(--primary); color: var(--primary-foreground); border-color: transparent; }

/* ---------- pill badge w/ gradient dot ---------- */
.pill-badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 15px 7px 11px; border-radius: var(--radius-pill);
  background: var(--card); border: 1px solid var(--border);
  font-size: 13.5px; font-weight: 500; color: var(--subtle-foreground);
  box-shadow: var(--shadow-xs);
}
.pill-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 4px oklch(0.71 0.13 185 / 0.16); }

/* ---------- cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark { width: 32px; height: 32px; flex: none; }
.logo-word { font-size: 19px; font-weight: 650; letter-spacing: -0.02em; }
.logo-word .g { color: var(--primary); }
.logo-word .m { color: var(--teal-strong); }

/* ---------- star rating ---------- */
.stars { display: inline-flex; align-items: center; gap: 3px; color: var(--warning); }
.stars svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }

/* ---------- placeholder image ---------- */
.ph {
  position: relative; overflow: hidden;
  background:
    repeating-linear-gradient(135deg, var(--muted) 0 11px, var(--muted-2) 11px 22px);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted-foreground);
}
.ph::after {
  content: attr(data-label);
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.04em;
  background: var(--card); color: var(--muted-foreground);
  padding: 4px 9px; border-radius: var(--radius-pill);
  border: 1px solid var(--border);
}

/* theme toggle — single icon that swaps with theme (works on every page) */
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }

/* ===== Premium motion system =====
   Real browsers: smooth scroll-reveal via .in.
   Stall-proof: a failsafe snaps any unrevealed element visible after a short
   delay (.shown), so content is NEVER permanently hidden. Reduced-motion: instant. */
.reveal { opacity: 1; }
html.js-motion .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.16,0.84,0.34,1), transform 0.7s cubic-bezier(0.16,0.84,0.34,1);
  will-change: opacity, transform;
}
html.js-motion .reveal.in { opacity: 1; transform: none; }
html.js-motion .reveal.shown { opacity: 1 !important; transform: none !important; transition: none !important; }

/* reveal variants */
html.js-motion .reveal[data-rv="left"]  { transform: translateX(-28px); }
html.js-motion .reveal[data-rv="right"] { transform: translateX(28px); }
html.js-motion .reveal[data-rv="scale"] { transform: scale(0.96); }
html.js-motion .reveal[data-rv="left"].in,
html.js-motion .reveal[data-rv="right"].in,
html.js-motion .reveal[data-rv="scale"].in { transform: none; }

/* stagger children */
html.js-motion .stagger > * { opacity: 0; transform: translateY(18px); transition: opacity 0.6s cubic-bezier(0.16,0.84,0.34,1), transform 0.6s cubic-bezier(0.16,0.84,0.34,1); }
html.js-motion .stagger.in > * { opacity: 1; transform: none; }
html.js-motion .stagger.shown > * { opacity: 1 !important; transform: none !important; transition: none !important; }
html.js-motion .stagger.in > *:nth-child(1) { transition-delay: 0.04s; }
html.js-motion .stagger.in > *:nth-child(2) { transition-delay: 0.09s; }
html.js-motion .stagger.in > *:nth-child(3) { transition-delay: 0.14s; }
html.js-motion .stagger.in > *:nth-child(4) { transition-delay: 0.19s; }
html.js-motion .stagger.in > *:nth-child(5) { transition-delay: 0.24s; }
html.js-motion .stagger.in > *:nth-child(6) { transition-delay: 0.29s; }
html.js-motion .stagger.in > *:nth-child(7) { transition-delay: 0.34s; }
html.js-motion .stagger.in > *:nth-child(8) { transition-delay: 0.39s; }
html.js-motion .stagger.in > *:nth-child(n+9) { transition-delay: 0.43s; }

@media (prefers-reduced-motion: reduce) {
  html.js-motion .reveal, html.js-motion .stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
}
