/* ==========================================================================
   Terramar18° · Hoja de estilos
   Paleta y tipografía según la propuesta de marca:
   Azul Marino #0c2d5c · Naranja Terra #f97316 · Gris Acero #a6a6a7 · Negro · Blanco
   Títulos: Montserrat ExtraBold Italic · Cuerpo: Montserrat Regular
   ========================================================================== */

/* ---------- Fuentes (alojadas localmente, subset latino) ---------- */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/montserrat-variable.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: italic;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/montserrat-800-italic.woff2") format("woff2");
}

/* ---------- Variables ---------- */
:root {
  --navy: #0c2d5c;
  --navy-deep: #081d3d;
  --orange: #f97316;
  --orange-hover: #fb8a3c;
  --orange-ink: #c2410c;      /* naranja con contraste AA sobre fondo claro (texto pequeño) */
  --steel: #a6a6a7;
  --black: #000;
  --white: #fff;
  --ink: #16233a;             /* texto principal */
  --muted: #4a5871;           /* texto de apoyo (AA sobre blanco y sobre --bg-alt) */
  --bg-alt: #f1f5f9;
  --line: #dbe3ee;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(12, 45, 92, .10);
  --shadow-lg: 0 24px 60px rgba(8, 29, 61, .28);
  --header-h: 68px;
  --container: 1160px;

  --f-title: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --f-body: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img, video, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-underline-offset: .18em; }
a:hover { color: var(--orange-ink); }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.15; color: var(--navy); }
h1, h2 { font-family: var(--f-title); font-weight: 800; font-style: italic; letter-spacing: -.01em; }
h3 { font-weight: 700; }
button { font: inherit; cursor: pointer; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.narrow { max-width: 820px; }
.center { text-align: center; margin-top: 40px; }

.ico { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--orange); color: var(--navy); font-weight: 700;
  padding: 10px 16px; border-radius: 8px; text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 46px; padding: 12px 22px;
  border: 2px solid transparent; border-radius: 999px;
  font-weight: 700; font-size: .95rem; line-height: 1.2; text-decoration: none; text-align: center;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-lg { min-height: 54px; padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }
/* Naranja = acción. Texto azul marino (contraste 4.8:1, cumple AA) */
.btn-accent { background: var(--orange); color: var(--navy); box-shadow: 0 8px 22px rgba(249, 115, 22, .35); }
.btn-accent:hover { background: var(--orange-hover); color: var(--navy); }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-deep); color: var(--white); }
.btn-ghost { border-color: rgba(255, 255, 255, .55); color: var(--white); background: transparent; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); color: var(--white); }
.btn-ghost-dark { border-color: var(--navy); color: var(--navy); background: var(--white); }
.btn-ghost-dark:hover { background: var(--bg-alt); color: var(--navy); }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .2s, border-color .2s;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(12, 45, 92, .12); border-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 16px; }
.brand { display: block; flex: none; }
.brand img { height: 34px; width: auto; }

.menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border: 0; border-radius: 12px;
  background: var(--bg-alt); color: var(--navy);
}
.menu-toggle .ico { width: 26px; height: 26px; }
.menu-toggle .ico-close, .menu-toggle[aria-expanded="true"] .ico-open { display: none; }
.menu-toggle[aria-expanded="true"] .ico-close { display: block; }

/* Menú móvil (desplegable) */
.nav {
  position: absolute; left: 0; right: 0; top: var(--header-h);
  display: none; flex-direction: column; gap: 8px;
  padding: 12px 20px 24px; background: var(--white);
  border-bottom: 1px solid var(--line); box-shadow: 0 20px 30px rgba(12, 45, 92, .12);
}
.nav.is-open { display: flex; }
.nav a:not(.btn) { display: block; padding: 12px 4px; font-weight: 600; color: var(--navy); text-decoration: none; border-bottom: 1px solid var(--line); }
.nav a:not(.btn):hover { color: var(--orange-ink); }
.nav .btn { margin-top: 8px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--white);
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(249, 115, 22, .22), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(59, 130, 246, .20), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
}
/* Líneas de latitud decorativas */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 64px);
  mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent);
}
.hero-grid { position: relative; display: grid; gap: 40px; padding-block: 44px 28px; }
.eyebrow { display: inline-flex; align-items: center; gap: .55em; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--orange); }
.eyebrow-dark { color: var(--orange-ink); }
.hero h1 { color: var(--white); font-size: clamp(2.1rem, 7.4vw, 3.6rem); margin: 14px 0 18px; }
.hero h1 .accent { color: var(--orange); }
.lead { font-size: clamp(1.02rem, 2.6vw, 1.2rem); max-width: 34em; color: #dbe6f5; }
.lead .accent { color: var(--orange); font-weight: 700; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-note { margin-top: 16px; font-size: .86rem; color: #b9c9e0; }

.hero-visual { position: relative; max-width: 340px; margin-inline: auto; width: 100%; display: flex; justify-content: center; }
.hero-logo { position: relative; width: 78%; max-width: 300px; filter: drop-shadow(0 24px 48px rgba(0, 0, 0, .35)); }
.hero-logo::before {
  content: ""; position: absolute; inset: -18%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(249, 115, 22, .22), transparent 72%);
}
.hero-logo img { width: 100%; }

.trust { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-block: 44px 34px; }
.trust li { display: flex; align-items: center; gap: 10px; font-size: .84rem; line-height: 1.3; padding: 12px 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px; }
.trust li:last-child { grid-column: 1 / -1; justify-content: center; }
.trust .ico { color: var(--orange); width: 26px; height: 26px; }

/* ---------- Secciones ---------- */
.section { padding-block: 88px; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--navy-deep); color: #dbe6f5; }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-navy { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%); color: #dbe6f5; }
.section-navy h2, .section-navy h3 { color: var(--white); }

.section-head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 5vw, 2.5rem); margin: 10px 0 14px; }
.section-head p:last-child { color: var(--muted); font-size: 1.05rem; }
.section-head p + p { margin-top: 6px; }
.services-list { font-weight: 700; color: var(--navy); font-size: 1.08rem; }

/* ---------- Especificaciones de trailers ---------- */
.trailer-specs { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: -18px auto 44px; }
.trailer-specs li {
  padding: 10px 20px; border: 2px solid var(--line); border-radius: 999px;
  font-size: .92rem; color: var(--ink); background: var(--bg-alt);
}
.trailer-specs strong { color: var(--navy); }

/* ---------- Tarjetas de servicio ---------- */
.cards { display: grid; gap: 20px; }
.card { display: flex; flex-direction: column; padding: 28px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(12, 45, 92, .16); }
.card-icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin-bottom: 18px; border-radius: 14px; background: var(--navy); color: var(--orange); }
.card-icon .ico { width: 28px; height: 28px; }
.card h3 { font-size: 1.3rem; margin-bottom: 10px; }
.card > p { color: var(--muted); }
.checks { margin: 18px 0 22px; display: grid; gap: 8px; }
.checks li { position: relative; padding-left: 28px; font-size: .95rem; font-weight: 500; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .28em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230c2d5c' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.checks-light li { color: #eaf1fb; }
.card-link { margin-top: auto; display: inline-flex; align-items: center; gap: .5em; font-weight: 700; color: var(--navy); text-decoration: none; padding: 6px 0; }
.card-link .ico { transition: transform .15s; }
.card-link:hover .ico { transform: translateX(4px); }
.card-link:hover { color: var(--orange-ink); }

/* ---------- Pasos ---------- */
.steps { display: grid; gap: 18px; counter-reset: step; }
.steps li { position: relative; padding: 24px 24px 24px 84px; background: var(--white); border-radius: var(--radius); border: 1px solid var(--line); }
.step-n {
  position: absolute; left: 22px; top: 22px; width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 50%; background: var(--navy); color: var(--orange);
  font-family: var(--f-title); font-style: italic; font-weight: 800; font-size: 1.4rem;
}
.steps h3 { font-size: 1.1rem; margin-bottom: 4px; }
.steps p { color: var(--muted); font-size: .96rem; }

/* ---------- Galería ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.thumb { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; background: var(--navy); box-shadow: var(--shadow); }
.thumb img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform .35s ease; }
.thumb:hover img { transform: scale(1.05); }

/* Video dentro de la galería: mismo recuadro que las fotos, pero con controles nativos. */
.thumb-video { cursor: default; }
.thumb-video video { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; background: #000; }

/* Galería de la portada (.gallery-work) y galería completa (.gallery-masonry): sin recortes.
   Móvil: 2 columnas tipo mosaico, cada foto con su proporción natural.
   Desde 640px, portada: filas de 5 donde el ancho de cada foto es proporcional a su forma
   (clase ar-*), así todas las de una fila miden lo mismo de alto, llenan el ancho y no se recorta nada.
   Desde 640px, galería completa: mosaico de 4 columnas. */
.gallery-work, .gallery-masonry { display: block; columns: 2; column-gap: 14px; }
.gallery-work > li, .gallery-masonry > li { break-inside: avoid; margin-bottom: 14px; }
.gallery-work > .row-break { display: none; }
.gallery-work .thumb img, .gallery-masonry .thumb img { height: auto; aspect-ratio: auto; }
.gallery-work .thumb-video video, .gallery-masonry .thumb-video video { height: auto; aspect-ratio: var(--ar, 0.5625); object-fit: cover; }
.gallery-masonry .gallery-loading, .gallery-masonry .gallery-error { column-span: all; }

/* Proporción (ancho/alto) de cada foto o video: la fija el servidor con estas clases porque la CSP no permite style="". ar-56 = 0.56 */
.ar-40 { --ar: 0.4; }
.ar-41 { --ar: 0.41; }
.ar-42 { --ar: 0.42; }
.ar-43 { --ar: 0.43; }
.ar-44 { --ar: 0.44; }
.ar-45 { --ar: 0.45; }
.ar-46 { --ar: 0.46; }
.ar-47 { --ar: 0.47; }
.ar-48 { --ar: 0.48; }
.ar-49 { --ar: 0.49; }
.ar-50 { --ar: 0.5; }
.ar-51 { --ar: 0.51; }
.ar-52 { --ar: 0.52; }
.ar-53 { --ar: 0.53; }
.ar-54 { --ar: 0.54; }
.ar-55 { --ar: 0.55; }
.ar-56 { --ar: 0.56; }
.ar-57 { --ar: 0.57; }
.ar-58 { --ar: 0.58; }
.ar-59 { --ar: 0.59; }
.ar-60 { --ar: 0.6; }
.ar-61 { --ar: 0.61; }
.ar-62 { --ar: 0.62; }
.ar-63 { --ar: 0.63; }
.ar-64 { --ar: 0.64; }
.ar-65 { --ar: 0.65; }
.ar-66 { --ar: 0.66; }
.ar-67 { --ar: 0.67; }
.ar-68 { --ar: 0.68; }
.ar-69 { --ar: 0.69; }
.ar-70 { --ar: 0.7; }
.ar-71 { --ar: 0.71; }
.ar-72 { --ar: 0.72; }
.ar-73 { --ar: 0.73; }
.ar-74 { --ar: 0.74; }
.ar-75 { --ar: 0.75; }
.ar-76 { --ar: 0.76; }
.ar-77 { --ar: 0.77; }
.ar-78 { --ar: 0.78; }
.ar-79 { --ar: 0.79; }
.ar-80 { --ar: 0.8; }
.ar-81 { --ar: 0.81; }
.ar-82 { --ar: 0.82; }
.ar-83 { --ar: 0.83; }
.ar-84 { --ar: 0.84; }
.ar-85 { --ar: 0.85; }
.ar-86 { --ar: 0.86; }
.ar-87 { --ar: 0.87; }
.ar-88 { --ar: 0.88; }
.ar-89 { --ar: 0.89; }
.ar-90 { --ar: 0.9; }
.ar-91 { --ar: 0.91; }
.ar-92 { --ar: 0.92; }
.ar-93 { --ar: 0.93; }
.ar-94 { --ar: 0.94; }
.ar-95 { --ar: 0.95; }
.ar-96 { --ar: 0.96; }
.ar-97 { --ar: 0.97; }
.ar-98 { --ar: 0.98; }
.ar-99 { --ar: 0.99; }
.ar-100 { --ar: 1; }
.ar-101 { --ar: 1.01; }
.ar-102 { --ar: 1.02; }
.ar-103 { --ar: 1.03; }
.ar-104 { --ar: 1.04; }
.ar-105 { --ar: 1.05; }
.ar-106 { --ar: 1.06; }
.ar-107 { --ar: 1.07; }
.ar-108 { --ar: 1.08; }
.ar-109 { --ar: 1.09; }
.ar-110 { --ar: 1.1; }
.ar-111 { --ar: 1.11; }
.ar-112 { --ar: 1.12; }
.ar-113 { --ar: 1.13; }
.ar-114 { --ar: 1.14; }
.ar-115 { --ar: 1.15; }
.ar-116 { --ar: 1.16; }
.ar-117 { --ar: 1.17; }
.ar-118 { --ar: 1.18; }
.ar-119 { --ar: 1.19; }
.ar-120 { --ar: 1.2; }
.ar-121 { --ar: 1.21; }
.ar-122 { --ar: 1.22; }
.ar-123 { --ar: 1.23; }
.ar-124 { --ar: 1.24; }
.ar-125 { --ar: 1.25; }
.ar-126 { --ar: 1.26; }
.ar-127 { --ar: 1.27; }
.ar-128 { --ar: 1.28; }
.ar-129 { --ar: 1.29; }
.ar-130 { --ar: 1.3; }
.ar-131 { --ar: 1.31; }
.ar-132 { --ar: 1.32; }
.ar-133 { --ar: 1.33; }
.ar-134 { --ar: 1.34; }
.ar-135 { --ar: 1.35; }
.ar-136 { --ar: 1.36; }
.ar-137 { --ar: 1.37; }
.ar-138 { --ar: 1.38; }
.ar-139 { --ar: 1.39; }
.ar-140 { --ar: 1.4; }
.ar-141 { --ar: 1.41; }
.ar-142 { --ar: 1.42; }
.ar-143 { --ar: 1.43; }
.ar-144 { --ar: 1.44; }
.ar-145 { --ar: 1.45; }
.ar-146 { --ar: 1.46; }
.ar-147 { --ar: 1.47; }
.ar-148 { --ar: 1.48; }
.ar-149 { --ar: 1.49; }
.ar-150 { --ar: 1.5; }
.ar-151 { --ar: 1.51; }
.ar-152 { --ar: 1.52; }
.ar-153 { --ar: 1.53; }
.ar-154 { --ar: 1.54; }
.ar-155 { --ar: 1.55; }
.ar-156 { --ar: 1.56; }
.ar-157 { --ar: 1.57; }
.ar-158 { --ar: 1.58; }
.ar-159 { --ar: 1.59; }
.ar-160 { --ar: 1.6; }

/* ---------- Video / trabajos ---------- */
.work { display: grid; gap: 40px; align-items: center; }
.work-copy h2 { font-size: clamp(1.7rem, 5vw, 2.5rem); margin: 10px 0 16px; }
.work-copy p { color: #c9d8ee; font-size: 1.05rem; }
.work-copy .checks { margin-bottom: 28px; }
.work-video { display: flex; justify-content: center; }
.phone { width: min(300px, 80vw); padding: 10px; border-radius: 38px; background: #0b0f16; border: 2px solid #3a4658; box-shadow: var(--shadow-lg); }
.phone video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 28px; background: #000; }

/* ---------- Nosotros ---------- */
.about { display: grid; gap: 36px; align-items: center; }
.about-copy h2 { font-size: clamp(1.7rem, 5vw, 2.5rem); margin: 10px 0 18px; }
.about-copy p { color: var(--muted); font-size: 1.05rem; }
.about-copy p + p { margin-top: 14px; }
.about-copy strong { color: var(--navy); }
.about-copy h3 { font-size: 1.15rem; margin: 26px 0 8px; }
.signature { font-family: var(--f-title); font-style: italic; font-weight: 800; font-size: 1.3rem; letter-spacing: .12em; text-transform: uppercase; color: var(--orange-ink) !important; margin-top: 22px !important; }
.about-emblem { max-width: 380px; margin-inline: auto; }
.audience { display: grid; gap: 20px; margin-top: 56px; }
.aud { padding: 28px; background: var(--bg-alt); border-radius: var(--radius); border-left: 6px solid var(--orange); }
.aud h3 { font-size: 1.2rem; margin-bottom: 8px; }
.aud p { color: var(--muted); }
.card-icon-navy { background: var(--navy); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; font-weight: 700; color: var(--navy); cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ico { transition: transform .2s; color: var(--orange-ink); }
.faq details[open] summary .ico { transform: rotate(180deg); }
.faq details[open] { border-color: var(--navy); }
.faq details p { padding: 0 20px 20px; color: var(--muted); }

/* ---------- Contacto ---------- */
.contact { display: grid; gap: 40px; align-items: start; }
.contact-copy h2 { font-size: clamp(1.7rem, 5vw, 2.5rem); margin: 10px 0 16px; }
.contact-copy > p { color: #c9d8ee; font-size: 1.05rem; }
.contact-list { display: grid; gap: 14px; margin-top: 28px; }
.contact-list li { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.contact-list .ico { color: var(--orange); width: 24px; height: 24px; }
.contact-list a { color: var(--white); text-decoration: none; }
.contact-list a:hover { color: var(--orange); text-decoration: underline; }

.quote { padding: 28px 24px; background: var(--white); color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.quote h3 { font-size: 1.3rem; margin-bottom: 18px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field-row { display: grid; gap: 0 14px; }
.field label { font-size: .86rem; font-weight: 700; color: var(--navy); }
.req { color: var(--orange-ink); }
.field input, .field select {
  width: 100%; min-height: 48px; padding: 10px 14px;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--white); border: 2px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
.field input:hover, .field select:hover { border-color: #b7c4d8; }
.field input:focus, .field select:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(12, 45, 92, .14); }
.field .is-invalid { border-color: #b91c1c; }
.form-error { margin: 4px 0 14px; padding: 10px 14px; border-radius: var(--radius-sm); background: #fef2f2; color: #991b1b; font-size: .9rem; font-weight: 600; }
.form-note { margin-top: 14px; font-size: .8rem; color: var(--muted); text-align: center; }

/* ---------- Pie ---------- */
.site-footer { background: #050f22; color: #b9c9e0; padding-top: 56px; }
.footer-grid { display: grid; gap: 32px; padding-bottom: 36px; }
.footer-brand img { width: 220px; height: auto; margin-bottom: 14px; }
.footer-brand p { max-width: 30em; font-size: .95rem; }
.footer-h { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--white); font-style: normal; margin: 0 0 14px; }
.site-footer ul { display: grid; gap: 8px; }
.site-footer a { color: #dbe6f5; text-decoration: none; }
.site-footer a:hover { color: var(--orange); text-decoration: underline; }
.social { display: flex; gap: 12px; margin-top: 6px; }
.social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.social a:hover { background: var(--orange); color: var(--navy); text-decoration: none; }
.footer-bottom { display: flex; flex-direction: column; gap: 6px; padding-block: 20px 96px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .82rem; }

/* ---------- Barra fija móvil ---------- */
.mobile-bar {
  position: fixed; inset: auto 0 0 0; z-index: 90; display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); box-shadow: 0 -8px 24px rgba(12, 45, 92, .16);
}
.mobile-bar .btn { min-height: 48px; padding: 10px 14px; }

/* ---------- Visor de fotos ---------- */
.lightbox { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 94vh; overflow: visible; }
.lightbox::backdrop { background: rgba(5, 15, 34, .88); }
.lightbox img { max-width: 96vw; max-height: 90vh; width: auto; height: auto; margin-inline: auto; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.lb-close { position: absolute; top: -14px; right: -6px; z-index: 2; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--orange); color: var(--navy); }

/* ---------- Animación de entrada ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Páginas internas (404, privacidad) ---------- */
.page { padding-block: 64px 96px; }
.page h1 { font-size: clamp(1.9rem, 6vw, 2.8rem); margin-bottom: 20px; }
.page h2 { font-size: 1.35rem; font-style: normal; font-weight: 700; margin: 32px 0 10px; }
.page p, .page li { color: var(--muted); }
.page p + p { margin-top: 12px; }
.page ul { list-style: disc; padding-left: 22px; display: grid; gap: 6px; margin-top: 8px; }
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 48px 20px; }
.notfound .code { font-family: var(--f-title); font-style: italic; font-weight: 800; font-size: clamp(4rem, 20vw, 8rem); line-height: 1; color: var(--navy); }
.notfound .code span { color: var(--orange-ink); }
.notfound p { margin: 14px auto 28px; max-width: 30em; color: var(--muted); }

/* ==========================================================================
   Tablet ≥ 640px
   ========================================================================== */
@media (min-width: 640px) {
  .container { padding-inline: 28px; }
  .trust { grid-template-columns: repeat(3, 1fr); }
  .trust li { flex-direction: column; text-align: center; gap: 8px; padding: 16px 12px; }
  .trust li:last-child { grid-column: auto; }
  .steps { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(4, 1fr); }
  .gallery-masonry { columns: 4; }
  .gallery-work { columns: auto; display: flex; flex-wrap: wrap; column-gap: 14px; row-gap: 0; }
  .gallery-work > li { flex: var(--ar, 0.72) 1 0px; min-width: 0; margin-bottom: 14px; aspect-ratio: var(--ar, 0.72); }
  .gallery-work > .row-break { display: block; flex: 0 0 100%; height: 0; margin: 0; aspect-ratio: auto; }
  .gallery-work .thumb, .gallery-work .thumb img, .gallery-work .thumb-video video { height: 100%; }
  .gallery-work .thumb img, .gallery-work .thumb-video video { object-fit: cover; aspect-ratio: auto; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .audience { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

/* ==========================================================================
   Escritorio ≥ 960px
   ========================================================================== */
@media (min-width: 960px) {
  :root { --header-h: 76px; }
  .brand img { height: 40px; }

  .hero-grid { grid-template-columns: 1.15fr .85fr; align-items: center; gap: 64px; padding-block: 72px 36px; }
  .hero-visual { margin-inline: 0 auto; max-width: 420px; }
  .hero-logo { max-width: 360px; }
  .section { padding-block: 116px; }
  .cards { grid-template-columns: repeat(3, 1fr); gap: 26px; }
  .steps { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .steps li { padding: 84px 22px 26px; }
  .step-n { left: 22px; top: 22px; }
  .work { grid-template-columns: 1.2fr .8fr; gap: 72px; }
  .about { grid-template-columns: 1.3fr .7fr; gap: 72px; }
  .contact { grid-template-columns: 1fr 1.05fr; gap: 72px; }
  .quote { padding: 36px; }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; }
  .footer-bottom { padding-bottom: 28px; }
}

/* ==========================================================================
   Menú horizontal ≥ 1100px
   (el menú de texto completo necesita más ancho que el resto del diseño
   de escritorio; por debajo de este punto se sigue usando el menú hamburguesa,
   que ya funciona bien en tablet y en pantallas de laptop angostas)
   ========================================================================== */
@media (min-width: 1100px) {
  .menu-toggle { display: none; }
  .nav { position: static; display: flex; flex-direction: row; align-items: center; gap: 24px; padding: 0; background: none; border: 0; box-shadow: none; }
  .nav ul { display: flex; gap: 16px; }
  .nav ul li { flex-shrink: 0; }
  .nav a:not(.btn) { padding: 8px 0; border: 0; font-size: .9rem; position: relative; white-space: nowrap; }
  .nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: var(--orange); transform: scaleX(0); transition: transform .2s; }
  .nav a:not(.btn):hover::after { transform: scaleX(1); }
  .nav .btn { margin: 0; min-height: 44px; padding: 10px 18px; font-size: .88rem; }
  .mobile-bar { display: none; }
}

/* ---------- Preferencias del usuario ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .btn:hover, .card:hover { transform: none; }
}

@media print {
  .site-header, .mobile-bar, .menu-toggle, .lightbox, .quote { display: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  body { color: #000; }
}

/* Sprite SVG oculto (sin estilos en línea, compatible con CSP estricta) */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.nf-title { font-size: 1.6rem; }
.nf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* Los "eyebrows" no deben heredar el color de párrafo de su bloque */
.about-copy .eyebrow { color: var(--orange-ink); }
.work-copy .eyebrow, .contact-copy .eyebrow { color: var(--orange); }
.section-navy .quote h3 { color: var(--navy); }
.page ul + p { margin-top: 12px; }

/* ---------- Aviso corto (toast) ---------- */
.toast {
  position: fixed; left: 50%; bottom: 90px; z-index: 200;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  padding: 12px 20px; border-radius: 999px; max-width: calc(100vw - 32px);
  background: var(--navy-deep); color: var(--white); font-weight: 700; font-size: .88rem;
  box-shadow: var(--shadow-lg); transition: opacity .2s ease, transform .2s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 960px) { .toast { bottom: 32px; } }

/* ---------- Página: Galería completa ---------- */
.galeria-hero { padding-block: 44px 40px; }
.galeria-hero h1 { color: var(--white); font-size: clamp(1.8rem, 6vw, 2.6rem); margin: 10px 0 14px; }
.galeria-hero p { max-width: 46em; color: #c9d8ee; font-size: 1.05rem; margin-bottom: 22px; }
.gallery-cta-text { max-width: 34em; margin: 36px auto 18px; color: var(--muted); }

/* ---------- Página: Reservar trailer ---------- */
.rental-flag {
  margin: 0 0 20px; padding: 12px 16px; border-radius: var(--radius-sm);
  background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; font-size: .9rem; font-weight: 600;
}
.rental-summary {
  margin: 4px 0 18px; padding: 16px 18px; border-radius: var(--radius-sm);
  background: var(--bg-alt); border: 1px solid var(--line);
}
.rental-summary-note { color: var(--muted); font-size: .92rem; }
.rental-line { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: .92rem; color: var(--ink); }
.rental-line + .rental-line { border-top: 1px dashed var(--line); }
.rental-total { font-weight: 800; color: var(--navy); font-size: 1.05rem; border-top: 2px solid var(--line) !important; margin-top: 4px; padding-top: 10px; }
.page .hero-actions { justify-content: center; margin-top: 24px; }
.hero-actions-center { justify-content: center; }

/* ---------- Selección de trailers (checkboxes) en Reservar ---------- */
.field-label { display: block; font-size: .86rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.field-hint { margin: 6px 0 0; font-size: .82rem; color: var(--muted); }
.trailer-options { display: grid; gap: 10px; }
.trailer-option {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 2px solid var(--line); border-radius: var(--radius-sm); cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.trailer-option:hover { border-color: #b7c4d8; }
.trailer-option:has(input:checked) { border-color: var(--navy); background: var(--bg-alt); }
.trailer-option input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--navy); flex: none; }
.trailer-option-text { font-size: .95rem; color: var(--ink); font-weight: 600; }
.gallery-loading, .gallery-error { grid-column: 1 / -1; text-align: center; padding: 40px 20px; color: var(--muted); }

/* ---------- Página: Políticas y términos ---------- */
.politica-subtitulo { margin-top: 28px; }
.politicas-lista { margin-top: 28px; }
.politica-texto { padding: 0 20px 20px; }
.politica-texto p { color: var(--muted); }
.politica-texto p + p { margin-top: 10px; }
.politica-texto ul { list-style: disc; padding-left: 20px; display: grid; gap: 8px; margin: 12px 0; color: var(--muted); }
.rental-docs-note { margin: -8px 0 18px; }
.rental-acepto { margin: 4px 0 18px; align-items: flex-start; }
.rental-acepto input[type="checkbox"] { margin-top: 3px; }
.rental-acepto a { color: var(--navy); font-weight: 700; }


/* ---------- Enlaces dentro de texto: siempre subrayados ----------
   Un enlace que solo se distingue por el color no cumple accesibilidad
   (WCAG 1.4.1): quien no distingue colores no lo ve como enlace. */
.page p a, .page li a, .politica-texto a, .form-note a, .field-hint a, .rental-acepto a, .footer-bottom a {
  text-decoration: underline; text-underline-offset: 2px;
}
.page p a, .page li a, .politica-texto a { color: var(--navy); font-weight: 600; }
.page p a:hover, .page li a:hover, .politica-texto a:hover { color: var(--orange-ink); }

/* Botón con aspecto de enlace (por ejemplo "Configuración de cookies" en el pie) */
.link-btn {
  background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit;
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.site-footer .link-btn { color: #dbe6f5; }
.site-footer .link-btn:hover { color: var(--orange); }

/* ---------- Aviso de cookies (lo crea assets/js/analytics-init.js) ---------- */
.cookie-banner {
  position: fixed; inset: auto 0 0 0; z-index: 200;
  background: var(--navy-deep); color: var(--white);
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 30px rgba(5, 15, 34, .35);
}
.cookie-banner-inner { max-width: var(--container); margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.cookie-banner p { margin: 0; font-size: .92rem; line-height: 1.5; color: #e6eefb; }
.cookie-banner a { color: var(--white); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; flex: none; }
.cookie-actions .btn { min-height: 46px; padding: 10px 22px; }
@media (min-width: 760px) {
  .cookie-banner-inner { flex-direction: row; align-items: center; justify-content: space-between; gap: 28px; }
}
@media (prefers-reduced-motion: no-preference) {
  .cookie-banner { animation: cookie-in .25s ease-out; }
  @keyframes cookie-in { from { transform: translateY(100%); } to { transform: translateY(0); } }
}
@media print { .cookie-banner { display: none !important; } }

/* ---------- Tabla de las páginas legales (cookies) ---------- */
.tabla-scroll { overflow-x: auto; margin: 14px 0 6px; border-radius: var(--radius-sm); }
.tabla-legal { width: 100%; min-width: 680px; border-collapse: collapse; font-size: .88rem; }
.tabla-legal caption { text-align: left; padding: 0 0 8px; font-weight: 700; color: var(--ink); }
.tabla-legal th, .tabla-legal td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; color: var(--muted); }
.tabla-legal thead th { background: var(--bg-alt); color: var(--ink); }
.tabla-legal tbody th { color: var(--ink); font-weight: 700; }

/* Título del formulario de reserva: es el primer h2 de la página (el h1 es "Reserva tu trailer"),
   con el aspecto que tenía como h3. */
.quote-title { font-family: var(--f-body); font-style: normal; font-weight: 700; letter-spacing: 0; font-size: 1.3rem; margin-bottom: 18px; }

/* ---------- Foco visible en campos de formulario ----------
   Antes los campos quitaban el contorno y solo quedaba una sombra muy tenue
   (casi invisible en las casillas). Con teclado hay que ver claramente dónde
   está el foco (WCAG 2.4.7 / 2.4.11). */
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible,
.trailer-option input:focus-visible {
  outline: 3px solid var(--orange); outline-offset: 2px;
}

/* ---------- Resumen de la política de cancelación junto al botón de reservar ---------- */
.rental-cancel { margin: 16px 0 8px; padding: 12px 16px; background: var(--bg-alt); border-radius: var(--radius-sm); font-size: .88rem; color: var(--muted); }
.rental-cancel strong { color: var(--ink); }
.rental-cancel ul { list-style: disc; padding-left: 20px; margin: 6px 0; display: grid; gap: 2px; }
.rental-cancel a { color: var(--navy); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
