/* Isla Film Lab — sistema de diseño
   Paleta extraída del logotipo (rojo #A92120 sobre blanco). */

:root {
  --color-red: #a92120;
  --color-red-dark: #7c1918;
  --color-red-tint: #f4e1df;
  --color-ink: #201c19;
  --color-ink-soft: #4a433c;
  --color-paper: #faf6ee;
  --color-paper-alt: #f1e8d8;
  --color-border: #e3d7bf;
  --color-panel: #ffffff;
  --focus: #1d6fd9;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --max-width: 75rem;
  --space-1: .5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --radius: .9rem;
  --radius-sm: .5rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--color-ink);
  background: var(--color-paper);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .6em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
.container { width: min(calc(100% - 2.5rem), var(--max-width)); margin-inline: auto; }
.section { padding-block: clamp(3rem, 7vw, 6rem); }
.section--tight { padding-block: clamp(2rem, 4vw, 3.5rem); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 1rem; top: -5rem; z-index: 9999;
  background: var(--color-panel); padding: .75rem 1.1rem; border-radius: var(--radius-sm);
  border: 2px solid var(--color-red); font-weight: 700; text-decoration: none; transition: top .15s ease;
}
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.eyebrow {
  display: inline-block; font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  letter-spacing: .12em; font-size: .8rem; color: var(--color-red); margin: 0 0 .75em;
}
.eyebrow--on-dark { color: #f4c9c7; }

/* Botones */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.35rem; border-radius: 999px; border: 2px solid var(--color-ink);
  background: transparent; color: var(--color-ink); text-decoration: none; font-weight: 700;
  cursor: pointer; min-height: 44px; transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.button:hover { background: var(--color-ink); color: #fff; }
.button-primary { background: var(--color-red); border-color: var(--color-red); color: #fff; }
.button-primary:hover { background: var(--color-red-dark); border-color: var(--color-red-dark); color: #fff; }
.button-on-dark { border-color: #fff; color: #fff; }
.button-on-dark:hover { background: #fff; color: var(--color-ink); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: color-mix(in srgb, var(--color-paper) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner { min-height: 4.75rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--color-ink); }
.brand-logo { border-radius: 50%; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; }
.nav-toggle {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  width: 44px; height: 44px; border-radius: var(--radius-sm); border: 1px solid var(--color-border);
  background: var(--color-panel); cursor: pointer;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--color-ink); position: relative; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle-bar::before { position: absolute; top: -6px; }
.nav-toggle-bar::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

.primary-nav { display: none; }
.primary-nav.is-open {
  display: flex; flex-direction: column; gap: 1.25rem; position: absolute; inset: 100% 0 auto 0;
  background: var(--color-paper); padding: 1.5rem 1.25rem 2rem; border-bottom: 1px solid var(--color-border);
  box-shadow: 0 12px 24px rgba(32,28,25,.08);
}
.primary-nav ul { display: flex; flex-direction: column; gap: .25rem; }
.primary-nav a { text-decoration: none; font-weight: 600; padding: .6rem .25rem; display: block; }
.primary-nav a[aria-current="page"] { color: var(--color-red); }
.primary-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.nav-actions { display: flex; flex-direction: column; gap: .9rem; align-items: stretch; }
.lang-switcher {
  align-self: flex-start; display: inline-flex; align-items: center; gap: .35rem;
  font-weight: 800; font-size: .82rem; letter-spacing: .03em;
}
.lang-switcher .lang-current { color: var(--color-red); }
.lang-switcher .lang-sep { color: var(--color-border); }
.lang-switcher a { text-decoration: none; color: var(--color-ink-soft); }
.lang-switcher a:hover { color: var(--color-ink); text-decoration: underline; text-underline-offset: 3px; }

@media (min-width: 62rem) {
  .nav-toggle { display: none; }
  .primary-nav {
    display: flex; flex-direction: row; align-items: center; gap: 2rem; position: static;
    background: none; padding: 0; border: 0; box-shadow: none;
  }
  .primary-nav ul { flex-direction: row; gap: 1.75rem; }
  .primary-nav a { padding: .25rem 0; position: relative; }
  .primary-nav a[aria-current="page"]::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--color-red);
  }
  .primary-nav a:hover { text-decoration: none; }
  .primary-nav a:not([aria-current="page"]):hover::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--color-ink-soft);
  }
  .nav-actions { flex-direction: row; align-items: center; gap: 1.25rem; }
}

/* Hero */
.hero {
  background: var(--color-ink);
  background-image:
    radial-gradient(circle at 15% 20%, rgba(169,33,32,.55), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(169,33,32,.35), transparent 50%);
  color: #fff; position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .12; pointer-events: none; z-index: 1;
  background-image: radial-gradient(rgba(255,255,255,.9) 1px, transparent 1px);
  background-size: 3px 3px;
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(18,14,13,.92) 0%, rgba(78,20,19,.62) 42%, rgba(18,14,13,.3) 78%);
}
.hero-inner { position: relative; z-index: 2; display: grid; gap: 2rem; padding-block: clamp(3.5rem, 9vw, 6.5rem); }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); color: #fff; max-width: 18ch; }
.hero p.lede { font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 46ch; color: #ece3dd; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .5rem; }

/* Sección genérica con fondo alterno */
.section--alt { background: var(--color-paper-alt); }
.section-head { max-width: 42rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.section-head p { color: var(--color-ink-soft); font-size: 1.05rem; }

/* Grid de servicios */
.card-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62rem) { .card-grid { grid-template-columns: repeat(4, 1fr); } }
.service-card {
  background: var(--color-panel); border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 1.75rem 1.5rem; display: flex; flex-direction: column; gap: .85rem;
}
.icon {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 48px; height: 48px; border-radius: 50%; background: var(--color-red-tint); color: var(--color-red);
}
.icon svg { width: 55%; height: 55%; }
.service-card h3 { font-size: 1.15rem; margin-bottom: .25rem; }
.service-card p { color: var(--color-ink-soft); font-size: .96rem; margin-bottom: .5rem; }
.service-card .read-more { font-weight: 700; text-decoration: none; color: var(--color-red); margin-top: auto; }

/* Split (texto + imagen) */
.split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 56rem) { .split { grid-template-columns: 1fr 1fr; } }
.split--reverse .split-media { order: -1; }
@media (min-width: 56rem) { .split--reverse .split-media { order: 2; } }

/* Foto real dentro de un bloque split */
.split-photo { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.split-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.split-photo--top img { object-position: 50% 22%; }

/* Placeholder de imagen (banco/IA pendiente de sustituir) */
.img-placeholder {
  position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3;
  background: linear-gradient(155deg, #2a2422, var(--color-ink) 60%);
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: #f1e6df; border: 1px solid rgba(255,255,255,.08);
}
.img-placeholder::before {
  content: ""; position: absolute; inset: 0; opacity: .18;
  background-image: radial-gradient(rgba(255,255,255,.9) 1px, transparent 1px);
  background-size: 4px 4px;
}
.img-placeholder-inner { position: relative; padding: 1.5rem; display: grid; gap: .6rem; justify-items: center; }
.img-placeholder svg { width: 34px; height: 34px; opacity: .85; }
.img-placeholder .ph-label { font-weight: 700; font-size: .92rem; }
.img-placeholder .ph-tag {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #d8b9b6;
  border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: .2rem .6rem;
}
.img-placeholder--square { aspect-ratio: 1 / 1; }
.img-placeholder--wide { aspect-ratio: 16 / 9; }

/* Galería */
.gallery-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 40rem) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }

/* Galería tipo mosaico (Pinterest): cada imagen conserva su proporción natural */
.masonry { column-count: 2; column-gap: 1.1rem; }
@media (min-width: 40rem) { .masonry { column-count: 3; } }
@media (min-width: 62rem) { .masonry { column-count: 4; } }
.masonry-item { break-inside: avoid; margin-bottom: 1.1rem; }
.masonry-item img { width: 100%; height: auto; display: block; border-radius: var(--radius); }

/* CTA banda */
.cta-band { background: var(--color-red); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
.cta-band p { color: #f6dcda; max-width: 40rem; margin-inline: auto; }
.cta-band .hero-actions { justify-content: center; }

/* Info de contacto y horario */
.info-list { display: grid; gap: .9rem; margin-bottom: 1.5rem; }
.info-list li { display: flex; gap: .75rem; align-items: flex-start; }
.info-list .icon { width: 28px; height: 28px; background: none; border-radius: 0; }
.info-list a { text-decoration: none; font-weight: 600; }
.info-list a:hover { text-decoration: underline; }

/* Formulario */
.form-grid { display: grid; gap: 1.1rem; }
.form-row { display: grid; gap: .4rem; }
.form-row label { font-weight: 700; font-size: .92rem; }
.form-row input, .form-row textarea {
  padding: .8rem .9rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  background: var(--color-panel); width: 100%;
}
.form-row input:invalid:not(:placeholder-shown) { border-color: var(--color-red); }
.form-row textarea { min-height: 9rem; resize: vertical; }
.form-check { display: flex; gap: .65rem; align-items: flex-start; font-size: .92rem; }
.form-check input { width: 1.15rem; height: 1.15rem; margin-top: .2rem; flex: none; }
.form-check a { text-decoration: underline; }
.field-error { color: var(--color-red-dark); font-size: .85rem; min-height: 1.1em; }
.hp-field { position: absolute; left: -9999px; top: -9999px; }
.alert { padding: 1rem 1.15rem; border-radius: var(--radius-sm); border: 1px solid var(--color-border); margin-bottom: 1.5rem; }
.alert-success { background: #eef7ec; border-color: #bfe3b6; color: #2e6b26; }
.alert-error { background: #fbebea; border-color: #f0bcb9; color: #8a2b27; }

/* Contenido legal */
.prose { max-width: 42rem; }
.prose h2 { font-size: 1.3rem; margin-top: 2rem; }
.prose ul { list-style: disc; padding-left: 1.4rem; margin-bottom: 1em; }
.prose li { margin-bottom: .35em; }

/* Footer */
.site-footer { background: var(--color-ink); color: #ede4dc; }
.footer-grid {
  display: grid; gap: 2.25rem; padding-block: clamp(2.5rem, 5vw, 4rem);
  grid-template-columns: 1fr;
}
@media (min-width: 40rem) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62rem) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.footer-brand { display: grid; gap: .6rem; align-content: start; }
.footer-brand img { border-radius: 50%; }
.footer-brand p { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; margin: 0; }
.footer-brand address { font-style: normal; color: #c9beb4; font-size: .92rem; }
.site-footer ul { display: grid; gap: .55rem; }
.site-footer a { text-decoration: none; color: #ded4c9; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-contact-links { margin-bottom: .9rem; }
.footer-hours p { margin: 0 0 .35em; color: #ded4c9; font-size: .94rem; }
.footer-funding-panel {
  background: #fff; border-radius: var(--radius); padding: 1.1rem 1.4rem;
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1.1rem;
}
.footer-funding-panel img { height: 55px; width: auto; max-width: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); }
.footer-bottom-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .6rem 1.5rem; padding-block: 1.1rem;
}
.footer-bottom-inner p { margin: 0; font-size: .85rem; color: #b8ad9f; }
.site-footer .footer-legal-links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.footer-legal-links a { font-size: .85rem; }

/* Banner de cookies */
.cookie-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 2000;
  background: var(--color-panel); border: 1px solid var(--color-border); border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(32,28,25,.18); max-width: 42rem; margin-inline: auto;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner-inner { padding: 1.25rem 1.4rem; display: grid; gap: 1rem; }
.cookie-banner p { margin: 0; font-size: .92rem; color: var(--color-ink-soft); }
.cookie-banner-actions { display: flex; gap: .75rem; justify-content: flex-end; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important; animation-duration: .01ms !important;
    animation-iteration-count: 1 !important; transition-duration: .01ms !important;
  }
}
