/**
 * Estilos críticos para header/menú y hero — disponibles antes de Tailwind CDN.
 * Evita FOUC en conexiones lentas. Mantener alineado con partials/header.html.
 */

/* Shell de página */
html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #fff;
  color: #1f2937;
}

#main-content {
  flex: 1 1 0%;
}

/* Header / navegación */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0.75rem 0;
  background-color: rgba(30, 35, 48, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.site-header .site-header-bar {
  box-sizing: border-box;
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 2.5rem;
  align-items: center;
}

.site-header a {
  color: inherit;
  text-decoration: none;
}

.site-header .brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  grid-column: 1;
  overflow: hidden;
}

.site-header .brand-link img {
  display: block;
  height: 72px;
  width: auto;
  max-width: min(100%, 220px);
  flex-shrink: 0;
  object-fit: contain;
  object-position: left;
}

.site-header .brand-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  text-align: left;
}

.site-header .brand-title {
  font-size: 1.75rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #fff;
}

.site-header .brand-tagline {
  font-size: 0.875rem;
  line-height: 1.35;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.site-header .site-header-bar > nav {
  display: none;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
  flex-wrap: nowrap;
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.site-header .site-header-bar > nav .nav-link,
.site-header .site-header-bar > nav [data-dropdown-trigger] {
  white-space: nowrap;
}

.site-header #nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 0.5rem;
  color: #fff;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
}

#mobile-menu {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background-color: #1a1f2b;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

#mobile-menu nav {
  box-sizing: border-box;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}

#mobile-menu a {
  display: block;
  padding: 0.75rem;
  border-radius: 0.5rem;
  color: inherit;
  text-decoration: none;
}

#mobile-menu:not(.hidden) {
  display: block;
}

@media (min-width: 768px) {
  .site-header .site-header-bar > nav {
    display: flex;
  }

  .site-header #nav-toggle {
    display: none;
  }

  .site-header .brand-tagline {
    white-space: nowrap;
  }

  #mobile-menu {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  .site-header .site-header-bar {
    column-gap: 3rem;
  }

  .site-header .brand-link img {
    height: 84px;
    max-width: min(100%, 280px);
  }

  .site-header .brand-title {
    font-size: 2rem;
  }

  .site-header .brand-tagline {
    font-size: 0.9375rem;
  }

  .site-header .site-header-bar > nav {
    gap: 1.25rem;
    font-size: 1rem;
  }
}

@media (min-width: 1280px) {
  .site-header .brand-link img {
    height: 96px;
    max-width: min(100%, 320px);
  }

  .site-header .brand-title {
    font-size: 2.25rem;
  }

  .site-header .brand-tagline {
    font-size: 1rem;
  }

  .site-header .site-header-bar > nav {
    gap: 1.5rem;
  }
}

@media (min-width: 640px) {
  .site-header .brand-link {
    gap: 1rem;
  }
}

/* Hero inicio — above the fold */
.inicio-hero {
  padding: 3rem 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.inicio-hero .container {
  box-sizing: border-box;
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.inicio-hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.inicio-hero-copy {
  order: 2;
}

.inicio-hero-visual {
  order: 1;
}

.inicio-hero-visual img {
  display: block;
  width: 100%;
  max-height: 22rem;
  object-fit: cover;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.inicio-hero-kicker {
  margin: 0 0 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #0e7490;
}

.inicio-hero h1 {
  margin: 0 0 1.5rem;
  font-size: 2.25rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #0f172a;
}

.inicio-hero h1 span {
  color: #0891b2;
}

.inicio-hero-lead {
  margin: 0 0 1.5rem;
  font-size: 1.25rem;
  line-height: 1.375;
  font-weight: 500;
  color: #475569;
}

.inicio-hero-body {
  margin: 0 0 1.5rem;
  max-width: 36rem;
  font-size: 1rem;
  line-height: 1.625;
  color: #475569;
}

/* Above the fold: visible de inmediato (reveal en main.css empieza en opacity:0) */
.inicio-hero .reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

@media (min-width: 768px) {
  .inicio-hero {
    padding: 5rem 0;
  }

  .inicio-hero h1 {
    font-size: 3rem;
  }

  .inicio-hero-lead {
    font-size: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .inicio-hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }

  .inicio-hero-copy {
    order: 1;
  }

  .inicio-hero-visual {
    order: 2;
  }

  .inicio-hero-visual img {
    max-height: 26rem;
  }
}