/* ══════════════════════════════════════════════════════════════════
   Julian Avila — portfolio
   Los colores, tamaños y espacios viven en :root. Cambia un valor
   ahí y se actualiza en todo el sitio.
   ══════════════════════════════════════════════════════════════════ */

/* ---------- 1. Fuentes (auto-alojadas) ---------- */
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/montserrat-latin.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/montserrat-latin-ext.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-latin.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- 2. Tokens de diseño ---------- */
:root {
  /* Colores — paleta profunda: casi negro, azules oscuros.
     El azul claro (cyan) es un acento RARO, no un color de fondo. */
  --bg:            #020408;
  --bg-2:          #05070F;
  --card:          #080D18;
  --text:          #EAF0FF;
  --muted:         #8E9BC0;   /* 7.6:1 sobre el fondo — cumple AA y AAA */
  --line:          rgba(120, 160, 220, .14);
  --line-strong:   rgba(120, 160, 220, .26);

  --cyan:          #22D3EE;
  --blue:          #2F7BFF;
  --blue-deep:     #0B3AE6;
  --blue-night:    #061024;   /* azul nocturno para superficies */
  /* Azul profundo: sin cian en los rellenos. El cian queda para
     detalles mínimos (foco, algún borde), nunca como fondo. */
  --accent-grad:   linear-gradient(120deg, #2563EB, #0E3FD4);
  --accent-grad-3: linear-gradient(115deg, #5B9BFF, #2563EB 45%, #0E3FD4);

  /* Plateado: el acento de la marca. Gris claro con resplandor,
     en lugar de un azul saturado. */
  --silver:        #D6E0F0;
  --silver-dim:    #9FB0C8;
  --silver-grad:   linear-gradient(115deg, #FFFFFF, #C9D6E8 45%, #8FA3C0);
  --silver-glow:   0 0 18px rgba(190, 214, 245, .35);

  /* Vidrio: oscuro, poco desenfoque, con borde que atrapa la luz arriba */
  --glass-bg:      rgba(7, 11, 22, .78);
  --glass-blur:    blur(11px) saturate(125%);
  --glass-edge:    linear-gradient(155deg, rgba(140, 190, 255, .30), rgba(47, 123, 255, .10) 42%, rgba(140, 190, 255, .04) 70%, rgba(140, 190, 255, .16));
  --glass-inset:   inset 0 1px 0 rgba(175, 210, 255, .13);

  /* Tipografía — Montserrat ExtraBold hace de Acier BAT (títulos)
     e Inter Light hace de Acumin Pro Light (textos de apoyo). */
  --font-display: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --display-weight: 800;

  /* Medidas */
  --container: 1200px;
  --radius:    18px;
  --radius-lg: 26px;
  /* Curvatura de botones y etiquetas. Súbelo para más redondeo,
     bájalo a 0 para esquinas rectas. */
  --radius-btn: 14px;
  --radius-sm:  10px;
  --section-y: clamp(5rem, 10vw, 8.5rem);

  /* Movimiento */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --dur:  .6s;
}

/* ---------- 3. Reset y base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6.5rem;   /* la nav flotante no tapa los títulos */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;   /* respaldo para navegadores sin 'clip' */
  overflow-x: clip;     /* recorta el desborde lateral sin crear scroll */
}

img, picture, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  line-height: 1.02;
  letter-spacing: -.005em;
  text-transform: uppercase;
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--silver);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: var(--blue); color: #fff; }

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: .75rem; left: 50%;
  transform: translate(-50%, -200%);
  z-index: 200;
  padding: .7rem 1.2rem;
  border-radius: var(--radius-sm);
  background: var(--silver);
  color: var(--bg);
  font-weight: 600;
  transition: transform .2s var(--ease);
}
.skip-link:focus-visible { transform: translate(-50%, 0); }

/* ---------- 4. Elementos compartidos ---------- */
/* Antetítulo en plateado con resplandor, no en azul */
.eyebrow {
  margin: 0 0 1rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--silver);
  text-shadow: var(--silver-glow);
}

.section { padding-block: var(--section-y); position: relative; }

/* Raya divisoria: marca el inicio de cada sección y la separa de la anterior */
.rule {
  width: 54px;
  height: 3px;
  border-radius: 3px;
  background: var(--silver-grad);
  box-shadow: var(--silver-glow);
  margin-bottom: 1.5rem;
}
.contact .rule { margin-inline: auto; }

.section__title {
  font-size: clamp(1.9rem, 1rem + 4.4vw, 5rem);
  margin-bottom: 1.2rem;
}
.section__title--xl { font-size: clamp(2.1rem, 1rem + 4.8vw, 5rem); }

.section__lead {
  max-width: 46ch;
  color: var(--muted);
  margin: 0 0 3rem;
  font-size: 1.05rem;
  font-weight: 300;      /* eco del Acumin Pro Light de tu portfolio */
}

.link {
  color: var(--silver);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .2s var(--ease);
}
.link:hover { color: var(--text); }

/* Botones */
.btn {
  --btn-py: .78rem;
  --btn-px: 1.35rem;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: var(--btn-py) var(--btn-px);
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: .92rem;
  letter-spacing: .01em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background-color .25s var(--ease), border-color .25s var(--ease);
}
.btn--sm { --btn-py: .6rem; --btn-px: 1.1rem; font-size: .88rem; }

/* Botón principal: también en vidrio. Se distingue por un filo más
   luminoso y un halo plateado, no por un relleno de color. */
.btn--primary {
  color: #fff;
  border-color: transparent;
  background-image:
    linear-gradient(rgba(30, 40, 62, .78), rgba(16, 24, 42, .78)),
    linear-gradient(150deg, rgba(255, 255, 255, .95), rgba(200, 220, 250, .45) 45%, rgba(235, 245, 255, .7));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45),
              0 4px 20px -10px rgba(200, 222, 250, .45);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .42),
              0 12px 30px -14px rgba(200, 222, 250, .7),
              var(--silver-glow);
}

/* Botón secundario en vidrio oscuro con filo iluminado */
.btn--ghost {
  color: var(--text);
  border-color: transparent;
  background-image: linear-gradient(var(--glass-bg), var(--glass-bg)), var(--glass-edge);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-inset);
}
.btn--ghost:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-inset), 0 10px 26px -16px rgba(47, 123, 255, .7);
}
/* Feedback táctil al pulsar (se hunde un poco) */
.btn:active { transform: scale(.97); transition-duration: .1s; }

.btn__icon { width: 1.05em; height: 1.05em; flex: none; }

/* ---------- 5. Navegación ---------- */
.nav {
  position: fixed;
  inset: 1rem 0 auto;
  z-index: 100;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.nav__pill {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: min(100% - 2rem, var(--container));
  padding: .55rem .65rem .55rem 1rem;
  border-radius: 18px;
  /* Vidrio oscuro con borde que atrapa la luz en el filo superior */
  border: 1px solid transparent;
  background-image: linear-gradient(var(--glass-bg), var(--glass-bg)), var(--glass-edge);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-inset), 0 20px 50px -32px rgba(0, 0, 0, .95);
  transition: box-shadow .3s var(--ease);
}
.nav.is-scrolled .nav__pill {
  box-shadow: var(--glass-inset), 0 22px 55px -28px rgba(0, 0, 0, 1);
}

.nav__brand { display: flex; align-items: center; gap: .6rem; flex: none; }
.nav__mark {
  width: 42px;
  height: auto;
  flex: none;
  color: var(--text);
  transition: color .25s var(--ease);
}
.nav__brand:hover .nav__mark { color: var(--silver); }
.nav__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -.01em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-left: auto;
}
.nav__links a {
  display: block;
  padding: .5rem .9rem;
  border-radius: var(--radius-sm);
  font-size: .92rem;
  font-weight: 500;
  color: var(--muted);
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav__links a:hover { color: var(--text); background: rgba(234, 240, 255, .06); }
.nav__links a.is-active { color: var(--text); }
.nav__links a.is-active::after {
  content: '';
  display: block;
  height: 2px;
  margin: .25rem auto -.35rem;
  width: 60%;
  border-radius: 2px;
  background: var(--silver-grad);
}

.nav__cta { flex: none; }

/* En escritorio el botón "Contact" (píldora) ya cubre el contacto,
   así que ocultamos el enlace de texto para no duplicarlo.
   En móvil el botón se oculta y este enlace reaparece en el menú. */
@media (min-width: 860px) { .nav__link-contact { display: none; } }

.nav__burger {
  display: none;
  flex: none;
  width: 42px; height: 42px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(234, 240, 255, .04);
  cursor: pointer;
  place-content: center;
  gap: 4px;
}
.nav__burger-bar {
  display: block;
  width: 16px; height: 1.6px;
  margin-inline: auto;
  border-radius: 2px;
  background: var(--text);
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav__burger[aria-expanded='true'] .nav__burger-bar:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
.nav__burger[aria-expanded='true'] .nav__burger-bar:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded='true'] .nav__burger-bar:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;    /* respaldo para navegadores sin svh */
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: 9rem 8rem;
  isolation: isolate;
  overflow: hidden;
}

/* ---------- FONDO ESPACIAL (capa fija, acompaña todo el scroll) ---------- */
.space {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--bg);
}
.space__stars {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
}

/* Nebulosa: manchas de color muy tenues, dan profundidad al espacio */
.space__nebula {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 46% 36% at 80% 10%, rgba(28, 72, 180, .12), transparent 60%),
    radial-gradient(ellipse 42% 32% at 8% 60%, rgba(10, 40, 150, .09), transparent 64%),
    radial-gradient(ellipse 55% 40% at 50% 98%, rgba(16, 50, 140, .06), transparent 62%);
}

/* Planeta lejano: presencia sutil, no ilustracion de ciencia ficcion */
.space__planet {
  position: absolute;
  right: -16vw; top: 4vh;
  width: 46vw; height: 46vw;
  max-width: 620px; max-height: 620px;
  border-radius: 50%;
  opacity: .5;
  background: radial-gradient(circle at 34% 30%, rgba(40, 80, 175, .2), rgba(4, 7, 16, .5) 58%, transparent 72%);
  box-shadow: inset -22px -12px 60px rgba(0, 0, 0, .6), 0 0 90px rgba(30, 80, 200, .09);
}
/* filo iluminado del planeta */
.space__planet::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  background: conic-gradient(from 210deg, transparent 40%, rgba(90, 145, 235, .2) 50%, transparent 60%);
  -webkit-mask: radial-gradient(circle, transparent 66%, #000 68%);
  mask: radial-gradient(circle, transparent 66%, #000 68%);
}

/* Vineta: oscurece los bordes, concentra la mirada */
.space__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 96% 88% at 50% 40%, transparent 40%, rgba(1, 2, 6, .95) 100%);
}

/* Grano de pelicula sutil (estatico, sin coste de repintado) */
.space__grain {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  opacity: .04;
  mix-blend-mode: overlay;
}

/* Resplandor del hero, por encima del espacio */
.hero__glow {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}
.hero__glow--a {
  width: 52vw; height: 52vw;
  max-width: 720px; max-height: 720px;
  top: -16%; right: -8%;
  opacity: .3;
  background: radial-gradient(circle, rgba(30, 85, 210, .5), transparent 68%);
}

.hero__inner { max-width: 62rem; }

.hero__title {
  font-size: clamp(2.5rem, .8rem + 9.2vw, 9rem);
  line-height: .92;
  letter-spacing: -.02em;
  margin-bottom: 1.8rem;
}
.hero__line { display: block; }
.hero__line--accent {
  background: var(--accent-grad-3);
  background-size: 220% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  transition: background-position .8s var(--ease), filter .45s var(--ease);
  color: transparent;
}
/* Al pasar el ratón por el titular, el degradado recorre y se aviva */
@media (hover: hover) and (pointer: fine) {
  .hero__title:hover .hero__line--accent {
    background-position: 100% 50%;
    filter: brightness(1.22) saturate(1.12);
  }
}

.hero__lead {
  max-width: 46ch;
  font-size: clamp(1.05rem, .98rem + .35vw, 1.3rem);
  font-weight: 300;      /* eco del Acumin Pro Light de tu portfolio */
  color: var(--muted);
  margin: 0 0 2.5rem;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: .85rem; }


/* ---------- 7. About ---------- */
/* About y Work dejan ver el espacio sin velo propio: asi no aparece
   ninguna linea de corte entre secciones. */
.about, .work { background: transparent; overflow: hidden; }

.about__grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}

/* La foto es un enlace a Instagram: sin pistas visuales, sólo el cursor
   y el color que ya aparecía al pasar el ratón lo insinúan. */
.about__media { position: relative; display: block; max-width: 420px; }
.about__media img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  /* Blanco y negro en reposo; recupera color al pasar el mouse */
  filter: grayscale(1) contrast(1.1) brightness(.94);
  transition: filter .6s var(--ease);
}
/* filo iluminado, mismo lenguaje que el resto de superficies */
.about__media::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  pointer-events: none;
  box-shadow: var(--glass-inset), inset 0 0 0 1px rgba(120, 160, 220, .12);
}
.about__media:hover img { filter: grayscale(.1) contrast(1.03); }
.about__media-glow {
  position: absolute;
  inset: auto -12% -12% -12%;
  height: 60%;
  z-index: -1;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .55;
  background: radial-gradient(circle, rgba(47, 123, 255, .5), transparent 70%);
}

.about__body {
  color: var(--muted);
  max-width: 56ch;
  margin: 0 0 1.2rem;
}

/* Rejilla de especialidades: celdas con hairline, compacta */
.chips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 1.9rem;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  max-width: 56ch;   /* mismo ancho que los parrafos de la bio */
}
.chip {
  background: rgba(5, 8, 16, .78);
  padding: .55rem .7rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .68rem;
  line-height: 1.25;
  letter-spacing: .015em;
  text-transform: uppercase;
  color: var(--text);
}
.chip small {
  display: block;
  margin-top: .12rem;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: .585rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6B7A9B;
}
@media (max-width: 460px) { .chips { grid-template-columns: 1fr; } }

/* ---------- 8. Work — muro vertical 9:16 ---------- */

.work__wall {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(.7rem, 1.2vw, 1.05rem);
  padding-bottom: 3.5rem;   /* aire para el desfase de columnas */
}

/* Toda la sección Work comparte un contenedor algo más estrecho:
   así el título, el muro y el enlace quedan alineados entre sí y
   centrados en la página, con tarjetas esbeltas. */
.work .container { --container: 1000px; }

/* Enlace al portafolio completo, alineado a la izquierda bajo el muro */
.work__more { display: flex; justify-content: flex-start; margin-top: .5rem; }

.work-card { --offset: 0px; }

.work-card__btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
  cursor: pointer;
  overflow: hidden;
  transform: translateY(var(--offset));
  box-shadow: var(--glass-inset);   /* filo iluminado arriba */
  transition: transform .45s var(--ease), border-color .35s var(--ease),
              box-shadow .45s var(--ease);
}
.work-card__btn:hover,
.work-card__btn:focus-visible {
  transform: translateY(calc(var(--offset) - 6px));
  border-color: rgba(80, 150, 235, .5);
  box-shadow: var(--glass-inset), 0 22px 46px -28px rgba(47, 123, 255, .7);
}
/* Feedback táctil al pulsar la tarjeta */
.work-card__btn:active {
  transform: translateY(var(--offset)) scale(.985);
  transition-duration: .1s;
}

/* aspecto 9:16 reservado desde el primer pintado → sin saltos de layout */
.work-card__media {
  display: block;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: var(--card);
}
.work-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease), filter .4s var(--ease);
}
.work-card__btn:hover .work-card__media img,
.work-card__btn:focus-visible .work-card__media img {
  transform: scale(1.07);
  filter: saturate(1.12) brightness(1.05);
}

/* velo inferior para que el texto siempre tenga contraste */
.work-card__btn::after {
  content: '';
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(to bottom, transparent, rgba(5, 7, 14, .5) 55%, rgba(5, 7, 14, .94));
  pointer-events: none;
}

.work-card__play {
  position: absolute;
  z-index: 2;
  top: 50%; left: 50%;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: clamp(44px, 4vw + 30px, 58px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(234, 240, 255, .1);
  border: 1px solid rgba(234, 240, 255, .35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text);
  opacity: .92;
  transition: transform .35s var(--ease), background-color .35s var(--ease),
              opacity .35s var(--ease), border-color .35s var(--ease);
}
.work-card__play svg { width: 45%; height: 45%; margin-left: 4%; }
.work-card__btn:hover .work-card__play,
.work-card__btn:focus-visible .work-card__play {
  transform: scale(1.12);
  opacity: 1;
  background: var(--silver-grad);
  border-color: transparent;
  color: var(--bg);
}

/* Duración: píldora arriba a la derecha, para que nunca choque
   con una categoría de dos líneas en pantallas estrechas */
.work-card__dur {
  position: absolute;
  z-index: 3;
  top: .6rem; right: .6rem;
  padding: .22rem .55rem;
  border: 1px solid rgba(234, 240, 255, .18);
  border-radius: 8px;
  background: rgba(5, 7, 14, .8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: .72rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  color: var(--text);
}

.work-card__meta {
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  display: block;
  padding: 1rem 1.05rem;
  text-align: left;
}
.work-card__cat {
  font-weight: 600;
  font-size: clamp(.82rem, .78rem + .2vw, .95rem);
  line-height: 1.3;
  letter-spacing: .01em;
  color: var(--text);
}

/* Divisor: línea recta finísima con resplandor en el centro.
   Separa el espacio del vídeo sin bloques ni curvas. */
.contact::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(120, 175, 255, .12) 18%,
    rgba(150, 205, 255, .75) 40%,
    #EAF4FF 50%,
    rgba(150, 205, 255, .75) 60%,
    rgba(120, 175, 255, .12) 82%,
    transparent 100%);
}
/* halo suave alrededor de la línea */
.contact::after {
  content: "";
  position: absolute;
  top: -3px; left: 0; right: 0;
  height: 7px;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse 42% 100% at 50% 50%, rgba(110, 170, 255, .45), transparent 72%);
}

/* ---------- 9. Contact ---------- */
.contact {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--bg);   /* respaldo mientras el vídeo no carga */
  text-align: center;
}

/* Fondo de vídeo + tinte de color semitransparente encima */
.contact__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* imagen fija de respaldo (se ve mientras el vídeo carga
     y cuando el sistema pide "reducir movimiento") */
  background: var(--bg) url('../work/contact-pov.jpg') center / cover no-repeat;
}
.contact__video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;                     /* aparece al empezar a reproducir */
  transition: opacity .8s var(--ease);
}
.contact__video.is-playing { opacity: 1; }

/* El tinte reproduce los colores de la sección pero deja ver el vídeo */
.contact__tint {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(47, 123, 255, .30), transparent 68%),
    /* oscurecido extra en el centro para que el texto siempre contraste */
    radial-gradient(ellipse 60% 55% at 50% 52%, rgba(5, 7, 14, .55), transparent 75%),
    linear-gradient(180deg, rgba(5, 7, 14, .78) 0%, rgba(5, 7, 14, .82) 55%, rgba(5, 7, 14, .9) 100%);
}

.contact__inner { display: grid; justify-items: center; position: relative; }
/* el texto secundario lleva una sombra suave por si el vídeo aclara detrás */
.contact .section__lead { text-shadow: 0 1px 12px rgba(5, 7, 14, .8); }
.contact .section__lead { margin-bottom: 2.5rem; text-align: center; }


.contact__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .85rem; }

/* ---------- 10. Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding-block: 2.25rem;
  background: var(--bg);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer__copy { margin: 0; color: var(--muted); font-size: .88rem; }

/* Alianza con Porterhouse Films */
.footer__ally {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  padding: .4rem .5rem;
  border-radius: var(--radius-sm);
  color: var(--muted);
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.footer__ally:hover { color: var(--text); background: rgba(234, 240, 255, .05); }
.footer__ally-logo {
  width: auto;
  height: 40px;
  flex: none;
  opacity: .9;
  transition: opacity .2s var(--ease);
}
.footer__ally:hover .footer__ally-logo { opacity: 1; }
.footer__ally-text {
  font-size: .78rem;
  line-height: 1.25;
  letter-spacing: .01em;
  text-align: left;
}
.footer__ally-text strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: 0;
  color: var(--text);
}

.footer__links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer__links a {
  color: var(--muted);
  font-size: .88rem;
  transition: color .2s var(--ease);
}
.footer__links a:hover { color: var(--silver); }

/* ---------- 11. Reproductor (dialog) ---------- */
.player {
  width: min(100vw - 2rem, 520px);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  overflow: visible;
}
.player::backdrop {
  background: rgba(3, 5, 12, .88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Entrada suave del reproductor: evita el salto brusco al abrir.
   @starting-style define el estado "antes de entrar" sin JavaScript. */
.player[open] {
  opacity: 1;
  transform: scale(1);
  transition: opacity .2s var(--ease), transform .2s var(--ease), overlay .2s allow-discrete, display .2s allow-discrete;
}
@starting-style {
  .player[open] { opacity: 0; transform: scale(.96); }
}
.player[open]::backdrop {
  opacity: 1;
  transition: opacity .2s var(--ease), overlay .2s allow-discrete, display .2s allow-discrete;
}
@starting-style {
  .player[open]::backdrop { opacity: 0; }
}

.player__stage {
  position: relative;
  margin-inline: auto;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 80px -40px rgba(34, 211, 238, .5);
  /* la altura manda y el ancho se deduce: 9:16 exacto sin desbordar */
  aspect-ratio: 9 / 16;
  width: auto;
  height: min(calc(100vh - 7rem), calc((100vw - 2rem) * 16 / 9));
  height: min(calc(100svh - 7rem), calc((100vw - 2rem) * 16 / 9));
}
.player__stage iframe {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

.player__close {
  position: absolute;
  top: -3.25rem; right: 0;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(234, 240, 255, .07);
  cursor: pointer;
  transition: background-color .25s var(--ease), border-color .25s var(--ease);
}
.player__close:hover { background: rgba(234, 240, 255, .16); border-color: var(--silver); }
.player__close svg { width: 20px; height: 20px; }

body.is-locked { overflow: hidden; }

/* ---------- 12. Reveals al hacer scroll ----------
   Todo va bajo `.js`: sin JavaScript no se oculta nada. */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: translateY(0); }

/* en el muro, el reveal se suma al desfase de columna */
.js .work-card.reveal { transform: none; }
.js .work-card.reveal .work-card__btn {
  opacity: 0;
  transform: translateY(calc(var(--offset) + 26px));
  transition: opacity .7s var(--ease), transform .7s var(--ease),
              border-color .35s var(--ease), box-shadow .45s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
.js .work-card.reveal.is-visible .work-card__btn {
  opacity: 1;
  transform: translateY(var(--offset));
}

/* ---------- 12b. Movimiento ligado al scroll (CSS nativo, 0 KB) ----------
   Sólo se aplica donde el navegador lo soporta; en el resto no pasa nada
   (el contenido se ve igual, simplemente sin este matiz). */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {

    /* Las miniaturas crecen levemente mientras la tarjeta cruza la pantalla.
       Se anima el contenedor, no la imagen, para no pisar el zoom del hover. */
    .js .work-card__media {
      animation: card-rise linear both;
      animation-timeline: view();
      animation-range: entry 8% cover 42%;
    }
    @keyframes card-rise {
      from { transform: scale(.94); }
      to   { transform: scale(1); }
    }

    /* La raya de sección se dibuja al entrar */
    .js .rule {
      animation: rule-draw linear both;
      animation-timeline: view();
      animation-range: entry 12% entry 78%;
      transform-origin: left center;
    }
    .contact .rule { transform-origin: center; }
    @keyframes rule-draw {
      from { transform: scaleX(.15); opacity: .4; }
      to   { transform: scaleX(1); opacity: 1; }
    }

    /* El titular del hero se aleja apenas al hacer scroll (profundidad) */
    .js .hero__inner {
      animation: hero-drift linear both;
      animation-timeline: view();
      animation-range: exit 0% exit 100%;
    }
    @keyframes hero-drift {
      from { transform: translateY(0); opacity: 1; }
      to   { transform: translateY(-38px); opacity: .35; }
    }
  }
}

/* ---------- 13. Responsive ---------- */
@media (min-width: 760px) {
  .work__wall { grid-template-columns: repeat(3, 1fr); }
  .work-card:nth-child(even) { --offset: 2.5rem; }
}

@media (min-width: 900px) {
  .about__grid { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); }
}

@media (min-width: 1100px) {
  .work__wall { grid-template-columns: repeat(4, 1fr); }
  .work-card:nth-child(even) { --offset: 0px; }
  .work-card:nth-child(4n+2),
  .work-card:nth-child(4n+4) { --offset: 3rem; }
}

/* Menú móvil */
@media (max-width: 859px) {
  .nav__burger { display: grid; margin-left: auto; }
  .nav__cta { display: none; }

  .nav__links {
    position: absolute;
    top: calc(100% + .6rem);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: .2rem;
    margin: 0;
    padding: .6rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: rgba(8, 12, 24, .96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .95);

    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav__links a { padding: .85rem 1rem; font-size: 1rem; text-align: center; }
  .nav__links a.is-active::after { display: none; }

  .nav__pill { position: relative; }
}

@media (max-width: 520px) {
  .hero { padding-block: 8rem 7rem; }
  .hero__actions .btn { flex: 1 1 100%; justify-content: center; }
  .footer__inner { flex-direction: column; text-align: center; }
}

/* ---------- 14. Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  .js .reveal,
  .js .work-card.reveal .work-card__btn { opacity: 1; transform: translateY(var(--offset, 0px)); }

  .work-card__btn:hover { transform: translateY(var(--offset)); }
  .work-card__btn:hover .work-card__media img { transform: none; }
  .btn:hover { transform: none; }

  /* Sin animación: no se reproduce el vídeo, queda la imagen fija */
  .contact__video { display: none; }

  /* El feedback al pulsar se mantiene (es respuesta, no decoración),
     pero el reproductor y la foto entran sin transición. */
  .player[open], .player[open]::backdrop { transition: none; }
  .about__media img { filter: none; }
  .about__media::after { opacity: 0; }
}

/* ---------- 15. Impresión ---------- */
@media print {
  .nav, .space, .hero__glow, .player,
  .contact__bg { display: none !important; }
  body { background: #fff; color: #000; }
}
