/* Nexo · presentación web. Paleta de la guía de marca de Nexo Tech Labs. */
:root {
  --bg: #1C1917;
  --bg-2: #24201d;
  --ink: #F5F2ED;
  --ink-2: #c9c3bb;
  --ink-3: #8f877e;
  --accent: #C46A2A;
  --accent-2: #D4845A;
  --line: rgba(245, 242, 237, 0.12);
  --glass: rgba(36, 32, 29, 0.55);
  --glass-hi: rgba(245, 242, 237, 0.06);
  --act: var(--accent);
  --serif: "DM Serif Display", "Noto Serif SC", Georgia, serif;
  --sans: "DM Sans", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --pad: clamp(16px, 5vw, 72px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}
body[data-scene="renal"] { --act: #5EB2C4; }
body[data-scene="proteinas"] { --act: #D4A574; }
body[data-scene="defensa"] { --act: #8FAAC4; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(120% 90% at 80% 0%, #2a231e 0%, var(--bg) 55%) fixed, var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(15px, 1.05vw + 8px, 19px);
  line-height: 1.5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
html[lang="zh-Hans"] body { line-height: 1.7; letter-spacing: .01em; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--act); outline-offset: 3px; border-radius: 6px; }

#scene { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Cristal ---------- */
.glass {
  background: linear-gradient(160deg, var(--glass-hi), transparent 60%), var(--glass);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 20px 50px -20px rgba(0,0,0,.6);
}

/* ---------- Barra superior ---------- */
.topbar {
  position: fixed; z-index: 20; top: 14px; left: 50%; transform: translateX(-50%);
  width: min(1180px, calc(100% - 28px));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 10px 8px 14px; border-radius: 999px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 500; }
.brand img { border-radius: 8px; }
.top-right { display: flex; align-items: center; gap: 8px; }
.lang { display: flex; padding: 3px; border-radius: 999px; background: rgba(0,0,0,.25); border: 1px solid var(--line); }
.lang button { padding: 5px 11px; border-radius: 999px; font-size: 13px; color: var(--ink-2); transition: background .3s, color .3s; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.menu-btn { padding: 7px 14px; border-radius: 999px; font-size: 13px; border: 1px solid var(--line); }
.menu-btn:hover { border-color: var(--act); }

.progress { position: fixed; z-index: 21; top: 0; left: 0; right: 0; height: 2px; }
#progress-bar { height: 100%; background: var(--act); transform-origin: 0 50%; transform: scaleX(0); transition: transform .6s var(--ease), background .6s; }

/* ---------- Diapositivas ---------- */
.deck {
  position: relative; z-index: 2;
  height: 100svh; overflow-y: auto; overflow-x: hidden;
  scroll-snap-type: y mandatory; scroll-behavior: smooth;
  scrollbar-width: none;
}
.deck::-webkit-scrollbar { display: none; }
.slide {
  min-height: 100svh; scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; align-items: center;
  padding: 96px var(--pad) 96px;
  perspective: 1200px;
}
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; }

.kicker {
  margin: 0 0 18px; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--act);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.kicker::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.display {
  font-family: var(--serif); font-weight: 400; margin: 0 0 22px;
  font-size: clamp(38px, 6.4vw, 96px); line-height: 1.02; letter-spacing: -.015em; max-width: 16ch;
}
.display em, .title em { font-style: italic; color: var(--act); }
html[lang="zh-Hans"] .display, html[lang="zh-Hans"] .title { font-weight: 600; letter-spacing: 0; line-height: 1.25; max-width: 20ch; }
html[lang="zh-Hans"] .display em, html[lang="zh-Hans"] .title em { font-style: normal; }
.huge { font-size: clamp(56px, 11vw, 168px); }
.title { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.6vw, 56px); line-height: 1.08; margin: 0 0 clamp(24px, 4vh, 44px); max-width: 24ch; }
.lead { font-size: clamp(17px, 1.5vw, 23px); color: var(--ink-2); max-width: 58ch; margin: 0; }
.lead strong, li strong, .card p strong { color: var(--ink); font-weight: 500; }
.meta { margin-top: 34px; font-size: 14px; color: var(--ink-3); }
.hint { margin-top: 8vh; font-size: 13px; color: var(--ink-3); letter-spacing: .08em; }
.logo { border-radius: 16px; margin-bottom: 28px; box-shadow: 0 10px 40px -10px rgba(196,106,42,.5); }
.big-logo { width: 96px; height: 96px; }

/* Acto */
.act-num { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.4vw, 34px); color: var(--act); margin: 0 0 6px; }
.s-act .lead { font-size: clamp(19px, 2vw, 28px); }

/* Tarjetas */
.cards { display: grid; gap: clamp(12px, 1.6vw, 22px); grid-template-columns: repeat(var(--cols, 3), 1fr); }
.cards.n4 { --cols: 4; }
.cards.n2 { --cols: 2; }
.card {
  position: relative; border-radius: 22px; padding: clamp(20px, 2vw, 30px); min-height: 220px;
  transform: rotateX(var(--rx, 0)) rotateY(var(--ry, 0));
  transform-style: preserve-3d; transition: transform .25s ease-out, border-color .4s;
  overflow: hidden;
}
.card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(400px circle at var(--gx, 50%) var(--gy, 50%), rgba(245,242,237,.10), transparent 45%);
}
.card:hover { border-color: color-mix(in srgb, var(--act) 55%, transparent); }
.card:hover::after { opacity: 1; }
.card-n { display: inline-block; font-family: var(--serif); font-size: 30px; color: var(--act); margin-bottom: 22px; transform: translateZ(30px); }
.card h3 { margin: 0 0 10px; font-size: clamp(19px, 1.5vw, 24px); font-weight: 500; transform: translateZ(20px); }
.card p { margin: 0; color: var(--ink-2); font-size: .95em; }
.is-pending { border-style: dashed; }
.tag-pending {
  display: inline-block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; border: 1px dashed var(--accent-2); color: var(--accent-2);
}
.card .tag-pending { margin-top: 14px; }

/* Cifras */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 1.6vw, 20px); }
.stat { border-radius: 20px; padding: clamp(18px, 2vw, 28px); display: flex; flex-direction: column; gap: 8px; }
.stat-v { font-family: var(--serif); font-size: clamp(30px, 3.4vw, 54px); line-height: 1; color: var(--ink); }
.stat:nth-child(n+4) .stat-v { color: var(--act); }
.stat-l { color: var(--ink-2); font-size: .9em; }
.note { margin: 22px 0 0; font-size: 14px; color: var(--ink-3); max-width: 80ch; }

/* Calendario */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 4px; max-width: 820px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 1px; background: linear-gradient(var(--act), transparent); }
.timeline li { position: relative; display: grid; grid-template-columns: 210px 1fr; gap: 18px; padding: 11px 0 11px 34px; border-bottom: 1px solid var(--line); }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 17px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--act);
}
.timeline li.done::before { background: var(--act); }
.tl-d { color: var(--act); font-variant-numeric: tabular-nums; }
.tl-t { color: var(--ink-2); }

/* Dos columnas */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 1.6vw, 22px); }
.col { border-radius: 22px; padding: clamp(20px, 2.2vw, 34px); }
.col h3 { margin: 0 0 14px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--act); font-weight: 500; }
.col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.col li { position: relative; padding-left: 22px; color: var(--ink-2); }
.col li::before { content: ""; position: absolute; left: 0; top: .7em; width: 10px; height: 1px; background: var(--act); }
.big { font-family: var(--serif); font-size: clamp(56px, 7vw, 104px); line-height: 1; margin: 4px 0 18px; color: var(--act); }

/* ---------- Entrada animada ---------- */
.r { opacity: 0; transform: translateY(28px); filter: blur(6px); transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease); transition-delay: var(--d, 0ms); }
.card.r { transform: translateY(40px) rotateX(12deg); }
.in .r { opacity: 1; transform: none; filter: none; }
.in .card.r { transform: rotateX(var(--rx, 0)) rotateY(var(--ry, 0)); transition: opacity .9s var(--ease) var(--d), transform .25s ease-out, filter .9s var(--ease) var(--d), border-color .4s; }
.s-act .huge.r { transform: translateY(60px) scale(.96); letter-spacing: .02em; }
.in.s-act .huge.r { transform: none; letter-spacing: -.015em; }

/* ---------- Navegación ---------- */
.dots { position: fixed; z-index: 15; right: 18px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 9px; }
.dots button { width: 8px; height: 8px; border-radius: 50%; background: rgba(245,242,237,.25); transition: transform .3s, background .3s; padding: 0; }
.dots button.on { background: var(--act); transform: scale(1.6); }
.dots button:hover { background: var(--ink); }

.controls {
  position: fixed; z-index: 20; bottom: 16px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px; padding: 5px; border-radius: 999px;
}
.controls button { width: 38px; height: 38px; border-radius: 50%; font-size: 17px; transition: background .25s; }
.controls button:hover { background: rgba(245,242,237,.1); }
#counter { min-width: 76px; text-align: center; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

.menu { position: fixed; inset: 0; z-index: 30; background: rgba(10,9,8,.55); opacity: 0; pointer-events: none; transition: opacity .35s; }
.menu.open { opacity: 1; pointer-events: auto; }
.menu-panel {
  position: absolute; top: 72px; right: max(14px, calc((100% - 1180px) / 2)); width: min(380px, calc(100% - 28px));
  max-height: calc(100svh - 150px); overflow-y: auto; border-radius: 22px; padding: 10px;
  transform: translateY(-10px); transition: transform .35s var(--ease);
}
.menu.open .menu-panel { transform: none; }
.menu ol { list-style: none; margin: 0; padding: 0; }
.menu li button { width: 100%; text-align: left; padding: 9px 12px; border-radius: 12px; display: flex; gap: 12px; color: var(--ink-2); }
.menu li button span { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.menu li button:hover { background: rgba(245,242,237,.07); color: var(--ink); }
.menu .scene-renal span { color: #5EB2C4; }
.menu .scene-proteinas span { color: #D4A574; }
.menu .scene-defensa span { color: #8FAAC4; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .cards.n4 { --cols: 2; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px), (max-height: 620px) {
  .deck { scroll-snap-type: y proximity; }
  .slide { scroll-snap-stop: normal; padding: 92px 16px 88px; }
}
@media (max-width: 720px) {
  .cards, .cards.n4 { --cols: 1; }
  .split { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .card { min-height: 0; }
  .card-n { margin-bottom: 10px; font-size: 24px; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .dots { display: none; }
  .brand span { display: none; }
  .topbar { padding-left: 10px; }
  .hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .deck { scroll-behavior: auto; }
  .r, .card.r, .s-act .huge.r { opacity: 1; transform: none; filter: none; transition: none; }
}

.meta a { color: var(--accent-2); text-decoration: none; border-bottom: 1px solid currentColor; }
.meta a:hover { color: var(--ink); }
.s-end .meta { font-size: clamp(16px, 1.4vw, 20px); }

/* Listas enumeradas: menos texto, más legible. */
.col ul { counter-reset: item; gap: 0; }
.col li {
  counter-increment: item; padding: 12px 0 12px 46px; border-top: 1px solid var(--line);
  color: var(--ink); font-size: clamp(16px, 1.25vw, 20px); line-height: 1.35;
}
.col li:first-child { border-top: 0; }
.col li::before {
  content: counter(item, decimal-leading-zero); width: auto; height: auto; background: none;
  top: 13px; font-family: var(--serif); font-size: 1.05em; color: var(--act);
}
.card { min-height: 170px; }
.card p { font-size: 1em; }
.stat-l { font-size: 1em; color: var(--ink-2); }
.s-cover .lead, .s-end .lead { color: var(--ink); letter-spacing: .02em; }
