/* ═══════════════════════════════════════════════════════════
   EO SOLUCIONES — Consultoría tecnológica Design System
   v2.0.0 — Olive & Sky Revolution
   Paleta extraída del logo oficial (verde oliva + azul cielo)
   ═══════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Alegreya Sans';
  src: url('assets/fonts/AlegreyaSans-Regular-300.ttf') format('truetype');
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: 'Alegreya Sans';
  src: url('assets/fonts/AlegreyaSans-Regular-400.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Alegreya Sans';
  src: url('assets/fonts/AlegreyaSans-Regular-500.ttf') format('truetype');
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: 'Alegreya Sans';
  src: url('assets/fonts/AlegreyaSans-Regular-700.ttf') format('truetype');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: 'Alegreya Sans';
  src: url('assets/fonts/AlegreyaSans-Italic-400.ttf') format('truetype');
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Alegreya Sans';
  src: url('assets/fonts/AlegreyaSans-Italic-500.ttf') format('truetype');
  font-style: italic;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('assets/fonts/CormorantGaramond-Regular-300.ttf') format('truetype');
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('assets/fonts/CormorantGaramond-Regular-400.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('assets/fonts/CormorantGaramond-Regular-500.ttf') format('truetype');
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('assets/fonts/CormorantGaramond-Regular-600.ttf') format('truetype');
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('assets/fonts/CormorantGaramond-Regular-700.ttf') format('truetype');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('assets/fonts/CormorantGaramond-Italic-300.ttf') format('truetype');
  font-style: italic;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('assets/fonts/CormorantGaramond-Italic-400.ttf') format('truetype');
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('assets/fonts/CormorantGaramond-Italic-500.ttf') format('truetype');
  font-style: italic;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('assets/fonts/JetBrainsMono-Regular-400.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('assets/fonts/JetBrainsMono-Regular-500.ttf') format('truetype');
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('assets/fonts/JetBrainsMono-Regular-600.ttf') format('truetype');
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

/* ─── Scroll-driven custom property (animación de aurora) ──── */
@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

:root {
  /* Logo-derived palette */
  --olive:        #8FA83F;
  --olive-deep:   #6E8A2F;
  --olive-soft:   #A6BD4E;
  --olive-glow:   rgba(143, 168, 63, 0.22);

  --sky:          #7FB6D4;
  --sky-deep:     #5C98B8;
  --sky-soft:     #9FCCE0;
  --sky-glow:     rgba(127, 182, 212, 0.22);

  --ink:          #3A2A1E;        /* marrón "Soluciones" */
  --ink-soft:     #5A4332;

  /* Dark theme (default) — Obsidian */
  --obsidian:     #0B0E13;
  --graphite:     #14181F;
  --slate:        #1B2028;
  --stone:        #262B34;
  --stone-light:  #353B45;
  --quartz:       #F0F6FC;
  --chalk:        #8B949E;
  --bg-noise-opacity: 0.04;

  /* Aliases de retro-compatibilidad (el CSS antiguo usaba estos) */
  --mineral:      var(--sky);
  --vein:         var(--olive);
  --glow-mineral: var(--sky-glow);
  --glow-vein:    var(--olive-glow);

  /* Typography */
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body:    'Alegreya Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Consolas', monospace;

  /* Motion */
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out:    cubic-bezier(0.4, 0, 0.2, 1);
  --ease-back:      cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-base:  0.6s;
  --duration-slow:  1.2s;
  --duration-fast:  0.3s;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;
  --space-2xl: 12rem;

  /* Layout */
  --max-width: 1400px;
  --gutter:    clamp(1.5rem, 5vw, 6rem);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;

  color-scheme: dark;
}

/* ─── Light Theme: "Cream & Olive" ─────────────────────────── */
[data-theme='light'] {
  --olive:        #647A2A;
  --olive-deep:   #4E611F;
  --olive-soft:   #7A9436;
  --sky:          #4E86A7;
  --sky-deep:     #3D7090;
  --sky-soft:     #6A9FBC;
  --obsidian:     #F4F1EC;
  --graphite:     #EDE8DF;
  --slate:        #E4DED3;
  --stone:        #D5CDC0;
  --stone-light:  #BFB6A6;
  --quartz:       #1F1914;
  --chalk:        #4A4138;
  --olive-glow:   rgba(110, 138, 47, 0.18);
  --sky-glow:     rgba(92, 152, 184, 0.18);
  --bg-noise-opacity: 0.06;

  color-scheme: light;
}

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

html {
  --theme-x: 50%;
  --theme-y: 14%;
  scroll-behavior: smooth;
  transition: background-color 0.6s var(--ease-in-out), color 0.6s var(--ease-in-out);
  -webkit-tap-highlight-color: transparent;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.7;
  color: var(--quartz);
  background: var(--obsidian);
  background-image:
    radial-gradient(circle at 20% 10%, var(--olive-glow) 0%, transparent 50%),
    radial-gradient(circle at 85% 70%, var(--sky-glow) 0%, transparent 55%);
  background-attachment: fixed;
  overflow-x: hidden;
  transition: background-color 0.6s var(--ease-in-out), color 0.6s var(--ease-in-out);
  cursor: auto;
}

body::after {
  content: "";
  position: fixed;
  inset: -18%;
  pointer-events: none;
  z-index: 999;
  opacity: 0;
  transform: scale(0.9);
  transform-origin: var(--theme-x) var(--theme-y);
  background:
    radial-gradient(circle at var(--theme-x) var(--theme-y),
      rgba(240, 246, 252, 0.24) 0%,
      rgba(127, 182, 212, 0.16) 18%,
      rgba(143, 168, 63, 0.12) 32%,
      transparent 58%);
  filter: blur(24px) saturate(118%);
  transition:
    opacity 0.78s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.92s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.7s ease;
}

[data-theme='light'] body::after {
  background:
    radial-gradient(circle at var(--theme-x) var(--theme-y),
      rgba(255, 255, 255, 0.62) 0%,
      rgba(240, 246, 252, 0.34) 18%,
      rgba(127, 182, 212, 0.16) 32%,
      transparent 58%);
}

html.theme-transitioning body::after {
  opacity: 1;
  transform: scale(1.08);
}

@media (prefers-reduced-motion: reduce) {
  body::after {
    transition: none;
  }
}

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

h1, h2, h3, h4, blockquote { margin: 0; }
p { margin: 0 0 var(--space-sm); }

a { color: inherit; text-decoration: none; transition: color var(--duration-fast) var(--ease-in-out); }

::selection { background: var(--olive); color: var(--obsidian); }

/* ─── Noise overlay ────────────────────────────────────────── */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: var(--bg-noise-opacity);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ─── Scroll progress bar ──────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--olive), var(--sky));
  z-index: 100;
  transition: width 60ms linear;
  box-shadow: 0 0 12px var(--olive-glow);
}

/* ─── Custom cursor: disabled ──────────────────────────────── */
.cursor-dot, .cursor-ring { display: none; }

/* ─── Container ────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 2;
}

/* ═══════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════ */
.nav-shell {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  z-index: 50;
  width: max-content;
  max-width: calc(100% - 2rem);
}

.nav {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  width: max-content;
  gap: clamp(0.85rem, 1.4vw, 1.35rem);
  padding: 0.7rem 1.2rem;
  background: rgba(11, 14, 19, 0.55);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  transition: all 0.5s var(--ease-out-expo);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

[data-theme='light'] .nav {
  background: rgba(244, 241, 236, 0.75);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 24px rgba(58, 42, 30, 0.08);
}

.nav--scrolled {
  padding: 0.55rem 1.2rem;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}
[data-theme='light'] .nav--scrolled {
  box-shadow: 0 10px 30px rgba(58, 42, 30, 0.12);
}

.nav-shell.nav-shell--scrolled {
  top: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.nav-logo img {
  height: 28px;
  width: auto;
  display: block;
  transition: transform 0.4s var(--ease-back);
}
.nav-logo:hover img { transform: scale(1.04) rotate(-1deg); }

.nav-logo .logo-light { display: none; }
.nav-logo .logo-dark  { display: block; }
[data-theme='light'] .nav-logo .logo-light { display: block; }
[data-theme='light'] .nav-logo .logo-dark  { display: none; }

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  min-width: auto;
  gap: clamp(0.72rem, 1vw, 1rem);
  margin: 0; padding: 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
}
.nav-links a {
  position: relative;
  padding: 0.3rem 0;
  color: var(--quartz);
  opacity: 0.78;
  transition: opacity var(--duration-fast) var(--ease-in-out);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--olive), var(--sky));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease-out-expo);
}
.nav-links a:hover, .nav-links a.is-active { opacity: 1; }
.nav-links a:hover::after, .nav-links a.is-active::after { transform: scaleX(1); }

.nav-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

.nav-cta {
  min-width: 0;
  padding: 0.56rem 1rem;
  background: linear-gradient(135deg, var(--olive), var(--olive-deep));
  color: var(--obsidian) !important;
  border-radius: 100px;
  font-weight: 500;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  transition: transform 0.3s var(--ease-back), box-shadow 0.3s ease, filter 0.3s ease;
  box-shadow: 0 4px 16px var(--olive-glow);
  flex-shrink: 0;
  text-align: center;
  white-space: nowrap;
}
.nav-cta:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 24px var(--olive-glow);
  filter: brightness(1.08);
}

.nav-meta-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background:
    linear-gradient(135deg, rgba(143, 168, 63, 0.14), rgba(127, 182, 212, 0.14)),
    rgba(11, 14, 19, 0.38);
  color: var(--quartz);
  cursor: pointer;
  transition:
    transform 0.3s var(--ease-back),
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    background 0.3s ease;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
}

[data-theme='light'] .lang-toggle {
  border-color: rgba(58, 42, 30, 0.14);
  background:
    linear-gradient(135deg, rgba(100, 122, 42, 0.12), rgba(78, 134, 167, 0.12)),
    rgba(244, 241, 236, 0.74);
  box-shadow: 0 10px 24px rgba(58, 42, 30, 0.08);
}

.lang-toggle:hover {
  transform: translateY(-2px) rotate(-1deg);
  border-color: color-mix(in srgb, var(--olive) 58%, white);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

.lang-toggle__flag {
  font-size: 1rem;
  line-height: 1;
  filter: saturate(1.05);
}

.lang-toggle--compact {
  min-width: 46px;
  height: 46px;
}

.theme-toggle {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--quartz);
  width: 34px; height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.95rem;
  display: grid; place-items: center;
  transition: all 0.4s var(--ease-out-expo);
  flex-shrink: 0;
}
[data-theme='light'] .theme-toggle {
  border-color: rgba(58, 42, 30, 0.22);
}
.theme-toggle:hover {
  transform: rotate(180deg);
  border-color: var(--olive);
  color: var(--olive);
}

@media (max-width: 1180px) and (min-width: 821px) {
  .nav-shell {
    width: auto;
    max-width: calc(100% - 1.2rem);
    gap: 0.55rem;
  }

  .nav {
    width: auto;
    gap: 0.7rem;
    padding: 0.62rem 0.95rem;
  }

  .nav-logo img {
    height: 24px;
  }

  .nav-links {
    gap: 0.6rem;
    font-size: 0.76rem;
  }

  .nav-cta {
    padding: 0.5rem 0.82rem;
    font-size: 0.78rem;
  }

  html[data-lang='en'] .nav-cta {
    padding-inline: 0.74rem;
    font-size: 0.75rem;
    letter-spacing: 0;
  }

  .nav-controls {
    gap: 0.42rem;
  }

  .lang-toggle {
    min-width: 36px;
    height: 36px;
  }

  .nav-meta-controls {
    gap: 0.34rem;
    padding: 0.28rem 0.3rem;
  }
}

/* Mobile nav */
@media (max-width: 820px) {
  .nav-shell {
    top: 1.15rem;
    width: calc(100% - 1rem);
    max-width: calc(100% - 1rem);
    gap: 0.45rem;
  }

  .nav {
    width: calc(100% - 1rem);
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: space-between;
    gap: 0.55rem;
    padding: 0.5rem 0.7rem;
  }
  .nav-links { display: none; }
  .nav-logo { min-width: 0; }
  .nav-logo img { height: 22px; }
  .nav-cta {
    padding: 0.42rem 0.78rem;
    font-size: 0.76rem;
    white-space: nowrap;
  }
  html[data-lang='en'] .nav-cta {
    padding-inline: 0.68rem;
    font-size: 0.72rem;
    letter-spacing: 0;
  }
  .nav-controls { gap: 0.35rem; }
  .lang-toggle {
    min-width: 34px;
    height: 34px;
  }
  .theme-toggle {
    width: 34px;
    height: 34px;
  }

  .nav-meta-controls {
    flex-shrink: 0;
    gap: 0.25rem;
    padding: 0.24rem 0.26rem;
  }

  .hero {
    padding-top: calc(var(--space-lg) + 4.5rem);
  }

  .hero-content {
    max-width: min(100%, 34rem);
  }

  .hero-label {
    max-width: 100%;
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    white-space: normal;
    line-height: 1.45;
    padding: 0.45rem 0.8rem;
  }

  .hero h1 {
    font-size: clamp(2.9rem, 11vw, 4.6rem);
    line-height: 0.98;
  }

  html[data-lang='en'] .hero h1 {
    font-size: clamp(2.6rem, 10.5vw, 4.1rem);
    line-height: 1.02;
  }

  .hero-line {
    display: block;
    white-space: normal;
  }

  html[data-lang='en'] .hero-word {
    display: block;
    margin-top: 0.04em;
  }

  .hero-description {
    max-width: 32rem;
    font-size: 1.08rem;
    line-height: 1.72;
  }
}

@media (max-width: 640px) {
  .nav-shell {
    top: 1rem;
    width: calc(100% - 0.6rem);
    max-width: calc(100% - 0.6rem);
    gap: 0.35rem;
  }

  .nav {
    gap: 0.35rem;
    padding: 0.42rem 0.45rem;
  }

  .nav-logo img {
    height: 18px;
  }

  .nav-cta {
    padding: 0.38rem 0.58rem;
    font-size: 0.68rem;
    border-radius: 999px;
  }

  html[data-lang='en'] .nav-cta {
    padding-inline: 0.52rem;
    font-size: 0.62rem;
  }

  .nav-controls {
    gap: 0.28rem;
  }

  .lang-toggle,
  .theme-toggle {
    min-width: 32px;
    width: 32px;
    height: 32px;
  }

  .nav-meta-controls {
    gap: 0.2rem;
    padding: 0.2rem 0.22rem;
  }

  .hero-label {
    font-size: 0.58rem;
    letter-spacing: 0.14em;
  }

  .hero h1 {
    font-size: clamp(2.55rem, 12vw, 3.7rem);
  }

  html[data-lang='en'] .hero h1 {
    font-size: clamp(2.25rem, 11.2vw, 3.3rem);
  }

  html[data-lang='en'] .hero-word {
    display: block;
    margin-top: 0.02em;
  }

  .hero-description {
    font-size: 1rem;
    line-height: 1.8;
  }
}

/* ═══════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: end;
  padding: calc(var(--space-xl) + 4rem) var(--gutter) calc(var(--space-xl) + 3rem);
  overflow: hidden;
  isolation: isolate;
}

/* Photo background with warm overlay + grain */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url('assets/hero-rio-eo.jpg');
  background-size: cover;
  background-position: center top;
  filter: saturate(0.78) contrast(1.02) brightness(0.55);
  transform: scale(1.02);
  will-change: transform;
}

.hero::before {
  /* Warm gradient wash */
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(11,14,19,0.55) 0%, rgba(11,14,19,0.85) 100%),
    radial-gradient(ellipse at 30% 20%, var(--olive-glow) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 75%, var(--sky-glow) 0%, transparent 60%);
}

[data-theme='light'] .hero-bg {
  filter: saturate(0.85) contrast(1.02) brightness(0.92);
}
[data-theme='light'] .hero::before {
  background:
    linear-gradient(180deg, rgba(244,241,236,0.72) 0%, rgba(244,241,236,0.9) 100%),
    radial-gradient(ellipse at 30% 20%, var(--olive-glow) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 75%, var(--sky-glow) 0%, transparent 60%);
}

/* Aurora blob */
.hero-aurora {
  position: absolute;
  inset: -20%;
  z-index: -1;
  background:
    conic-gradient(from var(--angle), transparent 0%, var(--olive-glow) 20%, transparent 40%, var(--sky-glow) 65%, transparent 85%);
  filter: blur(80px);
  opacity: 0.55;
  animation: spin-aurora 22s linear infinite;
  pointer-events: none;
}
@keyframes spin-aurora {
  to { --angle: 360deg; }
}

/* Grid dots pattern */
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(circle, rgba(240,246,252,0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  pointer-events: none;
}
[data-theme='light'] .hero-grid {
  background-image: radial-gradient(circle, rgba(58,42,30,0.08) 1px, transparent 1px);
}

.hero-content {
  max-width: 900px;
  position: relative;
  z-index: 2;
  padding-top: clamp(0.25rem, 1vw, 0.85rem);
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--olive-soft);
  margin-bottom: var(--space-md);
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(143, 168, 63, 0.5);
  border-radius: 100px;
  background: rgba(11, 14, 19, 0.65);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
[data-theme='light'] .hero-label {
  color: var(--olive-deep);
  border-color: rgba(78, 97, 31, 0.45);
  background: rgba(244, 241, 236, 0.88);
  text-shadow: none;
}
.hero-label::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--olive);
  box-shadow: 0 0 10px var(--olive);
  animation: pulse-dot 2s var(--ease-in-out) infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 9vw, 7.5rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
  color: var(--quartz);
}
/* Hero h1 em — gradient text for "tecnología" */
.hero h1 em {
  font-style: italic;
  font-weight: 300;
  display: inline-block;
  background: linear-gradient(135deg, var(--olive) 0%, var(--sky) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  position: relative;
  padding-bottom: 0.15em;
  padding-right: 0.05em;
}

/* Underline via ::after — starts hidden, animates to full width */
.hero h1 em::after {
  content: '';
  position: absolute;
  bottom: 0.15em;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--olive), var(--sky));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.2s var(--ease-out-expo);
}
/* Underline appears only when explicitly triggered via JS */
.hero-word--accent.is-underlined em::after {
  transform: scaleX(1);
}

/* ── Hero letter-by-letter reveal ─────────────────────────── */
.hero-line {
  display: inline;
  white-space: nowrap;
}

.hero-letter {
  display: inline-block;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(10px);
  transition: opacity 1.2s cubic-bezier(0.25, 1, 0.5, 1),
              filter 1.2s cubic-bezier(0.25, 1, 0.5, 1),
              transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}
/* Spaces need to preserve width */
.hero-letter--space {
  width: 0.3em;
}
.hero-letter.is-revealed {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

/* ── Hero accent word (tecnología) — whole word, slower ───── */
.hero-word {
  display: inline-block;
  white-space: nowrap;
}
.hero-word--accent {
  opacity: 0;
  filter: blur(14px);
  transform: translateY(16px);
  transition: opacity 2.2s cubic-bezier(0.16, 1, 0.3, 1),
              filter 2.4s cubic-bezier(0.16, 1, 0.3, 1),
              transform 2s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-word--accent.is-revealed {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

/* Reduced motion: skip all */
@media (prefers-reduced-motion: reduce) {
  .hero-letter,
  .hero-word--accent {
    opacity: 1;
    filter: none;
    transform: none;
    transition: none;
  }
  .hero h1 em::after {
    transform: scaleX(1);
    transition: none;
  }
}

@media (max-width: 1280px) {
  .hero-content {
    max-width: 820px;
  }

  .hero h1 {
    font-size: clamp(3rem, 8vw, 6.4rem);
  }
}

@media (max-width: 1080px) {
  .hero-content {
    max-width: 760px;
  }

  .hero h1 {
    font-size: clamp(2.9rem, 7.1vw, 5.6rem);
  }
}

@media (min-width: 821px) {
  .hero {
    min-height: 100svh;
  }

  #hero-title {
    min-height: 2.15em;
  }
}

.hero-description {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: var(--chalk);
  max-width: 560px;
  margin-bottom: var(--space-lg);
  line-height: 1.65;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  opacity: 1;
  transform: none;
  animation: none;
}

.hero-eo {
  color: var(--olive);
}

[data-theme='light'] .hero-eo {
  color: var(--olive-deep);
}

[data-theme='light'] .hero-description {
  color: #4A4138;
  text-shadow: none;
}
@keyframes fade-up {
  to { opacity: 1; transform: translateY(0); }
}

.hero-rotator-line {
  margin: 0 0 var(--space-lg);
  height: 2.2em;
  display: flex;
  align-items: center;
  overflow: hidden;
  width: fit-content;
  max-width: 100%;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(240, 246, 252, 0.14);
  background: rgba(11, 14, 19, 0.4);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
[data-theme='light'] .hero-rotator-line {
  border-color: rgba(58, 42, 30, 0.16);
  background: rgba(244, 241, 236, 0.84);
}

.hero-rotator {
  display: inline;
  margin-left: 0.25rem;
  color: var(--olive);
  font-weight: 500;
  font-style: italic;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  white-space: normal;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

[data-theme='light'] .hero-rotator {
  color: var(--olive-deep);
  text-shadow: none;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--olive), var(--olive-deep));
  color: var(--obsidian) !important;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.02em;
  border-radius: 100px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease-back), box-shadow 0.4s ease;
  box-shadow: 0 10px 30px var(--olive-glow);
  opacity: 0;
  transform: translateY(20px);
  animation: fade-up 1s 1.3s var(--ease-out-expo) forwards;
  will-change: transform;
}
.hero-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: translateX(-100%);
  transition: transform 0.7s var(--ease-in-out);
}
.hero-cta:hover::before { transform: translateX(100%); }
.hero-cta:hover {
  box-shadow: 0 14px 40px var(--olive-glow);
}
.hero-cta .arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease-back);
}
.hero-cta:hover .arrow { transform: translateX(6px); }

.hero-scroll-hint {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  color: var(--quartz);
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  opacity: 0.86;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.hero-scroll-hint::after {
  content: '';
  width: 1px;
  height: 42px;
  background: linear-gradient(180deg, var(--quartz), transparent);
  animation: scroll-line 2s var(--ease-in-out) infinite;
}
[data-theme='light'] .hero-scroll-hint {
  color: #3C3127;
  text-shadow: none;
}
[data-theme='light'] .hero-scroll-hint::after {
  background: linear-gradient(180deg, #3C3127, transparent);
}
@keyframes scroll-line {
  0%,100% { transform: scaleY(1); opacity: 0.7; }
  50% { transform: scaleY(1.3); opacity: 1; }
}

/* Magnetic wrapper (JS sets --mx/--my) */
.magnetic {
  transform: translate(calc(var(--mx, 0) * 1px), calc(var(--my, 0) * 1px));
  transition: transform 0.4s var(--ease-out-expo);
}

/* ═══════════════════════════════════════════════════════════
   SECTION COMMONS
   ═══════════════════════════════════════════════════════════ */
section {
  padding: var(--space-xl) 0;
  position: relative;
}

.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: var(--space-sm);
}
.section-label::before {
  content: '— ';
  color: var(--olive);
}
[data-theme='light'] .section-label,
[data-theme='light'] .section-label::before {
  color: var(--olive-deep);
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.015em;
  margin-bottom: var(--space-md);
  color: var(--quartz);
}
.section-heading em {
  font-style: italic;
  font-weight: 300;
  background: linear-gradient(135deg, var(--olive), var(--sky));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Reveal system */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 1s var(--ease-out-expo), transform 1s var(--ease-out-expo), filter 1s var(--ease-out-expo);
  filter: blur(4px);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* Image mask reveal */
.mask-reveal {
  position: relative;
  overflow: hidden;
}
.mask-reveal img {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.4s var(--ease-out-expo);
}
.mask-reveal.visible img {
  clip-path: inset(0 0 0 0);
}

/* ═══════════════════════════════════════════════════════════
   PHILOSOPHY
   ═══════════════════════════════════════════════════════════ */
.philosophy {
  padding-top: var(--space-2xl);
  position: relative;
  overflow: hidden;
}
.philosophy::before {
  content: 'Eo';
  position: absolute;
  bottom: -0.15em;
  left: -0.05em;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(14rem, 30vw, 32rem);
  line-height: 1;
  color: var(--olive);
  opacity: 0.035;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  letter-spacing: -0.04em;
}
[data-theme='light'] .philosophy::before {
  opacity: 0.045;
}
.philosophy-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: var(--space-xl);
  align-items: start;
}
.philosophy-image {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.5), 0 0 0 1px rgba(143,168,63,0.12);
}
.philosophy-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.5s var(--ease-out-expo);
}
.philosophy-image:hover img { transform: scale(1.05); }
.philosophy-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 50%, var(--olive-glow));
  mix-blend-mode: overlay;
  pointer-events: none;
}

.philosophy-number {
  position: absolute;
  top: -0.4em;
  right: 2%;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(8rem, 18vw, 18rem);
  font-weight: 300;
  line-height: 1;
  color: var(--olive);
  opacity: 0.08;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.philosophy-text {
  font-size: 1.1rem;
  color: var(--chalk);
  line-height: 1.7;
  position: relative;
  z-index: 1;
}
.philosophy-text strong {
  color: var(--quartz);
  font-weight: 500;
}
.philosophy-text p { margin-bottom: var(--space-sm); }

.river-story {
  margin-bottom: var(--space-lg);
  padding: var(--space-md) var(--space-md) var(--space-md) 1.5rem;
  border-left: 2px solid var(--olive);
  background: color-mix(in srgb, var(--olive) 6%, transparent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.river-story-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: var(--space-sm);
}
.river-story p {
  font-size: 1rem;
  color: var(--chalk);
  opacity: 0.85;
  margin-bottom: var(--space-xs);
  line-height: 1.75;
}
.river-story p:last-child { margin-bottom: 0; }

.philosophy-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.35;
  color: var(--quartz);
  padding: var(--space-md) 0;
  border-left: 2px solid var(--olive);
  padding-left: 1.5rem;
  margin-top: var(--space-md);
  position: relative;
}
.philosophy-quote::before {
  content: '"';
  position: absolute;
  top: -0.6em;
  left: 0.8rem;
  font-size: 4em;
  color: var(--olive);
  opacity: 0.2;
  font-family: var(--font-display);
  line-height: 1;
  pointer-events: none;
}

.philosophy-river {
  margin-top: var(--space-lg);
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--chalk);
}
.river-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--olive) 0%, var(--sky) 100%);
  position: relative;
}
.river-line::before, .river-line::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  transform: translateY(-50%);
}
.river-line::before { left: 0; background: var(--olive); }
.river-line::after { right: 0; background: var(--sky); }

@media (max-width: 1024px) {
  .philosophy-grid { grid-template-columns: 1fr; gap: var(--space-lg); }
  .philosophy-image { max-width: 540px; margin: 0 auto; }
}

/* ═══════════════════════════════════════════════════════════
   SERVICES
   ═══════════════════════════════════════════════════════════ */
.services { padding-top: var(--space-xl); }
.services-header {
  margin-bottom: var(--space-lg);
  max-width: 780px;
}
.services-intro {
  color: var(--chalk);
  font-size: 1.1rem;
  max-width: 640px;
  margin-top: var(--space-md);
  line-height: 1.7;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  perspective: 1200px;
}

.service-card {
  --mouse-x: 50%;
  --mouse-y: 50%;
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  padding: var(--space-md) var(--space-md) var(--space-lg);
  background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(255,255,255,0.005));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  overflow: hidden;
  isolation: isolate;
  transform: rotateX(var(--ry)) rotateY(var(--rx));
  transition: transform 0.4s var(--ease-out-expo), border-color 0.4s ease, box-shadow 0.5s ease;
  transform-style: preserve-3d;
  cursor: default;
}
[data-theme='light'] .service-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.7), rgba(255,255,255,0.3));
  border-color: rgba(58, 42, 30, 0.1);
  box-shadow: 0 4px 20px rgba(58, 42, 30, 0.05);
}

.service-card::before {
  /* spotlight */
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), var(--olive-glow), transparent 50%);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: -1;
  pointer-events: none;
}
.service-card::after {
  /* border glow */
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-md);
  padding: 1px;
  background: linear-gradient(135deg, var(--olive), transparent 50%, var(--sky));
  opacity: 0;
  transition: opacity 0.5s ease;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: -1;
}
.service-card:hover::before,
.service-card:hover::after { opacity: 1; }
.service-card:hover {
  border-color: transparent;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35), 0 0 0 1px var(--olive-glow);
}
[data-theme='light'] .service-card:hover {
  box-shadow: 0 20px 50px rgba(58,42,30,0.1), 0 0 0 1px var(--olive-glow);
}

.service-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--olive-glow), var(--sky-glow));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  color: var(--olive-soft);
  margin-bottom: var(--space-md);
  transform: translateZ(30px);
  transition: transform 0.5s var(--ease-back), color 0.3s ease, box-shadow 0.3s ease;
  padding: 12px;
}
.service-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.service-card:hover .service-icon {
  transform: translateZ(50px) rotate(-6deg);
  color: var(--olive);
  box-shadow: 0 8px 24px var(--olive-glow);
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: var(--space-sm);
  color: var(--quartz);
  transform: translateZ(20px);
}

.service-card p {
  color: var(--chalk);
  font-size: 0.96rem;
  line-height: 1.65;
  margin-bottom: var(--space-sm);
  transform: translateZ(10px);
}

.service-detail {
  max-height: 0;
  overflow: hidden;
  color: var(--chalk);
  font-size: 0.9rem;
  line-height: 1.7;
  transition: max-height 0.6s var(--ease-out-expo), margin 0.6s var(--ease-out-expo);
}
.service-card.is-open .service-detail {
  max-height: 400px;
  margin-bottom: var(--space-sm);
}

.service-toggle {
  background: transparent;
  border: none;
  color: var(--olive-soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.3rem;
  transition: color 0.3s ease, gap 0.3s ease;
}
.service-toggle::after {
  content: '+';
  font-size: 1rem;
  transition: transform 0.4s var(--ease-back);
}
.service-card.is-open .service-toggle::after { transform: rotate(45deg); }
.service-toggle:hover { color: var(--olive); gap: 0.6rem; }
[data-theme='light'] .service-toggle { color: var(--olive-deep); }
[data-theme='light'] .service-toggle:hover { color: var(--olive); }

.service-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: var(--sky);
  margin-top: var(--space-md);
  text-transform: uppercase;
  transform: translateZ(10px);
}
[data-theme='light'] .service-tag { color: var(--sky-deep); }

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

/* ═══════════════════════════════════════════════════════════
   MARQUEE (tech stack)
   ═══════════════════════════════════════════════════════════ */
.marquee {
  padding: var(--space-lg) 0;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(90deg, transparent, rgba(143,168,63,0.04), rgba(127,182,212,0.04), transparent);
  margin-top: var(--space-lg);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent); /* stylelint-disable-line */
}
[data-theme='light'] .marquee {
  border-color: rgba(58,42,30,0.08);
}
.marquee-track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: marquee-scroll 40s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}
@keyframes marquee-scroll {
  to { transform: translateX(-50%); }
}
.marquee-item {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 400;
  color: var(--quartz);
  opacity: 0.55;
  display: flex;
  align-items: center;
  gap: 3rem;
  white-space: nowrap;
  transition: opacity 0.3s ease, color 0.3s ease;
}
.marquee-item::after {
  content: '·';
  color: var(--olive);
  font-size: 1.5rem;
}
.marquee-item:hover { opacity: 1; color: var(--olive-soft); }

/* ═══════════════════════════════════════════════════════════
   NEWS
   ═══════════════════════════════════════════════════════════ */
.news { padding-top: var(--space-xl); }
.news-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--space-lg);
  gap: var(--space-md);
  flex-wrap: wrap;
}
.news-grid {
  display: grid;
  gap: var(--space-lg);
}
.news-card {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--space-lg);
  align-items: center;
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.5s var(--ease-out-expo);
}
[data-theme='light'] .news-card {
  border-bottom-color: rgba(58,42,30,0.1);
}
.news-card:last-child { border-bottom: none; }
.news-card:nth-child(even) {
  grid-template-columns: 1.4fr 1fr;
}
.news-card:nth-child(even) .news-image { order: 2; }
.news-card:hover { transform: translateX(6px); }

.news-image {
  position: relative;
  align-self: start;
  aspect-ratio: 4/3;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.news-image--half {
  width: clamp(10.5rem, 58%, 15rem);
  margin-inline: auto;
}
.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.05) sepia(0.08);
  transition: transform 1s var(--ease-out-expo), filter 0.7s ease;
}
.news-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--olive-glow), transparent 60%);
  mix-blend-mode: overlay;
  opacity: 0.7;
  transition: opacity 0.5s ease;
}
.news-card:hover .news-image img {
  transform: scale(1.06);
  filter: saturate(1) contrast(1) sepia(0);
}
.news-card:hover .news-image::after { opacity: 0.3; }

.news-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: var(--space-sm);
}
.news-meta::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--olive);
}

.news-card h3 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: var(--space-sm);
  color: var(--quartz);
}
.news-card p {
  color: var(--chalk);
  line-height: 1.7;
}
.news-card--feature {
  align-items: start;
}
.news-card--feature .news-image {
  border: 1px solid color-mix(in srgb, var(--olive) 26%, transparent);
}
/* Ajuste específico para retrato de Javier: mantener tamaño del marco */
#javier-cardenoso-cto .news-image {
  aspect-ratio: 5/6;
  width: clamp(12rem, 64%, 16rem);
}
#javier-cardenoso-cto .news-image img {
  object-fit: cover;
  object-position: center top;
}
.news-story {
  position: relative;
  margin-top: 0.25rem;
  padding: 1rem 1rem 0.9rem;
  border-radius: calc(var(--radius-md) - 2px);
  border: 1px solid color-mix(in srgb, var(--stone-light) 22%, transparent);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--olive-glow) 28%, transparent), transparent 58%),
    color-mix(in srgb, var(--stone) 45%, transparent);
}
[data-theme='light'] .news-story {
  border-color: rgba(58,42,30,0.16);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--olive-glow) 20%, transparent), transparent 58%),
    color-mix(in srgb, #ffffff 75%, var(--stone) 25%);
}
.news-story p {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: normal;
  color: var(--chalk);
}
.news-lead {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}
.news-extra {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid color-mix(in srgb, var(--stone-light) 18%, transparent);
}
.news-extra p + p {
  margin-top: 0.8rem;
}
.news-story .service-toggle {
  margin-top: 0.95rem;
}
.news-story.is-open .service-toggle::after {
  transform: rotate(45deg);
}
@media (max-width: 900px) {
  .news-card, .news-card:nth-child(even) { grid-template-columns: 1fr; gap: var(--space-md); }
  .news-card:nth-child(even) .news-image { order: 0; }
  .news-image--half { width: min(64%, 15rem); }
}

/* ═══════════════════════════════════════════════════════════
   CASES
   ═══════════════════════════════════════════════════════════ */
.cases { padding-top: var(--space-xl); }
.cases-header { max-width: 700px; margin-bottom: var(--space-lg); }

.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.case-card {
  position: relative;
  padding: var(--space-md);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 440px;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  transition: transform 0.6s var(--ease-out-expo), border-color 0.4s ease;
}
.case-card:not(.case-card--featured) {
  min-height: 400px;
}
[data-theme='light'] .case-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0.2));
  border-color: rgba(58,42,30,0.1);
}
.case-card:hover {
  transform: translateY(-6px);
  border-color: var(--olive-glow);
}

/* Featured: primera card ocupa 2 columnas + imagen más alta */
.case-card--featured {
  grid-column: span 2;
}
.case-card--featured .case-image {
  height: 300px;
}
.case-card--featured .case-number {
  font-size: 6rem;
}
.case-card--featured h3 {
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
}

.case-image {
  position: relative;
  height: 190px;
  margin: calc(-1 * var(--space-md)) calc(-1 * var(--space-md)) var(--space-md);
  overflow: hidden;
}
.case-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.75) contrast(1.05) brightness(0.85);
  transition: transform 1.2s var(--ease-out-expo), filter 0.6s ease;
}
.case-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(11,14,19,0.85));
}
[data-theme='light'] .case-image::after {
  background: linear-gradient(180deg, transparent 40%, rgba(244,241,236,0.7));
}
.case-card:hover .case-image img {
  transform: scale(1.1);
  filter: saturate(1) contrast(1) brightness(1);
}

.case-number {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 4rem;
  font-weight: 300;
  line-height: 1;
  color: var(--olive);
  opacity: 0.9;
  z-index: 1;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.case-card h3 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: var(--space-sm);
  color: var(--quartz);
}
.case-card p {
  color: var(--chalk);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: var(--space-md);
  flex: 1;
}
.case-description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  flex: 0 0 auto;
  margin-bottom: 0.55rem;
}
.case-card:not(.case-card--featured) .case-description {
  -webkit-line-clamp: 5;
}
.case-card.is-open .case-description {
  display: block;
  -webkit-line-clamp: unset;
}
.case-toggle {
  margin-bottom: var(--space-md);
  align-self: flex-start;
}
.case-card.is-open .case-toggle::after {
  transform: rotate(45deg);
}

.case-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.tech-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  padding: 0.28rem 0.65rem;
  background: rgba(127,182,212,0.08);
  border: 1px solid rgba(127,182,212,0.25);
  border-radius: 100px;
  color: var(--sky-soft);
  transition: all 0.3s ease;
}
.tech-pill:hover {
  background: rgba(127,182,212,0.18);
  color: var(--sky);
  transform: translateY(-2px);
}
[data-theme='light'] .tech-pill {
  background: rgba(78, 134, 167, 0.1);
  border-color: rgba(78, 134, 167, 0.3);
  color: var(--sky-deep);
}

@media (max-width: 1024px) {
  .cases-grid { grid-template-columns: repeat(2, 1fr); }
  .case-card--featured { grid-column: span 2; }
}
@media (max-width: 640px) {
  .cases-grid { grid-template-columns: 1fr; }
  .case-card--featured { grid-column: span 1; }
  .case-card--featured .case-image { height: 220px; }
}

/* ═══════════════════════════════════════════════════════════
   TIMELINE
   ═══════════════════════════════════════════════════════════ */
.timeline {
  padding-top: var(--space-xl);
  position: relative;
}
.timeline-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-lg);
}
.timeline-track {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.timeline-track::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 0.9rem;
  bottom: 0.9rem;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--olive) 10%, var(--sky) 90%, transparent);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: clamp(1.1rem, 2vw, 1.8rem);
  align-items: start;
  padding: 0 0 clamp(1.8rem, 3vw, 2.6rem);
}
.timeline-item > * {
  grid-column: 2;
}
.timeline-item:last-child {
  padding-bottom: 0;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 1rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--obsidian);
  border: 2px solid var(--olive);
  box-shadow: 0 0 0 4px rgba(143, 168, 63, 0.15);
  transition: all 0.5s var(--ease-back);
}
.timeline-item::after {
  content: '';
  position: absolute;
  left: 27px;
  top: 1.48rem;
  width: clamp(0.8rem, 1.6vw, 1.2rem);
  height: 1px;
  background: linear-gradient(90deg, rgba(143, 168, 63, 0.7), rgba(127, 182, 212, 0.18));
}
.timeline-item.visible::before {
  background: var(--olive);
  box-shadow: 0 0 0 6px rgba(143, 168, 63, 0.25), 0 0 20px var(--olive-glow);
}
.timeline-year {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2.5rem, 4vw, 3.2rem);
  font-weight: 400;
  line-height: 0.95;
  background: linear-gradient(135deg, var(--olive), var(--sky));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.28rem;
}
.timeline-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--quartz);
  margin-bottom: 0.75rem;
  display: block;
}
.timeline-text {
  color: var(--chalk);
  font-size: 1.04rem;
  line-height: 1.7;
  max-width: 42rem;
}

@media (min-width: 900px) {
  .timeline-track {
    max-width: 1100px;
  }
  .timeline-track::before {
    left: 50%;
    top: 1rem;
    bottom: 1rem;
    transform: translateX(-50%);
  }
  .timeline-item {
    grid-template-columns: minmax(0, 1fr) clamp(4.8rem, 7vw, 6.2rem) minmax(0, 1fr);
    column-gap: clamp(1.25rem, 2.2vw, 2.4rem);
    padding-bottom: clamp(2rem, 3vw, 3rem);
    align-items: start;
  }
  .timeline-item::before {
    left: calc(50% - 8px);
    top: 1.05rem;
  }
  .timeline-item::after {
    top: 1.52rem;
    width: clamp(1.3rem, 2vw, 1.9rem);
  }
  .timeline-item:nth-child(odd)::after {
    left: calc(50% + 8px);
    background: linear-gradient(90deg, rgba(143, 168, 63, 0.78), rgba(127, 182, 212, 0.18));
  }
  .timeline-item:nth-child(even)::after {
    left: auto;
    right: calc(50% + 8px);
    background: linear-gradient(270deg, rgba(143, 168, 63, 0.78), rgba(127, 182, 212, 0.18));
  }
  .timeline-item:nth-child(odd) .timeline-year {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
    text-align: right;
    padding-right: 0.25rem;
  }
  .timeline-item:nth-child(odd) .timeline-label,
  .timeline-item:nth-child(odd) .timeline-text {
    grid-column: 3;
    text-align: left;
    justify-self: start;
  }
  .timeline-item:nth-child(even) .timeline-year {
    grid-column: 3;
    grid-row: 1;
    justify-self: start;
    text-align: left;
    padding-left: 0.25rem;
  }
  .timeline-item:nth-child(even) .timeline-label,
  .timeline-item:nth-child(even) .timeline-text {
    grid-column: 1;
    text-align: right;
    justify-self: end;
  }
  .timeline-text {
    max-width: 28rem;
  }
}
/* ═══════════════════════════════════════════════════════════
   CLIENTS & PARTNERS
   ═══════════════════════════════════════════════════════════ */
.clients {
  padding: var(--space-xl) 0;
  position: relative;
}
.clients::before {
  content: '';
  display: block;
  width: clamp(60px, 8vw, 100px);
  height: 1px;
  background: linear-gradient(90deg, var(--olive), var(--sky));
  margin: 0 auto var(--space-xl);
  opacity: 0.5;
}
.clients-header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto var(--space-md);
}
.clients-intro {
  font-size: 1rem;
  color: var(--chalk);
  line-height: 1.6;
  margin: 0;
}
.clients-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.8rem, 1.5vw, 1.2rem);
  max-width: 1180px;
  margin: 0 auto;
}

.client-card {
  border-radius: clamp(0.8rem, 1.4vw, 1.1rem);
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.025);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding: clamp(1.2rem, 2.5vw, 1.8rem);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.28s ease, border-color 0.28s ease, background 0.28s ease, box-shadow 0.28s ease;
  aspect-ratio: 3 / 2;
}
.client-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 0 40px rgba(115, 183, 240, 0.08);
}
[data-theme='light'] .client-card {
  border-color: rgba(58, 42, 30, 0.1);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 2px 12px rgba(58, 42, 30, 0.06);
}
[data-theme='light'] .client-card:hover {
  border-color: rgba(58, 42, 30, 0.2);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 24px rgba(58, 42, 30, 0.1);
}

.client-logo-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.client-logo {
  width: 100%;
  height: 100%;
  max-width: 80%;
  max-height: 65%;
  object-fit: contain;
  filter: grayscale(1) opacity(0.5);
  transition: filter 0.28s ease;
}
.client-card:hover .client-logo {
  filter: grayscale(0) opacity(1);
}

.logo--microsoft { max-width: 78%; }

/* Microsoft: en dark hover, texto blanco; en light, comportamiento original */
.logo--microsoft-hover { display: none; filter: none; }
:root:not([data-theme="light"]) .client-card:hover .logo--microsoft-default { display: none; }
:root:not([data-theme="light"]) .client-card:hover .logo--microsoft-hover   { display: block; filter: none; }
.logo--mediapro  { max-width: 86%; max-height: 78%; }
.logo--jti       { max-width: 68%; max-height: 66%; }
.logo--nttdata   { max-width: 78%; }
[data-theme="dark"] .logo--nttdata,
:root:not([data-theme="light"]) .logo--nttdata {
  filter: grayscale(1) opacity(0.7) brightness(1.4);
}
[data-theme="dark"] .client-card:hover .logo--nttdata,
:root:not([data-theme="light"]) .client-card:hover .logo--nttdata {
  filter: grayscale(0) opacity(1);
}
.logo--seres     { max-width: 78%; }

/* Seres: blanco en dark (default), azul en hover (hover-img); invert en light */
.logo--seres-hover { display: none; filter: none; opacity: 1; }
.client-card:hover .logo--seres-default { display: none; }
.client-card:hover .logo--seres-hover   { display: block; }
[data-theme="light"] .logo--seres-default {
  filter: invert(1) grayscale(1) opacity(0.5);
}
[data-theme="light"] .logo--seres-hover {
  filter: none;
}
.logo--hpe       { max-width: 72%; max-height: 62%; }

/* HPE: en dark, mostrar versión gris por defecto y blanca+verde en hover */
.logo--hpe-light { display: none; }
.logo--hpe-hover { display: none; }
.logo--hpe-default,
.logo--hpe-hover { filter: none; }
.client-card:hover .logo--hpe-default { display: none; }
.client-card:hover .logo--hpe-hover   { display: block; }

/* HPE en light: usar la imagen original con el filtro genérico */
[data-theme="light"] .logo--hpe-default { display: none; }
[data-theme="light"] .logo--hpe-hover   { display: none !important; }
[data-theme="light"] .logo--hpe-light   { display: block; }

.logo--fujitsu   { max-width: 76%; max-height: 68%; }
.logo--toboggan  { max-width: 82%; }

/* Fujitsu: rojo en hover, gris (como Seres) en estado normal */
.logo--fujitsu {
  filter: invert(1) grayscale(1) opacity(0.5);
}
.client-card:hover .logo--fujitsu {
  filter: none;
}
[data-theme="light"] .logo--fujitsu {
  filter: grayscale(1) opacity(0.5);
}
[data-theme="light"] .client-card:hover .logo--fujitsu {
  filter: none;
}

/* Microsoft: colores originales en ambos temas — filtro genérico basta */

/* Mediapro: dos imgs, dark visible por defecto, light oculta; invertir en light theme */
.logo--mediapro-light { display: none; }
[data-theme="light"] .logo--mediapro-dark  { display: none; }
[data-theme="light"] .logo--mediapro-light { display: block; filter: grayscale(1) opacity(0.5); }
[data-theme="light"] .client-card:hover .logo--mediapro-light { filter: none; }

/* Toboggan: fills blancos en dark, invert en light para negro */
[data-theme="light"] .logo--toboggan {
  filter: invert(1) grayscale(1) opacity(0.5);
}
[data-theme="light"] .client-card:hover .logo--toboggan {
  filter: invert(1);
}

.clients-grid:has(.client-card:nth-child(7):last-child) {
  --last-row-cols: 3;
}

@media (max-width: 900px) {
  .clients-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 560px) {
  .clients-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  .client-card,
  .client-logo {
    transition-duration: 0.01ms !important;
  }
}
/* ═══════════════════════════════════════════════════════════
   CTA / CONTACT
   ═══════════════════════════════════════════════════════════ */
.cta-section {
  padding: var(--space-2xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 30%, var(--olive-glow), transparent 55%),
    radial-gradient(ellipse at 70% 70%, var(--sky-glow), transparent 55%);
  opacity: 0.8;
  z-index: -1;
}
.cta-section::after {
  content: '20+';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(16rem, 32vw, 36rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--olive);
  opacity: 0.04;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  white-space: nowrap;
}
[data-theme='light'] .cta-section::after {
  opacity: 0.055;
}
.cta-section > .container {
  position: relative;
  z-index: 1;
}
.cta-heading {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 6rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
  color: var(--quartz);
  position: relative;
  display: inline-block;
}
.cta-heading::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--olive), var(--sky));
  margin: var(--space-md) auto 0;
  border-radius: 2px;
}
.cta-heading em {
  font-style: italic;
  background: linear-gradient(135deg, var(--olive), var(--sky));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cta-subtitle {
  font-size: 1.15rem;
  color: var(--chalk);
  max-width: 520px;
  margin: 0 auto var(--space-lg);
  line-height: 1.6;
}

.cta-contact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 780px;
  margin: var(--space-xl) auto 0;
}
.cta-contact-item {
  padding: var(--space-md) 1.2rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  text-align: center;
  transition: all 0.4s var(--ease-out-expo);
}
[data-theme='light'] .cta-contact-item {
  background: rgba(255,255,255,0.6);
  border-color: rgba(58,42,30,0.1);
}
.cta-contact-item:hover {
  transform: translateY(-4px);
  border-color: var(--olive);
  background: rgba(143,168,63,0.06);
}
.cta-contact-item .label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 0.6rem;
}
.cta-contact-item .value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--quartz);
  word-break: break-word;
}
.cta-contact-item a:hover { color: var(--olive); }

@media (max-width: 720px) {
  .cta-contact { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
.footer {
  position: relative;
  padding: var(--space-lg) 0 var(--space-md);
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(11,14,19,0.5);
}
[data-theme='light'] .footer {
  background: rgba(244,241,236,0.6);
  border-top-color: rgba(58,42,30,0.08);
}
.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--olive), var(--sky), transparent);
  opacity: 0.7;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--chalk);
}
.footer-logo img {
  width: auto;
  height: 32px;
  max-width: none;
  object-fit: contain;
  opacity: 0.9;
}
.footer-logo .logo-light { display: none; }
.footer-logo .logo-dark  { display: block; }
[data-theme='light'] .footer-logo .logo-light { display: block; }
[data-theme='light'] .footer-logo .logo-dark  { display: none; }

.footer-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0; padding: 0;
}
.footer-links a {
  opacity: 0.75;
  transition: opacity 0.3s ease, color 0.3s ease;
}
.footer-links a:hover { opacity: 1; color: var(--olive); }

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}

/* ═══════════════════════════════════════════════════════════
   ACCESSIBILITY — Reduced motion
   ═══════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-aurora, .marquee-track { animation: none !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
  .mask-reveal img { clip-path: none; }
}

/* Touch devices — disable 3D tilt + custom cursor */
@media (hover: none) {
  .service-card { transform: none !important; }
  .cursor-dot, .cursor-ring { display: none; }
}
