/* ============================================================
   TIGERGRAFIX — Design System (definido UNA vez, sección 0.2)
   Naranja sampleado a resolución completa del wordmark: #FA5105
   ============================================================ */
:root {
  --bg:        #0a0908;
  --ink:       #f7f4f0;
  --amber:     #E89A2E;
  --orange:    #FA5105;   /* sampleado de TIGERGRAFIX (9).png — 23,560 px exactos */
  --black:     #111111;
  --paper:     #f7f4f0;
  --line:      rgba(247, 244, 240, 0.12);
  --muted:     rgba(247, 244, 240, 0.62);

  --font-display: "Rajdhani", "Arial Narrow", sans-serif;
  --font-body:    "Inter", -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 72px;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6.5rem;

  /* Hero split */
  --p: 0;                    /* progreso del scrub 0→1, lo escribe main.js */
  --split-dist: 34vw;        /* distancia de separación horizontal (desktop) */
  --split-dist-v: 42svh;     /* distancia vertical (mobile) */

  /* Umbrales de aparición del contenido central (inicio / duración sobre --p) */
  --tk: 0.25; --dk: 0.25;   /* kicker */
  --th: 0.32; --dh: 0.30;   /* hook */
  --ts: 0.50; --ds: 0.28;   /* sub */
  --tc: 0.62; --dc: 0.28;   /* CTAs */
}

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

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  background: var(--bg);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---- Temas por sección (sección 5.2) — el fondo del body transiciona suave ---- */
body,
body[data-theme="dark"] {
  --t-bg: var(--bg);
  --t-ink: var(--ink);
  --t-muted: rgba(247, 244, 240, 0.62);
  --t-line: rgba(247, 244, 240, 0.12);
  --t-glass: rgba(10, 9, 8, 0.55);
}
body[data-theme="light"] {
  --t-bg: var(--paper);
  --t-ink: var(--black);
  --t-muted: rgba(17, 17, 17, 0.62);
  --t-line: rgba(17, 17, 17, 0.14);
  --t-glass: rgba(247, 244, 240, 0.65);
}
body[data-theme="amber"] {
  --t-bg: var(--amber);
  --t-ink: var(--black);
  --t-muted: rgba(17, 17, 17, 0.68);
  --t-line: rgba(17, 17, 17, 0.2);
  --t-glass: rgba(232, 154, 46, 0.65);
}

body {
  background: var(--t-bg);
  transition: background-color 0.6s ease;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ============ NAV ============ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  /* Debe quedar por encima de .mobile-menu (z-index 200) — el z-index:210 del
     propio .nav-burger no basta: un hijo no puede superar el stacking context
     de su padre, así que sin esto el overlay del menú fullscreen tapaba la
     barra completa (logo + botón hamburguesa/X quedaban invisibles). */
  z-index: 220;
  height: var(--nav-h);
  /* Grid de 3 columnas (no flex + space-between): el menú central queda
     realmente centrado en la página aunque el isotipo (izquierda) y el
     bloque de idioma+CTA (derecha) tengan anchos distintos. */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-3);
  padding-inline: clamp(1rem, 4vw, 3rem);
  transition: background 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
  border-bottom: 1px solid transparent;
}
/* Glass solo al hacer scroll (sección 5) — con fallback sólido (gotcha B.12);
   el color del glass y del texto siguen el tema de la sección activa (5.1/5.2) */
.nav.is-scrolled {
  background: var(--t-bg);
  border-bottom-color: var(--t-line);
}
@supports (backdrop-filter: blur(16px)) {
  .nav.is-scrolled {
    background: var(--t-glass);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
  }
}

/* Isotipo TG en el nav (sección 5.1): invisible arriba del Hero en desktop
   (el protagonista es el wordmark gigante), visible al scrollear; siempre visible
   en mobile. Tintado vía mask para seguir el tema de la sección activa. */
.nav-iso {
  display: block;
  /* Columna fija (no auto-placement): si .nav-links se oculta en mobile
     (display:none), el grid no debe reacomodar a .nav-right en su lugar. */
  grid-column: 1;
  justify-self: start;
  width: 34px;
  height: 36px;
  opacity: 0;
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
  transform: translateY(-4px);
}
.nav.is-scrolled .nav-iso { opacity: 1; transform: none; }
.iso-mark {
  display: block;
  width: 100%;
  height: 100%;
  background-color: var(--t-ink);
  transition: background-color 0.6s ease;
  -webkit-mask: url("assets/isotipo-white.webp") no-repeat center / contain;
  mask: url("assets/isotipo-white.webp") no-repeat center / contain;
}

.nav-links {
  grid-column: 2;
  display: flex;
  gap: var(--space-3);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--t-muted);
}
.nav-links a { transition: color 0.25s; }
.nav-links a:hover { color: var(--t-ink); }

.nav-right { grid-column: 3; display: flex; justify-self: end; align-items: center; gap: var(--space-3); }

.lang-switch {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  display: flex;
  gap: 0.4rem;
  color: var(--t-muted);
}
.lang-switch .is-active { color: var(--t-ink); }

.nav-cta {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  background: var(--orange);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: transform 0.25s var(--ease-out), background 0.25s;
}
.nav-cta:hover { background: #ff6a1f; transform: translateY(-2px); }
/* Sobre fondo ámbar el naranja pierde contraste — CTA en negro (paleta de marca) */
body[data-theme="amber"] .nav-cta { background: var(--black); }
body[data-theme="amber"] .nav-cta:hover { background: #000; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  /* Mobile: isotipo siempre visible (sección 5.1) */
  .nav-iso { opacity: 1; transform: none; }
  /* El padding-inline del nav (pensado para el logo/menú desktop) dejaba
     un hueco visible entre el botón hamburguesa y el borde — quitarlo solo
     del lado derecho para que quede totalmente pegado a la esquina. */
  .nav { padding-inline-end: 0.5rem; }
}

/* ============================================================
   HERO — SPLIT REVEAL (sección 4)
   Estado base (sin JS) = estado final: separado + hook visible.
   html.js re-liga todo al progreso --p que escribe main.js.
   ============================================================ */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
}
html.js .hero {
  height: 230vh;   /* recorrido del scrub */
}

.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: grid;
  place-items: center;
  overflow: clip;
}

/* Glow de marca reactivo al mouse (sección 4.3) — responde al usuario, no es
   decoración estática; en touch queda fijo al centro. Sutil a propósito. */
.hero-sticky::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(30% 26% at var(--mx, 50%) var(--my, 52%), rgba(250, 81, 5, 0.11), transparent 70%);
  pointer-events: none;
}

/* Isotipo TG como watermark apenas perceptible (sección 4.3: opacidad 4-8%) */
.hero-watermark {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(44vh, 380px);
  opacity: 0.04;
  pointer-events: none;
  user-select: none;
}

/* ---- Wordmark partido — texto HTML real (sección 4.2) ---- */
.hero-words {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  pointer-events: none;
}
.hero-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4rem, 13vw, 12rem);
  line-height: 0.9;
  letter-spacing: 0.01em;
  will-change: transform;
}
.hero-word--tiger  { color: var(--orange); }
.hero-word--grafix { color: var(--ink); }   /* sobre oscuro: ink, no negro (sección 4.2) */

/* Sin JS: ya separados */
.hero-word--tiger  { transform: translateX(calc(-1 * var(--split-dist))); }
.hero-word--grafix { transform: translateX(var(--split-dist)); }

/* Con JS: ligados al progreso del scrub */
html.js .hero-word--tiger  { transform: translateX(calc(var(--p) * -1 * var(--split-dist))); }
html.js .hero-word--grafix { transform: translateX(calc(var(--p) * var(--split-dist))); }

/* ---- Centro: hook + sub + CTAs ---- */
.hero-center {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: min(92vw, 860px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: clamp(0.7rem, 1.1vw, 0.82rem);
  letter-spacing: 0.22em;
  color: var(--amber);
}
/* Micro-detalle de precisión (sección 4.3): línea corta y exacta bajo el kicker */
.hero-kicker::after {
  content: "";
  display: block;
  width: 32px;
  height: 2px;
  background: var(--orange);
  margin: 0.7rem auto 0;
}

.hero-hook {
  font-family: var(--font-display);
  font-weight: 700;
  /* Copy más larga que el hook corto original — tamaño y ancho ajustados
     para que quepa en 2-3 líneas en el hueco del split, no 5-6. */
  font-size: clamp(1.7rem, 3.6vw, 2.9rem);
  line-height: 1.12;
  text-wrap: balance;
  max-width: 30ch;
}

.hero-sub {
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  font-weight: 300;
  color: var(--muted);
  max-width: 58ch;
  text-wrap: pretty;
}

.hero-ctas {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: center;
  margin-top: var(--space-1);
}

/* Aparición escalonada ligada a --p (cada capa entra un poco después) */
html.js .hero-kicker {
  opacity: clamp(0, (var(--p) - var(--tk)) / var(--dk), 1);
  transform: translateY(calc((1 - clamp(0, (var(--p) - var(--tk)) / var(--dk), 1)) * 18px));
}
html.js .hero-hook {
  opacity: clamp(0, (var(--p) - var(--th)) / var(--dh), 1);
  transform: scale(calc(0.94 + clamp(0, (var(--p) - var(--th)) / var(--dh), 1) * 0.06))
             translateY(calc((1 - clamp(0, (var(--p) - var(--th)) / var(--dh), 1)) * 24px));
}
html.js .hero-sub {
  opacity: clamp(0, (var(--p) - var(--ts)) / var(--ds), 1);
  transform: translateY(calc((1 - clamp(0, (var(--p) - var(--ts)) / var(--ds), 1)) * 20px));
}
html.js .hero-ctas {
  opacity: clamp(0, (var(--p) - var(--tc)) / var(--dc), 1);
  transform: translateY(calc((1 - clamp(0, (var(--p) - var(--tc)) / var(--dc), 1)) * 20px));
}
/* Los CTA no son clicables hasta que el hero está abierto (evita clics fantasma) */
html.js .hero-center { pointer-events: none; }
html.js .hero.is-open .hero-center { pointer-events: auto; }

/* ---- Botones — sólidos, nunca glass (sección 5) ---- */
.btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  padding: 0.85rem 1.8rem;
  border-radius: 10px;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s var(--ease-out), background 0.25s, border-color 0.25s;
  /* Reset de chrome nativo — el trigger de Cal.com (sección 8.1) es <button>, no <a> */
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: none;
  cursor: pointer;
}
.btn--primary { background: var(--orange); color: #fff; }
.btn--primary:hover { background: #ff6a1f; transform: translateY(-2px); }
.btn--ghost {
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

/* ---- Cue de scroll ---- */
.hero-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 2;
}
html.js .hero-cue { opacity: calc(1 - var(--p) * 3); }
html:not(.js) .hero-cue { display: none; }

.hero-cue-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: var(--muted);
}
.hero-cue-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(var(--ink), transparent);
  animation: cueDrop 1.8s var(--ease-out) infinite;
  transform-origin: top;
}
@keyframes cueDrop {
  0%   { transform: scaleY(0); }
  45%  { transform: scaleY(1); }
  100% { transform: scaleY(1); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-cue-line { animation: none; }
}

/* ---- Mobile: split vertical (sección 4 — TIGER arriba, GRAFIX abajo) ---- */
@media (max-width: 700px) {
  /* El contenido espera a que las palabras despejen su zona (evita colisión a medio scrub).
     El kicker entra al final: es la línea más alta y TIGER la roza casi todo el recorrido. */
  :root {
    --tk: 0.85; --dk: 0.12;
    --th: 0.72; --dh: 0.2;
    --ts: 0.8;  --ds: 0.15;
    --tc: 0.85; --dc: 0.15;
  }

  .hero-words { flex-direction: column; }
  .hero-word { font-size: clamp(3.4rem, 17.5vw, 6rem); }

  .hero-word--tiger  { transform: translateY(calc(-1 * var(--split-dist-v))); }
  .hero-word--grafix { transform: translateY(var(--split-dist-v)); }

  html.js .hero-word--tiger  { transform: translateY(calc(var(--p) * -1 * var(--split-dist-v))); }
  html.js .hero-word--grafix { transform: translateY(calc(var(--p) * var(--split-dist-v))); }

  /* Copy más larga (headline completa, no un hook corto) — más chica en mobile
     para no llenar toda la pantalla con texto dentro del hueco del split. */
  .hero-hook { font-size: clamp(1.4rem, 6.4vw, 1.9rem); max-width: 24ch; }
  .hero-sub  { font-size: 0.9rem; max-width: 34ch; }
  .btn { width: 100%; }
  .hero-ctas { width: 100%; flex-direction: column; }
}

/* ============================================================
   LAYOUT BASE DE SECCIONES
   ============================================================ */
.container {
  width: min(100% - 2.5rem, 1180px);
  margin-inline: auto;
}
.section {
  padding-block: clamp(4rem, 9vw, 7.5rem);
  position: relative;
}
section[id] { scroll-margin-top: 84px; }

.kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: var(--amber);
  margin-bottom: var(--space-2);
}
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  line-height: 1.06;
  text-wrap: balance;
  max-width: 22ch;
  /* Antes iba directo a la grilla; ahora casi siempre le sigue un .section-lead,
     así que el espacio grande se movió a ese párrafo (ver abajo). */
  margin-bottom: clamp(1rem, 2.5vw, 1.5rem);
}
/* Párrafo introductorio entre el título de sección y su contenido (grilla, pasos, etc.) */
.section-lead {
  color: var(--muted);
  font-weight: 300;
  font-size: 1rem;
  max-width: 62ch;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  text-wrap: pretty;
}
.section--light .section-lead { color: rgba(17, 17, 17, 0.65); }
/* Botón "Explorar proyectos" en Portafolio — sube al lead, deja aire antes de la grilla */
.portfolio-cta { margin-top: -1.5rem; margin-bottom: clamp(2rem, 5vw, 3rem); }

/* ============ INTRODUCCIÓN (sección nueva, sin kicker) ============ */
.intro { text-align: center; }
.intro-inner {
  max-width: 760px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}
.intro-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1.16;
  text-wrap: balance;
  max-width: 24ch;
}
.intro-text {
  color: var(--muted);
  font-weight: 300;
  font-size: clamp(0.95rem, 1.3vw, 1.05rem);
  max-width: 60ch;
  text-wrap: pretty;
}

/* ---- Reveal on scroll (IO threshold bajo + red de seguridad en JS) ---- */
html.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease-out) var(--d, 0s),
              transform 0.7s var(--ease-out) var(--d, 0s);
}
html.js .reveal.is-visible { opacity: 1; transform: none; }
/* Defensa (gotcha A.4.5): un elemento con reveal + split nunca queda invisible */
html.js .reveal[data-split] { opacity: 1; transform: none; }

/* ---- Split-text en titulares (solo h2, nunca párrafos — sección 7) ---- */
html.js [data-split] .split-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.55em);
  transition: opacity 0.55s var(--ease-out) var(--wd, 0s),
              transform 0.55s var(--ease-out) var(--wd, 0s);
}
html.js [data-split].is-visible .split-word { opacity: 1; transform: none; }

/* ============ TRUST BAR ============ */
.trust {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(2.5rem, 5vw, 4rem);
}
.trust-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(3rem, 10vw, 8rem);
}
.trust-item { text-align: center; }
.trust-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
}
.trust-label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-wrap: balance;
}
@media (max-width: 700px) {
  .trust-grid { gap: 2.5rem; }
}

/* ============ MARQUEE (CSS puro — sección 4.1) ============ */
.marquee {
  overflow: clip;
  border-block: 1px solid var(--line);
  padding-block: 0.9rem;
  background: var(--amber);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 26s linear infinite;
}
/* Tamaño de titular (sección 4.1): se lee como frase en movimiento, no etiqueta */
.marquee-track span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  letter-spacing: 0.06em;
  color: var(--black);
  white-space: nowrap;
  line-height: 1.15;
}
@keyframes marqueeScroll {
  to { transform: translateX(-50%); }
}

/* ============ PILLARS ============ */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}
.glass-card {
  /* Fallback sólido primero (gotcha B.12) */
  background: rgba(247, 244, 240, 0.05);
  border: 1px solid var(--line);
  border-radius: 20px;
  min-width: 0;
}
@supports (backdrop-filter: blur(16px)) {
  .glass-card {
    background: rgba(247, 244, 240, 0.04);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
  }
}
.pillar {
  position: relative;
  /* Sin esto, el <pre> de .code-block (white-space:pre, no puede envolver texto)
     fuerza su ancho intrínseco como mínimo del grid item — la tarjeta se
     desborda del viewport en mobile y el texto se corta sin scrollbar visible. */
  min-width: 0;
  padding: clamp(1.5rem, 3vw, 2.2rem);
  transition: transform 0.35s var(--ease-out), border-color 0.35s;
}
@media (hover: hover) and (pointer: fine) {
  .pillar:hover { transform: translateY(-6px); border-color: rgba(250, 81, 5, 0.45); }
}
.pillar-num {
  position: absolute;
  top: 1.4rem;
  right: 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}
.pillar-icon {
  width: 34px;
  height: 34px;
  color: var(--orange);
  margin-bottom: var(--space-2);
}
.pillar h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 0.6rem;
}
.pillar p {
  color: var(--muted);
  font-size: 0.97rem;
  font-weight: 300;
}
.pillar p + p { margin-top: 0.7rem; }

/* Bloque de código (sección 4.1) — el propio <pre> hace scroll horizontal
   (no wrap) sin forzar el ancho de la tarjeta; ver min-width:0 en .pillar. */
.code-block {
  margin-top: var(--space-3);
  max-width: 100%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--ink);
  overflow-x: auto;
}
.code-block .c { color: rgba(247, 244, 240, 0.4); }
.code-block .k { color: var(--amber); }
.code-block .s { color: #9ecb7f; }
.code-block .n { color: #7fb8cb; }

@media (max-width: 860px) {
  .pillars-grid { grid-template-columns: 1fr; }
}

/* ---- Sección con tema claro (5.2): pilares sobre --paper, tinta negra ---- */
.section--light { color: var(--black); }
.section--light .kicker { color: var(--orange); }
.section--light .section-title { color: var(--black); }
.section--light .glass-card {
  background: rgba(17, 17, 17, 0.04);
  border-color: rgba(17, 17, 17, 0.12);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.section--light .pillar h3 { color: var(--black); }
.section--light .pillar p { color: rgba(17, 17, 17, 0.65); }
.section--light .pillar-num { color: rgba(17, 17, 17, 0.45); }
/* El bloque de código conserva su fondo de editor oscuro sobre la sección clara */
.section--light .code-block {
  background: #14120f;
  border-color: rgba(17, 17, 17, 0.35);
  color: var(--paper);
}

/* ============ PROCESS ============ */
.process-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  counter-reset: step;
}
.process-step {
  border-top: 1px solid var(--line);
  padding-top: var(--space-3);
}
.step-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--orange);
}
.process-step h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0.6rem 0 0.5rem;
}
.process-step p {
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--muted);
}
@media (max-width: 860px) {
  .process-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .process-steps { grid-template-columns: 1fr; }
}

/* ============ WORK ============ */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
.work-card {
  padding: clamp(1.5rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  transition: transform 0.35s var(--ease-out), border-color 0.35s;
}
@media (hover: hover) and (pointer: fine) {
  .work-card:hover { transform: translateY(-6px); border-color: rgba(232, 154, 46, 0.5); }
}
.work-card .pillar-icon { margin-bottom: 0.2rem; }
.work-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
}
.work-card p {
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 300;
}
.work-card p:last-of-type { flex-grow: 1; }
.work-card p + p { margin-top: -0.3rem; }
/* Link "Ver proyecto" — texto con flecha, no botón sólido (es un link terciario
   dentro de la tarjeta, no un CTA primario — sección 5 del brief). */
.work-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.3rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--orange);
  transition: gap 0.25s var(--ease-out);
}
.work-card-link:hover { gap: 0.65rem; }
@media (max-width: 860px) {
  .work-grid { grid-template-columns: 1fr; }
}

/* ============ ABOUT ============ */
.about { overflow: clip; }
.about-watermark {
  position: absolute;
  right: -8%;
  top: 50%;
  transform: translateY(-50%);
  width: min(52vw, 640px);
  opacity: 0.04;
  pointer-events: none;
}
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  position: relative;
}
.about-text {
  color: var(--muted);
  font-weight: 300;
  max-width: 52ch;
}
.about-text + .about-text { margin-top: 1rem; }
.principles {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.principles li {
  border-bottom: 1px solid var(--line);
  padding-bottom: var(--space-3);
  display: flex;
  gap: 1rem;
  align-items: baseline;
}
.principle-num {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--orange);
  flex-shrink: 0;
}
.principles li strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}
.principles li p {
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--muted);
}
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* ============ PORTFOLIO — auto-scroll en hover/tap (sección 8.2) ============ */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3) var(--space-3);
}
.portfolio-frame {
  position: relative;
  display: block;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(247, 244, 240, 0.04);
  overflow: clip;
  cursor: pointer;
  transition: transform 0.35s var(--ease-out), border-color 0.35s;
}
@media (hover: hover) and (pointer: fine) {
  .portfolio-frame:hover { transform: translateY(-4px); border-color: rgba(250, 81, 5, 0.45); }
}
/* Barra "browser chrome" con puntos de control */
.frame-chrome {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.frame-chrome i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(247, 244, 240, 0.25);
}
.frame-chrome i:first-child { background: rgba(250, 81, 5, 0.6); }
.frame-viewport {
  position: relative;
  height: 420px;
  overflow: hidden;
}
.frame-viewport img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  transform: translateY(0);
  transition: transform 1.2s var(--ease-out); /* regreso suave arriba */
  will-change: transform;
}
.portfolio-frame:hover .frame-viewport img,
.portfolio-frame.is-active .frame-viewport img {
  transform: translateY(var(--scroll-distance, -60%));
  transition: transform var(--scroll-dur, 5s) linear; /* recorrido tipo scroll */
}
/* Indicador de tap — solo dispositivos táctiles (sección 8.2) */
.portfolio-hint {
  display: none;
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(10, 9, 8, 0.7);
  color: var(--ink);
  place-items: center;
  pointer-events: none;
}
@media (hover: none) {
  .portfolio-hint { display: grid; }
}
.portfolio-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem;
  margin-top: 0.8rem;
}
.portfolio-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}
.portfolio-url {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}
.portfolio-desc {
  margin-top: 0.35rem;
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--muted);
  max-width: 40ch;
}
@media (max-width: 1024px) {
  .portfolio-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .portfolio-grid { grid-template-columns: 1fr; }
  .frame-viewport { height: 380px; }
}

/* ============ FINAL CTA — tema ámbar (5.2): el momento de impacto ============ */
.cta {
  text-align: center;
  color: var(--black);
}
.cta .kicker { color: var(--black); }
.cta-title { color: var(--black); }
.cta .btn--primary { background: var(--black); color: var(--paper); }
.cta .btn--primary:hover { background: #000; }
.cta .btn--ghost { border-color: rgba(17, 17, 17, 0.45); color: var(--black); }
.cta .btn--ghost:hover { border-color: var(--black); }
.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}
.cta-title {
  font-family: var(--font-display);
  font-weight: 700;
  /* Título más largo que el original ("Ready to stop going unnoticed?") —
     mismo ajuste que .hero-hook: más ancho, tamaño tope más chico. */
  font-size: clamp(1.9rem, 4.4vw, 3.2rem);
  line-height: 1.1;
  text-wrap: balance;
  max-width: 26ch;
}
.cta-sub {
  color: rgba(17, 17, 17, 0.72);
  font-weight: 300;
  max-width: 48ch;
  text-wrap: pretty;
}
.cta-disclaimer {
  color: rgba(17, 17, 17, 0.58);
  font-size: 0.85rem;
  max-width: 42ch;
  margin-top: -0.5rem;
  text-wrap: pretty;
}
.cta-buttons {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: center;
}
.btn--lg { font-size: 1.15rem; padding: 1rem 2.2rem; }
.cta-email {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: rgba(17, 17, 17, 0.7);
  border-bottom: 1px solid rgba(17, 17, 17, 0.3);
  padding-bottom: 2px;
  transition: color 0.25s, border-color 0.25s;
}
.cta-email:hover { color: var(--black); border-color: var(--black); }
@media (max-width: 560px) {
  .cta-buttons { width: 100%; flex-direction: column; }
  .cta-buttons .btn { width: 100%; }
}

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--line);
  padding-block: var(--space-5) var(--space-3);
}
/* Wordmark de texto — usado solo en el footer (el nav lleva isotipo, sección 5.1) */
.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  line-height: 1;
}
.nav-logo-tiger  { color: var(--orange); }
.nav-logo-grafix { color: var(--ink); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
}
.footer-brand p {
  margin-top: 0.8rem;
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--muted);
}
.footer-links, .footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.footer-links a:hover, .footer-contact a:hover { color: var(--ink); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: var(--space-3);
  font-size: 0.78rem;
  color: rgba(247, 244, 240, 0.4);
  font-family: var(--font-mono);
}
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-3); }
}

/* ============ NAV MOBILE (hamburguesa + menú fullscreen glass) ============ */
.nav-burger {
  display: none;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 7px;
  z-index: 210;
}
.nav-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--t-ink);
  transition: transform 0.3s var(--ease-out), background-color 0.6s ease;
}
body.menu-open .nav-burger span:first-child { transform: translateY(4.5px) rotate(45deg); }
body.menu-open .nav-burger span:last-child  { transform: translateY(-4.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-5) var(--space-3) var(--space-4);
  background: rgba(10, 9, 8, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-out);
}
@supports (backdrop-filter: blur(24px)) {
  .mobile-menu {
    background: rgba(10, 9, 8, 0.75);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
  }
}
body.menu-open .mobile-menu { opacity: 1; pointer-events: auto; }
body.menu-open { overflow: hidden; }

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}
.mobile-menu-links a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
}
.mobile-menu-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  width: min(100%, 320px);
}
.mobile-menu-foot .btn { width: 100%; }
/* El overlay del menú siempre es oscuro sin importar el tema de la sección
   detrás — fijar el contraste aquí en vez de heredar --t-muted (que podía
   quedar casi invisible si la sección debajo estaba en tema claro). */
.mobile-menu-foot .lang-switch {
  color: rgba(247, 244, 240, 0.65);
  font-size: 0.9rem;
  font-weight: 500;
}
.mobile-menu-foot .lang-switch .is-active { color: var(--ink); }

@media (max-width: 860px) {
  .nav-burger { display: flex; }
}

/* ============ Burbuja de WhatsApp (sección 8.1) ============ */
.wa-bubble {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s var(--ease-out);
}
.wa-bubble:hover { transform: translateY(-3px) scale(1.05); }
