/* ============================================================
 * Turismo Azul — Costa Cálida
 * Design tokens portados desde la POC (Tailwind v4) a CSS plano.
 * ============================================================ */

:root {
  /* Tipografía */
  --font-sans: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
  --font-serif: 'Playfair Display', ui-serif, Georgia, 'Times New Roman', serif;
  --font-corp: 'Montserrat', sans-serif;

  /* Paleta — neutros arena */
  --sand-50: #ffffff;
  --sand-100: #f8fafc;
  --sand-200: #f1f5f9;
  --sand-300: #e2e8f0;

  /* Paleta — océano */
  --ocean-900: #001f3f;
  --ocean-800: #003366;
  --ocean-700: #004a7c;

  /* Marca */
  --brand: #0075b0;
  --brand-cyan: #4fd1e8;
  --brand-gold: #ff851b;
  --brand-dark: #005a8c;
  --brand-light: #e5f5fb;

  /* Estado */
  --success: #10b981;
  --warning: #f59e0b;
  --error:   #ef4444;

  --container-max: 90rem;
}

/* ─── Reset ligero ─── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ocean-900);
  background: var(--sand-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; padding: 0; }
ul { list-style: none; padding: 0; margin: 0; }

::selection { background: rgba(0, 117, 176, 0.2); color: var(--brand); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--brand-cyan); border-radius: 10px; }

/* Alpine cloak */
[x-cloak] { display: none !important; }

/* ─── Accesibilidad ─── */
.skip-link {
  position: absolute;
  top: -100px; left: 0; z-index: 9999;
  padding: 1rem 2rem;
  background: var(--ocean-900);
  color: #fff;
  font-weight: 600;
  transition: top .2s;
}
.skip-link:focus { top: 0; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

*:focus-visible {
  outline: 3px solid var(--ocean-900);
  outline-offset: 2px;
  border-radius: 2px;
  box-shadow: 0 0 0 6px rgba(0, 117, 176, 0.25);
}
.site-footer *:focus-visible,
.mobile-menu *:focus-visible,
.bottom-nav *:focus-visible {
  outline-color: #fff;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.25);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ─── Layout ─── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (min-width: 768px) { .container { padding: 0 3rem; } }

/* ─── Botones ─── */
.btn {
  display: inline-flex; align-items: center; gap: .65rem;
  padding: 1rem 1.75rem;
  border-radius: 999px;
  font: 600 .75rem/1 var(--font-sans);
  letter-spacing: .15em;
  text-transform: uppercase;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s;
}
.btn--primary {
  background: #fff;
  color: var(--ocean-900);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22); }
.btn--brand {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 117, 176, 0.2);
}
.btn--brand:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn--sm { padding: .8rem 1.25rem; font-size: .7rem; }
.btn__arrow { transition: transform .25s ease; }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* ============================================================
 * HEADER
 * ============================================================ */
.site-header {
  position: sticky; top: 0; left: 0; right: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--sand-200);
}
.site-header__progress {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px;
  overflow: hidden;
  pointer-events: none;
}
.site-header__progress-bar {
  display: block;
  height: 100%;
  background: linear-gradient(to right, var(--brand), var(--brand-cyan), var(--brand-gold));
  transition: width .1s linear;
}
.site-header__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
  height: 5rem;
}
.brand-mark {
  display: inline-flex; align-items: center; gap: 1rem;
  flex-shrink: 0;
}
.brand-mark__logo { height: 2.5rem; width: auto; }
.brand-mark__sep { width: 1px; height: 1.5rem; background: rgba(0, 31, 63, 0.2); }
.brand-mark__name {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 1.6vw + 1rem, 1.85rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ocean-900);
}
.brand-mark__name em {
  font-style: italic;
  font-weight: 300;
  color: var(--brand);
}

.site-header__nav {
  display: none;
  gap: 1.75rem;
  align-items: center;
}
@media (min-width: 1180px) {
  .site-header__nav { display: flex; }
}
.nav-trigger {
  display: inline-flex; align-items: center;
  font: 600 .7rem/1 var(--font-sans);
  letter-spacing: .15em;
  text-transform: uppercase;
  color: rgba(0, 31, 63, 0.78);
  transition: color .25s ease;
  position: relative;
  padding: 1.5rem 0;
}
.nav-trigger::after {
  content: "";
  position: absolute; left: 50%; bottom: 1.2rem;
  width: 0; height: 2px;
  background: var(--brand);
  transform: translateX(-50%);
  transition: width .25s ease;
}
.nav-trigger:hover,
.nav-trigger.is-open { color: var(--brand); }
.nav-trigger.is-open::after { width: 100%; }

.site-header__actions {
  display: flex; align-items: center; gap: 1rem;
}
.lang-switcher {
  display: none;
  gap: .15rem;
  font: 600 .7rem/1 var(--font-sans);
  letter-spacing: .15em;
  text-transform: uppercase;
}
@media (min-width: 768px) { .lang-switcher { display: inline-flex; } }
.lang-switcher a {
  padding: .55rem .75rem;
  border-radius: 999px;
  color: rgba(0, 31, 63, 0.6);
  transition: background .2s, color .2s;
}
.lang-switcher a:hover { color: var(--brand); }
.lang-switcher a.is-active {
  background: var(--brand-light);
  color: var(--brand-dark);
}

.site-header__actions .btn--brand {
  display: none;
}
@media (min-width: 900px) {
  .site-header__actions .btn--brand { display: inline-flex; }
}

.mobile-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem;
  border-radius: 999px;
  color: var(--ocean-900);
  transition: background .2s;
}
.mobile-toggle:hover { background: var(--sand-100); }
@media (min-width: 1180px) { .mobile-toggle { display: none; } }

/* ============================================================
 * MEGAMENU (desktop)
 * ============================================================ */
.megamenu {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff;
  border-top: 1px solid var(--sand-200);
  box-shadow: 0 16px 32px -16px rgba(0, 31, 63, 0.18);
  z-index: 60;
}
.megamenu__inner { padding: 2.5rem 1.5rem 3rem; }
@media (min-width: 768px) { .megamenu__inner { padding: 2.5rem 3rem 3rem; } }

.megamenu__grid { display: grid; gap: 2rem; }
.megamenu__grid--12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.megamenu__grid--4  { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.megamenu__col-3 { grid-column: span 3; }
.megamenu__col-9 { grid-column: span 9; }

.megamenu__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem;
  border-radius: .85rem;
  background: rgba(0, 117, 176, 0.1);
  color: var(--brand);
  margin-bottom: 1rem;
}
.megamenu__title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 .5rem;
  color: var(--ocean-900);
}
.megamenu__lead {
  margin: 0 0 1.25rem;
  font-size: .9rem;
  color: rgba(0, 31, 63, 0.6);
  line-height: 1.55;
}
.megamenu__more {
  display: inline-flex; align-items: center; gap: .5rem;
  font: 600 .8rem/1 var(--font-sans);
  color: var(--brand);
}
.megamenu__more:hover { color: var(--brand-dark); }

.megamenu__group-label {
  display: block;
  font: 700 .65rem/1 var(--font-corp);
  letter-spacing: .25em;
  text-transform: uppercase;
  color: rgba(0, 31, 63, 0.4);
  margin-bottom: .85rem;
}
.megamenu__divider {
  display: block;
  width: 2rem; height: 1px;
  background: rgba(0, 31, 63, 0.1);
  margin-bottom: .85rem;
}
.megamenu__link {
  display: block;
  padding: .55rem 0;
  transition: transform .2s;
}
.megamenu__link:hover { transform: translateX(4px); }
.megamenu__link-label {
  display: block;
  font: 500 .9rem/1.3 var(--font-sans);
  color: rgba(0, 31, 63, 0.85);
  transition: color .2s;
}
.megamenu__link:hover .megamenu__link-label { color: var(--brand); }
.megamenu__link-desc {
  display: block;
  margin-top: .15rem;
  font-size: .75rem;
  color: rgba(0, 31, 63, 0.45);
}

.megamenu__muni-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}
.muni-card {
  display: flex; align-items: center; gap: .85rem;
  padding: .85rem;
  border-radius: .85rem;
  transition: background .2s;
}
.muni-card:hover { background: var(--sand-100); }
.muni-card__avatar {
  flex-shrink: 0;
  width: 3rem; height: 3rem;
  border-radius: .65rem;
  background: linear-gradient(135deg, var(--ocean-700), var(--brand));
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 1.2rem/1 var(--font-serif);
}
.muni-card__name {
  display: block;
  font: 600 .9rem/1.2 var(--font-sans);
  color: var(--ocean-900);
}
.muni-card__tag {
  display: block;
  margin-top: .1rem;
  font-size: .75rem;
  color: rgba(0, 31, 63, 0.45);
}
.muni-card:hover .muni-card__name { color: var(--brand); }

.megamenu__featured {
  display: block;
  padding: 1.25rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--brand-light) 0%, #fff 100%);
  border: 1px solid var(--sand-200);
  transition: box-shadow .2s, transform .2s;
}
.megamenu__featured:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -8px rgba(0, 117, 176, 0.18); }
.megamenu__featured-eyebrow {
  display: block;
  font: 700 .65rem/1 var(--font-corp);
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: .5rem;
}
.megamenu__featured-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 .35rem;
}
.megamenu__featured-body {
  margin: 0 0 .85rem;
  font-size: .8rem;
  color: rgba(0, 31, 63, 0.55);
}
.megamenu__featured-cta {
  display: inline-flex; align-items: center; gap: .35rem;
  font: 600 .75rem/1 var(--font-sans);
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--brand);
}

@media (max-width: 1179px) {
  .megamenu { display: none !important; }
}

/* ============================================================
 * MOBILE MENU
 * ============================================================ */
.mobile-menu {
  position: fixed; inset: 5rem 0 0 0; z-index: 49;
  background: var(--ocean-900);
  overflow-y: auto;
  padding: 2rem 1.5rem 3rem;
  display: flex; flex-direction: column; justify-content: space-between;
  color: #fff;
}
.mobile-menu--enter { transition: transform .4s ease-out; }
.mobile-menu--enter-start { transform: translateX(100%); }
.mobile-menu--enter-end   { transform: translateX(0); }
@media (min-width: 1180px) { .mobile-menu { display: none !important; } }

.mobile-menu__nav { display: flex; flex-direction: column; gap: 1rem; }
.mobile-menu__group { border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding-bottom: 1rem; }
.mobile-menu__trigger {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  font: 300 1.75rem/1.2 var(--font-serif);
  color: rgba(255, 255, 255, 0.9);
  padding: .5rem 0;
}
.mobile-menu__trigger.is-open,
.mobile-menu__trigger:hover { color: #fff; }
.mobile-menu__trigger.is-open svg { transform: rotate(180deg); }
.mobile-menu__trigger svg { transition: transform .2s; }
.mobile-menu__trigger--link { display: block; }

.mobile-menu__panel {
  padding-left: 1rem;
  margin-top: .65rem;
  display: flex; flex-direction: column; gap: .55rem;
}
.mobile-menu__group-label {
  display: block;
  margin-top: .85rem;
  font: 700 .65rem/1 var(--font-corp);
  letter-spacing: .25em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}
.mobile-menu__link {
  display: block;
  font: 300 1.05rem/1.4 var(--font-sans);
  color: rgba(255, 255, 255, 0.85);
  padding: .25rem 0;
}
.mobile-menu__link:hover { color: var(--brand-cyan); }

.mobile-menu__footer {
  margin-top: 2rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.lang-switcher--mobile { display: inline-flex; }
.lang-switcher--mobile a {
  color: rgba(255, 255, 255, 0.8);
}
.lang-switcher--mobile a.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* ============================================================
 * HERO
 * ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(79, 209, 232, 0.35), transparent 60%),
    linear-gradient(135deg, var(--ocean-900) 0%, var(--ocean-800) 55%, var(--brand) 100%);
}
.hero::after {
  content: "";
  position: absolute; inset: auto 0 -1px 0;
  height: 6rem;
  background: linear-gradient(to bottom, transparent, var(--sand-50));
  pointer-events: none;
}
.hero__inner {
  padding: clamp(5rem, 8vw, 8rem) 0 clamp(7rem, 10vw, 10rem);
  max-width: 56rem;
}
.hero__eyebrow {
  display: inline-block;
  font: 700 .7rem/1 var(--font-corp);
  letter-spacing: .25em;
  text-transform: uppercase;
  padding: .5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.75rem;
}
.hero__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.5rem, 5vw + 1rem, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
  text-wrap: balance;
}
.hero__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--brand-cyan);
}
.hero__subtitle {
  font-size: clamp(1.05rem, .5vw + .95rem, 1.35rem);
  color: rgba(255, 255, 255, 0.85);
  max-width: 38rem;
  margin: 0 0 2.25rem;
}

/* ─── Sección "estado" ─── */
.status { padding: 4rem 0 6rem; }
.status__grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.status__card {
  padding: 1.75rem;
  border-radius: 1.25rem;
  background: var(--sand-100);
  border: 1px solid var(--sand-300);
}
.status__card-eyebrow {
  font: 700 .7rem/1 var(--font-corp);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--brand);
  display: block;
  margin-bottom: .75rem;
}
.status__card-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 .5rem;
}
.status__card-body {
  margin: 0;
  font-size: .95rem;
  color: rgba(0, 31, 63, 0.7);
}

/* ============================================================
 * FOOTER
 * ============================================================ */
.site-footer {
  background: var(--ocean-900);
  color: rgba(255, 255, 255, 0.75);
  padding: 6rem 0 2rem;
  font-size: .9rem;
  position: relative;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}
@media (min-width: 768px)  { .site-footer__grid { grid-template-columns: 2fr 1fr 1fr; } }
@media (min-width: 1024px) { .site-footer__grid { grid-template-columns: 2.2fr 1fr 1fr 1.5fr; } }

.site-footer__wordmark {
  display: inline-block;
  font: 500 1.8rem/1 var(--font-serif);
  color: #fff;
  margin-bottom: 1.25rem;
}
.site-footer__wordmark em {
  font-style: italic; font-weight: 300; color: var(--brand-cyan);
}
.site-footer__pitch {
  margin: 0 0 1.5rem;
  max-width: 22rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
}
.site-footer__heading {
  font: 700 .7rem/1 var(--font-corp);
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 1.5rem;
}
.site-footer__list { display: flex; flex-direction: column; gap: .85rem; }
.site-footer__list a { color: rgba(255, 255, 255, 0.78); transition: color .2s; }
.site-footer__list a:hover { color: var(--brand-cyan); }

.site-footer__contact {
  display: flex; flex-direction: column; gap: .9rem;
  font-size: .9rem;
}
.site-footer__contact li {
  display: flex; align-items: flex-start; gap: .65rem;
  color: rgba(255, 255, 255, 0.85);
}
.site-footer__contact svg { flex-shrink: 0; margin-top: .2rem; opacity: .75; }
.site-footer__contact a:hover { color: var(--brand-cyan); }

.site-footer__newsletter {
  display: flex; align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: .35rem 0;
  margin-bottom: 1.5rem;
}
.site-footer__newsletter input {
  flex: 1;
  background: transparent;
  border: 0;
  color: #fff;
  font: inherit;
  padding: .5rem 0;
}
.site-footer__newsletter input::placeholder { color: rgba(255, 255, 255, 0.55); }
.site-footer__newsletter input:focus { outline: none; }
.site-footer__newsletter button {
  display: inline-flex; align-items: center;
  color: rgba(255, 255, 255, 0.85);
  transition: color .2s, transform .2s;
}
.site-footer__newsletter button:hover { color: var(--brand-cyan); transform: translateX(2px); }

.site-footer__social {
  display: flex; gap: 1rem;
}
.site-footer__social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  transition: background .2s, color .2s;
}
.site-footer__social a:hover { background: var(--brand); color: #fff; }

.site-footer__funding {
  padding: 1.25rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: .8rem;
  color: rgba(255, 255, 255, 0.6);
}
.site-footer__funding p { margin: 0; }

.site-footer__bottom {
  padding-top: 2rem;
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  gap: 1rem;
  font-size: .8rem;
  color: rgba(255, 255, 255, 0.7);
}
.site-footer__bottom p { margin: 0; }
.site-footer__logo { height: 2.5rem; opacity: .9; }

/* ============================================================
 * BOTTOM NAV (mobile)
 * ============================================================ */
.bottom-nav {
  position: fixed;
  left: 1rem; right: 1rem; bottom: 1rem;
  z-index: 40;
}
@media (min-width: 1024px) { .bottom-nav { display: none; } }

.bottom-nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: .35rem;
  border-radius: 1.5rem;
  background: rgba(0, 31, 63, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 32px -12px rgba(0, 0, 0, 0.35);
}
.bottom-nav__item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: .65rem .4rem;
  border-radius: 1rem;
  color: rgba(255, 255, 255, 0.8);
  transition: background .2s, color .2s;
}
.bottom-nav__item:hover,
.bottom-nav__item:focus-visible { color: var(--brand-cyan); background: rgba(255, 255, 255, 0.08); }
.bottom-nav__item svg { margin-bottom: .25rem; }
.bottom-nav__item span {
  font: 700 .58rem/1 var(--font-corp);
  letter-spacing: .15em;
  text-transform: uppercase;
}

/* Para que el bottom-nav no tape el final del footer en mobile */
@media (max-width: 1023px) {
  body { padding-bottom: 5rem; }
}

/* ============================================================
 * Animaciones
 * ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up { animation: fadeInUp .8s ease-out both; }
.animate-fade-in-up--1 { animation: fadeInUp .8s ease-out .2s both; }
.animate-fade-in-up--2 { animation: fadeInUp .8s ease-out .4s both; }
.animate-fade-in-up--3 { animation: fadeInUp .8s ease-out .6s both; }
