/* ==========================================================
   Travesía El Farallón · Nadadores del Golfo
   ========================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #f4efe6;
  --fg: #0d2438;
  --card: #fff;
  --muted: #4b6072;
  --acc: #e4572e;
  --acc-soft: #ff7a4d;
  --line: #d9d2c3;
  --error: #c0392b;
  --warn-bg: #fff3cd;
  --warn-fg: #664d03;
  --navy: #06121c;

  --font-display: Oswald, Impact, "Arial Narrow", sans-serif;
  --font-body: Inter, system-ui, sans-serif;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #07141f;
    --fg: #eaf2f7;
    --card: #0e2233;
    --muted: #9bb2c3;
    --line: #1d3a52;
    --error: #ff7b6b;
    --warn-bg: #3a2f0b;
    --warn-fg: #ffe08a;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #07141f;
  --fg: #eaf2f7;
  --card: #0e2233;
  --muted: #9bb2c3;
  --line: #1d3a52;
  --error: #ff7b6b;
  --warn-bg: #3a2f0b;
  --warn-fg: #ffe08a;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: env(safe-area-inset-top, 0px);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 var(--font-body);
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .02em;
  line-height: 1.1;
}

h2 {
  font-size: clamp(28px, 6vw, 40px);
  margin-bottom: 14px;
}

h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin-top: 10px;
  background: var(--acc);
}

p { margin: 0 0 14px; }

img { max-width: 100%; display: block; }

[hidden] { display: none !important; }

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px;
}

.note {
  color: var(--muted);
  font-size: 13px;
}

.note--spaced { margin-top: 14px; }

/* ---------- Botón ---------- */
.btn {
  display: inline-block;
  padding: 14px 34px;
  border: 0;
  border-radius: 6px;
  background: var(--acc);
  color: #fff;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: filter .15s, transform .15s;
}

.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.btn--sm {
  font-size: 15px;
  padding: 10px 22px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: calc(64px + env(safe-area-inset-top, 0px)) 0 0;
  text-align: center;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(6, 18, 28, .82) 0%, rgba(11, 47, 74, .55) 55%, rgba(27, 106, 138, .35) 100%),
    url("../img/farallon.jpg") center 60% / cover no-repeat,
    linear-gradient(170deg, #06121c 0%, #0b2f4a 55%, #1b6a8a 100%);
}

.hero__kicker {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: .3em;
  opacity: .85;
}

.hero h1 {
  font-size: clamp(44px, 11vw, 96px);
  line-height: .95;
  font-weight: 700;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}

.hero h1 span {
  display: block;
  color: var(--acc-soft);
}

.hero__tagline {
  max-width: 560px;
  margin: 18px auto 0;
  font-size: clamp(16px, 3.4vw, 22px);
  opacity: .95;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 28px 0 22px;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  background: rgba(6, 18, 28, .45);
  backdrop-filter: blur(4px);
  font-size: 14px;
  font-weight: 600;
}

.countdown {
  min-height: 1.6em;
  margin-bottom: 22px;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: .08em;
  color: #ffb597;
}

.wave {
  display: block;
  width: 100%;
  height: 70px;
  margin-top: 40px;
  fill: var(--bg);
}

/* ---------- Secciones ---------- */
.section { padding-top: 54px; }

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin: 22px 0 0;
}

.card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.stat { display: flex; flex-direction: column-reverse; }

.stat dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
  color: var(--acc);
}

.stat dt {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}

.stat__note {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-style: italic;
  opacity: .8;
}

/* Checklist */
.checklist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding: 8px 0 8px 30px;
  border-bottom: 1px solid var(--line);
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--acc);
}

/* ---------- Formulario ---------- */
.form {
  margin-top: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}

.form fieldset {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.form legend {
  margin-bottom: 12px;
  padding: 0;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0 14px;
}

.field {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
}

.field .opt {
  font-weight: 400;
  color: var(--muted);
}

.form input,
.form select {
  width: 100%;
  margin-top: 5px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-weight: 400;
}

.form input:focus,
.form select:focus {
  outline: 2px solid var(--acc);
  outline-offset: 1px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 15px;
}

.form .check input {
  width: auto;
  margin-top: 5px;
  accent-color: var(--acc);
}

.alert {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--warn-bg);
  color: var(--warn-fg);
  font-size: 14px;
}

.form__error {
  min-height: 1.4em;
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--error);
}

/* Resultado */
.result { margin-top: 18px; }

.result h3 {
  margin-bottom: 8px;
  font-size: 22px;
}

.result textarea {
  width: 100%;
  height: 190px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.5 var(--font-body);
  resize: vertical;
}

.steps {
  margin: 14px 0;
  padding-left: 22px;
}

.steps li { margin-bottom: 18px; }

.steps li > * {
  display: block;
  margin-bottom: 8px;
}

.steps .btn { display: inline-block; }

.btn--wa { background: #1fa855; }

.btn:disabled { opacity: .5; cursor: default; }

.result__fallback { margin-top: 10px; font-size: 14px; }
.result__fallback summary { cursor: pointer; color: var(--muted); }
.result__fallback textarea { margin: 10px 0; }

/* ---------- Footer ---------- */
.footer {
  margin-top: 60px;
  padding: 30px 20px calc(30px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  background: var(--navy);
  color: #cfe0ea;
  font-size: 14px;
}

.footer p { margin: 0; }

.footer__brand {
  font-family: var(--font-display);
  letter-spacing: .1em;
  color: #fff;
}

.footer__meta { opacity: .7; }

/* ---------- Logos ---------- */
.hero__logo {
  width: clamp(96px, 22vw, 140px);
  height: auto;
  margin: 0 auto 10px;
  mix-blend-mode: screen; /* el fondo negro del escudo desaparece sobre el hero */
}

.footer__logo {
  width: 160px;
  height: auto;
  margin: 0 auto 14px;
  padding: 10px;
  border-radius: 12px;
  background: #fff;
}

/* ---------- Cuenta regresiva ---------- */
.countdown {
  display: flex;
  width: fit-content;
  flex-direction: column;
  align-items: center;
  min-height: 0;
  margin: 0 auto 26px;
  padding: 14px 32px 16px;
  border: 2px solid rgba(255, 122, 77, .6);
  border-radius: 16px;
  background: rgba(6, 18, 28, .55);
  backdrop-filter: blur(4px);
  color: #fff;
  line-height: 1;
}

.countdown:empty { display: none; }

.countdown__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(64px, 16vw, 112px);
  line-height: .95;
  color: var(--acc-soft);
  text-shadow: 0 4px 24px rgba(228, 87, 46, .45);
  animation: pulso 2.4s ease-in-out infinite;
}

.countdown__label {
  font-family: var(--font-display);
  font-size: clamp(14px, 3.2vw, 18px);
  letter-spacing: .25em;
  text-transform: uppercase;
  opacity: .9;
}

@keyframes pulso {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  .countdown__num { animation: none; }
}

.footer__tip {
  margin-top: 18px !important;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.footer__tip a {
  color: var(--acc-soft);
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}


/* ---------- Sponsors ---------- */
.sponsors { margin: 6px 0 22px; }

.sponsors__title {
  margin-bottom: 10px !important;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: .15em;
  text-transform: uppercase;
  opacity: .7;
}

.sponsors__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sponsors__list li {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72px;
  padding: 8px 14px;
  border-radius: 10px;
  background: #000;
}

.sponsors__list img {
  max-height: 100%;
  max-width: 180px;
  width: auto;
}
