/* ============================================================
   TOKENS
============================================================= */
:root {
  --white: #FFFFFF;
  --bg-soft: #F5F8FC;
  --navy: #0B1F3A;
  --navy-2: #142E52;
  --royal: #1E4FD9;
  --royal-deep: #163DA6;
  --text-1: #2E3A4E;
  --text-2: #6B7686;
  --border: #E2E7EF;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  --container-w: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--navy);
}

h1 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); font-weight: 700; letter-spacing: -0.01em; color: var(--white); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); max-width: 22ch; }
h3 { font-size: 1.15rem; }

p { color: var(--text-2); max-width: 62ch; }

a { color: inherit; }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--royal);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

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

/* ============================================================
   BUTTONS
============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--royal); color: #fff; }
.btn-primary:hover { background: var(--royal-deep); }
.btn-ghost {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.4);
  color: var(--white);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover { background: rgba(255,255,255,0.16); }
.btn-whatsapp {
  background: var(--navy);
  color: #fff;
}
.btn-whatsapp:hover { background: var(--navy-2); }

.link-arrow {
  display: inline-block;
  margin-top: 8px;
  color: var(--royal);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}
.link-arrow:hover { border-color: var(--royal); }

/* ============================================================
   HEADER
============================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--white);
  letter-spacing: 0.01em;
}
.brand-mark { display: block; height: 16px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a {
  text-decoration: none;
  color: rgba(255,255,255,0.85);
  font-size: 0.92rem;
  font-weight: 500;
}
.main-nav a:hover { color: var(--white); }
.nav-cta {
  background: var(--royal);
  color: #fff !important;
  padding: 9px 18px;
  border-radius: 6px;
}
.nav-cta:hover { background: var(--royal-deep); }
.menu-toggle { display: none; }

/* ============================================================
   HERO
============================================================= */
.hero { position: relative; overflow: hidden; min-height: 640px; display: flex; align-items: flex-end; }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-bg-img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,31,58,0.55) 0%, rgba(11,31,58,0.75) 55%, rgba(11,31,58,0.95) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding: 140px 24px 64px;
  width: 100%;
}
.hero-lead { font-size: 1.1rem; color: rgba(255,255,255,0.85); margin-bottom: 32px; max-width: 56ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 48px; }
.hero-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.25);
}
.hero-stat { display: flex; flex-direction: column; }
.hero-stat-value { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--white); }
.hero-stat-label { font-size: 0.82rem; color: rgba(255,255,255,0.7); }

/* ============================================================
   SECTIONS (general)
============================================================= */
.section { padding: 90px 0; }
.section h2 { margin-bottom: 40px; }

/* ============================================================
   NOSOTROS
============================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
}
.about-points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2,1fr); gap: 28px 24px; }
.about-points h3 { margin-bottom: 6px; font-size: 1.05rem; }
.about-points p { font-size: 0.92rem; }

/* ============================================================
   SERVICIOS — bento asimétrico
============================================================= */
.services { background: var(--bg-soft); }
.services-bento {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
  align-items: stretch;
}
.service-feature {
  position: relative;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  min-height: 460px;
  display: flex;
  align-items: flex-end;
}
.service-feature img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.service-feature::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,31,58,0.05) 30%, rgba(11,31,58,0.92) 100%);
}
.service-feature-copy {
  position: relative;
  z-index: 1;
  padding: 32px;
}
.service-feature-copy h3 { color: var(--white); font-size: 1.4rem; }
.service-feature-copy p { color: rgba(255,255,255,0.82); font-size: 0.95rem; }

.service-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.service-list li {
  padding: 26px 4px;
  border-bottom: 1px solid var(--border);
}
.service-list li:first-child { padding-top: 4px; }
.service-list li:last-child { border-bottom: none; }
.service-list h3 { font-size: 1.05rem; margin-bottom: 6px; }
.service-list p { font-size: 0.9rem; }

/* ============================================================
   STATS
============================================================= */
.stats { background: var(--navy); padding: 56px 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--white);
  display: block;
}
.stat-label { font-size: 0.85rem; color: rgba(255,255,255,0.65); }

/* ============================================================
   PROYECTOS
============================================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 260px;
  gap: 20px;
}
.project-card--wide { grid-column: span 2; grid-row: span 2; }
.project-card {
  position: relative;
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
}
.project-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.project-card:hover img { transform: scale(1.04); }
.project-card figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 20px;
  background: linear-gradient(180deg, transparent, rgba(11,31,58,0.9));
  display: flex; flex-direction: column; gap: 4px;
}
.project-card figcaption h3 { color: var(--white); font-size: 1rem; margin: 0; }
.project-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--white);
  background: var(--royal);
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 4px;
}

/* ============================================================
   MARCAS
============================================================= */
.brands { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
#brands-title { max-width: none; }
.brands-grid {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.brands-grid li {
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  position: relative;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.brands-grid li:nth-child(1) { border-top-left-radius: 9px; }
.brands-grid li:nth-child(3) { border-top-right-radius: 9px; }
.brands-grid li:nth-child(7) { border-bottom-left-radius: 9px; }
.brands-grid li:nth-child(9) { border-bottom-right-radius: 9px; }
.brands-grid li:hover {
  background: var(--bg-soft);
  box-shadow: inset 0 0 0 2px var(--royal), 0 12px 24px -8px rgba(30,79,217,0.35);
  transform: translateY(-3px);
  z-index: 1;
}
.brands-grid img {
  max-width: 100%;
  max-height: 40px;
  width: auto;
  transition: transform 0.2s ease;
}
.brands-grid li:hover img { transform: scale(1.12); }

/* ============================================================
   POR QUE ELEGIRNOS + CTA
============================================================= */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 40px;
}
.why-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.why-list li {
  position: relative;
  padding-left: 28px;
  font-size: 0.95rem;
  color: var(--text-1);
}
.why-list li::before {
  content: '';
  position: absolute; left: 0; top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--royal);
}
.why-cta {
  background: var(--navy);
  border-radius: 14px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.why-cta h3 { color: var(--white); }
.why-cta p { color: rgba(255,255,255,0.75); margin-bottom: 18px; }
.why-cta .btn { margin-top: 6px; }

/* ============================================================
   CONTACTO
============================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
}
.contact-info { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.contact-link {
  font-size: 0.95rem;
  color: var(--royal);
  text-decoration: none;
  font-weight: 600;
}
.contact-link:hover { text-decoration: underline; }
.contact-form {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
}
#form-fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: 0.85rem; color: var(--text-1); font-weight: 500; }
.form-row input, .form-row textarea {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 11px 13px;
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.form-row input:focus, .form-row textarea:focus { border-color: var(--royal); }
.hp-field { position: absolute; left: -9999px; opacity: 0; }
.form-status { font-size: 0.85rem; color: var(--text-2); min-height: 1.2em; }

.contact-form.is-success {
  background: #F0FAF3;
  border-color: #BCE8C9;
}
.success-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: #E3F5EA; color: #16803C;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.success-title {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 600;
  color: var(--navy); margin: 0 0 8px;
}
.success-subtitle {
  font-size: 0.9rem; color: var(--text-2);
  margin: 0 0 24px; line-height: 1.5;
}
.btn-ghost-success {
  background: #fff; border: 1px solid var(--royal); color: var(--royal);
}
.btn-ghost-success:hover { background: #F5F8FC; }

/* ============================================================
   FOOTER
============================================================= */
.site-footer { background: var(--navy); color: rgba(255,255,255,0.7); padding: 56px 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-brand .brand--footer { color: var(--white); margin-bottom: 10px; }
.footer-brand p { font-size: 0.88rem; color: rgba(255,255,255,0.6); }
.site-footer h4 { color: var(--white); font-size: 0.9rem; margin-bottom: 14px; }
.site-footer a {
  display: block;
  text-decoration: none;
  color: rgba(255,255,255,0.7);
  font-size: 0.88rem;
  margin-bottom: 8px;
}
.site-footer a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding: 20px 24px;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
}
.footer-credit {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.55);
}
.footer-credit img { display: block; height: 18px; width: auto; opacity: 0.9; }

/* ============================================================
   WHATSAPP FAB
============================================================= */
.whatsapp-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--royal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(11,31,58,0.28);
  transition: transform 0.15s ease, background 0.15s ease;
}
.whatsapp-fab:hover { background: var(--royal-deep); transform: translateY(-2px); }

/* ============================================================
   REVEAL (single orchestrated hero entrance)
   Content is visible by default; JS uses gsap.from() to animate
   in, so nothing depends on the script loading to be seen.
============================================================= */

/* ============================================================
   RESPONSIVE
============================================================= */
@media (max-width: 900px) {
  .about-grid, .contact-grid, .why-grid { grid-template-columns: 1fr; }
  .about-points { grid-template-columns: 1fr 1fr; }
  .services-bento { grid-template-columns: 1fr; }
  .service-feature { min-height: 300px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 220px; }
  .project-card--wide { grid-column: span 2; grid-row: span 1; }
  .brands-grid li { padding: 22px 12px; }
  .main-nav { display: none; }
  .menu-toggle {
    display: flex; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer;
  }
  .menu-toggle span { width: 22px; height: 2px; background: var(--navy); }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .about-points { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card--wide { grid-column: span 1; }
  .hero-stats { gap: 24px; }
  .brands-grid li { padding: 16px 8px; }
  .brands-grid img { max-height: 28px; }
}
