:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --ink: #1f2a2e;
  --muted: #5c6b70;
  --accent: #2f8f7a;
  --accent-ink: #ffffff;
  --accent-soft: #e3f1ec;
  --line: #e7e1d7;
  --header-bg: rgba(251, 248, 243, 0.82);
  --radius: 18px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141a1c;
    --surface: #1c2427;
    --ink: #eef3f2;
    --muted: #9fb0b3;
    --accent: #5cc4aa;
    --accent-ink: #0f1a17;
    --accent-soft: #1f3530;
    --line: #2b3639;
    --header-bg: rgba(20, 26, 28, 0.82);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}
a { color: var(--accent); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- Top bar ---------- */
header.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, padding .3s;
}
header.top .wrap { display: flex; align-items: center; gap: 18px; height: 72px; transition: height .3s; }
header.top.scrolled { border-bottom-color: var(--line); }
header.top.scrolled .wrap { height: 58px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; margin-right: auto; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-size: 18px; }
.logo span.light { font-weight: 400; color: var(--muted); }
nav.menu { display: flex; gap: 26px; }
nav.menu a { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; position: relative; padding: 4px 0; }
nav.menu a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
nav.menu a:hover::after, nav.menu a.active::after { transform: scaleX(1); }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); flex: none; }
.lang button { border: 0; background: transparent; color: var(--muted); padding: 6px 12px; font: inherit; font-size: 14px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.menu-btn { display: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); width: 40px; height: 36px; border-radius: 10px; cursor: pointer; flex: none; }
.menu-btn svg { width: 20px; height: 20px; }
@media (max-width: 760px) {
  .menu-btn { display: grid; place-items: center; }
  nav.menu { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 6px 20px 14px; display: none; }
  nav.menu.open { display: flex; }
  nav.menu a { padding: 12px 0; font-size: 18px; border-bottom: 1px solid var(--line); }
  nav.menu a::after { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: clip; padding-top: clamp(56px, 10vw, 120px); padding-bottom: clamp(48px, 8vw, 90px); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 26px; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--accent); }
.hero h1 { font-size: clamp(44px, 9.5vw, 116px); line-height: .98; letter-spacing: -0.045em; font-weight: 800; margin: 0 0 30px; max-width: 11ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lead { font-size: clamp(18px, 2vw, 22px); color: var(--muted); max-width: 46ch; margin: 0 0 34px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 10px; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 600; padding: 14px 24px; border-radius: 999px; transition: transform .2s; }
.btn:hover { transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.blob { position: absolute; z-index: -1; right: 0; top: 8%; width: min(46vw, 520px); aspect-ratio: 1; border-radius: 42% 58% 55% 45% / 48% 40% 60% 52%; background: radial-gradient(circle at 30% 30%, var(--accent-soft), transparent 70%); will-change: transform; }

/* ---------- Ticker ---------- */
.ticker { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; white-space: nowrap; padding: 18px 0; }
.ticker-track { display: inline-flex; gap: 48px; animation: tick 38s linear infinite; font-size: clamp(22px, 3vw, 34px); font-weight: 700; letter-spacing: -0.02em; }
.ticker-track span { display: inline-flex; align-items: center; gap: 48px; }
.ticker-track span::after { content: "✳"; color: var(--accent); font-size: .7em; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
section.block { padding: clamp(64px, 9vw, 110px) 0; }
.section-head { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 44px; }
.section-head .num { font-size: 14px; font-weight: 600; color: var(--accent); letter-spacing: .12em; text-transform: uppercase; }
.section-head h2 { font-size: clamp(32px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.035em; margin: 0; max-width: 16ch; }

.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); border-top: 1px solid var(--line); }
.principle { padding: 30px 26px 34px 0; border-bottom: 1px solid var(--line); }
.principle .n { font-size: 64px; font-weight: 800; letter-spacing: -0.05em; line-height: 1; color: var(--accent); opacity: .9; }
.principle h3 { font-size: 22px; margin: 16px 0 8px; letter-spacing: -0.01em; }
.principle p { margin: 0; color: var(--muted); max-width: 34ch; }
@media (min-width: 820px) { .principle + .principle { padding-left: 26px; border-left: 1px solid var(--line); } }

.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.tile { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 26px; min-height: 280px; display: flex; flex-direction: column; gap: 0; overflow: hidden; transition: transform .3s, border-color .3s; }
.tile:hover { transform: translateY(-4px); border-color: var(--accent); }
.tile .shape { margin-bottom: auto; flex: none; width: 72px; height: 72px; border-radius: 22px; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent); }
.tile .shape svg { width: 34px; height: 34px; }
.tile .tag { margin-top: 40px; align-self: flex-start; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 4px 12px; border-radius: 999px; margin-bottom: 12px; }
.tile h3 { margin: 0 0 6px; font-size: 21px; letter-spacing: -0.01em; }
.tile p { margin: 0; color: var(--muted); font-size: 16px; }

.cta { background: var(--accent); color: var(--accent-ink); border-radius: 32px; padding: clamp(40px, 7vw, 80px) clamp(24px, 6vw, 72px); position: relative; overflow: hidden; }
.cta h2 { font-size: clamp(34px, 6vw, 72px); line-height: 1; letter-spacing: -0.04em; margin: 0 0 18px; max-width: 13ch; }
.cta p { margin: 0 0 28px; opacity: .85; max-width: 44ch; font-size: 18px; }
.cta a.mail { color: var(--accent-ink); font-size: clamp(22px, 3.4vw, 38px); font-weight: 700; letter-spacing: -0.02em; text-decoration: none; border-bottom: 2px solid currentColor; overflow-wrap: anywhere; }
.cta::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 240px; height: 240px; border-radius: 50%; border: 40px solid rgba(255,255,255,.12); }

footer { border-top: 1px solid var(--line); margin-top: 70px; padding: 26px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: space-between; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .ticker-track { animation: none; }
  .blob { transform: none !important; }
}

/* ---------- Legal pages ---------- */
.doc { padding-top: 30px; padding-bottom: 20px; max-width: 760px; }
.doc h1 { font-size: 34px; letter-spacing: -0.02em; margin: 10px 0 6px; }
.doc h2 { font-size: 20px; margin-top: 30px; }
.doc .muted { color: var(--muted); }
.doc dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; }
.doc dt { font-weight: 600; }
.doc dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .doc dl { grid-template-columns: 1fr; } .doc dd { margin-bottom: 8px; } }

[data-lang-block] { display: none; }
html[lang="es"] [data-lang-block="es"], html[lang="en"] [data-lang-block="en"] { display: block; }
