:root {
  /* Paleta oficial CPS Aviation (tomada del logo y los pósters) */
  --brand-blue: #447388;      /* alas y "CPS" */
  --brand-ink: #12181d;       /* "AVIATION" */
  --navy-900: #0b131c;
  --navy-800: #14202d;
  --navy-700: #24384a;
  --navy-500: #447388;
  --accent: #447388;
  --accent-dark: #375f71;
  --accent-light: #8cb4c6;
  --ink: #12181d;
  --muted: #5a6873;
  --line: #dce5eb;
  --bg: #ffffff;
  --bg-alt: #eef3f6;
  --wa: #25d366;
  --hero-dark: #12181d;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(11, 19, 28, .08);
  --font-head: "Montserrat", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .6em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 800; color: var(--brand-ink); }
h3 { font-size: 1.1rem; }

.container { width: min(1160px, 100% - 32px); margin-inline: auto; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.5em; border-radius: 999px; border: 2px solid transparent;
  font: 600 .95rem var(--font-head); text-decoration: none; cursor: pointer;
  transition: transform .15s, background .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 20px; height: 20px; }
.btn-sm { padding: .6em 1.1em; font-size: .85rem; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-ghost { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn-wa { background: var(--wa); color: #06361a; }
.btn-wa:hover { background: #3be07a; }
.btn-outline { border-color: var(--navy-700); color: var(--navy-700); background: transparent; }
.btn-outline:hover { background: var(--navy-700); color: #fff; }

.eyebrow {
  font: 600 .78rem var(--font-head); letter-spacing: .28em; text-transform: uppercase;
  color: var(--accent-light); margin: 0 0 1rem;
}
.eyebrow.dark { color: var(--accent); }

/* Navegación */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background .3s, box-shadow .3s;
}
.nav.scrolled {
  background: rgba(255,255,255,.95); box-shadow: 0 4px 20px rgba(7,21,38,.08);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 1rem; }
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 46px; width: auto; }
.nav-links { display: flex; gap: 1.8rem; }
.nav-links a { color: #111827; text-decoration: none; font: 500 .95rem var(--font-body); transition: color .2s; }
.nav-links a:hover { color: #374151; }
.nav-actions { display: flex; align-items: center; gap: .75rem; }
.lang-toggle {
  background: transparent; color: #111827; border: 1px solid rgba(17,24,39,.3);
  border-radius: 8px; padding: .35em .6em; font: 600 .8rem var(--font-body); cursor: pointer; transition: border-color .2s;
}
.lang-toggle:hover { border-color: #111827; }
.nav-cta { white-space: nowrap; background: var(--hero-dark); color: #fff; font-family: var(--font-body); font-weight: 500; }
.nav-cta:hover { background: #1a2229; }
.menu-toggle { display: none; background: none; border: 0; padding: 6px; cursor: pointer; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: #111827; margin: 5px 0; transition: .2s; }

/* Portada 3D (jet + radar). La sección mide 300vh; el escenario queda fijo (sticky)
   mientras se recorre y luego sigue el resto del sitio. La lógica está en hero3d.js. */
.hero3d { position: relative; height: 300vh; background: #f3e3d0; }
.h3d-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.h3d-stage { position: absolute; inset: 0; pointer-events: none; }
.h3d-stage video, .h3d-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.h3d-poster { background: center / cover no-repeat; }
.h3d-stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.h3d-tint { position: absolute; inset: 0; background: radial-gradient(120% 80% at 50% 45%, rgba(255,240,225,0) 40%, rgba(240,214,190,0.35) 100%); }

.h3d-headline {
  position: absolute; top: 17vh; left: 0; right: 0; z-index: 2; text-align: center; padding: 0 16px;
  color: var(--brand-ink); will-change: opacity;
}
.h3d-headline small { display: block; font: 500 13px var(--font-head); letter-spacing: .3em; text-transform: uppercase; margin-bottom: 14px; }
/* Mismo estilo que los pósters: itálica pesada, línea 2 en azul de marca */
.h3d-headline strong {
  display: block; font: italic 900 clamp(30px, 5.2vw, 72px)/.98 var(--font-head);
  letter-spacing: -0.02em; text-transform: uppercase;
}
.h3d-headline strong + strong { color: var(--brand-blue); }

.h3d-s2 {
  position: absolute; top: 92px; left: 0; right: 0; z-index: 2; text-align: center;
  opacity: 0; transform: translateY(12px); pointer-events: none; will-change: opacity, transform;
}
.h3d-s2.on { pointer-events: auto; }
.h3d-s2 small { display: block; font: 500 11px var(--font-head); letter-spacing: .2em; text-transform: uppercase; color: rgba(18,24,29,.72); }
.h3d-s2 h2 { font: 500 19px var(--font-head); letter-spacing: -0.02em; margin: 2px 0 8px; color: var(--brand-ink); }
.h3d-s2 p { font-size: 11px; color: rgba(18,24,29,.72); margin: 0 0 8px; }
.h3d-icons { display: flex; justify-content: center; gap: 7px; }
.h3d-icons a { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: rgba(18,24,29,.78); color: #fff; transition: background .25s; }
.h3d-icons a:hover { background: var(--brand-blue); }
.h3d-icons svg { width: 14px; height: 14px; }
.h3d-s2 .btn { margin-top: 10px; }

.h3d-pill {
  position: absolute; z-index: 2; left: 50%; bottom: 80px; transform: translateX(-50%);
  width: min(494px, calc(100vw - 32px)); height: 100px; border-radius: 999px;
  background: rgba(255,255,255,0.28); border: 1px solid rgba(255,255,255,0.55);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 10px 40px rgba(170,120,80,.12), inset 0 1px 0 rgba(255,255,255,.6);
  display: grid; place-items: center; text-align: center;
}
.h3d-pill p { grid-area: 1 / 1; margin: 0; font-size: 17px; line-height: 1.42; letter-spacing: -0.01em; color: #1f262c; padding: 0 40px; will-change: opacity, filter; }
.h3d-pill p.b { opacity: 0; }

@media (max-width: 760px) {
  .h3d-headline { top: 15vh; }
  .h3d-pill { height: 84px; bottom: 40px; }
  .h3d-pill p { font-size: 15px; padding: 0 24px; }
}

/* Secciones */
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section.alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin-bottom: 3rem; }
.section-head p:last-child { color: var(--muted); margin: 0; }

/* Nosotros */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.about-text p:not(.eyebrow) { color: #3a4a5c; }
.about-card {
  background: var(--navy-800); color: #fff; border-radius: var(--radius); padding: 2.2rem;
  box-shadow: var(--shadow); position: sticky; top: 100px;
}
.about-quote { font: 500 1.15rem/1.55 var(--font-head); margin: 0 0 1.8rem; }
.founder { display: flex; align-items: center; gap: .9rem; padding-bottom: 1.5rem; border-bottom: 1px solid rgba(255,255,255,.15); }
.founder-badge {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; font: 700 1rem var(--font-head);
}
.founder strong { display: block; }
.founder span { font-size: .88rem; color: rgba(255,255,255,.7); }
.values { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.values li { border: 1px solid rgba(140,180,198,.6); color: var(--accent-light); border-radius: 999px; padding: .3em .9em; font-size: .85rem; }

/* Servicios */
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.service {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem;
  display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s;
}
.service:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.service.featured {
  grid-column: 1 / -1; background: var(--navy-800); color: #fff; border: 0;
  display: grid; grid-template-columns: auto 1fr auto; gap: 1.5rem; align-items: center; padding: 2rem 2.2rem;
}
.service.featured p { color: rgba(255,255,255,.78); }
.service-icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: #eef2f7; color: var(--navy-700); margin-bottom: 1rem;
}
.service.featured .service-icon { background: var(--accent); color: #fff; width: 64px; height: 64px; margin: 0; }
.service-icon svg { width: 24px; height: 24px; }
.service.featured .service-icon svg { width: 32px; height: 32px; }
.service p { color: var(--muted); font-size: .94rem; margin: 0 0 1rem; flex: 1; }
.service .tag { font: 600 .7rem var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-light); display: block; margin-bottom: .4rem; }
.service-link { font: 600 .88rem var(--font-head); color: var(--navy-500); text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.service-link:hover { color: var(--accent); }
.service.featured .btn { white-space: nowrap; justify-self: start; }

/* Flota */
.tabs { display: inline-flex; background: var(--bg-alt); padding: 4px; border-radius: 999px; margin-bottom: 2rem; }
.tab {
  border: 0; background: transparent; padding: .6em 1.4em; border-radius: 999px; cursor: pointer;
  font: 600 .9rem var(--font-head); color: var(--muted);
}
.tab.active { background: var(--navy-800); color: #fff; }
.fleet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.25rem; }
.unit { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.unit-media { aspect-ratio: 3 / 4; background: linear-gradient(135deg, var(--navy-700), var(--navy-900)); position: relative; }
.unit-media img { position: relative; width: 100%; height: 100%; object-fit: cover; }
.unit-media .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.25); }
.unit-media .placeholder svg { width: 38%; height: auto; }
.unit-body { padding: 1.3rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.unit-body h3 { margin: 0; color: var(--navy-800); }
.unit-cap { font-size: .9rem; color: var(--muted); display: flex; align-items: center; gap: .4rem; }
.unit-cap svg { width: 16px; height: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { background: #eef2f7; color: var(--navy-700); border-radius: 999px; padding: .2em .75em; font-size: .78rem; font-weight: 500; }
.unit .service-link { margin-top: auto; padding-top: .4rem; }
.fleet-note { color: var(--muted); font-size: .85rem; margin-top: 1.5rem; }

/* Cotizar */
.quote { display: grid; grid-template-columns: 1fr 1.35fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.quote-info > p { color: var(--muted); }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.2rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; column-gap: 1rem; }
.steps li::before {
  content: counter(s); grid-row: span 2; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--navy-800); color: var(--accent-light); font: 700 1rem var(--font-head);
}
.steps strong { font-family: var(--font-head); color: var(--navy-800); }
.steps span { color: var(--muted); font-size: .92rem; }

.quote-form {
  background: #fff; border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.2rem); box-shadow: var(--shadow);
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.1rem;
}
.full { grid-column: 1 / -1; }
.extra-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.1rem; }
.extra-fields:empty { display: none; }
.field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.field > span { font: 600 .82rem var(--font-head); color: var(--navy-700); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: .95rem; color: var(--ink); background: #fbfcfd;
  border: 1px solid var(--line); border-radius: 10px; padding: .7em .85em; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--navy-500); box-shadow: 0 0 0 3px rgba(42,80,120,.15); background: #fff;
}
.field.invalid input, .field.invalid select { border-color: #d64545; }
.field[hidden] { display: none; }
.hint { color: var(--muted); font-size: .78rem; }
.check { display: flex; align-items: center; gap: .6rem; font-size: .92rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.form-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .4rem; }
.form-error { color: #b42318; background: #fef3f2; border-radius: 10px; padding: .7em 1em; margin: 0; font-size: .9rem; }
.form-note { color: var(--muted); font-size: .82rem; margin: 0; }

/* Contacto */
.contact { background: var(--navy-900); color: #fff; }
.contact h2 { color: #fff; }
.contact p:not(.eyebrow) { color: rgba(255,255,255,.75); }
.contact-inner { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: center; }
.contact-cards { display: grid; gap: 1rem; }
.contact-card {
  display: flex; flex-direction: column; gap: .2rem; padding: 1.3rem 1.5rem; border-radius: var(--radius);
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); text-decoration: none; transition: border-color .2s;
}
a.contact-card:hover { border-color: var(--accent-light); }
.cc-label { font: 600 .75rem var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-light); }
.contact-card strong { font: 600 1.1rem var(--font-head); word-break: break-word; }

.social { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin-top: .3rem; }
.social a { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; font: 600 1rem var(--font-head); transition: color .2s; }
.social a:hover { color: var(--accent-light); }
.social svg { width: 20px; height: 20px; }
.footer-right { display: inline-flex; flex-wrap: wrap; gap: 1rem; }
.footer-right a { text-decoration: none; color: rgba(255,255,255,.75); transition: color .2s; }
.footer-right a:hover { color: var(--accent-light); }

.footer { background: #040d18; color: rgba(255,255,255,.55); font-size: .85rem; padding: 1.5rem 0; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.footer-logo { height: 40px; width: auto; }

/* Estantería digital */
.shelf { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #fff; height: clamp(420px, 70vh, 680px); }
.shelf iframe { width: 100%; height: 100%; border: 0; display: block; }
.shelf-link { margin-top: 1.25rem; }

/* Destacados (pósters) */
.promos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; }
.promo { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.promo-img { display: block; aspect-ratio: 2 / 3; overflow: hidden; }
.promo-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.promo-img:hover img { transform: scale(1.03); }
.promo-body { padding: 1rem 1.2rem 1.2rem; display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.promo-body h3 { margin: 0; font-size: 1rem; color: var(--brand-ink); }

.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.25);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.07); }
.wa-float svg { width: 30px; height: 30px; }

/* Responsive */
@media (max-width: 1080px) {
  /* En pantallas medianas el menú no cabe con el botón; "Cotizar" sigue en el menú */
  .nav-cta { display: none; }
  .nav-links { gap: 1.4rem; }
}
@media (max-width: 960px) {
  .about, .quote, .contact-inner { grid-template-columns: 1fr; }
  .about-card { position: static; }
  .service.featured { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .nav-cta { display: none; }
  .nav-links {
    position: absolute; top: 72px; left: 16px; right: 16px; flex-direction: column; gap: 0;
    background: rgba(255,255,255,.95); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-radius: 16px; box-shadow: 0 12px 32px rgba(7,21,38,.15); padding: .5rem 0; display: none;
  }
  .nav.open .nav-links { display: flex; }
  .nav-links a { padding: .8rem 1.4rem; }
  .nav-links a:hover { background: #f3f4f6; }
  .nav.open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.open .menu-toggle span:nth-child(2) { opacity: 0; }
  .nav.open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 560px) {
  .quote-form, .extra-fields { grid-template-columns: 1fr; }
  .form-actions .btn { width: 100%; }
}
