/* =========================================================
   PYSCIS — Sitio insignia
   Identidad oficial del manual de marca
   Editorial oscuro + acento koi naranja
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Paleta exacta del manual */
  --negro: #000000;
  --carbon: #0D0D0D;
  --indigo: #1A1A1E;
  --naranja: #F97316;
  --naranja-osc: #D85A30;
  --error: #FF5B52;
  --hueso: #F5F4F0;
  --gris: #888780;
  --gris-osc: #2A2A2A;

  /* Tipografía */
  --font-display: 'Montserrat', system-ui, sans-serif;
  --font-body: 'Montserrat', system-ui, sans-serif;

  /* Liquid glass — sistema de paneles */
  --glass-bg: rgba(255,255,255,0.055);
  --glass-bg-strong: rgba(255,255,255,0.09);
  --glass-border: rgba(255,255,255,0.14);
  --glass-blur: blur(18px) saturate(150%);
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.38);
  --glass-highlight: inset 0 1px 0 rgba(255,255,255,0.20);

  /* Escala fluida (reducida ~15-20% para que el contenido post-hero no quede grande) */
  --fs-eyebrow: clamp(0.7rem, 0.66rem + 0.18vw, 0.78rem);
  --fs-body: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
  --fs-lead: clamp(1.05rem, 0.95rem + 0.5vw, 1.35rem);
  --fs-h2: clamp(1.7rem, 1.25rem + 2.3vw, 3rem);
  --fs-h1: clamp(2.4rem, 1.5rem + 6vw, 6.5rem);
  --fs-manifiesto: clamp(1.4rem, 0.95rem + 2.6vw, 3rem);

  /* Espaciado — reducido para que cada sección entre mejor bajo el nav */
  --space-section: clamp(2.8rem, 1.8rem + 4.5vw, 5rem);
  --gutter: clamp(1.25rem, 0.6rem + 3vw, 3.5rem);
  --maxw: 1320px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
  --dur: 0.6s;

  --radius: 18px;
  --header-h: 84px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Hueco para el nav fijo al saltar a una sección por ancla (coincide con NAV_GAP en main.js) */
  scroll-padding-top: 90px;
}
html.is-anim { scroll-behavior: auto; } /* Lenis takes over */

body {
  background: var(--negro);
  color: var(--hueso);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

/* Cursor: flecha naranja con borde negro (nativo). Tip en (3,2). */
html { cursor: url("../assets/cursor.png") 3 2, auto; }
a, button, .btn, [data-cursor], label, summary { cursor: url("../assets/cursor.png") 3 2, auto; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea { font: inherit; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 1.02; letter-spacing: -0.02em; }

::selection { background: var(--naranja); color: var(--negro); }

/* Scrollbar naranja */
* { scrollbar-color: var(--naranja) var(--carbon); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--carbon); }
::-webkit-scrollbar-thumb { background: var(--naranja-osc); border-radius: 10px; border: 2px solid var(--carbon); }
::-webkit-scrollbar-thumb:hover { background: var(--naranja); }

/* Focus accesible */
:focus-visible { outline: 3px solid var(--naranja); outline-offset: 3px; border-radius: 4px; }
:focus:not(:focus-visible) { outline: none; }

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

.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 10000;
  background: var(--naranja); color: var(--negro); padding: 0.7rem 1.2rem;
  border-radius: 8px; font-weight: 600; transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* Solo para lectores de pantalla / SEO (h1 oculto sin título visible) */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* =========================================================
   PROGRESSIVE ENHANCEMENT — sin FOUC
   Estados ocultos SOLO bajo .is-anim. Sin JS/CDN o con
   reduced-motion: todo queda visible.
   ========================================================= */
.is-anim .reveal-fade,
.is-anim .reveal-card { opacity: 0; }
.is-anim .mask__inner { transform: translateY(110%); }
.is-anim .preloader { display: flex; }

/* NOTA: el estado de los reveals lo controla GSAP (gsap.set + tween con
   autoAlpha). No usamos una regla .is-ready {opacity:1} global porque
   pisaba el opacity:0 inicial y rompía el fade-in por stagger (los
   elementos aparecían visibles pero desplazados en Y). El salvavidas de
   visibilidad vive en main.js (revealEverything + timeout). */

/* =========================================================
   GRANO
   ========================================================= */
.grain {
  position: fixed; inset: 0; z-index: 9990; pointer-events: none;
  opacity: 0.04; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* =========================================================
   PRELOADER
   ========================================================= */
.preloader {
  position: fixed; inset: 0; z-index: 10000; background: var(--negro);
  display: none; align-items: center; justify-content: center;
}
.preloader__inner { display: flex; flex-direction: column; align-items: center; gap: 1.6rem; }
.preloader__logo {
  width: 86px; height: 86px; border-radius: 16px; object-fit: cover;
  animation: koiPulse 2.2s var(--ease-inout) infinite;
}
@keyframes koiPulse { 0%,100% { transform: scale(1); opacity: 0.85; } 50% { transform: scale(1.06); opacity: 1; } }
.preloader__bar { width: min(240px, 60vw); height: 2px; background: var(--gris-osc); border-radius: 2px; overflow: hidden; }
.preloader__fill { display: block; height: 100%; width: 0%; background: var(--naranja); }
.preloader__count { font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; color: var(--gris); letter-spacing: 0.05em; }

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 900;
  transition: background 0.4s var(--ease-out), border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav__inner {
  width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 1.1rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: transparent; border: 1px solid transparent; border-radius: 0; box-shadow: none;
  backdrop-filter: blur(0px) saturate(100%); -webkit-backdrop-filter: blur(0px) saturate(100%);
  transition: margin 0.45s var(--ease-out), width 0.45s var(--ease-out), padding 0.45s var(--ease-out),
              border-radius 0.45s var(--ease-out), background 0.4s, border-color 0.4s, box-shadow 0.4s;
}
.nav.is-scrolled { background: transparent; border-bottom-color: transparent; }
.nav.is-scrolled .nav__inner {
  margin: 0.55rem auto 0;
  width: min(var(--maxw), calc(100% - 2rem));
  padding: 0.6rem clamp(1.1rem, 2vw, 1.7rem);
  border-radius: 100px;
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-highlight);
}
.nav__logo { height: 56px; width: auto; transition: height 0.45s var(--ease-out); }
.nav.is-scrolled .nav__logo { height: 44px; }
.nav__links { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2.4rem); }
.nav__link {
  font-size: 0.92rem; font-weight: 500; color: var(--hueso); position: relative; padding: 0.3rem 0;
}
.nav__link::after {
  content: ''; position: absolute; left: 0; bottom: -2px; height: 1.5px; width: 0; background: var(--naranja);
  transition: width 0.3s var(--ease-out);
}
.nav__link:hover::after, .nav__link.is-active::after { width: 100%; }
.nav__link.is-active { color: var(--naranja); }
.nav__cta {
  font-size: 0.9rem; font-weight: 600; padding: 0.6rem 1.3rem; border-radius: 100px;
  background: var(--naranja); color: var(--negro);
  transition: transform 0.3s var(--ease-out), background 0.3s;
}
.nav__cta:hover { background: var(--hueso); }
.nav__burger { display: none; flex-direction: column; gap: 6px; width: 32px; height: 32px; align-items: center; justify-content: center; }
.nav__burger span { display: block; width: 24px; height: 2px; background: var(--hueso); transition: transform 0.3s var(--ease-out), opacity 0.3s; }
.nav__burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 890;
  background: rgba(8,8,8,0.94);
  backdrop-filter: blur(26px) saturate(140%);
  -webkit-backdrop-filter: blur(26px) saturate(140%);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ease-out), visibility 0.4s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu__nav { display: flex; flex-direction: column; gap: 1.6rem; text-align: center; }
.mobile-menu__link { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 8vw, 2.6rem); color: var(--hueso); }
.mobile-menu__link:hover { color: var(--naranja); }
.mobile-menu__cta {
  margin-top: 0.6rem; align-self: center; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.4rem, 6vw, 2rem); color: var(--negro); background: var(--naranja);
  padding: 0.55rem 2.2rem; border-radius: 100px; transition: background 0.3s;
}
.mobile-menu__cta:hover { background: var(--hueso); }

/* =========================================================
   BOTONES
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 700; font-size: 0.98rem;
  padding: 0.95rem 1.9rem; border-radius: 100px; min-height: 48px;
  white-space: nowrap; text-align: center;
  transition: transform 0.3s var(--ease-out), background 0.3s, color 0.3s, border-color 0.3s;
}
/* will-change solo mientras el botón está activo, no permanente (evita capas
   de composición GPU que nunca se liberan). */
.btn:hover, .btn:focus-visible { will-change: transform; }
.btn--solid { background: var(--naranja); color: var(--negro); }
.btn--solid:hover { background: var(--hueso); }
.btn--ghost {
  background: var(--glass-bg); color: var(--hueso); border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-highlight);
}
.btn--ghost:hover { border-color: var(--naranja); color: var(--naranja); background: var(--glass-bg-strong); }
.btn--block { width: 100%; }

/* =========================================================
   LABELS / TÍTULOS DE SECCIÓN
   ========================================================= */
.section-label {
  display: inline-block; font-family: var(--font-display); font-weight: 700;
  font-size: var(--fs-eyebrow); letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--naranja); margin-bottom: 1.2rem;
}
.section-title { font-size: var(--fs-h2); max-width: 16ch; }

/* Reveals base — sin will-change permanente. GSAP gestiona la promoción a
   capa durante el tween (force3D) y la libera al terminar. */

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative; min-height: 100svh; display: flex; flex-direction: column;
  justify-content: flex-end; padding: var(--header-h) var(--gutter) clamp(2rem, 5vh, 4rem);
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero__video, .hero__fallback {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; display: block;
}
.hero__fallback { display: none; }

/* Banda oscura al pie del VIDEO: tapa la marca de agua/logo del clip (desktop y mobile) */
.hero__videoscrim {
  position: absolute; left: 0; right: 0; bottom: 0; height: 42%; z-index: 2; pointer-events: none;
  background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.7) 22%, #000 42%);
}

/* Overlay de glitch: se activa al terminar el video y vuelve a 0 (queda limpio) */
.hero__glitch {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; mix-blend-mode: screen;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.07) 0 1px, transparent 1px 3px),
    linear-gradient(90deg, rgba(249,115,22,0.35), rgba(40,180,255,0.25));
}
.hero.is-glitching .hero__glitch { animation: heroGlitchOverlay 0.85s steps(3, end) 1 both; }
.hero.is-glitching .hero__video { animation: heroVidGlitch 0.85s steps(2, end) 1 both; }
@keyframes heroVidGlitch {
  0%   { transform: translate(0,0); filter: none; clip-path: inset(0 0 0 0); }
  12%  { transform: translate(-5px,2px); filter: hue-rotate(25deg) contrast(1.5); clip-path: inset(14% 0 56% 0); }
  24%  { transform: translate(6px,-3px); filter: invert(0.12) saturate(2.2); clip-path: inset(60% 0 8% 0); }
  36%  { transform: translate(-7px,1px); filter: hue-rotate(-35deg) brightness(1.3); clip-path: inset(38% 0 30% 0); }
  50%  { transform: translate(4px,2px); filter: contrast(1.9); clip-path: inset(8% 0 72% 0); }
  64%  { transform: translate(-3px,-1px); filter: none; clip-path: inset(46% 0 22% 0); }
  78%  { transform: translate(2px,0); filter: brightness(1.1); clip-path: inset(0 0 0 0); }
  100% { transform: translate(0,0); filter: none; clip-path: inset(0 0 0 0); }
}
@keyframes heroGlitchOverlay {
  0%,100% { opacity: 0; transform: translateX(0); }
  10% { opacity: 0.55; transform: translateX(-4px); }
  30% { opacity: 0.2; transform: translateX(5px); }
  50% { opacity: 0.6; transform: translateX(-3px); }
  72% { opacity: 0.18; transform: translateX(2px); }
  90% { opacity: 0.05; }
}

/* Control de video persistente: pausa/reproduce durante el clip y reinicia
   cuando quedó congelado (WCAG 2.2.2 — pausar lo que se mueve más de 5 s). */
.hero__vidctl {
  position: absolute; top: clamp(78px, 12vh, 108px); left: var(--gutter); z-index: 4;
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(8,9,12,0.5); border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px) saturate(140%); -webkit-backdrop-filter: blur(10px) saturate(140%);
  color: var(--hueso); opacity: 0.55;
  transition: opacity 0.35s var(--ease-out), background 0.3s, border-color 0.3s, color 0.3s;
}
.hero__vidctl:hover, .hero__vidctl:focus-visible { opacity: 1; background: rgba(8,9,12,0.7); border-color: var(--naranja); color: var(--naranja); }
.hero__vidctl-ic { width: 16px; height: 16px; }
/* iconos según estado: por defecto (reproduciendo) muestra pausa */
.hero__vidctl-play, .hero__vidctl-replay { display: none; }
.hero.is-paused .hero__vidctl-pause { display: none; }
.hero.is-paused .hero__vidctl-play { display: block; }
.hero.is-frozen .hero__vidctl-pause, .hero.is-frozen .hero__vidctl-play { display: none; }
.hero.is-frozen .hero__vidctl-replay { display: block; }
.hero.is-frozen .hero__vidctl { opacity: 0.82; }

/* Vignette general sutil + fundido al negro para la transición de sección */
.hero__vignette {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 85% at 50% 28%, transparent 56%, rgba(0,0,0,0.22) 100%),
    linear-gradient(to bottom, transparent 60%, var(--negro) 100%);
}
.hero__content { position: relative; z-index: 2; max-width: var(--maxw); margin-inline: auto; width: 100%; }

/* Barra de vidrio al pie del hero: solo la frase + los 2 botones. El video manda. */
.hero__panel {
  display: flex; align-items: center; justify-content: space-between;
  gap: clamp(1rem, 3vw, 2.4rem); flex-wrap: wrap;
  padding: clamp(1.1rem, 2.2vw, 1.5rem) clamp(1.3rem, 2.6vw, 2rem);
  border-radius: var(--radius);
  background: rgba(8,9,12,0.34);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 10px 34px rgba(0,0,0,0.30), var(--glass-highlight);
  backdrop-filter: blur(13px) saturate(135%);
  -webkit-backdrop-filter: blur(13px) saturate(135%);
}
.hero__sub {
  flex: 1 1 340px; margin: 0; max-width: 62ch; text-wrap: balance;
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.22rem); line-height: 1.42; color: var(--gris); font-weight: 400;
}
.hero__sub-lead { font-family: var(--font-display); font-weight: 700; color: var(--hueso); font-style: normal; }
.hero__actions { display: flex; gap: 1rem; margin: 0; flex-shrink: 0; }

/* =========================================================
   MANIFIESTO
   ========================================================= */
.manifiesto { padding-block: var(--space-section); position: relative; overflow: hidden; }
/* Glow naranja que ocupa la mitad derecha (antes negro vacío en desktop) */
.manifiesto::after {
  content: ''; position: absolute; top: 50%; right: -6%; width: 46%; height: 130%;
  transform: translateY(-50%);
  background: radial-gradient(circle at 60% 50%, rgba(249,115,22,0.14), transparent 66%);
  pointer-events: none; z-index: 0;
}
.manifiesto .container { position: relative; z-index: 1; }
.manifiesto__text {
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-manifiesto);
  line-height: 1.16; letter-spacing: -0.02em; max-width: 26ch;
}
.manifiesto__text em { font-style: normal; color: var(--naranja); }
/* Reveal palabra por palabra */
.manifiesto__text .word { display: inline-block; }
.is-anim .manifiesto__text .word { opacity: 0.22; }

/* =========================================================
   TRABAJOS
   ========================================================= */
.works { padding-block: var(--space-section); position: relative; }
.works__intro { margin-bottom: clamp(1rem, 2vw, 1.8rem); }

/* Carrusel case-study: mockup (laptop + celular) + Desafío/Solución/Resultado */
.cstudy { position: relative; }
.cstudy__viewport { overflow: hidden; touch-action: pan-y; }
.cstudy__track { display: flex; transition: transform 0.6s var(--ease-out); }
.cslide {
  flex: 0 0 100%; display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 5vw, 4rem); align-items: center; padding-block: clamp(0.5rem, 2vw, 1.4rem);
}
.cslide__mock { position: relative; padding: clamp(0.5rem, 2vw, 1.5rem) 6% 2.4rem 0; }
.dev-laptop { width: 90%; margin-inline: auto; }
.dev-laptop__screen {
  border: 7px solid #16161a; border-top-width: 9px; border-radius: 11px 11px 0 0; overflow: hidden;
  aspect-ratio: 16 / 10; background: #000; box-shadow: 0 22px 50px rgba(0,0,0,0.5);
}
.dev-laptop__screen img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.dev-laptop__base {
  display: block; width: 110%; height: 13px; margin-left: -5%; position: relative;
  background: linear-gradient(#2c2c33, #141419); border-radius: 0 0 12px 12px; box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}
.dev-laptop__base::after { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 14%; height: 4px; background: #0b0b0e; border-radius: 0 0 6px 6px; }
.dev-phone {
  position: absolute; left: 0; bottom: 0; width: 21%; aspect-ratio: 9 / 19;
  border: 5px solid #16161a; border-radius: 16px; overflow: hidden; background: #000; box-shadow: 0 16px 34px rgba(0,0,0,0.6);
}
.dev-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
/* Lumière (2do slide): el título de la captura del laptop cae a la izquierda;
   movemos el celu a la derecha para no taparlo. */
.cslide:nth-child(2) .dev-phone { left: auto; right: 2%; }

.cslide__title { font-size: clamp(1.4rem, 2.6vw, 2rem); margin-bottom: 0.25rem; }
.cslide__rubro { color: var(--naranja); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.03em; margin-bottom: 1.2rem; }
.cslide__case { display: flex; flex-direction: column; gap: 0.85rem; }
.cslide__label { display: block; font-family: var(--font-display); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--naranja); margin-bottom: 0.2rem; }
.cslide__block p { color: var(--gris); font-size: 0.94rem; line-height: 1.5; }
.cslide__link { display: inline-block; margin-top: 1.3rem; color: var(--naranja); font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; transition: color 0.3s; }
.cslide__link:hover { color: var(--hueso); }

.cstudy__nav { display: flex; align-items: center; justify-content: center; gap: 0.9rem; margin-top: clamp(1.2rem, 2.5vw, 2rem); }
.cstudy__arrow, .cstudy__toggle {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--hueso);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.cstudy__arrow:hover, .cstudy__toggle:hover { border-color: var(--naranja); color: var(--naranja); }
.cstudy__arrow svg { width: 20px; height: 20px; }
.cstudy__toggle svg { width: 16px; height: 16px; }
.cstudy__toggle .cstudy__play { display: none; }
.cstudy.is-paused .cstudy__toggle .cstudy__pause { display: none; }
.cstudy.is-paused .cstudy__toggle .cstudy__play { display: block; }
/* El botón es el área táctil (>=26px, 40px en touch); el punto se dibuja con ::before */
.cstudy__dots { display: flex; align-items: center; gap: 0; }
.cstudy__dot {
  width: 26px; height: 26px; padding: 0; border: none; background: transparent;
  display: grid; place-items: center; cursor: pointer;
}
.cstudy__dot::before {
  content: ''; width: 9px; height: 9px; border-radius: 50%;
  background: #6E6E6E; transition: background 0.3s, width 0.3s, border-radius 0.3s;
}
.cstudy__dot:hover::before { background: var(--gris); }
.cstudy__dot.is-active::before { background: var(--naranja); width: 22px; border-radius: 5px; }
@media (pointer: coarse) { .cstudy__dot { width: 40px; height: 40px; } }

@media (max-width: 820px) {
  .cslide { grid-template-columns: 1fr; gap: 1.4rem; }
  .cslide__mock { padding: 0.5rem 0 2rem; max-width: 480px; margin-inline: auto; width: 100%; }
  .dev-laptop { width: 80%; }
  .dev-phone { width: 24%; left: 2%; }
}

/* =========================================================
   PLANES
   ========================================================= */
.plans { padding-block: clamp(2.2rem, 3.4vw, 3.4rem); position: relative; overflow: hidden; }
.plans::after {
  content: ''; position: absolute; top: -8%; right: -6%; width: 52%; height: 60%;
  background: radial-gradient(circle, rgba(249,115,22,0.13), transparent 68%);
  pointer-events: none; z-index: 0;
}
.plans .container { position: relative; z-index: 1; }
.plans__head { max-width: 64ch; margin-bottom: clamp(1rem, 2vw, 1.6rem); }
.plans__proof { display: inline-flex; align-items: center; gap: 0.55rem; margin-bottom: 0.7rem; color: var(--gris); font-size: 0.84rem; }
.plans__proof svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--naranja); }
.plans__stars { color: var(--naranja); letter-spacing: 2px; }
.plans__lead { color: var(--gris); font-size: clamp(0.92rem, 0.88rem + 0.25vw, 1.05rem); max-width: 60ch; margin-top: 0.7rem; font-weight: 400; }
.plans__lead strong { color: var(--hueso); font-weight: 600; }

.plans__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.2rem, 2.5vw, 1.8rem); align-items: start;
}
/* Rango de 2 columnas (tablet): la 3ra tarjeta no queda huérfana, se centra */
@media (min-width: 601px) and (max-width: 880px) {
  .plans__grid .plan:last-child { grid-column: 1 / -1; max-width: 420px; margin-inline: auto; }
}

.plan {
  position: relative; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--carbon), #090909);
  border: 1px solid var(--gris-osc); border-radius: 18px;
  padding: clamp(0.95rem, 1.4vw, 1.25rem);
  transition: transform 0.4s var(--ease-out), border-color 0.4s;
}
.plan:hover { transform: translateY(-6px); border-color: rgba(249,115,22,0.45); }
.plan--featured {
  border-color: rgba(249,115,22,0.5);
  box-shadow: 0 0 0 1px rgba(249,115,22,0.25), 0 26px 64px rgba(249,115,22,0.15);
}
.plan--featured::before {
  content: ''; position: absolute; inset: 0; border-radius: 22px; pointer-events: none;
  background: radial-gradient(90% 55% at 50% 0%, rgba(249,115,22,0.16), transparent 70%);
}
.plan > * { position: relative; z-index: 1; }
.plan__tag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%); z-index: 2;
  background: var(--naranja); color: var(--negro); font-family: var(--font-display); font-weight: 700;
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.36rem 0.95rem; border-radius: 100px;
}
.plan__media {
  height: clamp(80px, 7.5vw, 104px); border-radius: 12px; overflow: hidden; margin-bottom: 0.8rem;
  background: radial-gradient(120% 100% at 50% 0%, #16161e, #0a0a0e);
  border: 1px solid var(--gris-osc);
  display: grid; place-items: center; padding: clamp(0.7rem, 1.6vw, 1rem);
}
/* Wireframe lineal con glow neón naranja */
.plan__art {
  width: auto; height: 100%; max-width: 100%;
  filter: drop-shadow(0 0 4px rgba(249,115,22,0.6)) drop-shadow(0 0 11px rgba(249,115,22,0.35));
}
.plan__name { font-size: clamp(1.05rem, 1.7vw, 1.25rem); margin-bottom: 0.35rem; }
.plan__price { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 2.8vw, 2.1rem); color: var(--hueso); letter-spacing: -0.02em; line-height: 1; }
.plan__price span { font-size: 0.9rem; font-weight: 500; color: var(--gris); letter-spacing: 0; }
.plan__badge {
  display: inline-block; margin-top: 0.5rem; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--naranja);
  border: 1px solid rgba(249,115,22,0.4); border-radius: 100px; padding: 0.24rem 0.65rem;
}
.plan__desc { color: var(--gris); font-size: 0.88rem; line-height: 1.4; margin-top: 0.65rem; }
.plan__cta {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 0.8rem;
  margin-top: 0.8rem; padding: 0.5rem 0.5rem 0.5rem 1.1rem; border-radius: 100px;
  background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--hueso);
  font-family: var(--font-display); font-weight: 700; font-size: 0.92rem;
  transition: background 0.3s, color 0.3s, transform 0.3s var(--ease-out);
}
.plan__cta-arrow { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--hueso); color: var(--negro); flex-shrink: 0; }
.plan__cta-arrow svg { width: 15px; height: 15px; }
.plan__cta:hover { background: var(--hueso); color: var(--negro); }
.plan--featured .plan__cta { background: var(--naranja); color: var(--negro); border-color: transparent; }
.plan--featured .plan__cta-arrow { background: var(--negro); color: var(--naranja); }
.plan--featured .plan__cta:hover { background: var(--hueso); }
.plan__features {
  list-style: none; margin-top: 0.8rem; display: flex; flex-direction: column; gap: 0.38rem;
  border-top: 1px solid var(--gris-osc); padding-top: 0.75rem;
}
.plan__features li { display: flex; align-items: flex-start; gap: 0.55rem; font-size: 0.84rem; color: var(--gris); line-height: 1.35; }
.plan__features svg { flex-shrink: 0; width: 16px; height: 16px; color: var(--naranja); margin-top: 1px; }

/* =========================================================
   CONTACTO
   ========================================================= */
.contact { padding-block: var(--space-section); }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.contact__title { font-size: var(--fs-h2); margin: 0.6rem 0 1.4rem; max-width: 12ch; }
.contact__lead { color: var(--gris); font-size: var(--fs-lead); max-width: 38ch; margin-bottom: 1.5rem; font-weight: 400; }
.contact__direct { display: flex; flex-direction: column; gap: 1rem; }
.contact__direct-item { display: inline-flex; align-items: center; gap: 0.8rem; font-weight: 500; width: fit-content; transition: color 0.3s; }
.contact__direct-item svg { width: 24px; height: 24px; color: var(--naranja); }
.contact__direct-item:hover { color: var(--naranja); }

.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow), var(--glass-highlight);
  padding: clamp(1.3rem, 2.4vw, 2rem);
}
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--gris); margin-bottom: 0.5rem; letter-spacing: 0.03em; }
.field__req { color: var(--naranja); }
.field input, .field textarea {
  width: 100%; background: var(--negro); border: 1px solid var(--gris-osc); border-radius: 12px;
  padding: 0.9rem 1.1rem; color: var(--hueso); resize: vertical; transition: border-color 0.3s, background 0.3s;
}
.field input::placeholder, .field textarea::placeholder { color: #8a8880; }
.field input:focus, .field textarea:focus { border-color: var(--naranja); background: var(--carbon); }
.contact__note { margin-top: 1rem; font-size: 0.9rem; color: var(--gris); min-height: 1.2em; }
.contact__note.is-error { color: var(--error); font-weight: 500; }
.contact__note.is-ok { color: var(--hueso); }
/* error: borde rojo (distinto del naranja de foco) */
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--error); }

.contact__closer {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.9rem, 1.3rem + 3.4vw, 3.8rem);
  text-align: center; margin-top: clamp(2rem, 4vw, 3rem); line-height: 1;
}
.contact__closer em { font-style: normal; color: var(--naranja); }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { background: var(--carbon); border-top: 1px solid var(--gris-osc); padding-top: clamp(3rem, 6vw, 5rem); }
.footer__inner {
  display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 2.5rem; align-items: start;
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}
.footer__logo { height: 52px; width: auto; margin-bottom: 1rem; }
.footer__tag { color: var(--gris); font-family: var(--font-display); font-weight: 500; }
.footer__nav { display: flex; flex-direction: column; gap: 0.3rem; }
.footer__nav a { color: var(--gris); transition: color 0.3s; width: fit-content; padding-block: 0.4rem; }
.footer__nav a:hover { color: var(--naranja); }
.footer__social { display: flex; gap: 0.8rem; }
.footer__social a {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--gris-osc); color: var(--hueso); transition: border-color 0.3s, color 0.3s, transform 0.3s var(--ease-out);
}
.footer__social a svg { width: 20px; height: 20px; }
.footer__social a:hover { border-color: var(--naranja); color: var(--naranja); transform: translateY(-3px); }
.footer__base {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
  padding-block: 1.6rem; border-top: 1px solid var(--gris-osc); color: var(--gris); font-size: 0.86rem;
}
.footer__top { display: inline-block; padding-block: 0.4rem; }
.footer__top:hover { color: var(--naranja); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .contact__grid { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; gap: 2rem; }
}

/* Hero en vertical: video arriba, barra de vidrio DEBAJO (mejor para el formato
   del celu, así el video se ve completo y no queda tapado por el panel) */
@media (max-width: 768px) {
  .hero {
    min-height: auto; justify-content: flex-start;
    padding: 0 0 clamp(2rem, 7vw, 3rem);
  }
  .hero__media {
    position: relative; inset: auto; height: 50vh; width: 100%;
  }
  /* Scrim más corto: tapa la marca de agua del pie sin dejar una banda negra
     muerta entre el video y la tarjeta de vidrio. */
  .hero__videoscrim {
    height: 30%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.6) 55%, #000 100%);
  }
  .hero__vignette { display: none; }
  .hero__content { padding: clamp(1.1rem, 4vw, 1.6rem) var(--gutter) 0; }
  .hero__panel { flex-direction: column; align-items: stretch; gap: 1.1rem; }
  .hero__sub { flex: none; max-width: none; }
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1 1 auto; }
}

@media (max-width: 600px) {
  /* Apilar los CTA del hero: lado a lado, "Ver planes" se partía en dos líneas */
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { flex: 1 1 auto; width: 100%; }
}

/* =========================================================
   PREFERS-REDUCED-MOTION — todo visible y quieto
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important; scroll-behavior: auto !important;
  }
  .preloader { display: none !important; }
  .reveal-fade, .reveal-card { opacity: 1 !important; }
  .mask__inner { transform: none !important; }
  .hero__fallback { display: block; }
  .hero__video { display: none; }
  .hero__vidctl { display: none; } /* sin video no hay nada que pausar */
  .manifiesto__text .word { opacity: 1 !important; }
}
