/* ---------- Fonts (self-hosted, variable) ---------- */
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/open-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/open-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Open Sans";
  font-style: italic;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/open-sans-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Open Sans";
  font-style: italic;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/open-sans-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Libre Baskerville";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/libre-baskerville-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Libre Baskerville";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/libre-baskerville-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/cinzel-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/cinzel-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  --navy: #074073;
  --blue: #2c5b87;
  --blue-dark: #24557f;
  --gold: #d8a537;
  --teal: #07abb1;
  --link: #1565c0;
  --text: #333;
  --muted: #555;
  --line: #e6e6e6;
  --light: #eeeeee;
  --white: #fff;

  --font-body: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: "Libre Baskerville", Georgia, serif;
  --font-brand: "Cinzel", "Trajan Pro", Georgia, serif;

  --container: 1140px;
  --gutter: 20px;
  --radius: 4px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }
a:hover { text-decoration: none; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; line-height: 1.25; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
[id] { scroll-margin-top: 90px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: 820px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--white); padding: .5rem 1rem; }
.skip-link:focus { left: 1rem; }

.btn {
  display: inline-block;
  padding: .65em 1.6em;
  border: 0;
  border-radius: var(--radius);
  background: var(--gold);
  color: var(--white);
  font: 600 .95rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s;
}
.btn:hover { background: #c08f25; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08);
}
.site-header__inner { display: flex; align-items: center; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .75rem; color: var(--white); text-decoration: none; min-width: 0; }
.brand__logo {
  width: 52px; height: 52px; flex: none;
  padding: 3px;
  background: var(--white);
  border-radius: 50%;
  object-fit: contain;
}
.brand__name { font-family: var(--font-brand); font-size: .8rem; letter-spacing: .04em; line-height: 1.3; max-width: 22em; }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: 1.5rem; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; }
.site-nav a, .lang-switch span { color: var(--white); text-decoration: none; font-weight: 600; font-size: .95rem; }
.site-nav a:hover { color: var(--gold); }
.lang-switch { gap: .25rem .8rem !important; padding-left: 1.5rem !important; border-left: 1px solid rgba(255, 255, 255, .3); }
.lang-switch span { color: var(--gold); }

.nav-toggle { display: none; }

@media (max-width: 960px) {
  .js .nav-toggle {
    display: block;
    margin-left: auto;
    width: 44px; height: 44px;
    position: relative;
    background: none; border: 0; cursor: pointer;
  }
  .nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
    position: absolute; left: 10px; width: 24px; height: 2px; background: var(--white); content: "";
    transition: transform .2s;
  }
  .nav-toggle__bar { top: 21px; }
  .nav-toggle__bar::before { left: 0; top: -7px; }
  .nav-toggle__bar::after { left: 0; top: 7px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { transform: translateY(-7px) rotate(-45deg); }

  .site-header__inner { flex-wrap: wrap; }
  .site-nav { flex-basis: 100%; flex-direction: column; align-items: flex-start; gap: .75rem; padding-bottom: 1rem; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; }
  .site-nav a, .lang-switch span { font-size: 1.05rem; }
  .lang-switch { flex-direction: row !important; border-left: 0; padding-left: 0 !important; }
}

/* ---------- Hero ---------- */
.hero {
  color: var(--white);
  background:
    linear-gradient(rgba(44, 91, 135, .95), rgba(44, 91, 135, .95)),
    url("../img/bg-header.webp") center / cover no-repeat var(--blue);
  padding: 5rem 0 4.5rem;
  font-size: 1.15rem;
}
.hero__title {
  font-family: var(--font-brand);
  font-weight: 400;
  font-size: clamp(1.9rem, 4.6vw, 3.4rem);
  letter-spacing: .03em;
  line-height: 1.15;
  margin-bottom: 2.5rem;
}

/* ---------- Sections ---------- */
.section { padding: 4.5rem 0; }
.section__title {
  color: var(--navy);
  text-align: center;
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-bottom: .4em;
}
.section__title--small { font-size: 1.25rem; text-transform: uppercase; letter-spacing: .02em; }
.section__subtitle { text-align: center; font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem; margin-bottom: 2.5rem; }

/* Training */
.training__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3rem; margin-top: 2.5rem; }
.program__logo { display: block; margin-bottom: 1.5rem; }
.program__logo img { width: 100%; max-height: 220px; object-fit: contain; object-position: left center; }
.program__note { font-size: .85rem; color: var(--muted); }

/* Activities */
.activities { padding-top: 1rem; }
.activities__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.activity {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  text-align: left;
}
.activity__img { width: 120px; height: 120px; object-fit: contain; margin: 0 auto 1.5rem; }
.activity__title { color: var(--gold); font-size: 1.2rem; text-align: center; margin-bottom: .3em; }
.activity__verb { font-weight: 700; font-size: .9rem; text-align: center; margin-bottom: .75em; }

/* Team */
.team {
  color: var(--white);
  background:
    linear-gradient(rgba(36, 85, 127, .94), rgba(36, 85, 127, .94)),
    url("../img/bg-direccion.webp") center / cover no-repeat var(--blue-dark);
}
.team a { color: var(--white); }
.person {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  grid-template-areas: "header photo" "bio photo";
  column-gap: 3rem;
  align-items: start;
}
.person + .person { margin-top: 5rem; }
.person__header { grid-area: header; margin-bottom: 1.5rem; }
.person__label, .person__name, .person__role {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  line-height: 1.3;
  margin: 0;
}
.person__label { color: var(--gold); }
.person__role { font-size: clamp(1.05rem, 2vw, 1.35rem); font-weight: 400; }
.person__photo {
  grid-area: photo;
  width: 220px; height: 220px;
  margin-top: 12rem;
  border-radius: 50%;
  border: 5px solid var(--gold);
  object-fit: cover;
}
.person__bio { grid-area: bio; max-width: 720px; }

/* Endorsements */
.endorsements__logos {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2rem 3rem;
}
.endorsements__logos img { height: 90px; width: auto; max-width: 220px; object-fit: contain; }

/* Legal */
.legal h2 { color: var(--navy); font-size: 1.6rem; margin-top: 2.5rem; }
.legal h3 { font-size: 1.05rem; margin-top: 1.5rem; }
.legal__updated, .legal__note { text-align: center; color: var(--muted); font-size: .9rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--light); padding: 3rem 0; text-align: center; font-size: .95rem; }
.site-footer__brand { font-family: var(--font-brand); color: var(--navy); font-size: 1.05rem; }
.site-footer__links { list-style: none; margin: 1.5rem 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.5rem; }
.site-footer__copy { color: var(--muted); font-size: .85rem; margin: 0; }

/* ---------- Contact modal ---------- */
.contact {
  width: min(560px, calc(100% - 2 * var(--gutter)));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
  color: var(--text);
}
.contact::backdrop { background: rgba(7, 64, 115, .6); }
.contact__form { position: relative; padding: 2rem; }
.contact__title { color: var(--navy); font-size: 1.6rem; }
.contact__intro { color: var(--muted); }
.contact__close {
  position: absolute; top: .5rem; right: .75rem;
  width: 44px; height: 44px;
  background: none; border: 0;
  font-size: 2rem; line-height: 1; color: var(--muted); cursor: pointer;
}
.contact__hp { position: absolute; left: -9999px; }
.field { display: block; margin-bottom: 1rem; }
.field span { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.field input, .field textarea {
  width: 100%;
  padding: .65rem .75rem;
  border: 1px solid #c8c8c8;
  border-radius: var(--radius);
  font: inherit;
}
.field input:focus, .field textarea:focus { border-color: var(--blue); outline: 2px solid rgba(44, 91, 135, .25); }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; margin-bottom: 1rem; }
.check input { margin-top: .3rem; width: 18px; height: 18px; flex: none; }
.contact__status:empty { display: none; }
.contact__status { padding: .75rem 1rem; border-radius: var(--radius); background: #f3f6f9; font-size: .95rem; }
.contact__status.is-ok { background: #e8f5e9; color: #1b5e20; }
.contact__status.is-error { background: #fdecea; color: #8a1c13; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .activities__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .hero { padding: 3rem 0; font-size: 1.05rem; }
  .section { padding: 3rem 0; }
  .training__grid, .activities__grid { grid-template-columns: 1fr; gap: 2rem; }
  .activity { padding: 1.75rem; }
  .person { grid-template-columns: 1fr; grid-template-areas: "photo" "header" "bio"; }
  .person__photo { margin: 0 0 1.5rem; width: 180px; height: 180px; }
  .brand__name { font-size: .7rem; }
  .endorsements__logos { gap: 1.5rem 2rem; }
  .endorsements__logos img { height: 70px; max-width: 160px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
