/* =============================================================
   LSG · styles.css
   ADN visual: precisión arquitectónica + acento naranja "obra".
   Toda la identidad y el tema viven en estos tokens.
   ============================================================= */

/* -------------------------------------------------------------
   1. TOKENS — TEMA OSCURO (por defecto)
   ------------------------------------------------------------- */
:root,
[data-theme="dark"] {
  --bg:           #0A0A0B;
  --bg-2:         #0E0E10;
  --surface:      #111114;
  --surface-2:    #17171B;
  --line:         rgba(255, 255, 255, 0.08);
  --line-2:       rgba(255, 255, 255, 0.14);

  --text:         #F1EEE8;
  --text-dim:     rgba(241, 238, 232, 0.56);
  --text-low:     rgba(241, 238, 232, 0.52);

  --accent:       #FF6B00;
  --accent-soft:  #FF8A3D;
  --accent-lo:    rgba(255, 107, 0, 0.12);
  --accent-gl:    rgba(255, 107, 0, 0.34);

  --grid-line:    rgba(255, 255, 255, 0.035);
  --bp-line:      rgba(255, 138, 61, 0.55);
  --bp-faint:     rgba(255, 138, 61, 0.20);

  --shadow:       0 30px 80px -30px rgba(0, 0, 0, 0.8);
  --noise-op:     0.05;
  color-scheme: dark;
}

/* -------------------------------------------------------------
   1b. TOKENS — TEMA CLARO (editorial, mismo acento)
   ------------------------------------------------------------- */
[data-theme="light"] {
  --bg:           #F4F1EA;
  --bg-2:         #EFEBE1;
  --surface:      #FFFFFF;
  --surface-2:    #F7F4ED;
  --line:         rgba(20, 18, 14, 0.12);
  --line-2:       rgba(20, 18, 14, 0.20);

  --text:         #15130F;
  --text-dim:     rgba(21, 19, 15, 0.62);
  --text-low:     rgba(21, 19, 15, 0.60);

  --accent:       #D24E04;
  --accent-soft:  #E8651A;
  --accent-lo:    rgba(210, 78, 4, 0.10);
  --accent-gl:    rgba(210, 78, 4, 0.26);

  --grid-line:    rgba(20, 18, 14, 0.045);
  --bp-line:      rgba(210, 78, 4, 0.55);
  --bp-faint:     rgba(210, 78, 4, 0.22);

  --shadow:       0 30px 80px -34px rgba(60, 40, 20, 0.28);
  --noise-op:     0.035;
  color-scheme: light;
}

/* -------------------------------------------------------------
   2. TIPOGRAFÍA Y CURVAS (no varían por tema)
   ------------------------------------------------------------- */
:root {
  --f-display: 'Bricolage Grotesque', 'Archivo', sans-serif;
  --f-body:    'Archivo', system-ui, sans-serif;
  --f-mono:    'IBM Plex Mono', ui-monospace, monospace;

  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io:   cubic-bezier(0.83, 0, 0.17, 1);

  --pad:       clamp(20px, 5vw, 72px);
  --maxw:      1340px;
  --r:         16px;
}

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

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: auto; /* Lenis gestiona el smooth scroll */
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
}

/* cursor:none solo cuando el cursor personalizado está realmente activo
   (main.js añade .cursor-on). Si el JS falla, el cursor nativo se mantiene. */
@media (pointer: fine) {
  html.cursor-on body,
  html.cursor-on body a, html.cursor-on body button,
  html.cursor-on body input, html.cursor-on body textarea { cursor: none; }
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; background: none; border: none; color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--accent); color: #0A0A0B; }

h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.02; letter-spacing: -0.025em; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 3px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 2000;
  background: var(--accent); color: #0A0A0B; padding: 10px 18px; border-radius: 8px;
  font-family: var(--f-mono); font-size: 13px; font-weight: 600;
  transform: translateY(-150%); transition: transform 0.3s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* -------------------------------------------------------------
   4. FONDO ATMOSFÉRICO + GRANO
   ------------------------------------------------------------- */
.scene { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.scene__grid {
  position: absolute; inset: -10%;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 28%, #000 0%, transparent 78%);
          mask-image: radial-gradient(ellipse 75% 60% at 50% 28%, #000 0%, transparent 78%);
  will-change: transform;
}
.scene__orb { position: absolute; border-radius: 50%; filter: blur(110px); opacity: 0.55; will-change: transform; }
.scene__orb--1 { width: 640px; height: 640px; top: -180px; right: -120px; background: radial-gradient(circle, var(--accent-gl), transparent 70%); }
.scene__orb--2 { width: 480px; height: 480px; bottom: 4%;   left: -160px; background: radial-gradient(circle, var(--accent-lo), transparent 70%); }

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

main, .footer, .nav, .menu { position: relative; z-index: 2; }

/* -------------------------------------------------------------
   5. PRELOADER
   ------------------------------------------------------------- */
#preloader {
  position: fixed; inset: 0; z-index: 5000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  /* Failsafe puro CSS: aunque el JS falle, se retira solo. */
  animation: plAuto 0.7s var(--ease) 2s forwards;
}
.pl__inner { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.pl__mark { width: 78px; height: 78px; filter: drop-shadow(0 0 22px var(--accent-gl)); }
.pl__mark .pl__draw, .pl__mark .pl__tick {
  stroke: var(--accent); stroke-width: 6; fill: none; stroke-linecap: round; stroke-linejoin: round;
}
.pl__mark .pl__draw { stroke-dasharray: 260; stroke-dashoffset: 260; animation: plDraw 1.3s var(--ease) forwards; }
.pl__mark .pl__tick { stroke-width: 4; stroke-dasharray: 70; stroke-dashoffset: 70; animation: plDraw 0.7s var(--ease) 0.7s forwards; }
.pl__bar { width: 150px; height: 2px; background: var(--line); overflow: hidden; }
.pl__bar span { display: block; height: 100%; width: 0; background: var(--accent); animation: plBar 1.7s var(--ease) forwards; }

@keyframes plDraw { to { stroke-dashoffset: 0; } }
@keyframes plBar  { to { width: 100%; } }
@keyframes plAuto { to { opacity: 0; visibility: hidden; transform: translateY(-12px); } }

body.pl-done #preloader { opacity: 0; visibility: hidden; transform: translateY(-12px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), visibility 0s 0.7s; animation: none; }

/* -------------------------------------------------------------
   6. CURSOR PERSONALIZADO
   ------------------------------------------------------------- */
.cursor { position: fixed; inset: 0; z-index: 4000; pointer-events: none; }
.cursor__dot, .cursor__ring { position: fixed; top: 0; left: 0; border-radius: 50%; transform: translate(-50%, -50%); will-change: transform; }
.cursor__dot { width: 6px; height: 6px; background: var(--accent); }
.cursor__ring {
  width: 38px; height: 38px; border: 1px solid var(--accent-gl);
  transition: width 0.3s var(--ease), height 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.cursor.is-hover .cursor__ring { width: 64px; height: 64px; background: var(--accent-lo); border-color: var(--accent); }
.cursor.is-down .cursor__ring { width: 30px; height: 30px; }
@media (pointer: coarse), (hover: none) { .cursor { display: none; } }

/* -------------------------------------------------------------
   7. BARRA DE PROGRESO
   ------------------------------------------------------------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 1500; background: transparent; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-soft)); box-shadow: 0 0 12px var(--accent-gl); }

/* -------------------------------------------------------------
   8. NAV
   ------------------------------------------------------------- */
.nav {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--pad);
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  padding-top: 13px; padding-bottom: 13px; border-bottom-color: var(--line);
}
.nav__logo { display: flex; align-items: center; gap: 11px; }
.nav__mark { width: 26px; height: 26px; }
.nav__mark path, .nav__mark line { stroke: var(--accent); stroke-width: 7; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.nav__word { font-family: var(--f-display); font-weight: 700; font-size: 21px; letter-spacing: 0.02em; }

.nav__links { display: flex; gap: 30px; }
.nav__links a { font-family: var(--f-mono); font-size: 12.5px; letter-spacing: 0.02em; color: var(--text-dim); position: relative; transition: color 0.3s var(--ease); }
.nav__links a::after { content: ''; position: absolute; left: 0; bottom: -6px; width: 0; height: 1px; background: var(--accent); transition: width 0.35s var(--ease); }
.nav__links a:hover { color: var(--text); } .nav__links a:hover::after { width: 100%; }

.nav__tools { display: flex; align-items: center; gap: 12px; }
.tool { display: inline-flex; align-items: center; justify-content: center; color: var(--text-dim); transition: color 0.3s var(--ease), border-color 0.3s var(--ease); }
.tool--lang { gap: 3px; font-family: var(--f-mono); font-size: 12px; font-weight: 500; border: 1px solid var(--line); border-radius: 100px; padding: 7px 11px; }
.tool--lang .tool--lang__b { color: var(--text-low); }
.tool--lang .tool--lang__sep { color: var(--text-low); }
html[lang="en"] .tool--lang .tool--lang__a { color: var(--text-low); }
html[lang="en"] .tool--lang .tool--lang__b { color: var(--text); }
.tool--lang:hover { border-color: var(--line-2); color: var(--text); }

.tool--theme { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; position: relative; }
.tool--theme svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; position: absolute; transition: opacity 0.3s var(--ease), transform 0.4s var(--ease); }
.tool--theme:hover { color: var(--text); border-color: var(--line-2); }
[data-theme="dark"] .tool--theme__sun { opacity: 1; transform: rotate(0); }
[data-theme="dark"] .tool--theme__moon { opacity: 0; transform: rotate(-90deg) scale(0.6); }
[data-theme="light"] .tool--theme__sun { opacity: 0; transform: rotate(90deg) scale(0.6); }
[data-theme="light"] .tool--theme__moon { opacity: 1; transform: rotate(0); }

.nav__cta { font-family: var(--f-mono); font-size: 12.5px; padding: 9px 18px; border: 1px solid var(--line-2); border-radius: 100px; color: var(--text); transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease); }
.nav__cta:hover { background: var(--accent); border-color: var(--accent); color: #0A0A0B; }

.nav__burger { display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; position: relative; }
.nav__burger span { position: absolute; left: 11px; width: 18px; height: 1.5px; background: var(--text); transition: transform 0.35s var(--ease), opacity 0.2s var(--ease); }
.nav__burger span:nth-child(1) { top: 16px; } .nav__burger span:nth-child(2) { top: 22px; }
body.menu-open .nav__burger span:nth-child(1) { transform: translateY(3px) rotate(45deg); }
body.menu-open .nav__burger span:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }

/* Menú móvil */
.menu {
  position: fixed; inset: 0; z-index: 999; background: color-mix(in srgb, var(--bg) 96%, transparent);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px;
  padding: 0 var(--pad);
  opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ease), visibility 0s 0.4s;
}
body.menu-open .menu { opacity: 1; visibility: visible; transition: opacity 0.4s var(--ease); }
.menu a { font-family: var(--f-display); font-size: clamp(2rem, 8vw, 3.2rem); font-weight: 600; letter-spacing: -0.02em; color: var(--text); padding: 6px 0; opacity: 0; transform: translateY(18px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), color 0.3s; }
body.menu-open .menu a { opacity: 1; transform: translateY(0); }
body.menu-open .menu a:nth-child(1) { transition-delay: 0.06s; }
body.menu-open .menu a:nth-child(2) { transition-delay: 0.11s; }
body.menu-open .menu a:nth-child(3) { transition-delay: 0.16s; }
body.menu-open .menu a:nth-child(4) { transition-delay: 0.21s; }
body.menu-open .menu a:nth-child(5) { transition-delay: 0.26s; }
body.menu-open .menu a:nth-child(6) { transition-delay: 0.31s; }
.menu a:hover { color: var(--accent); }
.menu .menu__cta { color: var(--accent); }

/* -------------------------------------------------------------
   9. BOTONES
   ------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--f-mono); font-size: 14px; font-weight: 500; padding: 14px 26px; border-radius: 100px; transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease); }
.btn--primary { background: var(--accent); color: #0A0A0B; }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px var(--accent-gl); background: var(--accent-soft); }
.btn--ghost { color: var(--text); border: 1px solid var(--line-2); }
.btn--ghost:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }
.btn--block { width: 100%; }
.btn--sm { padding: 10px 18px; font-size: 13px; }

/* -------------------------------------------------------------
   10. HERO
   ------------------------------------------------------------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 130px var(--pad) 90px; overflow: hidden; }
.hero__inner { position: relative; z-index: 3; max-width: var(--maxw); margin: 0 auto; width: 100%; }

.blueprint { position: absolute; right: max(2vw, calc((100vw - var(--maxw)) / 2)); bottom: 0; height: min(82vh, 760px); width: auto; opacity: 0.5; z-index: 1; pointer-events: none; }
.blueprint .bp__l { stroke: var(--bp-line); stroke-width: 1.4; fill: none; vector-effect: non-scaling-stroke; }
.blueprint .bp__shelf { stroke: var(--bp-faint); }
.blueprint .bp__sign { stroke: var(--accent); }
.blueprint .bp__node { fill: var(--accent); stroke: none; }
@media (max-width: 980px) { .blueprint { opacity: 0.26; height: 58vh; right: -6vw; } }

.hero__eyebrow { display: inline-flex; align-items: center; gap: 13px; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 30px; }
.hero__eyebrow::before { content: ''; width: 34px; height: 1px; background: var(--accent); }

.hero__title { font-family: var(--f-display); font-size: clamp(3.2rem, 10vw, 9rem); line-height: 0.92; font-weight: 700; letter-spacing: -0.04em; max-width: 16ch; }
.hero__title .line, .hero__cycle-wrap { display: block; }
.hero__cycle-wrap { overflow: hidden; }
.hero__cycle { display: inline-block; color: var(--accent); will-change: transform; text-shadow: 0 0 60px var(--accent-gl); }
.hero__title .char { display: inline-block; will-change: transform; }

.hero__sub { margin-top: 32px; max-width: 52ch; font-size: clamp(1rem, 1.6vw, 1.22rem); color: var(--text-dim); line-height: 1.55; }

.hero__meta { margin-top: 46px; display: flex; gap: clamp(28px, 5vw, 56px); flex-wrap: wrap; }
.hero__meta-item b { display: block; font-family: var(--f-display); font-weight: 600; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.03em; }
.hero__meta-item span { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-low); }

.hero__cta { margin-top: 48px; display: flex; gap: 14px; flex-wrap: wrap; }

.hero__scroll { position: absolute; bottom: 30px; left: var(--pad); display: flex; align-items: center; gap: 13px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-low); z-index: 3; }
.hero__scroll-line { width: 1px; height: 44px; background: linear-gradient(var(--accent), transparent); position: relative; overflow: hidden; }
.hero__scroll-line::after { content: ''; position: absolute; top: -50%; left: 0; width: 100%; height: 50%; background: var(--accent); animation: scrolldown 1.9s var(--ease-io) infinite; }
@keyframes scrolldown { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(320%); } }

/* -------------------------------------------------------------
   11. MANIFIESTO (scrollytelling)
   ------------------------------------------------------------- */
.manifesto { position: relative; }
.manifesto__chapter { min-height: 86vh; display: flex; flex-direction: column; justify-content: center; max-width: 46ch; margin: 0 auto; padding: 0 var(--pad); }
.manifesto__index { font-family: var(--f-mono); font-size: 13px; letter-spacing: 0.18em; color: var(--accent); margin-bottom: 22px; }
.manifesto__h { font-size: clamp(2rem, 4.6vw, 3.7rem); line-height: 1.04; margin-bottom: 22px; }
.manifesto__p { font-size: clamp(1rem, 1.5vw, 1.18rem); color: var(--text-dim); line-height: 1.6; }

/* -------------------------------------------------------------
   12. SECCIONES — COMUNES
   ------------------------------------------------------------- */
.sec { padding: clamp(90px, 13vh, 170px) 0; position: relative; }
.sec--band { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec__head { max-width: 780px; margin-bottom: clamp(48px, 7vw, 72px); }
.sec__index { font-family: var(--f-mono); font-size: 13px; letter-spacing: 0.18em; color: var(--accent); display: inline-flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.sec__index::before { content: ''; width: 28px; height: 1px; background: var(--accent); }
.sec__title { font-size: clamp(2.1rem, 5.2vw, 4.2rem); line-height: 1; letter-spacing: -0.035em; }
.sec__title em { font-style: normal; color: var(--accent); }
.sec__lead { margin-top: 24px; font-size: clamp(1rem, 1.5vw, 1.2rem); color: var(--text-dim); max-width: 62ch; }

/* -------------------------------------------------------------
   13. SECTORES (lista interactiva)
   ------------------------------------------------------------- */
.sectors { border-top: 1px solid var(--line); }
.sector { display: flex; align-items: center; gap: 24px; padding: clamp(18px, 3vw, 32px) 0; border-bottom: 1px solid var(--line); position: relative; transition: padding-left 0.45s var(--ease); overflow: hidden; }
.sector::before { content: ''; position: absolute; left: 0; top: 0; height: 100%; width: 0; background: var(--accent-lo); z-index: -1; transition: width 0.5s var(--ease); }
.sector__num { font-family: var(--f-mono); font-size: 13px; color: var(--text-low); width: 42px; flex: none; transition: color 0.4s var(--ease); }
.sector__name { font-family: var(--f-display); font-size: clamp(1.5rem, 4.6vw, 3.2rem); font-weight: 500; letter-spacing: -0.03em; color: var(--text-dim); transition: color 0.4s var(--ease); flex: 1; }
.sector__arrow { color: var(--accent); opacity: 0; transform: translateX(-16px); transition: all 0.4s var(--ease); font-size: 1.5rem; }
.sector:hover { padding-left: 26px; }
.sector:hover::before { width: 100%; }
.sector:hover .sector__name { color: var(--text); }
.sector:hover .sector__num { color: var(--accent); }
.sector:hover .sector__arrow { opacity: 1; transform: translateX(0); }

/* -------------------------------------------------------------
   14. NOSOTROS
   ------------------------------------------------------------- */
.about { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.about__aside { position: sticky; top: 116px; }
.about__figure { margin-top: 40px; }
.about__stat { display: block; font-family: var(--f-display); font-size: clamp(3rem, 7vw, 5.4rem); line-height: 1; color: var(--accent); letter-spacing: -0.04em; text-shadow: 0 0 50px var(--accent-gl); }
.about__stat-label { color: var(--text-dim); margin-top: 12px; max-width: 32ch; }
.about__trust { margin-top: 40px; padding: 26px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.about__trust b { font-family: var(--f-display); font-weight: 500; font-size: 1.05rem; display: block; margin-bottom: 14px; line-height: 1.3; }
.about__brands { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; font-family: var(--f-mono); font-size: 0.95rem; }
.about__brands span { color: var(--accent); font-weight: 600; }
.about__brands i { color: var(--text-low); font-style: normal; }
.about__brands em { color: var(--text-low); font-style: normal; font-size: 0.85rem; }
.about__p { font-size: 1.05rem; color: var(--text-dim); margin-bottom: 22px; }
.about__p--lead { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.2rem, 1.9vw, 1.5rem); line-height: 1.4; color: var(--text); letter-spacing: -0.01em; }

/* -------------------------------------------------------------
   15. SERVICIOS (tilt cards)
   ------------------------------------------------------------- */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; perspective: 1500px; }
.svc { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 36px 32px 34px; min-height: 360px; display: flex; flex-direction: column; transform-style: preserve-3d; transition: border-color 0.4s var(--ease), background 0.4s var(--ease), transform 0.5s var(--ease); overflow: hidden; }
.svc::before { content: ''; position: absolute; inset: 0; background: radial-gradient(540px circle at var(--mx, 50%) var(--my, 0%), var(--accent-lo), transparent 45%); opacity: 0; transition: opacity 0.4s var(--ease); pointer-events: none; }
.svc:hover { border-color: var(--accent-gl); }
.svc:hover::before { opacity: 1; }
.svc__num { font-family: var(--f-mono); font-size: 13px; letter-spacing: 0.18em; color: var(--accent); }
.svc__icon { width: 46px; height: 46px; margin: 26px 0 22px; }
.svc__icon svg { width: 100%; height: 100%; stroke: var(--accent); stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.svc__title { font-size: 1.6rem; margin-bottom: 14px; letter-spacing: -0.02em; }
.svc__desc { color: var(--text-dim); font-size: 0.98rem; line-height: 1.55; margin-bottom: 22px; }
.svc__list { list-style: none; display: flex; flex-direction: column; gap: 9px; margin-top: auto; }
.svc__list li { font-size: 0.88rem; color: var(--text-dim); padding-left: 18px; position: relative; }
.svc__list li::before { content: ''; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; background: var(--accent); }
.svc__plus { position: absolute; top: 30px; right: 30px; font-family: var(--f-mono); font-size: 1.4rem; color: var(--text-low); transition: color 0.3s var(--ease), transform 0.4s var(--ease); }
.svc:hover .svc__plus { color: var(--accent); transform: rotate(90deg); }

/* -------------------------------------------------------------
   16. PROCESO (timeline)
   ------------------------------------------------------------- */
.tl { position: relative; padding-left: 66px; }
.tl__rail { position: absolute; left: 23px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl__fill { position: absolute; inset: 0; background: var(--accent); transform: scaleY(0); transform-origin: top; box-shadow: 0 0 16px var(--accent-gl); }
.tl-step { position: relative; padding-bottom: 54px; }
.tl-step:last-child { padding-bottom: 0; }
.tl-step__dot { position: absolute; left: -66px; top: -2px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); display: flex; align-items: center; justify-content: center; font-family: var(--f-mono); font-size: 14px; color: var(--text-dim); transition: all 0.4s var(--ease); }
.tl-step.is-on .tl-step__dot { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 24px var(--accent-lo); }
.tl-step__h { font-size: clamp(1.3rem, 2.4vw, 1.8rem); margin-bottom: 10px; letter-spacing: -0.02em; }
.tl-step__p { color: var(--text-dim); max-width: 58ch; }

/* -------------------------------------------------------------
   17. CIFRAS
   ------------------------------------------------------------- */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.metric { border-top: 1px solid var(--line-2); padding-top: 24px; }
.metric b { font-family: var(--f-display); font-weight: 600; font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: -0.04em; display: block; line-height: 1; color: var(--accent); }
.metric span { display: block; margin-top: 14px; color: var(--text); font-size: 0.98rem; }
.metric small { display: block; margin-top: 5px; color: var(--text-low); font-size: 0.82rem; }

/* -------------------------------------------------------------
   18. PROYECTOS (galería asimétrica)
   ------------------------------------------------------------- */
.proj-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 22px; }
.media { position: relative; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); transition: transform 0.5s var(--ease), border-color 0.4s var(--ease); }
.media:hover { transform: translateY(-6px); border-color: var(--accent-gl); }
.media__plate { position: absolute; inset: 0; background: linear-gradient(135deg, var(--surface-2), var(--surface)); }
.media__plate::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 30px 30px; }
.media::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, color-mix(in srgb, var(--accent) 16%, transparent), transparent 55%); opacity: 0; transition: opacity 0.4s var(--ease); }
.media:hover::before { opacity: 1; }
.media__cap { position: absolute; left: 18px; bottom: 16px; z-index: 2; display: flex; align-items: center; gap: 11px; }
.media__tag { font-family: var(--f-mono); font-size: 11px; color: var(--accent); border: 1px solid var(--accent-gl); border-radius: 4px; padding: 2px 7px; }
.media__txt { font-size: 13px; color: var(--text); }
.media--a { grid-column: span 7; aspect-ratio: 16 / 10; }
.media--b { grid-column: span 5; aspect-ratio: 16 / 10; }
.media--c { grid-column: span 5; aspect-ratio: 16 / 10; }
.media--d { grid-column: span 7; aspect-ratio: 16 / 10; }

/* -------------------------------------------------------------
   19. COMPROMISOS
   ------------------------------------------------------------- */
.commit-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.commit { border: 1px solid var(--line); border-radius: var(--r); padding: 30px 26px; background: var(--surface); transition: border-color 0.4s var(--ease), transform 0.4s var(--ease); }
.commit:hover { border-color: var(--accent-gl); transform: translateY(-5px); }
.commit__k { display: block; font-family: var(--f-display); font-size: 2.5rem; color: var(--accent); letter-spacing: -0.04em; line-height: 1; margin-bottom: 16px; }
.commit__t { font-family: var(--f-display); font-size: 1.12rem; font-weight: 500; margin-bottom: 8px; }
.commit__p { color: var(--text-dim); font-size: 0.92rem; line-height: 1.5; }

/* -------------------------------------------------------------
   20. FAQ
   ------------------------------------------------------------- */
.faq { max-width: 920px; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q { width: 100%; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 0; font-family: var(--f-display); font-size: clamp(1.1rem, 2vw, 1.5rem); font-weight: 500; color: var(--text); letter-spacing: -0.01em; transition: color 0.3s var(--ease); }
.faq__q:hover { color: var(--accent); }
.faq__icon { flex: none; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; position: relative; transition: all 0.4s var(--ease); }
.faq__icon::before, .faq__icon::after { content: ''; position: absolute; top: 50%; left: 50%; width: 13px; height: 1.5px; background: var(--accent); transform: translate(-50%, -50%); transition: transform 0.4s var(--ease); }
.faq__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq__item.is-open .faq__icon { border-color: var(--accent); background: var(--accent-lo); }
.faq__item.is-open .faq__icon::after { transform: translate(-50%, -50%) rotate(0); }
.faq__a { overflow: hidden; height: 0; transition: height 0.42s var(--ease); }
.faq__a-inner { padding: 0 0 26px; color: var(--text-dim); max-width: 70ch; line-height: 1.6; }

/* -------------------------------------------------------------
   21. CONTACTO
   ------------------------------------------------------------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 80px); align-items: start; }
.contact__row { padding: 20px 0; border-top: 1px solid var(--line); }
.contact__row small { display: block; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-low); margin-bottom: 8px; }
.contact__row a, .contact__row p { font-family: var(--f-display); font-size: 1.15rem; color: var(--text); }
.contact__row a { transition: color 0.3s var(--ease); }
.contact__row a:hover { color: var(--accent); }
.contact__addr { color: var(--text-dim) !important; font-family: var(--f-body) !important; font-size: 0.95rem !important; line-height: 1.5; margin-bottom: 10px; }
.contact__addr b { color: var(--text); font-weight: 500; }

.form { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(26px, 4vw, 42px); box-shadow: var(--shadow); }
.field { margin-bottom: 20px; }
.field label { display: block; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 9px; }
.field input, .field textarea { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px 15px; color: var(--text); font-family: var(--f-body); font-size: 1rem; transition: border-color 0.3s var(--ease); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 120px; }
.field.is-invalid input, .field.is-invalid textarea { border-color: #ff5555; }
.field__err { display: none; color: #ff7a7a; font-size: 0.8rem; margin-top: 7px; }
.field.is-invalid .field__err { display: block; }
.field--hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__note { margin-top: 16px; font-size: 0.92rem; line-height: 1.5; display: none; }
.form__note.is-ok { display: block; color: var(--accent); }
.form__note.is-err { display: block; color: #ff7a7a; }

/* -------------------------------------------------------------
   22. FOOTER
   ------------------------------------------------------------- */
.footer { background: var(--bg-2); border-top: 1px solid var(--line); padding: 78px 0 38px; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 44px; }
.footer__logo { display: flex; align-items: center; gap: 11px; font-family: var(--f-display); font-weight: 700; font-size: 26px; letter-spacing: 0.02em; }
.footer__logo .nav__mark { width: 24px; height: 24px; }
.footer__brand p { color: var(--text-dim); max-width: 34ch; margin-top: 16px; font-size: 14px; line-height: 1.6; }
.footer__col h4 { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-low); margin-bottom: 16px; font-weight: 500; }
.footer__col a, .footer__col p { display: block; color: var(--text-dim); font-size: 14px; margin-bottom: 9px; line-height: 1.45; transition: color 0.3s var(--ease); }
.footer__col a:hover { color: var(--accent); }
.footer__legal { margin-top: 58px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; color: var(--text-low); font-size: 12.5px; font-family: var(--f-mono); }
.footer__legal-links { display: flex; gap: 22px; }
.footer__legal-links a, .footer__legal-btn { color: var(--text-low); font-family: var(--f-mono); font-size: 12.5px; transition: color 0.3s var(--ease); }
.footer__legal-links a:hover, .footer__legal-btn:hover { color: var(--accent); }

/* -------------------------------------------------------------
   23. COOKIE BANNER
   ------------------------------------------------------------- */
.cookies { position: fixed; left: var(--pad); right: var(--pad); bottom: 20px; z-index: 1600; max-width: 560px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; padding: 18px 22px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 18px; flex-wrap: wrap; opacity: 0; transform: translateY(20px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.cookies:not([hidden]) { display: flex; }
.cookies.is-visible { opacity: 1; transform: translateY(0); }
.cookies p { font-size: 13px; color: var(--text-dim); line-height: 1.5; flex: 1; min-width: 240px; }
.cookies__actions { display: flex; align-items: center; gap: 16px; }
.cookies__link { font-family: var(--f-mono); font-size: 12px; color: var(--text-dim); transition: color 0.3s var(--ease); }
.cookies__link:hover { color: var(--accent); }

/* -------------------------------------------------------------
   24. REVEALS — estados iniciales (solo con JS+FX activos)
   ------------------------------------------------------------- */
html.js .reveal { opacity: 0; transform: translateY(34px); }
html.js .hero__title .char { opacity: 0; }
html.js .hero__cycle { opacity: 0; }
/* Si los efectos no cargan (CDN caído) o no hay JS: todo visible. */
html.fx-failed .reveal,
html.fx-failed .hero__title .char,
html.fx-failed .hero__cycle { opacity: 1 !important; transform: none !important; }

/* -------------------------------------------------------------
   25. RESPONSIVE
   ------------------------------------------------------------- */
@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__cta { display: none; }
  .nav__burger { display: block; }
  .about { grid-template-columns: 1fr; }
  .about__aside { position: static; }
  .svc-grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .commit-grid { grid-template-columns: 1fr 1fr; }
  .contact { grid-template-columns: 1fr; }
  .proj-grid { grid-template-columns: 1fr; }
  .media--a, .media--b, .media--c, .media--d { grid-column: span 1; }
}
@media (max-width: 560px) {
  .metrics { grid-template-columns: 1fr; }
  .commit-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { width: 100%; }
  .footer__legal { flex-direction: column; }
}

/* -------------------------------------------------------------
   25b. PÁGINAS LEGALES
   ------------------------------------------------------------- */
.legal { padding: 150px 0 100px; }
.legal__head { max-width: 780px; margin-bottom: 44px; }
.legal__head h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -0.03em; }
.legal__updated { font-family: var(--f-mono); font-size: 12px; color: var(--text-low); margin-top: 14px; letter-spacing: 0.08em; text-transform: uppercase; }
.legal__body { max-width: 780px; }
.legal__body h2 { font-size: 1.4rem; margin: 40px 0 14px; letter-spacing: -0.02em; }
.legal__body p, .legal__body li { color: var(--text-dim); line-height: 1.7; font-size: 1rem; }
.legal__body p { margin-bottom: 14px; }
.legal__body ul { padding-left: 20px; margin-bottom: 16px; }
.legal__body li { margin-bottom: 8px; }
.legal__body a { color: var(--accent); }
.legal__body strong { color: var(--text); font-weight: 600; }
.legal-mark { color: var(--accent); font-family: var(--f-mono); font-size: 0.85em; background: var(--accent-lo); border: 1px solid var(--accent-gl); border-radius: 4px; padding: 1px 6px; }
.legal-back { margin-top: 52px; }

/* -------------------------------------------------------------
   26. MOVIMIENTO REDUCIDO
   ------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  html.js .reveal, html.js .hero__title .char, html.js .hero__cycle { opacity: 1 !important; transform: none !important; }
  #preloader { display: none !important; }
  .scene__orb, .hero__scroll-line::after { animation: none !important; }
  .cursor { display: none !important; }
  body { cursor: auto !important; }
}
