/* Savage Engine.
   El mundo del motor: la pantalla oscura del video, el papel del logo y los tres discos del Núcleo
   (rojo, verde, azul) como únicos acentos, además de luz RGB y la textura de subpíxeles de una pantalla. */
:root {
  --s-red: #e01518;
  --s-green: #2a8931;
  --s-blue: #005ff2;
  --s-paper: #f5f5f2;

  --bg: #0b0f12;
  --bg-2: #10161b;
  --bg-3: #151c22;
  --fg: #f4f5f2;
  --fg-2: #a1aab1;
  --fg-3: #6c767e;
  --line: rgba(220, 235, 245, 0.09);
  --line-2: rgba(220, 235, 245, 0.16);
  --accent: #4f8ff5;
  --focus: #7fb0ff;
  --intro-bg: #0d1216;
}

/* ---------------------------------------------------------------- la intro: el video solo, en el medio */

.intro__screen { width: min(100vw, calc(100vh * 16 / 9)); aspect-ratio: 16 / 9; }
@supports (height: 100dvh) { .intro__screen { width: min(100vw, calc(100dvh * 16 / 9)); } }
.intro__video { width: 100%; height: 100%; }
.intro__video.is-hidden { visibility: hidden; }

/* El logo de la portada, mientras vuela desde la intro */
.con-intro .s-logo__svg { visibility: hidden; }
.s-logo__svg.en-vuelo { visibility: visible; position: relative; z-index: 300; transform-origin: 0 0; will-change: transform; }
.pum {
  position: fixed; z-index: 250; width: 0; height: 0; pointer-events: none;
  border-radius: 50%; border: 3px solid var(--c);
  transform: translate(-50%, -50%);
  animation: pum 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
@keyframes pum {
  from { width: 0; height: 0; opacity: 1; }
  to { width: var(--r); height: var(--r); opacity: 0; border-width: 1px; }
}

/* ---------------------------------------------------------------- portada */

/* Sin aislar la portada: el logo, al volar desde la intro, tiene que pasar por encima de ella. */
.s-hero {
  position: relative; overflow: hidden;
  min-height: 100vh; min-height: 100svh; max-height: 1080px;
  display: grid; align-items: center; text-align: center;
}
.s-hero__screen { position: absolute; inset: 0; z-index: -1; background: radial-gradient(75% 65% at 50% 46%, #131b21 0%, #0b0f12 62%); }
.s-hero__screen::before {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(224, 21, 24, 0.1) 0 2px, rgba(42, 137, 49, 0.1) 2px 4px, rgba(0, 95, 242, 0.12) 4px 6px, transparent 6px 8px);
  -webkit-mask-image: radial-gradient(48% 46% at 50% 44%, #000, transparent 78%);
  mask-image: radial-gradient(48% 46% at 50% 44%, #000, transparent 78%);
}
.s-hero__screen i { position: absolute; top: 44%; width: 30vmax; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); filter: blur(90px); opacity: 0.16; mix-blend-mode: screen; }
.s-hero__screen .r { left: 36%; background: var(--s-red); }
.s-hero__screen .g { left: 50%; top: 56%; background: var(--s-green); }
.s-hero__screen .b { left: 64%; background: var(--s-blue); }
.s-hero::after { content: ""; position: absolute; inset: auto 0 0; height: 160px; z-index: -1; background: linear-gradient(0deg, var(--bg), transparent); }
.s-hero__inner { display: grid; justify-items: center; gap: 30px; padding-block: calc(var(--header-h) + 72px) 104px; }
.s-hero__kicker { justify-content: center; }
.s-logo { width: min(100%, 820px); line-height: 0; margin-block: 6px; }
.s-logo__svg { width: 100%; height: auto; overflow: visible; }
.s-logo__svg .ink { fill: var(--s-paper); }
.s-hero__lede { margin-inline: auto; text-align: center; max-width: 52ch; }
.s-hero__actions { justify-content: center; margin-top: 4px; }

/* ---------------------------------------------------------------- la intro, cuadro a cuadro */

.reel { display: grid; }
.reel__screen { aspect-ratio: 16 / 9; background: #0d1216; border-radius: var(--r-lg); }
.reel__video { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.reel__bar { display: flex; align-items: center; gap: 16px; padding: 20px 0 6px; }
.reel__play {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: #fff; color: #07090c; cursor: pointer; transition: transform 0.15s var(--ease), background-color 0.2s;
}
.reel__play:hover { background: #dde3ea; }
.reel__play:active { transform: scale(0.94); }
.reel__play svg { width: 14px; height: 14px; }
.reel__play .i-pause, .reel.is-playing .reel__play .i-play { display: none; }
.reel.is-playing .reel__play .i-pause { display: block; }
.reel__time { font-size: 0.9375rem; color: var(--fg); }
.reel__dur { color: var(--fg-3); }
.reel__spec { margin-left: auto; font-size: 0.8125rem; color: var(--fg-3); }

.reel__track { position: relative; padding-top: 26px; cursor: ew-resize; touch-action: none; user-select: none; -webkit-user-select: none; border-radius: 10px; }
.reel__track:focus-visible { outline-offset: 6px; }
.reel__keys { position: absolute; left: 0; right: 0; top: 0; height: 26px; pointer-events: none; }
.reel__keys i {
  position: absolute; top: 8px; left: calc(var(--t) / 6.2 * 100%);
  width: 9px; height: 9px; border-radius: 2px; background: var(--c);
  transform: translateX(-50%) rotate(45deg); box-shadow: 0 0 0 2px var(--bg);
}
.reel__thumbs { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 2px; height: clamp(44px, 6vw, 72px); border-radius: 10px; overflow: hidden; background: var(--bg-2); }
.reel__thumbs img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; transition: opacity 0.3s; pointer-events: none; }
.reel__track:hover .reel__thumbs img, .reel.is-scrubbing .reel__thumbs img { opacity: 0.95; }
.reel__head {
  position: absolute; top: 16px; bottom: -6px; left: calc(var(--p, 0) * 100%); width: 2px; margin-left: -1px;
  background: #fff; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45); pointer-events: none;
}
.reel__head::before {
  content: ""; position: absolute; top: -4px; left: 50%; width: 12px; height: 11px; transform: translateX(-50%);
  background: #fff; border-radius: 2px 2px 0 0; clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%);
}

.reel__legend { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px clamp(12px, 1.6vw, 24px); margin-top: 32px; }
.reel__legend button {
  appearance: none; width: 100%; display: grid; gap: 8px; justify-items: start; padding: 14px 0 0; border: 0;
  border-top: 1px solid var(--line-2); background: none; color: var(--fg-2); text-align: left; cursor: pointer;
  font: 500 0.9375rem/1.3 var(--f-sans); letter-spacing: -0.01em; transition: color 0.2s, border-color 0.2s;
}
.reel__legend button .mono { display: inline-flex; align-items: center; gap: 9px; font-size: 0.75rem; color: var(--fg-3); }
.reel__legend button .mono::before { content: ""; width: 7px; height: 7px; border-radius: 1.5px; background: var(--c); transform: rotate(45deg); }
.reel__legend button:hover { color: var(--fg); }
.reel__legend button.is-on { color: var(--fg); border-top-color: var(--c); }
@media (max-width: 900px) { .reel__legend { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .reel__legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reel__spec { display: none; }
  .reel__thumbs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .reel__thumbs img:nth-child(even) { display: none; }
}

/* ---------------------------------------------------------------- el núcleo */

.s-core__grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(48px, 7vw, 128px); align-items: center; }
.s-core__fig { position: relative; display: grid; place-items: center; }
.s-core__light { position: absolute; inset: 0; margin: auto; width: min(100%, 440px); aspect-ratio: 1; filter: blur(64px); opacity: 0.42; }
.s-core__light i { position: absolute; width: 56%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); mix-blend-mode: screen; }
.s-core__light .r { left: 32.4%; top: 50%; background: var(--s-red); }
.s-core__light .b { left: 67.6%; top: 29.7%; background: var(--s-blue); }
.s-core__light .g { left: 67.6%; top: 70.3%; background: var(--s-green); }
.s-core__icon { position: relative; width: min(100%, 440px); height: auto; filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.5)); }
.s-core__icon .ink { fill: var(--s-paper); }
.s-core__copy { display: grid; gap: 20px; justify-items: start; }
.s-core__text { color: var(--fg-2); max-width: 56ch; }
.s-core__spec { width: 100%; margin-top: 12px; }
.s-swatches { display: flex; flex-wrap: wrap; gap: 8px 20px; font-family: var(--f-mono); font-size: 0.8125rem; }
.s-swatches span { display: inline-flex; align-items: center; gap: 9px; }
.s-swatches span::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
@media (max-width: 900px) { .s-core__grid { grid-template-columns: 1fr; } .s-core__fig { max-width: 340px; } }

/* ---------------------------------------------------------------- lo que viene */

.s-next__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 44px); }
.s-next__list li { display: grid; gap: 14px; align-content: start; padding-top: 22px; border-top: 2px solid var(--c); }
.s-next__tag { font-size: 0.75rem; color: var(--fg-3); }
.s-next__mail { display: grid; gap: 10px; justify-items: start; margin-top: clamp(56px, 7vw, 96px); padding-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--line); }
@media (max-width: 760px) { .s-next__list { grid-template-columns: 1fr; gap: 28px; } }
