:root {
  --ink: #0A0A0B; --ink-2: #1A1A1C; --text: #F2F1EE; --soft: #D6D4CE; --muted: #A3A19B; --dim: #5E5C57;
  --accent: #FF4D2E; --pad: clamp(20px, 4vw, 56px);
  --f-head: 'Montserrat', system-ui, sans-serif; --f-body: 'Inter', system-ui, sans-serif; --f-mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--text); font: 16px/1.5 var(--f-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2 { margin: 0; font-family: var(--f-head); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin: 0; }
.muted { color: var(--muted); }
.accent-t { color: var(--accent); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ---------- Encabezado ---------- */
.top { position: absolute; inset: 0 0 auto 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px var(--pad); }
.logo img { height: 30px; width: auto; }
.links { display: flex; gap: 36px; font-size: 14px; font-weight: 500; letter-spacing: .02em; }
.links a { text-decoration: none; transition: color .2s; }
.links a:hover { color: var(--accent); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: transform .15s, background .2s; }
.pill:hover { transform: translateY(-1px); }
.pill.accent { background: var(--accent); color: #fff; }
.pill.dark { background: var(--ink); color: #fff; padding: 16px 26px; font-size: 16px; }
.pill.line { border: 2px solid var(--ink); color: var(--ink); padding: 14px 24px; font-size: 16px; }

/* ---------- Cartelera ---------- */
.hero { position: relative; height: 92vh; height: 92svh; min-height: 620px; max-height: 1000px; display: flex; flex-direction: column; justify-content: flex-end; background: var(--ink); }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .45s ease; }
.hero-video.fading { opacity: 0; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,11,.6) 0%, rgba(10,10,11,0) 20%, rgba(10,10,11,0) 38%, rgba(10,10,11,.7) 62%, rgba(10,10,11,.96) 100%); pointer-events: none; }
.hero-body { position: relative; padding: 0 var(--pad) 36px; display: flex; flex-direction: column; gap: 28px; }
.hero-info { display: flex; flex-direction: column; gap: 14px; max-width: 900px; text-shadow: 0 2px 24px rgba(0,0,0,.45); }
.hero-info.in { animation: rise .6s ease both; }
.meta { display: flex; align-items: center; gap: 12px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; color: var(--soft); text-transform: uppercase; }
.meta .dot { opacity: .5; }
.rec { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: blink 1.6s infinite; flex: none; }
.hero h1 { font-weight: 900; font-size: clamp(48px, 8vw, 128px); line-height: .92; letter-spacing: -.03em; text-transform: uppercase; overflow-wrap: anywhere; }
.hero p { margin: 0; font-size: 18px; color: var(--soft); }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 5 * 12px) / 6); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-top: 10px; }
.strip::-webkit-scrollbar { display: none; }
.thumb { position: relative; padding: 0; border: 0; background: none; cursor: pointer; opacity: .55; transition: opacity .3s; scroll-snap-align: start; text-align: left; }
.thumb:hover, .thumb.on { opacity: 1; }
.thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.thumb .name { display: block; padding: 8px 2px 0; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb .bar { position: absolute; left: 0; right: 0; top: -10px; height: 2px; background: rgba(255,255,255,.15); overflow: hidden; }
.thumb .bar::after { content: ''; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.thumb.on .bar::after { animation: prog var(--dur, 7s) linear both; }
.hero.paused .thumb.on .bar::after { animation-play-state: paused; }

/* ---------- Secciones ---------- */
.section { padding: 110px var(--pad) 40px; display: flex; flex-direction: column; gap: 40px; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.sec-head h2 { font-weight: 800; font-size: clamp(36px, 4.5vw, 64px); letter-spacing: -.02em; line-height: 1; }
.intro { margin: 0; max-width: 420px; color: var(--muted); line-height: 1.6; }

/* Servicios */
.svc { display: flex; gap: 10px; height: 560px; }
.svc-panel { position: relative; overflow: hidden; border: 0; padding: 0; border-radius: 14px; cursor: pointer; background: var(--ink-2); min-width: 0; flex: 1 1 0; transition: flex .6s cubic-bezier(.2,.7,.2,1); text-align: left; }
.svc-panel.on { flex-grow: 4; }
.svc-panel img, .svc-panel video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.svc-panel img { filter: grayscale(1) brightness(.55); transition: filter .6s; }
.svc-panel.on img { filter: none; }
.svc-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,11,.15), rgba(10,10,11,.85)); }
.svc-body { position: relative; height: 100%; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; }
.svc-text { display: flex; flex-direction: column; gap: 12px; }
.svc-name { font-family: var(--f-head); font-weight: 800; font-size: 30px; letter-spacing: -.01em; color: #fff; white-space: nowrap; }
.svc-desc { display: none; max-width: 440px; font-size: 15px; line-height: 1.6; color: #E4E2DC; }
.svc-panel.on .svc-desc { display: block; animation: rise .4s ease both; }

/* Proyectos */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 20px; }
.card { display: flex; flex-direction: column; gap: 10px; cursor: pointer; outline-offset: 6px; }
.frame { position: relative; overflow: hidden; border-radius: 10px; background: var(--ink-2); aspect-ratio: 16 / 9; transition: transform .4s ease, box-shadow .4s ease; }
.frame img, .frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame video { opacity: 0; transition: opacity .35s ease; }
.card.live .frame { transform: scale(1.02); box-shadow: 0 20px 50px -20px rgba(255,77,46,.45); }
.card.live .frame video.ready { opacity: 1; }
.playing { position: absolute; left: 12px; top: 12px; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 999px; background: rgba(10,10,11,.6); font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; opacity: 0; transition: opacity .3s; }
.playing .rec { width: 7px; height: 7px; }
.card.live .playing { opacity: 1; }
.card-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 4px; }
.card-client { font-family: var(--f-head); font-weight: 700; font-size: 18px; }
.card-tag { font-size: 11px; letter-spacing: .08em; white-space: nowrap; }
.card-title { font-size: 14px; color: var(--muted); margin-top: -6px; }

/* Clientes */
.clients { padding-bottom: 100px; gap: 32px; }
.client-list { margin: 0; font-family: var(--f-head); font-weight: 800; font-size: clamp(28px, 4vw, 56px); line-height: 1.15; letter-spacing: -.02em; color: var(--dim); }
.client-list .hi { color: var(--text); }
.client-list .sep { color: var(--accent); }

/* Contacto */
.contact { margin: 0 var(--pad) 56px; border-radius: 20px; background: var(--accent); color: var(--ink); padding: clamp(36px, 6vw, 88px); display: flex; flex-direction: column; gap: 28px; }
.contact h2 { font-weight: 900; font-size: clamp(44px, 7vw, 112px); line-height: .92; letter-spacing: -.03em; text-transform: uppercase; }
.contact-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.contact-actions:empty { display: none; }

.foot { padding: 0 var(--pad) 40px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; color: #8A8882; font-size: 13px; }
.foot img { height: 22px; width: auto; opacity: .7; }

@keyframes prog { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: .25; } }

@media (max-width: 1100px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .links { display: none; }
  .top { padding-top: 20px; }
  .logo img { height: 24px; }
  .pill.accent { padding: 10px 16px; font-size: 13px; }
  .strip { grid-auto-columns: calc((100% - 2 * 10px) / 3); gap: 10px; }
  .svc { flex-direction: column; height: auto; }
  .svc-panel { min-height: 96px; flex: none; }
  .svc-panel.on { min-height: 340px; }
  .svc-name { font-size: 24px; }
  .section { padding-top: 80px; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .hero { min-height: 560px; }
  .hero p { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
