/* CAEFF landing — colores del logo (rojo y azul de la bandera) sobre fondo oscuro */
:root {
  --bg: #0b0f1a;
  --bg-alt: #0f1524;
  --surface: #151c2e;
  --surface-2: #1b2438;
  --line: rgba(255, 255, 255, .08);
  --text: #eef1f7;
  --muted: #9aa4b8;
  --red: #e8232e;
  --red-2: #ff4b3e;
  --blue: #2f5bea;
  --blue-2: #4f8bff;
  --grad: linear-gradient(100deg, var(--red-2) 0%, var(--red) 35%, var(--blue-2) 100%);
  --radius: 18px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .6);
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.02; margin: 0; letter-spacing: .005em; }
h2 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 800; text-transform: uppercase; }
h3 { font-size: 1.5rem; font-weight: 700; }
p { margin: 0; }

.container { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--red); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 3px; border-radius: 6px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font: 600 .78rem/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase;
  color: var(--red-2); margin-bottom: 1rem;
}
.eyebrow__text { display: inline; }
@media (max-width: 600px) {
  .eyebrow__text { display: inline-flex; flex-direction: column; gap: .4rem; }
  .eyebrow__sep { display: none; }
}
.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(232, 35, 46, .7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(232, 35, 46, 0); } 100% { box-shadow: 0 0 0 0 rgba(232, 35, 46, 0); } }

/* Buttons */
.btn {
  --pad: .95rem 1.6rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: var(--pad); border-radius: 999px; border: 1px solid transparent;
  font: 600 .95rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}
.btn svg { width: 1.2em; height: 1.2em; fill: currentColor; }
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--red); color: #fff; box-shadow: 0 12px 30px -12px rgba(232, 35, 46, .8); }
.btn--primary:hover { background: var(--red-2); box-shadow: 0 16px 36px -12px rgba(232, 35, 46, .9); }
.btn--ghost { border-color: rgba(255, 255, 255, .25); color: var(--text); background: rgba(255, 255, 255, .03); backdrop-filter: blur(6px); }
.btn--ghost:hover { border-color: var(--text); background: rgba(255, 255, 255, .08); }
.btn--sm { --pad: .6rem 1.1rem; font-size: .85rem; }
.btn--lg { --pad: 1.15rem 2rem; font-size: 1.05rem; }

.link { background: none; border: 0; padding: 0; color: var(--blue-2); font: 600 .95rem var(--font-body); cursor: pointer; margin-top: auto; align-self: flex-start; }
.link:hover { color: #fff; }
.link span { display: inline-block; transition: transform .2s; }
.link:hover span { transform: translateX(4px); }

/* Nav */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h); transition: background-color .3s, box-shadow .3s, backdrop-filter .3s; }
.nav.is-scrolled { background: rgba(11, 15, 26, .82); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav__brand img { height: 44px; width: auto; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .5)); }
.nav__menu { display: flex; align-items: center; gap: 1.8rem; }
.nav__menu a:not(.btn) { text-decoration: none; font-weight: 500; font-size: .95rem; color: rgba(238, 241, 247, .82); position: relative; }
.nav__menu a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 2px; background: var(--red); transition: right .25s ease; }
.nav__menu a:not(.btn):hover { color: #fff; }
.nav__menu a:not(.btn):hover::after { right: 0; }
.nav__toggle { display: none; }

@media (max-width: 880px) {
  .nav__toggle {
    display: grid; gap: 5px; place-content: center; width: 44px; height: 44px;
    background: none; border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
  }
  .nav__toggle span { width: 20px; height: 2px; background: var(--text); transition: transform .25s, opacity .25s; }
  .nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav__menu {
    position: fixed; inset: var(--nav-h) 0 auto; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(11, 15, 26, .97); backdrop-filter: blur(14px); padding: .5rem 1.25rem 1.5rem;
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s, visibility .25s;
  }
  .nav__menu.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav__menu a:not(.btn) { padding: 1rem .25rem; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav__menu a:not(.btn)::after { display: none; }
  .nav__menu .btn { margin-top: 1.1rem; }
  .nav { background: rgba(11, 15, 26, .82); backdrop-filter: blur(14px); }
}

/* Hero */
.hero { position: relative; min-height: 100svh; display: grid; align-items: center; overflow: hidden; isolation: isolate; padding: calc(var(--nav-h) + 3rem) 0 6rem; }
.hero__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); animation: heroZoom 18s ease-out forwards; }
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at 15% 20%, rgba(232, 35, 46, .35), transparent 55%),
    radial-gradient(ellipse at 90% 80%, rgba(47, 91, 234, .35), transparent 55%),
    linear-gradient(180deg, rgba(11, 15, 26, .55) 0%, rgba(11, 15, 26, .8) 55%, var(--bg) 100%);
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero__content { max-width: 880px; }
.hero__title { font-size: clamp(3.6rem, 11vw, 8.5rem); font-weight: 800; text-transform: uppercase; line-height: .9; margin-bottom: 1.6rem; }
.hero__title .grad { font-style: italic; padding-right: .08em; }
.hero__lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: rgba(238, 241, 247, .85); max-width: 620px; margin-bottom: 2.4rem; }
.hero__lead strong { color: #fff; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; }

/* Stats */
.stats { position: relative; margin-top: -4rem; z-index: 2; }
.stats__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box;
  border: 1px solid transparent; border-radius: var(--radius); box-shadow: var(--shadow);
}
.stats__grid[data-cols="1"] { grid-template-columns: 1fr; }
.stats__grid[data-cols="2"] { grid-template-columns: repeat(2, 1fr); }
.stats__grid[data-cols="3"] { grid-template-columns: repeat(3, 1fr); }
.stats--flat { margin-top: calc(var(--nav-h) + 2rem); }
.no-hero .nav { background: rgba(11, 15, 26, .82); backdrop-filter: blur(14px); }
.stat { padding: 2rem 1rem; text-align: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat__num { display: block; font: 800 clamp(2.6rem, 5vw, 3.8rem)/1 var(--font-display); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat__label { display: block; margin-top: .4rem; color: var(--muted); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; }
@media (max-width: 680px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* Sections */
.section { padding: clamp(5rem, 10vw, 8rem) 0; }
.section--alt { background: var(--bg-alt); }
.section__head { max-width: 760px; margin: 0 auto 3.5rem; text-align: center; }
.section__head h2 { margin-bottom: 1.1rem; }
.section__lead { color: var(--muted); font-size: 1.08rem; }

/* Institutional cards */
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.card {
  display: flex; flex-direction: column; gap: 1rem; padding: 2rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-6px); border-color: rgba(79, 139, 255, .45); box-shadow: var(--shadow); }
.card__logo {
  align-self: flex-start; height: 76px; width: auto; max-width: 100%; object-fit: contain; padding: .8rem 1.1rem; border-radius: 16px;
  /* liquid glass: translucent layers + blur of what's behind + light edge highlights */
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(255, 255, 255, .22), transparent 55%),
    linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .03) 55%, rgba(79, 139, 255, .10));
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -1px 0 rgba(255, 255, 255, .06), inset 0 0 18px rgba(255, 255, 255, .05), 0 12px 30px -14px rgba(0, 0, 0, .7);
  backdrop-filter: blur(14px) saturate(170%); -webkit-backdrop-filter: blur(14px) saturate(170%);
  transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover .card__logo { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -1px 0 rgba(255, 255, 255, .08), inset 0 0 22px rgba(255, 255, 255, .08), 0 16px 34px -14px rgba(79, 139, 255, .45); }
.card p { color: var(--muted); }
@media (max-width: 900px) { .cards3 { grid-template-columns: 1fr; } }

/* Split section */
.split { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.split--noimg { grid-template-columns: 1fr; max-width: 820px; }
.split__media { position: relative; }
.split__media img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; box-shadow: var(--shadow); }
.split__media::before { content: ""; position: absolute; inset: 1.2rem -1.2rem -1.2rem 1.2rem; border-radius: var(--radius); background: var(--grad); opacity: .55; z-index: -1; }
.badge {
  position: absolute; left: -1rem; bottom: 2rem; padding: 1rem 1.3rem; border-radius: 14px;
  background: rgba(11, 15, 26, .88); backdrop-filter: blur(10px); border: 1px solid var(--line);
  font-size: .95rem; color: var(--muted); max-width: 220px; box-shadow: var(--shadow);
}
.badge strong { display: block; font: 800 1.5rem/1 var(--font-display); color: #fff; text-transform: uppercase; }
.split__text h2 { margin-bottom: 1.2rem; }
.features { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .9rem; }
.features li { display: flex; align-items: center; gap: 1rem; padding: .95rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; font-weight: 500; transition: border-color .25s, transform .25s; }
.features li:hover { border-color: rgba(232, 35, 46, .5); transform: translateX(4px); }
.features svg { flex: none; width: 38px; height: 38px; padding: 9px; border-radius: 10px; fill: #fff; background: var(--grad); }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split__media { max-width: 520px; } .badge { left: 1rem; } }

/* Team */
.team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.member { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .3s, border-color .3s; }
.member:hover { transform: translateY(-6px); border-color: rgba(232, 35, 46, .45); }
.member__photo { position: relative; aspect-ratio: 1; overflow: hidden; background: radial-gradient(circle at 50% 35%, #2a3657, #121829 70%); }
.member__photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .5s ease; }
.member__initials { display: grid; place-items: center; width: 100%; height: 100%; min-height: 160px; font: 800 clamp(2.5rem, 6vw, 4rem)/1 var(--font-display); color: rgba(255, 255, 255, .85); background: linear-gradient(135deg, rgba(232, 35, 46, .45), rgba(47, 91, 234, .45)); }
.member:hover .member__photo img { transform: scale(1.05); }
.member__body { padding: 1.3rem 1.3rem 1.5rem; display: flex; flex-direction: column; gap: .35rem; }
.member__role { color: var(--red-2); font-size: .82rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.member p:not(.member__role) { color: var(--muted); font-size: .92rem; }
details { margin-top: .6rem; }
summary { cursor: pointer; color: var(--blue-2); font-weight: 600; font-size: .9rem; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: " +"; }
details[open] summary::after { content: " −"; }
details p { margin-top: .6rem; }
.member--featured { grid-column: span 2; grid-row: span 2; }
.member--featured .member__body { padding: 1.8rem; }
.member--featured h3 { font-size: 2.2rem; }
.member--featured p:not(.member__role) { font-size: 1rem; }
@media (max-width: 1024px) { .team { grid-template-columns: repeat(3, 1fr); } .member--featured { grid-column: 1 / -1; grid-row: auto; flex-direction: row; } .member--featured .member__photo { flex: 0 0 42%; aspect-ratio: auto; } .member--featured .member__body { justify-content: center; } }
@media (max-width: 720px) { .team { grid-template-columns: repeat(2, 1fr); gap: .8rem; } .member--featured { flex-direction: column; } .member__body { padding: .9rem; } .member h3 { font-size: 1.2rem; } .member.member--featured h3 { font-size: 1.8rem; } .member__role { font-size: .72rem; } }
@media (max-width: 340px) { .team { grid-template-columns: 1fr; } }

/* Testimonials */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.quote { margin: 0; padding: 2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; gap: 1.5rem; position: relative; }
.quote::before { content: "“"; position: absolute; top: .4rem; right: 1.2rem; font: 800 6rem/1 var(--font-display); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: .45; }
.quote blockquote { margin: 0; font-size: 1.1rem; line-height: 1.55; }
.quote figcaption { margin-top: auto; display: flex; align-items: center; gap: .9rem; color: var(--muted); font-size: .88rem; }
.quote figcaption img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 2px solid var(--red); }
.quote figcaption strong { display: block; color: var(--text); font-size: 1rem; }
@media (max-width: 900px) { .quotes { grid-template-columns: 1fr; } }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; gap: .9rem; }
.gallery__item { position: relative; overflow: hidden; border-radius: 14px; }
.gallery__item--wide { grid-column: span 2; grid-row: span 2; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, filter .4s; }
.gallery__item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(11, 15, 26, .6), transparent 50%); opacity: 0; transition: opacity .3s; }
.gallery__item:hover img { transform: scale(1.07); }
.gallery__item:hover::after { opacity: 1; }
.gallery__more {
  position: absolute; inset: 0; z-index: 1; display: grid; place-items: center;
  font: 800 clamp(2.4rem, 5vw, 3.6rem)/1 var(--font-display); color: #fff; letter-spacing: .02em;
  background: rgba(11, 15, 26, .55); backdrop-filter: blur(3px); transition: background .3s;
}
.gallery__item:hover .gallery__more { background: rgba(11, 15, 26, .4); }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; } }

/* CTA */
.cta { padding: clamp(4rem, 8vw, 6rem) 0; }
.cta__inner {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; align-items: center;
  padding: clamp(2rem, 5vw, 4rem); border-radius: 28px; position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(ellipse at 0% 0%, rgba(232, 35, 46, .35), transparent 60%), radial-gradient(ellipse at 100% 100%, rgba(47, 91, 234, .4), transparent 60%), var(--surface);
  border: 1px solid var(--line);
}
.cta h2 { margin-bottom: 1rem; }
.cta__actions { display: grid; gap: 1.5rem; }
.contact { list-style: none; padding: 0; margin: 0; display: grid; gap: .2rem; }
.contact li { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.contact span { color: var(--muted); font-size: .9rem; }
.contact a { font-weight: 600; text-decoration: none; }
.contact a:hover { color: var(--red-2); }
@media (max-width: 900px) { .cta__inner { grid-template-columns: 1fr; } }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 3rem 0; color: var(--muted); font-size: .9rem; }
.footer__inner { display: grid; justify-items: center; gap: 1rem; text-align: center; }
.footer__inner img { height: 44px; width: auto; opacity: .9; }
.footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; }
.footer nav a { text-decoration: none; }
.footer nav a:hover { color: var(--text); }
.footer__copy { font-size: .8rem; opacity: .7; }

/* Floating WhatsApp */
.wa-float {
  position: fixed; right: 1.3rem; bottom: 1.3rem; z-index: 40; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; background: #25d366; box-shadow: 0 12px 30px -8px rgba(37, 211, 102, .7);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* Dialogs */
dialog { border: 0; padding: 0; background: transparent; color: var(--text); max-width: min(92vw, 1100px); max-height: 92vh; }
dialog::backdrop { background: rgba(5, 8, 15, .88); backdrop-filter: blur(6px); }
.modal img, .lightbox > img { max-height: 88vh; width: auto; margin: auto; border-radius: 12px; box-shadow: var(--shadow); }
.modal__close { position: fixed; top: 1rem; right: 1rem; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(11, 15, 26, .7); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.lightbox__nav { position: fixed; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(11, 15, 26, .7); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox > img { max-height: calc(100vh - 170px); }
.lightbox__count { position: fixed; top: 1.4rem; left: 1.4rem; margin: 0; font-weight: 600; font-size: .9rem; color: rgba(255, 255, 255, .8); }
.lightbox__strip {
  position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); display: flex; gap: .5rem;
  max-width: min(92vw, 900px); overflow-x: auto; padding: .5rem; border-radius: 14px; scrollbar-width: thin;
  background: rgba(11, 15, 26, .7); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(10px);
}
.lightbox__strip button { flex: none; width: 72px; height: 54px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: #1b2438; opacity: .5; transition: opacity .2s, border-color .2s; }
.lightbox__strip button:hover { opacity: .85; }
.lightbox__strip button[aria-current="true"] { opacity: 1; border-color: var(--red); }
.lightbox__strip img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 600px) { .lightbox__strip button { width: 56px; height: 42px; } .lightbox__nav { top: auto; bottom: 90px; transform: none; } }
.lightbox__nav--prev { left: 1rem; }
.lightbox__nav--next { right: 1rem; }

/* Reveal on scroll (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .hero__img { transform: none; }
}
