/* ============================================
   DANI CRESPO — Design System 2026
   Ultra-modern, LEGO-inspired
   ============================================ */

/* ─── CSS Custom Properties ─── */
:root {
  /* Colores de marca */
  --c-primary: #E8531E;
  --c-primary-dark: #C7401A;
  --c-primary-light: #FF6B35;
  --c-secondary: #1B2A4A;
  --c-secondary-light: #2D4A7A;
  --c-accent: #3B82F6;
  --c-accent-light: #60A5FA;

  /* Colores LEGO */
  --c-lego-red: #E3000B;
  --c-lego-blue: #006CB7;
  --c-lego-yellow: #FFD500;
  --c-lego-green: #00852B;

  /* Neutrales */
  --c-white: #FFFFFF;
  --c-light: #FFF8F0;
  --c-cream: #FEF3E2;
  --c-gray-100: #F7F7F8;
  --c-gray-200: #E5E7EB;
  --c-gray-300: #D1D5DB;
  --c-gray-400: #9CA3AF;
  --c-gray-500: #6B7280;
  --c-gray-600: #4B5563;
  --c-gray-700: #374151;
  --c-dark: #0F172A;
  --c-black: #030712;

  /* Tipografía */
  --f-display: 'Space Grotesk', system-ui, sans-serif;
  --f-body: 'Inter', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', monospace;

  /* Tamaños tipográficos - fluid */
  --fs-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --fs-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --fs-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --fs-lg: clamp(1.125rem, 1rem + 0.6vw, 1.35rem);
  --fs-xl: clamp(1.25rem, 1rem + 1.2vw, 1.75rem);
  --fs-2xl: clamp(1.5rem, 1.1rem + 1.8vw, 2.25rem);
  --fs-3xl: clamp(2rem, 1.5rem + 2.5vw, 3rem);
  --fs-4xl: clamp(2.5rem, 1.8rem + 3.5vw, 4rem);
  --fs-hero: clamp(2.75rem, 2rem + 4vw, 5rem);

  /* Espaciado */
  --sp-xs: 0.25rem;
  --sp-sm: 0.5rem;
  --sp-md: 1rem;
  --sp-lg: 1.5rem;
  --sp-xl: 2rem;
  --sp-2xl: 3rem;
  --sp-3xl: 4rem;
  --sp-4xl: 6rem;
  --sp-section: clamp(4rem, 3rem + 5vw, 8rem);

  /* Radios */
  --r-sm: 0.375rem;
  --r-md: 0.75rem;
  --r-lg: 1rem;
  --r-xl: 1.5rem;
  --r-full: 50%;
  --r-lego: 1rem; /* radio tipo brick */

  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  --shadow-lego: 0 4px 0 rgba(0,0,0,0.15), 0 8px 20px rgba(0,0,0,0.1);
  --shadow-lego-hover: 0 2px 0 rgba(0,0,0,0.15), 0 4px 12px rgba(0,0,0,0.15);
  --shadow-glass: 0 8px 32px rgba(0,0,0,0.12);

  /* Transiciones */
  --t-fast: 150ms ease;
  --t-base: 300ms ease;
  --t-slow: 500ms ease;
  --t-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --max-w: 1280px;
  --max-w-narrow: 900px;
  --nav-h: 80px;
  --nav-h-scrolled: 64px;

  /* Z-index scale */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;
  --z-preloader: 1000;
}

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

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

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

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

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

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

ul, ol {
  list-style: none;
}

/* ─── Tipografía ─── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--c-secondary);
}

h1 { font-size: var(--fs-hero); }
h2 { font-size: var(--fs-4xl); }
h3 { font-size: var(--fs-3xl); }
h4 { font-size: var(--fs-2xl); }
h5 { font-size: var(--fs-xl); }
h6 { font-size: var(--fs-lg); }

p {
  margin-bottom: var(--sp-md);
  color: var(--c-gray-600);
}

.text-primary { color: var(--c-primary); }
.text-secondary { color: var(--c-secondary); }
.text-accent { color: var(--c-accent); }
.text-white { color: var(--c-white); }
.text-center { text-align: center; }

strong, b { font-weight: 700; }

/* ─── Layout ─── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-inline: var(--sp-lg);
}

.container--narrow {
  max-width: var(--max-w-narrow);
}

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

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

.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--dark p {
  color: var(--c-white);
}

.section--dark p {
  color: rgba(255,255,255,0.8);
}

.section--impact {
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 20%, rgba(232,83,30,0.16) 0%, rgba(232,83,30,0) 42%),
    radial-gradient(circle at 85% 15%, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 32%),
    linear-gradient(130deg, #1b2a4a 0%, #172644 52%, #10203d 100%);
}

.section--impact::before,
.section--impact::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.section--impact::before {
  background-image: url('../img/fotos-ia/Dani copia.webp');
  background-repeat: no-repeat;
  background-position: right top;
  background-size: cover;
  opacity: 0.22;
  filter: saturate(1.08) contrast(1.05);
  animation: none;
}

.section--impact::after {
  background:
    radial-gradient(circle at 18% 78%, rgba(255,255,255,0.10) 0 2px, transparent 2px),
    radial-gradient(circle at 72% 36%, rgba(255,255,255,0.09) 0 2px, transparent 2px),
    radial-gradient(circle at 52% 86%, rgba(232,83,30,0.18) 0 3px, transparent 3px);
  background-size: 280px 280px, 320px 320px, 360px 360px;
  mix-blend-mode: screen;
  opacity: 0.65;
  animation: impactParticles 18s linear infinite;
}

.section--impact .container {
  position: relative;
  z-index: 1;
}

@keyframes impactLogoFloat {
  0% {
    transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
  }
  50% {
    transform: translate3d(-14px, 8px, 0) scale(1.03) rotate(-1deg);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
  }
}

@keyframes impactParticles {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-70px, 40px, 0);
  }
}

.section--light {
  background-color: var(--c-light);
}

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

.grid {
  display: grid;
  gap: var(--sp-xl);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--5 { grid-template-columns: repeat(5, 1fr); }

.flex {
  display: flex;
  gap: var(--sp-md);
}

.flex--center {
  align-items: center;
  justify-content: center;
}

.flex--between {
  align-items: center;
  justify-content: space-between;
}

/* ─── LEGO Brick Stud decoration ─── */
.lego-studs {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 8px 0;
}

.lego-stud {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--c-primary);
  box-shadow: inset 0 -2px 3px rgba(0,0,0,0.2), 0 2px 0 rgba(0,0,0,0.1);
}

.lego-stud--blue { background: var(--c-lego-blue); }
.lego-stud--yellow { background: var(--c-lego-yellow); }
.lego-stud--green { background: var(--c-lego-green); }
.lego-stud--red { background: var(--c-lego-red); }

/* Separador LEGO entre secciones */
.lego-divider {
  width: 100%;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  position: relative;
  z-index: var(--z-base);
}

.lego-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--c-gray-200);
  transform: translateY(-50%);
}

.lego-divider .lego-stud {
  position: relative;
  z-index: 2;
  width: 20px;
  height: 20px;
}

/* ─── NAVBAR ─── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: var(--z-sticky);
  transition: all var(--t-base);
  display: flex;
  align-items: center;
}

.navbar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: all var(--t-base);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled::before {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--c-gray-200);
}

.navbar.scrolled {
  height: var(--nav-h-scrolled);
}

.navbar__inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-inline: var(--sp-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.navbar__logo img {
  height: 60px;
  width: auto;
  transition: height var(--t-base);
}

.navbar.scrolled .navbar__logo img {
  height: 44px;
}

.navbar__menu {
  display: flex;
  align-items: center;
  gap: var(--sp-xl);
}

.navbar__link {
  font-family: var(--f-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-white);
  position: relative;
  padding: var(--sp-sm) 0;
  transition: color var(--t-fast);
}

.navbar__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--c-primary);
  border-radius: 2px;
  transition: width var(--t-base);
}

.navbar__link:hover::after,
.navbar__link.active::after {
  width: 100%;
}

.navbar__link:hover {
  color: var(--c-primary);
}

/* Scrolled: links pasan a azul oscuro */
.navbar.scrolled .navbar__link {
  color: var(--c-secondary);
}

.navbar.scrolled .navbar__link:hover {
  color: var(--c-primary);
}

/* Dropdown Servicios */
.navbar__dropdown {
  position: relative;
}

.navbar__dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
}

.navbar__dropdown-trigger svg {
  width: 14px;
  height: 14px;
  transition: transform var(--t-fast);
}

.navbar__dropdown:hover .navbar__dropdown-trigger svg {
  transform: rotate(180deg);
}

.navbar__dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 240px;
  padding: var(--sp-sm);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--c-gray-200);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transition: all var(--t-fast);
}

.navbar__dropdown:hover .navbar__dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.navbar__dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-md);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-gray-700);
  transition: all var(--t-fast);
}

.navbar__dropdown-item:hover {
  background: var(--c-light);
  color: var(--c-primary);
  padding-left: calc(var(--sp-md) + 4px);
}

/* Botón CTA navbar */
.navbar__cta {
  font-family: var(--f-display);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--c-white);
  background: var(--c-primary);
  padding: var(--sp-sm) var(--sp-lg);
  border-radius: var(--r-md);
  transition: all var(--t-fast);
  box-shadow: 0 2px 0 var(--c-primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.navbar__cta:hover {
  background: var(--c-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 3px 0 var(--c-primary-dark), 0 6px 15px rgba(232,83,30,0.3);
}

.navbar__cta:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 var(--c-primary-dark);
}

/* Hamburger */
.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 30px;
  padding: 4px 0;
  z-index: calc(var(--z-overlay) + 1);
}

.navbar__hamburger span {
  width: 100%;
  height: 3px;
  background: var(--c-secondary);
  border-radius: 2px;
  transition: all var(--t-base);
  transform-origin: center;
}

.navbar__hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.navbar__hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.navbar__hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* Mobile menu */
.navbar__mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: var(--z-overlay);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-xl);
  opacity: 0;
  visibility: hidden;
  transition: all var(--t-base);
}

.navbar__mobile.open {
  opacity: 1;
  visibility: visible;
}

.navbar__mobile .navbar__link {
  font-size: var(--fs-2xl);
}

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-h);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img,
.hero__bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__video + .hero__poster {
  display: none;
}

.hero__video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120vw;
  height: 120vh;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  pointer-events: none;
  border: 0;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(27, 42, 74, 0.9) 0%,
    rgba(27, 42, 74, 0.7) 40%,
    rgba(232, 83, 30, 0.3) 100%
  );
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  font-family: var(--f-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-primary-light);
  margin-bottom: var(--sp-lg);
}

.hero__tag .lego-stud {
  width: 10px;
  height: 10px;
}

.hero__title {
  color: var(--c-white);
  margin-bottom: var(--sp-lg);
  line-height: 1.1;
}

.hero__title span {
  color: var(--c-primary-light);
}

.hero__subtitle {
  font-size: var(--fs-xl);
  color: rgba(255,255,255,0.85);
  margin-bottom: var(--sp-2xl);
  line-height: 1.6;
  max-width: 600px;
}

.hero__actions {
  display: flex;
  gap: var(--sp-md);
  flex-wrap: wrap;
}

/* Decorative LEGO bricks for hero */
.hero__bricks {
  position: absolute;
  right: -50px;
  bottom: -50px;
  z-index: 2;
  opacity: 0.15;
  pointer-events: none;
}

.lego-brick {
  width: 80px;
  height: 48px;
  border-radius: 4px;
  position: absolute;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.15);
}

.lego-brick::before,
.lego-brick::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  top: -9px;
  box-shadow: inset 0 -2px 3px rgba(0,0,0,0.2);
}

.lego-brick::before {
  left: 12px;
  background: inherit;
}

.lego-brick::after {
  right: 12px;
  background: inherit;
}

.lego-brick--1 {
  background: var(--c-lego-red);
  top: 0;
  right: 100px;
  transform: rotate(-15deg);
}

.lego-brick--2 {
  background: var(--c-lego-blue);
  top: 60px;
  right: 20px;
  transform: rotate(10deg);
}

.lego-brick--3 {
  background: var(--c-lego-yellow);
  top: 120px;
  right: 80px;
  transform: rotate(-5deg);
}

.lego-brick--4 {
  background: var(--c-lego-green);
  top: 180px;
  right: 140px;
  transform: rotate(20deg);
}

/* ─── BUTTONS (LEGO brick style) ─── */
.btn {
  overflow: visible;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: var(--fs-base);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2.2rem 3.2rem 1.2rem;
  border-radius: 12px;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
  position: relative;
  overflow: visible;
  cursor: pointer;
  border: none;
  box-shadow: 0 12px 0 0 rgba(0,0,0,0.18), 0 24px 32px rgba(0,0,0,0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, var(--c-primary) 80%);
  outline: none;
}

/* ── 2 studs LEGO encima del botón ── */
.btn::before,
.btn::after {
  content: '';
  position: absolute;
  top: -18px;
  width: 32px;
  height: 18px;
  border-radius: 12px 12px 0 0;
  pointer-events: none;
  box-shadow: 0 4px 8px rgba(0,0,0,0.18), inset 0 2px 0 rgba(255,255,255,0.25);
  z-index: 2;
}
.btn::before { left: 22%; }
.btn::after  { left: 62%; }

/* ── PRIMARY ── */
.btn--primary::before,
.btn--primary::after {
  background: linear-gradient(180deg, var(--c-primary-light) 0%, var(--c-primary) 80%);
  box-shadow: 0 2px 6px rgba(0,0,0,0.18), inset 0 2px 0 rgba(255,255,255,0.25);
}
.btn--primary::before {
  left: calc(50% - 63px);
  width: 18px;
  height: 14px;
  border-radius: 10px 10px 0 0;
  box-shadow:
    36px 0 0 #d84b1b,
    72px 0 0 #d84b1b,
    108px 0 0 #d84b1b,
    0 2px 6px rgba(0,0,0,0.18),
    inset 0 2px 0 rgba(255,255,255,0.25);
}
.btn--primary::after {
  display: none;
}
.btn--primary {
  background: linear-gradient(180deg, var(--c-primary-light) 0%, var(--c-primary) 80%);
  color: var(--c-white);
  box-shadow:
    0 12px 0 #b03c0a,
    0 24px 32px rgba(232,83,30,0.18),
    inset 0 2px 0 rgba(255,255,255,0.25);
  border-bottom: 8px solid #b03c0a;
  border-radius: 12px;
  position: relative;
}
.btn--primary:hover {
  transform: translateY(-6px);
  box-shadow:
    0 18px 0 #b03c0a,
    0 32px 48px rgba(232,83,30,0.28),
    inset 0 2px 0 rgba(255,255,255,0.28);
  filter: brightness(1.08);
}
.btn--primary:active {
  transform: translateY(4px);
  box-shadow:
    0 6px 0 #b03c0a,
    inset 0 1px 0 rgba(255,255,255,0.12);
  filter: brightness(0.96);
}

/* ── SECONDARY ── */
.btn--secondary::before,
.btn--secondary::after {
  background: linear-gradient(180deg, var(--c-secondary-light) 0%, var(--c-secondary) 80%);
  box-shadow: 0 2px 6px rgba(0,0,0,0.18), inset 0 2px 0 rgba(255,255,255,0.18);
}
.btn--secondary::before {
  left: calc(50% - 63px);
  width: 18px;
  height: 14px;
  border-radius: 10px 10px 0 0;
  box-shadow:
    36px 0 0 #1f3a67,
    72px 0 0 #1f3a67,
    108px 0 0 #1f3a67,
    0 2px 6px rgba(0,0,0,0.18),
    inset 0 2px 0 rgba(255,255,255,0.18);
}
.btn--secondary::after {
  display: none;
}
.btn--secondary {
  background: linear-gradient(180deg, var(--c-secondary-light) 0%, var(--c-secondary) 80%);
  color: var(--c-white);
  box-shadow:
    0 12px 0 #0d1632,
    0 24px 32px rgba(15,23,42,0.18),
    inset 0 2px 0 rgba(255,255,255,0.18);
  border-bottom: 8px solid #0d1632;
  border-radius: 12px;
  position: relative;
}
.btn--secondary:hover {
  transform: translateY(-6px);
  box-shadow:
    0 18px 0 #0d1632,
    0 32px 48px rgba(15,23,42,0.28),
    inset 0 2px 0 rgba(255,255,255,0.22);
  filter: brightness(1.08);
}

/* ── OUTLINE ── */
.btn--outline::before,
.btn--outline::after {
  background: linear-gradient(180deg, var(--c-primary-light) 0%, var(--c-primary) 80%);
  box-shadow: 0 2px 6px rgba(0,0,0,0.18), inset 0 2px 0 rgba(255,255,255,0.22);
}
.btn--outline::before {
  left: calc(50% - 63px);
  width: 18px;
  height: 14px;
  border-radius: 10px 10px 0 0;
  box-shadow:
    36px 0 0 #d84b1b,
    72px 0 0 #d84b1b,
    108px 0 0 #d84b1b,
    0 2px 6px rgba(0,0,0,0.18),
    inset 0 2px 0 rgba(255,255,255,0.22);
}
.btn--outline::after {
  display: none;
}
.btn--outline {
  background: transparent;
  color: var(--c-primary);
  border: 2px solid var(--c-primary);
  box-shadow: 0 12px 0 rgba(232,83,30,0.18), 0 24px 32px rgba(232,83,30,0.12);
  border-radius: 12px;
  position: relative;
}
.btn--outline:hover {
  background: linear-gradient(180deg, var(--c-primary-light) 0%, var(--c-primary) 80%);
  color: var(--c-white);
  transform: translateY(-6px);
  box-shadow: 0 18px 0 #b03c0a, 0 32px 48px rgba(232,83,30,0.28);
  filter: brightness(1.08);
}

/* ── DARK ── */
.btn--dark::before,
.btn--dark::after {
  background: linear-gradient(180deg, var(--c-secondary-light) 0%, var(--c-secondary) 80%);
  box-shadow: 0 2px 6px rgba(0,0,0,0.18), inset 0 2px 0 rgba(255,255,255,0.15);
}
.btn--dark::before {
  left: calc(50% - 63px);
  width: 18px;
  height: 14px;
  border-radius: 10px 10px 0 0;
  box-shadow:
    36px 0 0 #1f3a67,
    72px 0 0 #1f3a67,
    108px 0 0 #1f3a67,
    0 2px 6px rgba(0,0,0,0.18),
    inset 0 2px 0 rgba(255,255,255,0.15);
}
.btn--dark::after {
  display: none;
}
.btn--dark {
  background: linear-gradient(180deg, var(--c-secondary-light) 0%, var(--c-secondary) 80%);
  color: var(--c-white);
  box-shadow:
    0 12px 0 #0d1632,
    0 24px 32px rgba(15,23,42,0.18),
    inset 0 2px 0 rgba(255,255,255,0.12);
  border-bottom: 8px solid #0d1632;
  border-radius: 12px;
  position: relative;
}
.btn--dark:hover {
  background: linear-gradient(180deg, var(--c-secondary) 0%, var(--c-secondary-light) 80%);
  transform: translateY(-6px);
  box-shadow:
    0 18px 0 #0d1632,
    0 32px 48px rgba(15,23,42,0.28),
    inset 0 2px 0 rgba(255,255,255,0.18);
  filter: brightness(1.08);
}
.btn--dark:active {
  transform: translateY(4px);
  box-shadow: 0 6px 0 #0d1632;
  filter: brightness(0.96);
}

/* ── LG size studs ── */
.btn--lg {
  font-size: var(--fs-base);
  padding: calc(var(--sp-lg) + 7px) var(--sp-2xl) var(--sp-lg);
}

/* ─── SECTION HEADERS ─── */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--sp-3xl);
}

.section-header__tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  font-family: var(--f-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--c-primary);
  margin-bottom: var(--sp-md);
}

.section-header__tag .lego-stud {
  width: 8px;
  height: 8px;
}

.section-header__title {
  margin-bottom: var(--sp-lg);
}

.section-header__subtitle {
  font-size: var(--fs-lg);
  max-width: 600px;
  margin: 0 auto;
}

/* ─── LEGO SERVICE CARDS ─── */
.service-card {
  background: var(--c-white);
  border-radius: var(--r-lg);
  padding: var(--sp-2xl) var(--sp-xl);
  position: relative;
  transition: all var(--t-spring);
  box-shadow: var(--shadow-lego);
  overflow: hidden;
  text-align: center;
}

/* LEGO studs on top of card */
.service-card::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 16px;
  background: var(--c-primary);
  border-radius: 8px 8px 4px 4px;
  display: flex;
  transition: all var(--t-base);
}

.service-card::after {
  content: '';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background: var(--c-primary);
  border-radius: 50%;
  box-shadow:
    -30px 0 0 var(--c-primary),
    30px 0 0 var(--c-primary),
    inset 0 -2px 3px rgba(0,0,0,0.2),
    -30px 0 0 var(--c-primary),
    30px 0 0 var(--c-primary);
  transition: all var(--t-base);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lego-hover), 0 20px 40px rgba(0,0,0,0.1);
}

.service-card:hover::before,
.service-card:hover::after {
  background: var(--c-primary-light);
}

.service-card__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--sp-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-light);
  border-radius: var(--r-lg);
  font-size: 2rem;
}

.service-card__title {
  font-size: var(--fs-xl);
  margin-bottom: var(--sp-sm);
}

.service-card__desc {
  font-size: var(--fs-sm);
  color: var(--c-gray-500);
  margin-bottom: var(--sp-lg);
}

.service-card__link {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--c-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  transition: gap var(--t-fast);
}

.service-card__link:hover {
  gap: var(--sp-sm);
}

.service-card__link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--t-fast);
}

.service-card__link:hover svg {
  transform: translateX(4px);
}

/* Color variations for each service card */
.service-card--ludicas::before,
.service-card--ludicas::after { background: var(--c-lego-red); }
.service-card--ludicas:hover::before,
.service-card--ludicas:hover::after { background: #ff1a1a; }

.service-card--capacitaciones::before,
.service-card--capacitaciones::after { background: var(--c-lego-blue); }
.service-card--capacitaciones:hover::before,
.service-card--capacitaciones:hover::after { background: #0088e0; }

.service-card--conferencias::before,
.service-card--conferencias::after { background: var(--c-lego-yellow); }
.service-card--conferencias:hover::before,
.service-card--conferencias:hover::after { background: #ffe033; }

.service-card--consultoria::before,
.service-card--consultoria::after { background: var(--c-lego-green); }
.service-card--consultoria:hover::before,
.service-card--consultoria:hover::after { background: #00a636; }

.service-card--laboratorio::before,
.service-card--laboratorio::after { background: var(--c-primary); }

/* ─── STATS / COUNTERS ─── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-xl);
}

.stat-item {
  text-align: center;
  padding: var(--sp-xl);
}

.stat-item__number {
  font-family: var(--f-display);
  font-size: var(--fs-4xl);
  font-weight: 800;
  color: var(--c-primary);
  line-height: 1;
  margin-bottom: var(--sp-xs);
}

.stat-item__label {
  font-size: var(--fs-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-gray-500);
}

.section--dark .stat-item__number {
  color: var(--c-primary-light);
}

.section--dark .stat-item__label {
  color: rgba(255,255,255,0.7);
}

/* (Clients now use carousel — see .clients-carousel above) */

/* ─── CLIENTS GRID ─── */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--sp-lg);
  align-items: stretch;
}

.clients-grid__item {
  background: var(--c-white);
  border-radius: var(--r-md);
  padding: var(--sp-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3/2;
  box-shadow: var(--shadow-sm);
  transition: all var(--t-base);
  overflow: hidden;
}

.clients-grid__item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.clients-grid__item img {
  max-width: 80%;
  max-height: 70%;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.6);
  transition: filter var(--t-base);
}

.clients-grid__item:hover img {
  filter: grayscale(0%) opacity(1);
}

@media (max-width: 1024px) {
  .clients-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .clients-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .clients-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ─── COUNTRIES / FLAGS ─── */
.countries-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-md);
  justify-content: center;
  align-items: center;
}

.country-flag {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-white);
  padding: var(--sp-xs) var(--sp-md);
  background: rgba(255,255,255,0.08);
  border-radius: var(--r-sm);
  border: 1px solid rgba(255,255,255,0.15);
  transition: all var(--t-fast);
}

.country-flag:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}

.country-flag__img {
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.country-flag__emoji {
  font-size: 1.4em;
}

/* ─── QUOTE BLOCK ─── */
.quote-block {
  text-align: center;
  padding: var(--sp-3xl) var(--sp-xl);
}

.quote-block__text {
  font-family: var(--f-display);
  font-size: var(--fs-3xl);
  font-weight: 700;
  font-style: italic;
  color: var(--c-secondary);
  line-height: 1.3;
  max-width: 800px;
  margin: 0 auto var(--sp-lg);
  position: relative;
}

.quote-block__text::before {
  content: '"';
  font-size: 5em;
  color: var(--c-primary);
  opacity: 0.2;
  position: absolute;
  top: -0.3em;
  left: -0.1em;
  font-style: normal;
  line-height: 1;
}

.quote-block__author {
  font-size: var(--fs-sm);
  color: var(--c-gray-400);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ─── CERTIFICATIONS ─── */
.certifications-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2xl);
  justify-content: center;
  align-items: center;
}

.certification-logo {
  height: 50px;
  width: auto;
  filter: grayscale(80%) opacity(0.7);
  transition: all var(--t-base);
}

.certification-logo:hover {
  filter: grayscale(0%) opacity(1);
}

/* ─── SERVICE PAGE HERO ─── */
.service-hero {
  padding: calc(var(--nav-h) + var(--sp-3xl)) 0 var(--sp-3xl);
  background: var(--c-secondary);
  color: var(--c-white);
  position: relative;
  overflow: hidden;
}

.service-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.service-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(27, 42, 74, 0.88) 0%,
    rgba(27, 42, 74, 0.75) 50%,
    rgba(232, 83, 30, 0.25) 100%
  );
  z-index: 1;
}

.service-hero__content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.service-hero h1 {
  color: var(--c-white);
  margin-bottom: var(--sp-lg);
  font-size: var(--fs-4xl);
}

.service-hero p {
  color: rgba(255,255,255,0.85);
  font-size: var(--fs-lg);
}

/* ─── TOPICS GRID ─── */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--sp-xl);
}

.topic-card {
  background: var(--c-white);
  border-radius: var(--r-lg);
  padding: var(--sp-xl);
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--c-primary);
  transition: all var(--t-base);
}

.topic-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.topic-card__number {
  font-family: var(--f-display);
  font-size: var(--fs-4xl);
  font-weight: 800;
  color: var(--c-primary);
  opacity: 0.2;
  line-height: 1;
  margin-bottom: var(--sp-sm);
}

.topic-card__title {
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-sm);
}

.topic-card__desc {
  font-size: var(--fs-sm);
  color: var(--c-gray-500);
}

/* ─── FAQ ACCORDION ─── */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--c-gray-200);
}

.faq-item__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
  padding: var(--sp-lg) 0;
  font-family: var(--f-display);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--c-secondary);
  text-align: left;
  transition: color var(--t-fast);
  cursor: pointer;
  background: none;
  border: none;
}

.faq-item__question:hover {
  color: var(--c-primary);
}

.faq-item__icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: var(--r-sm);
  background: var(--c-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-base);
}

.faq-item__icon svg {
  width: 16px;
  height: 16px;
  transition: transform var(--t-base);
}

.faq-item.open .faq-item__icon {
  background: var(--c-primary);
  color: var(--c-white);
}

.faq-item.open .faq-item__icon svg {
  transform: rotate(45deg);
}

.faq-item__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--t-slow), padding var(--t-slow);
}

.faq-item.open .faq-item__answer {
  max-height: 500px;
  padding-bottom: var(--sp-lg);
}

.faq-item__answer p {
  color: var(--c-gray-600);
  line-height: 1.8;
}

/* ─── CTA SECTION ─── */
.cta-section {
  background:
    linear-gradient(rgba(232, 83, 30, 0.6), rgba(232, 83, 30, 0.6)),
    url('../img/texturas/papel-naranja.jpg') center / cover no-repeat;
  padding: var(--sp-3xl);
  border-radius: var(--r-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  display: none;
}

.cta-section::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.cta-section__title {
  color: var(--c-white);
  font-size: var(--fs-3xl);
  margin-bottom: var(--sp-md);
  position: relative;
  z-index: 2;
}

.cta-section__subtitle {
  color: rgba(255,255,255,0.85);
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-2xl);
  position: relative;
  z-index: 2;
}

.cta-section .btn {
  position: relative;
  z-index: 2;
}

/* ─── CONTACT FORM ─── */
.form-group {
  margin-bottom: var(--sp-lg);
}

.form-group label {
  display: block;
  font-family: var(--f-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-secondary);
  margin-bottom: var(--sp-xs);
}

.form-control {
  width: 100%;
  padding: var(--sp-md);
  font-family: var(--f-body);
  font-size: var(--fs-base);
  color: var(--c-dark);
  background: var(--c-white);
  border: 2px solid var(--c-gray-200);
  border-radius: var(--r-md);
  transition: all var(--t-fast);
  outline: none;
}

.form-control:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 4px rgba(232,83,30,0.1);
}

.form-control::placeholder {
  color: var(--c-gray-400);
}

textarea.form-control {
  resize: vertical;
  min-height: 140px;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--sp-md) center;
  padding-right: var(--sp-2xl);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-md);
}

.form-error {
  color: var(--c-lego-red);
  font-size: var(--fs-xs);
  margin-top: var(--sp-xs);
  display: none;
}

.form-control.error {
  border-color: var(--c-lego-red);
}

.form-control.error + .form-error {
  display: block;
}

/* ─── FOOTER ─── */
.footer {
  background:
    linear-gradient(rgba(13, 22, 50, 0.55), rgba(13, 22, 50, 0.55)),
    url('../img/texturas/papel-azul-oscuro.jpg') center / cover no-repeat;
  color: rgba(255,255,255,0.7);
  padding: var(--sp-3xl) 0 var(--sp-xl);
  position: relative;
}

.footer::before {
  display: none;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-2xl);
  margin-bottom: var(--sp-3xl);
}

.footer__brand img {
  height: 40px;
  margin-bottom: var(--sp-md);
}

.footer__brand p {
  color: rgba(255,255,255,0.6);
  font-size: var(--fs-sm);
  max-width: 300px;
}

.footer__title {
  font-family: var(--f-display);
  font-size: var(--fs-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-white);
  margin-bottom: var(--sp-lg);
}

.footer__links li {
  margin-bottom: var(--sp-sm);
}

.footer__links a {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.6);
  transition: color var(--t-fast);
}

.footer__links a:hover {
  color: var(--c-primary-light);
}

.footer__social {
  display: flex;
  gap: var(--sp-sm);
}

.footer__social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: rgba(255,255,255,0.08);
  transition: all var(--t-fast);
}

.footer__social a:hover {
  background: var(--c-primary);
  transform: translateY(-2px);
}

.footer__social svg {
  width: 18px;
  height: 18px;
  fill: var(--c-white);
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--sp-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.4);
}

/* ─── WHATSAPP BUTTON ─── */
.whatsapp-btn {
  position: fixed;
  bottom: var(--sp-xl);
  right: var(--sp-xl);
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(37,211,102,0.4);
  z-index: var(--z-sticky);
  transition: all var(--t-base);
  animation: whatsapp-pulse 2s infinite;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37,211,102,0.5);
}

.whatsapp-btn svg {
  width: 30px;
  height: 30px;
  fill: white;
}

@keyframes whatsapp-pulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(37,211,102,0.4); }
  50% { box-shadow: 0 4px 25px rgba(37,211,102,0.6); }
}

/* ─── PRELOADER LEGO ─── */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--c-secondary);
  z-index: var(--z-preloader);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.loaded {
  opacity: 0;
  visibility: hidden;
}

.preloader__tower {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 0;
}

.preloader__brick {
  position: relative;
  border-radius: 4px;
  animation: brick-fall 1.8s ease-in-out infinite;
}

/* Los studs (botoncitos) encima de cada pieza */
.preloader__brick::before,
.preloader__brick::after {
  content: '';
  position: absolute;
  top: -8px;
  width: 14px;
  height: 8px;
  background: inherit;
  border-radius: 50% 50% 0 0;
  filter: brightness(1.1);
  box-shadow: inset 0 -2px 3px rgba(0,0,0,0.15);
}

.preloader__brick::before {
  left: 20%;
}

.preloader__brick::after {
  right: 20%;
}

/* Pieza 1 — Roja (base, más ancha) */
.preloader__brick:nth-child(1) {
  width: 100px;
  height: 28px;
  background: var(--c-lego-red);
  animation-delay: 0s;
  box-shadow: 
    inset 0 -4px 0 rgba(0,0,0,0.15),
    inset 0 2px 0 rgba(255,255,255,0.15);
}

.preloader__brick:nth-child(1)::before { left: 15%; }
.preloader__brick:nth-child(1)::after { right: 15%; }

/* Pieza 2 — Azul */
.preloader__brick:nth-child(2) {
  width: 80px;
  height: 28px;
  background: var(--c-lego-blue);
  animation-delay: 0.2s;
  box-shadow: 
    inset 0 -4px 0 rgba(0,0,0,0.15),
    inset 0 2px 0 rgba(255,255,255,0.15);
}

/* Pieza 3 — Amarilla */
.preloader__brick:nth-child(3) {
  width: 90px;
  height: 28px;
  background: var(--c-lego-yellow);
  animation-delay: 0.4s;
  box-shadow: 
    inset 0 -4px 0 rgba(0,0,0,0.15),
    inset 0 2px 0 rgba(255,255,255,0.15);
}

/* Pieza 4 — Verde */
.preloader__brick:nth-child(4) {
  width: 70px;
  height: 28px;
  background: var(--c-lego-green);
  animation-delay: 0.6s;
  box-shadow: 
    inset 0 -4px 0 rgba(0,0,0,0.15),
    inset 0 2px 0 rgba(255,255,255,0.15);
}

/* Pieza 5 — Naranja (tope) */
.preloader__brick:nth-child(5) {
  width: 60px;
  height: 28px;
  background: var(--c-primary);
  animation-delay: 0.8s;
  box-shadow: 
    inset 0 -4px 0 rgba(0,0,0,0.15),
    inset 0 2px 0 rgba(255,255,255,0.15);
}

.preloader__text {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: var(--fs-lg);
  color: var(--c-white);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: preloader-pulse 1.5s ease-in-out infinite;
  transition: opacity 0.3s ease;
}

.preloader__text--fade {
  opacity: 0 !important;
}

@keyframes brick-fall {
  0% { 
    transform: translateY(-80px) rotate(-5deg); 
    opacity: 0; 
  }
  20% { 
    transform: translateY(0) rotate(0deg); 
    opacity: 1; 
  }
  80% { 
    transform: translateY(0) rotate(0deg); 
    opacity: 1; 
  }
  100% { 
    transform: translateY(0) rotate(0deg); 
    opacity: 1; 
  }
}

@keyframes preloader-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ─── SCROLL ANIMATIONS ─── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

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

.reveal--left.visible {
  transform: translateX(0);
}

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

.reveal--right.visible {
  transform: translateX(0);
}

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

.reveal--scale.visible {
  transform: scale(1);
}

/* Staggered children */
.stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger.visible > *:nth-child(1) { transition-delay: 0.1s; }
.stagger.visible > *:nth-child(2) { transition-delay: 0.2s; }
.stagger.visible > *:nth-child(3) { transition-delay: 0.3s; }
.stagger.visible > *:nth-child(4) { transition-delay: 0.4s; }
.stagger.visible > *:nth-child(5) { transition-delay: 0.5s; }
.stagger.visible > *:nth-child(6) { transition-delay: 0.6s; }

.stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ─── MANIFESTO SECTION ─── */
.manifesto {
  padding: var(--sp-4xl) 0;
}

.manifesto__text {
  font-family: var(--f-display);
  font-size: var(--fs-3xl);
  font-weight: 700;
  line-height: 1.3;
  color: var(--c-secondary);
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.manifesto__text .highlight {
  color: var(--c-primary);
  position: relative;
}

/* ─── ABOUT / BIO ─── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3xl);
  align-items: center;
}

.about-image {
  border-radius: var(--r-xl);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-xl);
}

.about-image::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: -10px;
  width: 100px;
  height: 100px;
  background: var(--c-primary);
  border-radius: var(--r-md);
  z-index: -1;
  opacity: 0.3;
}

.about-content h3 {
  margin-bottom: var(--sp-lg);
}

.about-content p {
  margin-bottom: var(--sp-md);
}

/* ─── BREADCRUMBS ─── */
.breadcrumbs {
  padding: var(--sp-sm) 0;
}

.breadcrumbs ol {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.6);
}

.breadcrumbs ol li::after {
  content: '/';
  margin-left: var(--sp-sm);
  opacity: 0.4;
}

.breadcrumbs ol li:last-child::after {
  display: none;
}

.breadcrumbs a {
  color: rgba(255,255,255,0.6);
  transition: color var(--t-fast);
}

.breadcrumbs a:hover {
  color: var(--c-primary-light);
}

/* ─── SUCCESS / ERROR MESSAGES ─── */
.alert {
  padding: var(--sp-md) var(--sp-lg);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-lg);
  font-weight: 500;
}

.alert--success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert--error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ─── TIMELINE ─── */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-left: var(--sp-2xl);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--c-primary), var(--c-accent));
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-bottom: var(--sp-2xl);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item__marker {
  position: absolute;
  left: calc(-1 * var(--sp-2xl) + 2px);
  top: 4px;
  width: 16px;
  height: 16px;
  background: var(--c-primary);
  border-radius: 50%;
  border: 3px solid var(--c-light);
  z-index: 2;
}

.timeline-item__content {
  background: var(--c-white);
  padding: var(--sp-lg);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-base), box-shadow var(--t-base);
}

.timeline-item__content:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.timeline-item__year {
  display: inline-block;
  font-family: var(--f-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--c-primary);
  background: rgba(232,83,30,0.1);
  padding: 2px var(--sp-sm);
  border-radius: var(--r-full);
  margin-bottom: var(--sp-sm);
}

.timeline-item__content h3 {
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-xs);
  color: var(--c-secondary);
}

.timeline-item__content p {
  color: var(--c-gray-600);
  line-height: 1.7;
}

/* ─── CONTACT INFO CARDS ─── */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--sp-3xl);
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
}

.contact-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-md);
  padding: var(--sp-lg);
  background: var(--c-white);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-base), box-shadow var(--t-base);
  text-decoration: none;
  color: inherit;
}

.contact-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.contact-card__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(232,83,30,0.1);
  border-radius: var(--r-md);
  color: var(--c-primary);
}

.contact-card__icon svg {
  width: 24px;
  height: 24px;
}

.contact-card__text h3 {
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--c-secondary);
  margin-bottom: 2px;
}

.contact-card__text p {
  font-size: var(--fs-sm);
  color: var(--c-gray-500);
}

.contact-social {
  display: flex;
  gap: var(--sp-md);
  margin-top: var(--sp-md);
}

.contact-social a {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-secondary);
  color: var(--c-white);
  border-radius: var(--r-md);
  transition: all var(--t-fast);
}

.contact-social a:hover {
  background: var(--c-primary);
  transform: translateY(-2px);
}

.contact-social a svg {
  width: 20px;
  height: 20px;
}

/* ─── GALLERY MASONRY ─── */
.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 84px;
  gap: var(--sp-md);
}

.gallery-masonry__item {
  grid-column: span 3;
  grid-row: span 3;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 14px 30px rgba(16, 24, 40, 0.08);
  isolation: isolate;
  background: var(--c-white);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}

.gallery-masonry__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms ease, filter 700ms ease;
  filter: contrast(1.04) saturate(1.02);
}

.gallery-masonry__item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,21,44,0) 28%, rgba(10,21,44,0.78) 100%);
  z-index: 1;
}

.gallery-masonry__item--wide {
  grid-column: span 6;
  grid-row: span 4;
}

.gallery-masonry__item--tall {
  grid-column: span 3;
  grid-row: span 5;
}

.gallery-masonry__item--big {
  grid-column: span 6;
  grid-row: span 6;
}

.gallery-masonry__meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: var(--sp-lg);
  color: var(--c-white);
}

.gallery-masonry__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(6px);
}

.gallery-masonry__title {
  margin-top: var(--sp-sm);
  margin-bottom: 0;
  font-size: clamp(1rem, 0.9rem + 0.55vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--c-white);
}

.gallery-masonry__item:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 42px rgba(16, 24, 40, 0.16);
  border-color: rgba(232,83,30,0.55);
}

.gallery-masonry__item:hover img {
  transform: scale(1.06);
  filter: contrast(1.1) saturate(1.06);
}

@media (max-width: 768px) {
  .gallery-masonry {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: 70px;
  }

  .gallery-masonry__item,
  .gallery-masonry__item--wide {
    grid-column: span 3;
    grid-row: span 3;
  }

  .gallery-masonry__item--tall {
    grid-column: span 3;
    grid-row: span 4;
  }

  .gallery-masonry__meta {
    padding: var(--sp-md);
  }
}

@media (max-width: 480px) {
  .gallery-masonry {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 120px;
  }

  .gallery-masonry__item,
  .gallery-masonry__item--wide,
  .gallery-masonry__item--tall {
    grid-column: span 1;
    grid-row: span 1;
  }

  .gallery-masonry__title {
    font-size: 0.96rem;
  }
}

/* ─── LIGHTBOX ─── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  cursor: zoom-out;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--r-md);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s;
}

.lightbox.active .lightbox__img {
  transform: scale(1);
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background var(--t-fast);
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background var(--t-fast);
}

.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox__nav--prev {
  left: 20px;
}

.lightbox__nav--next {
  right: 20px;
}

/* ─── 404 PAGE (LEGO construction) ─── */
.page-404 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-3xl);
}

.page-404__bricks {
  margin: var(--sp-xl) auto;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.page-404 h1 {
  font-size: clamp(6rem, 10vw, 12rem);
  color: var(--c-primary);
  line-height: 1;
}

.page-404 p {
  font-size: var(--fs-xl);
  margin-bottom: var(--sp-xl);
}
