/* Tokens: mismos valores de la landing original */
:root {
  --ink: #0F172A;
  --navy: #204078;
  --blue: #1652A8;
  --footer: #0A1428;
  --teal: #00C8A8;
  --teal-dark: #00A88C;
  --body: #334155;
  --muted: #64748B;
  --line: #E2E8F0;
  --soft: #F8FAFC;
  --white: #fff;
  --on-dark: rgba(255,255,255,.85);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --display: 'Sora', sans-serif;
  --text: 'Mulish', sans-serif;
  --ease: cubic-bezier(.16,1,.3,1);
}

@font-face { font-family: 'Mulish'; font-style: normal; font-weight: 300 800; font-display: swap; src: url('/assets/fonts/mulish-latin.woff2') format('woff2'); }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 300 800; font-display: swap; src: url('/assets/fonts/sora-latin.woff2') format('woff2'); }

* { box-sizing: border-box; }
html { scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--soft); color: var(--ink); font-family: var(--text); font-size: 16px; line-height: 1.5; overflow-x: hidden; }
img { max-width: 100%; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: var(--navy); text-decoration: none; transition: color .15s ease-out; }
a:hover { color: var(--teal); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
address { font-style: normal; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
.grid { display: grid; }
.grid-5 { grid-template-columns: repeat(5, minmax(0,1fr)); gap: 14px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }

/* Encabezado */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.93); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.header-inner { display: flex; align-items: center; gap: 36px; padding-top: 16px; padding-bottom: 16px; }
.header-logo { display: flex; align-items: center; }
.header-logo img { height: 32px; width: auto; display: block; }
.header-nav { display: flex; gap: 26px; align-items: center; }
.header-nav a { font-size: 14px; font-weight: 600; }
.header-contact { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--muted); }

/* Títulos y etiquetas */
.eyebrow { font-weight: 700; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--teal); margin: 0 0 12px; }
.eyebrow-sm { font-size: 12px; letter-spacing: .2em; margin-bottom: 18px; }
.eyebrow-muted { color: rgba(255,255,255,.55); margin-bottom: 16px; }
.eyebrow-spaced { margin-bottom: 36px; }
.eyebrow-flush { margin: 0; }
.title { font-family: var(--display); font-weight: 600; line-height: 1.15; letter-spacing: -.02em; color: var(--navy); }
.title strong { font-weight: 800; }
.title-lg { font-size: clamp(30px, 4.2vw, 40px); margin: 0 0 14px; max-width: 760px; }
.title-md { font-size: clamp(27px, 3.6vw, 34px); line-height: 1.2; margin: 0 0 16px; }
.title-inverse { color: var(--white); margin-bottom: 16px; }
.lead { font-size: 17px; line-height: 1.6; color: var(--body); max-width: 660px; margin: 0 0 44px; }

/* Botones */
.btn { display: inline-block; font-family: var(--text); font-size: 15px; line-height: 1; border-radius: var(--radius-sm); padding: 15px 24px; border: 0; cursor: pointer; transition: transform .15s ease-out, background-color .15s ease-out, color .15s ease-out; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--teal); color: var(--navy); font-weight: 700; }
.btn-primary:hover { background: var(--teal-dark); color: var(--white); }
.btn-ghost { background: rgba(255,255,255,.08); color: var(--white); font-weight: 600; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.5); }
.btn-ghost:hover { background: rgba(255,255,255,.16); color: var(--white); }
.btn-block { display: block; width: 100%; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Portada */
.hero { background: var(--ink); color: var(--white); position: relative; overflow: hidden; }
.hero-intro { padding-top: 88px; }
.hero h1, .notice h1 { font-family: var(--display); font-weight: 300; font-size: clamp(36px, 6vw, 58px); line-height: 1.05; letter-spacing: -.02em; margin: 0 0 20px; max-width: 900px; }
.hero-lead { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.6; color: rgba(255,255,255,.82); max-width: 620px; margin: 0 0 30px; }
.hero .actions { margin-bottom: 64px; }
.hero-sectors { padding-bottom: 72px; }
.sector { position: relative; aspect-ratio: 4/5; border-radius: 14px; overflow: hidden; }
.sector img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease-out; }
.sector:hover img { transform: scale(1.03); }
.sector::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(15,23,42,.75) 100%); pointer-events: none; }
.sector span { position: absolute; left: 18px; right: 18px; bottom: 18px; z-index: 1; font-family: var(--display); font-weight: 600; font-size: 17px; line-height: 1.2; color: var(--white); pointer-events: none; }

/* Cifras */
.stats { background: var(--navy); color: var(--white); }
.stats-grid { gap: 32px; align-items: start; padding-top: 48px; padding-bottom: 48px; }
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-value { font-family: var(--display); font-weight: 700; font-size: 52px; line-height: 1; letter-spacing: -.03em; color: var(--teal); font-variant-numeric: tabular-nums; }
.stat-label { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.75); }

/* Secciones */
.section { padding: 96px 0; }
.section-tight { padding: 80px 0; }
.section-white { background: var(--white); }
.section-soft { background: var(--soft); }

.solutions { gap: 24px; }
.card { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 32px; display: flex; flex-direction: column; gap: 14px; transition: transform .2s ease-out, box-shadow .2s ease-out; }
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(15,23,42,.10); }
.card .icon { color: var(--teal); width: 32px; height: 32px; }
.card h3 { font-family: var(--display); font-weight: 700; font-size: 21px; line-height: 1.25; color: var(--navy); margin: 8px 0 0; }
.card p { font-size: 15px; line-height: 1.6; color: var(--body); margin: 0; }
.card-result { margin-top: auto; padding-top: 14px; font-size: 14px; font-weight: 700; color: var(--navy); }

.purpose { gap: 32px; }
.purpose-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 48px; display: flex; flex-direction: column; box-shadow: 0 4px 12px rgba(15,23,42,.06); }
.rule { width: 48px; height: 3px; background: var(--teal); border-radius: 2px; }
.purpose-card h2 { font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1.2; color: var(--navy); margin: 24px 0 0; }
.purpose-card p { font-size: 17px; line-height: 1.8; color: var(--body); margin: 20px 0 0; }
.purpose-card-dark { background: var(--navy); border-color: var(--navy); }
.purpose-card-dark h2 { color: var(--white); }
.purpose-card-dark p { color: var(--on-dark); }

/* Caso de éxito */
.case { background: var(--blue); color: var(--white); }
.case-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); min-height: 560px; }
.case-media { position: relative; min-height: 420px; overflow: hidden; }
.case-media a { position: absolute; inset: 0; display: block; }
.case-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease-out; }
.case-media a:hover img { transform: scale(1.02); }
.case-body { padding: 80px 40px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.case-title { font-family: var(--display); font-weight: 600; font-size: clamp(30px, 4vw, 38px); line-height: 1.15; letter-spacing: -.02em; margin: 14px 0 0; }
.case-title strong { font-weight: 800; }
.case-lead { font-size: 17px; line-height: 1.6; color: var(--on-dark); margin: 18px 0 0; }
.case-points { display: flex; flex-direction: column; gap: 20px; margin: 32px 0 0; }
.case-points div { display: flex; flex-direction: column; gap: 6px; }
.case-points dt { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); }
.case-points dd { font-size: 16px; line-height: 1.6; color: rgba(255,255,255,.9); margin: 0; }

/* Portafolio */
.portfolio { grid-template-columns: minmax(0,1fr) minmax(0,1.2fr); gap: 56px; align-items: center; }
.portfolio-lead { font-size: 16px; line-height: 1.6; color: var(--body); margin: 0 0 24px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.portfolio-list { gap: 14px; }
.portfolio-list li { border-top: 2px solid var(--teal); padding-top: 14px; font-family: var(--display); font-weight: 600; font-size: 16px; color: var(--navy); }

/* Contacto */
.contact { background: var(--ink); color: var(--white); padding: 88px 0; }
.contact-grid { grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); gap: 64px; align-items: start; }
.contact-lead { font-size: 17px; line-height: 1.6; color: rgba(255,255,255,.8); margin: 0 0 36px; max-width: 440px; }
.contact-items { display: flex; flex-direction: column; gap: 24px; }
.contact-items > div { display: flex; flex-direction: column; gap: 4px; }
.contact-label { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); }
.contact-value { font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--white); overflow-wrap: anywhere; }
.contact-address { font-size: 16px; line-height: 1.6; color: var(--on-dark); }

.form { background: var(--white); border-radius: var(--radius-lg); padding: 40px; display: flex; flex-direction: column; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: flex; flex-direction: column; gap: 8px; font-size: 13px; font-weight: 700; color: var(--navy); }
.form input:not([type=hidden]), .form select, .form textarea { font-family: var(--text); font-size: 15px; font-weight: 400; color: var(--ink); padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); width: 100%; min-height: 44px; }
.form textarea { resize: vertical; }
.form-note { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* Pie de página */
.footer { background: var(--footer); color: var(--on-dark); padding: 64px 0 24px; }
.footer-grid { grid-template-columns: 300px minmax(0,1fr); gap: 56px; }
.footer-logo { height: 40px; width: auto; display: block; margin-bottom: 16px; }
.footer-tagline { font-size: 14px; line-height: 1.6; opacity: .8; margin: 0 0 20px; max-width: 280px; }
.social { display: flex; gap: 10px; }
.social a { width: 36px; height: 36px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--white); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; transition: transform .15s ease-out, background-color .15s ease-out; }
.social a:hover { background: rgba(255,255,255,.16); transform: translateY(-1px); }
.footer-cols { gap: 32px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-col a { color: var(--on-dark); }
.footer-col a:hover { color: var(--teal); }
.footer-label { font-size: 12px; font-weight: 700; letter-spacing: .15em; color: var(--teal); text-transform: uppercase; }
.footer-label-gap { margin-top: 12px; }
.lang { display: flex; gap: 8px; }
.lang a { background: rgba(255,255,255,.08); color: var(--white); border-radius: 6px; padding: 7px 14px; font-size: 13px; line-height: 1.5; font-weight: 700; transition: transform .15s ease-out, background-color .15s ease-out; }
.lang a:hover { background: rgba(255,255,255,.16); color: var(--white); transform: translateY(-1px); }
.lang .lang-active, .lang .lang-active:hover { background: var(--teal); color: var(--navy); }
.footer-legal { margin-top: 40px; font-size: 12px; opacity: .65; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.footer-legal::before { content: ''; flex: 0 0 100%; height: 1px; background: rgba(255,255,255,.08); margin-bottom: 8px; }
.footer-legal a { color: var(--on-dark); }

/* WhatsApp: a la izquierda porque el chat de Cliengo ocupa la derecha */
.btn-whatsapp { position: fixed; left: 20px; bottom: 20px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; background: #25D366; color: var(--ink); font-weight: 700; font-size: 15px; line-height: 1; padding: 13px 18px; border-radius: 999px; box-shadow: 0 8px 24px rgba(15,23,42,.28); transition: transform .15s ease-out; }
.btn-whatsapp:hover { color: var(--ink); transform: translateY(-2px); }
.btn-whatsapp svg { width: 20px; height: 20px; flex: none; }

/* 404 y confirmación */
.notice { background: var(--ink); color: var(--white); min-height: calc(100vh - 65px); display: flex; align-items: center; }
.notice-inner { width: 100%; padding-top: 72px; padding-bottom: 72px; }
.notice-code { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--teal); margin: 0 0 12px; font-variant-numeric: tabular-nums; }

/* Movimiento */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.hero-intro > *, .notice-inner > * { animation: rise .3s var(--ease) both; }
.hero-intro > :nth-child(2), .notice-inner > :nth-child(2) { animation-delay: 40ms; }
.hero-intro > :nth-child(3), .notice-inner > :nth-child(3) { animation-delay: 80ms; }
.hero-intro > :nth-child(4), .notice-inner > :nth-child(4) { animation-delay: 120ms; }
.sector { animation: rise .3s var(--ease) both; }
.sector:nth-child(1) { animation-delay: 120ms; }
.sector:nth-child(2) { animation-delay: 160ms; }
.sector:nth-child(3) { animation-delay: 200ms; }
.sector:nth-child(4) { animation-delay: 240ms; }
.sector:nth-child(5) { animation-delay: 280ms; }

/* El contenido solo se oculta si site.js ya confirmó que puede revelarlo */
.has-reveal .reveal { opacity: 0; transform: translateY(12px); transition: opacity .3s ease-out, transform .3s ease-out; transition-delay: var(--d, 0ms); }
.has-reveal .reveal.is-in { opacity: 1; transform: none; }
.has-reveal .card.reveal.is-in:hover { transform: translateY(-3px); transition-delay: 0ms; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .has-reveal .reveal { opacity: 1; transform: none; }
}

/* Responsive */
@media (max-width: 980px) {
  .grid-5, .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .portfolio, .contact-grid, .footer-grid, .case-grid { grid-template-columns: minmax(0,1fr); }
  .case-grid { min-height: 0; }
  .case-body { padding: 56px 40px; }
  .header-nav { display: none; }
}
@media (max-width: 620px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  .grid-5, .grid-4, .grid-3, .grid-2, .form-row { grid-template-columns: minmax(0,1fr); }
  .portfolio-list, .footer-cols { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hero-intro { padding-top: 56px; }
  .hero .actions { margin-bottom: 44px; }
  .hero-sectors { padding-bottom: 52px; }
  .sectors { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .section { padding: 64px 0; }
  .section-tight { padding: 56px 0; }
  .contact { padding: 64px 0 96px; }
  .case-body { padding: 48px 20px; }
  .case-media { min-height: 260px; }
  .purpose-card { padding: 32px; }
  .form { padding: 24px; }
  .stat-value { font-size: 44px; }
  .header-inner { gap: 16px; }
  .footer { padding-bottom: 88px; }
}
