/* =============================================================
   1. Tokens
   ============================================================= */
:root{
  --bg:        #14171C;
  --bg-2:      #1B212A;
  --bg-3:      #232B36;
  --bg-4:      #2A3340;
  --cream:     #EDEAE3;
  --cream-2:   #CFCABD;
  --cream-3:   #8B93A1;
  --accent:    #E4A23A;
  --accent-2:  #B87F2A;
  --gold:      #F0C275;
  --ink-on-accent: #211705;
  --line:      #2C333F;
  --line-soft: rgba(237,234,227,.12);

  --display: 'Barlow Condensed', 'Segoe UI', sans-serif;
  --sans: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', 'Consolas', monospace;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --nav-h: 78px;
  --container: 1240px;

  --mesh-angle: 0deg;
  --mesh-x: 30%;
  --mesh-y: 40%;
}

@property --mesh-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@property --mesh-x     { syntax: "<percentage>"; inherits: false; initial-value: 50%; }
@property --mesh-y     { syntax: "<percentage>"; inherits: false; initial-value: 50%; }

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  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; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.01em; font-family: var(--display); font-weight: 600; }
ul { list-style: none; padding: 0; }
::selection { background: var(--accent); color: var(--ink-on-accent); }

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

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

.section-inner, .nav-inner, .footer-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 6vw;
}
.section { position: relative; padding-block: clamp(4rem, 9vw, 7.5rem); }
.kicker {
  font-family: var(--mono);
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); font-weight: 500; margin-bottom: 1rem;
}
.section-head { max-width: 640px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-title { font-size: clamp(1.9rem, 4vw, 3rem); margin-bottom: .6rem; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--cream-2); max-width: 54ch; }
.closing-line {
  font-family: var(--display); font-size: clamp(1.2rem, 2vw, 1.5rem);
  color: var(--cream-2); font-weight: 500; margin-top: 2.5rem; max-width: 46ch;
}
.closing-line.centered, .check-list.centered { margin-inline: auto; text-align: center; }

.check-list { display: grid; gap: .65rem; margin-top: 1.6rem; }
.check-list li {
  position: relative; padding-left: 1.8rem;
  color: var(--cream-2); font-size: 1.02rem;
}
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .45em;
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(228,162,58,.15);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.check-list.centered li { padding-left: 0; }
.check-list.centered li::before { display: none; }

/* =============================================================
   4. Typography effects
   ============================================================= */
[data-reveal] {
  opacity: 0; transform: translateY(34px);
  transition: opacity .8s var(--ease-soft), transform .8s var(--ease-soft);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }
/* Defensive: elements with both reveal + split must never get stuck invisible */
[data-reveal][data-split] { opacity: 1; transform: none; }

.split-word { display: inline-block; will-change: transform, opacity; }

/* =============================================================
   5. Components
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-weight: 600; font-size: .95rem;
  padding: .95rem 1.8rem; border-radius: 7px;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  transition: transform .45s var(--ease-soft), box-shadow .45s var(--ease-soft), background .2s var(--ease-out), border-color .2s var(--ease-out);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px); transition-duration: .12s; }
.btn-primary { background: var(--accent); color: var(--ink-on-accent); }
.btn-primary:hover { background: var(--gold); box-shadow: 0 20px 40px rgba(228,162,58,.22), 0 8px 18px rgba(0,0,0,.3); }
.btn-ghost { border: 1px solid var(--line); color: var(--cream); background: rgba(237,234,227,.02); }
.btn-ghost:hover { border-color: var(--accent-2); }

.has-tilt {
  --rx: 0deg; --ry: 0deg;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .55s var(--ease-soft), border-color .3s;
}
.has-tilt:hover { transition-duration: .15s; }

/* =============================================================
   6. Nav
   ============================================================= */
.nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 200;
  transition: background-color .4s var(--ease-out), backdrop-filter .4s var(--ease-out), border-color .4s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(20,23,28,.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-color: var(--line);
}
.nav-inner {
  display: flex; align-items: center; gap: 2rem;
  height: var(--nav-h);
}
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-mark { width: auto; height: 30px; }
.footer-brand .brand-mark { height: 24px; }
.brand-word {
  font-family: var(--display); font-weight: 700; font-size: 1.05rem;
  letter-spacing: .04em; text-transform: uppercase; color: var(--cream);
}
.brand-word .fregosi { color: var(--accent); }

.nav-links { display: none; align-items: center; gap: 1.9rem; }
.nav-link { position: relative; font-size: .92rem; font-weight: 500; padding: .3rem 0; color: var(--cream-2); }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease-out);
}
.nav-link:hover { color: var(--cream); }
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-cta { display: none; padding: .7rem 1.4rem; font-size: .88rem; }
.nav-login { display: none; padding: .65rem 1.2rem; font-size: .85rem; box-shadow: none; }

.nav-burger {
  width: 40px; height: 40px; display: grid; place-items: center; gap: 5px;
  margin-left: auto;
}
.nav-burger span {
  width: 20px; height: 2px; background: var(--cream);
  transition: transform .35s var(--ease-soft), opacity .25s;
  display: block;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 190;
  background: var(--bg-2);
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1.4rem;
  padding: 2rem 6vw;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .6s var(--ease-soft);
}
.nav-mobile.is-open { clip-path: inset(0); }
.nav-mobile-link { font-family: var(--display); font-size: 1.7rem; font-weight: 600; color: var(--cream); }
.nav-mobile-link:hover { color: var(--accent); }
.nav-mobile .btn { margin-top: .6rem; }

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

/* =============================================================
   7. Hero
   ============================================================= */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  overflow: clip;
  isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; z-index: -3; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.hero-bg-tint {
  position: absolute; inset: 0;
  background:
    linear-gradient(0deg, rgba(20,23,28,.97) 0%, rgba(20,23,28,.72) 38%, rgba(20,23,28,.38) 68%, rgba(20,23,28,.55) 100%),
    linear-gradient(90deg, rgba(20,23,28,.55) 0%, transparent 45%);
}
.hero-mesh {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(55% 45% at var(--mesh-x) var(--mesh-y), rgba(228,162,58,.28), transparent 62%),
    conic-gradient(from var(--mesh-angle), rgba(240,194,117,.14), transparent 30%, rgba(184,127,42,.14), transparent 70%);
  filter: blur(90px) saturate(120%);
  opacity: .8;
  mix-blend-mode: screen;
  animation: meshShift 24s linear infinite;
}
@keyframes meshShift {
  0%   { --mesh-angle: 0deg;   --mesh-x: 24%; --mesh-y: 30%; }
  50%  { --mesh-angle: 180deg; --mesh-x: 68%; --mesh-y: 55%; }
  100% { --mesh-angle: 360deg; --mesh-x: 24%; --mesh-y: 30%; }
}
.hero-grain {
  position: absolute; inset: 0; z-index: -1;
  pointer-events: none; opacity: .1; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
}

.hero-inner {
  position: relative; z-index: 1;
  max-width: var(--container); margin-inline: auto;
  padding: calc(var(--nav-h) + 3rem) 6vw 4.5rem;
  width: 100%;
}
.hero-title {
  font-size: clamp(2.6rem, 6.4vw, 5.2rem);
  line-height: .98;
  max-width: 17ch;
  margin-bottom: 1.3rem;
  text-shadow: 0 2px 30px rgba(0,0,0,.4);
}
.hero-title em { font-style: normal; color: var(--accent); font-weight: 700; }
.hero-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--cream-2); max-width: 46ch; margin-bottom: 2.2rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }

.hero-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem 1.2rem;
  max-width: 640px;
  padding-top: 2rem; border-top: 1px solid var(--line-soft);
}
.hero-stat { display: flex; flex-direction: column; gap: .35rem; }
.hero-stat-value {
  font-family: var(--mono); font-size: 1.5rem; font-weight: 500; color: var(--cream);
}
.hero-stat-icon { color: var(--accent); }
.hero-stat-label { font-size: .82rem; color: var(--cream-3); letter-spacing: .01em; }

.hero-scroll-cue {
  position: absolute; left: 50%; bottom: 1.6rem; z-index: 1;
  transform: translateX(-50%);
  width: 26px; height: 42px; border: 1.5px solid var(--line-soft); border-radius: 14px;
  display: none;
}
.hero-scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; border-radius: 2px;
  background: var(--accent); transform: translateX(-50%);
  animation: scrollCue 2.6s ease-in-out infinite;
}
@keyframes scrollCue {
  0%, 100% { opacity: 1; top: 8px; }
  50% { opacity: .3; top: 18px; }
}
@media (min-width: 720px) { .hero-scroll-cue { display: block; } }

@media (min-width: 720px) {
  .hero-stats { grid-template-columns: repeat(4, 1fr); gap: 1.4rem 1.6rem; }
}

/* =============================================================
   8. Sections — Quiénes somos (narrative)
   ============================================================= */
.narrative { display: grid; gap: 2.5rem; }
.narrative-figure {
  aspect-ratio: 4 / 5; border-radius: 14px; overflow: clip;
  border: 1px solid var(--line);
}
.narrative-figure img { width: 100%; height: 100%; object-fit: cover; }
.narrative-text { display: flex; flex-direction: column; }

@media (min-width: 960px) {
  .narrative { grid-template-columns: .85fr 1.15fr; align-items: center; gap: 4.5rem; }
  .narrative-figure { aspect-ratio: 3 / 4; }
}

/* =============================================================
   9. Sections — Cobertura (map)
   ============================================================= */
.section-with-mesh { position: relative; isolation: isolate; }
.section-with-mesh::before {
  content: ""; position: absolute; inset: -10% -5%; z-index: -1;
  background: radial-gradient(45% 40% at 70% 40%, rgba(228,162,58,.1), transparent 70%);
  filter: blur(90px);
  pointer-events: none;
}
.coverage { display: grid; gap: 3rem; align-items: center; }
.coverage-map { display: flex; justify-content: center; }
.coverage-svg { width: 100%; max-width: 320px; height: auto; overflow: visible; }
.coverage-path {
  fill: none; stroke: var(--accent-2); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  opacity: .85;
}
.coverage-point circle {
  fill: var(--bg); stroke: var(--cream-3); stroke-width: 1.6;
}
.coverage-point text {
  font-family: var(--mono); font-size: 11px; fill: var(--cream-2);
  dominant-baseline: middle;
}
.coverage-label-left { text-anchor: end; }
.coverage-point-hub circle:not(.coverage-hub-pulse) { fill: var(--accent); stroke: var(--accent); }
.coverage-point-hub text { fill: var(--cream); font-weight: 500; }
.coverage-hub-sub { font-size: 9px; fill: var(--cream-3); }
.coverage-hub-pulse {
  fill: none; stroke: var(--accent); stroke-width: 1.5; opacity: 0;
  animation: hubPulse 2.6s ease-out infinite;
  transform-origin: 170px 332px;
}
@keyframes hubPulse {
  0% { opacity: .6; transform: scale(.5); }
  100% { opacity: 0; transform: scale(1.8); }
}

@media (min-width: 960px) {
  .coverage { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .coverage-svg { max-width: 360px; }
}

/* =============================================================
   10. Sections — Servicios
   ============================================================= */
.servicios-layout { display: grid; gap: 2.2rem; }
.servicios-figure {
  aspect-ratio: 4 / 5; border-radius: 14px; overflow: clip; border: 1px solid var(--line);
}
.servicios-figure img { width: 100%; height: 100%; object-fit: cover; }
.servicios-steps { display: grid; gap: .85rem; }
.servicios-step {
  display: grid; grid-template-columns: auto 1fr; gap: .4rem 1.1rem;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 1.3rem 1.5rem;
}
.servicios-step:hover { border-color: var(--accent-2); }
.servicios-n {
  grid-row: 1 / 3; align-self: start;
  font-family: var(--mono); font-size: 1.4rem; color: var(--accent); font-weight: 500;
}
.servicios-step h3 { font-size: 1.15rem; font-weight: 600; font-family: var(--sans); letter-spacing: 0; }
.servicios-step p { font-size: .92rem; color: var(--cream-3); }

@media (min-width: 960px) {
  .servicios-layout { grid-template-columns: .9fr 1.1fr; gap: 3.5rem; align-items: start; }
}

/* =============================================================
   11. Sections — Capacidad (banner)
   ============================================================= */
.section-banner { overflow: clip; isolation: isolate; }
.banner-figure { position: absolute; inset: 0; z-index: -1; }
.banner-figure img { width: 100%; height: 100%; object-fit: cover; }
.banner-tint {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,23,28,.94) 0%, rgba(20,23,28,.82) 40%, rgba(20,23,28,.92) 100%);
}
.capacidad-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem;
}
.capacidad-card {
  background: rgba(35,43,54,.7);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 1.6rem 1.4rem;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.capacidad-card:hover { border-color: var(--accent-2); }
.capacidad-n { font-family: var(--mono); color: var(--accent); font-size: 1rem; }
.capacidad-card h3 { font-size: 1.1rem; margin-top: .5rem; font-family: var(--sans); font-weight: 600; letter-spacing: 0; }

@media (min-width: 720px) { .capacidad-grid { grid-template-columns: repeat(4, 1fr); } }

/* =============================================================
   12. Sections — Flota
   ============================================================= */
.flota-gallery {
  display: grid; gap: 1rem; margin-bottom: 2.2rem;
}
.flota-figure {
  border-radius: 14px; overflow: clip; border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
}
.flota-figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-soft), filter .5s; }
.flota-figure:hover img { transform: scale(1.06); filter: saturate(1.12) brightness(1.03); }

@media (min-width: 720px) {
  .flota-gallery { grid-template-columns: repeat(2, 1fr); }
  .flota-figure-lg { grid-column: span 2; aspect-ratio: 16 / 9; }
}
@media (min-width: 1280px) {
  .flota-gallery { grid-template-columns: repeat(3, 1fr); }
  .flota-figure-lg { grid-column: span 1; aspect-ratio: 4 / 3; }
}

/* =============================================================
   13. Sections — Contacto
   ============================================================= */
.contact-grid { display: grid; gap: 1.2rem; }
.contact-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 2rem 1.8rem; display: flex; flex-direction: column; gap: .55rem;
}
.contact-card:hover { border-color: var(--accent-2); }
.contact-card h3 { font-size: 1.4rem; font-weight: 600; margin-bottom: .3rem; }
.contact-line { color: var(--cream-2); font-size: .98rem; width: fit-content; position: relative; }
.contact-line::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease-out);
}
.contact-line:hover::after { transform: scaleX(1); transform-origin: left; }
.contact-cta { margin-top: .9rem; width: fit-content; }

@media (min-width: 720px) { .contact-grid { grid-template-columns: repeat(2, 1fr); } }

/* =============================================================
   14. Footer
   ============================================================= */
.footer { border-top: 1px solid var(--line); padding-block: 2.6rem; }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem;
}
.footer-brand { margin-right: 0; }
.footer-brand .brand-word { font-size: .88rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.3rem; }
.footer-links a { font-size: .85rem; color: var(--cream-3); }
.footer-links a:hover { color: var(--accent); }
.footer-copy { font-size: .8rem; color: var(--cream-3); width: 100%; order: 3; }

@media (min-width: 960px) {
  .footer-copy { width: auto; order: 0; }
}

/* =============================================================
   15. Responsive — base section padding tune
   ============================================================= */
@media (min-width: 540px)  { .section-inner, .nav-inner, .footer-inner { padding-inline: 5vw; } }
@media (min-width: 1280px) { .section-inner, .nav-inner, .footer-inner { padding-inline: 2.4rem; } }
@media (min-width: 1600px) { .section-inner, .nav-inner, .footer-inner { padding-inline: 0; } }

/* =============================================================
   16. Reduced-motion — only intrusive effects gated
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .coverage-hub-pulse { animation: none; opacity: 0; }
  .hero-scroll-cue span { animation: none; top: 12px; opacity: .7; }
}
