:root {
  --abyss: #02040a;
  --deep: #061028;
  --ocean: #0b2a6b;
  --blue: #3d6bff;
  --cyan: #7fe8ff;
  --coral: #ff7a45;
  --pink: #ff4fa3;
  --white: #f4f7ff;
  --bg: #02040a;
  --fg: #f4f7ff;
  --fg2: var(--fg2);
  --inv: #02040a;
  --muted: #8a94ad;
  --line: rgba(127, 232, 255, .14);
  --glass: rgba(10, 20, 45, .45);
  --card: rgba(2, 4, 10, .55);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter Tight", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 64px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body.light {
  --fg: #0b0d14; --fg2: #3b4150; --inv: #fbfbf9; --muted: #6b7285;
  --line: rgba(11, 13, 20, .12); --glass: rgba(255, 255, 255, .5); --card: rgba(255, 255, 255, .45);
  --cyan: #0a7ea6; --coral: #e2531c; --pink: #d81f78;
}
html { background: var(--bg); }
h1, h2, h3, p, a, li, span, em, strong, label { transition: color .5s ease, border-color .5s ease; }
/* film grain */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 200; opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1.4 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
html { scroll-behavior: smooth; }
body {
  background: transparent;
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--coral); color: var(--abyss); }
a { color: inherit; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }
strong { font-weight: 500; color: var(--fg); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 400; }
.label { color: var(--cyan); margin-bottom: 24px; opacity: .8; }
.muted { color: var(--muted); }
h1, h2, h3 { font-weight: 300; letter-spacing: -.035em; line-height: .98; }
h2 { font-size: clamp(36px, 5vw, 76px); }
h2 em, h1 em { letter-spacing: -.01em; }
h3 { font-size: 26px; letter-spacing: -.02em; line-height: 1.1; font-weight: 400; }
section { position: relative; padding: clamp(96px, 14vw, 200px) var(--gutter); }

#void { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; display: block; }

/* ---------- NAV ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 16px var(--gutter);
  background: linear-gradient(var(--bg), transparent);
}
.brand { text-decoration: none; font-weight: 500; font-size: 17px; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.brand i { font-family: var(--serif); font-size: 20px; color: var(--cyan); }
.orb-dot { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, var(--coral), var(--pink) 45%, var(--blue) 80%); box-shadow: 0 0 14px var(--pink); animation: pulse 3.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.78); box-shadow: 0 0 26px var(--cyan); } }
.nav nav { display: flex; gap: 30px; }
.nav nav a { text-decoration: none; font-size: 14px; color: var(--muted); transition: color .2s; }
.nav nav a:hover { color: var(--fg); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 16px 28px; border-radius: 999px; text-decoration: none;
  font-family: var(--sans); font-weight: 500; font-size: 15px; letter-spacing: -.01em;
  color: var(--inv); background: var(--fg);
  border: 1px solid var(--fg);
  transition: box-shadow .3s, transform .3s, background .3s, color .3s;
}
.btn:hover { box-shadow: 0 0 0 6px rgba(127,232,255,.12), 0 0 40px rgba(127,232,255,.45); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-sm { padding: 10px 18px; font-size: 13px; white-space: nowrap; }
.btn-lg { padding: 20px 36px; font-size: 17px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.cta-row.center { justify-content: center; }

/* ---------- HERO ---------- */
.hero { min-height: 100svh; display: flex; align-items: center; padding-top: 110px; overflow: hidden; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-copy { position: relative; z-index: 2; max-width: min(660px, 48vw); }
.kicker { color: var(--cyan); margin-bottom: 24px; }
.hero h1 { font-size: clamp(38px, 4.6vw, 76px); line-height: 1.02; }
.hero h1 em { display: inline-block; background: linear-gradient(90deg, #ffb08a, #f0a7d8 45%, #9b95ff); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .08em; }
.lead { font-size: clamp(18px, 1.5vw, 21px); color: var(--fg2); max-width: 560px; }
.hero .lead { margin-top: 26px; }
.spiral-note { position: absolute; right: var(--gutter); bottom: 26px; color: var(--muted); z-index: 2; font-size: 10.5px; }
.spiral-note sup { font-size: .8em; }

/* passage: the background clears to light while this scrolls by */
.passage { position: relative; height: 150vh; }
.passage-word { position: sticky; top: 42vh; text-align: center; color: #fff; mix-blend-mode: difference; font-size: clamp(64px, 11vw, 190px); line-height: 1; letter-spacing: -.02em; }

/* snap-in headline */
.js .snap-w { display: inline-block; opacity: 0; transform: translateY(.35em) scale(.35) rotate(var(--r, 0deg)); }
.snapped .snap-w { animation: snap .75s cubic-bezier(.2, 1.7, .35, 1) forwards; animation-delay: calc(var(--i) * 65ms); }
@keyframes snap { to { opacity: 1; transform: none; } }
.js .hero-side, .js .kicker { opacity: 0; transform: translateY(16px); transition: opacity .8s .5s, transform .8s .5s; }
.snapped .hero-side, .snapped .kicker { opacity: 1; transform: none; }

/* ---------- INFINITO ---------- */
.infinite { height: 260vh; padding: 0; }
.stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
#flood { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.flood-lines { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.fl {
  grid-area: 1 / 1; text-align: center; font-size: clamp(40px, 7vw, 120px); font-weight: 300; letter-spacing: -.04em; line-height: 1;
  opacity: 0; transform: scale(.94); filter: blur(8px);
  transition: opacity .6s, transform .9s cubic-bezier(.2,.7,.2,1), filter .6s;
  text-shadow: 0 0 40px rgba(2,4,10,.9);
  padding: 0 var(--gutter);
}
.fl.on { opacity: 1; transform: none; filter: none; }
.fl-long { font-size: clamp(30px, 4.6vw, 76px); line-height: 1.05; max-width: 1100px; }
.fl em { color: var(--cyan); }
.meter { position: absolute; left: var(--gutter); bottom: 28px; color: var(--muted); }
.meter span { color: var(--coral); }

/* ---------- DANGER ---------- */
.danger { padding-left: 0; padding-right: 0; }
.danger .section-head { max-width: none; padding: 0 var(--gutter); margin-bottom: 48px; }
.danger .section-head > * { max-width: 980px; }
#melt { display: block; width: 100%; height: clamp(320px, 58vw, 780px); cursor: crosshair; }
.danger-foot { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; padding: 48px var(--gutter) 0; align-items: end; }
.big-quote { font-size: clamp(28px, 3.4vw, 52px); line-height: 1.05; letter-spacing: -.03em; }
.big-quote em { color: var(--coral); }

/* ---------- PROBLEMA ---------- */
.pain-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.pain { border: 1px solid var(--line); border-radius: 28px; padding: 36px 32px; background: var(--card); display: flex; flex-direction: column; gap: 16px; }
.pain .mono { color: var(--coral); }
.pain h3 { font-size: clamp(26px, 2.4vw, 34px); }
.pain p { color: var(--muted); }

/* ---------- AUDITORÍA ---------- */
.callout, .support, .format { margin-top: clamp(64px, 9vw, 120px); }
.callout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: end; padding: 48px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.support { max-width: 860px; margin-left: auto; margin-right: auto; text-align: center; font-size: clamp(22px, 2.2vw, 32px); line-height: 1.2; letter-spacing: -.02em; }
.format-list { list-style: none; max-width: 860px; }
.format-list li { padding: 22px 0; border-top: 1px solid var(--line); }
.format-list li:last-child { border-bottom: 1px solid var(--line); }
.fine { color: var(--muted); font-size: 15px; max-width: 860px; margin: 22px 0 36px; }
.todo { font-family: var(--mono); font-size: 11px; letter-spacing: .02em; text-transform: none; background: transparent; color: var(--coral); border: 1px dashed var(--coral); border-radius: 6px; padding: 2px 8px; }

/* ---------- CRITERIO — fórmula sobre los orbes ---------- */
.formula-wrap { position: relative; overflow: hidden; padding: clamp(64px, 9vw, 120px) var(--gutter); }
#clutter { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.section-head { max-width: 980px; margin-bottom: 80px; }
.section-head .lead { margin-top: 28px; max-width: 680px; }
.formula { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 20px; }
.op { align-self: center; font-family: var(--serif); font-size: clamp(40px, 5vw, 72px); line-height: 1; color: var(--muted); }
.formula-wrap .strip { position: relative; z-index: 2; margin-top: 20px; border-radius: 28px; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.orb-card {
  padding: 40px 32px; border-radius: 28px;
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
  box-shadow: inset 0 0 60px color-mix(in srgb, var(--c) 10%, transparent);
  transition: transform .4s, box-shadow .4s;
}
.orb-card:hover { transform: translateY(-6px); box-shadow: inset 0 0 80px color-mix(in srgb, var(--c) 22%, transparent), 0 0 60px color-mix(in srgb, var(--c) 25%, transparent); }
.orb-card .mono { color: var(--c); }
.orb-card h3 { font-size: clamp(32px, 3vw, 44px); margin: 60px 0 16px; }
.orb-card h3 em { color: var(--c); }
.orb-card p { color: var(--fg2); font-size: 17px; }

/* ---------- SOLUTIONS ---------- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.card {
  padding: 36px 30px; min-height: 320px; display: flex; flex-direction: column; gap: 16px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  position: relative; overflow: hidden; background: var(--card);
}
.card::before { content: ""; position: absolute; width: 360px; height: 360px; left: var(--mx, 50%); top: var(--my, 50%); transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(127,232,255,.16), transparent 65%); opacity: 0; transition: opacity .4s; pointer-events: none; }
.card:hover::before { opacity: 1; }
.card p { color: var(--muted); font-size: 16.5px; flex: 1; transition: color .3s; }
.card:hover p { color: var(--fg2); }
.num { color: var(--coral); }
.card ul, .tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.card li, .tags li { border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 10.5px; color: var(--cyan); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.audit .card { min-height: 240px; }
.strip { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: center; padding: 36px 30px; border: 1px solid var(--line); background: var(--card); }
.grid + .strip { border-top: 0; }
.strip h3 { margin-bottom: 10px; }
.strip p { color: var(--muted); max-width: 640px; }
.strip .tags { margin-top: 18px; }
.strip + .strip { border-top: 0; }
.strip-data { grid-template-columns: minmax(0, 1fr); }
.points { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 32px; }
.points li { padding-top: 14px; border-top: 1px solid var(--cyan); color: var(--fg2); font-size: 15px; line-height: 1.4; }

/* ---------- METHOD ---------- */
.steps { list-style: none; }
.steps li { display: grid; grid-template-columns: 160px 1fr auto; gap: 32px; align-items: start; padding: 40px 0; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.step-n { font-family: var(--serif); font-style: italic; font-size: 88px; line-height: .8; color: transparent; -webkit-text-stroke: 1px var(--cyan); transition: color .3s, text-shadow .3s; }
.steps li:hover .step-n { color: var(--cyan); text-shadow: 0 0 30px var(--cyan); }
.steps h3 { font-size: clamp(30px, 3vw, 44px); margin-bottom: 10px; }
.steps p { color: var(--muted); max-width: 600px; }
.tag { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; color: var(--cyan); white-space: nowrap; font-size: 10.5px; }

/* ---------- CASES ---------- */
.case-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.case { padding: 36px 30px; border-radius: 24px; background: linear-gradient(160deg, rgba(61,107,255,.16), rgba(255,79,163,.07)); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 22px; min-height: 280px; }
.sector { color: var(--coral); }
.case-rows { flex: 1; display: flex; flex-direction: column; gap: 18px; }
.case-rows dt { color: var(--muted); font-size: 10.5px; margin-bottom: 6px; }
.case-rows dd { color: var(--fg2); font-size: 16px; line-height: 1.45; }
.case-rows .now { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--line); }
.case-rows .now dt { color: var(--coral); }
.case-rows .now dd { color: var(--fg); font-size: 23px; font-weight: 400; line-height: 1.18; letter-spacing: -.02em; }

/* ---------- QUIÉN SOY ---------- */
.about-body { max-width: 760px; display: flex; flex-direction: column; gap: 22px; }
.about-body > p:not(.big-quote) { color: var(--fg2); }
.about-body .big-quote { margin: 26px 0; }
.facts { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; margin: clamp(56px, 7vw, 96px) 0 48px; border-top: 1px solid var(--line); }
.facts li { padding: 28px 0; border-bottom: 1px solid var(--line); }
.facts h3 { font-family: var(--serif); font-style: italic; font-size: clamp(26px, 2.4vw, 36px); color: var(--cyan); margin-bottom: 10px; }
.facts p { color: var(--muted); font-size: 16px; }

/* ---------- PACK ---------- */
.pack { padding: 28px var(--gutter); text-align: center; font-size: 16px; color: var(--muted); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pack a { color: var(--cyan); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- CONTACT ---------- */
.contact { text-align: center; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
.contact-glow { position: absolute; width: min(90vw, 900px); aspect-ratio: 1; border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%, -50%); background: radial-gradient(circle at 38% 36%, rgba(236,190,236,.9), rgba(123,123,255,.75) 34%, rgba(40,40,110,.35) 58%, transparent 70%); filter: blur(28px); z-index: -1; animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: translate(-50%, -50%) scale(1.06); } }
.huge { font-size: clamp(44px, 7.5vw, 124px); max-width: 1200px; }
.huge em { color: var(--cyan); }
.contact .lead { margin: 30px auto 0; }

/* ---------- FOOTER ---------- */
.foot { display: flex; flex-wrap: wrap; gap: 16px 36px; justify-content: space-between; padding: 30px var(--gutter); color: var(--muted); font-size: 10.5px; }
.foot a { color: var(--cyan); }

/* ---------- REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 980px) {
  .grid, .case-list { grid-template-columns: 1fr 1fr; }
  .pain-grid, .formula, .facts, .points { grid-template-columns: 1fr; }
  .op { justify-self: center; }
  .danger-foot, .callout { grid-template-columns: 1fr; gap: 20px; }
  .facts { border-top: 0; }
  .facts li:first-child { border-top: 1px solid var(--line); }
}
@media (max-width: 860px) {
  .nav nav { display: none; }
}
@media (max-width: 680px) {
  body { font-size: 17px; }
  .btn-sm { padding: 9px 14px; font-size: 12px; }
  .hero { align-items: flex-end; padding-top: 52svh; padding-bottom: 72px; }
  .hero-copy { max-width: none; }
  .spiral-note { left: var(--gutter); right: auto; bottom: 24px; }
  .grid, .case-list { grid-template-columns: 1fr; }
  .card, .audit .card, .case { min-height: 0; }
  .strip { grid-template-columns: 1fr; }
  .pain, .strip { padding: 28px 24px; }
  .steps li { grid-template-columns: 1fr; gap: 12px; }
  .step-n { font-size: 60px; }
  .tag { justify-self: start; }
  .btn-lg { width: 100%; }
  .orb-card h3 { margin-top: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orb-dot, .contact-glow { animation: none; }
  .js .snap-w, .js .hero-side, .js .kicker { opacity: 1; transform: none; animation: none; transition: none; }
  .reveal, .fl { transition: none; }
}
