/* Base compartida por las dos webs: sites/campaign/styles.css y sites/invest/styles.css son el mismo archivo.
   Si cambias uno, copia el otro (scripts/comprobar.mjs avisa si difieren). */
:root {
  --orange: #F69A64;
  --dark: #3D3D3D;
  --beige: #EDE9E4;
  --light-bold: #DBD5CE;
  --heading: #3A3A3A;
  --text: #000;
  --teal: #33C8DC;
  --font-head: "Jost", "Century Gothic", system-ui, sans-serif;
  --font-body: "Lato", system-ui, sans-serif;
  --wrap: 1200px;
  --narrow: 720px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--beige); color: var(--text); font: 400 18px/1.7 var(--font-body); }
@media (min-width: 768px) { body { font-size: 19px; } }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; color: var(--heading); line-height: 1.2; margin: 0 0 .6em; }
h2 { font-size: clamp(30px, 4.2vw, 45px); }
h3 { font-size: clamp(24px, 3vw, 32px); }
p { margin: 0 0 1em; }
strong { font-weight: 700; }

.skip { position: absolute; left: -9999px; top: 0; background: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: var(--narrow); margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }
section { padding: 72px 0; }
@media (min-width: 768px) { section { padding: 96px 0; } }

/* Temas de sección (como en Squarespace) */
.t-white { background: var(--beige); }
.t-light-bold { background: var(--light-bold); }
.t-dark { background: var(--dark); color: #fff; }
.t-dark h2, .t-dark h3 { color: #fff; }
.t-dark .accent, .accent { color: var(--orange); }
.t-bright { background: var(--orange); }
.t-bright h2, .t-bright h3 { color: var(--heading); }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 28px;
  border-radius: 999px; background: var(--orange); color: #000; font: 700 15px/1.2 var(--font-body);
  text-decoration: none; border: 0; cursor: pointer; transition: transform .15s ease, filter .15s ease; }
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-dark { background: var(--dark); color: var(--orange); }
.btn-black { background: #000; color: #fff; }
.actions { margin-top: 32px; }

/* Cabecera sobre el hero */
.site-header { position: absolute; inset: 0 0 auto 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.site-header.solid { position: static; background: var(--dark); }

/* Hero con vídeo de YouTube de fondo */
.hero { position: relative; min-height: min(100vh, 860px); display: flex; align-items: center; overflow: hidden;
  background: var(--dark) center / cover no-repeat; color: #fff; padding: 120px 0 64px; }
.hero-video { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-video iframe { position: absolute; top: 50%; left: 50%; border: 0; width: max(100%, 177.78vh); height: max(100%, 56.25vw);
  transform: translate(-50%, -50%); opacity: 0; transition: opacity .8s ease; }
.hero-video iframe.on { opacity: 1; }
.hero-content { position: relative; z-index: 2; width: 100%; }

/* Titular estilo "etiqueta" (antes era una imagen) */
.label-title { margin: 0 0 28px; font: 500 clamp(26px, 4.4vw, 52px)/1.15 var(--font-head); text-transform: uppercase; color: var(--heading); }
.label-title .line { display: inline-block; background: var(--orange); padding: .08em .35em; margin-bottom: .18em; }
.label-sub { display: inline-block; font: 500 clamp(16px, 2vw, 24px)/1.3 var(--font-head); padding: .15em .45em; }

/* Rejillas */
.grid-2 { display: grid; gap: 40px; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: 1fr 1fr; gap: 48px; } .grid-2.middle { align-items: center; } }
.grid-3 { display: grid; gap: 40px; }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.card-img { aspect-ratio: 3 / 2; width: 100%; object-fit: cover; margin-bottom: 24px; }

/* Acordeón */
.accordion details { border-top: 1px solid currentColor; border-bottom: 1px solid currentColor; margin-bottom: 24px; }
.accordion summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 0; min-height: 48px; font: 500 18px/1.35 var(--font-head); color: var(--heading); }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 1.5px solid; border-bottom: 1.5px solid;
  transform: rotate(45deg) translateY(-4px); transition: transform .2s ease; }
.accordion details[open] summary::after { transform: rotate(225deg) translateY(-2px); }
.accordion details > div { padding: 0 0 18px; }

/* Formularios */
.form-row { display: grid; gap: 16px; }
@media (min-width: 600px) { .form-row.two { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-size: 15px; margin-bottom: 4px; }
.field label small { color: #555; }
.field input, .field textarea { width: 100%; min-height: 48px; font: inherit; font-size: 17px; padding: 10px 12px;
  border: 0; border-bottom: 1px solid #555; background: rgba(255,255,255,.35); }
.field textarea { min-height: 120px; resize: vertical; }
.form-status { min-height: 1.7em; margin-top: 12px; font-weight: 700; }
.form-status.error { color: #9b1c1c; }
.t-dark .form-status.error { color: #ffb4a8; }
.hp { position: absolute; left: -9999px; }
.newsletter { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 32px; }
.newsletter input { flex: 1 1 240px; max-width: 320px; min-height: 48px; border: 0; padding: 10px 16px; font: inherit; font-size: 16px; }

/* Pie */
.site-footer { padding: 64px 0 40px; }
.social { display: flex; justify-content: center; gap: 12px; margin-top: 40px; }
.social a { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; }
.social svg { width: 20px; height: 20px; fill: currentColor; }

/* Cinta de prensa */
.marquee { overflow: hidden; white-space: nowrap; }
.marquee-track { display: inline-flex; gap: 2.5em; animation: marquee 30s linear infinite; padding-left: 2.5em;
  font: 500 clamp(20px, 2.4vw, 28px)/1.4 var(--font-head); color: var(--orange); }
.marquee a { text-decoration: none; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee { white-space: normal; text-align: center; } .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; padding: 0; } .marquee-track [aria-hidden] { display: none; } }

/* Carrusel horizontal (socios, testimonios) */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: min(85%, 340px); gap: 24px; overflow-x: auto;
  scroll-snap-type: x mandatory; padding: 8px 24px 24px; scrollbar-width: thin; }
.rail > * { scroll-snap-align: start; }
.rail-controls { display: flex; justify-content: center; gap: 12px; margin-top: 8px; }
.rail-controls button { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--orange); color: #000; font-size: 22px; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
