/* ============================================================
   Quilei Construction — muestra de diseño
   Claro y limpio: blanco + azul marino. Independiente del sitio
   de Red Dominion y de los otros proyectos.
   ============================================================ */

:root {
  --navy:      #1B2A41;
  --navy-2:    #263650;
  --navy-deep: #131E2E;

  --paper:     #FFFFFF;
  --paper-2:   #F4F5F7;
  --line:      #E4E7ED;

  --ink:       #1B2A41;
  --ink-mid:   #5F6B7E;
  --ink-dim:   #9AA3B2;

  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --shell: 1140px;
  --radius: 12px;
  --radius-lg: 18px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 100px; }

body {
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { background: none; border: 0; cursor: pointer; font: inherit; color: inherit; }

::selection { background: var(--navy); color: #fff; }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- Barra de muestra ---------- */
.demo-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 9px 20px;
  background: var(--navy-deep);
  color: rgba(255, 255, 255, .55);
  font-size: .74rem;
  text-align: center;
}
.demo-bar a { color: #fff; font-weight: 500; }
.demo-bar a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-block: 14px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; }

.logo { display: flex; align-items: center; gap: 9px; }
.logo svg {
  width: 26px; height: 26px;
  fill: none;
  stroke: var(--navy);
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.logo-text strong { font-size: 1.05rem; font-weight: 700; letter-spacing: -.2px; }
.logo-text small { font-size: .58rem; font-weight: 500; letter-spacing: 2.2px; text-transform: uppercase; color: var(--ink-dim); }

.nav { margin-inline: auto; }
.nav-list { display: flex; align-items: center; gap: 32px; }
.nav-link {
  font-size: .88rem;
  font-weight: 500;
  color: var(--ink-mid);
  transition: color .25s var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--navy); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--navy); transition: transform .3s var(--ease), opacity .3s var(--ease); }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-size: .88rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease), border-color .25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }

.btn-dark  { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-2); }

.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--paper-2); }

.btn-ghost { border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }

.btn-sm { padding: 10px 20px; font-size: .82rem; }

/* ---------- Etiquetas de sección ---------- */
.kicker {
  font-size: .72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2.2px;
  color: var(--ink-dim);
  margin-bottom: 14px;
}
.kicker-light { color: rgba(255, 255, 255, .7); }

/* ---------- Hero ---------- */
.hero { padding-top: 22px; }

.hero-frame {
  position: relative;
  margin-inline: 22px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 480px;
  display: flex;
  align-items: center;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
/* Velo desde la izquierda: el texto va sobre la zona oscura */
.hero-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(12, 20, 32, .88) 0%, rgba(12, 20, 32, .6) 45%, rgba(12, 20, 32, .15) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 70px 24px 120px;
  color: #fff;
}
.hero-inner h1 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -1px;
}
.hero-text { margin: 18px 0 28px; color: rgba(255, 255, 255, .8); font-size: .98rem; }

/* ---------- Tarjetas montadas ---------- */
.cards {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  /* Sube las tarjetas para que pisen el borde inferior del hero */
  margin-top: -76px;
}
.card {
  padding: 26px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(20, 30, 48, .1);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 22px 50px rgba(20, 30, 48, .16); }

.card-ico {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: var(--paper-2);
}
.card-ico svg {
  width: 22px; height: 22px;
  fill: none;
  stroke: var(--navy);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.card p { font-size: .84rem; color: var(--ink-mid); }
.card-stat {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: .78rem;
  color: var(--ink-dim);
}
.card-stat strong { font-size: 1.05rem; color: var(--navy); font-weight: 700; }

/* ---------- Secciones ---------- */
.section { padding: 90px 0; }
.section-alt { background: var(--paper-2); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
/* La foto va primero en el HTML; en móvil el texto debe ir arriba */
.split-reverse .split-media { order: -1; }

.split-text h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.6px;
  margin-bottom: 18px;
}
.lead { color: var(--ink-mid); font-size: .94rem; margin-bottom: 16px; }

.split-media img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(20, 30, 48, .14);
}

/* ---------- Pasos ---------- */
.steps { display: grid; gap: 22px; margin: 30px 0 34px; }
.steps li { display: flex; gap: 16px; }
.step-n {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
}
.steps h3 { font-size: .95rem; font-weight: 700; margin-bottom: 3px; }
.steps p { font-size: .84rem; color: var(--ink-mid); }

/* ---------- Cifras ---------- */
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 44px 30px;
  background: var(--paper-2);
  border-radius: var(--radius-lg);
}
.fact { display: flex; flex-direction: column; align-items: center; text-align: center; }
.fact strong { font-size: 2rem; font-weight: 700; letter-spacing: -1px; line-height: 1.1; }
.fact span { font-size: .8rem; color: var(--ink-mid); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #fff; padding-top: 60px; }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  padding-bottom: 50px;
}
.logo-footer svg { stroke: #fff; }
.logo-footer .logo-text small { color: rgba(255, 255, 255, .5); }
.footer-text { color: rgba(255, 255, 255, .7); font-size: .9rem; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-block: 18px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: .76rem;
  color: rgba(255, 255, 255, .5);
}
.footer-back { color: #fff; }
.footer-back:hover { text-decoration: underline; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1000px) {
  .nav-list { gap: 22px; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split-reverse .split-media { order: 0; }
  .facts { grid-template-columns: repeat(2, 1fr); gap: 30px; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .btn-header { display: none; }
  .nav { margin-inline: 0; margin-left: auto; }

  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(280px, 80vw);
    padding: 96px 26px 26px;
    background: #fff;
    border-left: 1px solid var(--line);
    box-shadow: -10px 0 40px rgba(20, 30, 48, .12);
    transform: translateX(100%);
    transition: transform .35s var(--ease);
    z-index: 45;
  }
  .nav.open { transform: translateX(0); }
  .nav-list { flex-direction: column; align-items: flex-start; gap: 0; }
  .nav-list li { width: 100%; }
  .nav-link { display: block; width: 100%; padding: 14px 0; font-size: 1rem; border-bottom: 1px solid var(--line); }

  .cards { grid-template-columns: 1fr; margin-top: -50px; }
  .hero-frame { min-height: 0; margin-inline: 14px; }
  .hero-inner { padding: 56px 24px 90px; }
  .section { padding: 64px 0; }
}

@media (max-width: 560px) {
  .hero-inner h1 br, .hero-text br, .footer-text br { display: none; }
  .facts { grid-template-columns: 1fr; padding: 34px 20px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-bottom { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
