/* ==========================================================================
   eloyroldan.com.ar · estilos del sitio principal
   --------------------------------------------------------------------------
   Todo el espaciado sale de la escala --s-*. Las secciones usan --section.
   Jerarquía de texto: .display > h1 > h2 > h3 > cuerpo > .meta
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@600;700&family=Inter:wght@400;500;600&display=swap");

:root {
  /* Color */
  --bg: #0b0c10;
  --bg-2: #111318;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .16);
  --ink: #f2f3f6;
  --ink-2: #b4b8c4;
  --muted: #7c8190;
  --accent: #29e0d6;

  /* Tipografía */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-num: "Chakra Petch", "Inter", sans-serif;
  --t-display: clamp(40px, 7.2vw, 80px);
  --t-h1: clamp(36px, 5.6vw, 60px);
  --t-h2: clamp(26px, 3.4vw, 36px);
  --t-h3: 19px;
  --t-body: 17px;
  --t-small: 14px;

  /* Espaciado (escala única) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --section: clamp(72px, 10vw, 128px);
  --gutter: clamp(20px, 5vw, 40px);
  --wrap: 1120px;
  --header-h: 64px;

  --radius: 12px;
  --danger: #ff5c72;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--s-5));
  /* Reserva el lugar de la barra de scroll: el header no se corre entre páginas cortas y largas */
  scrollbar-gutter: stable;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* ---------- Transición entre páginas ----------
   El header queda fijo y solo cambia el contenido (mismo nombre en el
   portfolio de Angular, así que pasar de una sección a otra es continuo). */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
::view-transition-group(site-header) { animation: none; }
::view-transition-old(root) { animation: vt-out .2s var(--ease) both; }
::view-transition-new(root) { animation: vt-in .5s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; translate: 0 12px; } }
/* Navegadores sin transiciones entre páginas: solo aparece el contenido, no el header */
@supports not (view-transition-name: none) {
  main, .landing-main { animation: page-in .5s var(--ease-out) both; }
}
@keyframes page-in { from { opacity: 0; translate: 0 8px; } }

img, iframe, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; touch-action: manipulation; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.025em; line-height: 1.1; text-wrap: balance; }
p, li, dd, summary { text-wrap: pretty; }
::selection { background: rgba(41, 224, 214, .3); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Capas de texto ---------- */
.display { font-size: var(--t-display); letter-spacing: -.035em; line-height: 1.02; }
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); letter-spacing: -.01em; }
.eyebrow { display: block; font-size: var(--t-small); font-weight: 500; color: var(--accent); }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-2); max-width: 46ch; }
.body { color: var(--ink-2); }
.meta, .muted { font-size: var(--t-small); color: var(--muted); }
.num { font-family: var(--font-num); font-weight: 600; letter-spacing: 0; font-variant-numeric: tabular-nums; }

/* Compatibilidad con páginas que usan las clases anteriores */
.label { display: block; font-size: var(--t-small); font-weight: 500; color: var(--muted); }
.label--accent { color: var(--accent); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 var(--s-5);
  border-radius: 999px; border: 1px solid var(--line-2);
  background: transparent; cursor: pointer;
  font-size: 15px; font-weight: 500; white-space: nowrap;
  transition: background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease), transform .15s var(--ease);
}
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: scale(.97); }
.btn--solid { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn--solid:hover { background: #fff; border-color: #fff; }
.btn .arrow { display: none; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* Enlace de texto con subrayado animado */
.link {
  color: var(--ink);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .3s var(--ease);
}
.link:hover { background-size: 100% 1px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  background: rgba(11, 12, 16, .8);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: var(--s-5); }
.wordmark { font-family: var(--font-num); font-weight: 700; font-size: 17px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.wordmark span { color: var(--accent); }
.site-nav { display: flex; gap: var(--s-1); margin-left: auto; }
.site-nav a {
  position: relative; padding: var(--s-2) var(--s-3);
  font-size: 15px; color: var(--muted);
  transition: color .2s var(--ease);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a::after {
  content: ""; position: absolute; left: var(--s-3); right: var(--s-3); bottom: 2px; height: 1px;
  background: var(--ink); transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.header-social { display: flex; gap: var(--s-2); }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 999px; border: 1px solid var(--line); background: transparent;
  color: var(--ink-2); cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease), transform .15s var(--ease);
}
.icon-btn:hover { border-color: var(--line-2); color: var(--ink); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 16px; height: 16px; fill: currentColor; }
.menu-btn { display: none; }
.menu-btn span, .menu-btn span::before {
  display: block; width: 16px; height: 1.5px; background: currentColor; border-radius: 2px;
  transition: transform .3s var(--ease);
}
.menu-btn span { position: relative; transform: translateY(-3px); }
.menu-btn span::before { content: ""; position: absolute; top: 6px; }
.menu-btn[aria-expanded="true"] span { transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span::before { transform: translateY(-6px) rotate(-90deg); }

@media (max-width: 760px) {
  .menu-btn { display: grid; margin-left: auto; }
  .header-social { display: none; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; gap: 0; margin: 0;
    padding: var(--s-2) var(--gutter) var(--s-6);
    background: var(--bg); border-bottom: 1px solid var(--line);
    opacity: 0; transform: translateY(-8px); pointer-events: none;
    transition: opacity .25s var(--ease), transform .3s var(--ease-out);
  }
  .site-nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .site-nav a { padding: var(--s-4) 0; font-size: 22px; font-weight: 500; color: var(--ink-2); border-bottom: 1px solid var(--line); }
  .site-nav a::after { display: none; }
  .site-nav a[aria-current="page"] { color: var(--accent); }
}

/* ---------- Estructura de página ---------- */
.intro { padding-block: var(--s-9) var(--s-8); display: grid; gap: var(--s-4); justify-items: start; }
.intro h1, .intro .display { max-width: 16ch; }
.intro .actions { margin-top: var(--s-4); }
@media (max-width: 760px) { .intro { padding-block: var(--s-8) var(--s-7); } }
/* Intro con foto al costado (video portfolio) */
.intro-split { display: grid; grid-template-columns: auto auto; justify-content: start; gap: var(--s-9); align-items: center; padding-block: var(--s-9) var(--s-8); }
.intro-split .intro { padding-block: 0; }
@media (max-width: 760px) {
  .intro-split { grid-template-columns: 1fr; gap: var(--s-6); padding-block: var(--s-8) var(--s-7); }
}

.section { padding-block: var(--section); border-top: 1px solid var(--line); }
.section-head { display: grid; gap: var(--s-3); margin-bottom: var(--s-7); max-width: 640px; }
/* Encabezado centrado (sección del reproductor) */
.section-head--center { justify-items: center; text-align: center; margin-inline: auto; margin-bottom: var(--s-6); }
.section-head--row { max-width: none; grid-template-columns: 1fr auto; align-items: end; gap: var(--s-4) var(--s-6); }
@media (max-width: 640px) { .section-head--row { grid-template-columns: 1fr; } }

/* Bloque suelto antes de la primera .section */
.block { padding-bottom: var(--section); }

/* Compatibilidad: páginas con .page-head / .page-body */
.page-head { padding-block: var(--s-9) var(--s-8); display: grid; gap: var(--s-4); justify-items: start; }
.page-body { padding-bottom: var(--section); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: var(--s-7); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: var(--s-5) var(--s-7); align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.site-footer a { color: var(--muted); font-size: var(--t-small); transition: color .2s var(--ease); }
.site-footer a:hover { color: var(--ink); }
.site-footer small { color: var(--muted); font-size: var(--t-small); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--s-5) + env(safe-area-inset-bottom)); z-index: 90;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--bg); font-weight: 500;
  padding: var(--s-3) var(--s-5); border-radius: 999px; font-size: var(--t-small);
  transition: opacity .25s var(--ease), transform .35s var(--ease-out);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   Componentes
   ========================================================================== */

/* Cifras de resultados */
.proof { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); }
.proof-item { display: grid; gap: var(--s-1); padding-top: var(--s-4); border-top: 1px solid var(--line-2); }
.proof-item .num { font-size: clamp(36px, 5vw, 56px); line-height: 1; }
.proof-note { margin-top: var(--s-5); }
@media (max-width: 640px) {
  .proof { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
  .proof-item:first-child { grid-column: 1 / -1; }
}

/* Clientes */
.clients { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2) var(--s-5); margin-top: var(--s-6); }
.clients strong { font-weight: 600; font-size: 18px; letter-spacing: -.01em; }

/* Lista de filas */
/* Todas las filas comparten columnas (subgrid) para que queden alineadas */
.rows { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr) auto; column-gap: var(--s-6); border-top: 1px solid var(--line); }
.row {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: subgrid;
  row-gap: var(--s-2); align-items: baseline;
  padding-block: var(--s-5); border-bottom: 1px solid var(--line);
}
.row .body { max-width: 52ch; }
.row .meta { white-space: nowrap; text-align: right; }
.row-head { display: grid; gap: var(--s-1); }
@media (max-width: 760px) {
  .rows { grid-template-columns: minmax(0, 1fr); }
  .row .meta { text-align: left; }
}

/* Lista de enlaces (secciones) */
.nav-list { border-top: 1px solid var(--line); }
.nav-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s-1) var(--s-5);
  padding-block: var(--s-5); border-bottom: 1px solid var(--line);
  transition: padding .35s var(--ease-out);
}
.nav-item h3 { font-size: clamp(20px, 2.4vw, 26px); }
.nav-item .meta { grid-column: 1; }
.nav-item .chev { grid-row: 1 / span 2; grid-column: 2; color: var(--muted); transition: transform .35s var(--ease-out), color .2s var(--ease); }
.nav-item .chev svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; }
@media (hover: hover) {
  .nav-item:hover { padding-left: var(--s-3); }
  .nav-item:hover .chev { transform: translateX(4px); color: var(--ink); }
}

/* Oferta (lo que incluye) */
.offer { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-6); }
.offer-item { display: grid; gap: var(--s-2); align-content: start; }
.offer-item .num { font-size: clamp(26px, 3vw, 34px); line-height: 1.1; }
@media (max-width: 860px) { .offer { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--s-5); } }

/* Tarjetas grandes de Inicio (Portfolio / Herramientas) */
.hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.hub-card {
  position: relative;
  display: grid; gap: var(--s-2); align-content: start;
  padding: var(--s-6); border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--bg-2);
  transition: border-color .25s var(--ease), transform .35s var(--ease-out), background .25s var(--ease), box-shadow .35s var(--ease);
}
.hub-card:hover { border-color: var(--line-2); background: #14161c; transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(41, 224, 214, .35); }
.hub-card:active { transform: scale(.99); }
.hub-card h3 { font-size: clamp(22px, 2.6vw, 28px); }
.hub-card .body { max-width: 40ch; }
.hub-card .meta { margin-top: var(--s-3); }
.hub-icon {
  width: 48px; height: 48px; margin-bottom: var(--s-4);
  display: grid; place-items: center;
  border-radius: 12px; border: 1px solid var(--line-2); color: var(--accent);
}
.hub-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.hub-card .chev { position: absolute; top: var(--s-6); right: var(--s-6); color: var(--muted); transition: transform .35s var(--ease-out), color .2s var(--ease); }
.hub-card .chev svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.hub-card:hover .chev { transform: translateX(4px); color: var(--ink); }
.hub-icon { transition: background .3s var(--ease), border-color .3s var(--ease), transform .4s var(--ease-out); }
.hub-card:hover .hub-icon { background: rgba(41, 224, 214, .1); border-color: rgba(41, 224, 214, .45); transform: scale(1.06) rotate(-3deg); }
@media (max-width: 640px) {
  .hub-grid { grid-template-columns: 1fr; }
  .hub-card { padding: var(--s-5); }
  .hub-card .chev { top: var(--s-5); right: var(--s-5); }
}

/* Botones de apps (/herramientas/) */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: var(--s-4); }
.app-btn {
  display: grid; gap: var(--s-1); align-content: start;
  padding: var(--s-5); border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--bg-2);
  transition: border-color .25s var(--ease), transform .35s var(--ease-out), background .25s var(--ease), box-shadow .35s var(--ease);
}
.app-btn:hover { border-color: var(--line-2); background: #14161c; transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .8); }
.app-btn:active { transform: scale(.98); }
.app-icon {
  width: 56px; height: 56px; border-radius: 14px; margin-bottom: var(--s-4);
  display: grid; place-items: center;
  transition: transform .35s var(--ease-out);
}
.app-btn:hover .app-icon { transform: scale(1.06); }
.app-icon svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-name { font-size: var(--t-h3); font-weight: 600; letter-spacing: -.01em; }
@media (max-width: 480px) {
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
  .app-btn { padding: var(--s-4); }
  .app-icon { width: 48px; height: 48px; border-radius: 12px; margin-bottom: var(--s-3); }
}

/* Etiquetas de stack */
.tags { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.tag { font-size: 13px; color: var(--ink-2); padding: 2px var(--s-3); border: 1px solid var(--line); border-radius: 999px; }

/* Contacto */
.contact { display: grid; gap: var(--s-5); justify-items: start; }
.contact h2 { font-size: var(--t-h1); max-width: 20ch; }

/* Formulario de pedido (video portfolio → /portfolio/api/solicitudes) */
.req-form {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5);
  width: 100%; max-width: 760px; margin-top: var(--s-4); padding: var(--s-6);
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2);
}
.req-form[hidden], .req-success[hidden] { display: none; }
.field { display: grid; gap: var(--s-2); align-content: start; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field label { font-size: var(--t-small); font-weight: 500; color: var(--ink-2); }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: var(--s-3) var(--s-4);
  border-radius: var(--radius); border: 1px solid var(--line-2);
  background: var(--bg); color: var(--ink); font: inherit;
  font-size: 16px; /* evita el zoom automático en iOS */
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.field input[type="date"] { color-scheme: dark; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(41, 224, 214, .15); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: var(--t-small); }
.field-error:empty { display: none; }
.field-hint { font-size: 12px; color: var(--muted); justify-self: end; font-variant-numeric: tabular-nums; }
.req-form .btn:disabled { opacity: .6; cursor: progress; }
.req-success {
  display: grid; gap: var(--s-3); justify-items: start; width: 100%; max-width: 640px;
  margin-top: var(--s-4); padding: var(--s-6);
  border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg-2);
}
@media (max-width: 640px) {
  .req-form { grid-template-columns: 1fr; padding: var(--s-5); }
  .req-success { padding: var(--s-5); }
}

/* ==========================================================================
   Landing
   ========================================================================== */
.landing { min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr); }
.landing-top { padding-block: var(--s-5); }
.landing-top .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.landing-top .header-social { display: flex; }
.landing-main { display: grid; align-items: center; padding-block: var(--s-7); }
.landing-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-8); align-items: center; }
.landing-copy { display: grid; gap: var(--s-5); justify-items: start; }
.landing-copy .display { max-width: 12ch; }
.landing-copy .actions { margin-top: var(--s-3); }
.portrait {
  width: clamp(160px, 22vw, 260px); aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  border: 1px solid var(--line-2); background: var(--bg-2);
  transition: transform .5s var(--ease-out);
}
.portrait:hover { transform: scale(1.03); }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.landing .nav-list { border-top: 1px solid var(--line); }
.landing-foot { padding-bottom: var(--s-6); }
.landing-foot .nav-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--s-6); border-top: 0; }
.landing-foot .nav-item { border-top: 1px solid var(--line); border-bottom: 0; }
@media (max-width: 760px) {
  .landing-grid { grid-template-columns: 1fr; gap: var(--s-6); }
  .portrait { order: -1; width: 112px; }
  .landing-foot .nav-list { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Video portfolio
   ========================================================================== */
.reel { display: grid; gap: var(--s-6); justify-items: center; }

.channel-switch { display: grid; grid-template-columns: auto minmax(0, 220px) auto; align-items: center; gap: var(--s-5); }
.channel-current { display: grid; justify-items: center; gap: var(--s-2); text-align: center; transition: opacity .25s var(--ease); }
.channel-current.is-swapping { opacity: 0; }
.avatar {
  width: 64px; height: 64px; border-radius: 50%; overflow: hidden;
  border: 1px solid var(--line-2); background: var(--bg-2);
  display: grid; place-items: center;
  font-family: var(--font-num); font-weight: 700; font-size: 20px; color: var(--ink-2);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.channel-name { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.channel-name a { transition: color .2s var(--ease); }
.channel-name a:hover { color: var(--accent); }
.channel-dots { display: flex; gap: 6px; justify-content: center; }
.channel-dots span { width: 6px; height: 6px; border-radius: 999px; background: var(--line-2); transition: width .3s var(--ease-out), background .3s var(--ease); }
.channel-dots span.is-active { width: 18px; background: var(--ink); }

.round-btn {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink-2);
  cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease), transform .15s var(--ease), opacity .2s var(--ease);
}
.round-btn:hover:not(:disabled) { border-color: var(--ink-2); color: var(--ink); }
.round-btn:active:not(:disabled) { transform: scale(.92); }
.round-btn:disabled { opacity: .3; cursor: default; }
.round-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.stage {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: var(--s-7); align-items: center; width: 100%;
}
.reel-meta { justify-self: end; text-align: right; display: grid; gap: var(--s-1); transition: opacity .2s var(--ease); }
.reel-meta.is-swapping { opacity: 0; }
.reel-meta .views { font-size: clamp(40px, 5vw, 56px); line-height: 1; }
.reel-meta .views.is-empty { color: var(--muted); font-family: var(--font); font-size: var(--t-h3); font-weight: 500; }
.reel-meta .counter { margin-top: var(--s-4); font-variant-numeric: tabular-nums; }

.screen {
  position: relative;
  width: clamp(260px, 28vw, 340px); aspect-ratio: 9 / 16;
  border-radius: 24px; overflow: hidden;
  background: #000; border: 1px solid var(--line-2);
}
.screen-inner {
  position: absolute; inset: 0;
  transition: opacity .22s var(--ease), transform .35s var(--ease-out);
}
.screen-inner.is-out-up { opacity: 0; transform: translateY(-24px); }
.screen-inner.is-out-down { opacity: 0; transform: translateY(24px); }
.screen-inner iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.screen-touch { position: absolute; inset: 0; z-index: 2; cursor: pointer; }
.screen-state {
  position: absolute; left: 50%; top: 50%; z-index: 3; pointer-events: none;
  width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(0, 0, 0, .5);
  opacity: 0; transform: scale(.8);
  transition: opacity .2s var(--ease), transform .3s var(--ease-out);
}
.screen-state.is-visible { opacity: 1; transform: none; }
.screen-state svg { width: 22px; height: 22px; fill: #fff; }
.screen-poster {
  position: absolute; inset: 0; width: 100%; display: grid; place-items: center;
  background: #000 center / cover no-repeat; border: 0; cursor: pointer;
}
.screen-poster span {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, .5); transition: transform .3s var(--ease-out);
}
.screen-poster:hover span { transform: scale(1.08); }
.screen-poster svg { width: 22px; height: 22px; fill: #fff; margin-left: 3px; }

.controls { justify-self: start; display: grid; gap: var(--s-3); justify-items: center; }
.controls .sep { width: 20px; height: 1px; background: var(--line-2); margin-block: var(--s-1); }
.volume { display: grid; justify-items: center; gap: var(--s-3); }
.volume input[type="range"] {
  writing-mode: vertical-lr; direction: rtl;
  width: 4px; height: 96px; accent-color: var(--ink); cursor: pointer;
}
.reel-hint { text-align: center; }

@media (max-width: 860px) {
  .reel { gap: var(--s-5); }
  .stage { grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-5) var(--s-4); }
  .stage .screen { order: -1; grid-column: 1 / -1; justify-self: center; width: min(360px, 100%); border-radius: 20px; }
  .reel-meta { justify-self: start; text-align: left; }
  .reel-meta .views { font-size: 40px; }
  .reel-meta .counter { margin-top: var(--s-2); }
  .controls { justify-self: end; grid-auto-flow: column; align-items: center; }
  .controls .sep, .volume input[type="range"] { display: none; }
  .stage { max-width: 360px; }
}

/* Trabajos 16:9 */
.work-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--s-7) var(--s-6); }
.work { display: grid; gap: var(--s-2); align-content: start; }
.work-frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  background: var(--bg-2); margin-bottom: var(--s-3);
}
.work-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.work-frame .screen-poster { transition: transform .6s var(--ease-out); }
.work:hover .screen-poster { transform: scale(1.02); }

/* FAQ */
.faq { border-top: 1px solid var(--line); max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); interpolate-size: allow-keywords; }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-5);
  padding-block: var(--s-5); font-size: 18px; font-weight: 500; letter-spacing: -.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex-shrink: 0; width: 10px; height: 10px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: translateY(-3px) rotate(45deg);
  transition: transform .35s var(--ease-out);
}
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq details::details-content {
  height: 0; overflow: hidden;
  transition: height .4s var(--ease-out), content-visibility .4s allow-discrete;
}
.faq details[open]::details-content { height: auto; }
.faq .answer { padding-bottom: var(--s-5); color: var(--ink-2); max-width: 56ch; }

/* ==========================================================================
   Animaciones de entrada
   ========================================================================== */
/* Se usa animation + translate (no transition + transform) para no pisar
   las transiciones de hover de cada tarjeta. */
.js [data-reveal] { opacity: 0; }
.js [data-reveal].is-in {
  opacity: 1;
  animation: reveal .9s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}
@keyframes reveal {
  from { opacity: 0; translate: 0 22px; filter: blur(6px); }
  60% { filter: blur(0); }
  to { opacity: 1; translate: 0 0; filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
