/* ===== Reset básico ===== */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: 'Roboto Condensed', system-ui, -apple-system, Segoe UI, Roboto,
    Arial, sans-serif;
  color: #0b2b3a;
  background: #fff;
}

/* ===== Tokens ===== */
:root {
  --container: 1200px;
  --header-h: 86px;

  --ink: #0b2b3a;
  --muted: #3a5662;
  --brand: #0aa0c8; /* acento */
  --brand-2: #0f6f8e; /* azul profundo */

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --shadow: 0 18px 60px rgba(7, 7, 54, 0.12);
}

.container {
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(11, 43, 58, 0.06);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand img {
  height: 42px;
  width: auto;
  display: block;
}

.nav {
  display: flex;
  gap: 26px;
  margin-left: 26px;
}

.nav-link {
  color: rgba(11, 43, 58, 0.72);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.2px;
  position: relative;
  padding: 10px 2px;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 4px;
  height: 2px;
  width: 100%;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms var(--ease);
  opacity: 0.85;
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.account-pill {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-2), var(--brand));
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.account-ico {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  display: inline-block;
  position: relative;
}
.account-ico::after {
  content: '';
  position: absolute;
  inset: 7px 9px 9px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
}
.sep {
  opacity: 0.75;
}

/* Burger (mobile) */
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  border-radius: 12px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  margin: 7px 10px;
  background: rgba(11, 43, 58, 0.7);
  border-radius: 2px;
  transition: transform 240ms var(--ease), opacity 240ms var(--ease);
}

/* ===== Mobile Nav Overlay (NEW) =====
   Requiere: <div class="nav-backdrop" aria-hidden="true"></div>
   (idealmente justo después del header)
*/
.nav-backdrop {
  display: none; /* solo se usa en mobile */
}

@media (max-width: 760px) {
  /* Backdrop */
  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgb(255, 255, 255);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 15;
    transition: opacity 180ms var(--ease), visibility 180ms var(--ease);
  }

  body.is-nav-open .nav-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* Panel */
  .nav {
    display: grid; /* reemplaza el display:none anterior */
    position: fixed;
    inset: var(--header-h) 0 0 0;
    margin-left: 0;
    padding: 22px 18px;

    gap: 14px;
    align-content: start;

    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    border-top: 1px solid rgba(11, 43, 58, 0.08);

    /* estado cerrado */
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    z-index: 16;
  }

  body.is-nav-open .nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  /* Links con look más “tap friendly” */
  .nav-link {
    padding: 14px 10px;
    border-radius: 14px;
  }
  .nav-link::after {
    bottom: 8px;
  }
  .nav-link:hover {
    background: rgba(10, 160, 200, 0.08);
  }

  /* Burger -> X */
  body.is-nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  body.is-nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }
  body.is-nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  /* Prevent scroll when menu open */
  body.is-nav-open {
    overflow: hidden;
    touch-action: none;
  }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;  
  object-position: 76% center; /* ajusta según tu imagen */
  transform: scale(1.02);
  filter: saturate(1.02);
  opacity: 0.92;
}

.hero-fade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      900px 520px at 18% 52%,
      rgba(255, 255, 255, 0.94),
      rgba(255, 255, 255, 0.7) 55%,
      rgba(255, 255, 255, 0.4) 75%,
      rgba(255, 255, 255, 0) 100%
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.92) 0%,
      rgba(255, 255, 255, 0.7) 40%,
      rgba(255, 255, 255, 0) 72%
    );
}

/* Decor (+) */
.hero-decor {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.6;
}

.plus {
  position: absolute;
  width: 60px;
  height: 60px;
  opacity: 0.35;
}
.plus::before,
.plus::after {
  content: '';
  position: absolute;
  background: rgba(10, 160, 200, 0.75);
  border-radius: 4px;
}

/* barra vertical */
.plus::before {
  width: 20%;
  height: 100%;
  left: 40%;
  top: 0;
}

/* barra horizontal */
.plus::after {
  height: 20%;
  width: 100%;
  top: 40%;
  left: 0;
}

/* tamaños */
.plus--xl {
  width: 110px;
  height: 110px;
}
.plus--lg {
  width: 80px;
  height: 80px;
}
.plus--md {
  width: 56px;
  height: 56px;
}
.plus--sm {
  width: 34px;
  height: 34px;
}
.plus--xs {
  width: 18px;
  height: 18px;
}

/* posiciones (ajústalas a tu gusto) */
.plus--xl {
  left: 5%;
  top: 16%;
}
.plus--lg {
  left: 9%;
  bottom: 14%;
}
.plus--md {
  left: 44%;
  top: 22%;
}
.plus--sm {
  left: 36%;
  bottom: 18%;
}
.plus--xs {
  left: 58%;
  bottom: 32%;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  padding: clamp(26px, 4vw, 64px) 0;
  align-items: center;
}

.hero-copy {
  max-width: 620px;
}

.hero-title {
  margin: 0;
  font-size: clamp(40px, 4.3vw, 76px);
  line-height: 1.03;
  letter-spacing: -0.6px;
}

.accent {
  color: var(--brand);
}

.hero-rule {
  width: 140px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-2), var(--brand));
  margin: 22px 0 18px;
  opacity: 0.95;
}

.hero-sub {
  margin: 0;
  font-size: clamp(16px, 1.25vw, 20px);
  line-height: 1.55;
  color: rgba(11, 43, 58, 0.78);
  max-width: 520px;
}

.hero-actions {
  margin-top: 26px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.2px;
  transition:
    transform 180ms var(--ease),
    box-shadow 180ms var(--ease),
    background 180ms var(--ease);
  will-change: transform;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, var(--brand-2), var(--brand));
  box-shadow: var(--shadow);
}
.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-ghost {
  color: rgba(11, 43, 58, 0.86);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(11, 43, 58, 0.1);
}
.btn-ghost:hover {
  transform: translateY(-2px);
}

/* ===== Animación de entrada (discreta) ===== */
.hero [data-anim] {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 520ms var(--ease),
    transform 520ms var(--ease);
}

.hero.is-ready [data-anim] {
  opacity: 1;
  transform: translateY(0);
}

.hero .stagger-1 {
  transition-delay: 80ms;
}
.hero .stagger-2 {
  transition-delay: 160ms;
}
.hero .stagger-3 {
  transition-delay: 240ms;
}
.hero .stagger-4 {
  transition-delay: 320ms;
}

/* ===== Page Curtain (entrada) ===== */
.page-curtain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;

  /* visible al inicio */
  opacity: 1;
  visibility: visible;
}

.curtain-panel {
  position: absolute;
  inset: 0;
  background: #ffffff;
  transform: translate3d(0, 0, 0);
}

.curtain-brand {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.curtain-brand img {
  width: min(240px, 40vw);
  height: auto;
  opacity: 0; /* GSAP lo anima */
  transform: scale(0.98); /* GSAP lo anima */
  will-change: transform, opacity;
}

/* Accesibilidad: sin animaciones */
@media (prefers-reduced-motion: reduce) {
  .hero [data-anim] {
    transition: none !important;
    opacity: 1;
    transform: none;
  }

  .page-curtain {
    display: none !important;
  }
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-bg img {
    object-position: center center;
  }
  .account-pill {
    display: none;
  }
  .nav {
    margin-left: auto;
  }
}


/* Tablet */
@media (max-width: 768px) {
  .hero-decor {
    opacity: 0.45;
  }

  /* reduce todos los plus base */
  .plus {
    width: 44px;
    height: 44px;
    opacity: 0.30;
  }

  /* tamaños (tablet) */
  .plus--xl { width: 84px; height: 84px; }
  .plus--lg { width: 64px; height: 64px; }
  .plus--md { width: 44px; height: 44px; }
  .plus--sm { width: 28px; height: 28px; }
  .plus--xs { width: 14px; height: 14px; }

  /* posiciones (tablet) */
  .plus--xl { left: 3%;  top: 12%; }
  .plus--lg { left: 6%;  bottom: 10%; }
  .plus--md { left: 52%; top: 14%; }
  .plus--sm { left: 34%; bottom: 12%; }
  .plus--xs { left: 66%; bottom: 22%; }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-block;
  }
  .hero-title {
    font-size: clamp(34px, 9vw, 46px);
  }
  .hero-rule {
    width: 120px;
  }
  .container {
    width: min(var(--container), calc(100% - 34px));
  }
}

/* Mobile */
@media (max-width: 480px) {
  .hero-decor {
    opacity: 0.35;
  }

  .plus {
    width: 34px;
    height: 34px;
    opacity: 0.26;
  }

  /* tamaños (mobile) */
  .plus--xl { width: 58px; height: 58px; }
  .plus--lg { width: 44px; height: 44px; }
  .plus--md { width: 34px; height: 34px; }
  .plus--sm { width: 22px; height: 22px; }
  .plus--xs { width: 12px; height: 12px; }

  /* posiciones (mobile) */
  .plus--xl { left: 2%;  top: 10%; }
  .plus--lg { left: 4%;  bottom: 8%; }
  .plus--md { left: 60%; top: 12%; }
  .plus--sm { left: 30%; bottom: 10%; }
  .plus--xs { left: 74%; bottom: 18%; }
}
