/* ===== Paleta oficial de marca (Guía de Estilo · Perros de Cine) ===== */
:root {
  --cream: #F5F0E8;
  --sand: #EFE3C8;
  --paper: #FFFFFF;
  --ink: #1A1A1A;
  --ink-soft: #55524C;
  --terracotta: #C6A664;
  --terracotta-dark: #AD8B54;
  --gold-light: #E8D5A3;
  --olive: #1A1A1A;
  --olive-dark: #000000;
  --line: #E8DCC0;
  --radius: 18px;
  --shadow: 0 10px 30px -12px rgba(62, 45, 25, .25);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Nunito Sans", system-ui, -apple-system, sans-serif;
  --brand-serif: "Playfair Display", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 62px;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
h1 em { font-style: italic; color: var(--terracotta); font-weight: 500; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.eyebrow {
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--terracotta); margin-bottom: .8em;
}
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 34em; }

/* ===== Botones ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.6em; border-radius: 999px; font-weight: 700; text-decoration: none;
  transition: background .2s, color .2s, transform .2s, box-shadow .2s; border: 2px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--terracotta); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--terracotta-dark); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--cream); }
.btn-light { background: var(--cream); color: var(--olive-dark); }
.btn-light:hover { background: #fff; }

/* ===== Cabecera ===== */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 239, .9); backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .55em; text-decoration: none; font-family: var(--brand-serif); font-weight: 700; font-size: 1.25rem; letter-spacing: .03em; text-transform: uppercase; }
.brand-logo { height: 48px; width: auto; object-fit: contain; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { text-decoration: none; font-weight: 600; color: var(--ink-soft); transition: color .2s; }
.nav a:hover { color: var(--terracotta); }
.nav .nav-cta { background: var(--olive); color: #fff; padding: .5em 1.2em; border-radius: 999px; }
.nav .nav-cta:hover { background: var(--olive-dark); color: #fff; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .25s, opacity .25s; }

/* ===== Hero a pantalla completa ===== */
.hero {
  position: relative; min-height: 92vh; display: flex; align-items: stretch; justify-content: center;
  padding: 34px 0 80px; overflow: hidden; isolation: isolate; text-align: center;
}
.hero-media { position: absolute; inset: 0; z-index: -1; margin: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(26,26,26,.72) 0%, rgba(26,26,26,.3) 20%, rgba(26,26,26,.05) 34%, rgba(26,26,26,.05) 56%, rgba(26,26,26,.55) 100%);
}
.hero-content {
  position: relative; max-width: 760px; width: 100%; color: var(--cream); margin: 0 auto;
  display: flex; flex-direction: column; justify-content: space-between;
  opacity: 0; transform: translateY(20px);
  animation: heroTextIn .9s ease .6s forwards;
}
.hero-content h1 { color: var(--cream); text-shadow: 0 4px 26px rgba(0,0,0,.65); font-size: clamp(3.1rem, 7vw, 4.9rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.hero-content .btn-ghost { border-color: var(--cream); color: var(--cream); }
.hero-content .btn-ghost:hover { background: var(--cream); color: var(--ink); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Texto intermitente, encajado sobre la pantalla de croma blanca de la foto */
.hero-quote {
  position: absolute; z-index: 1;
  left: 35%; top: 28%;
  transform: translate(-50%, -50%);
  width: min(34%, 360px);
  margin: 0;
  font-family: var(--serif); font-style: italic; font-weight: 600;
  font-size: clamp(1.3rem, 2.7vw, 1.95rem); line-height: 1.3;
  color: var(--terracotta-dark); text-align: center;
  text-shadow: 0 1px 2px rgba(255,255,255,.4);
  animation: heroBlink 3s ease-in-out 1.7s infinite;
}

@keyframes heroTextIn {
  to { opacity: 1; transform: none; }
}
@keyframes heroBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: .12; }
}
.hero-quote-mobile { display: none; }
@media (max-width: 700px) {
  .hero-quote:not(.hero-quote-mobile) { display: none; }
  .hero-quote.hero-quote-mobile {
    display: block; position: static; transform: none; width: auto; max-width: 320px;
    margin: 14px auto 0; padding: 10px 16px; border-radius: 12px;
    background: rgba(250, 246, 239, .9); color: #000; text-shadow: none;
    font-size: clamp(1.15rem, 4.6vw, 1.5rem);
  }
  .hero-quote {
    left: 50%; top: auto; bottom: 30%; transform: translateX(-50%);
    width: 85%; max-width: 340px;
    font-size: clamp(1.3rem, 5vw, 1.7rem);
    text-shadow: 0 3px 16px rgba(0,0,0,.65);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-content { opacity: 1; transform: none; animation: none; }
  .hero-quote { animation: none; opacity: 1; }
}

@media (max-width: 900px) {
  .hero { min-height: 78vh; padding: 56px 0; }
}

/* ===== Secciones ===== */
.section { padding: 96px 0; }
.section-tint { background: var(--sand); }
.section-green { background: var(--olive); color: var(--cream); }
.section-green .eyebrow { color: var(--gold-light); }
.section-green p { color: rgba(250, 246, 239, .88); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-head p:last-child { color: var(--ink-soft); }

/* Tarjetas de servicios */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px; text-decoration: none; transition: transform .25s, box-shadow .25s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card p { color: var(--ink-soft); flex: 1; }
.card-icon {
  width: 52px; height: 52px; border-radius: 14px; background: var(--sand);
  display: grid; place-items: center; margin-bottom: 20px;
}
.card-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--terracotta); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card-link { font-weight: 700; color: var(--olive); }

/* Bloques imagen + texto */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split-reverse .split-photo { order: 2; }
.split-photo { margin: 0; }
.split-photo img { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 5; object-fit: cover; box-shadow: var(--shadow); }
.split-text p { color: var(--ink-soft); }
.section-green .split-text p { color: rgba(250, 246, 239, .88); }

.welfare-note {
  display: flex; align-items: flex-start; gap: 14px; margin: 24px 0;
  background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--terracotta);
  border-radius: 12px; padding: 18px 20px;
}
.welfare-note p { margin: 0; color: var(--ink-soft) !important; }
.welfare-note strong { color: var(--ink); }
.welfare-icon {
  width: 40px; height: 40px; border-radius: 50%; background: var(--sand);
  display: grid; place-items: center; flex: none;
}
.welfare-icon svg { width: 20px; height: 20px; fill: none; stroke: var(--terracotta); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.credits { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.credits-title { font-weight: 700; color: var(--ink) !important; margin-bottom: .6em; }
.credits-note { font-size: .95rem; }
.tags { list-style: none; padding: 0; margin: 0 0 1em; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { background: var(--paper); border: 1px solid var(--line); padding: .3em .9em; border-radius: 999px; font-size: .92rem; }

.features { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 14px; }
.features li {
  background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--olive);
  border-radius: 12px; padding: 14px 18px;
}
.features strong { display: block; font-family: var(--serif); font-size: 1.1rem; }
.features span { color: var(--ink-soft); font-size: .95rem; }

blockquote {
  margin: 28px 0 0; font-family: var(--serif); font-style: italic; font-size: 1.2rem;
  color: var(--terracotta-dark); padding-left: 20px; border-left: 3px solid var(--terracotta);
}

.checks { list-style: none; padding: 0; margin: 20px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.checks li { position: relative; padding-left: 28px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%;
  background: #E8D5A3 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A1A1A' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.quote-line { font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--gold-light) !important; margin: 24px 0 28px; }

/* Galería */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 230px; grid-auto-flow: dense; gap: 14px; }
.gallery-item { padding: 0; border: 0; border-radius: 14px; overflow: hidden; cursor: zoom-in; background: var(--sand); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s, opacity .6s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.gi-wide { grid-column: span 2; }
.gi-tall { grid-row: span 2; }
.gi-big { grid-column: span 2; grid-row: span 2; }

/* Participaciones: carrete de cine horizontal, en movimiento continuo */
.carousel-section {
  background: var(--ink); color: var(--cream); min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; overflow: hidden; padding-top: 72px; padding-bottom: 72px;
}
.carousel-section .eyebrow { color: var(--gold-light); }
.carousel-section h2 { color: var(--cream); }
.carousel-section .section-head { margin-bottom: 40px; }

.filmstrip {
  position: relative; width: 100vw; margin-left: calc(50% - 50vw);
}
/* Perforaciones del carrete, arriba y abajo de toda la tira */
.filmstrip-perf {
  height: 20px;
  background-image: repeating-linear-gradient(90deg, var(--gold-light) 0 16px, transparent 16px 38px);
  background-position: center;
  opacity: .8;
}
.filmstrip-track {
  display: flex; align-items: center; gap: 16px; width: max-content;
  padding: 18px 16px; background: #000;
  animation: filmstripScroll 50s linear infinite;
}
.filmstrip:hover .filmstrip-track { animation-play-state: paused; }
@keyframes filmstripScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.filmstrip-frame {
  flex: none; width: 200px; height: 300px; margin: 0;
  background: var(--cream); border: 6px solid var(--cream);
  border-radius: 4px; box-shadow: 0 10px 28px -8px rgba(0,0,0,.6), 0 0 0 1px var(--terracotta);
  overflow: hidden; display: grid; place-items: center;
}
.filmstrip-frame img { width: 100%; height: 100%; object-fit: contain; background: var(--ink); display: block; }
@media (prefers-reduced-motion: reduce) {
  .filmstrip-track { animation: none; overflow-x: auto; }
}
@media (max-width: 560px) {
  .filmstrip-frame { width: 128px; height: 192px; border-width: 4px; }
  .filmstrip-track { gap: 10px; padding: 12px 10px; }
  .filmstrip-perf { height: 14px; background-image: repeating-linear-gradient(90deg, var(--gold-light) 0 10px, transparent 10px 26px); }
}

/* Contacto */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.contact p { color: var(--ink-soft); }
.contact-list { display: grid; gap: 14px; }
.contact-item {
  display: flex; align-items: center; gap: 16px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 22px; text-decoration: none; transition: transform .2s, box-shadow .2s;
}
a.contact-item:hover { transform: translateX(4px); box-shadow: var(--shadow); }
.contact-item strong { display: block; }
.contact-item small { color: var(--ink-soft); font-size: .95rem; }
.contact-icon { width: 46px; height: 46px; border-radius: 50%; background: var(--terracotta); display: grid; place-items: center; flex: none; }
.contact-icon svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Pie */
.footer { background: var(--ink); color: rgba(250, 246, 239, .75); padding: 40px 0; font-size: .95rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.footer p { margin: 0; }
.footer .brand { color: var(--cream); }

/* Barra de contacto rápido */
.quick-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex;
  background: var(--ink); box-shadow: 0 -8px 24px rgba(0,0,0,.25);
}
.quick-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 10px 6px 12px; text-decoration: none; color: var(--cream);
  font-size: .72rem; font-weight: 700; letter-spacing: .01em; transition: color .2s, background .2s;
}
.quick-item + .quick-item { border-left: 1px solid rgba(245, 240, 232, .12); }
.quick-item:hover { color: var(--terracotta); background: rgba(245, 240, 232, .06); }
.quick-item svg {
  width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Visor de fotos */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(30, 26, 20, .92); display: grid; place-items: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 88vh; max-width: 100%; border-radius: 10px; }
.lightbox-close { position: absolute; top: 14px; right: 18px; background: none; border: 0; color: #fff; font-size: 2.6rem; line-height: 1; cursor: pointer; }

/* Aparición suave al hacer scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===== Tablet y móvil ===== */
@media (max-width: 900px) {
  .split, .contact { grid-template-columns: 1fr; gap: 40px; }
  .split-reverse .split-photo { order: 0; }
  .split-photo img { aspect-ratio: 4 / 3; }
  #representacion .split-photo img { aspect-ratio: 4 / 5; object-position: center 15%; }
  .cards { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .section { padding: 72px 0; }

  .nav-toggle { display: block; }
  .nav {
    position: fixed; top: 72px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--line); padding: 8px 24px 20px;
    transform: translateY(-120%); transition: transform .3s; z-index: -1;
  }
  .nav.open { transform: none; }
  .nav a { padding: 14px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav .nav-cta { margin-top: 14px; text-align: center; border-bottom: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 560px) {
  .container { padding: 0 16px; }
  body { font-size: 16px; }
  .hero { padding: 48px 0 56px; }
  .btn-call { display: none; }
  .checks { grid-template-columns: 1fr; }
  .gallery { grid-auto-rows: 170px; gap: 10px; }
  .gi-tall { grid-row: span 2; }
  .gi-wide, .gi-big { grid-column: span 2; grid-row: span 2; }
  .gallery-item img { object-position: center 25%; }
  .footer-inner { flex-direction: column; text-align: center; }
}
