/* ═══════════════════════════════════════════════════════════
   KUXASOLUTION – DESIGN SYSTEM
   Mobile-first · Performance-first · No external images
   ═══════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────
   1. DESIGN TOKENS
───────────────────────────────────────────────────────── */
:root {
  /* Base – dark forest mode */
  --color-bg: #0f1c14;
  --color-surface: #152219;
  --color-text: #ddeee5;
  --color-text-muted: #9db8a8;
  --color-border: rgba(0, 168, 107, 0.14);

  /* Mexican Tech Palette */
  --jade: #00A86B;
  --jade-dark: #007A4E;
  --jade-glow: rgba(0, 168, 107, 0.25);
  --turquoise: #1ABC9C;
  --azul-talavera: #1F3C88;
  --azul-talavera-light: #2d54c8;
  --azul-talavera-dark: #162d6a;
  --coral: #E94F37;
  --maiz: #F4C430;

  /* Motion */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 200ms;
  --duration-medium: 500ms;
  --duration-slow: 900ms;

  /* Layout */
  --max-width: 1200px;
  --radius-soft: 12px;
  --radius-card: 16px;
  --radius-pill: 100px;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Typography */
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;

  /* Nav */
  --nav-height: 68px;
}

/* ─────────────────────────────────────────────────────────
   2. RESET & BASE
───────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.0625rem);
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

ul, ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ─────────────────────────────────────────────────────────
   3. LAYOUT UTILITIES
───────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

@media (min-width: 1024px) {
  .container {
    padding-inline: var(--space-8);
  }
}

/* ─────────────────────────────────────────────────────────
   4. MAYA PATTERN – Greca escalonada (xicalcoliuhqui)
   SVG inline tile: espiral escalonada auténtica maya
───────────────────────────────────────────────────────── */
.maya-pattern {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.maya-pattern--light .maya-grid {
  opacity: 0.035;
}

.maya-grid {
  position: absolute;
  inset: -60px;
  opacity: 0.07;
}

/*
  Greca escalonada: espiral cuadrada de 4 pasos en SVG 60×60.
  Dos ganchos opuestos por tile forman el friso maya al repetir.
  #00A86B = var(--jade) codificado para data-URL
*/
.maya-grid::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cg fill='none' stroke='%2300A86B' stroke-width='1.5' stroke-linejoin='miter'%3E%3C!-- Borde exterior perimetral --%3E%3Crect x='1' y='1' width='58' height='58'/%3E%3C!-- Greca sup-izq: espiral escalonada hacia adentro --%3E%3Cpath d='M6,6 H36 V14 H14 V36 H6 Z'/%3E%3Cpath d='M16,16 H30 V24 H22 V30 H16 Z'/%3E%3C!-- Greca inf-der: opuesta (rotada 180 grados) --%3E%3Cpath d='M54,54 H24 V46 H46 V24 H54 Z'/%3E%3Cpath d='M44,44 H30 V36 H38 V30 H44 Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 60px 60px;
  background-position: 0 0;
}

/* Segunda capa desplazada media celda para densificar el friso */
.maya-grid::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cg fill='none' stroke='%2300A86B' stroke-width='1' opacity='0.5'%3E%3C!-- Punto central de conexion entre tiles --%3E%3Crect x='27' y='27' width='6' height='6'/%3E%3Cline x1='30' y1='0' x2='30' y2='27'/%3E%3Cline x1='30' y1='33' x2='30' y2='60'/%3E%3Cline x1='0' y1='30' x2='27' y2='30'/%3E%3Cline x1='33' y1='30' x2='60' y2='30'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 60px 60px;
  background-position: 30px 30px;
  opacity: 0.4;
}

/* ── Hero: grecas en oro maya (contrasta con el fondo oscuro) ── */
.hero .maya-grid {
  filter: hue-rotate(-105deg) brightness(1.6) saturate(1.1);
  opacity: 0.10;
}

/* ─────────────────────────────────────────────────────────
   5. NAVIGATION
───────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(5, 14, 8, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0, 168, 107, 0.18);
  transition: box-shadow var(--duration-fast) var(--ease-standard),
              background var(--duration-medium) var(--ease-standard);
}

.nav.scrolled {
  background: rgba(5, 14, 8, 0.97);
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: #e8f4ec;
  transition: opacity var(--duration-fast) var(--ease-standard);
}

.nav__logo:hover { opacity: 0.8; }

.nav__logo-mark {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}

/* Mobile nav menu */
.nav__menu {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-6);
  gap: var(--space-4);
  visibility: hidden;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height var(--duration-medium) var(--ease-standard),
    opacity var(--duration-medium) var(--ease-standard),
    visibility var(--duration-medium);
}

.nav__menu.is-open {
  visibility: visible;
  max-height: 400px;
  opacity: 1;
}

.nav__link {
  font-weight: 500;
  font-size: 1rem;
  color: rgba(220, 240, 228, 0.85);
  padding-block: var(--space-2);
  transition: color var(--duration-fast) var(--ease-standard);
}

.nav__link:hover { color: var(--jade); }

.nav__link--cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2) var(--space-6);
  background: var(--jade);
  color: white;
  border-radius: var(--radius-pill);
  font-weight: 600;
  transition:
    background var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard);
}

.nav__link--cta:hover {
  background: var(--jade-dark);
  color: white;
  transform: translateY(-1px);
}

/* Hamburger — padding amplía el touch target sin colapsar el ícono */
.nav__toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  gap: 5px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #e8f4ec;
  border-radius: 2px;
  transition: transform var(--duration-fast) var(--ease-standard),
              opacity var(--duration-fast) var(--ease-standard);
}

.nav__toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.nav__toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav__toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

@media (min-width: 640px) {
  .nav__menu {
    display: flex;
    flex-direction: row;
    position: static;
    background: transparent;
    border: none;
    padding: 0;
    gap: var(--space-6);
    transform: none;
    visibility: visible;
    max-height: none;
    overflow: visible;
    opacity: 1;
    align-items: center;
  }

  .nav__toggle { display: none; }
}

/* ─────────────────────────────────────────────────────────
   6. HERO
───────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  overflow: hidden;
  background: linear-gradient(160deg, #050e07 0%, #0b1d10 55%, #060f08 100%);
}

.hero__parallax {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 65% 65% at 72% 38%, rgba(0, 168, 107, 0.18) 0%, transparent 70%),
              radial-gradient(ellipse 45% 45% at 18% 68%, rgba(26, 188, 156, 0.12) 0%, transparent 60%),
              radial-gradient(ellipse 30% 50% at 50% 100%, rgba(0, 168, 107, 0.08) 0%, transparent 70%);
  z-index: 0;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: center;
  padding-block: 2.5rem;
}

@media (min-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    padding-block: var(--space-20);
  }
}

.hero__content { order: 1; }

.hero__visual {
  order: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  perspective: 700px;        /* contexto 3D para la pirámide hija */
  perspective-origin: 50% 30%;
  gap: var(--space-4);
}

@media (min-width: 1024px) {
  .hero__content { order: 1; }
  .hero__visual  { order: 2; }
}

.hero__eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--jade);
  margin-bottom: var(--space-4);
}

/* ── Hero sobre fondo oscuro: texto claro ── */
.hero .hero__title {
  color: #e8f4ec;
}

.hero .hero__desc {
  color: rgba(190, 228, 208, 0.72);
}

.hero .btn--ghost {
  color: rgba(220, 242, 228, 0.88);
  border-color: rgba(255, 255, 255, 0.2);
}

.hero .btn--ghost:hover {
  border-color: var(--jade);
  color: #e8f4ec;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-6);
}

/* En mobile los saltos de línea forzados sobran — solo en 640px+ */
.hero__title br { display: none; }
@media (min-width: 640px) {
  .hero__title br { display: block; }
}

.hero__title-accent {
  background: linear-gradient(135deg, var(--jade) 0%, var(--turquoise) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__desc {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: var(--color-text-muted);
  max-width: 48ch;
  margin-bottom: var(--space-8);
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
}

/* Scroll hint */
.hero__scroll {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
}

.hero__scroll-line {
  display: block;
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--jade), transparent);
  animation: scrollPulse 2s var(--ease-standard) infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.4; transform: scaleY(0.6); }
}

/* ─────────────────────────────────────────────────────────
   7. PYRAMID 3D — Three.js canvas mount
───────────────────────────────────────────────────────── */
.pyramid-3d-wrap {
  width: 100%;
  height: 260px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-inline: auto;
}

@media (min-width: 640px) {
  .pyramid-3d-wrap { height: 360px; }
}

@media (min-width: 1024px) {
  .pyramid-3d-wrap { height: 460px; }
}

/* Three.js gestiona width/height del canvas via setSize() */
.pyramid-3d-wrap canvas {
  display: block;
  flex-shrink: 0;
  max-width: 100%;
}

.pyramid__label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-align: center;
  letter-spacing: 0.05em;
  margin-top: var(--space-4);
}

/* ─────────────────────────────────────────────────────────
   8. BUTTONS
───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.625rem 1.375rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition:
    background var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard),
    color var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 3px solid var(--jade);
  outline-offset: 3px;
}

.btn--primary {
  /* --jade (#00A86B) con blanco solo da 2.88:1 — falla WCAG AA.
     --jade-dark (#007A4E) con blanco da 4.91:1 — pasa WCAG AA. */
  background: var(--jade-dark);
  color: white;
  border-color: var(--jade-dark);
}

.btn--primary:hover {
  background: #005c38;
  border-color: #005c38;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--jade-glow);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn--ghost:hover {
  border-color: var(--jade);
  color: var(--jade);
  transform: translateY(-2px);
}

.btn--full { width: 100%; }

.btn__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

@media (min-width: 640px) {
  .btn {
    padding: 0.75rem 1.75rem;
    font-size: 0.9375rem;
  }
}

/* ─────────────────────────────────────────────────────────
   9. STATS
───────────────────────────────────────────────────────── */
.stats {
  padding-block: var(--space-16);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.stats__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}

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

.stats__item {
  text-align: center;
}

.stats__number {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--jade);
  line-height: 1;
}

.stats__plus {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--turquoise);
}

.stats__label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  margin-top: var(--space-2);
}

.stats__sublabel {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: var(--space-1);
  line-height: 1.5;
}

/* ─────────────────────────────────────────────────────────
   10. SECTION HEADERS
───────────────────────────────────────────────────────── */
.section-header {
  text-align: center;
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: var(--space-16);
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--jade);
  margin-bottom: var(--space-3);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 3.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.section-desc {
  font-size: clamp(1rem, 1.5vw, 1.0625rem);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ─────────────────────────────────────────────────────────
   11. SERVICES
───────────────────────────────────────────────────────── */
.services {
  padding-block: var(--space-24);
  background: var(--color-bg);
}

.services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

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

@media (min-width: 1024px) {
  .services__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  padding: var(--space-8);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition:
    transform var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard);
  outline: none;
}

.service-card:hover,
.service-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px var(--jade-glow);
  border-color: rgba(0, 168, 107, 0.3);
}

.service-card:focus-visible {
  outline: 3px solid var(--jade);
  outline-offset: 2px;
}

.service-card__icon {
  width: 48px;
  height: 48px;
  color: var(--jade);
  margin-bottom: var(--space-6);
}

.service-card__icon svg {
  width: 100%;
  height: 100%;
}

.service-card__title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-3);
  line-height: 1.3;
}

.service-card__desc {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: var(--space-6);
}

.service-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.service-card__tags li {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--jade);
  background: rgba(0, 168, 107, 0.08);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0, 168, 107, 0.2);
}

/* ─────────────────────────────────────────────────────────
   12. PROCESS TIMELINE
───────────────────────────────────────────────────────── */
.process {
  padding-block: var(--space-24);
  background: var(--color-surface);
}

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Vertical line (mobile) */
.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--jade), var(--turquoise), var(--azul-talavera));
  transform-origin: top;
  transform: scaleY(0);
  transition: transform 1.2s var(--ease-out-quad);
  border-radius: 2px;
}

.timeline.line-animated::before {
  transform: scaleY(1);
}

.timeline__item {
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-rows: auto auto;
  gap: 0 var(--space-6);
  padding-bottom: var(--space-12);
  position: relative;
}

.timeline__item:last-child { padding-bottom: 0; }

.timeline__marker {
  grid-column: 1;
  grid-row: 1;
  width: 40px;
  height: 40px;
  background: var(--color-surface);
  border: 2.5px solid var(--jade);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: background var(--duration-fast) var(--ease-standard),
              border-color var(--duration-fast) var(--ease-standard);
}

.timeline__item:hover .timeline__marker {
  background: var(--jade);
}

.timeline__item:hover .timeline__number {
  color: white;
}

.timeline__number {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--jade);
  transition: color var(--duration-fast) var(--ease-standard);
}

.timeline__connector {
  grid-column: 1;
  grid-row: 2;
  width: 2px;
  min-height: var(--space-8);
  background: var(--color-border);
  margin: 0 auto;
  display: none; /* hidden — ::before handles the line */
}

.timeline__content {
  grid-column: 2;
  grid-row: 1 / 3;
  padding-top: var(--space-2);
}

.timeline__title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.1vw, 1.125rem);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.timeline__desc {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.65;
}

/* Desktop: horizontal layout */
@media (min-width: 1024px) {
  .timeline {
    flex-direction: row;
    align-items: flex-start;
  }

  .timeline::before {
    top: 20px;
    left: 0;
    right: 0;
    bottom: auto;
    width: auto;
    height: 2px;
    transform: scaleX(0);
    transition: transform 1.2s var(--ease-out-quad);
    transform-origin: left;
  }

  .timeline.line-animated::before {
    transform: scaleX(1);
  }

  .timeline__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 0;
    padding-inline: var(--space-4);
    gap: var(--space-4);
  }

  .timeline__marker {
    grid-column: auto;
    grid-row: auto;
  }

  .timeline__content {
    grid-column: auto;
    grid-row: auto;
    padding-top: 0;
  }
}

/* ─────────────────────────────────────────────────────────
   13. ABOUT
───────────────────────────────────────────────────────── */
.about {
  padding-block: var(--space-24);
  background: var(--color-bg);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  align-items: center;
}

@media (min-width: 1024px) {
  .about__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-20);
  }
}

.about__text {
  font-size: clamp(1rem, 1.5vw, 1.0625rem);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-6);
}

.about__text em {
  font-style: italic;
  color: var(--jade);
}

.about__values {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.about__value {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.9375rem;
  color: var(--color-text);
}

.about__value-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--jade);
  flex-shrink: 0;
}

/* Badge grid */
.about__badge-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  max-width: 360px;
  margin-inline: auto;
}

.about__badge {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-6);
  text-align: center;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  transition: transform var(--duration-fast) var(--ease-standard),
              box-shadow var(--duration-fast) var(--ease-standard);
}

.about__badge:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

.about__badge-icon {
  font-size: 2rem;
  line-height: 1;
}

/* ─────────────────────────────────────────────────────────
   14. CTA BANNER
───────────────────────────────────────────────────────── */
.cta-banner {
  position: relative;
  padding-block: var(--space-20);
  background: linear-gradient(135deg, var(--azul-talavera) 0%, var(--azul-talavera-dark) 100%);
  overflow: hidden;
  text-align: center;
}

.cta-banner__inner {
  position: relative;
  z-index: 1;
}

.cta-banner__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: white;
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}

.cta-banner__desc {
  font-size: clamp(1rem, 1.5vw, 1.0625rem);
  color: rgba(255,255,255,0.75);
  margin-bottom: var(--space-8);
  max-width: 50ch;
  margin-inline: auto;
}

.cta-banner .btn--primary {
  background: white;
  color: var(--azul-talavera);
  border-color: white;
}

.cta-banner .btn--primary:hover {
  background: rgba(255,255,255,0.9);
  border-color: rgba(255,255,255,0.9);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* ─────────────────────────────────────────────────────────
   15. CONTACT
───────────────────────────────────────────────────────── */
.contact {
  padding-block: var(--space-24);
  background:
    radial-gradient(ellipse 65% 55% at 85% 15%, rgba(0, 168, 107, 0.14) 0%, transparent 60%),
    radial-gradient(ellipse 50% 45% at 5% 85%,  rgba(26, 188, 156, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse 40% 40% at 50% 100%, rgba(244, 196, 48, 0.06) 0%, transparent 60%),
    linear-gradient(135deg, #071a10 0%, #0c2435 50%, #071828 100%);
  border-top: 1px solid rgba(0, 168, 107, 0.18);
}

/* Título "Contáctanos" — gradiente jade → turquesa → maíz (paleta Maya) */
.contact .section-title {
  background: linear-gradient(110deg, #1ABC9C 0%, #00A86B 40%, #F4C430 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
}

@media (min-width: 1024px) {
  .contact__grid {
    grid-template-columns: 1fr 1.4fr;
    gap: var(--space-16);
    align-items: start;
  }
}

.contact__desc {
  font-size: clamp(1rem, 1.5vw, 1.0625rem);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-8);
}

.contact__details {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.contact__detail {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.contact__detail-icon {
  width: 40px;
  height: 40px;
  background: rgba(0, 168, 107, 0.08);
  border-radius: var(--radius-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--jade);
}

.contact__detail-icon svg {
  width: 20px;
  height: 20px;
}

.contact__link {
  color: var(--color-text);
  transition: color var(--duration-fast) var(--ease-standard);
}

.contact__link:hover { color: var(--jade); }

/* WhatsApp CTA */
.contact__whatsapp {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-8);
  padding: var(--space-3) var(--space-6);
  background: #25D366;
  color: white;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  transition:
    background var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
}

.contact__whatsapp:hover {
  background: #1ebe5d;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}

.contact__whatsapp:focus-visible {
  outline: 3px solid #25D366;
  outline-offset: 3px;
}

.contact__whatsapp-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Form */
.contact-form {
  background: #1c2e24;
  border-radius: var(--radius-card);
  padding: var(--space-8);
  border: 1px solid rgba(0, 168, 107, 0.22);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
}

.form-label span { color: var(--coral); }

.form-input {
  width: 100%;
  padding: 0.75rem var(--space-4);
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-soft);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--color-text);
  transition:
    border-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-input::placeholder { color: rgba(137,165,150,0.5); }

.form-input:focus {
  border-color: var(--jade);
  box-shadow: 0 0 0 3px rgba(0, 168, 107, 0.12);
}

.form-input.has-error {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(233, 79, 55, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2389a596' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

.form-error {
  font-size: 0.8125rem;
  color: var(--coral);
  min-height: 1.2em;
  display: block;
}

/* Status messages */
.form-status {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-soft);
  font-size: 0.9375rem;
  font-weight: 500;
  transform: translateY(8px);
  opacity: 0;
  transition:
    opacity var(--duration-medium) var(--ease-standard),
    transform var(--duration-medium) var(--ease-standard);
}

.form-status[hidden] {
  display: none;
}

.form-status.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.form-status svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.form-status--success {
  background: rgba(0, 168, 107, 0.12);
  border: 1px solid rgba(0, 168, 107, 0.30);
  color: var(--jade);
}

.form-status--error {
  background: rgba(233, 79, 55, 0.08);
  border: 1px solid rgba(233, 79, 55, 0.25);
  color: var(--coral);
}

/* ─────────────────────────────────────────────────────────
   16. FOOTER
───────────────────────────────────────────────────────── */
.footer {
  background: #060e08;
  /* rgba(255,255,255,0.7) puede confundir checkers de accesibilidad.
     #c8ccc9 equivale visualmente pero da 11.4:1 de contraste — WCAG AAA. */
  color: #c8ccc9;
  padding-block: var(--space-12) var(--space-8);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

@media (min-width: 640px) {
  .footer__inner {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.footer .nav__logo-text { color: white; }
/* logo SVG hereda el estilo del nav, sin override necesario */

.footer__tagline {
  font-size: 0.875rem;
  margin-top: var(--space-3);
  color: #a0a5a1; /* equivale a rgba(255,255,255,0.5) sobre #060e08 → 7.85:1 */
}

.footer__nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer__nav a {
  font-size: 0.9375rem;
  color: #b4b8b5; /* equivale a rgba(255,255,255,0.6) sobre #060e08 → 9.2:1 */
  transition: color var(--duration-fast) var(--ease-standard);
}

.footer__nav a:hover { color: white; }

.footer__social {
  display: flex;
  gap: var(--space-4);
}

.footer__social-link {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-soft);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6);
  transition:
    background var(--duration-fast) var(--ease-standard),
    color var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard);
}

.footer__social-link:hover {
  background: var(--jade);
  color: white;
  transform: translateY(-2px);
}

.footer__social-link svg {
  width: 18px;
  height: 18px;
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.4);
}

@media (min-width: 640px) {
  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ─────────────────────────────────────────────────────────
   17. SCROLL REVEAL – initial state
   Nota: el estado oculto (opacity:0) lo aplica JS, no CSS,
   para que el contenido sea visible sin JavaScript (SEO).
───────────────────────────────────────────────────────── */
.reveal-item {
  transition:
    opacity 700ms var(--ease-out-quad),
    transform 700ms var(--ease-out-quad);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal-item.will-reveal {
  opacity: 0;
  transform: translateY(40px);
}

.reveal-item.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ─────────────────────────────────────────────────────────
   18. ACCESSIBILITY
───────────────────────────────────────────────────────── */
:focus-visible {
  outline: 3px solid var(--jade);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ═══════════════════════════════════════════════════════════
   MAYA 3D WORLD — Bloques de piedra flotantes, partículas
   de selva, anillos glífo. CSS preserve-3d + anime.js.
   ═══════════════════════════════════════════════════════════ */

/* ─── Escena 3D (perspectiva contenedora) ─── */
.maya-scene {
  position: absolute;
  inset: 0;
  perspective: 900px;
  perspective-origin: 50% 40%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* ─── Bloque de piedra 3D ─── */
.maya-block {
  position: absolute;
  transform-style: preserve-3d;
  pointer-events: none;
}

.maya-block__face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
}

/* Cara frontal: jade translúcido con marca de glifo */
.maya-block__face--front {
  background: linear-gradient(
    135deg,
    rgba(0, 168, 107, 0.16) 0%,
    rgba(26, 188, 156, 0.07) 100%
  );
  border: 1.5px solid rgba(0, 168, 107, 0.55);
  transform: translateZ(var(--half));
}

/* Esquina escalonada maya en cara frontal */
.maya-block__face--front::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(0, 168, 107, 0.28);
}

.maya-block__face--front::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 5px;
  width: 7px;
  height: 7px;
  border-top: 2px solid rgba(0, 168, 107, 0.7);
  border-left: 2px solid rgba(0, 168, 107, 0.7);
}

.maya-block__face--back {
  background: rgba(0, 80, 50, 0.08);
  border: 1.5px solid rgba(0, 168, 107, 0.18);
  transform: rotateY(180deg) translateZ(var(--half));
}

.maya-block__face--left {
  background: rgba(0, 90, 55, 0.14);
  border: 1.5px solid rgba(0, 168, 107, 0.22);
  transform: rotateY(-90deg) translateZ(var(--half));
}

.maya-block__face--right {
  background: rgba(0, 140, 85, 0.12);
  border: 1.5px solid rgba(0, 168, 107, 0.28);
  transform: rotateY(90deg) translateZ(var(--half));
}

.maya-block__face--top {
  background: linear-gradient(
    135deg,
    rgba(0, 168, 107, 0.24),
    rgba(26, 188, 156, 0.12)
  );
  border: 1.5px solid rgba(0, 168, 107, 0.6);
  transform: rotateX(90deg) translateZ(var(--half));
}

.maya-block__face--bottom {
  background: rgba(0, 0, 0, 0.14);
  border: 1px solid rgba(0, 0, 0, 0.08);
  transform: rotateX(-90deg) translateZ(var(--half));
}

/* ─── Partículas de selva ─── */
.spore-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.jungle-spore {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(0, 168, 107, 0.9) 0%,
    rgba(26, 188, 156, 0.4) 55%,
    transparent 100%
  );
  pointer-events: none;
}

/* Variante diamante: partículas de maíz/jade */
.jungle-spore:nth-child(3n + 1) {
  border-radius: 0;
  background: linear-gradient(
    135deg,
    rgba(244, 196, 48, 0.8),
    rgba(0, 168, 107, 0.5)
  );
}

.jungle-spore:nth-child(3n + 2) {
  background: radial-gradient(
    circle,
    rgba(26, 188, 156, 0.9) 0%,
    transparent 70%
  );
}

/* ─── Anillos glífo maya ─── */
.glyph-ring {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.glyph-ring__layer {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(0, 168, 107, 0.3);
  border-radius: 2px;
}

/* Marcas de esquina escalonadas */
.glyph-ring__layer::before,
.glyph-ring__layer::after {
  content: '';
  position: absolute;
  background: rgba(0, 168, 107, 0.22);
}

.glyph-ring__layer::before {
  width: 28%;
  height: 2px;
  top: -2px;
  left: 36%;
}

.glyph-ring__layer::after {
  height: 28%;
  width: 2px;
  right: -2px;
  top: 36%;
}

/* ─── About badges: perspectiva para flip de entrada ─── */
.about__badge-grid {
  perspective: 500px;
}

/* ─────────────────────────────────────────────────────────
   19. REDUCED MOTION
───────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal-item {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html { scroll-behavior: auto; }
}

/* ─────────────────────────────────────────────────────────
   20. PRINT
───────────────────────────────────────────────────────── */
@media print {
  .nav, .hero__scroll, .cta-banner, .maya-pattern { display: none; }
  body { color: #1A1A1A; background: #ffffff; }
}

/* ─────────────────────────────────────────────────────────
   21. SKIP NAVIGATION
───────────────────────────────────────────────────────── */
/* ─────────────────────────────────────────────────────────
   22. HONEYPOT ANTI-SPAM
   Posición absoluta fuera de pantalla — los bots no detectan
   esta técnica (a diferencia de display:none o visibility:hidden)
───────────────────────────────────────────────────────── */
.form-hp {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
}

/* ─────────────────────────────────────────────────────────
   SKIP NAVIGATION
───────────────────────────────────────────────────────── */
.skip-link:focus {
  position: fixed;
  top: 0; left: 0;
  z-index: 9999;
  padding: var(--space-3) var(--space-6);
  background: var(--jade);
  color: white;
  font-weight: 600;
  border-radius: 0 0 var(--radius-soft) 0;
  clip: auto;
  width: auto;
  height: auto;
}


/* ─────────────────────────────────────────────────────────
   FOOTER LEGAL LINK
───────────────────────────────────────────────────────── */
.footer__legal-link {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer__legal-link:hover {
  color: var(--jade);
}
