/* =============================================================
   HigherX Global — styles.css
   1. Tokens
   ============================================================= */
:root {
  --bg:        #0A1428;               /* navy de marca */
  --bg-2:      #0D1A33;
  --bg-card:   #101F3D;
  --cream:     #F4EDDF;               /* crema de marca */
  --cream-2:   #DDD4C0;
  --mute:      #97A0B4;
  --gold:      #C6A15B;
  --gold-2:    #A98643;
  --paper:     #F4EDDF;               /* sección clara */
  --ink:       #101B2E;               /* texto sobre crema */
  --ink-mute:  #4E5568;
  --line:      rgba(244, 237, 223, 0.14);
  --line-dark: rgba(16, 27, 46, 0.16);

  --display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif; /* display moderno-minimalista */
  --sans:  "Inter", "Helvetica Neue", Arial, sans-serif;
  --brand: "Poppins", "Helvetica Neue", Arial, sans-serif;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --nav-h: 76px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.65;
  color: var(--cream);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; }
::selection { background: var(--gold); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}

/* =============================================================
   3. Utilities
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: 0.6rem 1rem;
  background: var(--cream); color: var(--bg);
  z-index: 9999; border-radius: 8px; font-weight: 500;
  transition: top 0.25s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

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

/* Reveal on scroll — solo se oculta si JS está activo (html.js);
   sin JS el contenido queda visible. Red extra: timeout de 6s en main.js */
html.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
html.js .reveal.is-visible { opacity: 1; transform: none; }
html.js .reveal[data-split] { opacity: 1; transform: none; }

/* =============================================================
   4. Typography
   ============================================================= */
.kicker {
  font-family: var(--brand);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.1rem;
}
h1, h2 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
}
h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h1 em, h2 em {
  font-style: normal;
  font-weight: 300;
  color: var(--gold);
}
h3 {
  font-family: var(--brand);
  font-weight: 500;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}
.lead {
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  line-height: 1.75;
  color: var(--cream-2);
  max-width: 58ch;
}

.section-head { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }

/* =============================================================
   5. Components
   ============================================================= */
.btn {
  display: inline-block;
  font-family: var(--brand);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.95rem 2rem;
  border-radius: 2px;
  transition: background 0.35s var(--ease-out), color 0.35s var(--ease-out),
              border-color 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.btn:hover { transform: translateY(-2px); }
.btn-gold {
  background: var(--gold);
  color: var(--bg);
}
.btn-gold:hover { background: var(--cream); }
.btn-ghost {
  border: 1px solid var(--line);
  color: var(--cream);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-outline {
  border: 1px solid var(--line);
  padding: 0.6rem 1.3rem;
  font-size: 0.72rem;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

/* =============================================================
   6. Nav
   ============================================================= */
.nav {
  position: fixed;
  inset-inline: 0; top: 0;
  z-index: 100;
  transition: background 0.4s var(--ease-soft), border-color 0.4s var(--ease-soft),
              box-shadow 0.4s var(--ease-soft);
  border-bottom: 1px solid transparent;
}
.nav.is-solid {
  background: rgba(10, 20, 40, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.nav-logo {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  font-family: var(--brand);
  line-height: 1;
}
.nav-logo-word {
  font-size: 1.42rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.nav-logo-sub {
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
}
.nav-links {
  display: none;
  gap: 2.2rem;
}
.nav-links a {
  font-family: var(--brand);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-2);
  position: relative;
  padding-block: 0.3rem;
  transition: color 0.3s var(--ease-out);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}
.nav-links a:hover { color: var(--cream); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-actions { display: flex; align-items: center; gap: 1rem; }
.nav-lang {
  font-family: var(--brand);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--gold);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.45rem 0.75rem;
  transition: border-color 0.3s var(--ease-out), background 0.3s var(--ease-out);
}
.nav-lang:hover { border-color: var(--gold); }
.nav-cta { display: none; }

.nav-burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 40px; height: 40px;
  padding: 8px;
}
.nav-burger span {
  display: block;
  height: 1.5px;
  background: var(--cream);
  transition: transform 0.35s var(--ease-out), opacity 0.35s var(--ease-out);
}
.nav-burger[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

.nav-mobile {
  display: grid;
  gap: 0;
  overflow: hidden;
  max-height: 0;
  background: rgba(10, 20, 40, 0.97);
  border-bottom: 1px solid transparent;
  transition: max-height 0.5s var(--ease-out), border-color 0.5s var(--ease-out);
}
.nav-mobile.is-open {
  max-height: 320px;
  border-bottom-color: var(--line);
}
.nav-mobile a {
  font-family: var(--brand);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 1rem var(--gutter);
  border-top: 1px solid var(--line);
  color: var(--cream-2);
}
.nav-mobile a:hover { color: var(--gold); }

@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-block; }
  .nav-burger, .nav-mobile { display: none; }
}

/* =============================================================
   7. Hero
   ============================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 3rem) var(--gutter) 5rem;
}
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: grayscale(1) contrast(1.05) brightness(0.9);
  transform: scale(1.08);
  animation: heroZoom 26s var(--ease-soft) forwards;
}
@keyframes heroZoom {
  to { transform: scale(1); }
}
.hero-tint {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,20,40,0.82) 0%, rgba(10,20,40,0.62) 45%, rgba(10,20,40,0.92) 100%),
    radial-gradient(90% 60% at 50% 42%, rgba(10,20,40,0.15) 0%, rgba(10,20,40,0.72) 100%);
}
.hero-inner {
  position: relative;
  max-width: 880px;
}
.hero-title {
  font-size: clamp(2.4rem, 6.4vw, 4.9rem);
  max-width: 16ch;
  margin-inline: auto;
}
.hero-sub {
  margin: 1.8rem auto 0;
  max-width: 54ch;
  font-size: clamp(1rem, 1.5vw, 1.14rem);
  line-height: 1.8;
  color: var(--cream-2);
}
.hero-actions {
  margin-top: 2.6rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}
.hero-meta {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--brand);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--mute);
  white-space: nowrap;
}
/* hairline dorado bajo el hero */
.hero::after {
  content: "";
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: min(72%, 720px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-2), transparent);
  opacity: 0.7;
}

/* =============================================================
   8. Sections
   ============================================================= */
.section { padding-block: clamp(4.5rem, 10vw, 8rem); }

/* --- Nosotros --- */
.section-nosotros { background: var(--bg); }
.nosotros-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
}
.nosotros-figure {
  position: relative;
  overflow: hidden;
  border-radius: 3px;
}
.nosotros-figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,20,40,0.05), rgba(10,20,40,0.35));
}
.nosotros-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 1.2s var(--ease-soft);
}
.nosotros-figure:hover img { transform: scale(1.04); }
.pilares {
  margin-top: 2.8rem;
  display: grid;
  gap: 2rem;
}
.pilar {
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
}
.pilar-num {
  font-family: var(--brand);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--gold);
}
.pilar h3 { margin: 0.5rem 0 0.5rem; }
.pilar p { color: var(--mute); font-size: 0.94rem; }

/* --- Proceso --- */
.section-proceso {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}
.proceso-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  counter-reset: paso;
}
.paso {
  background: var(--bg-2);
  padding: 2rem 1.8rem 2.2rem;
  position: relative;
  transition: background 0.4s var(--ease-out);
}
.paso:hover { background: var(--bg-card); }
.paso-num {
  font-family: var(--display);
  font-weight: 300;
  font-size: 2.1rem;
  color: var(--gold);
  opacity: 0.55;
  line-height: 1;
}
.paso h3 { margin: 1rem 0 0.55rem; }
.paso p { color: var(--mute); font-size: 0.93rem; }

/* --- Servicios --- */
.section-servicios { background: var(--bg); }
.servicios-grid {
  display: grid;
  gap: clamp(1.2rem, 2.5vw, 2rem);
}
.servicio-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
  transition: border-color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.servicio-card:hover {
  border-color: rgba(198, 161, 91, 0.45);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.55);
}
/* halo dorado que sigue el cursor (variables set por JS) */
.servicio-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(420px circle at var(--hx, 50%) var(--hy, 50%),
              rgba(198, 161, 91, 0.14), transparent 65%);
  opacity: 0;
  transition: opacity 0.45s var(--ease-out);
  pointer-events: none;
}
.servicio-card:hover::before { opacity: 1; }
.servicio-media {
  overflow: hidden;
  height: 210px;
}
.servicio-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.55) contrast(1.02) brightness(0.88);
  transition: transform 1s var(--ease-soft), filter 1s var(--ease-soft);
}
.servicio-card:hover .servicio-media img {
  transform: scale(1.06);
  filter: saturate(0.85) contrast(1.04) brightness(0.95);
}
.servicio-body { padding: 1.7rem 1.7rem 2rem; }
.servicio-tag {
  font-family: var(--brand);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.7rem;
}
.servicio-body h3 {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.servicio-body p {
  margin-top: 0.7rem;
  color: var(--mute);
  font-size: 0.94rem;
}

/* --- Por qué --- */
.section-porque {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}
.porque-grid {
  margin-top: 2.5rem;
  display: grid;
  gap: 2.2rem;
}
.porque-item {
  border-left: 1px solid var(--gold-2);
  padding-left: 1.4rem;
}
.porque-item h3 { color: var(--cream); }
.porque-item p { color: var(--mute); font-size: 0.93rem; margin-top: 0.4rem; }

/* --- Cumplimiento (sección clara) --- */
.section-cumplimiento {
  background: var(--paper);
  color: var(--ink);
}
.section-cumplimiento .kicker { color: var(--gold-2); }
.section-cumplimiento h2 em { color: var(--gold-2); }
.section-cumplimiento .lead { color: var(--ink); }
.cumplimiento-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.cumplimiento-lista {
  margin-top: 2.4rem;
  display: grid;
  gap: 1.6rem;
}
.cumplimiento-lista li {
  border-top: 1px solid var(--line-dark);
  padding-top: 1.2rem;
}
.cumplimiento-lista h3 { color: var(--ink); }
.cumplimiento-lista p { color: var(--ink-mute); font-size: 0.94rem; margin-top: 0.35rem; }
.cumplimiento-nota {
  background: var(--bg);
  color: var(--cream-2);
  border-radius: 3px;
  padding: 2rem 1.9rem;
  font-size: 0.9rem;
  line-height: 1.75;
  position: relative;
}
.cumplimiento-nota::before {
  content: "";
  position: absolute;
  top: 0; left: 1.9rem;
  width: 56px; height: 3px;
  background: var(--gold);
}

/* --- Contacto --- */
.section-contacto {
  position: relative;
  overflow: hidden;
}
.contacto-bg {
  position: absolute;
  inset: 0;
}
.contacto-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.4) brightness(0.6);
}
.contacto-tint {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,20,40,0.96) 0%, rgba(10,20,40,0.88) 55%, rgba(10,20,40,0.94) 100%);
}
.section-contacto .container { position: relative; }
.contacto-grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
}
.contacto-datos {
  margin-top: 2.4rem;
  display: grid;
  gap: 1.4rem;
}
.contacto-datos dt {
  font-family: var(--brand);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.25rem;
}
.contacto-datos dd { font-size: 1rem; color: var(--cream-2); }
.contacto-datos a { border-bottom: 1px solid var(--line); transition: color 0.3s, border-color 0.3s; }
.contacto-datos a:hover { color: var(--gold); border-color: var(--gold); }

.contacto-card {
  background: rgba(16, 31, 61, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: clamp(2rem, 4vw, 3rem);
  display: grid;
  gap: 1.4rem;
  justify-items: start;
  align-content: center;
  position: relative;
}
.contacto-card::before {
  content: "";
  position: absolute;
  top: 0; left: clamp(2rem, 4vw, 3rem);
  width: 56px; height: 3px;
  background: var(--gold);
}
.contacto-card-label {
  font-family: var(--brand);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
}
.contacto-card-email {
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--cream);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.2rem;
  transition: color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
  overflow-wrap: anywhere;
}
.contacto-card-email:hover { color: var(--gold); border-color: var(--gold); }
.contacto-card-btn { margin-top: 0.4rem; }
.contacto-card-note {
  font-size: 0.8rem;
  color: var(--mute);
}

/* =============================================================
   9. Footer
   ============================================================= */
.footer {
  background: #081020;
  border-top: 1px solid var(--line);
  padding: clamp(3rem, 6vw, 4.5rem) 0 2rem;
  font-size: 0.9rem;
}
.footer-top {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}
.footer-logo {
  font-family: var(--brand);
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.footer-logo-sub {
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
}
.footer-desc {
  margin-top: 0.9rem;
  color: var(--mute);
  max-width: 34ch;
}
.footer-nav { display: grid; gap: 0.55rem; align-content: start; }
.footer-nav-title {
  font-family: var(--brand);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.4rem;
}
.footer-nav a, .footer-contact a {
  color: var(--mute);
  transition: color 0.3s var(--ease-out);
}
.footer-nav a:hover, .footer-contact a:hover { color: var(--cream); }
.footer-contact { display: grid; gap: 0.55rem; align-content: start; }
.footer-contact p { color: var(--mute); }
.footer-legal {
  padding-block: 2rem;
  border-bottom: 1px solid var(--line);
}
.footer-legal-title {
  font-family: var(--brand);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.7rem;
}
.footer-legal p:not(.footer-legal-title) {
  color: var(--mute);
  font-size: 0.8rem;
  line-height: 1.7;
  max-width: 90ch;
}
.footer-bottom {
  padding-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: baseline;
  color: var(--mute);
  font-size: 0.8rem;
}
.footer-credits summary {
  cursor: pointer;
  color: var(--mute);
  transition: color 0.3s;
}
.footer-credits summary:hover { color: var(--cream); }
.footer-credits ul {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.3rem;
  font-size: 0.74rem;
}
.footer-credits a { text-decoration: underline; text-underline-offset: 2px; }
.footer-credits a:hover { color: var(--cream); }

/* =============================================================
   10. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .proceso-grid { grid-template-columns: repeat(2, 1fr); }
  .servicios-grid { grid-template-columns: repeat(2, 1fr); }
  .porque-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (min-width: 960px) {
  .nosotros-grid { grid-template-columns: 1.05fr 1fr; align-items: start; }
  .nosotros-figure { position: sticky; top: calc(var(--nav-h) + 2rem); }
  .nosotros-figure img { aspect-ratio: 4 / 3; }
  .pilares { margin-top: 3.2rem; }
  .proceso-grid { grid-template-columns: repeat(4, 1fr); }
  .porque-grid { grid-template-columns: repeat(4, 1fr); }
  .cumplimiento-grid { grid-template-columns: 1.5fr 1fr; }
  .contacto-grid { grid-template-columns: 1fr 1.05fr; align-items: center; }
}
@media (min-width: 1280px) {
  .servicio-media { height: 240px; }
}

/* =============================================================
   11. Reduced motion — solo efectos intrusivos
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero-bg img { animation: none; transform: none; }
  /* hovers, reveals y transiciones se mantienen */
}
