:root {
  --wine: #7A1F2D;
  --wine-2: #5F1724;
  --cream: #F6F1E8;
  --cream-2: #ECE4D5;
  --cream-3: #E0D5C2;
  --paper: #FBF8F2;
  --line: #D6CBB9;
  --ink: #2A1D1A;
  --muted: #7A6A63;
  --rose: #DDB9B2;
  --rose-2: #C7958E;
  --tag-rose: #F1D8D3;
  --tag-sand: #EBDFC5;
  --tag-sage: #D8E2D0;
  --tag-sky: #D4DEE7;
  --tag-lilac: #E1D8E7;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  overflow: hidden;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  transition: background .5s;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
body[data-theme="wine"] { background: var(--wine); }

/* ---------- lienzo 1920x1080 escalado ---------- */
/* #viewport fijo y recortado: así el lienzo de 1920 px no ensancha el viewport de diseño en móvil */
#viewport { position: fixed; inset: 0; overflow: hidden; }
#stage {
  position: absolute; left: 50%; top: 50%;
  width: 1920px; height: 1080px;
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center;
  overflow: hidden;
}
.slide {
  position: absolute; inset: 0;
  padding: 120px 140px;
  background: var(--cream);
  color: var(--ink);
  opacity: 0; visibility: hidden;
}
.slide.is-active { visibility: visible; }
.slide[data-theme="wine"] { background: var(--wine); color: var(--cream); }
[data-step], .in { opacity: 0; }

/* ---------- tipografía ---------- */
.kicker {
  margin: 0 0 30px;
  font: 500 22px/1 var(--sans);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
}
[data-theme="wine"] .kicker { color: var(--rose); }
h1, h2, h3 { font-family: var(--serif); font-weight: 300; margin: 0; letter-spacing: -.012em; font-variation-settings: "opsz" 144; }
h1 { font-size: 132px; line-height: 1; }
h2 { font-size: 84px; line-height: 1.06; }
h3 { font-size: 40px; line-height: 1.2; font-weight: 400; font-variation-settings: "opsz" 48; }
h1 em, h2 em, .bigquote em { font-style: italic; font-weight: 300; color: var(--wine); }
[data-theme="wine"] h1 em, [data-theme="wine"] h2 em { color: var(--rose); }
.lead { font-size: 40px; line-height: 1.35; margin: 36px 0 0; max-width: 1150px; font-weight: 400; }
[data-theme="wine"] .lead { color: var(--cream); }
.note { margin: 34px 0 0; font-size: 24px; color: var(--muted); }

.tag {
  display: inline-flex; align-items: center;
  padding: 12px 24px; border-radius: 999px;
  font: 500 24px/1 var(--sans);
  background: var(--tag-sand); color: var(--ink);
  white-space: nowrap;
}
.tag.rose { background: var(--tag-rose); }
.tag.sage { background: var(--tag-sage); }
.tag.sky { background: var(--tag-sky); }
.tag.lilac { background: var(--tag-lilac); }
.tag.active { background: var(--wine); color: var(--cream); }
.tags { display: flex; flex-wrap: wrap; gap: 12px; }
.card { background: var(--cream-2); border-radius: 28px; padding: 44px 48px; }
.num { display: block; font: 500 22px var(--sans); letter-spacing: .16em; color: var(--wine); margin-bottom: 20px; }

/* ---------- portada ---------- */
.s-cover { display: flex; flex-direction: column; justify-content: center; }
.s-cover h1 { font-size: 150px; max-width: 1150px; }
.s-cover .by { font-size: 36px; margin: 60px 0 0; color: var(--rose); }
.s-cover .by strong { color: var(--cream); font-weight: 500; }
.heart { position: absolute; right: 150px; top: 50%; width: 520px; height: 520px; transform: translateY(-50%); }
.heart path { fill: none; stroke: var(--rose); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.hint { position: absolute; left: 140px; bottom: 64px; margin: 0; font-size: 20px; color: var(--rose); letter-spacing: .02em; }
.hint b { font-weight: 600; color: var(--cream); border: 1px solid var(--rose-2); border-radius: 8px; padding: 3px 11px; margin: 0 3px; }

/* ---------- encuadre ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 70px; }
.grid-3 .card { min-height: 460px; display: flex; flex-direction: column; }
.grid-3 h3 { font-size: 44px; }
.grid-3 .tags { margin-top: auto; padding-top: 30px; }

/* ---------- abordaje ---------- */
.route { list-style: none; margin: 110px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 40px; position: relative; }
.route::before { content: ""; position: absolute; left: 36px; right: 36px; top: 36px; height: 2px; background: var(--line); }
.route li { position: relative; }
.route .n { display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 50%; background: var(--wine); color: var(--cream); font: 500 24px var(--sans); position: relative; }
.route h3 { margin: 40px 0 22px; font-size: 38px; min-height: 92px; }

/* ---------- via sensis ---------- */
.icon { display: block; }
.icon path { fill: none; stroke: currentColor; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.icon.v24 path { stroke-width: .41; } /* íconos en cuadrícula de 24 (Lucide): mismo grosor visual */
.senses-row { display: flex; gap: 70px; margin-top: 90px; }
.senses-row .icon { width: 210px; height: 210px; color: var(--rose); }
.senses-row figure { margin: 0; text-align: center; }
.senses-row figcaption { font: 500 22px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--rose); margin-top: 10px; }
.sense { display: grid; grid-template-columns: 520px 1fr; gap: 110px; align-items: center; height: calc(100% - 70px); }
.sense .icon { width: 520px; height: 520px; color: var(--wine); }
.sense h1 { font-size: 176px; }
.sense .sub { font-size: 30px; color: var(--muted); margin: 14px 0 0; }
.qs { list-style: none; margin: 44px 0 0; padding: 0; font: italic 300 44px/1.3 var(--serif); }
.qs li { padding: 18px 0; border-top: 1px solid var(--line); }

/* ---------- integralidad ---------- */
.integral { display: grid; grid-template-columns: 1fr 1fr; align-items: center; height: calc(100% - 80px); gap: 60px; }
.orbit { position: relative; width: 760px; height: 760px; margin: 0 auto; }
.orbit-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 520px; text-align: center; }
.orbit h2 { font-size: 76px; }
.orbit .pos { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(var(--a)) translate(340px) rotate(calc(-1 * var(--a))); }
.orbit .tag { font-size: 28px; padding: 16px 30px; }
blockquote { margin: 0; font: 300 46px/1.35 var(--serif); }
blockquote cite, cite { display: block; margin-top: 36px; font: 500 22px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-style: normal; }
[data-theme="wine"] cite { color: var(--rose); }

.flow { display: flex; align-items: center; gap: 36px; margin-top: 140px; }
.box { background: var(--cream-2); border-radius: 28px; padding: 50px 56px; font: 400 48px var(--serif); text-align: center; min-width: 400px; }
.box .tags { justify-content: center; margin-top: 26px; gap: 10px; }
.box .tag { font-size: 20px; padding: 9px 16px; }
.arrow { width: 140px; height: 60px; flex: none; }
.arrow path { fill: none; stroke: var(--wine); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- estadísticas ---------- */
.bignum { font: 300 320px/1 var(--serif); color: var(--cream); margin: 20px 0 0; letter-spacing: -.03em; }
.bignum small { font-size: 60px; color: var(--rose); margin-left: 24px; letter-spacing: 0; }
.s-chart { padding: 96px 140px; }
.s-chart h2 { font-size: 58px; max-width: 1560px; margin-bottom: 54px; }
.bars { display: grid; grid-template-columns: 560px 1fr 240px; row-gap: var(--gap, 22px); column-gap: 30px; align-items: center; }
.bars .lbl { font-size: 30px; text-align: right; line-height: 1.15; }
.bars .track { height: var(--bh, 50px); border-radius: 10px; background: var(--cream-2); position: relative; overflow: hidden; }
.bars .bar { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); border-radius: 10px; background: var(--rose); transform: scaleX(0); transform-origin: left center; }
.bars .top .bar { background: var(--wine); }
.bars .val { font: 500 32px var(--sans); white-space: nowrap; }
.bars .val small { color: var(--muted); font-weight: 400; margin-left: 12px; font-size: 26px; }
.donuts { display: flex; gap: 140px; margin-top: 50px; align-items: flex-start; }
.donut-wrap { width: 420px; }
.donut { position: relative; width: 420px; height: 420px; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut .ring { fill: none; stroke: var(--cream-2); stroke-width: 34; }
.donut .arc { fill: none; stroke: var(--wine); stroke-width: 34; }
.donut .arc.alt { stroke: var(--rose); }
.donut .pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 300 104px var(--serif); letter-spacing: -.02em; }
.donut .pct i { font-style: normal; font-size: 48px; color: var(--muted); margin-left: 6px; }
.donut-lbl { font-size: 32px; line-height: 1.25; text-align: center; margin: 26px 0 0; }
.donut-lbl small { display: block; font-size: 24px; color: var(--muted); margin-top: 8px; }

/* ---------- expectativas ---------- */
.exp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 26px; margin-top: 46px; }
.exp .card { grid-column: span 2; padding: 34px 38px; }
.exp .card:nth-child(4) { grid-column: 2 / 4; }
.exp .card:nth-child(5) { grid-column: 4 / 6; }
.exp h3 { font-size: 31px; margin-bottom: 14px; }
.exp p { margin: 0; font-size: 22px; line-height: 1.42; color: #4A3B36; }

/* ---------- rupturas ---------- */
.hub svg.lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.hub svg.lines path { fill: none; stroke: var(--rose-2); stroke-width: 3; stroke-linecap: round; }
.hub .center { position: absolute; left: 50%; top: 470px; transform: translate(-50%, -50%); text-align: center; }
.hub .center h1 { font-size: 124px; }
.hub .node { position: absolute; transform: translate(-50%, -50%); }
.hub .node .card { padding: 30px 44px; text-align: center; max-width: 440px; }
.hub .node h3 { font-size: 36px; }
.crumbs { display: flex; gap: 14px; margin: 0 0 70px; }
.crumbs .tag { font-size: 22px; padding: 11px 22px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 120px; align-items: start; }
.split h1 { font-size: 116px; }
.bullets { list-style: none; margin: 10px 0 0; padding: 0; font-size: 40px; line-height: 1.3; }
.bullets li { padding: 28px 0 28px 46px; border-top: 1px solid var(--line); position: relative; }
.bullets li::before { content: ""; position: absolute; left: 0; top: 46px; width: 14px; height: 14px; border-radius: 50%; background: var(--wine); }
.bullets small { display: block; font-size: 28px; color: var(--muted); margin-top: 8px; line-height: 1.3; }

/* ---------- escritura ---------- */
.verse { font: 300 50px/1.35 var(--serif); max-width: 1560px; margin: 0 0 34px; }
.verse sup { font: 500 22px var(--sans); color: var(--rose); margin-right: 16px; vertical-align: top; line-height: 1; position: relative; top: 8px; }
.tri { display: grid; grid-template-columns: 1fr 1fr; align-items: center; height: calc(100% - 100px); }
.tri svg { width: 760px; height: 720px; margin: 0 auto; overflow: visible; display: block; }
.tri path { fill: none; stroke: var(--wine); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.tri .lbl { font: 400 44px var(--serif); fill: var(--ink); }
.tri .sub { font: 500 21px var(--sans); fill: var(--muted); letter-spacing: .14em; text-transform: uppercase; }
.tri circle { fill: var(--wine); }
.tri line { stroke: var(--rose-2); stroke-width: 3; stroke-dasharray: 10 12; }
.tri .lead { font-size: 36px; color: var(--muted); }
.bigquote { font: italic 300 72px/1.25 var(--serif); max-width: 1560px; margin: 50px 0 0; }
.six { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 60px; }
.six .card { min-height: 260px; }
.six h3 { font-size: 36px; }

/* ---------- notas ---------- */
.paper { margin-top: 44px; background: var(--paper); border: 1px solid var(--line); border-radius: 28px; height: 640px; position: relative; padding: 70px 80px 0; }
.paper .rule { height: 76px; border-bottom: 1px solid var(--cream-3); }
.paper .pencil { position: absolute; right: 60px; top: -70px; width: 200px; height: 200px; color: var(--wine); }

/* ---------- cierre ---------- */
.s-dudas { display: flex; align-items: center; justify-content: center; }
.s-dudas h1 { font-size: 240px; }
.breath-pos { position: absolute; right: 260px; top: 50%; transform: translateY(-50%); }
.breath { width: 440px; height: 440px; border-radius: 50%; border: 2.5px solid var(--rose); }
.breath-pos .dot { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--rose); }
.s-cierre { display: flex; flex-direction: column; justify-content: center; }
.chiara { display: grid; grid-template-columns: 600px 1fr; gap: 110px; align-items: center; height: calc(100% - 60px); }
.chiara img { width: 100%; border-radius: 28px; display: block; }
.chiara blockquote { font-size: 50px; }

/* ---------- HUD ---------- */
#hud { position: fixed; left: 0; right: 0; bottom: 0; height: 60px; pointer-events: none; font: 500 14px var(--sans); letter-spacing: .08em; color: var(--muted); z-index: 5; }
#progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(42, 29, 26, .1); }
#progress i { display: block; height: 100%; width: 0; background: var(--wine); transition: width .45s cubic-bezier(.2, .7, .2, 1); }
#sect { position: absolute; left: 22px; bottom: 18px; text-transform: uppercase; }
#counter { position: absolute; right: 22px; bottom: 18px; font-variant-numeric: tabular-nums; }
#btns { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); pointer-events: auto; display: flex; gap: 8px; }
#btns button { font: 500 13px var(--sans); letter-spacing: .1em; text-transform: uppercase; background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; color: var(--muted); cursor: pointer; }
#btns button:hover { background: var(--cream-2); }
body[data-theme="wine"] #hud { color: var(--rose); }
body[data-theme="wine"] #progress { background: rgba(255, 255, 255, .14); }
body[data-theme="wine"] #progress i { background: var(--rose); }
body[data-theme="wine"] #btns button { border-color: var(--rose-2); color: var(--rose); }
body[data-theme="wine"] #btns button:hover { background: var(--wine-2); }
@media (max-width: 700px) { #btns, #sect { display: none; } }

/* ---------- índice ---------- */
#index { position: fixed; inset: 0; background: rgba(42, 29, 26, .5); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; z-index: 9; }
#index.open { opacity: 1; visibility: visible; }
#index .panel { position: absolute; left: 0; top: 0; bottom: 0; width: min(540px, 100%); background: var(--cream); color: var(--ink); padding: 36px 32px 60px; overflow: auto; transform: translateX(-100%); transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
#index.open .panel { transform: none; }
#index h4 { font: 400 28px var(--serif); margin: 30px 0 8px; color: var(--wine); }
#index h4:first-child { margin-top: 0; }
#index .item { display: flex; gap: 14px; width: 100%; text-align: left; background: none; border: 0; padding: 10px 10px; font: 400 18px/1.3 var(--sans); color: var(--ink); cursor: pointer; border-radius: 10px; }
#index .item:hover { background: var(--cream-2); }
#index .item.cur { background: var(--tag-rose); }
#index .item .n { color: var(--muted); min-width: 28px; font-variant-numeric: tabular-nums; }
#index .keys { margin: 36px 0 0; font-size: 14px; line-height: 1.8; color: var(--muted); }
#index .keys b { font-weight: 600; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 1px 8px; }
#black { position: fixed; inset: 0; background: #000; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; z-index: 8; }
#black.on { opacity: 1; visibility: visible; }

/* ---------- modo impresión (PDF de respaldo) ---------- */
body.print { overflow: visible; background: var(--cream); }
body.print #viewport { position: static; overflow: visible; }
body.print #stage { position: static; transform: none; width: 1920px; height: auto; overflow: visible; }
body.print .slide { position: relative; visibility: visible; opacity: 1; height: 1080px; break-after: page; }
body.print .in, body.print [data-step], body.print .w { opacity: 1 !important; }
body.print .bars .bar { transform: none; }
body.print #hud, body.print #index, body.print #black, body.print .hint { display: none; }
@page { size: 1920px 1080px; margin: 0; }
