:root {
    --gallos-red: #E01616;
    --gallos-red-deep: #B30E0E;
    --deep-black: #000000;
    --dark-gray: #1E1E1E;
    --white: #FFFFFF;
    --muted-gray: #888888;
    --hairline: rgba(255,255,255,0.08);
    --easing: cubic-bezier(0.16, 1, 0.3, 1);
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }
  html, body { background: var(--deep-black); color: var(--white); font-family: 'Montserrat', 'Avenir Next', 'Futura', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
  html { scroll-behavior: smooth; }
  body { overflow-x: hidden; }
  a { color: inherit; text-decoration: none; }
  button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
  img { display: block; max-width: 100%; }
  ::selection { background: var(--gallos-red); color: var(--white); }

  .mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }
  .label-sm { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 500; }
  .label-md { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; }

  /* Reveal on scroll */
  .reveal { opacity: 0; transform: translateY(30px); transition: opacity 800ms var(--easing), transform 800ms var(--easing); }
  .reveal.in { opacity: 1; transform: translateY(0); }

  /* Custom cursor */
  .cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999; border-radius: 50%; mix-blend-mode: difference; transform: translate(-50%, -50%); transition: width 220ms var(--easing), height 220ms var(--easing), opacity 220ms var(--easing); }
  .cursor-dot { width: 6px; height: 6px; background: #fff; }
  .cursor-ring { width: 6px; height: 6px; background: #fff; opacity: 0; }
  body.cursor-on-interactive .cursor-ring { width: 38px; height: 38px; opacity: 1; }
  body.cursor-on-interactive .cursor-dot { opacity: 1; }
  @media (max-width: 1024px), (hover: none) { .cursor-dot, .cursor-ring { display: none; } }
  @media (hover: hover) and (pointer: fine) { html, body, a, button { cursor: none; } }

  /* Container */
  .container { width: 100%; max-width: 1680px; margin: 0 auto; padding: 0 56px; }
  @media (max-width: 768px) { .container { padding: 0 24px; } }

  /* Headings */
  .display { font-weight: 700; letter-spacing: -0.025em; line-height: 0.92; text-wrap: balance; }
  .display-xl { font-size: clamp(64px, 9.2vw, 168px); font-weight: 800; letter-spacing: -0.035em; line-height: 0.88; }
  .display-lg { font-size: clamp(40px, 5vw, 88px); font-weight: 700; letter-spacing: -0.03em; line-height: 0.96; }
  .display-md { font-size: clamp(36px, 4.4vw, 76px); font-weight: 600; letter-spacing: -0.025em; line-height: 1; }

  /* Header */
  .header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; transition: background 320ms var(--easing), border-color 320ms var(--easing); border-bottom: 1px solid transparent; }
  .header.scrolled { background: rgba(0,0,0,0.92); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom-color: var(--hairline); }
  .header-inner { display: flex; align-items: center; justify-content: space-between; padding: 18px 56px; gap: 32px; }
  /* lockup del logo: gallo (PNG sin fondo) + texto en vivo GALLOS / MEDIA */
  .logo-lockup { display: inline-flex; align-items: center; gap: 12px; }
  .logo-mark { height: 46px; width: auto; display: block; }
  .logo-word { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; }
  /* tipografía principal de marca: Montserrat Light, muy espaciada (text-indent compensa el tracking final para centrar) */
  .logo-word .lw-top { font-size: 23px; font-weight: 300; letter-spacing: 0.24em; text-indent: 0.24em; color: var(--white); }
  .logo-word .lw-bot { font-size: 11.5px; font-weight: 400; letter-spacing: 0.52em; text-indent: 0.52em; color: var(--gallos-red); margin-top: 5px; }
  @media (max-width: 600px) {
    .logo-mark { height: 38px; }
    .logo-word .lw-top { font-size: 19px; letter-spacing: 0.2em; text-indent: 0.2em; }
    .logo-word .lw-bot { font-size: 10px; letter-spacing: 0.44em; text-indent: 0.44em; }
  }
  .nav { display: flex; align-items: center; gap: 36px; }
  .nav-link { position: relative; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 500; color: var(--white); padding: 6px 2px; transition: color 200ms var(--easing); }
  .nav-link::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 320ms var(--easing); }
  .nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
  .nav-link.active { color: var(--gallos-red); }
  .cta-outline { display: inline-flex; align-items: center; gap: 12px; padding: 14px 26px; border: 1px solid var(--white); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; color: var(--white); background: transparent; transition: background 220ms var(--easing), border-color 220ms var(--easing), color 220ms var(--easing); }
  .cta-outline .arr { display: inline-block; transition: transform 260ms var(--easing); }
  /* variante compacta en dos líneas (botón de contacto del header) */
  .cta-outline.cta-stack { padding: 9px 18px; gap: 14px; }
  .cta-stack .cta-lines { display: flex; flex-direction: column; gap: 2px; line-height: 1.25; text-align: left; letter-spacing: 0.12em; }
  .cta-outline:hover { background: var(--gallos-red); border-color: var(--gallos-red); }
  .cta-outline:hover .arr { transform: translateX(6px); }

  /* Hamburger / mobile nav */
  .hamburger { display: none; width: 36px; height: 36px; align-items: center; justify-content: center; flex-direction: column; gap: 6px; }
  .hamburger span { display: block; width: 22px; height: 1.5px; background: #fff; transition: transform 320ms var(--easing), opacity 200ms var(--easing); }
  .hamburger.open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
  .hamburger.open span:nth-child(2) { opacity: 0; }
  .hamburger.open span:nth-child(3) { transform: translateY(-4px) rotate(-45deg); }
  /* Overlay del menú móvil — cubre TODO (incluido el header) para que no
     queden dos cierres ni el hamburguesa "raro" debajo. */
  .mobile-overlay { position: fixed; inset: 0; z-index: 180; opacity: 0; pointer-events: none;
    background: radial-gradient(120% 80% at 100% 0%, rgba(224,22,22,0.18) 0%, rgba(224,22,22,0) 55%), var(--deep-black);
    transition: opacity 360ms var(--easing); display: flex; flex-direction: column;
    padding: clamp(80px, 14vh, 130px) clamp(24px, 6vw, 56px) calc(40px + env(safe-area-inset-bottom)); }
  .mobile-overlay.open { opacity: 1; pointer-events: auto; }

  .mobile-close { position: absolute; top: clamp(20px, 4vw, 34px); right: clamp(20px, 5vw, 40px);
    width: 46px; height: 46px; border: 1px solid rgba(255,255,255,0.22); border-radius: 50%;
    transition: background 220ms var(--easing), border-color 220ms var(--easing), transform 220ms var(--easing); }
  .mobile-close span { position: absolute; top: 50%; left: 50%; width: 18px; height: 1.6px; background: #fff; }
  .mobile-close span:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
  .mobile-close span:nth-child(2) { transform: translate(-50%, -50%) rotate(-45deg); }
  .mobile-close:hover, .mobile-close:active { background: var(--gallos-red); border-color: var(--gallos-red); transform: rotate(90deg); }

  .mobile-nav { display: flex; flex-direction: column; margin-top: auto; }
  .mob-link { position: relative; display: flex; align-items: baseline; gap: 16px; color: var(--white);
    padding: clamp(12px, 2.4vh, 20px) 0; border-bottom: 1px solid var(--hairline);
    opacity: 0; transform: translateX(-14px); transition: opacity 420ms var(--easing), transform 420ms var(--easing), color 200ms var(--easing); }
  .mobile-overlay.open .mob-link { opacity: 1; transform: translateX(0); }
  .mob-link .mob-idx { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.16em; color: var(--muted-gray); flex-shrink: 0; }
  .mob-link .mob-txt { font-size: clamp(30px, 8vw, 46px); font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
  .mob-link .mob-arr { margin-left: auto; align-self: center; color: var(--gallos-red); opacity: 0; transform: translateX(-8px); transition: opacity 220ms var(--easing), transform 220ms var(--easing); }
  /* todos los enlaces en blanco; el rojo solo aparece al tocar/pasar el cursor */
  .mob-link:hover, .mob-link:active { color: var(--gallos-red); }
  .mob-link:hover .mob-arr, .mob-link:active .mob-arr { opacity: 1; transform: translateX(0); }

  .mobile-cta { margin-top: clamp(28px, 5vh, 48px); display: inline-flex; align-items: center; justify-content: center; gap: 14px;
    padding: 20px 28px; background: var(--gallos-red); color: #fff; font-size: 12px; letter-spacing: 0.16em;
    text-transform: uppercase; font-weight: 700; border-radius: 4px; transition: background 220ms var(--easing); }
  .mobile-cta:hover { background: var(--gallos-red-deep); }
  .mobile-cta .arr { transition: transform 240ms var(--easing); }
  .mobile-cta:hover .arr { transform: translateX(6px); }

  @media (max-width: 900px) {
    .header-inner { padding: 16px 24px; }
    .nav, .header > .cta-outline, .header-inner > .cta-outline { display: none; }
    .hamburger { display: flex; }
  }

  /* HERO */
  .hero { position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; display: flex; flex-direction: column; }
  .hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
  .hero-bg::after { content:''; position: absolute; inset: 0; background:
    radial-gradient(ellipse at center, transparent 35%, rgba(0,0,0,0.55) 75%, rgba(0,0,0,0.85) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.55) 0%, transparent 25%, transparent 65%, rgba(13,13,13,0.95) 100%);
    z-index: 2; pointer-events:none;
  }
  .hero-bg video, .hero-bg .reel { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
  .hero-bg .reel { display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(4, 1fr); gap: 1px; background: #000; filter: contrast(1.05) brightness(0.55); }
  .hero-bg .reel .cell { position: relative; overflow: hidden; background: #111; }
  .hero-bg .reel .cell::before { content: ''; position: absolute; inset: 0; background-size: cover; background-position: center; }
  /* gradient mood "footage" cells */
  .hero-bg .reel .c1::before  { background: linear-gradient(135deg, #1a0a0a, #3a0808 45%, #6a0e0e 100%); }
  .hero-bg .reel .c2::before  { background: radial-gradient(circle at 30% 40%, #2a1a14, #0b0708 70%); }
  .hero-bg .reel .c3::before  { background: linear-gradient(200deg, #0b1320, #0b0708 70%); }
  .hero-bg .reel .c4::before  { background: linear-gradient(180deg, #2a0a0a, #110404 70%); }
  .hero-bg .reel .c5::before  { background: radial-gradient(circle at 70% 30%, #1a1f24, #050607 75%); }
  .hero-bg .reel .c6::before  { background: linear-gradient(135deg, #0a0a0a, #1f1313 90%); }
  .hero-bg .reel .c7::before  { background: linear-gradient(160deg, #1e0808, #060306 80%); }
  .hero-bg .reel .c8::before  { background: radial-gradient(circle at 40% 70%, #2a0e0e, #0b0708 70%); }
  .hero-bg .reel .c9::before  { background: linear-gradient(45deg, #0c0c0c, #1a1010 100%); }
  .hero-bg .reel .c10::before { background: linear-gradient(120deg, #14181d, #060708 90%); }
  .hero-bg .reel .c11::before { background: linear-gradient(220deg, #1a0606, #0c0404 90%); }
  .hero-bg .reel .c12::before { background: radial-gradient(circle at 50% 50%, #1a1a1a, #050505 80%); }
  /* shimmer */
  .hero-bg .reel .cell::after {
    content:''; position:absolute; inset: -50%;
    background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,0.04) 50%, transparent 60%);
    animation: shimmer 9s linear infinite;
  }
  @keyframes shimmer { 0% { transform: translateX(-30%);} 100% { transform: translateX(30%);} }

  /* mosaico real de frames (cambia celda por celda como una pared de TVs) */
  .hero-bg .reel-mosaic .mtile { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 1; }
  .hero-bg .reel-mosaic .mtile.top { z-index: 2; animation: mtileIn 750ms var(--easing); }
  @keyframes mtileIn { from { opacity: 0; } to { opacity: 1; } }

  .hero-bg .grain { position: absolute; inset: 0; opacity: 0.08; mix-blend-mode: overlay; z-index: 3; pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.7'/></svg>"); }

  .hero-meta { position: absolute; top: 96px; left: 56px; z-index: 5; color: var(--white); }
  .hero-meta .dot { display:inline-block; width:6px; height:6px; background:var(--gallos-red); border-radius:50%; margin-right:10px; vertical-align: middle; animation: pulse 2.2s infinite ease-in-out; }
  @keyframes pulse { 0%,100% { opacity:1; transform: scale(1);} 50% { opacity:0.35; transform: scale(0.85);} }

  .hero-content { position: relative; z-index: 5; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 clamp(56px, 7vw, 140px) clamp(28px, 6vh, 72px); }
  .hero-headline { font-weight: 800; letter-spacing: -0.04em; line-height: 0.9; font-size: clamp(38px, 4.8vw, 84px); }
  .hero-headline span { display: block; }
  .hero-headline .red { color: var(--gallos-red); }
  .hero-manifesto { margin-top: 28px; max-width: 560px; font-weight: 300; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.65; color: rgba(255,255,255,0.8); }

  .hero-bottom { position: relative; z-index: 5; padding: 0 0 28px; }
  .ticker { overflow: hidden; border-top: 1px solid var(--hairline); padding: 18px 0; }
  .ticker-track { display: inline-flex; gap: 28px; animation: ticker 38s linear infinite; white-space: nowrap; padding-left: 56px; }
  .ticker-track span { font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 500; color: var(--white); }
  .ticker-track .sep { color: var(--gallos-red); }
  @keyframes ticker { from { transform: translateX(0);} to { transform: translateX(-50%);} }

  .scroll-indicator { position: absolute; right: 32px; bottom: 110px; z-index: 6; display: flex; flex-direction: column; align-items: center; gap: 16px; }
  .scroll-indicator .word { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 10px; letter-spacing: 0.32em; color: rgba(255,255,255,0.7); }
  .scroll-indicator .line { position: relative; width: 1px; height: 56px; background: rgba(255,255,255,0.2); overflow: hidden; }
  .scroll-indicator .line::before { content:''; position:absolute; left:0; top:-50%; width:100%; height:50%; background: var(--white); animation: scrollBounce 2.4s var(--easing) infinite; }
  @keyframes scrollBounce { 0% { top:-50%;} 50% { top:100%;} 100% { top:100%;} }

  @media (max-width: 768px) {
    .hero-meta { top: 88px; left: 24px; }
    .hero-content { padding: 0 24px clamp(28px, 5vh, 56px); justify-content: flex-end; }
    .hero-bg .reel { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(5, 1fr); }
    .scroll-indicator { display: none; }
    .ticker-track { padding-left: 24px; }
  }

  /* Sections */
  section { position: relative; }
  .section-pad { padding: 140px 0; }
  @media (max-width: 768px) { .section-pad { padding: 88px 0; } }

  .sec-head { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; margin-bottom: 72px; }
  .sec-head .lhs h2 { margin-top: 24px; }
  .sec-head .rhs { color: var(--muted-gray); font-weight: 300; font-size: 17px; line-height: 1.55; max-width: 480px; }
  /* en "Nuestro trabajo." el texto de la derecha baja para alinear con la 2a línea del título */
  #proyectos .sec-head .rhs { position: relative; top: clamp(10px, 1.6vw, 28px); }
  .sec-label { color: var(--gallos-red); font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 12px; }
  .sec-label::before { content:''; width: 32px; height:1px; background: var(--gallos-red); display:inline-block; }
  @media (max-width: 768px) { .sec-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 48px; } }

  /* Proyectos */
  .projects-grid { display: flex; flex-direction: column; gap: 56px; }
  .projects-row { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: stretch; }
  .project { position: relative; background: transparent; cursor: pointer; display: flex; flex-direction: column; }
  .project .thumb { position: relative; width: 100%; overflow: hidden; background: #111; height: clamp(200px, 23vw, 360px); }
  .project.vertical .thumb { height: clamp(280px, 36vw, 560px); }
  /* alturas escalonadas para el mosaico (zigzag) */
  .project.tall .thumb { height: clamp(300px, 31vw, 480px); }
  .project.feat-hero .thumb { height: clamp(280px, 27vw, 420px); }
  .project .thumb .play-art { position:absolute; inset:0; transition: transform 1200ms var(--easing); }
  .project:hover .thumb .play-art { transform: scale(1.04); }
  .project .thumb::after { content:''; position:absolute; inset:0; background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, transparent 30%, transparent 60%, rgba(0,0,0,0.7) 100%); pointer-events:none; }

  .project .year { position: absolute; top: 16px; right: 18px; z-index: 3; font-family:'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.16em; color: rgba(255,255,255,0.7); }
  .project .meta { padding: 20px 0 0; display: flex; flex-direction: column; gap: 10px; flex: 1; }
  .project .meta h3 { font-size: clamp(22px, 2vw, 32px); font-weight: 700; letter-spacing: -0.02em; line-height: 1; display: inline-block; position: relative; transition: transform 320ms var(--easing); align-self: flex-start; }
  .project .meta h3::after { content:''; position:absolute; left:0; right:0; bottom: -6px; height: 2px; background: var(--gallos-red); transform: scaleX(0); transform-origin: left; transition: transform 380ms var(--easing); }
  .project:hover .meta h3 { transform: translateX(4px); }
  .project:hover .meta h3::after { transform: scaleX(1); }
  .project .meta .synopsis { font-size: 14px; font-weight: 300; line-height: 1.5; color: rgba(255,255,255,0.65); max-width: 460px; }
  .project .meta .ymeta { margin-top: 2px; padding-top: 8px; font-family:'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-gray); }

  .project.span-7 { grid-column: span 7; }
  .project.span-5 { grid-column: span 5; }
  .project.span-4 { grid-column: span 4; }
  .project.span-8 { grid-column: span 8; }
  .project.span-6 { grid-column: span 6; }
  .project.span-12 { grid-column: span 12; }
  @media (max-width: 900px) {
    .projects-row { grid-template-columns: 1fr; gap: 56px; }
    .project[class*="span-"] { grid-column: 1 / -1; }
    .project .thumb, .project.vertical .thumb, .project.tall .thumb, .project.feat-hero .thumb { height: 240px; }
  }

  .section-cta { margin-top: 96px; display: flex; justify-content: center; }
  .section-cta .cta-outline { padding: 22px 40px; font-size: 12px; }

  /* placeholder "frames" — animated stripes/gradients to simulate motion */
  .frame-a { background:
    radial-gradient(circle at 20% 30%, rgba(224,22,22,0.25), transparent 45%),
    linear-gradient(135deg, #1a0a0a 0%, #050505 60%);
    position: relative;
  }
  .frame-a::before { content:''; position:absolute; inset:0;
    background: repeating-linear-gradient(115deg, transparent 0 80px, rgba(255,255,255,0.04) 80px 81px);
    animation: pan 14s linear infinite;
  }
  @keyframes pan { from{transform:translateX(-10%);} to{transform:translateX(10%);} }
  .frame-b { background: radial-gradient(circle at 70% 70%, #2a2a2a, #050505 70%); position:relative; }
  .frame-b::before { content:''; position:absolute; inset:0; background: linear-gradient(180deg, transparent 30%, rgba(224,22,22,0.18) 70%, transparent 100%); animation: drift 12s ease-in-out infinite alternate; }
  @keyframes drift { from{ transform: translateY(-8%);} to { transform: translateY(8%);} }
  .frame-c { background: linear-gradient(160deg, #0c1018 0%, #060708 70%); position:relative; }
  .frame-c::before { content:''; position:absolute; inset:0;
    background:
      radial-gradient(circle at 80% 25%, rgba(180,200,255,0.07), transparent 35%),
      radial-gradient(circle at 20% 70%, rgba(224,22,22,0.12), transparent 40%);
    animation: drift 16s ease-in-out infinite alternate;
  }
  .frame-d { background:
    radial-gradient(circle at 50% 40%, rgba(224,22,22,0.35), transparent 55%),
    linear-gradient(180deg, #1a0606 0%, #060202 70%);
    position: relative;
  }
  .frame-d::before { content:''; position:absolute; inset:0;
    background: repeating-linear-gradient(0deg, transparent 0 4px, rgba(0,0,0,0.25) 4px 5px);
    animation: scan 6s linear infinite;
  }
  @keyframes scan { from{ background-position: 0 0;} to{ background-position: 0 60px;} }
  .frame-e { background: linear-gradient(220deg, #16181c 0%, #050608 60%); position: relative; }
  .frame-e::before { content:''; position:absolute; inset:0; background:
    radial-gradient(circle at 30% 40%, rgba(255,255,255,0.08), transparent 30%),
    radial-gradient(circle at 70% 60%, rgba(224,22,22,0.12), transparent 35%);
    animation: drift 18s ease-in-out infinite alternate;
  }
  .frame-f { background: radial-gradient(circle at center, #2a0e0e, #060202 80%); position: relative; }
  .frame-f::before { content:''; position:absolute; inset:0; background:
    repeating-radial-gradient(circle at center, transparent 0 30px, rgba(255,255,255,0.025) 30px 31px);
    animation: zoom 14s linear infinite;
  }
  @keyframes zoom { from { transform: scale(1);} to { transform: scale(1.2);} }
  .grain-overlay { position:absolute; inset:0; opacity:0.07; mix-blend-mode: overlay; pointer-events:none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

  .frame-tc { position:absolute; left:14px; bottom:14px; font-family:'JetBrains Mono', monospace; font-size:9px; letter-spacing:0.16em; color: rgba(255,255,255,0.4); }
  .frame-rec { position:absolute; left:14px; top:14px; display:flex; align-items:center; gap:0; }
  .frame-rec::before { content:''; width:6px; height:6px; border-radius:50%; background: var(--gallos-red); animation: pulse 1.6s infinite ease-in-out; opacity: 0.85; }
  .project .year { position: absolute; top: 14px; right: 16px; z-index: 3; font-family:'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.16em; color: rgba(255,255,255,0.55); }

  /* Servicios — fondo claro para romper el negro de la página */
  .services { position: relative; background: #f1f1ef; color: #0a0a0a; }
  .services::before { content:''; position:absolute; inset:0; opacity:0.04; pointer-events:none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
  .services .container { position: relative; z-index: 1; }
  .services-statement { font-size: clamp(32px, 4vw, 64px); font-weight: 600; line-height: 1.05; letter-spacing: -0.025em; max-width: 1100px; color: #0a0a0a; }
  .services-statement em { font-style: normal; color: var(--gallos-red); }
  .services-grid { margin-top: 96px; display: grid; grid-template-columns: 1fr 1fr; }
  .service { padding: 56px 48px; border-top: 1px solid rgba(13,13,13,0.14); position: relative; transition: background 280ms var(--easing); }
  .service:nth-child(odd) { border-right: 1px solid rgba(13,13,13,0.14); }
  .service:hover { background: rgba(13,13,13,0.025); }
  .service .num { font-size: clamp(72px, 7vw, 128px); font-weight: 800; line-height: 0.9; color: var(--gallos-red); letter-spacing: -0.04em; }
  .service h3 { margin-top: 12px; font-size: clamp(22px, 1.8vw, 30px); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #0a0a0a; }
  .service p { margin-top: 18px; color: #555; font-weight: 300; font-size: 16px; line-height: 1.6; max-width: 460px; }
  .service .more { margin-top: 28px; display: inline-flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 500; }
  .service .more .ul { position: relative; }
  .service .more .ul::after { content:''; position:absolute; left:0; right:0; bottom:-4px; height:1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 280ms var(--easing); }
  .service .more:hover .ul::after { transform: scaleX(1); }
  .service .more .arr { transition: transform 260ms var(--easing); }
  .service .more:hover .arr { transform: translateX(6px); }
  @media (max-width: 900px) {
    .services-grid { grid-template-columns: 1fr; }
    .service { padding: 40px 0; }
    .service:nth-child(odd) { border-right: 0; }
  }

  /* Sobre nosotros */
  .about { background: var(--gallos-red); color: var(--white); }
  .about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 80px; align-items: start; }
  .about-iso { position: relative; padding: 24px 0; }
  .about-iso img { width: 78%; max-width: 380px; mix-blend-mode: lighten; }
  .about-iso .estudio-meta { margin-top: 56px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.25); display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
  .about-iso .estudio-meta dt { font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 600; opacity: 0.75; }
  .about-iso .estudio-meta dd { margin-top: 8px; font-family:'JetBrains Mono', monospace; font-size: 13px; letter-spacing: 0.06em; }
  .about-quote { font-size: clamp(34px, 4vw, 68px); font-weight: 600; line-height: 1.02; letter-spacing: -0.025em; margin-top: 24px; }
  .about-quote .dim { color: rgba(255,255,255,0.55); }
  .about-body { margin-top: 56px; max-width: 600px; display: flex; flex-direction: column; gap: 22px; font-weight: 300; font-size: 16px; line-height: 1.65; }
  .mv { margin-top: 64px; display: grid; grid-template-columns: 1fr; gap: 32px; }
  .mv .block { padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.25); }
  .mv .block .ttl { font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; font-weight: 600; }
  .mv .block p { margin-top: 14px; font-weight: 300; font-size: 16px; line-height: 1.6; max-width: 600px; }
  @media (max-width: 900px) {
    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .about-iso { text-align: center; }
    .about-iso img { width: 56%; }
    .about-iso .estudio-meta { text-align: left; }
  }

  /* Contacto */
  /* fondo fotográfico recortado al recuadro (home "¿Tienes un proyecto?") */
  .contact.has-bg-photo { position: relative; overflow: hidden; }
  .contact.has-bg-photo .contact-bg { position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: center; z-index: 0; }
  .contact.has-bg-photo::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(180deg, var(--deep-black) 0%, rgba(0,0,0,0.62) 26%, rgba(0,0,0,0.55) 60%, rgba(0,0,0,0.80) 100%); }
  .contact.has-bg-photo .container { position: relative; z-index: 2; }
  .contact .sec-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 80px; max-width: 1100px; }
  .contact h2 { font-size: clamp(40px, 5.2vw, 92px); font-weight: 700; letter-spacing: -0.03em; line-height: 0.97; }
  .contact .subhead { color: var(--muted-gray); font-weight: 300; font-size: 18px; max-width: 540px; margin-top: 12px; }
  .form { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 44px; }
  .field { position: relative; }
  .field label { display: block; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 500; color: var(--muted-gray); margin-bottom: 14px; transition: color 220ms var(--easing); }
  .field input, .field textarea { width: 100%; background: transparent; border: 0; border-bottom: 1px solid rgba(255,255,255,0.18); color: var(--white); font-family: inherit; font-size: 20px; padding: 8px 0 16px; outline: none; transition: border-color 240ms var(--easing); font-weight: 300; resize: none; }
  .field textarea { min-height: 110px; line-height: 1.5; }
  .field input:focus, .field textarea:focus { border-color: var(--gallos-red); }
  .field.focused label, .field input:focus + label, .field:focus-within label { color: var(--gallos-red); }
  .checks { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 32px; }
  @media (max-width: 700px) { .checks { grid-template-columns: 1fr; } }
  .check { display: flex; align-items: center; gap: 14px; cursor: pointer; }
  .check .box { width: 18px; height: 18px; border: 1px solid rgba(255,255,255,0.4); position: relative; flex-shrink: 0; transition: border-color 200ms var(--easing), background 200ms var(--easing); }
  .check .box::after { content: ''; position: absolute; left: 4px; top: 0px; width: 5px; height: 11px; border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) scale(0); transform-origin: center; transition: transform 220ms var(--easing); }
  .check.on .box { background: var(--gallos-red); border-color: var(--gallos-red); }
  .check.on .box::after { transform: rotate(45deg) scale(1); }
  .check .lbl { font-size: 14px; letter-spacing: 0.04em; }
  .check:hover .box { border-color: rgba(255,255,255,0.8); }
  .submit-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 16px; }
  .submit { display: inline-flex; align-items: center; gap: 16px; padding: 22px 40px; background: var(--gallos-red); color: var(--white); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; transition: background 220ms var(--easing); }
  .submit:hover { background: var(--gallos-red-deep); }
  .submit .arr { transition: transform 260ms var(--easing); }
  .submit:hover .arr { transform: translateX(8px); }
  .submit:disabled { opacity: 0.55; cursor: not-allowed; }
  .direct { text-align: center; margin-top: 56px; font-size: 14px; color: var(--muted-gray); }
  .direct b { color: var(--white); font-weight: 500; letter-spacing: 0.04em; }

  /* contacto directo — botones compactos tipo "pill" con relieve */
  .contact-direct { display: flex; flex-wrap: wrap; gap: 14px; max-width: 1100px; }
  .contact-line { position: relative; display: inline-flex; align-items: center; gap: 14px;
    padding: 11px 22px 11px 11px; overflow: hidden;
    border: 1px solid rgba(255,255,255,0.14); border-radius: 999px; background: rgba(255,255,255,0.04);
    box-shadow: 0 6px 16px -8px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.08);
    transition: border-color 240ms var(--easing), background 240ms var(--easing),
                transform 240ms var(--easing), box-shadow 240ms var(--easing); }
  .contact-line:hover { transform: translateY(-2px); border-color: rgba(224,22,22,0.55); background: rgba(224,22,22,0.07);
    box-shadow: 0 12px 26px -10px rgba(224,22,22,0.45), inset 0 1px 0 rgba(255,255,255,0.12); }
  .contact-line:active { transform: translateY(0); box-shadow: 0 4px 12px -8px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.06); }
  .contact-line .cl-ico { flex-shrink: 0; width: 46px; height: 46px;
    display: grid; place-items: center; border-radius: 50%; color: var(--gallos-red);
    border: 1px solid rgba(224,22,22,0.35); background: rgba(224,22,22,0.10);
    transition: background 240ms var(--easing), color 240ms var(--easing), transform 240ms var(--easing); }
  .contact-line .cl-ico svg { width: 22px; height: 22px; }
  .contact-line:hover .cl-ico { background: var(--gallos-red); color: #fff; transform: scale(1.05); }
  .contact-line .cl-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .contact-line .cl-label { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; color: var(--muted-gray); }
  .contact-line .cl-value { font-size: clamp(15px, 1.2vw, 18px); font-weight: 600; letter-spacing: -0.01em; line-height: 1.15;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .contact-line .cl-arr { margin-left: 4px; flex-shrink: 0; color: var(--gallos-red);
    opacity: 0; transform: translateX(-6px); transition: opacity 220ms var(--easing), transform 220ms var(--easing); }
  .contact-line .cl-arr svg { width: 17px; height: 17px; }
  .contact-line:hover .cl-arr { opacity: 1; transform: translateX(0); }
  /* variante centrada (CTA de servicios/nosotros) */
  .contact-direct.is-center { margin-left: auto; margin-right: auto; max-width: 920px; justify-content: center; }
  @media (max-width: 720px) { .contact-direct { flex-direction: column; align-items: stretch; } }
  @media (max-width: 380px) {
    .contact-line { flex-wrap: wrap; }
    .contact-line .cl-value { font-size: 15px; white-space: normal; }
  }
  .form-sent { padding: 28px 32px; border: 1px solid var(--gallos-red); text-align: center; color: var(--white); }
  .form-sent .ttl { font-size: 18px; font-weight: 600; letter-spacing: 0.04em; }
  .form-sent .sub { margin-top: 8px; color: var(--muted-gray); font-size: 14px; }

  /* Footer */
  .footer { background: var(--deep-black); border-top: 1px solid var(--hairline); padding: 96px 0 0; position: relative; overflow: hidden; }
  .footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 64px; padding-bottom: 80px; }
  .footer-iso { width: auto; height: 64px; display: block; }
  .footer-tag { margin-top: 24px; color: var(--muted-gray); font-weight: 300; max-width: 320px; line-height: 1.5; }
  .footer-loc { margin-top: 24px; font-family:'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.18em; color: var(--muted-gray); }
  .footer-col h4 { font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 600; color: var(--muted-gray); margin-bottom: 28px; }
  .footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 14px; }
  .footer-col a { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500; transition: color 200ms var(--easing); display: inline-flex; align-items: center; gap: 8px; }
  .footer-col a .arr { transition: transform 240ms var(--easing); opacity: 0; }
  .footer-col a:hover { color: var(--gallos-red); }
  .footer-col a:hover .arr { transform: translateX(6px); opacity: 1; }
  .footer-bottom { border-top: 1px solid var(--hairline); padding: 24px 0; display: flex; justify-content: space-between; align-items: center; font-family:'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.16em; color: var(--muted-gray); }
  .megaword { font-size: clamp(80px, 22vw, 360px); line-height: 0.85; font-weight: 800; letter-spacing: -0.04em; color: rgba(255,255,255,0.04); white-space: nowrap; margin: 32px 0 -8px; padding: 0; user-select: none; pointer-events: none; }
  @media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr; gap: 48px; padding-bottom: 56px; }
    .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
  }

  /* ============================================================
     CARRUSEL DE FRAMES (auto-deslizante / fundido cinematográfico)
     ============================================================ */
  .gm-carousel { position: absolute; inset: 0; overflow: hidden; background: #0a0a0a; }
  .gm-carousel .gm-slide {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    opacity: 0; transform: scale(1.07);
    transition: opacity 1100ms var(--easing), transform 6500ms var(--easing);
    will-change: opacity, transform; pointer-events: none; user-select: none;
  }
  .gm-carousel .gm-slide.on { opacity: 1; transform: scale(1); }
  .gm-carousel.empty { display: grid; place-items: center; color: var(--muted-gray); font-size: 11px; letter-spacing: 0.16em; }

  /* puntitos indicadores */
  .gm-dots { position: absolute; left: 14px; bottom: 14px; z-index: 4; display: flex; gap: 6px; }
  .gm-dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,0.35); transition: background 300ms var(--easing), transform 300ms var(--easing); }
  .gm-dots i.on { background: var(--gallos-red); transform: scale(1.3); }

  /* ============================================================
     LIGHTBOX DESPLEGABLE
     ============================================================ */
  .gm-lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.92); backdrop-filter: blur(8px);
    display: grid; place-items: center; padding: clamp(20px, 5vw, 80px); animation: gmFade 320ms var(--easing); }
  @keyframes gmFade { from { opacity: 0; } to { opacity: 1; } }
  .gm-lb-inner { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center;
    width: 100%; max-width: 1180px; }
  .gm-lb-media { position: relative; aspect-ratio: 16 / 9; width: 100%; overflow: hidden; background: #0a0a0a; border: 1px solid var(--hairline); }
  .gm-lb-meta { display: flex; flex-direction: column; gap: 18px; color: var(--white); }
  .gm-lb-meta .sec-label { color: var(--gallos-red); }
  .gm-lb-meta h3 { font-size: clamp(28px, 3.4vw, 52px); font-weight: 800; letter-spacing: -0.02em; line-height: 1; color: var(--white); }
  .gm-lb-meta .synopsis { font-size: 15px; font-weight: 300; line-height: 1.6; color: rgba(255,255,255,0.65); max-width: 420px; }
  .gm-lb-meta .ymeta { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-gray); }
  .gm-lb-watch { margin-top: 10px; padding-top: 22px; border-top: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
  .gm-lb-prompt { font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.6); }
  .gm-lb-cta { display: inline-flex; align-items: center; gap: 12px; padding: 16px 30px; background: var(--gallos-red); color: #fff;
    font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; border-radius: 4px;
    transition: background 220ms var(--easing), transform 220ms var(--easing), box-shadow 220ms var(--easing); }
  .gm-lb-cta:hover { background: var(--gallos-red-deep); transform: translateY(-2px); box-shadow: 0 12px 30px -10px rgba(224,22,22,0.6); }
  .gm-lb-cta .arr { display: inline-block; transition: transform 240ms var(--easing); }
  .gm-lb-cta:hover .arr { transform: translate(3px, -3px); }
  .gm-lb-close { position: fixed; top: 24px; right: 28px; z-index: 210; width: 48px; height: 48px;
    border: 1px solid var(--hairline); border-radius: 50%; color: var(--white); font-size: 16px;
    display: grid; place-items: center; transition: background 220ms var(--easing), border-color 220ms var(--easing); }
  .gm-lb-close:hover { background: var(--gallos-red); border-color: var(--gallos-red); }
  @media (max-width: 820px) {
    .gm-lb-inner { grid-template-columns: 1fr; gap: 24px; }
    .gm-lb-meta { text-align: left; }
  }

  /* ============================================================
     PÁGINA CATÁLOGO (catalogo.html)
     ============================================================ */
  .cat-hero { padding: clamp(140px, 18vh, 220px) 0 clamp(48px, 7vh, 90px); }
  .cat-hero .sec-label { color: var(--gallos-red); }
  .cat-hero h1 { font-size: clamp(40px, 6vw, 100px); font-weight: 800; letter-spacing: -0.03em; line-height: 0.94; margin-top: 20px; }
  .cat-hero p { margin-top: 28px; max-width: 560px; font-size: 15px; font-weight: 300; line-height: 1.6; color: rgba(255,255,255,0.6); }
  .cat-count { font-family: 'JetBrains Mono', monospace; color: var(--gallos-red); }

  .catalog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 2.4vw, 40px) clamp(20px, 2vw, 32px); padding-bottom: clamp(80px, 14vh, 160px); }
  .cat-card { position: relative; cursor: pointer; display: flex; flex-direction: column; }
  .cat-card .thumb { position: relative; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: #111; }
  .cat-card .thumb::after { content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, transparent 35%, transparent 60%, rgba(0,0,0,0.7) 100%); }
  .cat-card .num { position: absolute; top: 14px; left: 16px; z-index: 3; font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.16em; color: rgba(255,255,255,0.7); }
  .cat-card .expand { position: absolute; top: 12px; right: 12px; z-index: 3; width: 34px; height: 34px; border: 1px solid var(--hairline);
    border-radius: 50%; display: grid; place-items: center; color: var(--white); background: rgba(0,0,0,0.3);
    opacity: 0; transform: scale(0.85); transition: opacity 300ms var(--easing), transform 300ms var(--easing), background 220ms var(--easing); }
  .cat-card:hover .expand { opacity: 1; transform: scale(1); }
  .cat-card .expand:hover { background: var(--gallos-red); border-color: var(--gallos-red); }
  .cat-card .gm-slide { transition: opacity 1100ms var(--easing), transform 7000ms var(--easing); }
  .cat-card:hover .gm-carousel .gm-slide.on { transform: scale(1.05); }
  .cat-card .meta { padding: 16px 0 0; display: flex; flex-direction: column; gap: 6px; }
  .cat-card .meta h3 { font-size: clamp(17px, 1.4vw, 22px); font-weight: 700; letter-spacing: -0.01em; line-height: 1.05; }
  .cat-card .meta .synopsis { font-size: 13px; font-weight: 300; line-height: 1.5; color: rgba(255,255,255,0.6); margin-top: 2px; }
  .cat-card .meta .ymeta { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-gray); margin-top: 4px; }
  .cat-back { display: inline-flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 500; color: var(--white); }
  .cat-back .arr { transform: rotate(180deg); display: inline-flex; }

  @media (max-width: 980px) { .catalog-grid { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 600px) { .catalog-grid { grid-template-columns: 1fr; } }

  /* ============================================================
     BOTÓN FLOTANTE DE WHATSAPP
     ============================================================ */
  .wa-fab { position: fixed; right: clamp(18px, 3vw, 34px); bottom: clamp(18px, 3vw, 34px); z-index: 150;
    width: 60px; height: 60px; border-radius: 50%; background: #25D366; color: #fff;
    display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    transition: transform 240ms var(--easing), box-shadow 240ms var(--easing); }
  .wa-fab:hover { transform: scale(1.08) translateY(-2px); box-shadow: 0 14px 36px rgba(37,211,102,0.45); }
  .wa-fab svg { position: relative; z-index: 2; }
  .wa-fab .wa-pulse { position: absolute; inset: 0; border-radius: 50%; background: #25D366; z-index: 1;
    animation: waPulse 2.4s var(--easing) infinite; }
  @keyframes waPulse { 0% { transform: scale(1); opacity: 0.5; } 70%, 100% { transform: scale(1.7); opacity: 0; } }
  @media (max-width: 600px) { .wa-fab { width: 54px; height: 54px; } .wa-fab svg { width: 26px; height: 26px; } }

  /* ============================================================
     TEMA CLARO — solo página de catálogo (body.theme-light)
     ============================================================ */
  body.theme-light {
    color: #0a0a0a;
    background-color: #f1f1ef;
    background-image:
      url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='gn'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.05 0'/></filter><rect width='100%' height='100%' filter='url(%23gn)'/></svg>"),
      radial-gradient(1100px 640px at 50% -12%, #ffffff 0%, rgba(255,255,255,0) 62%),
      radial-gradient(1000px 720px at 96% 0%, rgba(224,22,22,0.07) 0%, rgba(224,22,22,0) 55%),
      radial-gradient(900px 700px at 0% 30%, rgba(13,13,13,0.05) 0%, rgba(13,13,13,0) 55%);
    background-repeat: repeat, no-repeat, no-repeat, no-repeat;
    background-size: 200px 200px, auto, auto, auto;
    background-attachment: fixed, fixed, fixed, fixed;
  }
  body.theme-light ::selection { background: var(--gallos-red); color: #fff; }

  /* header */
  body.theme-light .header.scrolled { background: rgba(255,255,255,0.9); border-bottom-color: rgba(0,0,0,0.12); }
  body.theme-light .logo-word .lw-top { color: #0a0a0a; }
  body.theme-light .logo-mark { filter: invert(1) brightness(0.05); }
  body.theme-light .cat-back { color: #0a0a0a; }
  body.theme-light .cat-back:hover { color: var(--gallos-red); }
  /* menú principal sobre fondo claro */
  body.theme-light .nav-link { color: #0a0a0a; }
  body.theme-light .nav-link.active { color: var(--gallos-red); }
  body.theme-light .cta-outline { border-color: #0a0a0a; color: #0a0a0a; }
  body.theme-light .cta-outline:hover { background: var(--gallos-red); border-color: var(--gallos-red); color: #fff; }
  body.theme-light .hamburger span { background: #0a0a0a; }

  /* hero del catálogo */
  body.theme-light .cat-hero h1 { color: #0a0a0a; }
  body.theme-light .cat-hero p { color: rgba(0,0,0,0.62); }

  /* tarjetas: fondo blanco, texto negro, borde negro */
  body.theme-light .cat-card .thumb { border: 1px solid #0a0a0a; background: #eaeaea; box-shadow: 0 14px 34px -16px rgba(13,13,13,0.45); transition: box-shadow 280ms var(--easing), transform 280ms var(--easing); }
  body.theme-light .cat-card:hover .thumb { box-shadow: 0 22px 46px -16px rgba(13,13,13,0.55); transform: translateY(-3px); }
  body.theme-light .cat-card .meta h3 { color: #0a0a0a; }
  body.theme-light .cat-card .meta .synopsis { color: rgba(0,0,0,0.6); }
  body.theme-light .cat-card .meta .ymeta { color: #555; }

  /* el footer permanece oscuro en el catálogo -> texto claro y legible */
  body.theme-light .footer { color: var(--white); }
  body.theme-light .footer .footer-col a { color: rgba(255,255,255,0.85); }
  body.theme-light .footer .footer-col a:hover { color: var(--gallos-red); }

  /* ============================================================
     PÁGINA SOBRE NOSOTROS (nosotros.html) — rojo / negro / blanco
     ============================================================ */
  .nos-hero { position: relative; padding: clamp(150px, 20vh, 240px) 0 clamp(60px, 9vh, 120px); overflow: hidden; }
  .nos-hero::before { content:''; position:absolute; inset:0; pointer-events:none;
    background:
      radial-gradient(900px 560px at 88% -10%, rgba(224,22,22,0.28) 0%, rgba(224,22,22,0) 60%),
      radial-gradient(700px 520px at 0% 8%, rgba(224,22,22,0.10) 0%, rgba(224,22,22,0) 55%); }
  .nos-hero .container { position: relative; z-index: 1; }
  .nos-hero h1 { font-size: clamp(42px, 6.2vw, 104px); font-weight: 800; letter-spacing: -0.035em; line-height: 0.94; margin-top: 22px; color: var(--white); }
  .nos-hero-sub { margin-top: 28px; max-width: 640px; font-size: clamp(17px, 1.6vw, 24px); font-weight: 300; line-height: 1.45; color: rgba(255,255,255,0.6); }

  .nos-intro { padding: clamp(40px, 6vh, 90px) 0; }
  .nos-intro-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 80px; align-items: start; }
  .nos-iso { position: relative; padding: 8px 0; }
  .nos-iso img { width: 76%; max-width: 360px; }
  .nos-iso .estudio-meta { margin-top: 48px; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.18); display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
  .nos-iso .estudio-meta dt { font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 600; color: var(--gallos-red); }
  .nos-iso .estudio-meta dd { margin-top: 8px; font-family: 'JetBrains Mono', monospace; font-size: 13px; letter-spacing: 0.06em; color: rgba(255,255,255,0.85); }
  .nos-body { display: flex; flex-direction: column; gap: 24px; max-width: 640px; font-weight: 300; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.7; color: rgba(255,255,255,0.82); }

  /* banda roja Misión / Visión */
  .nos-mv { background: var(--gallos-red); color: var(--white); padding: clamp(60px, 9vh, 120px) 0; }
  .nos-mv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); }
  .nos-mv-block .ttl { font-family: 'JetBrains Mono', monospace; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; opacity: 0.85; }
  .nos-mv-block p { margin-top: 20px; font-weight: 300; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.65; }

  .nos-cta { padding: clamp(70px, 11vh, 150px) 0; }
  .nos-cta h2 { font-size: clamp(32px, 4.4vw, 76px); font-weight: 700; letter-spacing: -0.03em; line-height: 0.98; color: var(--white); }
  .nos-cta-sub { margin-top: 16px; max-width: 540px; color: var(--muted-gray); font-weight: 300; font-size: 17px; line-height: 1.55; }
  .nos-cta .contact-line { border-color: rgba(255,255,255,0.18); }

  @media (max-width: 900px) {
    .nos-intro-grid { grid-template-columns: 1fr; gap: 44px; }
    .nos-iso { text-align: center; }
    .nos-iso img { width: 52%; }
    .nos-iso .estudio-meta { text-align: left; }
    .nos-mv-grid { grid-template-columns: 1fr; gap: 40px; }
  }

  /* ============================================================
     PÁGINA SERVICIOS (servicios.html)
     ============================================================ */
  /* etiquetas dentro de cada servicio */
  .service .tags { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
  .service .tags span { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
    padding: 7px 13px; color: #333; border-radius: 999px;
    background: linear-gradient(180deg, #ffffff 0%, #ececeb 100%);
    border: 1px solid rgba(13,13,13,0.12);
    box-shadow: 0 2px 4px rgba(13,13,13,0.14), 0 1px 1px rgba(13,13,13,0.10), inset 0 1px 0 rgba(255,255,255,0.95); }

  /* proceso — cómo trabajamos */
  .proceso { background: #0a0a0a; color: var(--white); }
  .proceso .sec-head .rhs { color: rgba(255,255,255,0.6); }
  .proceso .display { color: var(--white); }
  .proceso-grid { margin-top: 64px; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 64px); }
  .proceso-step { border-top: 2px solid var(--gallos-red); padding-top: 28px; }
  .proceso-step .ps-num { font-family: 'JetBrains Mono', monospace; font-size: 13px; letter-spacing: 0.16em; color: var(--gallos-red); }
  .proceso-step h3 { margin-top: 16px; font-size: clamp(24px, 2.2vw, 34px); font-weight: 700; letter-spacing: -0.01em; }
  .proceso-step p { margin-top: 14px; color: rgba(255,255,255,0.65); font-weight: 300; font-size: 16px; line-height: 1.6; }

  /* banda de contacto */
  .srv-cta { background: var(--gallos-red); color: var(--white); padding: clamp(70px, 11vh, 140px) 0; }
  .srv-cta .sec-label { color: #fff; }
  .srv-cta .sec-label::before { background: #fff; }
  .srv-cta h2 { font-size: clamp(32px, 4.4vw, 76px); font-weight: 700; letter-spacing: -0.03em; line-height: 0.98; color: var(--white); }
  .srv-cta-sub { margin-top: 16px; max-width: 540px; color: rgba(255,255,255,0.82); font-weight: 300; font-size: 17px; line-height: 1.55; }
  .srv-cta .contact-line { border-color: rgba(255,255,255,0.35); }
  .srv-cta .contact-line:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
  .srv-cta .contact-line .cl-label { color: rgba(255,255,255,0.75); }
  .srv-cta .contact-line .cl-arr { color: #fff; }
  /* sobre el rojo, los íconos rojos se pierden -> círculo claro + ícono negro */
  .srv-cta .contact-line .cl-ico { color: #0a0a0a; border-color: rgba(0,0,0,0.2); background: rgba(255,255,255,0.92); }
  .srv-cta .contact-line:hover .cl-ico { background: #0a0a0a; color: #fff; }

  @media (max-width: 820px) {
    .proceso-grid { grid-template-columns: 1fr; gap: 32px; }
  }

  /* ============================================================
     PÁGINA CONTACTO (contacto.html) — fondo de polvo interactivo
     ============================================================ */
  .ct-hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center;
    overflow: hidden; padding: clamp(130px, 18vh, 200px) 0 clamp(60px, 9vh, 110px); }
  .ct-hero::after { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: radial-gradient(900px 600px at 75% 20%, rgba(224,22,22,0.10) 0%, rgba(224,22,22,0) 60%); }
  .dust-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none;
    filter: blur(2px); opacity: 1; }
  .ct-hero-inner { position: relative; z-index: 1; }
  .ct-hero h1 { font-size: clamp(40px, 5.6vw, 100px); font-weight: 800; letter-spacing: -0.035em; line-height: 0.96; margin-top: 22px; }
  .ct-hero h1 .red { color: var(--gallos-red); }
  .ct-lead { margin-top: 26px; max-width: 580px; font-weight: 300; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.6; color: rgba(255,255,255,0.72); }

  /* tarjetas de contacto tipo "frost" sobre el polvo */
  .ct-hero .contact-line { border-color: rgba(255,255,255,0.18); background: rgba(10,10,10,0.35);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
  .ct-hero .contact-line:hover { border-color: var(--gallos-red); background: rgba(224,22,22,0.12); }

  .ct-social { margin-top: 44px; display: flex; flex-wrap: wrap; gap: clamp(18px, 3vw, 36px); }
  .ct-social a { font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
    color: rgba(255,255,255,0.7); transition: color 200ms var(--easing); }
  .ct-social a:hover { color: var(--gallos-red); }
  .ct-social a .arr { display: inline-block; transition: transform 240ms var(--easing); }
  .ct-social a:hover .arr { transform: translate(3px, -3px); }

  /* ============================================================
     HERO CON FOTO DE FONDO (servicios / nosotros / contacto)
     La imagen va de fondo y el texto encima.
     ============================================================ */
  .has-photo { position: relative; overflow: hidden; min-height: 100vh; min-height: 100svh;
    display: flex; flex-direction: column; justify-content: flex-end; }
  .has-photo .hero-photo-bg { position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: center; z-index: 0; }
  /* velo oscuro para que el texto se lea y se funda con el fondo de la página */
  .has-photo::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.18) 30%, rgba(0,0,0,0.45) 62%, rgba(0,0,0,0.85) 88%, var(--deep-black) 100%); }
  .has-photo > .container, .has-photo > .ct-hero-inner { position: relative; z-index: 5; }
  .has-photo h1 { text-shadow: 0 2px 30px rgba(0,0,0,0.45); }
  /* el polvo/humo del contacto va sobre la foto, debajo del texto */
  .ct-hero.has-photo .dust-canvas { z-index: 2; }
  /* asegura texto claro del hero sobre la foto */
  .cat-hero.has-photo h1, .cat-hero.has-photo .sec-label + h1 { color: var(--white); }
  .cat-hero.has-photo p { color: rgba(255,255,255,0.82); }

  /* servicios y nosotros tienen fotos MUY oscuras: las aclaramos y suavizamos
     el velo para que la imagen se vea tan bien como la de contacto */
  .cat-hero.has-photo .hero-photo-bg,
  .nos-hero.has-photo .hero-photo-bg { filter: brightness(1.28) contrast(1.04) saturate(1.05); }
  .cat-hero.has-photo::before,
  .nos-hero.has-photo::before {
    background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.10) 34%, rgba(0,0,0,0.32) 64%, rgba(0,0,0,0.80) 90%, var(--deep-black) 100%); }

  /* ============================================================
     REVISIÓN — ajustes añadidos (v13)
     ============================================================ */

  /* ---- CTA centrado (bandas de Servicios / Nosotros) ---- */
  .srv-cta .container, .nos-cta .container { text-align: center; }
  .srv-cta .sec-label, .nos-cta .sec-label { justify-content: center; }
  .srv-cta-sub, .nos-cta-sub { margin-left: auto; margin-right: auto; }
  .contact-direct.is-center { text-align: left; }

  /* ---- Firma gigante del footer: que SIEMPRE quepa completa ---- */
  .megaword { width: 100%; text-align: center; margin: 28px 0 -6px;
    font-size: clamp(30px, 12.6vw, 340px); white-space: nowrap; }
  @media (max-width: 900px) { .footer { padding-top: 72px; } }
  @media (max-width: 600px) {
    .footer-bottom { font-size: 10px; letter-spacing: 0.12em; }
    .megaword { font-size: 12.6vw; }
  }

  /* ============================================================
     SOBRE NOSOTROS — intro redistribuida + pilares + Misión/Visión
     ============================================================ */
  .nos-intro-grid { grid-template-columns: 1.12fr 0.88fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
  .nos-body { max-width: none; gap: clamp(20px, 2.4vw, 28px); }
  .nos-lead { font-size: clamp(21px, 2.3vw, 31px); font-weight: 400; line-height: 1.4;
    letter-spacing: -0.012em; color: #fff; }
  .nos-lead em { font-style: normal; color: var(--gallos-red); }
  .nos-body .estudio-meta { margin-top: clamp(10px, 2vh, 20px); padding-top: clamp(22px, 3vh, 32px);
    border-top: 1px solid rgba(255,255,255,0.16); display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .nos-body .estudio-meta dt { font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 600; color: var(--gallos-red); }
  .nos-body .estudio-meta dd { margin-top: 8px; font-family: 'JetBrains Mono', monospace; font-size: 13px; letter-spacing: 0.05em; color: rgba(255,255,255,0.85); }

  .nos-values-kicker { display: block; margin-bottom: clamp(16px, 2.4vh, 26px); color: var(--gallos-red); }
  .nos-pillars { list-style: none; display: flex; flex-direction: column; }
  .nos-pillars li { display: flex; gap: clamp(14px, 1.6vw, 20px); padding: clamp(18px, 2.4vh, 24px) 0;
    border-top: 1px solid rgba(255,255,255,0.12); transition: padding-left 320ms var(--easing); }
  .nos-pillars li:last-child { border-bottom: 1px solid rgba(255,255,255,0.12); }
  .nos-pillars li:hover { padding-left: 10px; }
  .nos-pillars .np-num { font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.12em;
    color: var(--gallos-red); padding-top: 5px; flex-shrink: 0; }
  .nos-pillars .np-text h3 { font-size: clamp(18px, 1.7vw, 23px); font-weight: 600; letter-spacing: -0.01em; color: #fff; }
  .nos-pillars .np-text p { margin-top: 7px; font-weight: 300; font-size: 14px; line-height: 1.5; color: rgba(255,255,255,0.6); }

  /* banda roja: índice grande + título + texto, mejor jerarquía */
  .nos-mv .sec-label { color: rgba(255,255,255,0.9); }
  .nos-mv .sec-label::before { background: rgba(255,255,255,0.9); }
  .nos-mv-kicker { display: inline-flex; margin-bottom: clamp(36px, 6vh, 64px); }
  .nos-mv-block { display: grid; grid-template-columns: auto 1fr; column-gap: clamp(18px, 2vw, 30px); row-gap: 14px;
    padding-top: clamp(28px, 3.4vh, 40px); border-top: 1px solid rgba(255,255,255,0.32); }
  .nos-mv-idx { grid-row: 1 / span 2; font-size: clamp(42px, 4.6vw, 74px); font-weight: 800;
    line-height: 0.82; letter-spacing: -0.035em; color: rgba(255,255,255,0.45); }
  .nos-mv-block .ttl { align-self: center; opacity: 1; }
  .nos-mv-block p { grid-column: 2; margin-top: 0; }

  @media (max-width: 900px) {
    .nos-intro-grid { grid-template-columns: 1fr; gap: 40px; }
    .nos-body .estudio-meta { grid-template-columns: repeat(3, 1fr); }
  }
  @media (max-width: 480px) {
    .nos-body .estudio-meta { grid-template-columns: 1fr 1fr; gap: 18px; }
  }

  /* ============================================================
     SERVICIOS — más personalidad en tarjetas + timeline "Cómo trabajamos"
     ============================================================ */
  /* tarjetas: acento rojo superior que crece + número translúcido */
  .service { overflow: hidden; }
  .service::before { content: ''; position: absolute; top: -1px; left: 0; width: 100%; height: 2px;
    background: var(--gallos-red); transform: scaleX(0); transform-origin: left; transition: transform 380ms var(--easing); z-index: 1; }
  .service:hover::before { transform: scaleX(1); }
  .service .num { transition: color 280ms var(--easing), transform 380ms var(--easing); transform-origin: left; }
  .service:hover .num { transform: translateY(-2px); }
  .service .tags span { transition: border-color 220ms var(--easing), color 220ms var(--easing),
    background 220ms var(--easing), box-shadow 220ms var(--easing), transform 220ms var(--easing); }
  .service:hover .tags span { border-color: rgba(224,22,22,0.35); }
  .service .tags span:hover { border-color: var(--gallos-red); color: var(--gallos-red);
    background: linear-gradient(180deg, #fff 0%, rgba(224,22,22,0.08) 100%); transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(224,22,22,0.22), 0 2px 3px rgba(13,13,13,0.12), inset 0 1px 0 rgba(255,255,255,0.95); }
  .service .tags span:active { transform: translateY(0);
    box-shadow: 0 1px 2px rgba(13,13,13,0.18), inset 0 1px 2px rgba(13,13,13,0.12); }

  /* timeline: nodos sobre una línea conectora */
  .proceso-grid { position: relative; }
  .proceso-grid::before { content: ''; position: absolute; top: 21px; left: 22px; right: 22px; height: 1px;
    background: linear-gradient(90deg, var(--gallos-red), rgba(224,22,22,0.15)); z-index: 0; }
  .proceso-step { position: relative; border-top: 0; padding-top: 64px; }
  .proceso-step .ps-num { position: absolute; top: 0; left: 0; width: 44px; height: 44px; border-radius: 50%;
    border: 1px solid var(--gallos-red); background: #0a0a0a; color: var(--gallos-red);
    display: grid; place-items: center; font-size: 13px; letter-spacing: 0.04em; z-index: 1;
    transition: background 240ms var(--easing), color 240ms var(--easing); }
  .proceso-step:hover .ps-num { background: var(--gallos-red); color: #fff; }

  @media (max-width: 820px) {
    .proceso-grid::before { display: none; }
    .proceso-step { padding-top: 0; padding-left: 60px; }
    .proceso-step .ps-num { top: 2px; }
  }

  /* ============================================================
     RESPONSIVE — refinamientos generales
     ============================================================ */
  @media (max-width: 600px) {
    .section-cta { margin-top: 56px; }
    .sec-head .rhs { font-size: 15px; }
    .gm-lb-close { top: 16px; right: 16px; width: 42px; height: 42px; }
    .hero-manifesto { margin-top: 22px; }
    .ct-social { gap: 16px 24px; }
  }
  @media (max-width: 400px) {
    .container { padding: 0 18px; }
    .header-inner { padding: 14px 18px; }
  }

  /* ============================================================
     TRANSICIÓN DE PÁGINA — overlay de marca (cubre el flash de
     compilación de Babel al navegar entre páginas)
     ============================================================ */
  /* Por defecto VISIBLE: cubre la página mientras carga (tapa el blip de
     las imágenes y la compilación de Babel). Se desvanece al estar lista. */
  .page-transition {
    position: fixed; inset: 0; z-index: 99999;
    background: var(--deep-black);
    display: grid; place-items: center;
    opacity: 1; visibility: visible;
    transition: opacity 480ms var(--easing);
  }
  /* página lista -> se desvanece y deja de bloquear */
  .page-transition.pt-hidden {
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 480ms var(--easing), visibility 0s linear 480ms;
  }
  /* navegando a otra ruta -> vuelve a cubrir, un poco más rápido */
  .page-transition.pt-show {
    opacity: 1; visibility: visible; pointer-events: auto;
    transition: opacity 340ms var(--easing);
  }
  .pt-logo {
    width: clamp(64px, 8vw, 92px); height: auto;
    will-change: opacity, transform;
    animation: ptPulse 1.25s ease-in-out infinite;
  }
  @keyframes ptPulse {
    0%, 100% { opacity: 0.35; transform: scale(0.92); }
    50%      { opacity: 1;    transform: scale(1); }
  }
  @media (prefers-reduced-motion: reduce) {
    .pt-logo { animation: none; opacity: 0.9; }
    .page-transition, .page-transition.pt-hidden, .page-transition.pt-show {
      transition: opacity 200ms linear;
    }
  }
