/* =========================================================
   Yokot'an · presentación (borrador)
   Lienzo fijo de 1920×1080 que se escala a la pantalla.
   Misma identidad que la página: bordado, flores, colores,
   Bricolage Grotesque + Andika y las mismas fotos.
   ========================================================= */
:root {
  --cotton: #FBFBF8;
  --cotton-2: #F1F0EC;
  --ink: #151214;
  --ink-2: #4B4347;
  --on-ink: #F4F0EC;
  --on-ink-2: #C8BFC3;
  --rose: #D02462;
  --cobalt: #2747C9;
  --maize: #F4BE1C;
  --leaf: #167A46;
  --red: #D52A2E;

  --display: "Bricolage Grotesque", "Andika", system-ui, sans-serif;
  --body: "Andika", system-ui, sans-serif;

  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-io: cubic-bezier(.77, 0, .175, 1);
  --s: 1;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--ink); overflow: hidden; }
body { font-family: var(--body); color: var(--ink); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
button { font: inherit; }
::selection { background: var(--maize); color: var(--ink); }

/* ===== Escenario 16:9 escalado ===== */
.deck { position: fixed; inset: 0; overflow: hidden; background: var(--ink); }
.stage {
  position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px;
  transform: translate(-50%, -50%) scale(var(--s)); transform-origin: 50% 50%;
  overflow: hidden; background: var(--cotton);
  font-size: 34px; line-height: 1.45;
}
.slide {
  position: absolute; inset: 0; overflow: hidden;
  visibility: hidden; z-index: 0;
}
.slide.is-on { visibility: visible; z-index: 1; }
.pad { position: relative; z-index: 2; padding: 150px 150px 120px; height: 100%; }

.slide--cotton { background: var(--cotton); color: var(--ink); }
.slide--mist { background: var(--cotton-2); color: var(--ink); }
.slide--ink { background: var(--ink); color: var(--on-ink); }
.slide--maize { background: var(--maize); color: var(--ink); }
.slide--rose { background: var(--rose); color: #fff; }

/* ===== Tipografía ===== */
.kicker {
  margin: 0 0 22px; font-family: var(--display); font-weight: 700; font-size: 26px;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2);
}
.kicker--light { color: var(--on-ink-2); }
.slide--rose .kicker--light { color: rgba(255,255,255,.8); }
.title {
  margin: 0 0 40px; font-family: var(--display); font-weight: 800;
  font-size: 118px; line-height: .98; letter-spacing: -.03em; text-wrap: balance;
}
.title--sm { font-size: 96px; }
.title--light { color: var(--on-ink); }
.body { margin: 0 0 28px; font-size: 38px; line-height: 1.45; max-width: 30em; }
.body--light { color: var(--on-ink-2); }
.body--light strong { color: var(--on-ink); }
.caption { margin: 0; font-size: 24px; color: var(--ink-2); }
.caption--light { color: var(--on-ink-2); }
.hl { padding: 0 .18em; border-radius: .2em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hl--rose { background: var(--rose); color: #fff; }
.hl--maize { background: var(--maize); color: var(--ink); }
.hint { margin: 18px 0 0; text-align: center; font-size: 22px; color: var(--ink-2); }

/* ===== Bandas de bordado (se mueven solas, sólo transform) ===== */
.sband { position: absolute; left: 0; right: 0; height: 104px; overflow: hidden; z-index: 3; pointer-events: none; }
.sband--top { top: 0; }
.sband--bottom { bottom: 0; }
.sband i {
  --tw: calc(104px * 200 / 110);
  position: absolute; top: 0; bottom: 0; left: 0; width: calc(100% + var(--tw) * 2);
  background: url("../assets/bordado.svg") repeat-x left center / auto 100%;
  animation: drift 7s linear infinite; animation-play-state: paused; will-change: transform;
}
.sband--bottom i { animation-direction: reverse; }
.slide.is-on .sband i { animation-play-state: running; }
@keyframes drift { to { transform: translateX(calc(var(--tw) * -1)); } }
.slide--ink .sband, .slide--rose .sband { background: var(--cotton); }
.slide--maize .sband { background: var(--cotton); }

/* ===== Flores y hojas bordadas ===== */
.flor, .hoja {
  position: absolute; left: var(--x); top: var(--y); z-index: 4; pointer-events: none;
  width: var(--z, 90px); height: var(--z, 90px); margin: calc(var(--z, 90px) / -2) 0 0 calc(var(--z, 90px) / -2);
}
.hoja { --z: 64px; height: 86px; margin-top: -43px; }
.flor svg, .hoja svg { width: 100%; height: 100%; overflow: visible; display: block; }
.flor svg { animation: sway 6s ease-in-out infinite alternate; transform-origin: 50% 50%; }
.hoja svg { transform: rotate(var(--r, 0deg)); transform-origin: 50% 100%; }
@keyframes sway { from { transform: rotate(-8deg); } to { transform: rotate(10deg); } }
.flor--rose { color: #E0306B; }
.flor--cobalt { color: #4F6BE8; }
.flor--maize { color: #F4BE1C; }
.flor--leaf { color: #22A562; }
.flor--red { color: #D52A2E; }

/* ===== 1 · Portada ===== */
.s-cover__copy { position: absolute; left: 150px; top: 230px; width: 860px; z-index: 2; }
.s-cover__title {
  margin: 0 0 30px -8px; font-family: var(--display); font-weight: 800;
  font-size: 250px; line-height: .86; letter-spacing: -.045em;
}
.s-cover__lead { margin: 0 0 30px; font-size: 46px; line-height: 1.25; max-width: 15em; }
.s-cover__meta { margin: 0; font-size: 30px; color: var(--ink-2); }
.s-cover__meta strong { font-family: var(--display); font-size: 1.5em; color: var(--rose); font-variant-numeric: tabular-nums; }
.s-cover__meta span { white-space: nowrap; }
.s-cover__photo { position: absolute; right: 120px; top: 170px; width: 700px; height: 740px; margin: 0; border-radius: 30px; overflow: hidden; z-index: 2; }
.s-cover__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 40%; }
figcaption {
  position: absolute; left: 16px; bottom: 16px; right: 16px; width: fit-content; max-width: calc(100% - 32px);
  padding: 8px 14px; border-radius: 10px; background: rgba(21,18,20,.78); color: #fff; font-size: 18px; line-height: 1.35;
}

/* ===== 2 · palabras + foto del rezandero ===== */
.s-what__text { width: 1150px; padding-top: 140px; }
.eqwords { display: flex; align-items: stretch; gap: 26px; margin: 24px 0 26px; }
.wcard { flex: 1; padding: 30px 36px; border-radius: 30px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.wcard b { font-family: var(--display); font-weight: 800; font-size: 92px; line-height: 1; letter-spacing: -.03em; }
.wcard span { font-size: 30px; }
.wcard--rose { background: var(--rose); color: #fff; }
.wcard--cobalt { background: var(--cobalt); color: #fff; }
.wcard--maize { background: var(--maize); color: var(--ink); }
.wcard--wide { flex-direction: row; align-items: baseline; gap: 26px; margin-bottom: 40px; }
.eqwords__op { align-self: center; font-family: var(--display); font-weight: 800; font-size: 86px; color: var(--on-ink-2); }
.s-what__img { position: absolute; right: 0; top: 0; bottom: 0; width: 620px; margin: 0; overflow: hidden; z-index: 1; }
.s-what__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }

/* ===== 3 · texto + foto ===== */
.s-split__text { width: 1010px; }
.bigquote { margin: 10px 0 40px; font-family: var(--display); font-weight: 700; font-size: 66px; line-height: 1.12; letter-spacing: -.02em; }
.s-split__img { position: absolute; right: 0; top: 0; bottom: 0; width: 760px; margin: 0; overflow: hidden; z-index: 1; }
.s-split__img img { width: 100%; height: 100%; object-fit: cover; }

/* ===== 4 · dónde ===== */
.s-where__grid { display: grid; grid-template-columns: 1fr 820px; gap: 80px; padding-top: 170px; }
.megastat { margin: 0; font-family: var(--display); font-weight: 800; font-size: 210px; line-height: .9; letter-spacing: -.04em; color: var(--rose); font-variant-numeric: tabular-nums; }
.s-where .body { font-size: 34px; margin-top: 20px; }
.munis { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; align-content: center; }
.munis li { display: flex; gap: 24px; align-items: flex-start; padding: 20px 26px; border-radius: 22px; background: var(--cotton-2); }
.munis i { flex: none; width: 34px; height: 34px; margin-top: 8px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 9px var(--c), inset 0 0 0 20px var(--maize); }
.munis b { display: block; font-family: var(--display); font-weight: 800; font-size: 42px; line-height: 1.1; }
.munis span { display: block; font-size: 25px; line-height: 1.35; color: var(--ink-2); }

/* ===== 5 · variantes + abanicos ===== */
.s-variants__text { width: 1210px; padding-top: 140px; }
.s-variants .title { font-size: 92px; margin-bottom: 30px; }
.s-variants .body { max-width: 26em; font-size: 34px; }
.vars { list-style: none; padding: 0; margin: 34px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; max-width: 1060px; }
.vars li {
  height: 124px; border-radius: 24px; background: var(--cotton); display: flex; align-items: flex-end; padding: 20px 22px;
  border: 4px solid var(--c); position: relative; overflow: hidden;
}
.vars li::before { content: ""; position: absolute; right: -30px; top: -30px; width: 86px; height: 86px; border-radius: 50%; background: var(--c); }
.vars span { font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1; position: relative; white-space: nowrap; }
.s-variants__img { position: absolute; right: 110px; top: 150px; width: 520px; height: 700px; margin: 0; border-radius: 30px; overflow: hidden; z-index: 2; }
.s-variants__img img { width: 100%; height: 100%; object-fit: cover; }

/* ===== 6 · globo (el mismo de la página) ===== */
.s-globe { background: var(--ink); }
.globe__track { position: absolute; inset: 0; transition: background-color .4s; }
.globe__track.is-ocean { background: #2747C9; }
.globe__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.gpanel {
  position: absolute; z-index: 3; left: 110px; top: 110px; width: 600px; padding: 34px 36px 26px;
  border-radius: 30px; background: rgba(21,18,20,.9); border: 2px dashed rgba(244,240,236,.3); color: var(--on-ink);
}
.gpanel .kicker { margin-bottom: 14px; font-size: 22px; }
.gpanel__title { margin: 0 0 24px; font-family: var(--display); font-weight: 800; font-size: 72px; line-height: 1; letter-spacing: -.03em; }
.gsteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.globe__step {
  padding: 14px 20px; border-radius: 18px; border: 2px dashed rgba(244,240,236,.22); color: var(--on-ink-2);
  font-size: 25px; line-height: 1.4; opacity: .5; transition: opacity .35s ease, border-color .35s ease, background-color .35s ease;
}
.globe__step b { color: var(--on-ink); font-family: var(--display); }
.globe__step.is-on { opacity: 1; border-color: var(--maize); border-style: solid; background: rgba(244,190,28,.12); color: var(--on-ink); }
.hint--light { color: var(--on-ink-2); text-align: left; margin-top: 16px; }
/* de cerca (comunidades y Nacajuca): el panel muestra sólo el paso actual para no tapar los puntos */
.gpanel.is-close { width: 520px; }
.gpanel.is-close .globe__step:not(.is-on), .gpanel.is-close .hint--light { display: none; }
.gpanel.is-close .gpanel__title { font-size: 56px; }
.greadout {
  position: absolute; z-index: 3; right: 110px; bottom: 60px; margin: 0; padding: 12px 22px; border-radius: 999px;
  background: rgba(21,18,20,.85); color: var(--on-ink); font-size: 24px; font-variant-numeric: tabular-nums;
}

/* ===== 7 · mapa GPS con el vuelo ===== */
.s-gmap__grid { display: grid; grid-template-columns: 560px 1fr; gap: 50px; padding: 100px 110px 130px; }
.s-gmap__lead { font-size: 28px; margin-bottom: 22px; }
.plist { display: flex; flex-wrap: wrap; gap: 10px; }
.pl {
  appearance: none; display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px 9px 12px; border-radius: 999px;
  border: 1px solid rgba(244,240,236,.22); background: transparent; color: var(--on-ink); font: 21px/1.15 var(--body); cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, transform 160ms var(--ease-out);
}
.pl i { flex: none; width: 13px; height: 13px; border-radius: 50%; background: var(--c); }
@media (hover: hover) and (pointer: fine) { .pl:hover { border-color: rgba(244,240,236,.55); background: rgba(244,240,236,.07); } }
.pl:active { transform: scale(.96); }
.pl[aria-pressed="true"] { background: var(--on-ink); color: var(--ink); border-color: var(--on-ink); }
.pl:focus-visible { outline: 3px solid var(--maize); outline-offset: 2px; }
.s-gmap__main { display: flex; flex-direction: column; min-height: 0; }
.gframe { position: relative; flex: 1; border-radius: 26px; overflow: hidden; background: #2a2427; border: 2px dashed rgba(244,240,236,.35); }
.gframe iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map__fly { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; opacity: 0; visibility: hidden; }
.ginfo { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding-top: 20px; }
.ginfo__place { margin: 0; font-family: var(--display); font-weight: 800; font-size: 56px; line-height: 1; letter-spacing: -.02em; }
.ginfo__muni { margin: 6px 0 0; color: var(--on-ink-2); font-size: 24px; }
.ginfo__coords { margin: 0; display: grid; grid-template-columns: auto auto; gap: 2px 18px; font-size: 26px; font-variant-numeric: tabular-nums; }
.ginfo__coords span { color: var(--on-ink-2); }

/* ===== 17 · fotos tipo collage ===== */
.snap {
  position: absolute; left: var(--x); top: var(--y); z-index: 2; width: 360px; margin: 0;
  padding: 14px 14px 52px; background: #fff; border-radius: 6px; transform: rotate(var(--r));
  box-shadow: 0 2px 0 rgba(21,18,20,.06), 0 18px 40px rgba(21,18,20,.16);
}
.snap img { width: 100%; height: 250px; object-fit: cover; border-radius: 3px; }
.snap figcaption {
  left: 0; right: 0; bottom: 12px; width: auto; max-width: none; margin: 0 auto; text-align: center;
  background: none; color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 22px; padding: 0;
}

/* ===== 9 · trilateración ===== */
.s-tri__grid { display: grid; grid-template-columns: 1fr 820px; gap: 80px; align-items: center; padding-top: 90px; padding-bottom: 80px; }
.s-tri .body { font-size: 32px; }
.tsteps { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 14px; }
.tsteps li { display: flex; gap: 20px; align-items: flex-start; padding: 18px 22px; border-radius: 22px; border: 3px solid transparent; background: var(--cotton-2); transition: border-color 300ms ease, background-color 300ms ease; }
.tsteps li.is-cur { border-color: var(--ink); background: #fff; }
.tsteps span { flex: none; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; font: 800 28px var(--display); }
.tsteps b { font-family: var(--display); font-size: 32px; line-height: 1.2; }
.tsteps p { margin: 4px 0 0; font-size: 25px; line-height: 1.35; color: var(--ink-2); }
.s-tri__fig svg { width: 820px; height: 820px; display: block; background: #fff; border-radius: 30px; border: 3px dashed rgba(21,18,20,.25); }

/* ---- trilateración sobre el mapa (trimap.js), a la escala de la presentación ---- */
.s-tri__grid:has(.has-trimap) { grid-template-columns: 1fr 900px; gap: 70px; }
.s-tri__fig.has-trimap > svg { display: none; }
.s-tri .trimap { gap: 16px; }
.s-tri .trimap__bar { gap: 12px; }
.s-tri .trimap__field > span, .s-tri .trimap__lbl { font-size: 20px; }
.s-tri .trimap select { font-size: 24px; padding: 13px 48px 13px 18px; border-radius: 16px; background-size: 22px; background-position: right 14px center; border-width: 3px; }
.s-tri .trimap__field--target select { font-size: 28px; }
.s-tri .trimap__refs { gap: 12px; }
.s-tri .trimap__ref i { left: 12px; width: 32px; height: 32px; margin-top: -16px; font-size: 17px; }
.s-tri .trimap__ref select { padding-left: 54px; font-size: 22px; }
.s-tri .trimap__map { aspect-ratio: auto; height: 560px; max-height: none; min-height: 0; border-radius: 30px; border: 3px dashed rgba(21,18,20,.25); }
.s-tri .leaflet-tooltip.trimap__tip { font-size: 19px; padding: 8px 16px 8px 12px; gap: 9px; }
.s-tri .leaflet-tooltip.trimap__tip i { width: 11px; height: 11px; }
.s-tri .leaflet-tooltip.trimap__tip--target { font-size: 23px; padding: 10px 20px 10px 14px; }
.s-tri .leaflet-tooltip.trimap__tip--target i { width: 14px; height: 14px; }
.s-tri .leaflet-tooltip.trimap__tip--km { font-size: 18px; padding: 6px 13px; }
.s-tri .yk-mapstyle.trimap__style { left: 16px; top: 16px; padding: 4px; }
.s-tri .yk-mapstyle button { font-size: 19px; padding: 10px 20px; }
.s-tri .leaflet-control-zoom a { width: 46px; height: 46px; line-height: 46px; font-size: 26px; }
.s-tri .leaflet-control-attribution { font-size: 13px; }
.s-tri .hint { margin-top: 12px; }

/* pasos compactos: sólo el paso actual muestra su explicación (así cabe todo) */
.s-tri:has(.has-trimap) .tsteps li:not(.is-cur) p { display: none; }
.s-tri:has(.has-trimap) .tsteps li:not(.is-cur) { padding-top: 12px; padding-bottom: 12px; align-items: center; }
.s-tri:has(.has-trimap) .tsteps li:not(.is-cur) span { width: 42px; height: 42px; font-size: 24px; }
.s-tri:has(.has-trimap) .body { font-size: 29px; margin-bottom: 20px; }

/* pasos 4 y 5: el cuadro de ecuaciones toma el lugar de la definición y los pasos */
.s-tri .trimap__math { display: none; }
.s-tri.is-math .trimap__math { display: block; animation: triMathIn 420ms cubic-bezier(.23, 1, .32, 1) both; }
.s-tri.is-math .tsteps, .s-tri.is-math .body { display: none; }
@keyframes triMathIn { from { opacity: 0; transform: translateY(18px); } }
.s-tri .trimap__math { padding: 18px 24px 22px; border-radius: 28px; border-width: 3px; }
.s-tri .trimap__tabs { padding: 5px; margin-bottom: 18px; }
.s-tri .trimap__tab { font-size: 24px; padding: 13px 16px; }
.s-tri .trimap__mt { font-size: 28px; }
.s-tri .trimap__eq { font-size: 46px; margin: 10px 0 16px; }
.s-tri .trimap__rows { gap: 14px; }
.s-tri .trimap__rows li { gap: 16px; }
.s-tri .trimap__rows li > i { width: 40px; height: 40px; font-size: 20px; }
.s-tri .trimap__rows b { font-size: 21px; }
.s-tri .trimap__calc { font-size: 31px; }
.s-tri .trimap__legend { font-size: 19px; margin-top: 16px; }
.s-tri .trimap__solve { grid-template-columns: 1fr; gap: 6px; }
.s-tri .trimap__sys--sol { grid-template-columns: 1fr 1fr; }
.s-tri .trimap__note { font-size: 20px; margin: 14px 0 8px; }
.s-tri .trimap__rows--circ { gap: 10px; }
.s-tri .trimap__rows--circ li > i { width: 34px; height: 34px; font-size: 17px; }
.s-tri .trimap__rows--circ .trimap__calc { font-size: 23px; }
.s-tri .trimap__sys { font-size: 25px; padding: 10px 16px; border-radius: 14px; border-left-width: 5px; gap: 6px; }
.s-tri .trimap__res { font-size: 23px; padding: 12px 20px; margin-top: 18px; }
.river { fill: none; stroke: #9cc3e6; stroke-width: 14; stroke-linecap: round; opacity: .55; }
.river--thin { stroke-width: 7; }
.ring circle { fill: none; stroke-width: 4; stroke-dasharray: 9 6; }
.ring--1 circle { stroke: var(--rose); }
.ring--2 circle { stroke: var(--cobalt); }
.ring--3 circle { stroke: var(--leaf); }
.sat circle { fill: var(--ink); }
.sat path { stroke: var(--ink); stroke-width: 6; stroke-linecap: round; }
.sat text { font: 700 17px var(--display); text-anchor: middle; fill: var(--ink); }
.ghost circle { fill: var(--cobalt); fill-opacity: .25; stroke: var(--cobalt); stroke-width: 3; }
.target circle { fill: var(--red); }
.target .target__halo { fill: var(--maize); fill-opacity: .55; }
.target text { font: 800 24px var(--display); text-anchor: middle; fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 6px; }

/* ===== 10 · fórmula ===== */
.s-eq .pad { padding-top: 140px; }
.eq { display: flex; align-items: baseline; gap: 50px; margin: 10px 0 40px; font-family: var(--display); font-weight: 800; font-size: 230px; line-height: 1; }
.eq__v { font-style: italic; color: var(--c); display: inline-block; }
.eq__o { color: var(--ink-2); font-weight: 500; display: inline-block; }
.gloss { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.gloss div { padding: 26px 30px; border-radius: 24px; background: #fff; border-top: 8px solid var(--c); }
.gloss dt { font-family: var(--display); font-weight: 800; font-size: 54px; line-height: 1; color: var(--c); margin-bottom: 8px; }
.gloss dd { margin: 0; font-size: 27px; line-height: 1.35; }
.gloss--2 { grid-template-columns: repeat(2, 1fr); }
.gloss--2 dt { font-size: 44px; }

/* ===== 11 · cálculo ===== */
.s-calc .pad { padding-top: 150px; }
.s-calc .title { font-size: 100px; margin-bottom: 30px; }
.s-calc .body { font-size: 32px; margin-bottom: 14px; }
.calc {
  margin: 0 0 26px; width: fit-content; padding: 22px 36px; border-radius: 22px;
  font-family: var(--display); font-weight: 700; font-size: 66px; line-height: 1.1;
  background: rgba(244,240,236,.08); border: 2px dashed rgba(244,240,236,.3); font-variant-numeric: tabular-nums;
}
.calc { font-size: 58px; }
.calc--res { background: var(--maize); color: var(--ink); border-color: var(--maize); font-size: 84px; }
.calc--dark { background: var(--cotton-2); border-color: rgba(21,18,20,.2); font-size: 42px; white-space: nowrap; }
.s-calc .body { margin-top: 26px; max-width: 34em; }

/* ===== 12 · reloj ===== */
.s-clock__grid { display: grid; grid-template-columns: 640px 1fr; gap: 110px; align-items: center; padding-top: 100px; }
.s-clock__face svg { width: 560px; height: 560px; display: block; margin: 0 auto; }
.cf__rim { fill: #fff; stroke: var(--ink); stroke-width: 5; }
.cf__ticks line { stroke: var(--ink); stroke-linecap: round; }
.cf__h, .cf__m { stroke: var(--ink); stroke-linecap: round; }
.cf__h { stroke-width: 7; }
.cf__m { stroke-width: 4.5; }
.cf__s { stroke: var(--rose); stroke-width: 2.2; stroke-linecap: round; }
.cf__pin { fill: var(--rose); }
.s-clock__time { margin: 26px 0 0; text-align: center; font-family: var(--display); font-weight: 800; font-size: 74px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--rose); }
.s-clock__time small { display: block; margin-top: 10px; font-family: var(--body); font-weight: 400; font-size: 24px; color: var(--ink-2); }

/* ===== 13 · flujo ===== */
.s-flow .pad { padding-top: 150px; }
.flow { position: relative; margin-top: 50px; }
.flow__thread { position: absolute; left: 50px; right: 330px; top: 50px; border-top: 5px dashed rgba(244,240,236,.5); }
.flow ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px; position: relative; }
.flow li { padding-right: 10px; }
.flow li span { display: grid; place-items: center; width: 100px; height: 100px; border-radius: 50%; background: var(--c); color: #fff; font: 800 50px var(--display); margin-bottom: 26px; box-shadow: 0 0 0 10px var(--ink); }
.flow li:first-child span { color: var(--ink); }
.flow b { display: block; font-family: var(--display); font-weight: 800; font-size: 46px; line-height: 1.1; margin-bottom: 12px; }
.flow p { margin: 0; font-size: 28px; line-height: 1.4; color: var(--on-ink-2); }
.flow p strong { color: #fff; white-space: nowrap; }

/* ===== 14 · coordenadas ===== */
.s-coords .pad { padding-top: 140px; }
.coord { display: flex; align-items: baseline; flex-wrap: wrap; gap: 20px 34px; margin: 0 0 50px; font-family: var(--display); }
.coord__place { font-weight: 800; font-size: 80px; }
.coord b { font-weight: 800; font-size: 80px; padding: 4px 26px; border-radius: 18px; font-variant-numeric: tabular-nums; }
.coord__lat { background: var(--rose); color: #fff; }
.coord__lng { background: var(--cobalt); color: #fff; }
.s-coords .gloss div { background: var(--cotton-2); }

/* ===== 15 · conclusión ===== */
.s-end__grid { display: grid; grid-template-columns: 1fr 500px; gap: 80px; align-items: center; padding-top: 150px; padding-bottom: 140px; }
.s-end__big { margin: 0 0 30px; font-family: var(--display); font-weight: 800; font-size: 96px; line-height: 1; letter-spacing: -.03em; }
.s-end__big u { text-decoration-color: var(--maize); text-decoration-thickness: .1em; text-underline-offset: .12em; }
.s-end .body--light { color: rgba(255,255,255,.9); font-size: 30px; max-width: none; margin-bottom: 26px; }
.s-end__quote { margin: 0; padding: 22px 28px; border-radius: 22px; background: rgba(21,18,20,.22); border-left: 8px solid var(--maize); }
.s-end__quote p { margin: 0; font-size: 26px; line-height: 1.4; color: #fff; }
.s-end__quote p[lang] { margin-bottom: 8px; font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1.2; }
.s-end__quote span { color: rgba(255,255,255,.75); white-space: nowrap; }
.s-end__img { position: relative; margin: 0; width: 500px; height: 500px; border-radius: 30px; overflow: hidden; background: #fff; }
.s-end__img img { width: 100%; height: 100%; object-fit: cover; }
.s-end__img figcaption { font-size: 16px; }

/* ===== 16 · créditos ===== */
.s-credits__grid { display: grid; grid-template-columns: 1fr 760px; gap: 100px; padding-top: 120px; }
.fill { margin: 0; }
.fill div { display: grid; grid-template-columns: 240px 1fr; gap: 20px; padding: 18px 0; border-top: 1px solid rgba(244,240,236,.18); }
.fill dt { color: var(--on-ink-2); font-size: 26px; padding-top: 4px; }
.fill dd { margin: 0; font-weight: 700; font-size: 32px; line-height: 1.3; }
.team { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.team li { position: relative; padding-left: 34px; font-size: 28px; line-height: 1.35; }
.team li::before { content: ""; position: absolute; left: 0; top: .5em; width: 14px; height: 14px; border-radius: 50%; background: var(--rose); }
.team li:nth-child(4n+2)::before { background: var(--maize); }
.team li:nth-child(4n+3)::before { background: #4F6BE8; }
.team li:nth-child(4n+4)::before { background: #22A562; }

/* ===== 17 · fuentes ===== */
.sources { margin: 0; padding-left: 1.1em; display: grid; gap: 18px; font-size: 32px; line-height: 1.35; max-width: 44em; }
.sources li::marker { color: var(--rose); }

/* ===== 18 · gracias ===== */
.s-thanks__in { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; z-index: 3; pointer-events: none; }
.s-thanks__title { margin: 0; font-family: var(--display); font-weight: 800; font-size: 220px; line-height: .9; letter-spacing: -.045em; }
.s-thanks__q { margin: 20px 0 30px; font-family: var(--display); font-weight: 700; font-size: 72px; color: var(--rose); }

/* ===== Telón de transición ===== */
.curtain { position: absolute; inset: 0; z-index: 50; visibility: hidden; background: var(--rose); pointer-events: none; }
.curtain__band {
  position: absolute; left: 0; right: 0; top: 0; height: 130px;
  background: var(--cotton) url("../assets/bordado.svg") repeat-x left center / auto 100%;
}
.curtain__band--b { top: auto; bottom: 0; }

/* ===== Controles (fuera del lienzo, siempre nítidos) ===== */
.ctrl {
  position: fixed; right: 18px; bottom: 22px; z-index: 10; display: flex; align-items: center; gap: 6px;
  padding: 6px; border-radius: 999px; background: rgba(21,18,20,.82); color: var(--on-ink);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: opacity 250ms ease, transform 250ms var(--ease-out);
}
.ctrl__btn {
  appearance: none; border: 0; background: transparent; color: inherit; cursor: pointer;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  transition: background-color 150ms ease, transform 160ms var(--ease-out);
}
.ctrl__btn:active { transform: scale(.94); }
.ctrl__btn:disabled { opacity: .35; cursor: default; }
@media (hover: hover) and (pointer: fine) { .ctrl__btn:not(:disabled):hover { background: rgba(244,240,236,.14); } }
.ctrl__btn:focus-visible { outline: 2px solid var(--maize); outline-offset: 2px; }
.ctrl__count { min-width: 74px; text-align: center; font: 700 16px/1 var(--display); font-variant-numeric: tabular-nums; }
.deck.is-idle .ctrl { opacity: 0; transform: translateY(8px); }
.deck.is-idle { cursor: none; }

/* hilo de avance: puntadas que se llenan */
.thread { position: fixed; left: 0; right: 0; bottom: 0; height: 5px; z-index: 9; background: repeating-linear-gradient(90deg, rgba(244,240,236,.25) 0 10px, transparent 10px 16px); }
.thread span {
  display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--rose) 0 20%, var(--maize) 20% 40%, var(--leaf) 40% 60%, var(--cobalt) 60% 80%, var(--red) 80%);
  transition: transform 600ms var(--ease-out);
}
.keyhint {
  position: fixed; left: 50%; bottom: 26px; z-index: 10; margin: 0; transform: translateX(-50%);
  padding: 10px 18px; border-radius: 999px; background: rgba(21,18,20,.82); color: var(--on-ink); font-size: 15px;
  transition: opacity 400ms ease; white-space: nowrap;
}
.keyhint.is-gone { opacity: 0; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .sband i, .flor svg { animation: none !important; }
  .thread span { transition: none; }
}
@media (max-width: 700px) {
  .keyhint { display: none; }
  .ctrl { right: 10px; bottom: 12px; }
}

/* ===== Pantalla de carga de la presentación ===== */
.pre {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; overflow: hidden;
  background: var(--ink); color: var(--on-ink); text-align: center;
}
.pre__band { position: absolute; left: 0; right: 0; top: 0; height: clamp(56px, 9vh, 96px); overflow: hidden; background: var(--cotton); }
.pre__band--b { top: auto; bottom: 0; }
.pre__band i {
  --tw: calc(clamp(56px, 9vh, 96px) * 200 / 110);
  position: absolute; inset: 0 auto 0 0; width: calc(100% + var(--tw) * 2);
  background: url("../assets/bordado.svg") repeat-x left center / auto 100%;
  animation: drift 7s linear infinite;
}
.pre__band--b i { animation-direction: reverse; }
.pre__in { display: grid; justify-items: center; gap: 18px; padding: 0 24px; }
.pre__kicker { margin: 0; font: 700 clamp(13px, 1.2vw, 17px) var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--on-ink-2); }
.pre__word { margin: 0 0 8px; font-family: var(--display); font-weight: 800; font-size: clamp(64px, 12vw, 190px); line-height: .9; letter-spacing: -.045em; }
.pre__load { display: grid; justify-items: center; gap: 12px; }
.pre__bar { width: min(460px, 72vw); height: 8px; border-radius: 99px; background: rgba(244,240,236,.14); overflow: hidden; }
.pre__bar span {
  display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(0); transition: transform 300ms ease;
  background: linear-gradient(90deg, var(--rose) 0 20%, var(--maize) 20% 40%, var(--leaf) 40% 60%, var(--cobalt) 60% 80%, var(--red) 80%);
}
.pre__msg { margin: 0; font-size: clamp(14px, 1.2vw, 17px); color: var(--on-ink-2); }
.pre__msg b { color: var(--on-ink); font-variant-numeric: tabular-nums; }
.pre__go {
  appearance: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 30px 16px 34px; border-radius: 999px; background: var(--maize); color: var(--ink);
  font: 800 clamp(19px, 1.7vw, 24px) var(--display);
  transition: transform 160ms var(--ease-out), background-color 200ms ease, opacity 300ms ease;
}
@media (hover: hover) and (pointer: fine) { .pre__go:hover { background: #ffd23f; } }
.pre__go:active { transform: scale(.97); }
.pre__go:focus-visible { outline: 3px solid var(--on-ink); outline-offset: 4px; }
.pre__hint { margin: 0; font-size: clamp(13px, 1.1vw, 15px); color: var(--on-ink-2); }
.pre__back { margin-top: 6px; font-size: 14px; color: var(--on-ink-2); text-decoration: underline; text-underline-offset: 3px; }
.pre__back:hover { color: var(--on-ink); }
.is-pre .ctrl, .is-pre .keyhint, .is-pre .thread { visibility: hidden; }

/* ===== Salir al modo normal ===== */
.ctrl__sep { width: 1px; height: 24px; margin: 0 4px; background: rgba(244,240,236,.22); }
.ctrl__exit {
  display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 16px 0 12px; border-radius: 999px;
  color: var(--on-ink); text-decoration: none; font: 700 15px/1 var(--display);
  transition: background-color 150ms ease, transform 160ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .ctrl__exit:hover { background: var(--rose); } }
.ctrl__exit:active { transform: scale(.96); }
.ctrl__exit:focus-visible { outline: 2px solid var(--maize); outline-offset: 2px; }
.s-thanks__back {
  justify-self: center; margin-top: 34px; padding: 16px 30px; border-radius: 999px; pointer-events: auto;
  background: var(--ink); color: var(--on-ink); text-decoration: none; font: 800 30px var(--display);
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
@media (hover: hover) and (pointer: fine) { .s-thanks__back:hover { background: var(--rose); } }
.s-thanks__back:active { transform: scale(.97); }

/* ===== Teléfono acostado (pantalla bajita): la portada de la presentación cabe sin encimarse ===== */
@media (max-height: 520px) {
  .pre__band { height: 34px; }
  .pre__in { gap: 8px; }
  .pre__word { font-size: clamp(48px, 17vh, 96px); margin-bottom: 2px; }
  .pre__kicker { font-size: 11px; }
  .pre__go { padding-block: 10px; }
  .pre__hint { font-size: 12px; }
  .pre__back { margin-top: 0; font-size: 12px; }
}
/* teléfono vertical: la presentación es de 16:9, se ve mejor acostado */
.rotate-hint { display: none; }
@media (orientation: portrait) and (max-width: 600px) {
  .rotate-hint {
    display: flex; align-items: center; gap: 10px; position: fixed; z-index: 60; left: 50%; bottom: 18px; transform: translateX(-50%);
    padding: 10px 16px; border-radius: 999px; background: rgba(244,240,236,.95); color: var(--ink); font: 700 14px/1.2 var(--body);
    box-shadow: 0 8px 24px rgba(0,0,0,.4); white-space: nowrap; pointer-events: none;
  }
  .rotate-hint svg { flex: none; }
}
