/* Gabinete v3 — near-black, Geist + Geist Mono, one signal-blue accent */

:root {
  --bg: #0A0A0A;
  --bg-2: #101010;
  --bg-3: #161616;
  --ink: #EDEDE8;
  --ink-2: #A3A3A0;
  --ink-3: #6B6B68;
  --hair: rgba(237, 237, 232, 0.09);
  --hair-2: rgba(237, 237, 232, 0.16);
  --accent: #7C8CFF;
  --accent-ink: #3546D6;
  --accent-soft: rgba(124, 140, 255, 0.14);
  --paper: #F3F2EE;
  --paper-ink: #151515;
  --wrap: 1180px;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --sec: clamp(7rem, 16vw, 13rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  --fs-xs: clamp(0.72rem, 0.69rem + 0.12vw, 0.8rem);
  --fs-s: clamp(0.9rem, 0.86rem + 0.18vw, 1rem);
  --fs-m: clamp(1.05rem, 0.98rem + 0.32vw, 1.25rem);
  --fs-l: clamp(1.35rem, 1.1rem + 1vw, 2rem);
  --fs-xl: clamp(2rem, 1.3rem + 3vw, 4rem);
  --fs-xxl: clamp(3.2rem, 1rem + 9.6vw, 10.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: var(--sans);
  font-size: var(--fs-m);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
strong { font-weight: 600; }
em { font-style: italic; }
code { font-family: var(--mono); }
::selection { background: var(--accent); color: #0A0A0A; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--pad) * 2); margin: 0 auto; padding: 0 var(--pad); }
.sec { position: relative; padding: var(--sec) 0; }
.sec + .sec { border-top: 1px solid var(--hair); }

/* progress */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 50; pointer-events: none; }
.progress span { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--sp, 0)); }

/* labels + chips */
.label {
  display: inline-flex; align-items: flex-start; gap: 0.7rem;
  font-family: var(--mono); font-size: var(--fs-xs); font-weight: 400;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2);
  margin-bottom: clamp(3rem, 7vw, 5.5rem);
}
.label strong { font-weight: 500; }
.label__dot { margin-top: 0.5em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); flex: none; }
.label--center { justify-content: center; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  display: inline-flex; align-items: center;
  font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: 0.02em;
  padding: 0.42em 0.8em; border-radius: 999px;
  border: 1px solid var(--hair-2); color: var(--ink-2); background: rgba(255,255,255,0.02);
  white-space: nowrap;
}
.chip--paper { border-color: rgba(0,0,0,0.14); color: #3a3a38; background: rgba(0,0,0,0.03); }
.chip--accent { border-color: rgba(124,140,255,0.45); color: var(--accent); background: var(--accent-soft); }
.chip--accent::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 0.6em; animation: blink 2.4s var(--ease) infinite; }

.coda { margin-top: clamp(3.5rem, 8vw, 6rem); text-align: center; color: var(--ink-2); font-size: var(--fs-l); font-weight: 300; letter-spacing: -0.01em; }
.coda--left { text-align: left; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  font-family: var(--sans); font-size: var(--fs-s); font-weight: 500;
  padding: 0.95em 1.5em; border-radius: 999px; line-height: 1.2;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.btn--ghost { border: 1px solid var(--hair-2); color: var(--ink); background: rgba(255,255,255,0.03); }
.btn--ghost:hover { border-color: var(--accent); background: var(--accent-soft); }
.btn--solid { background: #0A0A0A; color: #fff; padding: 1.15em 2em; font-size: var(--fs-m); }
.btn--solid strong { font-weight: 500; }
.btn--solid:hover { background: var(--accent-ink); transform: translateY(-1px); }

/* reveal */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- 00 hero ---------- */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: grid;
  grid-template-rows: minmax(0, 1.6fr) auto auto minmax(0, 0.35fr);
  align-content: stretch;
  padding: 0;
  overflow: hidden; isolation: isolate;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: -1; pointer-events: none; }
html:not(.js) .hero { background: radial-gradient(28% 22% at 50% 42%, rgba(124,140,255,0.18), rgba(124,140,255,0.04) 55%, transparent 100%), var(--bg); }
.hero__inner { position: relative; grid-row: 2; display: flex; flex-direction: column; padding: 0; }
.hero__core {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  /* room for the short light field just above the title */
  padding-top: clamp(2.5rem, 6.5vh, 4.5rem);
}
.hero__title { font-size: clamp(2.85rem, 0.85rem + 6.6vw, 7.6rem); line-height: 0.94; letter-spacing: -0.055em; font-weight: 600; margin-bottom: clamp(1.25rem, 3vh, 2rem); }
.hero__title strong { font-weight: 600; }
.hero__line { display: block; }
.hero__line--a { color: var(--ink-3); }
.hero__line--b { color: var(--ink); }
.hero__lede { max-width: 42ch; font-size: var(--fs-l); line-height: 1.4; color: var(--ink-2); font-weight: 300; letter-spacing: -0.01em; text-align: center; text-wrap: balance; }
.hero__lede strong { color: var(--ink); font-weight: 500; }
.btn--hero { margin-top: clamp(1.75rem, 4.5vh, 2.75rem); background: var(--ink); color: #0A0A0A; border: 1px solid var(--ink); }
.btn--hero:hover { background: #fff; border-color: #fff; box-shadow: 0 0 0 6px var(--accent-soft), 0 0 40px -6px rgba(124,140,255,0.55); }
@media (max-width: 700px) {
  /* Midpoint between bottom-biased stack and the old too-high layout */
  .hero { grid-template-rows: minmax(0, 1.25fr) auto auto minmax(0, 0.7fr); }
  .hero__core { padding-top: clamp(2rem, 5.5vh, 3.25rem); }
  .hero__lede { font-size: var(--fs-s); line-height: 1.45; max-width: 274px; text-align: justify; text-wrap: pretty; }
}
@media (max-width: 480px) {
  .hero__core { padding-top: clamp(2.25rem, 7vh, 3.75rem); }
  .hero__title { letter-spacing: -0.05em; }
  .hero__lede { max-width: 274px; }
}

/* motif — slim horizon line + soft core (premium, does not compete with top beam) */
.motif { position: relative; width: 100%; }
.motif--hero {
  grid-row: 3;
  position: relative;
  height: clamp(40px, 5.5vh, 56px);
  margin-top: clamp(1.25rem, 3vh, 2rem);
  margin-bottom: clamp(0.35rem, 1.2vh, 0.9rem);
  display: flex; align-items: center; justify-content: center;
}
.motif__ray {
  display: block;
  width: min(42vw, 420px);
  height: 1px;
  border-radius: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(237, 237, 232, 0.12) 18%,
    rgba(124, 140, 255, 0.45) 48%,
    rgba(237, 237, 232, 0.85) 50%,
    rgba(124, 140, 255, 0.45) 52%,
    rgba(237, 237, 232, 0.12) 82%,
    transparent 100%
  );
  box-shadow: 0 0 18px -2px rgba(124, 140, 255, 0.35);
}
.motif__core {
  position: absolute;
  left: 50%; top: 50%;
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: #EDEDE8;
  box-shadow:
    0 0 0 3px rgba(124, 140, 255, 0.16),
    0 0 14px 2px rgba(124, 140, 255, 0.55),
    0 0 28px 4px rgba(124, 140, 255, 0.22);
  animation: motif-pulse 5.5s ease-in-out infinite;
}
@keyframes motif-pulse {
  0%, 100% { opacity: 0.75; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.08); }
}
@media (max-width: 700px) {
  .motif--hero { height: 36px; margin-top: clamp(1.1rem, 2.8vh, 1.6rem); }
  .motif__ray { width: min(58vw, 260px); }
  .motif__core { width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .motif__core { animation: none; opacity: 0.95; transform: none; }
}

.motif--full { height: 40px; display: flex; align-items: center; margin: clamp(3rem, 7vw, 5rem) auto; max-width: 720px; }
.motif--full .motif__line { display: block; width: 100%; height: 2px; background: #0A0A0A; transform-origin: 50% 50%; transform: scaleX(0); transition: transform 1.6s var(--ease) .2s; }
.motif--full.is-in .motif__line, html:not(.js) .motif--full .motif__line { transform: scaleX(1); }

/* ---------- 01 plataformas ---------- */
.plat__grid { display: grid; grid-template-columns: 1fr 56px 1fr; align-items: stretch; }
.panel { position: relative; border-radius: 22px; padding: clamp(1.75rem, 3.5vw, 3rem); display: flex; flex-direction: column; gap: 2rem; min-height: 360px; }
.panel__top { display: flex; align-items: center; height: 28px; }
.panel__text { font-size: var(--fs-m); line-height: 1.55; flex: 1; max-width: 36ch; }
.panel__name { display: block; font-size: var(--fs-l); line-height: 1.15; letter-spacing: -0.025em; font-weight: 600; margin-bottom: 0.9rem; }
.panel--paper {
  background:
    repeating-linear-gradient(to bottom, transparent 0 31px, rgba(0,0,0,0.045) 31px 32px),
    var(--paper);
  color: #3b3b39;
  box-shadow: 0 30px 80px -40px rgba(0,0,0,0.8), inset 0 0 0 1px rgba(255,255,255,0.6);
}
.panel--paper .panel__name { color: var(--paper-ink); }
.panel__glyph { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1.5px solid #151515; border-radius: 6px; font-weight: 700; font-size: 14px; color: #151515; background: #fff; }
.panel--screen {
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(124,140,255,0.10), transparent 60%),
    linear-gradient(var(--bg-3), var(--bg-2));
  border: 1px solid var(--hair-2);
  color: var(--ink-2);
}
.panel--screen .panel__name { color: var(--ink); }
.panel__lights { display: inline-flex; gap: 6px; }
.panel__lights i { width: 9px; height: 9px; border-radius: 50%; background: var(--hair-2); }
.panel__lights i:last-child { background: var(--accent); }
.plat__bridge { position: relative; }
.plat__bridge span { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: repeating-linear-gradient(90deg, var(--ink-3) 0 4px, transparent 4px 8px); }
.plat__bridge span::before, .plat__bridge span::after { content: ""; position: absolute; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.plat__bridge span::before { left: -3px; }
.plat__bridge span::after { right: -3px; background: var(--accent); }

.connectors { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.5rem; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.connectors li:not(.sep) { font-family: var(--mono); font-size: var(--fs-xs); color: var(--ink-2); padding: 0.4em 0.8em; border: 1px solid var(--hair-2); border-radius: 8px; background: var(--bg-2); }
.connectors .sep, .book__tabs .sep { font-size: 0; width: 0; overflow: hidden; }

/* ---------- 02 criterio ---------- */
#recorrido .label { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
#recorrido .beam { position: relative; margin: 0; height: clamp(540px, 78vh, 820px); overflow: hidden; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
#recorrido .beam__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#recorrido .beam::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, var(--bg), transparent 9%, transparent 88%, var(--bg)); }
html:not(.js) #recorrido .beam { background: radial-gradient(40% 55% at 50% 32%, rgba(124,140,255,0.28), transparent 70%), var(--bg); }
#recorrido .beam__glow {
  position: absolute; left: 50%; top: 30%; width: 560px; height: 560px; margin: -280px 0 0 -280px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(214,220,255,0.50), rgba(124,140,255,0.16) 32%, rgba(124,140,255,0.04) 62%, transparent 100%);
  mix-blend-mode: screen; pointer-events: none; opacity: 0; will-change: transform, opacity;
}
#recorrido .beam__line { position: absolute; left: 50%; top: 0; width: 1px; height: 30%; background: linear-gradient(to top, rgba(237,237,232,0.9), rgba(237,237,232,0)); opacity: 0; pointer-events: none; }
#recorrido .beam__tag {
  position: absolute; z-index: 1; display: inline-flex; align-items: center; gap: 0.65em; margin: 0;
  font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2);
  opacity: 0; transition: opacity 1.2s var(--ease); pointer-events: none; white-space: nowrap;
}
#recorrido .beam__tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; flex: none; }
#recorrido .beam__tag--lib { left: var(--pad); bottom: 14%; }
#recorrido .beam__tag--lib::before { background: var(--ink); }
#recorrido .beam__tag--work { right: var(--pad); bottom: 14%; }
#recorrido .beam__tag--work::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
#recorrido .beam__tag--me { left: 50%; top: 30%; transform: translate(22px, -50%); color: var(--ink); }
#recorrido .beam__tag--me::before { display: none; }
#recorrido .beam.is-lit .beam__tag { opacity: 1; }
#recorrido .beam__sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
#recorrido .beam__say { margin-top: clamp(1.5rem, 3vw, 2.5rem); font-size: var(--fs-xl); line-height: 1.05; letter-spacing: -0.04em; font-weight: 600; max-width: 22ch; }
#recorrido .beam__say span { display: block; }
#recorrido .beam__say span:first-child { color: var(--ink-3); }
@media (max-width: 700px) {
  #recorrido .beam { height: clamp(480px, 72svh, 620px); }
  #recorrido .beam__tag--lib, #recorrido .beam__tag--work { bottom: 10%; }
  #recorrido .beam__glow { width: 380px; height: 380px; margin: -190px 0 0 -190px; }
}

/* ---------- 03 expediente ---------- */
.folder { position: relative; max-width: 820px; margin: 0 auto; padding-top: 3.25rem; }
.folder__tabs { position: absolute; top: 0; left: 4%; right: 4%; display: flex; gap: 6px; justify-content: space-between; align-items: flex-end; height: 3.6rem; z-index: 1; }
.folder__tabs li {
  flex: 0 1 auto; min-width: 0; white-space: nowrap;
  font-family: var(--mono); font-size: 0.72rem; line-height: 1.25; letter-spacing: 0.01em;
  color: #2a2a28; text-align: center;
  padding: 0.6rem 1rem 1.4rem; border-radius: 10px 10px 0 0;
  background: #D9D8D2; box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
  transform: translateY(0.9rem);
  transition: transform .45s var(--ease), background .3s var(--ease);
  cursor: default; outline-offset: 2px;
}
.folder__tabs li:nth-child(2) { background: #CFCEC7; }
.folder__tabs li:nth-child(3) { background: #D6D5CF; }
.folder__tabs li:nth-child(4) { background: #CBCAC3; }
.folder__tabs li:nth-child(5) { background: #D3D2CB; }
.folder__tabs li:hover, .folder__tabs li:focus-visible { transform: translateY(0.2rem); background: #E8E7E2; }
.folder__body { position: relative; aspect-ratio: 16 / 8.6; z-index: 2; }
.folder__back { position: absolute; inset: 0; border-radius: 10px 10px 16px 16px; background: linear-gradient(180deg, #C9C8C1, #B9B8B1); }
.folder__front {
  position: absolute; inset: 0.9rem 0 0 0; border-radius: 10px 10px 16px 16px;
  background: linear-gradient(180deg, #EDECE7, #E2E1DB);
  box-shadow: 0 -1px 0 rgba(255,255,255,0.7) inset, 0 50px 90px -40px rgba(0,0,0,0.9);
  overflow: hidden;
}
.folder__front::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, transparent 0 3px, rgba(0,0,0,0.012) 3px 4px); }
.folder__rule { position: absolute; left: 7%; top: 14%; width: 36%; display: grid; gap: 14px; }
.folder__rule i { height: 1px; background: rgba(0,0,0,0.16); }
.folder__rule i:nth-child(2) { width: 80%; }
.folder__rule i:nth-child(3) { width: 55%; }
.stamp {
  position: absolute; left: 50%; top: 52%;
  transform: translate(-50%, -50%) rotate(-8deg);
  font-family: var(--mono); font-weight: 500; text-transform: uppercase;
  font-size: clamp(1rem, 0.6rem + 2.2vw, 2.1rem); letter-spacing: 0.22em; padding: 0.55em 0.9em 0.55em 1.1em;
  color: var(--accent-ink); border: 3px solid currentColor; border-radius: 8px;
  box-shadow: inset 0 0 0 2px #E7E6E0, inset 0 0 0 4px currentColor;
  opacity: 0.85; mix-blend-mode: multiply; white-space: nowrap;
}
.folder__cap { margin-top: 1.25rem; text-align: center; font-family: var(--mono); font-size: var(--fs-xs); color: var(--ink-2); letter-spacing: 0.02em; }
.statement { margin-top: clamp(3.5rem, 7vw, 6rem); font-size: var(--fs-xl); line-height: 1.05; letter-spacing: -0.04em; max-width: 24ch; }
.statement strong { font-weight: 600; }
.statement strong > span { display: block; }
.file .coda { margin-top: 2rem; }

/* ---------- 04 semana ---------- */
.week .chip--accent { margin-bottom: 2rem; }
.cal { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: auto 1fr; border: 1px solid var(--hair-2); border-radius: 20px; overflow: hidden; background: var(--bg-2); }
.cal__days { grid-column: 1 / -1; grid-row: 1; display: grid; grid-template-columns: subgrid; border-bottom: 1px solid var(--hair-2); }
.cal__days span { font-family: var(--mono); font-size: var(--fs-xs); color: var(--ink-2); padding: 1rem 1.1rem; letter-spacing: 0.08em; }
.cal__days .is-off { color: var(--ink-3); }
.cal__cols { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: subgrid; }
.cal__cols i { border-left: 1px solid var(--hair); }
.cal__cols i:first-child { border-left: 0; }
.cal__cols i:nth-child(6) { background: repeating-linear-gradient(135deg, transparent 0 8px, rgba(255,255,255,0.025) 8px 9px); }
.cal__items { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: subgrid; grid-template-rows: auto auto; gap: 0.75rem 0; padding: 1.1rem 0 1.4rem; }
.routine { overflow-wrap: break-word; hyphens: auto; margin: 0 0.6rem; padding: 1rem 1.2rem 1.15rem; border-radius: 14px; border: 1px solid var(--hair-2); background: var(--bg-3); font-size: var(--fs-s); color: var(--ink-2); line-height: 1.45; }
.routine strong { color: var(--ink); font-weight: 600; }
.routine--a { grid-column: 1 / 6; grid-row: 1; border-left: 2px solid var(--accent); }
.routine--b { grid-column: 1 / 6; grid-row: 2; }
.routine--c { margin: 0 0.4rem; padding: 0.95rem 0.8rem; grid-column: 7 / 8; grid-row: 1 / 3; align-self: stretch; background: linear-gradient(180deg, rgba(124,140,255,0.10), transparent), var(--bg-3); border-color: rgba(124,140,255,0.35); }
.routine__days { display: flex; gap: 4px; margin-bottom: 0.75rem; }
.routine__days i { width: 6px; height: 6px; border-radius: 50%; background: var(--hair-2); }
.routine__days i.on { background: var(--accent); }
.routine--c .routine__days { display: none; }

/* ---------- 05 avances ---------- */
#avances .board {
  position: relative; max-width: 1000px; padding: clamp(1.25rem, 2.6vw, 2rem); border-radius: 20px;
  background: linear-gradient(180deg, #171718, #0F0F10); border: 1px solid var(--hair-2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), inset 0 -1px 0 rgba(0,0,0,0.6), 0 50px 100px -50px rgba(0,0,0,0.95);
}
#avances .board::before, #avances .board::after { content: ""; position: absolute; top: 12px; width: 5px; height: 5px; border-radius: 50%; background: #2a2a2b; box-shadow: inset 0 1px 1px rgba(0,0,0,0.8), 0 1px 0 rgba(255,255,255,0.06); }
#avances .board::before { left: 12px; } #avances .board::after { right: 12px; }
#avances .board__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; padding: 0.25rem 0.4rem 1.25rem; }
#avances .book__head { font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
#avances .book__head strong { font-weight: 500; color: var(--ink); }
#avances .book__tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: #0A0A0A; box-shadow: inset 0 1px 2px rgba(0,0,0,0.8), 0 1px 0 rgba(255,255,255,0.05); }
#avances .book__tabs li:not(.sep) { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); padding: 0.45rem 0.85rem; border-radius: 999px; }
#avances .book__tabs li.is-active { color: var(--ink); background: #1E1E20; box-shadow: inset 0 1px 0 rgba(255,255,255,0.07); }
#avances .book__tabs li.is-active::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 0.55em; border-radius: 50%; vertical-align: 0.15em; background: var(--accent); box-shadow: 0 0 8px rgba(124,140,255,0.8); }

/* split-flap rows */
#avances .book__rows { display: grid; gap: 6px; perspective: 900px; }
#avances .book__rows li {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: clamp(1rem, 2vw, 1.35rem) clamp(1rem, 2vw, 1.4rem); border-radius: 8px; cursor: pointer; outline-offset: 3px;
  background: linear-gradient(180deg, #1D1D1F 0 50%, #19191B 50% 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 1px 0 rgba(0,0,0,0.7), 0 6px 14px -8px rgba(0,0,0,0.8);
  transform-origin: 50% 50%;
}
#avances .book__rows li::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0,0,0,0.75); box-shadow: 0 1px 0 rgba(255,255,255,0.035); pointer-events: none; }
#avances .row__name { position: relative; z-index: 1; font-family: var(--mono); font-size: clamp(0.92rem, 0.8rem + 0.55vw, 1.25rem); letter-spacing: 0.02em; text-transform: uppercase; line-height: 1.35; color: var(--ink); font-variant-ligatures: none; }
#avances .status { position: relative; z-index: 1; flex: none; display: inline-flex; align-items: center; gap: 0.6em; font-family: var(--mono); font-size: var(--fs-xs); color: var(--ink-3); letter-spacing: 0.06em; text-transform: uppercase; transition: color .5s var(--ease); }
#avances .status i { width: 8px; height: 8px; border-radius: 50%; background: #2C2C2E; box-shadow: inset 0 1px 1px rgba(0,0,0,0.7); transition: background .5s var(--ease), box-shadow .5s var(--ease); }
#avances .book__rows li.is-set .status, html:not(.js) #avances .status { color: var(--ink-2); }
#avances .book__rows li.is-set .status i, html:not(.js) #avances .status i { background: var(--accent); box-shadow: 0 0 0 3px rgba(124,140,255,0.14), 0 0 12px rgba(124,140,255,0.7); }
#avances .book__rows li.is-flip { animation: led-flip .5s cubic-bezier(.3,.1,.3,1); }
#avances .book__rows li:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 1px 0 rgba(0,0,0,0.7), 0 10px 18px -8px rgba(0,0,0,0.9); }

/* the next one, still turning */
#avances .board__next { position: relative; height: clamp(2.6rem, 4vw, 3.2rem); margin-top: 6px; border-radius: 8px; perspective: 600px; background: linear-gradient(180deg, #161618 0 50%, #131315 50% 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,0.03); overflow: hidden; }
#avances .board__next::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0,0,0,0.75); }
#avances .board__next span { position: absolute; left: 0; right: 0; top: 0; height: 50%; background: linear-gradient(180deg, #1B1B1D, #171719); transform-origin: 50% 100%; border-radius: 8px 8px 0 0; animation: led-next 3.2s cubic-bezier(.5,0,.5,1) infinite; }
#avances .board__next::before { content: ""; position: absolute; z-index: 1; right: clamp(1rem, 2vw, 1.4rem); top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--accent); opacity: .5; animation: blink 1.6s var(--ease) infinite; }

@keyframes led-flip { 0% { transform: rotateX(-88deg); filter: brightness(1.6); } 60% { transform: rotateX(8deg); } 100% { transform: rotateX(0); filter: none; } }
@keyframes led-next { 0%, 70% { transform: rotateX(0); } 85% { transform: rotateX(-90deg); filter: brightness(1.5); } 85.01%, 100% { transform: rotateX(0); } }

@media (max-width: 760px) {
  #avances .book__rows li { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  #avances .book__rows li { background: linear-gradient(180deg, #1D1D1F 0 calc(100% - 2.6rem), #19191B calc(100% - 2.6rem) 100%); }
  #avances .book__rows li::after { top: auto; bottom: 2.6rem; }
  #avances .board__head { padding: 0.25rem 0.2rem 1rem; }
}

/* ---------- 06 pulso ---------- */
.pulse { background: #FFFFFF; color: #0A0A0A; border-top: 0 !important; padding: clamp(8rem, 18vw, 15rem) 0; }
.pulse + .foot { border-top: 0; }
.pulse__inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.pulse .label { color: #5a5a58; }
.pulse .label__dot { background: var(--accent-ink); box-shadow: 0 0 0 4px rgba(53,70,214,0.12); }
.pulse__big { font-size: var(--fs-xl); font-weight: 600; letter-spacing: -0.045em; line-height: 1.04; max-width: 16ch; }
.pulse__mid { margin-top: clamp(1.5rem, 3vw, 2.25rem); font-size: var(--fs-l); font-weight: 400; letter-spacing: -0.02em; line-height: 1.3; max-width: 30ch; color: #2b2b2a; }
.pulse__small { margin-top: clamp(1.25rem, 2.5vw, 1.75rem); font-size: var(--fs-m); color: #6a6a68; max-width: 44ch; }
.pulse__small em { font-weight: 300; }
.pulse__mail { margin-top: 1.25rem; font-family: var(--mono); font-size: var(--fs-s); color: #4a4a48; border-bottom: 1px solid rgba(0,0,0,0.18); padding-bottom: 2px; transition: color .3s var(--ease), border-color .3s var(--ease); overflow-wrap: anywhere; }
.pulse__mail:hover { color: var(--accent-ink); border-color: var(--accent-ink); }
.pulse :focus-visible { outline-color: var(--accent-ink); }

/* ---------- 07 pie ---------- */
.foot { padding: clamp(6rem, 12vw, 10rem) 0 clamp(4rem, 8vw, 6rem); }
.foot__id { font-size: clamp(1.6rem, 1rem + 2.4vw, 3.1rem); line-height: 1.12; letter-spacing: -0.035em; color: var(--ink-3); font-weight: 400; max-width: 30ch; }
.foot__id strong { color: var(--ink); font-weight: 600; }
.foot__links { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; margin-top: clamp(3rem, 7vw, 5rem); padding-top: 1.5rem; border-top: 1px solid var(--hair); }
.foot__links a { font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: 0.04em; color: var(--ink-2); transition: color .3s var(--ease); overflow-wrap: anywhere; }
.foot__links a:hover { color: var(--accent); }
.foot__links a[target="_blank"]::after { content: "↗"; margin-left: 0.35em; color: var(--ink-3); }
.foot__credit { margin-top: 2.5rem; font-size: var(--fs-s); color: var(--ink-3); }
.foot__credit em { font-weight: 300; }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .plat__grid { grid-template-columns: 1fr; gap: 0; }
  .plat__bridge { height: 48px; }
  .plat__bridge span { left: 50%; right: auto; top: 0; bottom: 0; width: 1px; height: auto; background: repeating-linear-gradient(180deg, var(--ink-3) 0 4px, transparent 4px 8px); }
  .plat__bridge span::before { left: -3px; top: -3px; }
  .plat__bridge span::after { left: -3px; right: auto; top: auto; bottom: -3px; }
  .panel { min-height: 0; }
}

@media (max-width: 1160px) {
  .cal { display: block; border: 0; background: none; border-radius: 0; overflow: visible; }
  .cal__days, .cal__cols { display: none; }
  .cal__items { display: grid; grid-template-columns: 1fr; gap: 0.75rem; padding: 0; }
  .routine { margin: 0; padding: 1rem 1.2rem 1.15rem; grid-column: auto !important; grid-row: auto !important; }
  .routine--c .routine__days { display: flex; }
}

@media (max-width: 900px) {
  .folder { padding-top: 0; }
  .folder__tabs { position: relative; inset: auto; display: block; height: auto; margin: 0 2% -1.1rem; }
  .folder__tabs li {
    position: relative; display: block; width: 58%; max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    font-size: 0.68rem; text-align: left; padding: 0.5rem 0.85rem 1.35rem;
    transform: none; margin-top: -1.05rem; box-shadow: 0 -1px 0 rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.6);
  }
  .folder__tabs li:first-child { margin-top: 0; }
  .folder__tabs li:nth-child(2) { margin-left: 10.5%; }
  .folder__tabs li:nth-child(3) { margin-left: 21%; }
  .folder__tabs li:nth-child(4) { margin-left: 31.5%; }
  .folder__tabs li:nth-child(5) { margin-left: 42%; }
  .folder__tabs li:hover, .folder__tabs li:focus-visible { transform: translateY(-0.3rem); }
  .folder__body { aspect-ratio: 16 / 11; }
}

@media (max-width: 480px) {
  .btn--solid { padding: 1.05em 1.5em; }
  .stamp { letter-spacing: 0.16em; }
  .folder__body { aspect-ratio: 4 / 3; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .motif--full .motif__line { transform: scaleX(1); }
}
