/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  /* Warm paper — the site's default surface. Only the hero/nav/splash
     stay deliberately dark (see the override block below); everything
     else reads as a light, printed document. */
  --bg:         #EEE9DB;
  --bg-2:       #E5DFCB;
  --bg-3:       #F8F5EA;
  --bg-4:       #FCFAF3;
  --gold:       #93642A;
  --gold-bright:#AD7830;
  --gold-dim:   rgba(147, 100, 42, 0.12);
  --gold-line:  rgba(147, 100, 42, 0.32);
  --ink:        #221D15;
  --ink-soft:   rgba(34, 29, 21, 0.9);
  --ink-mute:   rgba(34, 29, 21, 0.72);
  --line:       rgba(34, 29, 21, 0.14);

  --display: "Space Grotesk", "Inter", -apple-system, sans-serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:  "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:     cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --container: 1180px;
  --nav-h: 76px;
}

/* Deliberate dark scope — hero (cinematic photo cover), nav (permanent
   dark toolbar) and the splash loader. Everything inside these three
   re-reads the same token names against the old dark palette; nothing
   downstream needs to know it's "in the dark" — it just uses var(--bg),
   var(--ink), var(--gold)… like everywhere else. */
.hero, .nav-mobile, .splash,
.manifesto, .services, .contact {
  --bg:         #0a0906;
  --bg-2:       #121009;
  --bg-3:       #1a160e;
  --bg-4:       #211c12;
  --gold:       #c8a03c;
  --gold-bright:#e8c468;
  --gold-dim:   rgba(200, 160, 60, 0.14);
  --gold-line:  rgba(200, 160, 60, 0.24);
  --ink:        #f2ede1;
  --ink-soft:   rgba(242, 237, 225, 0.9);
  --ink-mute:   rgba(242, 237, 225, 0.68);
  --line:       rgba(242, 237, 225, 0.1);
}

/* Reusable "light island" — re-declares the light palette for content that must
   stay light even nested inside a dark-scoped section (hero stats band, service cards). */
.light-surface {
  --bg-3:       #F8F5EA;
  --gold:       #93642A;
  --gold-bright:#AD7830;
  --gold-line:  rgba(147, 100, 42, 0.32);
  --ink:        #221D15;
  --ink-mute:   rgba(34, 29, 21, 0.72);
  --line:       rgba(34, 29, 21, 0.14);
}

@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 2; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--ink-soft);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.02; letter-spacing: -0.02em; font-family: var(--display); font-weight: 600; color: var(--ink); }
em { font-style: normal; color: var(--gold-bright); font-weight: 600; }
::selection { background: var(--gold); color: var(--bg); }

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

/* =============================================================
   3. Utilities
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--gold); color: var(--bg);
  z-index: 9999; border-radius: 6px; font-weight: 600;
  transition: top .3s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.section { position: relative; padding-block: clamp(4.5rem, 10vw, 8rem); }

/* =============================================================
   4. Typography
   ============================================================= */
.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.9rem, 4.4vw, 3.2rem);
  max-width: 18ch;
  margin-bottom: 1.1rem;
}

.section-lead {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--ink-mute);
  max-width: 56ch;
}

/* =============================================================
   5. Components
   ============================================================= */

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .95rem 1.7rem;
  font-size: .92rem; font-weight: 600; letter-spacing: .01em;
  border-radius: 999px;
  transition: transform .5s var(--ease-soft), box-shadow .5s var(--ease-soft), background-color .35s var(--ease-out), color .35s var(--ease-out), border-color .35s var(--ease-out);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(155deg, var(--gold-bright), var(--gold));
  color: #201804;
  box-shadow: 0 14px 34px -14px rgba(200, 160, 60, .55);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 22px 46px -14px rgba(200, 160, 60, .7); }
.btn-primary:active { transform: translateY(-1px); transition-duration: .12s; }

.btn-outline {
  border: 1px solid var(--gold-line);
  color: var(--ink);
}
.btn-outline:hover { border-color: var(--gold); background: var(--gold-dim); transform: translateY(-2px); }

.btn-ghost { color: var(--ink-soft); padding-inline: 1.3rem; }
.btn-ghost:hover { color: var(--gold-bright); }

/* Magnetic wrapper (see main.js initMagnetic) */
.has-magnetic { display: inline-flex; position: relative; isolation: isolate; }
.magnetic-inner {
  display: inline-flex; align-items: center; justify-content: center; gap: inherit;
  will-change: transform;
  transition: transform .8s var(--ease-soft);
}

/* Card base */
.card {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(1.6rem, 3vw, 2.2rem);
  position: relative;
  isolation: isolate;
  transition: border-color .4s var(--ease-out), transform .1s;
}

/* Image placeholder blocks */
.img-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem;
  aspect-ratio: 21 / 9;
  width: 100%;
  border: 1px dashed var(--gold-line);
  border-radius: 12px;
  background: var(--bg-2);
  color: var(--ink-mute);
  text-align: center;
  padding: 2rem;
}
.img-placeholder-icon { width: 34px; height: 34px; color: var(--gold); opacity: .8; }
.img-placeholder-label {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .05em;
  max-width: 34ch;
}

/* Form fields */
.field { position: relative; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 1.4rem 1rem .55rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-2);
  color: var(--ink);
  font: inherit;
  font-size: .96rem;
  transition: border-color .3s var(--ease-out), background-color .3s var(--ease-out);
}
.field textarea { resize: vertical; min-height: 6.5rem; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--gold);
  background: var(--bg-3);
  outline: none;
}
.field label {
  position: absolute; left: 1rem; top: 1.1rem;
  pointer-events: none; transition: all .25s var(--ease-out);
  color: var(--ink-mute); font-size: .95rem;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label {
  top: .45rem; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold);
}
.field select {
  color: var(--ink-mute);
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  padding-right: 2.4rem;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 1.35rem) center,
    calc(100% - 1rem) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.field select:valid { color: var(--ink); }
.field select::-ms-expand { display: none; }
.field-label-static {
  position: absolute; left: 1rem; top: 1.1rem;
  pointer-events: none; transition: all .25s var(--ease-out);
  color: var(--ink-mute); font-size: .95rem;
}
.field select:focus + .field-label-static,
.field select:valid + .field-label-static {
  top: .45rem; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold);
}
.field-full { grid-column: 1 / -1; }

.field-checkbox { display: flex; align-items: flex-start; gap: .7rem; }
.field-checkbox input[type="checkbox"] {
  width: 17px; height: 17px; flex-shrink: 0; margin-top: .2rem;
  accent-color: var(--gold-bright);
}
.field-checkbox-text {
  font-size: .85rem; line-height: 1.5; color: var(--ink-mute);
}
.field-checkbox-text a { color: var(--gold-bright); text-decoration: underline; text-underline-offset: 2px; }

/* =============================================================
   6. Sections
   ============================================================= */

/* --- Splash --- */
.splash {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--bg);
  display: grid; place-items: center;
  pointer-events: auto;
  transition: opacity .8s var(--ease-out), clip-path 1s var(--ease-soft);
  animation: splashSafety .01s 4.2s forwards;
}
.splash.is-out { opacity: 0; pointer-events: none; clip-path: inset(0 0 100% 0); }
@keyframes splashSafety { to { opacity: 0; pointer-events: none; clip-path: inset(0 0 100% 0); } }
.splash-inner { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.splash-mark { height: 56px; width: auto; }
.splash-line { width: 40px; height: 1px; background: var(--gold-line); position: relative; overflow: hidden; }
.splash-line::after {
  content: ""; position: absolute; inset: 0; background: var(--gold);
  transform: translateX(-100%);
  animation: splashLine 1.6s var(--ease-soft) infinite;
}
@keyframes splashLine { to { transform: translateX(100%); } }

/* --- Nav --- */
.nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 500;
  height: var(--nav-h);
  background: rgba(252, 250, 243, 0.85);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .4s var(--ease-out);
}
.nav.is-scrolled { box-shadow: 0 10px 34px -16px rgba(0,0,0,.35); }
.nav-inner {
  max-width: var(--container);
  margin-inline: auto;
  height: 100%;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; }
.brand-mark { height: 24px; width: auto; }
.brand-word { height: 20px; width: auto; }

.nav-links { display: none; align-items: center; gap: 2rem; }
.nav-link { position: relative; padding: .25rem 0; font-size: .92rem; color: var(--ink-soft); }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease-out);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { display: none; padding: .6rem 1.4rem; font-size: .82rem; }

.nav-burger {
  display: grid; place-items: center; gap: 5px;
  width: 40px; height: 40px;
}
.nav-burger span { width: 20px; height: 1px; background: var(--ink); transition: transform .3s var(--ease-out), opacity .3s var(--ease-out); }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-mobile {
  position: fixed; inset: 0; z-index: 400;
  background: var(--bg);
  display: grid; place-items: center;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .65s var(--ease-soft);
}
.nav-mobile[data-open="true"] { clip-path: inset(0); }
.nav-mobile nav { display: flex; flex-direction: column; align-items: center; gap: 1.8rem; }
.nav-mobile-link { font-family: var(--display); font-weight: 600; font-size: 1.7rem; color: var(--ink); }
.nav-mobile-link:hover { color: var(--gold-bright); }
.nav-mobile-cta { color: var(--gold-bright); font-family: var(--sans); font-size: 1rem; margin-top: 1rem; border: 1px solid var(--gold-line); padding: .8rem 1.6rem; border-radius: 999px; }

/* --- Hero — foto de fondo a página completa, texto a la izquierda encima --- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden; isolation: isolate;
  padding-top: calc(var(--nav-h) + clamp(2.5rem, 6vh, 5rem));
  padding-bottom: clamp(3rem, 6vh, 5rem);
  background: radial-gradient(120% 90% at 50% 0%, #17130b 0%, var(--bg) 62%);
}
.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: #17130b; }
.hero-bg-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: center 25%;
  /* Deliberately light — the photo should read clearly, not disappear
     under a dark wash. Legibility comes mostly from the text-shadow on
     the headline/kicker/sub below, not from darkening the image. */
  filter: contrast(1.04) brightness(.97) saturate(1.05);
  opacity: 0;
  animation: heroBgRotate 20s ease-in-out infinite, heroAmbientZoom 32s ease-in-out infinite alternate;
}
.hero-bg-img:nth-child(1) { animation-delay: 0s, 0s; }
.hero-bg-img:nth-child(2) { animation-delay: -10s, 0s; }
/* Cada imagen: 10s en pantalla + ~1s de crossfade en cada extremo, ciclo total 20s */
@keyframes heroBgRotate {
  0%    { opacity: 0; }
  5%    { opacity: 1; }
  45%   { opacity: 1; }
  50%   { opacity: 0; }
  100%  { opacity: 0; }
}
@keyframes heroAmbientZoom {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to   { transform: scale(1.1) translate3d(-1%, -1%, 0); }
}
.hero-bg-tint {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(10,9,6,.5) 0%, rgba(10,9,6,.2) 40%, rgba(10,9,6,.06) 68%, rgba(10,9,6,.28) 100%),
    linear-gradient(175deg, rgba(10,9,6,.02) 0%, rgba(10,9,6,.18) 68%, var(--bg) 100%);
}
.hero-canvas { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; opacity: .4; mix-blend-mode: screen; }
.hero-grain {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
}

.hero-inner {
  position: relative; z-index: 2;
  text-align: left;
  display: flex; flex-direction: column; align-items: flex-start;
  width: 100%;
  padding-left: clamp(1.5rem, 9vw, 6.5rem);
  padding-right: clamp(1.25rem, 4vw, 2.5rem);
  margin-inline: auto;
  max-width: calc(var(--container) + 5rem);
}
.hero-brand {
  height: 24px; width: auto; margin-bottom: 1rem;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.8)) drop-shadow(0 4px 18px rgba(0,0,0,.55));
}
.hero-kicker {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-bright); margin-bottom: 1.6rem;
  text-shadow: 0 1px 2px rgba(0,0,0,.8), 0 2px 20px rgba(0,0,0,.6);
}
.hero-title {
  font-size: clamp(2.4rem, 5.4vw, 4.8rem);
  line-height: 1;
  max-width: 16ch;
  margin-left: -0.15em;
  text-shadow: 0 2px 4px rgba(0,0,0,.85), 0 8px 40px rgba(0,0,0,.65);
}
.split-word { display: inline-block; will-change: transform, opacity; }
.hero-sub {
  margin-top: 1.6rem;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 40ch;
  text-shadow: 0 1px 3px rgba(0,0,0,.8), 0 4px 22px rgba(0,0,0,.6);
}
.hero-actions { margin-top: 2.4rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: flex-start; }

.hero-stats {
  /* Light band on purpose — the rest of the hero stays dark. .light-surface
     re-declares the light palette locally since this sits inside .hero's dark scope. */
  position: relative; z-index: 2;
  width: 100%;
  margin-top: clamp(2.5rem, 6vh, 4rem);
  background: var(--bg-3);
  padding: clamp(2rem, 5vh, 3rem) clamp(1.5rem, 5vw, 3rem);
  display: flex; flex-wrap: wrap; justify-content: center;
}
.hero-stat {
  text-align: center;
  padding-inline: clamp(1.1rem, 2.4vw, 1.75rem);
  border-left: 1px solid var(--gold-line);
}
.hero-stat:first-child { padding-left: 0; border-left: none; }
.hero-stat:last-child { padding-right: 0; }
.hero-stat dt {
  font-family: var(--display); font-weight: 700; letter-spacing: -.02em;
  font-size: clamp(2.75rem, 5.6vw, 4.75rem); line-height: 1; color: var(--gold-bright);
}
.hero-stat dd { font-family: var(--mono); font-size: .74rem; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-mute); margin-top: .7rem; max-width: 16ch; }

/* --- Manifesto / El décimo hombre --- */
.manifesto { background: var(--bg); position: relative; padding-top: clamp(1.75rem, 4vw, 3.25rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.manifesto-grid {
  display: grid; gap: 2.5rem;
  align-items: stretch;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}
.manifesto-body .section-title em { color: var(--ink); transition: color .35s var(--ease-out); }
.manifesto-body .section-title:hover em { color: var(--gold-bright); }
.manifesto-text { color: var(--ink); margin-top: 1.1rem; max-width: 58ch; font-size: 1.05rem; line-height: 1.45; }

/* Right column — three equal-size pillar rows (thumbnail + text) stacked
   vertically, standing in for the photo that used to fill this column. */
.pillars-mini { display: flex; flex-direction: column; gap: 1.4rem; height: 100%; justify-content: space-between; }
.pillar-card {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: 18px; background: var(--bg-3); border: 2px solid var(--gold-line);
  display: flex; flex-direction: row; align-items: stretch;
  transition: border-color .35s var(--ease-out), box-shadow .35s var(--ease-soft), transform .5s var(--ease-soft);
}
.pillar-card:hover { border-color: var(--gold); box-shadow: 0 22px 44px -22px rgba(0,0,0,.35); transform: translateY(-3px); }
.pillar-card-img { width: 150px; flex-shrink: 0; aspect-ratio: 1 / 1; object-fit: cover; }
.pillar-card-body { padding: 1.3rem 1.5rem; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.pillar-card h3 { font-size: 1.2rem; margin-bottom: .45rem; line-height: 1.2; }
.pillar-card p { color: var(--ink-mute); font-size: .92rem; line-height: 1.4; }

/* --- Ventajas — tarjetas de imagen, referencia snka.es --- */
.advantages { background: var(--bg); padding-top: clamp(2.5rem, 5vw, 4rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.advantages-head { text-align: center; }
.advantages-title { max-width: 30ch; margin-inline: auto; font-size: clamp(1.6rem, 3.4vw, 2.5rem); }

.ventajas-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem;
  margin-top: clamp(2.5rem, 6vw, 4rem);
}
.ventaja-card {
  position: relative; isolation: isolate; overflow: hidden;
  aspect-ratio: 3 / 5;
  border-radius: 18px;
  background: var(--bg-3);
}
.ventaja-card::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.5) 0%, transparent 38%);
}
.ventaja-card-img {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .7s var(--ease-soft);
}
.ventaja-card:hover .ventaja-card-img { transform: scale(1.06); }
.ventaja-card-label {
  position: absolute; z-index: 2; top: 1.1rem; left: 1.1rem; right: 1.1rem;
  color: #fff; font-family: var(--display); font-weight: 600;
  font-size: clamp(.86rem, 1.6vw, 1.05rem); line-height: 1.22;
  text-shadow: 0 2px 14px rgba(0,0,0,.5);
}

/* --- Servicios — tarjetas claras y redondeadas sobre sección oscura --- */
.services { background: var(--bg); padding-top: clamp(2.5rem, 5vw, 4rem); }
.services-grid { display: grid; gap: 1rem; margin-top: clamp(2rem, 5vw, 3rem); }
.service-card {
  position: relative; overflow: hidden;
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: 20px; padding: clamp(1.6rem, 3vw, 2.2rem);
  padding-left: calc(68px + clamp(1.6rem, 3vw, 2.2rem));
  padding-right: calc(190px + clamp(1.6rem, 3vw, 2.2rem));
  display: grid; align-items: stretch;
  transition: transform .45s var(--ease-soft), box-shadow .45s var(--ease-soft), border-color .35s var(--ease-out);
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold-line);
  box-shadow: 0 26px 50px -24px rgba(0,0,0,.4);
}
.service-card:hover .service-index { filter: brightness(1.08); }
.service-index {
  position: absolute; top: 0; left: 0; bottom: 0; z-index: 1;
  width: 68px;
  display: flex; align-items: center; justify-content: center;
  /* Hardcoded to match the "Decisiones a tiempo" em in the section title —
     that text sits outside .light-surface and reads the dark-scope
     --gold-bright (#e8c468), not this section's light-surface token. */
  background: #e8c468;
  font-family: var(--display); color: #201804; font-size: 1.7rem; font-weight: 700; line-height: 1;
}
.service-card-body { min-width: 0; align-self: center; }
.service-card h3 { font-size: 1.3rem; margin-bottom: .5rem; }
.service-card p { color: var(--ink-mute); max-width: 52ch; }
.service-card-img {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 1;
  width: 190px; height: 100%; object-fit: cover;
  transition: transform .7s var(--ease-soft);
}
.service-card:hover .service-card-img { transform: scale(1.08); }
.card-link {
  font-family: var(--mono); font-size: .8rem; color: var(--gold-bright);
  align-self: center; white-space: nowrap;
  transition: gap .3s var(--ease-out);
  display: inline-flex; align-items: center; gap: .3rem;
}
.card-link:hover { gap: .55rem; color: var(--gold-bright); }

/* --- Trayectoria / Timeline vertical editorial, agrupada por década ---
   Ledger style on purpose: full-width rows separated by hairlines, no boxed
   cards — reads as a heritage dossier rather than a feature grid, and uses
   the whole container width instead of being capped to a narrow column. */
.trayectoria { background: var(--bg-2); overflow: visible; padding-top: clamp(2.5rem, 5vw, 4rem); }

.timeline-v {
  position: relative;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-left: clamp(2rem, 5vw, 3.5rem);
}
.timeline-v-spine {
  position: absolute; left: 1rem; top: .5rem; bottom: .5rem; width: 2px;
  background: var(--line);
}
.timeline-v-spine-fill {
  position: absolute; inset: 0; width: 100%;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  transform: scaleY(0); transform-origin: top;
}

/* Era — collapsible chapter. Starts closed; only the decade label (with its
   milestone count) shows until clicked open. */
.timeline-era { margin-top: 3.5rem; }
.timeline-era:first-child { margin-top: 0; }

.timeline-era-label {
  position: relative;
  width: 100%; text-align: left; cursor: pointer;
  display: flex; align-items: center; gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gold-line);
  margin-bottom: .5rem;
}
.timeline-era-node {
  position: absolute; left: -1.5rem; top: .3rem; transform: translateX(-50%);
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg-2); border: 2px solid var(--gold-line);
  transition: background-color .4s var(--ease-out), border-color .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.timeline-era-label.is-active .timeline-era-node {
  background: var(--gold-bright); border-color: var(--gold-bright);
  box-shadow: 0 0 0 5px var(--gold-dim);
}
.timeline-era-label h3 {
  font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -.01em; color: var(--ink);
}
.timeline-era-count {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .04em; color: var(--ink-mute);
}
/* Reuses .timeline-card-plus (flex flow, margin-left:auto — same pattern
   already proven not to collide with anything else in the row). */
.timeline-card-plus.timeline-era-plus { margin-top: 0; }
.timeline-era-label[aria-expanded="true"] .timeline-card-plus::after { transform: translate(-50%, -50%) rotate(0deg); }

/* grid-rows 0fr→1fr instead of max-height against an oversized cap — the
   latter made the reveal feel jerky (see git history). Needs the extra
   -inner wrapper because a grid container with several direct children
   would otherwise create one auto row per child instead of a single
   0fr/1fr track. */
.timeline-era-items {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .6s var(--ease-soft);
}
.timeline-era.is-open .timeline-era-items { grid-template-rows: 1fr; }
.timeline-era-items-inner { overflow: hidden; min-height: 0; display: flex; flex-direction: column; }

/* Milestone rows */
.timeline-v-item {
  position: relative;
  border-top: 1px solid var(--gold-line);
}
.timeline-v-item:first-child { border-top: none; }
.timeline-v-item:last-child { border-bottom: 1px solid var(--gold-line); }
.timeline-v-node {
  position: absolute; left: -1.5rem; top: 2.4rem; transform: translateX(-50%);
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--bg-2); border: 2px solid var(--line);
  transition: background-color .4s var(--ease-out), border-color .4s var(--ease-out), box-shadow .4s var(--ease-out);
  z-index: 2;
}
.timeline-v-item.is-active .timeline-v-node {
  background: var(--gold-bright); border-color: var(--gold-bright);
  box-shadow: 0 0 0 4px var(--gold-dim);
}

.timeline-v-content {
  display: flex; align-items: flex-start; gap: clamp(1.25rem, 3.5vw, 2.75rem);
  padding: clamp(1.5rem, 3vw, 2.25rem) 0;
}

/* Large serif numeral anchors each row and eats up the extra width instead
   of leaving it empty. TODO: swap 01–07 for the real founding year of each
   milestone once the client confirms exact dates. */
.timeline-index {
  flex: 0 0 auto;
  font-family: var(--display); font-weight: 700; line-height: 1;
  font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  color: var(--gold-bright);
  pointer-events: none; user-select: none;
}

.timeline-v-main { flex: 1 1 auto; min-width: 0; }

.timeline-v-toggle {
  width: 100%; text-align: left; cursor: pointer;
  display: flex; align-items: flex-start; gap: 1.5rem;
}
.timeline-v-toggle-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .6rem; }
.timeline-badge {
  display: inline-flex; width: fit-content;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase;
  border-radius: 999px; padding: .3rem .7rem;
}
.timeline-badge-world { background: var(--gold); border: 1px solid var(--gold); color: #201804; font-weight: 600; }
.timeline-badge-europe { color: var(--gold-bright); border: 1px solid var(--gold-line); }
.timeline-badge-national { color: var(--ink-mute); border: 1px solid var(--line); }

.timeline-v-title { font-size: clamp(1.2rem, 1.8vw, 1.5rem); line-height: 1.3; }

/* +/- sits in normal flex flow, pushed right — no absolute positioning, so
   it can never collide with anything else in the row. */
.timeline-card-plus {
  position: relative; flex-shrink: 0; margin-left: auto; margin-top: .2rem;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--gold-line);
  color: var(--gold);
  transition: border-color .3s var(--ease-out), background-color .3s var(--ease-out);
}
.timeline-v-toggle:hover .timeline-card-plus,
.timeline-era-label:hover .timeline-card-plus { border-color: var(--gold); background: var(--gold-dim); }
.timeline-card-plus::before, .timeline-card-plus::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 10px; height: 1px; background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform .3s var(--ease-out);
}
.timeline-card-plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.timeline-v-toggle[aria-expanded="true"] .timeline-card-plus::after { transform: translate(-50%, -50%) rotate(0deg); }

.timeline-v-detail {
  display: grid; grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows .5s var(--ease-soft), opacity .3s var(--ease-out);
}
.timeline-v-detail p {
  overflow: hidden; min-height: 0;
  padding-top: 1rem; max-width: 62ch;
  color: var(--ink-mute); font-size: .96rem;
}
.timeline-v-item.is-open .timeline-v-detail { grid-template-rows: 1fr; opacity: 1; transition-delay: 0s, .12s; }

.timeline-v-current {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold-bright); margin-top: .9rem;
}

/* --- Contacto --- */
.contact { background: var(--bg-2); }
.contact-grid { display: grid; gap: clamp(2.5rem, 6vw, 4.5rem); align-items: start; }
.contact-details { list-style: none; padding: 0; margin-top: 2.2rem; display: flex; flex-direction: column; gap: 1rem; }
.contact-details li { display: flex; flex-direction: column; gap: .2rem; border-top: 1px solid var(--line); padding-top: .8rem; }
.contact-label { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.contact-value { display: inline-block; font-size: 1rem; color: var(--ink-soft); transition: color .3s var(--ease-out); }
a.contact-value:hover { color: var(--gold-bright); }
.contact-value.is-placeholder { color: var(--ink-mute); font-family: var(--mono); font-size: .88rem; }

.cta-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  position: relative;
}
.cta-submit { grid-column: 1 / -1; justify-self: start; margin-top: .5rem; position: relative; overflow: hidden; }
.cta-form-spinner, .cta-form-check {
  position: absolute; inset: 0; display: grid; place-items: center;
  opacity: 0; pointer-events: none;
}
.cta-form.is-sending .cta-form-label { opacity: 0; }
.cta-form.is-sending .cta-form-spinner { opacity: 1; }
.cta-form-spinner::after {
  content: ""; width: 16px; height: 16px;
  border: 2px solid rgba(32,24,4,0.3); border-top-color: #201804;
  border-radius: 50%; animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.cta-form.is-sent .cta-submit { opacity: 0; pointer-events: none; }
.cta-form.is-sent .field { opacity: 0; pointer-events: none; }
.cta-form.is-sent { transition: opacity .3s; }
.cta-form-check { width: 22px; height: 22px; margin-inline: auto; }
.cta-form-check path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .55s var(--ease-out); }

.cta-success {
  grid-column: 1 / -1;
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-soft);
  border-top: 1px solid var(--gold-line); padding-top: 1.4rem; margin-top: .5rem;
}
.cta-success.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.cta-success h3 { font-size: 1.3rem; color: var(--gold-bright); margin-bottom: .4rem; }
.cta-success p { color: var(--ink-mute); }

/* --- Footer --- */
.footer { border-top: 1px solid var(--line); padding-block: 2.5rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.footer-links a { font-size: .88rem; color: var(--ink-mute); }
.footer-links a:hover { color: var(--gold-bright); }
.footer-legal { font-size: .78rem; color: var(--ink-mute); width: 100%; text-align: center; }
.footer-legal a { text-decoration: underline; text-underline-offset: 2px; }
.footer-legal a:hover { color: var(--gold-bright); }
@media (min-width: 720px) { .footer-legal { width: auto; text-align: right; } }

/* =============================================================
   7. Effects
   ============================================================= */

/* Reveal on scroll */
[data-reveal] {
  opacity: 0; transform: translateY(36px);
  transition: opacity .8s var(--ease-soft), transform .8s var(--ease-soft);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }
[data-reveal][data-split] { opacity: 1; transform: none; } /* defensive: split-text handles its own reveal */

/* Section halo accents (subtle constant movement without a full persistent canvas) */
.manifesto::before,
.trayectoria::before {
  /* No horizontal bleed (was -10% left/right) — that pushed past the
     viewport edge and, since overflow-x: clip has flaky Safari support,
     showed up as a stray strip of the body's background on the right. */
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  inset: -30% 0 auto 0; height: 70%;
  background: radial-gradient(45% 60% at 50% 30%, var(--gold-dim), transparent 72%);
  filter: blur(90px);
  opacity: .8;
}
.manifesto-grid, .manifesto .container, .trayectoria .container, .timeline-v { position: relative; z-index: 1; }

/* Magnetic boxes rely on JS toggled classes above */

/* Splash safety already defined in section 6 */

/* =============================================================
   8. Responsive
   ============================================================= */
/* Service cards: the desktop version reserves fixed 68px (index) + 190px
   (image) strips on either side via absolute positioning — on a narrow
   phone that leaves almost no room for the title/text column. Below
   720px, stack instead: image on top (full width), index as a small
   corner badge, text flows normally underneath. */
@media (max-width: 719px) {
  .service-card {
    padding: 1.5rem;
    padding-top: calc(160px + 1.5rem);
  }
  .service-index {
    top: 1rem; left: 1rem; bottom: auto; right: auto; z-index: 2;
    width: 44px; height: 44px; border-radius: 10px;
    font-size: 1.25rem;
  }
  .service-card-img { top: 0; left: 0; right: 0; bottom: auto; width: 100%; height: 160px; }
}

@media (min-width: 540px) {
  .ventajas-grid { grid-template-columns: repeat(3, 1fr); }
  .cta-form { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 720px) {
  .manifesto-grid { grid-template-columns: 1.1fr .9fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-burger { display: none; }
  .contact-grid { grid-template-columns: 1fr 1.1fr; }
  .ventajas-grid { grid-template-columns: repeat(6, 1fr); }
}

/* =============================================================
   9. Reduced-motion — only INTRUSIVE effects, not micro-interactions
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero-canvas { display: none; }
  /* Do NOT disable: reveals, tilt, hover, magnetic, count-up, split-text, marquee (slow loop) */
}

/* =============================================================
   10. Legal pages & cookie banner
   ============================================================= */
.legal-updated { font-family: var(--mono); font-size: .78rem; color: var(--ink-mute); margin-top: 1rem; }

.legal-content { max-width: 72ch; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.legal-content h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.6rem); margin-top: 2.75rem; margin-bottom: 1rem;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 { font-size: 1.05rem; margin-top: 1.75rem; margin-bottom: .6rem; }
.legal-content p { color: var(--ink-soft); margin-bottom: 1rem; }
.legal-content p:last-child { margin-bottom: 0; }
.legal-content ul, .legal-content ol { color: var(--ink-soft); padding-left: 1.25rem; margin-bottom: 1rem; display: flex; flex-direction: column; gap: .4rem; }
.legal-content strong { color: var(--ink); font-weight: 600; }
.legal-content a { color: var(--gold-bright); text-decoration: underline; text-underline-offset: 2px; }
.legal-content table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: .9rem; }
.legal-content th, .legal-content td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line); }
.legal-content th { font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-mute); }

/* Cookie banner — injected by main.js initCookieBanner(). Today the site sets
   zero non-essential cookies, so this is an informational acknowledgement
   rather than a real accept/reject choice. When analytics/pixels are added
   later, upgrade this same banner to a real Aceptar/Rechazar per AEPD rules
   (equally prominent, no pre-ticked boxes) gated behind window.tmConsent. */
.cookie-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 9000;
  max-width: 640px; margin-inline: auto;
  background: var(--bg-4); border: 1px solid var(--gold-line);
  border-radius: 16px; box-shadow: 0 24px 60px -20px rgba(0,0,0,.35);
  padding: 1.25rem 1.5rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem;
  transform: translateY(140%); opacity: 0;
  transition: transform .5s var(--ease-soft), opacity .4s var(--ease-out);
}
.cookie-banner.is-visible { transform: translateY(0); opacity: 1; }
.cookie-banner p { font-size: .85rem; color: var(--ink-mute); flex: 1 1 260px; margin: 0; }
.cookie-banner a { color: var(--gold-bright); text-decoration: underline; text-underline-offset: 2px; }
.cookie-banner-actions { display: flex; gap: .75rem; flex-shrink: 0; }
.cookie-banner-actions .btn { padding: .65rem 1.3rem; font-size: .82rem; }
