/* ============================================================
   JESSICA PINEDA REAL ESTATE — Design System "Prestige Noir"
   taste-skill: DESIGN_VARIANCE:8 MOTION_INTENSITY:6 VISUAL_DENSITY:3
   ============================================================ */

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
  /* Colors */
  --gold:          #c4a46b;
  --gold-light:    #e0c898;
  --gold-dark:     #a8893d;
  --gold-subtle:   rgba(196, 164, 107, 0.15);
  --dark:          #0c0a08;
  --dark-2:        #1a1714;
  --dark-3:        #252119;
  --dark-4:        #2e2a24;
  --cream:         #f5f0e8;
  --cream-2:       #ede7d9;
  --white:         #fdfaf5;
  --muted:         #9a8e80;
  --muted-2:       #6b6159;
  --border:        rgba(196, 164, 107, 0.2);
  --border-dark:   rgba(255, 255, 255, 0.07);

  /* Typography */
  --font-display:  'Cormorant Garamond', 'Georgia', serif;
  --font-body:     'Outfit', system-ui, -apple-system, sans-serif;

  /* Fluid type scale */
  --text-xs:    clamp(0.7rem,   0.9vw,  0.8rem);
  --text-sm:    clamp(0.85rem,  1vw,    0.95rem);
  --text-base:  clamp(1rem,     1.2vw,  1.05rem);
  --text-md:    clamp(1.1rem,   1.4vw,  1.2rem);
  --text-lg:    clamp(1.2rem,   1.8vw,  1.4rem);
  --text-xl:    clamp(1.4rem,   2.2vw,  1.75rem);
  --text-2xl:   clamp(1.8rem,   3vw,    2.5rem);
  --text-3xl:   clamp(2.2rem,   4vw,    3.5rem);
  --text-4xl:   clamp(2.8rem,   5.5vw,  5rem);
  --text-5xl:   clamp(3.5rem,   7.5vw,  7rem);
  --text-hero:  clamp(3rem,     6vw,    6.5rem);

  /* Spacing */
  --sp-1:   0.25rem;
  --sp-2:   0.5rem;
  --sp-3:   0.75rem;
  --sp-4:   1rem;
  --sp-6:   1.5rem;
  --sp-8:   2rem;
  --sp-10:  2.5rem;
  --sp-12:  3rem;
  --sp-16:  4rem;
  --sp-20:  5rem;
  --sp-24:  6rem;
  --sp-32:  8rem;
  --sp-40:  10rem;
  --sp-48:  12rem;

  /* Layout */
  --max-w:     1440px;
  --gutter:    clamp(1.5rem, 5vw, 5rem);
  --nav-h:     80px;

  /* Transitions */
  --ease-expo:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast:    150ms;
  --dur-base:    300ms;
  --dur-slow:    600ms;
  --dur-crawl:   900ms;

  /* Shadows */
  --shadow-sm:   0 4px 16px rgba(12, 10, 8, 0.2);
  --shadow-md:   0 16px 40px rgba(12, 10, 8, 0.35);
  --shadow-lg:   0 32px 64px rgba(12, 10, 8, 0.5);
  --shadow-gold: 0 8px 32px rgba(196, 164, 107, 0.25);
}

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--dark-3);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: var(--font-body);
  font-size: var(--text-base);
}

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 500;
  line-height: 1.4;
}

.display {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--text-5xl);
  line-height: 1.0;
  letter-spacing: -0.02em;
}

.heading-1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-hero);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.heading-2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-4xl);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.heading-3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-3xl);
  line-height: 1.2;
}

.subheading {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--text-xl);
  line-height: 1.5;
  color: var(--muted);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.body-lg {
  font-size: var(--text-md);
  line-height: 1.75;
}

.body-sm {
  font-size: var(--text-sm);
  line-height: 1.65;
}

.italic-display {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
}

/* ============================================================
   4. LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: 900px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--sp-32);
}

.section--dark {
  background-color: var(--dark);
  color: var(--white);
}

.section--dark-2 {
  background-color: var(--dark-2);
  color: var(--white);
}

.section--cream {
  background-color: var(--cream);
  color: var(--dark-3);
}

.section--white {
  background-color: var(--white);
  color: var(--dark-3);
}

.section__eyebrow {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.section__number {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--gold);
  opacity: 0.8;
}

.section__label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.section__rule {
  width: 48px;
  height: 1px;
  background-color: var(--gold);
  display: inline-block;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-4xl);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-6);
}

.section__title--light {
  color: var(--white);
}

.section__subtitle {
  font-size: var(--text-md);
  line-height: 1.7;
  color: var(--muted);
  max-width: 60ch;
  margin-bottom: var(--sp-12);
}

.section__subtitle--light {
  color: rgba(253, 250, 245, 0.7);
}

.gold-rule {
  width: 64px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
  margin-bottom: var(--sp-8);
}

.gold-rule--full {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin-block: var(--sp-16);
}

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

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-8);
}

/* ============================================================
   5. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: var(--sp-4) var(--sp-8);
  border-radius: 0;
  transition:
    background-color var(--dur-base) var(--ease-expo),
    color var(--dur-base) var(--ease-expo),
    transform var(--dur-fast) var(--ease-expo),
    box-shadow var(--dur-base) var(--ease-expo);
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.08);
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-expo);
}

.btn:hover::after { opacity: 1; }

.btn:active {
  transform: scale(0.98) translateY(1px);
}

/* Gold filled */
.btn--gold {
  background-color: var(--gold);
  color: var(--dark);
  border: 1px solid var(--gold);
}

.btn--gold:hover {
  background-color: var(--gold-light);
  border-color: var(--gold-light);
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

/* Ghost (white border) */
.btn--ghost {
  background-color: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.3);
}

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

/* Ghost dark */
.btn--ghost-dark {
  background-color: transparent;
  color: var(--dark);
  border: 1px solid rgba(12, 10, 8, 0.3);
}

.btn--ghost-dark:hover {
  border-color: var(--gold-dark);
  color: var(--gold-dark);
  transform: translateY(-1px);
}

/* Text link with arrow */
.btn--text {
  padding: 0;
  gap: var(--sp-2);
  letter-spacing: 0.1em;
  color: var(--gold);
  border: none;
  background: none;
  font-size: var(--text-sm);
  font-weight: 500;
  text-transform: uppercase;
}

.btn--text::after { display: none; }

.btn--text .arrow {
  display: inline-block;
  transition: transform var(--dur-base) var(--ease-expo);
}

.btn--text:hover .arrow {
  transform: translateX(6px);
}

/* Large CTA */
.btn--lg {
  padding: var(--sp-6) var(--sp-12);
  font-size: var(--text-base);
}

/* Small */
.btn--sm {
  padding: var(--sp-3) var(--sp-6);
  font-size: var(--text-xs);
}

/* ============================================================
   6. HEADER / NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  transition:
    background-color var(--dur-base) var(--ease-smooth),
    box-shadow var(--dur-base) var(--ease-smooth),
    backdrop-filter var(--dur-base) var(--ease-smooth);
}

.nav--scrolled {
  background-color: rgba(12, 10, 8, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}

.nav__container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-8);
}

/* Logo */
.nav__logo {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav__logo-name {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--white);
  line-height: 1;
}

.nav__logo-tag {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  line-height: 1;
}

/* Desktop links */
.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
}

.nav__link {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(253, 250, 245, 0.75);
  text-decoration: none;
  position: relative;
  transition: color var(--dur-base) var(--ease-expo);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--gold);
  transition: width var(--dur-base) var(--ease-expo);
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--white);
}

.nav__link:hover::after,
.nav__link.is-active::after {
  width: 100%;
}

/* CTA button */
.nav__cta {
  flex-shrink: 0;
  font-size: 0.72rem;
  padding: var(--sp-3) var(--sp-6);
  letter-spacing: 0.12em;
}

/* Language toggle (EN/ES) — visible solo en mobile junto al burger */
.nav__lang-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 0.6rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--gold);
  background: transparent;
  border: 1px solid rgba(196, 164, 107, 0.4);
  text-decoration: none;
  transition: all 0.3s ease;
}

.nav__lang-toggle:hover {
  background: var(--gold);
  color: var(--dark);
  border-color: var(--gold);
}

/* Hamburger */
.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: var(--sp-2);
  cursor: pointer;
  background: none;
  border: none;
  flex-shrink: 0;
}

.nav__burger span {
  display: block;
  height: 1px;
  background-color: var(--white);
  transition: all var(--dur-base) var(--ease-expo);
}

.nav__burger span:nth-child(1) { width: 24px; }
.nav__burger span:nth-child(2) { width: 18px; }
.nav__burger span:nth-child(3) { width: 24px; }

.nav__burger.is-open span:nth-child(1) {
  width: 22px;
  transform: translateY(6px) rotate(45deg);
}

.nav__burger.is-open span:nth-child(2) {
  opacity: 0;
  transform: translateX(-8px);
}

.nav__burger.is-open span:nth-child(3) {
  width: 22px;
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile drawer */
.nav__mobile {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--dark);
  padding: var(--sp-10) var(--gutter);
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
  transform: translateX(100%);
  transition: transform var(--dur-slow) var(--ease-expo);
  z-index: 999;
  overflow-y: auto;
}

.nav__mobile.is-open {
  transform: translateX(0);
}

.nav__mobile-link {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  color: var(--white);
  text-decoration: none;
  border-bottom: 1px solid var(--border-dark);
  padding-bottom: var(--sp-6);
  transition: color var(--dur-base) var(--ease-expo);
}

.nav__mobile-link:hover {
  color: var(--gold);
}

/* ============================================================
   7. HERO COMPONENT
   ============================================================ */
.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 55fr 45fr;
  background-color: var(--dark);
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

.hero--split-right {
  grid-template-columns: 45fr 55fr;
}

.hero--minimal {
  min-height: 55vh;
  grid-template-columns: 1fr;
  align-items: center;
}

.hero--project {
  min-height: 80vh;
  grid-template-columns: 1fr;
  position: relative;
}

.hero__content {
  padding: calc(var(--nav-h) + var(--sp-20)) var(--gutter) var(--sp-20);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  z-index: 2;
  grid-column: 1 / -1;
  max-width: 1200px;
  margin-inline: auto;
  width: 100%;
}

.hero__eyebrow {
  margin-bottom: var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--sp-4);
}

.hero__eyebrow-line {
  width: 40px;
  height: 1px;
  background-color: var(--gold);
  flex-shrink: 0;
}

.hero__eyebrow-text {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-4xl);
  line-height: 1.2;
  text-align: center;
  max-width: 75ch;
  align-self: center;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: var(--sp-8);
}

.hero__title em {
  font-style: italic;
  color: var(--gold);
  text-shadow:
    0 0 40px rgba(12,10,8,0.95),
    0 0 20px rgba(12,10,8,1),
    0 2px 12px rgba(12,10,8,1);
}

.hero__subtitle {
  font-size: var(--text-md);
  line-height: 1.65;
  color: rgba(253, 250, 245, 0.65);
  max-width: 65ch;
  margin-top: var(--sp-10);
  margin-bottom: var(--sp-4);
  font-weight: 300;
  text-align: center;
  align-self: center;
}

.hero__credential {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: rgba(253, 250, 245, 0.5);
  max-width: 60ch;
  margin-top: 0;
  margin-bottom: var(--sp-12);
  font-weight: 300;
  text-align: center;
  align-self: center;
  letter-spacing: 0.02em;
}

/* El <br> solo se aplica en móvil — en desktop se oculta para que el título fluya natural */
.mobile-only-break { display: none; }
@media (max-width: 1023px) {
  .mobile-only-break { display: inline; }
}

.hero__ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-6);
  flex-wrap: wrap;
  align-self: center;
}

.hero__scroll {
  position: absolute;
  bottom: var(--sp-8);
  left: var(--gutter);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: rgba(253, 250, 245, 0.4);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(196, 164, 107, 0.6), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

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

/* Hero image side — full bleed background */
.hero__image {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero__image img,
.hero__image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

.hero__image-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    /* esquina superior izquierda — oscuro profundo que se disuelve hacia el centro */
    radial-gradient(ellipse 65% 85% at 0% 0%, rgba(12,10,8,0.97) 0%, rgba(12,10,8,0.55) 55%, transparent 100%),
    /* degradado horizontal — oscuro izquierda, se disuelve al centro */
    linear-gradient(to right, rgba(12,10,8,0.75) 0%, rgba(12,10,8,0.3) 50%, transparent 100%),
    /* degradado abajo — ancla la escena */
    linear-gradient(to top, rgba(12,10,8,0.88) 0%, transparent 45%),
    /* degradado arriba — bajo el nav */
    linear-gradient(to bottom, rgba(12,10,8,0.55) 0%, transparent 22%);
}

/* Project hero (full-bleed) */
.hero--project .hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero--project .hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero--project .hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(12, 10, 8, 0.85) 0%,
    rgba(12, 10, 8, 0.5) 60%,
    rgba(12, 10, 8, 0.3) 100%
  );
}

.hero--project .hero__content {
  position: relative;
  z-index: 2;
}

.hero__price-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  background-color: var(--gold);
  color: var(--dark);
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--sp-6);
}

/* ============================================================
   8. PROJECT CARDS
   ============================================================ */
.card-project {
  position: relative;
  overflow: hidden;
  background-color: var(--dark-2);
  cursor: pointer;
  display: block;
  text-decoration: none;
  /* Spring tilt effect */
  transform-style: preserve-3d;
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform var(--dur-base) var(--ease-expo), box-shadow var(--dur-base) var(--ease-expo);
}

@media (hover: hover) {
  .card-project:hover {
    box-shadow: var(--shadow-lg);
    transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px);
  }

  .card-project:hover .card-project__image img {
    transform: scale(1.06);
  }

  .card-project:hover .card-project__overlay {
    opacity: 1;
  }
}

.card-project__image {
  position: relative;
  overflow: hidden;
  height: 0;
  padding-bottom: 75%;
}

.card-project__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-expo);
  will-change: transform;
}

.card-project__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(12, 10, 8, 0.9) 0%,
    rgba(12, 10, 8, 0.3) 50%,
    transparent 100%
  );
  opacity: 0.6;
  transition: opacity var(--dur-base) var(--ease-expo);
}

.card-project__zone {
  position: absolute;
  top: var(--sp-4);
  left: var(--sp-4);
  background-color: rgba(12, 10, 8, 0.7);
  backdrop-filter: blur(8px);
  color: var(--gold);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: var(--sp-1) var(--sp-3);
  border: 1px solid rgba(196, 164, 107, 0.3);
}

.card-project__body {
  padding: var(--sp-6) var(--sp-8);
  background-color: var(--dark-2);
  border-top: 1px solid var(--border-dark);
}

.card-project__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--white);
  margin-bottom: var(--sp-2);
  line-height: 1.2;
}

.card-project__price {
  color: var(--gold);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-1);
}

.card-project__delivery {
  color: var(--muted);
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
}

.card-project__arrow {
  position: absolute;
  bottom: var(--sp-6);
  right: var(--sp-8);
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  transition: all var(--dur-base) var(--ease-expo);
}

@media (hover: hover) {
  .card-project:hover .card-project__arrow {
    background-color: var(--gold);
    color: var(--dark);
    border-color: var(--gold);
  }
}

/* Projects grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}

.projects-grid--asymmetric {
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto;
}

.projects-grid--asymmetric .card-project:nth-child(1) {
  grid-column: 1 / 7;
}
.projects-grid--asymmetric .card-project:nth-child(2) {
  grid-column: 7 / 13;
}
.projects-grid--asymmetric .card-project:nth-child(3) {
  grid-column: 1 / 5;
}
.projects-grid--asymmetric .card-project:nth-child(4) {
  grid-column: 5 / 9;
}
.projects-grid--asymmetric .card-project:nth-child(5) {
  grid-column: 9 / 13;
}
.projects-grid--asymmetric .card-project:nth-child(6) {
  grid-column: 1 / 13;
}

.projects-grid--asymmetric .card-project:nth-child(6) .card-project__image {
  aspect-ratio: 21/6;
}

/* ============================================================
   9. FEATURE SPLIT
   ============================================================ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 70vh;
  overflow: hidden;
}

.split--reversed {
  direction: rtl;
}

.split--reversed > * {
  direction: ltr;
}

.split__image {
  position: relative;
  overflow: hidden;
}

.split__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-expo);
}

@media (hover: hover) {
  .split:hover .split__image img {
    transform: scale(1.03);
  }
}

.split__content {
  padding: var(--sp-24) var(--sp-16);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: var(--dark);
}

.split__content--light {
  background-color: var(--cream);
  color: var(--dark-3);
}

.split__content--light .section__title {
  color: var(--dark);
}

.split__content--light .section__subtitle {
  color: var(--muted-2);
}

/* ============================================================
   10. STATS ROW
   ============================================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.stat {
  padding: var(--sp-12) var(--sp-8);
  border-right: 1px solid var(--border-dark);
  text-align: center;
}

.stat:last-child {
  border-right: none;
}

.stat__number {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
  margin-bottom: var(--sp-2);
  display: block;
}

.stat__label {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============================================================
   11. PROCESS STEPS
   ============================================================ */
.process {
  counter-reset: step;
}

.process__item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--sp-8);
  padding-block: var(--sp-10);
  border-bottom: 1px solid var(--border-dark);
  align-items: start;
}

.process__item:last-child {
  border-bottom: none;
}

.process__number {
  counter-increment: step;
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 300;
  color: var(--gold);
  opacity: 0.5;
  line-height: 1;
}

.process__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--white);
  margin-bottom: var(--sp-3);
}

.process__desc {
  color: rgba(253, 250, 245, 0.6);
  font-size: var(--text-sm);
  line-height: 1.7;
}

/* ============================================================
   12. DIFFERENTIATORS / FEATURE LIST
   ============================================================ */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
}

.feature-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-6);
  align-items: start;
  padding-bottom: var(--sp-8);
  border-bottom: 1px solid var(--border-dark);
}

.feature-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.feature-item__arrow {
  color: var(--gold);
  font-size: var(--text-lg);
  line-height: 1;
  margin-top: 2px;
  flex-shrink: 0;
}

.feature-item__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--white);
  margin-bottom: var(--sp-2);
}

.feature-item__title--dark {
  color: var(--dark);
}

.feature-item__desc {
  color: rgba(253, 250, 245, 0.65);
  font-size: var(--text-sm);
  line-height: 1.7;
}

.feature-item__desc--dark {
  color: var(--muted-2);
}

/* ============================================================
   13. SPEC TABLE (Project detail)
   ============================================================ */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border-dark);
}

.spec-table td {
  padding: var(--sp-4) var(--sp-6);
  border-bottom: 1px solid var(--border-dark);
  font-size: var(--text-sm);
  line-height: 1.5;
  vertical-align: top;
}

.spec-table tr:last-child td {
  border-bottom: none;
}

.spec-table td:first-child {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
  width: 200px;
  padding-right: var(--sp-8);
}

.spec-table td:last-child {
  color: rgba(253, 250, 245, 0.8);
}

/* ============================================================
   14. FAQ ACCORDION
   ============================================================ */
.faq {
  border-top: 1px solid var(--border-dark);
}

.faq__item {
  border-bottom: 1px solid var(--border-dark);
}

.faq__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  padding: var(--sp-6) 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  color: var(--white);
  text-align: left;
  cursor: pointer;
  transition: color var(--dur-base) var(--ease-expo);
  background: none;
  border: none;
}

.faq__question--dark {
  color: var(--dark);
}

.faq__question:hover {
  color: var(--gold);
}

.faq__icon {
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 14px;
  flex-shrink: 0;
  transition: transform var(--dur-base) var(--ease-expo), background-color var(--dur-base) var(--ease-expo);
}

.faq__item.is-open .faq__icon {
  transform: rotate(45deg);
  background-color: var(--gold);
  color: var(--dark);
}

.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur-slow) var(--ease-expo), padding var(--dur-slow) var(--ease-expo);
}

.faq__item.is-open .faq__answer {
  max-height: 400px;
}

.faq__answer-inner {
  padding-bottom: var(--sp-6);
  color: rgba(253, 250, 245, 0.65);
  font-size: var(--text-sm);
  line-height: 1.8;
}

.faq__answer-inner--dark {
  color: var(--muted-2);
}

/* ============================================================
   15. CONTACT FORM
   ============================================================ */
.form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.form__label {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.form__input,
.form__textarea,
.form__select {
  background-color: rgba(255,255,255,0.04);
  border: 1px solid var(--border-dark);
  color: var(--white);
  padding: var(--sp-4) var(--sp-6);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  transition: border-color var(--dur-base) var(--ease-expo), background-color var(--dur-base) var(--ease-expo);
  width: 100%;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
}

.form__input::placeholder,
.form__textarea::placeholder {
  color: rgba(154, 142, 128, 0.5);
}

.form__input:focus,
.form__textarea:focus,
.form__select:focus {
  outline: none;
  border-color: var(--gold);
  background-color: rgba(255,255,255,0.06);
}

.form__input.is-error,
.form__textarea.is-error {
  border-color: #e05c5c;
}

.form__error {
  font-size: var(--text-xs);
  color: #e05c5c;
  display: none;
}

.form__error.is-visible { display: block; }

.form__textarea {
  resize: vertical;
  min-height: 120px;
}

.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'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c4a46b' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--sp-6) center;
  padding-right: var(--sp-12);
  cursor: pointer;
}

.form__select option {
  background-color: var(--dark-2);
  color: var(--white);
}

.form__note {
  font-size: var(--text-xs);
  color: var(--muted);
  line-height: 1.6;
  font-style: italic;
  padding-top: var(--sp-2);
  border-top: 1px solid var(--border-dark);
}

.form__success {
  display: none;
  text-align: center;
  padding: var(--sp-12);
  background: var(--gold-subtle);
  border: 1px solid var(--border);
}

.form__success.is-visible { display: block; }

.form__success-icon {
  font-size: var(--text-3xl);
  margin-bottom: var(--sp-4);
}

.form__success-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--gold);
  margin-bottom: var(--sp-3);
}

/* ============================================================
   16. BLOG CARDS
   ============================================================ */
.card-blog {
  display: block;
  text-decoration: none;
  background-color: var(--white);
  border: 1px solid var(--cream-2);
  transition: box-shadow var(--dur-base) var(--ease-expo), transform var(--dur-base) var(--ease-expo);
  overflow: hidden;
}

@media (hover: hover) {
  .card-blog:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
  }

  .card-blog:hover .card-blog__image img {
    transform: scale(1.04);
  }
}

.card-blog__image {
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
}

.card-blog__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-expo);
}

/* Cubre marca de agua de Gemini/IA en esquina inferior derecha de cada card */
.card-blog__image::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 38%;
  height: 28%;
  pointer-events: none;
  background: radial-gradient(ellipse 100% 100% at 100% 100%,
    rgba(12,10,8,1) 0%,
    rgba(12,10,8,0.92) 30%,
    rgba(12,10,8,0.55) 65%,
    transparent 100%);
  z-index: 2;
}

.card-blog__body {
  padding: var(--sp-6) var(--sp-8);
}

.card-blog__category {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--sp-3);
}

.card-blog__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--dark-2);
  line-height: 1.25;
  margin-bottom: var(--sp-3);
}

.card-blog__excerpt {
  font-size: var(--text-sm);
  color: var(--muted-2);
  line-height: 1.65;
  margin-bottom: var(--sp-4);
}

.card-blog__meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--text-xs);
  color: var(--muted);
}

.card-blog__meta::before {
  content: '';
  width: 20px;
  height: 1px;
  background-color: var(--gold);
  flex-shrink: 0;
}

/* ============================================================
   17. CTA SECTION
   ============================================================ */
.cta-section {
  background-color: var(--dark);
  padding-block: var(--sp-32);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(196, 164, 107, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section__title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 400;
  color: var(--white);
  max-width: 18ch;
  margin-inline: auto;
  line-height: 1.1;
  margin-bottom: var(--sp-8);
}

.cta-section__subtitle {
  color: rgba(253, 250, 245, 0.55);
  font-size: var(--text-md);
  max-width: 50ch;
  margin-inline: auto;
  margin-bottom: var(--sp-12);
  line-height: 1.7;
}

.cta-section__buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--sp-6);
  flex-wrap: wrap;
}

/* ============================================================
   18. FOOTER
   ============================================================ */
.footer {
  background-color: var(--dark);
  border-top: 1px solid var(--border-dark);
  padding-top: var(--sp-24);
}

.footer__grid {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--sp-12);
  padding-bottom: var(--sp-16);
  border-bottom: 1px solid var(--border-dark);
}

.footer__brand-name {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  color: var(--white);
  margin-bottom: var(--sp-2);
  line-height: 1.2;
}

.footer__brand-tag {
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--sp-6);
  display: block;
}

.footer__tagline {
  font-size: var(--text-sm);
  color: rgba(253, 250, 245, 0.45);
  line-height: 1.7;
  max-width: 30ch;
  margin-bottom: var(--sp-8);
}

.footer__col-title {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--sp-6);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.footer__link {
  font-size: var(--text-sm);
  color: rgba(253, 250, 245, 0.55);
  text-decoration: none;
  transition: color var(--dur-base) var(--ease-expo);
  line-height: 1;
}

.footer__link:hover {
  color: var(--gold);
}

.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.footer__contact-icon {
  color: var(--gold);
  font-size: var(--text-base);
  flex-shrink: 0;
  margin-top: 1px;
}

.footer__contact-text {
  font-size: var(--text-sm);
  color: rgba(253, 250, 245, 0.55);
  line-height: 1.5;
}

.footer__contact-text a {
  color: rgba(253, 250, 245, 0.55);
  text-decoration: none;
  transition: color var(--dur-base) var(--ease-expo);
}

.footer__contact-text a:hover {
  color: var(--gold);
}

.footer__nar {
  margin-top: var(--sp-6);
  padding: var(--sp-4) var(--sp-6);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
}

.footer__nar-badge {
  font-size: var(--text-xl);
  color: var(--gold);
}

.footer__nar-text {
  font-size: var(--text-xs);
  color: var(--muted);
  line-height: 1.4;
}

.footer__nar-text strong {
  color: var(--gold-light);
  display: block;
}

.footer__bottom {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: var(--sp-6) var(--gutter);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-8);
  flex-wrap: wrap;
}

.footer__copyright {
  font-size: var(--text-xs);
  color: rgba(253, 250, 245, 0.3);
}

.footer__disclaimer {
  font-size: 0.65rem;
  color: rgba(253, 250, 245, 0.25);
  line-height: 1.6;
  max-width: 80ch;
  font-style: italic;
}

/* ============================================================
   19. WHATSAPP FLOAT
   ============================================================ */
.wa-float {
  position: fixed;
  bottom: var(--sp-8);
  right: var(--sp-8);
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background-color: #25d366;
  color: #fff;
  padding: var(--sp-3) var(--sp-6);
  border-radius: 40px;
  box-shadow: 0 4px 24px rgba(37, 211, 102, 0.3);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--dur-base) var(--ease-spring);
}

.wa-float:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.4);
}

.wa-float svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ============================================================
   20. NAR CREDENTIAL BADGE
   ============================================================ */
.nar-section {
  background-color: var(--dark-2);
  padding: var(--sp-24) 0;
  border-top: 1px solid var(--border-dark);
  border-bottom: 1px solid var(--border-dark);
}

.nar-section__inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--sp-16);
  align-items: center;
}

.nar-section__badge {
  text-align: center;
}

.nar-section__logo {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
  margin-bottom: var(--sp-4);
  border: 2px solid var(--gold);
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-inline: auto;
}

.nar-section__badge-label {
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.nar-section__content .section__title {
  margin-bottom: var(--sp-6);
}

.nar-section__content p {
  color: rgba(253, 250, 245, 0.65);
  font-size: var(--text-base);
  line-height: 1.8;
  max-width: 65ch;
}

/* ============================================================
   21. SCROLL REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity var(--dur-slow) var(--ease-expo),
    transform var(--dur-slow) var(--ease-expo);
}

.reveal--active {
  opacity: 1;
  transform: none;
}

.reveal--left {
  transform: translateX(-28px);
}

.reveal--right {
  transform: translateX(28px);
}

.reveal--scale {
  transform: scale(0.95);
}

.reveal--delay-1 { transition-delay: 100ms; }
.reveal--delay-2 { transition-delay: 200ms; }
.reveal--delay-3 { transition-delay: 300ms; }
.reveal--delay-4 { transition-delay: 400ms; }
.reveal--delay-5 { transition-delay: 500ms; }

/* Gold rule draw animation */
.rule-draw {
  position: relative;
  overflow: hidden;
  width: 64px;
  height: 1px;
  background: var(--gold-subtle);
  margin-bottom: var(--sp-8);
}

.rule-draw::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background-color: var(--gold);
  transition: width var(--dur-crawl) var(--ease-expo) 200ms;
}

.reveal--active .rule-draw::after,
.rule-draw.reveal--active::after {
  width: 100%;
}

/* ============================================================
   22. INLINE UTILITIES
   ============================================================ */
.text-gold  { color: var(--gold); }
.text-muted { color: var(--muted); }
.text-white { color: var(--white); }
.text-dark  { color: var(--dark);  }

.text-center { text-align: center; }
.text-right  { text-align: right;  }

.flex       { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-4      { gap: var(--sp-4); }
.gap-6      { gap: var(--sp-6); }

.mb-4  { margin-bottom: var(--sp-4);  }
.mb-6  { margin-bottom: var(--sp-6);  }
.mb-8  { margin-bottom: var(--sp-8);  }
.mb-12 { margin-bottom: var(--sp-12); }
.mb-16 { margin-bottom: var(--sp-16); }

.mt-auto { margin-top: auto; }

.relative { position: relative; }
.overflow-hidden { overflow: hidden; }

/* ============================================================
   23. MEDIA QUERIES — RESPONSIVE
   ============================================================ */

/* Tablet: 1023px- */
@media (max-width: 1023px) {
  /* Nav */
  .nav__links  { display: none; }
  .nav__cta    { display: none; }
  .nav__burger { display: flex; }

  /* Hero — full bleed video, content ocupa todo el ancho */
  .hero {
    grid-template-columns: 1fr;
    min-height: 100svh;
  }

  .hero__image {
    clip-path: none;
    height: 100%;
    order: 0;
  }

  .hero__content {
    padding: calc(var(--nav-h) + var(--sp-12)) var(--gutter) var(--sp-16);
    grid-column: 1 / -1;
  }

  .hero__title {
    font-size: var(--text-2xl);
    max-width: 100%;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .hero__subtitle {
    font-size: var(--text-sm);
    max-width: 100%;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .hero--project { min-height: 70svh; }

  /* Video lateral propuesta de valor — flujo normal debajo del texto en tablet */
  #propuesta-de-valor {
    overflow: visible !important;
    padding-top: 0 !important;
  }
  .propuesta-video-bg {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    width: 100% !important;
    height: 280px !important;
    margin-top: -1px;
    overflow: hidden;
  }
  /* Degradado superior en móvil: negro → video */
  .propuesta-video-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 60%;
    background: linear-gradient(to bottom, rgba(12,10,8,1) 0%, transparent 100%);
    z-index: 1;
    pointer-events: none;
  }
  /* Degradado inferior también */
  .propuesta-video-bg::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(12,10,8,1) 0%, transparent 100%);
    z-index: 1;
    pointer-events: none;
  }

  /* Stats — números reducidos para que quepan en mobile sin overflow */
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat {
    border-right: none;
    border-bottom: 1px solid var(--border-dark);
    padding: 1.5rem 0.5rem !important;
  }
  .stat__number {
    font-size: clamp(1.4rem, 5.5vw, 2rem) !important;
    line-height: 1.1 !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
    white-space: normal !important;
  }
  .stat__label {
    font-size: 0.65rem !important;
    letter-spacing: 0.1em !important;
    line-height: 1.4 !important;
  }
  .stat:last-child, .stat:nth-last-child(2):nth-child(odd) { border-bottom: none; }

  /* Split */
  .split { grid-template-columns: 1fr; min-height: auto; }
  .split--reversed { direction: ltr; }
  .split__image { height: 60vw; }
  .split__content { padding: var(--sp-16) var(--gutter); }

  /* NAR section */
  .nar-section__inner { grid-template-columns: 1fr; gap: var(--sp-8); }

  /* Projects grid */
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid--asymmetric { grid-template-columns: 1fr; }
  .projects-grid--asymmetric .card-project { grid-column: 1 / -1 !important; }
  .projects-grid--2col { grid-template-columns: 1fr !important; }

  /* Secciones de proyectos — colapsar grids de 2 columnas inline */
  .section [style*="grid-template-columns: 1fr 1fr"],
  .section [style*="grid-template-columns: 1fr 2fr"],
  .section [style*="grid-template-columns: 2fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  /* Galería asimétrica en páginas de proyecto */
  .section [style*="grid-template-columns: 2fr 1fr"][style*="grid-template-rows"] {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
    max-height: none !important;
  }

  /* Imágenes absolutas decorativas — flujo debajo del texto en tablet */
  .wynwood-image-bg {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    width: 100% !important;
    height: 380px !important;
    margin-top: 2rem;
    overflow: hidden;
  }
  .wynwood-image-bg img {
    object-position: center center !important;
  }
  .tesis-image-bg {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    width: 100% !important;
    height: 420px !important;
    margin-top: 2rem;
    overflow: hidden;
  }
  .tesis-image-bg img {
    object-position: center 40% !important;
  }
  .tesis-image-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 55%;
    background: linear-gradient(to bottom, rgba(12,10,8,1) 0%, transparent 100%);
    z-index: 1;
    pointer-events: none;
  }
  .tesis-image-bg::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(12,10,8,1) 0%, transparent 100%);
    z-index: 1;
    pointer-events: none;
  }
  .aerial-image-bg { display: none; }
  .wynwood-image-bg img { object-position: center center !important; }

  /* Spec table — ya es vertical, ok */

  /* Footer */
  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--sp-10); }

  /* Process */
  .process__item { grid-template-columns: 60px 1fr; gap: var(--sp-6); }

  /* Propuesta de valor — cards a 1 columna */
  #propuesta-de-valor [style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
}

/* Mobile: 767px- */
@media (max-width: 767px) {
  :root { --gutter: 1.25rem; }

  .section { padding-block: var(--sp-16); }

  /* Hero — texto NO debe pasar el ancho del contenedor padre */
  .hero { min-height: 100svh; }

  /* Hero content: el eyebrow va arriba, no centrado verticalmente */
  .hero__content {
    width: 100%;
    max-width: 100%;
    justify-content: flex-start !important;
    padding-top: calc(var(--nav-h) + 1.5rem) !important;
    padding-bottom: 2rem !important;
    gap: 0;
  }

  /* Eyebrow al inicio, espacio generoso debajo */
  .hero__eyebrow {
    margin-bottom: 2rem !important;
  }

  /* Título: tamaño LUXURY — elegante, compacto, sin partir palabras
     Tamaño calibrado para que el quiebre con <br> dé EXACTAMENTE 2 líneas */
  .hero__title {
    font-size: clamp(1.45rem, 5.6vw, 1.95rem) !important;
    line-height: 1.2 !important;
    letter-spacing: -0.01em !important;
    max-width: 100% !important;
    width: 100%;
    margin-bottom: 1.5rem !important;
    /* CRÍTICO: nunca partir palabras como "Latinoamérica" */
    hyphens: none !important;
    -webkit-hyphens: none !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
  }

  /* El <br class="mobile-only-break"> solo aparece en móvil */
  .mobile-only-break { display: inline; }

  /* Subtítulo principal: descripción del rol — tamaño cómodo */
  .hero__subtitle {
    font-size: clamp(0.95rem, 3.6vw, 1.02rem) !important;
    line-height: 1.6 !important;
    max-width: 100%;
    width: 100%;
    margin-bottom: 1.5rem !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    color: rgba(253, 250, 245, 0.92) !important;
  }

  /* Credencial NAR: más pequeña, sutil, bien separada del subtítulo */
  .hero__credential {
    font-size: clamp(0.7rem, 2.5vw, 0.78rem) !important;
    line-height: 1.55 !important;
    letter-spacing: 0.04em !important;
    max-width: 100%;
    width: 100%;
    margin-top: 0 !important;
    margin-bottom: 2.5rem !important;
    color: rgba(253, 250, 245, 0.65) !important;
    font-style: italic;
    text-shadow:
      0 2px 14px rgba(0,0,0,0.95),
      0 0 20px rgba(0,0,0,0.85),
      0 0 6px rgba(0,0,0,0.9) !important;
  }

  .hero--project { min-height: 60svh; }

  /* Stats */
  .stats { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: 1fr; }

  /* Grids inline → 1 columna */
  .section [style*="grid-template-columns: 1fr 1fr"],
  .section [style*="grid-template-columns: 1fr 2fr"],
  .section [style*="grid-template-columns: 2fr 1fr"],
  .section [style*="grid-template-columns: 3fr 2fr"],
  .section [style*="grid-template-columns: 2fr 3fr"],
  .section [style*="grid-template-columns: repeat(3, 1fr)"],
  .section [style*="grid-template-columns: repeat(2, 1fr)"] {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  /* Galerías */
  .section [style*="grid-template-columns: 2fr 1fr"][style*="grid-template-rows"],
  .section [style*="grid-template-columns: 1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
    max-height: none !important;
    height: auto !important;
  }

  /* Imágenes en galería — altura fija en móvil */
  .section [style*="grid-template-rows"] img,
  .section [style*="grid-template-rows"] > div {
    height: 260px !important;
    grid-row: auto !important;
  }

  /* Galería de 3 columnas fijas (Frida Kahlo) */
  [style*="grid-template-columns: 2fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    height: auto !important;
  }
  [style*="grid-template-columns: 2fr 1fr 1fr"] img {
    height: 240px !important;
  }

  /* North/South tower grid (Mandarin) */
  [style*="grid-template-columns: 1fr 1fr"][style*="margin-bottom"] {
    grid-template-columns: 1fr !important;
  }

  /* Propuesta de valor cards */
  #propuesta-de-valor [style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: 1fr !important;
  }

  /* Imagen wynwood — flujo debajo del texto en móvil */
  .wynwood-image-bg {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    width: 100% !important;
    height: 320px !important;
    margin-top: 1.5rem;
    overflow: hidden;
  }
  /* Imagen tesis — flujo debajo del texto en móvil */
  .tesis-image-bg {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    width: 100% !important;
    height: 400px !important;
    margin-top: 1.5rem;
    overflow: hidden;
  }
  .tesis-image-bg img {
    object-position: center 40% !important;
  }
  .aerial-image-bg { display: none !important; }

  /* Footer */
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; }

  /* CTAs */
  .cta-section__buttons { flex-direction: column; align-items: stretch; text-align: center; }
  .hero__ctas { flex-direction: column; align-items: center; }

  /* Split */
  .split__content { padding: var(--sp-12) var(--gutter); }

  /* WhatsApp */
  .wa-float span { display: none; }
  .wa-float { padding: var(--sp-4); border-radius: 50%; }
  .wa-float svg { width: 24px; height: 24px; }

  /* Clip-path simplificado en móvil */
  [style*="clip-path"] { clip-path: none !important; }

  /* Imágenes absolutas de proyectos — ocultar en móvil */
  .hero__image img,
  .hero__image video { object-position: center center; }
}

/* ============================================================
   MOBILE SAFETY NET — ULTIMATE OVERFLOW PROTECTION
   Aplica a CUALQUIER página en cualquier breakpoint móvil/tablet
   ============================================================ */
@media (max-width: 767px) {
  /* 1) Permitir wrap pero NUNCA partir palabras en mitad (no hyphens) */
  h1, h2, h3, h4, h5, h6,
  p, li, a, span, div, label, button, td,
  .hero__title, .hero__subtitle, .hero__eyebrow-text, .hero__credential,
  .section__title, .section__subtitle, .section__label,
  .cta-section__title, .cta-section__subtitle,
  .nar-section__title, .nar-section__text,
  .feature-item__title, .feature-item__text,
  .feature-item__desc, .feature-list__title,
  .card-project__title, .card-project__price, .card-project__delivery,
  .form__label, .form__input, .form__textarea, .form__success-title,
  .nav__logo-name, .nav__logo-tag, .nav__link {
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    word-break: normal !important;
    hyphens: none !important;
    -webkit-hyphens: none !important;
  }

  /* TODOS los TÍTULOS — más estricto: nunca partir palabras */
  h1, h2, h3, h4,
  .hero__title,
  .section__title,
  .cta-section__title,
  .nar-section__title,
  .feature-item__title,
  .feature-list__title,
  .card-project__title,
  .form__success-title,
  .heading-1, .heading-2, .heading-3 {
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    -webkit-hyphens: none !important;
  }

  /* Heading utility classes (usados en proyectos/index, blog, etc.) */
  .heading-1 {
    font-size: clamp(1.7rem, 6.5vw, 2.3rem) !important;
    line-height: 1.18 !important;
    text-wrap: balance;
  }
  .heading-2 {
    font-size: clamp(1.5rem, 5.8vw, 2rem) !important;
    line-height: 1.2 !important;
    text-wrap: balance;
  }
  .heading-3 {
    font-size: clamp(1.3rem, 4.8vw, 1.7rem) !important;
    line-height: 1.25 !important;
    text-wrap: balance;
  }

  /* Grids utility — colapsar a 1 columna en mobile (cards apiladas) */
  .grid-2, .grid-3 {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  /* TODAS las tarjetas/items dentro de grids — nunca exceden ancho del padre */
  .grid-2 > *,
  .grid-3 > *,
  .container > div > * {
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* Asegurar padding interno razonable en tarjetas tipo "canal" */
  #canales .grid-2 > div {
    padding: 1.5rem !important;
  }

  /* Blog cards — borde dorado más visible para diferenciar tarjetas apiladas */
  .cat-card,
  .card-blog {
    border-left: 1px solid var(--gold) !important;
    border-right: 1px solid var(--gold) !important;
    border-bottom: 1px solid var(--gold) !important;
    border-top: 3px solid var(--gold) !important;
  }

  /* CTA section title — mismo tamaño que section__title en mobile */
  .cta-section__title {
    font-size: clamp(1.5rem, 5.8vw, 1.95rem) !important;
    line-height: 1.25 !important;
    max-width: 100% !important;
    text-wrap: balance;
  }

  /* NAR section title */
  .nar-section__title {
    font-size: clamp(1.5rem, 5.8vw, 1.95rem) !important;
    line-height: 1.25 !important;
    max-width: 100% !important;
    text-wrap: balance;
  }

  /* 2) Reducir tamaños tipográficos grandes que causan overflow */
  .section__title {
    font-size: clamp(1.6rem, 6.2vw, 2.1rem) !important;
    line-height: 1.2 !important;
    max-width: 100% !important;
    /* CRÍTICO: nunca partir palabras como "completo" */
    hyphens: none !important;
    -webkit-hyphens: none !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    /* Balancea las líneas para que sean similares en longitud */
    text-wrap: balance;
    -webkit-text-wrap: balance;
  }
  .cta-section__title {
    font-size: clamp(1.4rem, 5.5vw, 1.9rem) !important;
    line-height: 1.25 !important;
    max-width: 100% !important;
  }
  .nar-section__title {
    font-size: clamp(1.4rem, 5.5vw, 1.9rem) !important;
    max-width: 100% !important;
  }

  /* 3) Eyebrow text — no debe forzar ancho */
  .hero__eyebrow,
  .section__eyebrow {
    flex-wrap: wrap !important;
    max-width: 100% !important;
  }
  .hero__eyebrow-text,
  .section__label {
    letter-spacing: 0.15em !important;
    font-size: 0.65rem !important;
    max-width: 100% !important;
  }

  /* 4) Contenedores nunca exceden el viewport */
  html, body { max-width: 100vw; overflow-x: hidden; }
  main, section, article, header, footer,
  .container, .container--narrow,
  .hero, .hero__content, .hero__image,
  .section, .cta-section, .nar-section {
    max-width: 100vw !important;
    overflow-x: hidden;
  }

  /* 5) Imágenes y videos NUNCA pasan el viewport */
  img, video, picture, svg, iframe {
    max-width: 100% !important;
    height: auto;
  }

  /* 6) Hero image en sobre-jessica — managed por la página con aspect-ratio
     (regla movida al inline CSS de sobre-jessica.html para usar aspect-ratio 700/900) */

  /* 7) Tablas (especificaciones de proyectos) — scroll horizontal SOLO en la tabla */
  .spec-table {
    display: block;
    width: 100% !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* 8) Cualquier elemento con width fijo — neutralizar */
  [style*="width:"][style*="px"],
  [style*="min-width:"][style*="px"] {
    max-width: 100% !important;
  }

  /* 9) Padding del contenedor del hero — más respiración lateral */
  .hero__content {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* 10) Botones — DEJAR que el texto haga wrap si es muy largo */
  .btn {
    white-space: normal !important;
    text-align: center !important;
    line-height: 1.3 !important;
    max-width: 100% !important;
    width: auto;
    height: auto !important;
    min-height: 48px;
    padding: 0.85rem 1.25rem !important;
    font-size: 0.85rem !important;
    letter-spacing: 0.08em !important;
  }
  .btn--lg {
    padding: 1rem 1.5rem !important;
    font-size: 0.9rem !important;
    width: 100%;
  }
  .hero__ctas .btn,
  .cta-section__buttons .btn {
    width: 100%;
    max-width: 100%;
  }

  /* 11) Tabla de especificaciones de proyectos */
  .spec-table td {
    white-space: normal !important;
    width: auto !important;
    max-width: 100% !important;
  }
  .spec-table td:first-child {
    width: 40% !important;
    padding-right: 0.75rem !important;
  }

  /* 12) Eyebrow nav — el texto largo de la marca en logo */
  .nav__logo-tag {
    font-size: 0.6rem !important;
    letter-spacing: 0.1em !important;
  }

  /* 13) Asegurar que NINGÚN .btn dentro del hero rompa el viewport */
  .hero__ctas {
    width: 100%;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  /* 14) Hero overlay — sombreado mayor: video luce pero más oscuro */
  .hero__image-overlay {
    background:
      /* Gradient vertical más intenso pero video aún visible */
      linear-gradient(to bottom,
        rgba(12,10,8,0.6) 0%,
        rgba(12,10,8,0.38) 15%,
        rgba(12,10,8,0.32) 50%,
        rgba(12,10,8,0.62) 78%,
        rgba(12,10,8,0.9) 92%,
        rgba(12,10,8,0.97) 100%),
      /* Vignette de esquinas más fuerte para mood cinemático */
      radial-gradient(ellipse 95% 95% at 50% 50%,
        transparent 18%,
        rgba(0,0,0,0.3) 60%,
        rgba(0,0,0,0.6) 100%) !important;
  }

  /* 15) Text-shadow EXTRA-FUERTE — múltiples capas apiladas para crear
     un "aura" oscura alrededor del texto que lo hace legible sobre cualquier fondo */
  .hero__title {
    text-shadow:
      0 0 36px rgba(0,0,0,1),
      0 0 28px rgba(0,0,0,1),
      0 0 18px rgba(0,0,0,1),
      0 0 10px rgba(0,0,0,1),
      0 2px 6px rgba(0,0,0,1),
      0 -1px 3px rgba(0,0,0,0.95) !important;
  }

  /* El italic gold "preventa de lujo" necesita contraste EXTRA porque
     el oro contra cielo brillante tiene poca diferencia de luminancia */
  .hero__title em {
    text-shadow:
      0 0 40px rgba(0,0,0,1),
      0 0 32px rgba(0,0,0,1),
      0 0 24px rgba(0,0,0,1),
      0 0 16px rgba(0,0,0,1),
      0 0 10px rgba(0,0,0,1),
      0 2px 8px rgba(0,0,0,1),
      0 -1px 4px rgba(0,0,0,1) !important;
  }

  .hero__subtitle {
    text-shadow:
      0 0 28px rgba(0,0,0,1),
      0 0 18px rgba(0,0,0,1),
      0 0 10px rgba(0,0,0,1),
      0 2px 4px rgba(0,0,0,1) !important;
  }

  /* 16) Eyebrow text más fuerte sobre fondos brillantes */
  .hero__eyebrow-text {
    text-shadow:
      0 0 20px rgba(0,0,0,1),
      0 0 12px rgba(0,0,0,1),
      0 0 6px rgba(0,0,0,1),
      0 2px 4px rgba(0,0,0,1) !important;
  }
}

/* Desktop wide: 1440px+ */
@media (min-width: 1440px) {
  .hero--split-right .hero__content { padding-left: var(--sp-32); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
