/* =========================================================
   FEROSA Casa Productora
   Colores tomados del logo: azul de la barra + gris carbón
   ========================================================= */
:root {
  --ink: #0b0c0f;
  --ink-2: #15171c;
  --ink-3: #20232a;
  --paper: #f3f2ef;
  --paper-2: #e7e5e0;
  --charcoal: #3a3b3e;
  --stone: #a9a19e;
  --blue: #2541a8;
  --blue-light: #4d6ae0;
  --white: #ffffff;
  --muted: rgba(255, 255, 255, 0.62);

  --f-display: 'Oswald', 'Arial Narrow', Arial, sans-serif;
  --f-logo: 'Marcellus', Georgia, serif;
  --f-body: 'Open Sans', Arial, Helvetica, sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --nav-h: 84px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--white);
  font: 400 16px/1.7 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue-light); outline-offset: 3px; }

.wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(80px, 12vw, 150px) 0; }
.section--paper { background: var(--paper); color: var(--charcoal); }

/* ---------- LOGO (recreado en HTML/CSS) ---------- */
.logo {
  display: inline-flex;
  align-items: flex-end;
  gap: .32em;
  font-size: 32px;
  line-height: 1;
  text-decoration: none;
  color: currentColor;
}
.logo__bar {
  position: relative;
  width: .2em;
  height: 1.3em;
  margin-right: .45em;
  background: var(--blue);
  box-shadow: -.07em .05em 0 var(--stone); /* sombra gris del logo */
  transform: skewX(30deg);
  transform-origin: top left;
  flex: none;
}
.logo__text { display: flex; flex-direction: column; align-items: flex-end; }
.logo__word { font-family: var(--f-logo); font-size: 1em; letter-spacing: .04em; line-height: .9; }
.logo__sub { font-family: var(--f-body); font-size: .3em; letter-spacing: .02em; margin-top: .2em; opacity: .85; }

.logo--nav { font-size: 28px; }
.logo--intro { font-size: clamp(44px, 9vw, 96px); }
.logo--footer { font-size: 38px; }

/* ---------- INTRO ---------- */
.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--ink);
  transition: opacity .8s var(--ease), visibility .8s;
}
.intro .logo__bar { animation: barIn .9s var(--ease) both; }
.intro .logo__word { animation: fadeUp .9s .25s var(--ease) both; }
.intro .logo__sub { animation: fadeUp .9s .5s var(--ease) both; }
.intro.is-done { opacity: 0; visibility: hidden; }
@keyframes barIn { from { transform: skewX(30deg) scaleY(0); } to { transform: skewX(30deg) scaleY(1); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background .4s, box-shadow .4s, height .4s;
  background: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,0));
}
.nav.is-solid { background: rgba(11, 12, 15, .92); backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  transition: height .4s;
}
.nav.is-solid .nav__inner { height: 68px; }
.nav__brand { text-decoration: none; color: var(--white); }
.nav__menu { display: flex; gap: clamp(18px, 2.4vw, 40px); }
.nav__item { text-decoration: none; text-align: left; position: relative; padding: 6px 0; }
.nav__title { font: 500 15px/1.1 var(--f-display); letter-spacing: .14em; }
.nav__sub { font: 400 10px/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.nav__item::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 2px;
  background: var(--blue-light);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav__item:hover::after, .nav__item.is-active::after { transform: scaleX(1); }

.nav__burger { display: none; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; position: relative; z-index: 60; }
.nav__burger span { display: block; width: 26px; height: 2px; margin: 6px auto; background: var(--white); transition: transform .3s, opacity .3s; }
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.drawer {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: var(--ink);
  display: flex;
  align-items: center;
  padding: 0 var(--gutter);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s, visibility .35s;
}
.drawer.is-open { opacity: 1; visibility: visible; }
.drawer__menu { display: flex; flex-direction: column; gap: 22px; }
.drawer__menu a { text-decoration: none; font: 500 clamp(32px, 9vw, 52px)/1 var(--f-display); letter-spacing: .06em; }
.drawer__menu a small { display: block; font: 400 12px/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }

/* ---------- FONDOS DE VIDEO ---------- */
.bgmedia { position: absolute; inset: 0; overflow: hidden; background: var(--ink) center/cover no-repeat; }
.bgmedia video { width: 100%; height: 100%; object-fit: cover; }
.bgmedia iframe {
  position: absolute;
  top: 50%; left: 50%;
  width: 100vw; height: 56.25vw;
  min-height: 100%; min-width: 177.78vh;
  transform: translate(-50%, -50%) scale(1.2); /* recorta la interfaz de YouTube */
  border: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s;
}
.bgmedia.is-ready iframe { opacity: 1; }

/* ---------- HERO ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; display: flex; align-items: flex-end; overflow: hidden; }
.hero__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(11,12,15,.92) 0%, rgba(11,12,15,.25) 45%, rgba(11,12,15,.35) 100%);
}
.hero__content { position: relative; width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter) clamp(90px, 14vh, 150px); }
.hero__kicker {
  margin: 0 0 18px;
  font: 400 13px/1.4 var(--f-display);
  letter-spacing: .28em;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 14px;
}
.hero__kicker::before { content: ''; width: 40px; height: 2px; background: var(--blue-light); }
.hero__title {
  margin: 0 0 34px;
  max-width: 14ch;
  font: 500 clamp(44px, 8.4vw, 124px)/.95 var(--f-display);
  text-transform: uppercase;
  letter-spacing: .005em;
}
.hero__scroll { position: absolute; right: var(--gutter); bottom: 40px; width: 26px; height: 44px; border: 2px solid rgba(255,255,255,.6); border-radius: 14px; }
.hero__scroll span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--white); animation: scrollDot 1.8s infinite; }
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- BOTONES ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 15px 30px;
  border: 1px solid transparent;
  background: none;
  font: 500 14px/1 var(--f-display);
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .3s, color .3s, border-color .3s;
}
.btn--light { background: var(--white); color: var(--ink); }
.btn--light:hover { background: var(--blue); color: var(--white); }
.btn--ghost { border-color: currentColor; }
.btn--ghost:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn--play { background: var(--blue); color: var(--white); }
.btn--play:hover { background: var(--white); color: var(--ink); }
.btn__icon { width: 0; height: 0; border-left: 10px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }

/* ---------- ENCABEZADOS ---------- */
.heading__title {
  margin: 0;
  font: 500 clamp(38px, 6vw, 76px)/1 var(--f-display);
  letter-spacing: .02em;
  text-transform: uppercase;
}
.heading__sub {
  margin: 14px 0 0;
  font: 400 13px/1.4 var(--f-display);
  letter-spacing: .26em;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 12px;
  color: var(--blue);
}
.heading__sub::before { content: ''; width: 28px; height: 2px; background: currentColor; }
.works .heading__sub, .location .heading__sub { color: var(--blue-light); }

/* ---------- NOSOTROS ---------- */
.about__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 7vw, 120px); align-items: start; }
.richtext p { margin: 0 0 1.2em; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.75; }
.richtext p:first-child { font-family: var(--f-logo); font-size: clamp(24px, 2.4vw, 32px); line-height: 1.35; color: var(--ink); }
.stats { list-style: none; margin: 48px 0 0; padding: 32px 0 0; border-top: 1px solid rgba(58,59,62,.18); display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.stats strong { display: block; font: 500 clamp(32px, 4vw, 50px)/1 var(--f-display); color: var(--blue); }
.stats span { display: block; margin-top: 8px; font-size: 13px; line-height: 1.4; text-transform: uppercase; letter-spacing: .08em; }

/* ---------- DESTACADO ---------- */
.featured { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.featured__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,12,15,.92) 0%, rgba(11,12,15,.6) 45%, rgba(11,12,15,.15) 100%); }
.featured__content { position: relative; padding-top: 120px; padding-bottom: 120px; }
.featured__label { margin: 0 0 22px; display: inline-block; padding: 7px 14px; background: var(--blue); font: 500 12px/1 var(--f-display); letter-spacing: .24em; text-transform: uppercase; }
.featured__title { margin: 0; max-width: 12ch; font: 500 clamp(44px, 7.5vw, 108px)/.95 var(--f-display); text-transform: uppercase; }
.featured__client { margin: 18px 0 0; font: 400 15px/1.4 var(--f-display); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.featured__text { max-width: 46ch; margin: 22px 0 36px; font-size: 17px; color: rgba(255,255,255,.85); }

/* ---------- TRABAJOS ---------- */
.works { background: var(--ink); }
.works__top { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; }
.works__hint { margin: 0; font: 400 13px/1 var(--f-display); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.filter {
  padding: 9px 18px;
  border: 1px solid rgba(255,255,255,.22);
  background: none;
  font: 400 13px/1 var(--f-display);
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .25s, border-color .25s;
}
.filter:hover { border-color: var(--white); }
.filter.is-active { background: var(--blue); border-color: var(--blue); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 28px); }
.work { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.work__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink-3); }
.work__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), filter .5s; filter: saturate(.85); }
.work__media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(11,12,15,.55), transparent 60%); transition: background .4s; }
.work__play {
  position: absolute; z-index: 1; left: 50%; top: 50%;
  width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: var(--blue);
  opacity: 0; transform: scale(.7);
  transition: opacity .35s, transform .35s var(--ease);
}
.work__play::before { content: ''; position: absolute; left: 26px; top: 21px; border-left: 16px solid var(--white); border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.work__cat { position: absolute; z-index: 1; left: 14px; top: 14px; padding: 5px 10px; background: rgba(11,12,15,.7); font: 400 11px/1 var(--f-display); letter-spacing: .16em; text-transform: uppercase; }
.work:hover .work__media img, .work:focus-visible .work__media img { transform: scale(1.06); filter: saturate(1); }
.work:hover .work__play, .work:focus-visible .work__play { opacity: 1; transform: scale(1); }
.work__info { padding: 16px 2px 6px; }
.work__client { margin: 0; font: 400 12px/1.3 var(--f-display); letter-spacing: .2em; text-transform: uppercase; color: var(--blue-light); }
.work__title { margin: 6px 0 0; font: 500 21px/1.2 var(--f-display); letter-spacing: .02em; text-transform: uppercase; }
.work.is-hidden { display: none; }
.works__more { text-align: center; margin-top: 48px; }
.works__empty { grid-column: 1 / -1; color: var(--muted); }

/* ---------- SERVICIOS ---------- */
.services__list { list-style: none; counter-reset: s; margin: 60px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(58,59,62,.2); }
.services__list li { counter-increment: s; padding: 36px 28px 20px 0; border-right: 1px solid rgba(58,59,62,.12); }
.services__list li + li { padding-left: 28px; }
.services__list li:last-child { border-right: 0; }
.services__list li::before { content: counter(s, decimal-leading-zero); display: block; font: 400 14px/1 var(--f-display); letter-spacing: .14em; color: var(--blue); margin-bottom: 28px; }
.services__list h3 { margin: 0 0 12px; font: 500 26px/1.1 var(--f-display); text-transform: uppercase; color: var(--ink); }
.services__list p { margin: 0; font-size: 15px; }

/* ---------- LA CASA ---------- */
.location { background: var(--ink-2); }
.location__top { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(30px, 7vw, 120px); align-items: end; margin-bottom: clamp(40px, 6vw, 72px); }
.location__text { margin: 0; font-family: var(--f-logo); font-size: clamp(20px, 2.1vw, 28px); line-height: 1.45; color: rgba(255,255,255,.88); }
.location__band { margin: 0; overflow: hidden; }
.location__band img { width: 100%; height: clamp(200px, 30vw, 420px); object-fit: cover; }
.location__pin { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 40px; font: 500 15px/1 var(--f-display); letter-spacing: .3em; }
.location__pin svg { width: 22px; height: 22px; fill: var(--blue-light); flex: none; }

/* ---------- CONTACTO ---------- */
.contact { background: var(--blue); position: relative; overflow: hidden; }
.contact::before { /* barra inclinada del logo, gigante */
  content: '';
  position: absolute;
  right: 6%; top: -10%;
  width: 14vw; height: 130%;
  background: rgba(255,255,255,.07);
  transform: skewX(30deg);
}
.contact .wrap { position: relative; }
.contact__sub { margin: 0; font: 400 13px/1 var(--f-display); letter-spacing: .3em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.contact__title { margin: 20px 0 22px; max-width: 13ch; font: 500 clamp(46px, 8.5vw, 128px)/.95 var(--f-display); text-transform: uppercase; }
.contact__text { margin: 0 0 48px; max-width: 44ch; font-size: 18px; color: rgba(255,255,255,.88); }
.contact__links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; border-top: 1px solid rgba(255,255,255,.25); }
.contact__links li { border-bottom: 1px solid rgba(255,255,255,.25); }
.contact__links a, .contact__links div { display: block; padding: 24px 24px 24px 0; text-decoration: none; }
.contact__links small { display: block; font: 400 11px/1 var(--f-display); letter-spacing: .24em; text-transform: uppercase; color: rgba(255,255,255,.7); margin-bottom: 10px; }
.contact__links span { font: 400 20px/1.3 var(--f-display); letter-spacing: .03em; word-break: break-word; }
.contact__links a:hover span { text-decoration: underline; text-underline-offset: 5px; }

/* ---------- FOOTER ---------- */
.footer { background: var(--ink); padding: 72px 0 32px; color: rgba(255,255,255,.8); }
.footer__grid { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer__tagline { max-width: 40ch; margin: 22px 0 0; font-size: 14px; color: var(--muted); }
.footer__nav { display: grid; grid-template-columns: repeat(2, auto); gap: 10px 48px; align-content: start; }
.footer__nav a { text-decoration: none; font: 400 14px/1.4 var(--f-display); letter-spacing: .16em; text-transform: uppercase; }
.footer__nav a:hover { color: var(--blue-light); }
.footer__bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; color: rgba(255,255,255,.45); }

/* ---------- MODAL ---------- */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.modal.is-open { opacity: 1; visibility: visible; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(5,6,8,.94); }
.modal__panel { position: relative; width: min(1200px, 100%, (100vh - 200px) * 16 / 9); }
.modal__player { position: relative; aspect-ratio: 16 / 9; background: #000; }
.modal__player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.modal__info { padding-top: 16px; }
.modal__client { margin: 0; font: 400 12px/1.3 var(--f-display); letter-spacing: .2em; text-transform: uppercase; color: var(--blue-light); }
.modal__title { margin: 6px 0 0; font: 500 24px/1.2 var(--f-display); text-transform: uppercase; }
.modal__close { position: absolute; right: 0; top: -52px; width: 44px; height: 44px; border: 0; background: none; font-size: 40px; line-height: 1; cursor: pointer; }

/* ---------- ANIMACIONES AL SCROLL ---------- */
[data-reveal] { opacity: 0; transform: translateY(30px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1080px) {
  .nav__menu { display: none; }
  .nav__burger { display: block; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .services__list { grid-template-columns: repeat(2, 1fr); }
  .services__list li { padding-left: 0 !important; padding-right: 24px; border-right: 0; border-bottom: 1px solid rgba(58,59,62,.12); }
}
@media (max-width: 760px) {
  :root { --nav-h: 70px; }
  .logo--nav { font-size: 24px; }
  .about__grid, .location__top { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
  .stats span { font-size: 11px; }
  .grid { grid-template-columns: 1fr; }
  .works__top { flex-direction: column; align-items: flex-start; }
  .services__list { grid-template-columns: 1fr; }
  .featured__shade { background: linear-gradient(to top, rgba(11,12,15,.95) 10%, rgba(11,12,15,.45) 100%); }
  .featured { align-items: flex-end; }
  .hero__scroll { display: none; }
  .footer__nav { grid-template-columns: 1fr 1fr; gap: 10px 24px; }
  .location__pin { font-size: 12px; letter-spacing: .2em; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
