/* ============================================================
   Puerto Montt 7K – 15K by ASICS — Landing
   ============================================================ */

@font-face {
  font-family: "BrigendsFull";
  src: url("./assets/brigends.otf") format("opentype");
  font-display: swap;
  unicode-range: U+0041-005A, U+0061-007A, U+00C0-00FF;
}

:root {
  --cream: #FBF8EC;
  --navy: #132343;
  --red: #E01F1E;
  --white: #FFFFFF;

  --font-body: "Barlow", sans-serif;
  --font-cond: "Barlow Condensed", sans-serif;
  --font-display: BrigendsFull, "Barlow Condensed", sans-serif;

  --header-h: 72px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-py: clamp(64px, 10vw, 140px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--red); text-decoration: none; }
a:hover { color: var(--navy); }

img { display: block; }

section { scroll-margin-top: var(--header-h); }

/* ---------- Utilidades ---------- */

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section .container { padding-top: var(--section-py); padding-bottom: var(--section-py); }

.section--cream { background: var(--cream); }
.section--navy { background: var(--navy); color: var(--cream); }
.section--red { background: var(--red); color: var(--cream); }
.section--bordered { border-top: 1.5px solid var(--navy); }

.stack { display: flex; flex-direction: column; }
.stack--20 { gap: 20px; }
.stack--24 { gap: 24px; }
.stack--28 { gap: 28px; }

.balance { text-wrap: balance; }

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.eyebrow {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
}
.eyebrow--navy { color: var(--navy); }

.h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(36px, 4.6vw, 72px);
  line-height: 1.15;
}
.section--cream .h2 { color: var(--navy); }

.lead {
  margin: 0;
  font-size: clamp(18px, 1.4vw, 21px);
  line-height: 1.55;
  max-width: 560px;
  text-wrap: pretty;
}

.body-19 {
  margin: 0;
  font-size: 19px;
  line-height: 1.55;
  text-wrap: pretty;
}

/* ---------- Botones ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.btn--navy { background: var(--navy); color: var(--cream); padding: 16px 28px; }
.btn--navy:hover { background: var(--red); color: var(--cream); }

.btn--red { background: var(--red); color: var(--cream); padding: 18px; }
.btn--red:hover { background: var(--navy); color: var(--cream); }

.btn--outline { border: 2px solid var(--navy); color: var(--navy); padding: 14px 26px; }
.btn--outline:hover { background: var(--navy); color: var(--cream); }

.btn--block { display: block; text-align: center; }
.btn--self-start { align-self: flex-start; padding: 14px 24px; }

.btn--header {
  font-size: 16px;
  letter-spacing: 0.08em;
  background: var(--red);
  color: var(--cream);
  padding: 12px 22px;
}
.btn--header:hover { background: var(--navy); color: var(--cream); }

.btn--footer {
  font-size: 20px;
  background: var(--red);
  color: var(--cream);
  padding: 20px 36px;
}
.btn--footer:hover { background: var(--cream); color: var(--navy); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream);
  border-bottom: 1.5px solid var(--navy);
}

.site-header__bar {
  max-width: 1400px;
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header__logo { display: flex; align-items: center; }
.site-header__logo img {
  height: 44px;
  width: auto;
  max-width: 60vw;
  object-fit: contain;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.2vw, 36px);
}

.nav-link {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav-link:hover { color: var(--red); }
.nav-link.is-active { border-bottom-color: var(--red); }

.menu-button {
  display: none;
  align-items: center;
  background: var(--navy);
  color: var(--cream);
  border: 0;
  height: 44px;
  padding: 0 18px;
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
}
.menu-button__close { display: none; }

.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--navy);
  padding: 8px 20px 20px;
}
.nav-mobile a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--cream);
  padding: 16px 0;
  border-bottom: 1px solid rgba(251, 248, 236, 0.18);
}
.nav-mobile a.nav-mobile__cta {
  margin-top: 18px;
  text-align: center;
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--red);
  color: var(--cream);
  padding: 16px;
  border-bottom: 0;
}

/* ---------- Hero ---------- */

.hero-desktop {
  position: relative;
  height: calc(100vh - var(--header-h));
  min-height: 600px;
  max-height: 1100px;
  background: var(--cream) url("./assets/kv-hero.jpg") center 35% / cover no-repeat;
  overflow: hidden;
}

.hero-desktop__left {
  position: absolute;
  left: clamp(24px, 4vw, 64px);
  bottom: clamp(28px, 5vh, 64px);
  width: clamp(300px, 27vw, 520px);
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.hero-desktop__left img { width: 100%; }

.hero-desktop__ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-desktop__right {
  position: absolute;
  right: clamp(24px, 4vw, 64px);
  bottom: clamp(28px, 5vh, 64px);
  color: var(--cream);
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.hero-date {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.countdown--desktop { display: flex; gap: clamp(14px, 1.8vw, 28px); }
.countdown--desktop .countdown__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
}
.countdown--desktop .countdown__v {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 3.4vw, 54px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.countdown--desktop .countdown__l {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 8px;
}

.hero-mobile { display: none; }

.hero-mobile__image {
  aspect-ratio: 4 / 5;
  background: var(--cream) url("./assets/kv-hero.jpg") 46% center / cover no-repeat;
}

.hero-mobile__body {
  padding: 36px 20px 44px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.hero-mobile__body > img { width: 100%; max-width: 440px; }

.hero-mobile__date {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}

.countdown--mobile {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.countdown--mobile .countdown__item {
  background: var(--navy);
  color: var(--cream);
  padding: 14px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.countdown--mobile .countdown__v {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
}
.countdown--mobile .countdown__l {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 6px;
}

/* ---------- Facts bar ---------- */

.facts { background: var(--navy); color: var(--cream); }

.facts__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fact {
  padding: 28px 24px 28px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-right: 1px solid rgba(251, 248, 236, 0.16);
  margin-right: 24px;
}
.fact__k {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}
.fact__v {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ---------- 01 Carrera ---------- */

.distances { display: flex; margin-top: 8px; }

.distance {
  flex: 1;
  max-width: 220px;
  border-top: 3px solid var(--navy);
  padding-top: 16px;
}
.distance--red { border-top-color: var(--red); margin-left: 24px; }

.distance__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(44px, 5vw, 72px);
  line-height: 1;
  color: var(--navy);
}
.distance--red .distance__name { color: var(--red); }

.distance__tag {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 10px;
}

.carrera-media { position: relative; }
.carrera-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.carrera-media__badge {
  position: absolute;
  left: -1px;
  bottom: -1px;
  background: var(--cream);
  padding: 18px 24px 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 2vw, 28px);
  color: var(--navy);
}

/* ---------- 02 Circuitos ---------- */

.circuit-radio { position: absolute; opacity: 0; pointer-events: none; }

.section .circuitos__inner {
  display: flex;
  flex-direction: column;
  gap: clamp(36px, 4vw, 56px);
}

.circuitos__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  flex-wrap: wrap;
}

.tabs { display: flex; gap: clamp(20px, 3vw, 40px); align-items: flex-end; }

.tab {
  cursor: pointer;
  padding: 0 0 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  color: var(--cream);
  border-bottom: 4px solid rgba(251, 248, 236, 0.25);
}
.tab:hover { color: var(--red); }

.tab__label {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: clamp(40px, 4.4vw, 64px);
  line-height: 0.9;
  letter-spacing: 0.01em;
}
.tab__sub {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

#circuito-7k:checked ~ .container .tab--7k,
#circuito-15k:checked ~ .container .tab--15k {
  color: var(--red);
  border-bottom-color: var(--red);
}

#circuito-7k:focus-visible ~ .container .tab--7k,
#circuito-15k:focus-visible ~ .container .tab--15k {
  outline: 2px solid var(--cream);
  outline-offset: 4px;
}

.circuit {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: clamp(28px, 4vw, 56px);
  align-items: stretch;
}
#circuito-7k:checked ~ .container .circuit--7k,
#circuito-15k:checked ~ .container .circuit--15k { display: grid; }

.circuit__map {
  position: relative;
  min-height: 420px;
  background: var(--cream);
}

.map-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(19, 35, 67, 0.5);
}

.circuit__info { display: flex; flex-direction: column; gap: 28px; }

.circuit__title { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }

.circuit__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(72px, 9vw, 140px);
  line-height: 0.9;
  color: var(--red);
}
.circuit__tag {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.circuit__desc {
  margin: 0;
  font-size: 19px;
  line-height: 1.55;
  max-width: 540px;
  text-wrap: pretty;
}

.circuit__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid rgba(251, 248, 236, 0.25);
}

.stat {
  padding: 20px 16px 20px 0;
  border-bottom: 1px solid rgba(251, 248, 236, 0.25);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat__k {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: 0.85;
}
.stat__v {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 26px;
  text-transform: uppercase;
}

/* ---------- 03 Inscripción ---------- */

.section .inscripcion {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: start;
}

.inscripcion__aside {
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: sticky;
  top: 104px;
}

.inscripcion__intro { max-width: 480px; }

.steps {
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-top: 2px solid var(--cream);
  padding-top: 24px;
}
.step { display: flex; gap: 18px; align-items: flex-start; }
.step__n {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
  color: var(--navy);
  min-width: 40px;
}
.step__t { font-size: 18px; line-height: 1.45; }

.info-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--navy);
  padding: 22px 26px;
}
.info-box__k {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
}
.info-box__link { font-size: 18px; color: var(--cream); }
.info-box__link:hover { color: var(--red); }

.info-box--kit { color: var(--cream); padding: 24px 28px; }
.info-box__text { font-size: 17px; line-height: 1.5; }

.inscripcion__form {
  background: var(--white);
  color: var(--navy);
  padding: clamp(8px, 1.5vw, 20px);
  min-height: 900px;
  box-shadow: 12px 12px 0 var(--navy);
}
.inscripcion__form iframe {
  width: 100%;
  min-height: 880px;
  border: 0;
  display: block;
}

/* ---------- 04 Kit ---------- */

.kit-list { display: flex; flex-direction: column; border-top: 2px solid var(--navy); }

.kit-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(19, 35, 67, 0.2);
}
.kit-item__n {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--red);
}
.kit-item__body { display: flex; flex-direction: column; gap: 4px; }
.kit-item__t {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.kit-item__d { font-size: 17px; line-height: 1.45; }

.kit-media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--red);
}
.kit-media img {
  position: absolute;
  inset: 4% 2% 0 2%;
  width: 96%;
  height: 96%;
  object-fit: contain;
  object-position: bottom center;
}

/* ---------- 05 Reglamento ---------- */

.reglamento {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.reglamento__intro {
  margin: 0;
  font-size: 18px;
  line-height: 1.55;
  max-width: 440px;
}

.accordion { display: flex; flex-direction: column; border-top: 2px solid var(--navy); }

.accordion details { border-bottom: 1px solid rgba(19, 35, 67, 0.25); }

.accordion summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px 0;
  color: var(--navy);
}
.accordion summary::-webkit-details-marker { display: none; }

.accordion__q {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.accordion__icon {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--red);
  min-width: 24px;
  text-align: center;
}
.accordion__icon::before { content: "+"; }
.accordion details[open] .accordion__icon::before { content: "–"; }

.accordion details p {
  margin: 0 0 24px;
  font-size: 17px;
  line-height: 1.6;
  max-width: 640px;
  text-wrap: pretty;
}

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  background: var(--navy) url("./assets/footer.jpg") center / cover no-repeat;
  color: var(--cream);
}

.site-footer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(19, 35, 67, 0.55);
}

.site-footer__inner {
  position: relative;
  padding-top: clamp(72px, 10vw, 140px);
  padding-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 7vw, 96px);
}

.site-footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  flex-wrap: wrap;
}

.site-footer__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 96px);
  line-height: 1;
  max-width: 900px;
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(251, 248, 236, 0.3);
  padding-top: 24px;
}

.site-footer__nav { display: flex; gap: 24px; flex-wrap: wrap; }
.site-footer__nav a {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream);
}
.site-footer__nav a:hover { color: var(--red); }

.site-footer__legal {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ============================================================
   Responsive
   ============================================================ */

/* < 1100px: header y hero móviles */
@media (max-width: 1099.98px) {
  .nav-desktop { display: none; }
  .menu-button { display: inline-flex; }

  .menu-toggle:checked ~ .nav-mobile { display: flex; }
  .menu-toggle:checked ~ .site-header__bar .menu-button__open { display: none; }
  .menu-toggle:checked ~ .site-header__bar .menu-button__close { display: inline; }

  .hero-desktop { display: none; }
  .hero-mobile { display: block; }
}

/* < 820px: una columna */
@media (max-width: 819.98px) {
  .facts__inner { grid-template-columns: 1fr; }
  .fact {
    padding: 18px 0;
    border-right: 0;
    border-bottom: 1px solid rgba(251, 248, 236, 0.16);
    margin-right: 0;
  }

  .section .inscripcion { grid-template-columns: minmax(0, 1fr); }
  .inscripcion__aside { position: static; }
  .inscripcion__form {
    padding: 0;
    box-shadow: none;
    margin: 0 calc(-1 * var(--gutter));
  }
}
