/* ============================================================
   BONI ESTUDIO — Editorial Dark + Terracota
   Design system tokens, base, layout, components
   ============================================================ */

/* ---------- TOKENS ---------- */
:root {
  /* dark default */
  --bg: #1A1614;
  --surface-1: #232019;
  --surface-2: #2D2922;
  --text-primary: #F5F1EA;
  --text-secondary: #B8B0A3;
  --text-tertiary: #847C70;
  --accent: #C8704D;
  --accent-hover: #D8825E;
  --accent-strong: #9E5538;
  --accent-soft: rgba(200, 112, 77, 0.12);
  --border: rgba(245, 241, 234, 0.08);
  --border-strong: rgba(245, 241, 234, 0.16);

  /* type */
  --serif: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* spacing */
  --xs: 4px;
  --sm: 8px;
  --md: 16px;
  --lg: 32px;
  --xl: 64px;
  --2xl: 128px;
  --3xl: 192px;

  /* layout */
  --container: 1440px;
  --gutter: clamp(20px, 5vw, 80px);
  --radius: 2px;

  /* motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg: #FAF7F1;
  --surface-1: #FFFFFF;
  --surface-2: #F0EBE2;
  --text-primary: #1A1614;
  --text-secondary: #4A4238;
  --text-tertiary: #6E665A;
  --accent: #A04E32;
  --accent-hover: #8A4128;
  --accent-strong: #7A3920;
  --accent-soft: rgba(160, 78, 50, 0.10);
  --border: rgba(26, 22, 20, 0.08);
  --border-strong: rgba(26, 22, 20, 0.16);
}

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 400ms var(--ease), color 400ms var(--ease);
  overflow-x: hidden;
}

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

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

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

::selection { background: var(--accent); color: var(--bg); }

/* hide visually but keep for SR */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* skip link */
.skip {
  position: absolute; top: -100px; left: 16px;
  background: var(--accent); color: #fff; padding: 12px 16px;
  z-index: 9999; transition: top 200ms;
}
.skip:focus { top: 16px; }

/* focus */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- LANG VISIBILITY ---------- */
[data-lang="es"] [data-show="en"] { display: none !important; }
[data-lang="en"] [data-show="es"] { display: none !important; }

/* ---------- UTILITY ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}

.label-mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.serif { font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em; }

.divider {
  width: 100%; height: 1px; background: var(--border);
}

/* ---------- CUSTOM CURSOR ---------- */
@media (pointer: fine) {
  body.cursor-on { cursor: none; }
  body.cursor-on a, body.cursor-on button, body.cursor-on input,
  body.cursor-on textarea, body.cursor-on select { cursor: none; }
}
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9998;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  transition: width 200ms, height 200ms, background 200ms;
}
.cursor-ring {
  width: 32px; height: 32px;
  border: 1px solid var(--accent);
  opacity: 0.5;
  transition: width 250ms var(--ease), height 250ms var(--ease), opacity 200ms;
}
.cursor-ring.hover {
  width: 56px; height: 56px; opacity: 0.9;
}
.cursor-dot.hover { width: 4px; height: 4px; }
@media (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
  body.cursor-on { cursor: auto; }
}

/* ---------- LOADER ---------- */
.loader {
  position: fixed; inset: 0;
  background: #1A1614;
  display: flex; align-items: center; justify-content: center;
  z-index: 10000;
  transition: opacity 600ms var(--ease), visibility 600ms;
}
.loader.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(24px, 6vw, 64px);
  color: #F5F1EA;
  letter-spacing: -0.02em;
  display: flex; flex-wrap: wrap; gap: 0 0.25em; justify-content: center;
  max-width: 90vw;
  text-align: center;
}
.loader__name .loader__word {
  display: inline-flex;
  white-space: nowrap;
}
.loader__name span {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  animation: loaderIn 600ms var(--ease) forwards;
}
@keyframes loaderIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  transition: backdrop-filter 300ms, background 300ms, padding 300ms;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  padding: 14px var(--gutter);
  border-bottom: 1px solid var(--border);
}
.nav__brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 10px;
}
.nav__brand-mark {
  width: 28px; height: 28px;
  display: block;
  /* SVG ya trae su propio fondo + borde + B + dot accent */
}
.nav__links {
  display: flex; gap: 28px; align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.nav__links a {
  position: relative;
  transition: color 200ms;
  padding: 4px 0;
}
.nav__links a:hover { color: var(--text-primary); }
.nav__links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 300ms var(--ease);
}
.nav__links a:hover::after { transform: scaleX(1); }
.nav__controls {
  display: flex; align-items: center; gap: 12px;
}
.lang-toggle, .theme-toggle {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
  padding: 8px 12px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 200ms;
  text-transform: uppercase;
}
.lang-toggle:hover, .theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}
.lang-toggle .active { color: var(--accent); }
.lang-toggle .sep { color: var(--text-tertiary); }
.theme-toggle svg { width: 14px; height: 14px; }

@media (max-width: 900px) {
  .nav__links { display: none; }
}

/* ---------- BURGER + MOBILE MENU ---------- */
.nav__burger {
  display: none;
  width: 36px; height: 36px;
  border: 1px solid var(--border-strong);
  position: relative;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 5px;
  transition: border-color 200ms;
}
.nav__burger:hover { border-color: var(--accent); }
.nav__burger span {
  display: block;
  width: 16px; height: 1.5px;
  background: var(--text-primary);
  transition: transform 300ms var(--ease), opacity 200ms;
}
.nav__burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}
@media (max-width: 900px) {
  .nav__burger { display: inline-flex; }
}
.mobile-menu {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 90;
  display: flex; flex-direction: column;
  padding: 100px var(--gutter) var(--gutter);
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out);
}
.mobile-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.mobile-menu__close {
  /* Visualmente oculto — el .nav__burger ya hace toggle (se transforma a X cuando aria-expanded=true)
     y se solapaba con este close generando "X duplicada" en mobile. Lo dejo en DOM por a11y
     (screen readers pueden encontrarlo + ESC sigue funcionando). */
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}
.mobile-menu__nav {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 24px;
}
.mobile-menu__nav a {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(28px, 6vw, 48px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px;
  transition: color 200ms, padding 200ms;
}
.mobile-menu__nav a::before {
  content: '→';
  font-family: var(--mono);
  font-size: 18px;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 200ms, transform 200ms;
}
.mobile-menu__nav a:hover,
.mobile-menu__nav a:focus-visible { color: var(--accent); }
.mobile-menu__nav a:hover::before,
.mobile-menu__nav a:focus-visible::before { opacity: 1; transform: translateX(0); }
body.menu-lock { overflow: hidden; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  padding: 120px var(--gutter) 80px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
}
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; padding-top: 110px; gap: 40px; }
}
.hero__content { position: relative; z-index: 2; }
.hero__eyebrow {
  margin-bottom: 24px;
  display: inline-flex; align-items: center; gap: 10px;
}
.hero__eyebrow::before {
  content: ''; width: 24px; height: 1px; background: var(--accent);
}
.hero__title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(48px, 11vw, 168px);
  line-height: 0.88;
  letter-spacing: -0.035em;
  margin: 0 0 28px;
}
.hero__title .word { display: inline-block; margin-right: 0.18em; }
.hero__title .ch {
  display: inline-block;
  opacity: 0;
  transform: translateY(40%);
  animation: heroChar 400ms var(--ease) forwards;
}
@keyframes heroChar {
  to { opacity: 1; transform: translateY(0); }
}
.hero__sub {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(15px, 1.4vw, 19px);
  color: var(--text-secondary);
  margin: 0 0 36px;
  max-width: 540px;
  line-height: 1.45;
}
.hero__sub .dot { color: var(--accent); margin: 0 0.4em; }
/* Legacy availability strip (kept for reference — replaced by .hero__rule) */
.hero__avail {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.06em;
  position: relative;
  padding-bottom: 8px;
  text-transform: uppercase;
}
.hero__avail::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1px;
  background: var(--accent); width: 100%;
  transform: scaleX(0); transform-origin: left;
  animation: revealLine 1.2s 1.4s var(--ease) forwards;
}
@keyframes revealLine { to { transform: scaleX(1); } }
.hero__avail .pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2s infinite;
}

/* Hero divider rule (replaces .hero__avail copy block — sólo la línea terracota) */
.hero__rule {
  width: min(560px, 100%);
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  animation: revealLine 1.2s 1.4s var(--ease) forwards;
}
@media (prefers-reduced-motion: reduce) {
  .hero__rule { transform: scaleX(1); animation: none; }
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); }
  70% { box-shadow: 0 0 0 12px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* hero render */
.hero__render-wrap {
  position: relative;
  perspective: 1600px;
  align-self: stretch;
  display: flex; align-items: center;
}
.hero__render {
  position: relative;
  aspect-ratio: 4/5;
  width: 100%;
  background: var(--surface-1);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 800ms var(--ease);
  border: 1px solid var(--border);
}
.hero__render-inner {
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, #2D2922 0%, #1A1614 60%, #0E0B0A 100%);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 24px;
}

/* SVG architectural render */
.hero__svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0.95;
}
.hero__credit {
  position: absolute; left: 16px; bottom: 16px;
  font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent);
  background: rgba(26,22,20,0.7);
  backdrop-filter: blur(8px);
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  z-index: 3;
}

.hero__scroll {
  position: absolute;
  left: var(--gutter);
  bottom: 32px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-tertiary);
}
.hero__scroll-line {
  width: 1px; height: 60px;
  background: var(--border-strong);
  position: relative; overflow: hidden;
}
.hero__scroll-line::before {
  content: ''; position: absolute; top: -30px;
  left: 0; width: 1px; height: 30px;
  background: var(--accent);
  animation: scrollDown 2s var(--ease) infinite;
}
@keyframes scrollDown {
  to { top: 60px; }
}

/* ============================================================
   INTRO / ABOUT BONI
   ============================================================ */
.intro {
  padding: var(--xl) var(--gutter);
}
.intro__inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  max-width: var(--container);
  margin: 0 auto;
  align-items: start;
}
@media (max-width: 900px) {
  .intro__inner { grid-template-columns: 1fr; gap: 48px; }
}
.intro__text {
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.45;
  color: var(--text-primary);
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
}
.intro__text .accent { color: var(--accent); font-style: italic; }

.bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.bento__cell {
  background: var(--surface-1);
  border: 1px solid var(--border);
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.05/1;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: border-color 300ms, background 300ms;
}
.bento__cell:hover {
  border-color: var(--accent);
  background: var(--surface-2);
}
.bento__num {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text-primary);
}
.bento__num .accent { color: var(--accent); }
.bento__lbl {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  text-transform: uppercase;
  line-height: 1.4;
}

/* ============================================================
   SELECTED WORKS
   ============================================================ */
.works {
  padding: var(--2xl) 0 var(--xl);
}
.works__head {
  padding: 0 var(--gutter);
  max-width: var(--container);
  margin: 0 auto var(--xl);
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 32px;
}
.works__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(40px, 7vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0;
}
.works__disc {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  text-transform: uppercase;
  max-width: 360px;
  text-align: right;
  line-height: 1.6;
}
@media (max-width: 800px) {
  .works__head { flex-direction: column; align-items: flex-start; }
  .works__disc { text-align: left; }
}

.project {
  padding: var(--xl) var(--gutter);
  max-width: var(--container);
  margin: 0 auto;
  border-top: 1px solid var(--border);
}
.project--first { border-top: 0; padding-top: var(--lg); }
.project__num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.18em;
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 12px;
}
.project__num::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.project__title-row {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 32px; margin-bottom: 32px; flex-wrap: wrap;
}
.project__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin: 0;
}
.project__meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  text-transform: uppercase;
  text-align: right;
}
.project__meta .accent { color: var(--accent); }
.project__badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 6px 10px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

/* cover */
.project__cover {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--surface-1);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 32px;
  cursor: pointer;
}
.project__cover-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.project__cover-overlay {
  position: absolute; inset: auto 0 0 0;
  background: linear-gradient(to top, rgba(14,11,10,0.85), transparent);
  padding: 40px;
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 24px;
}
.project__cover-overlay h3 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(24px, 3vw, 40px);
  margin: 0; color: #F5F1EA;
  letter-spacing: -0.02em;
}
.project__cover-overlay span {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.12em; color: var(--accent);
  text-transform: uppercase;
}

.project__split {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  margin-bottom: 56px;
  padding-top: 16px;
}
@media (max-width: 800px) {
  .project__split { grid-template-columns: 1fr; gap: 24px; }
}
.project__facts {
  display: grid; gap: 14px;
}
.fact {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.fact__lbl {
  font-family: var(--mono); font-size: 10px;
  color: var(--text-tertiary); letter-spacing: 0.14em;
  text-transform: uppercase; margin-bottom: 6px;
}
.fact__val {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(18px, 1.6vw, 22px);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.project__desc {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 60ch;
}
.project__desc strong {
  color: var(--text-primary); font-weight: 500;
}

/* process journey horizontal */
.journey {
  margin-bottom: 56px;
}
.journey__title {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.14em;
  color: var(--text-tertiary); text-transform: uppercase;
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 12px;
}
.journey__title::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.journey__rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 16px;
}
@media (max-width: 1000px) {
  .journey { position: relative; }
  .journey__rail {
    grid-auto-flow: column;
    grid-auto-columns: 70vw;
    grid-template-columns: unset;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 12px;
    -webkit-overflow-scrolling: touch;
  }
  .journey__step { scroll-snap-align: start; }
  .journey__hint {
    position: absolute;
    right: 0; top: 30px; bottom: 30px;
    width: 64px;
    pointer-events: none;
    background: linear-gradient(to left, var(--bg) 0%, transparent 100%);
    display: flex; align-items: center; justify-content: flex-end;
    padding-right: 12px;
    transition: opacity 300ms;
    z-index: 2;
  }
  .journey__hint::after {
    content: '→';
    font-family: var(--mono);
    color: var(--accent);
    font-size: 18px;
    animation: hintPulse 1.6s var(--ease) infinite;
  }
  @keyframes hintPulse {
    0%, 100% { transform: translateX(0); opacity: 0.6; }
    50% { transform: translateX(6px); opacity: 1; }
  }
  .journey__hint.gone { opacity: 0; }
}
@media (min-width: 1001px) {
  .journey__hint { display: none; }
}
.journey__step {
  background: var(--surface-1);
  border: 1px solid var(--border);
  aspect-ratio: 4/5;
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 300ms;
}
.journey__step:hover { border-color: var(--accent); }
.journey__step-num {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--mono); font-size: 10px;
  color: var(--accent); letter-spacing: 0.14em;
}
.journey__step-img {
  flex: 1; position: relative;
}
.journey__step-img svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.journey__step-lbl {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  font-family: var(--serif); font-weight: 500;
  font-size: 14px; letter-spacing: -0.005em;
  background: var(--surface-1);
}

/* renders gallery bento */
.gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 240px 240px;
  gap: 20px;
  margin-bottom: 32px;
}
.gallery__cell {
  background: var(--surface-1);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 300ms;
}
.gallery__cell:hover { border-color: var(--accent); }
.gallery__cell:nth-child(1) { grid-row: span 2; }
/* Variant: 2 imágenes lado a lado (horizontal + vertical), misma altura */
.gallery.gallery--pair { grid-template-columns: 1.5fr 1fr; grid-template-rows: 500px; }
.gallery.gallery--pair .gallery__cell:nth-child(1) { grid-row: auto; }
@media (max-width: 760px) {
  .gallery.gallery--pair { grid-template-columns: 1fr; grid-template-rows: 280px 380px; }
}
.gallery__cell svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.gallery__cell-tag {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-family: var(--mono); font-size: 10px;
  color: var(--accent); letter-spacing: 0.14em;
  background: rgba(26,22,20,0.7);
  backdrop-filter: blur(6px);
  padding: 4px 8px;
}
@media (max-width: 700px) {
  .gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  /* En mobile las 4 renders se ven iguales en 2x2.
     (Antes: cell 1 spanning 2 cols dejaba cell 4 sola en row 3 a medio llenar) */
  .gallery__cell:nth-child(1) { grid-column: auto; grid-row: auto; }
  .gallery__cell { aspect-ratio: 16/10; }
}

/* hotspots */
.hotspots {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--surface-1);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 24px;
}
.hotspots__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hotspot {
  position: absolute;
  width: 32px; height: 32px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  z-index: 3;
}
.hotspot::before, .hotspot::after {
  content: ''; position: absolute;
  border-radius: 50%;
  border: 1px solid var(--accent);
}
.hotspot::before {
  inset: 12px;
  background: var(--accent);
  border: 0;
}
.hotspot::after {
  inset: 0;
  animation: ping 2s var(--ease-out) infinite;
}
@keyframes ping {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(1.4); opacity: 0; }
}
.hotspot__tooltip {
  position: absolute; left: 50%; bottom: calc(100% + 14px);
  transform: translateX(-50%);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  padding: 12px 16px;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  opacity: 0; pointer-events: none;
  transition: opacity 200ms, transform 200ms;
  text-transform: uppercase;
  z-index: 5;
}
.hotspot:hover .hotspot__tooltip,
.hotspot:focus .hotspot__tooltip,
.hotspot.open .hotspot__tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}
@media (max-width: 600px) {
  .hotspot__tooltip {
    white-space: normal;
    max-width: 220px;
    width: max-content;
  }
}
.hotspot__num {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--mono);
  font-size: 9px;
  color: #fff;
  font-weight: 600;
  z-index: 2;
}
.hotspots__caption {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-tertiary);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  margin-top: 12px;
}

.works__cta {
  text-align: center;
  padding: var(--xl) var(--gutter);
  border-top: 1px solid var(--border);
  max-width: var(--container);
  margin: 0 auto;
}
.works__cta-text {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(24px, 3vw, 40px);
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  line-height: 1.2;
}
.works__cta-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin: 0 0 32px;
}

/* button */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--accent-strong);
  color: #fff;
  border: 1px solid var(--accent-strong);
  position: relative;
  overflow: hidden;
  transition: background 250ms, transform 250ms;
  font-weight: 500;
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn .arrow {
  display: inline-block;
  transition: transform 250ms var(--ease);
}
.btn:hover .arrow { transform: translateX(4px); }

.btn .ripple {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transform: scale(0); pointer-events: none;
  animation: ripple 600ms ease-out;
}
@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}

/* ============================================================
   AI WORKFLOW
   ============================================================ */
.ai {
  padding: var(--2xl) var(--gutter) var(--xl);
  background: var(--surface-1);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
/* .ai::before background grid pattern REMOVED (2026-05-17, pedido Fran) */
.ai__inner { max-width: var(--container); margin: 0 auto; position: relative; }
.ai__head {
  margin-bottom: var(--xl);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: end;
}
@media (max-width: 900px) {
  .ai__head { grid-template-columns: 1fr; gap: 24px; }
}
.ai__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(40px, 7vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0;
}
.ai__title .accent { color: var(--accent); font-style: italic; font-weight: 500; }
.ai__sub {
  font-size: clamp(15px, 1.3vw, 18px);
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 50ch;
}

/* pipeline diagram */
.pipeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin-bottom: var(--xl);
  position: relative;
}
@media (max-width: 1000px) {
  .pipeline { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .pipeline { grid-template-columns: 1fr; }
}
.pipeline__node {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 24px 20px;
  cursor: pointer;
  position: relative;
  transition: all 300ms var(--ease);
  display: flex; flex-direction: column;
  min-height: 200px;
  text-align: left;
  width: 100%;
}
.pipeline__node:hover {
  background: var(--surface-2);
  border-color: var(--accent);
}
.pipeline__node.active {
  background: var(--surface-2);
  border-color: var(--accent);
}
.pipeline__node:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: -10px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  color: var(--accent);
  font-size: 18px;
  background: var(--surface-1);
  padding: 4px;
  z-index: 2;
}
@media (max-width: 1000px) {
  .pipeline__node:not(:last-child)::after { display: none; }
}
.pipeline__node-num {
  font-family: var(--mono); font-size: 11px;
  color: var(--accent); letter-spacing: 0.14em;
  margin-bottom: 18px;
}
.pipeline__node-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.pipeline__node-tools {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  word-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  line-height: 1.6;
}
/* Featured: sin background propio ni border distinto. Se identifica solo por el num en accent
   (color terracota) + el texto "03 · Destacado" interno. Decisión: el bg accent-soft confundía
   visualmente con "active" — mejor que todos los cards se vean iguales en estructura y el
   featured solo se distinga por contenido. */
.pipeline__node--featured .pipeline__node-num { color: var(--accent); }

/* node detail panel */
.pipeline__detail {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  padding: 40px;
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  min-height: 280px;
}
@media (max-width: 900px) {
  .pipeline__detail { grid-template-columns: 1fr; gap: 24px; padding: 28px; }
}
.pipeline__detail-meta {
  display: flex; flex-direction: column; gap: 16px;
}
.pipeline__detail-meta h4 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(22px, 2.4vw, 32px);
  letter-spacing: -0.02em;
  margin: 0;
}
.pipeline__detail-tag {
  display: inline-block;
  font-family: var(--mono); font-size: 10px;
  color: var(--accent); letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--accent);
  padding: 4px 8px;
  width: fit-content;
}
.pipeline__detail-body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.pipeline__detail-body strong { color: var(--text-primary); font-weight: 500; }
.pipeline__detail .stack {
  display: flex; flex-wrap: wrap; gap: 10px 12px;
  margin-top: 16px;
}
.pipeline__detail .chip {
  display: inline-block;
  font-family: var(--mono); font-size: 10px;
  color: var(--text-primary);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 5px 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* before/after slider */
.compare {
  position: relative;
  aspect-ratio: 16/9;
  margin-top: 24px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface-1);
  user-select: none;
  cursor: ew-resize;
  touch-action: none;
}
.compare__layer {
  position: absolute; inset: 0;
}
.compare__layer svg { width: 100%; height: 100%; display: block; }
.compare__layer--top {
  clip-path: inset(0 50% 0 0);
}
.compare__handle {
  position: absolute; top: 0; bottom: 0;
  left: 50%;
  width: 2px; background: var(--accent);
  pointer-events: none;
  z-index: 4;
}
.compare__handle::before {
  content: ''; position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
  background: var(--accent);
  border-radius: 50%;
  display: grid; place-items: center;
}
.compare__handle::after {
  content: '⇄';
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
}
.compare__lbl {
  position: absolute;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(26,22,20,0.7);
  padding: 6px 10px;
  z-index: 3;
  backdrop-filter: blur(8px);
}
.compare__lbl--left { top: 16px; left: 16px; }
.compare__lbl--right { top: 16px; right: 16px; }

/* ai stats */
.ai__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: var(--xl);
}
@media (max-width: 700px) {
  .ai__stats { grid-template-columns: 1fr; }
}
.ai__stat {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 32px 28px;
  display: flex; align-items: baseline; gap: 20px;
}
.ai__stat-num {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(40px, 5vw, 64px);
  color: var(--accent); letter-spacing: -0.03em;
  line-height: 1;
}
.ai__stat-lbl {
  font-family: var(--sans); font-size: 14px;
  color: var(--text-secondary); line-height: 1.4;
  font-weight: 400;
}

/* ============================================================
   SERVICES
   ============================================================ */
.services {
  padding: var(--2xl) var(--gutter) var(--xl);
  max-width: var(--container);
  margin: 0 auto;
}
.services__head {
  margin-bottom: var(--xl);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: end;
}
@media (max-width: 900px) {
  .services__head { grid-template-columns: 1fr; gap: 24px; }
}
.services__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(40px, 7vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0;
}
.services__sub {
  font-size: clamp(15px, 1.2vw, 17px);
  color: var(--text-secondary);
  max-width: 50ch;
  line-height: 1.55;
}
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) {
  .services__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .services__grid { grid-template-columns: 1fr; }
}
.svc {
  background: var(--surface-1);
  border: 1px solid var(--border);
  padding: 32px 28px;
  min-height: 260px;
  display: flex; flex-direction: column;
  transition: transform 350ms var(--ease), border-color 350ms, background 350ms;
  position: relative;
  overflow: hidden;
}
.svc:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  background: var(--surface-2);
}
.svc__icon {
  width: 36px; height: 36px;
  margin-bottom: 24px;
  color: var(--accent);
}
.svc__icon svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.2; }
.svc__num {
  position: absolute;
  top: 20px; right: 24px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-tertiary);
  letter-spacing: 0.1em;
}
.svc__title {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(20px, 1.8vw, 26px);
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  position: relative;
  display: inline-block;
  padding-bottom: 4px;
}
.svc__title::after {
  content: ''; position: absolute;
  left: 0; bottom: 0; height: 1px;
  width: 100%; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 350ms var(--ease);
}
.svc:hover .svc__title::after { transform: scaleX(1); }
.svc__desc {
  font-size: 14px; line-height: 1.6;
  color: var(--text-secondary);
  margin-top: auto;
}

/* ============================================================
   ABOUT / TIMELINE
   ============================================================ */
.about {
  padding: var(--2xl) var(--gutter) var(--xl);
  background: var(--surface-1);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.about__inner { max-width: var(--container); margin: 0 auto; }
.about__head {
  margin-bottom: var(--xl);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: end;
}
@media (max-width: 900px) {
  .about__head { grid-template-columns: 1fr; gap: 24px; }
}
.about__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(40px, 7vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0;
}
.about__sub {
  font-size: clamp(15px, 1.2vw, 17px);
  color: var(--text-secondary);
  max-width: 50ch;
  line-height: 1.55;
}
.timeline {
  position: relative;
  padding-left: 48px;
  margin-bottom: var(--xl);
}
.timeline::before {
  content: ''; position: absolute;
  left: 8px; top: 8px; bottom: 8px;
  width: 1px; background: var(--border-strong);
}
.tl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
  align-items: baseline;
}
.tl:last-child { border-bottom: 0; }
.tl::before {
  content: ''; position: absolute;
  left: -48px; top: 28px;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--accent);
}
.tl::after {
  content: ''; position: absolute;
  left: -42px; top: 34px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.tl__year {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.12em;
  font-weight: 500;
}
.tl__body h4 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(18px, 1.6vw, 24px);
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  line-height: 1.25;
}
.tl__body p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}
@media (max-width: 700px) {
  .timeline { padding-left: 32px; }
  .tl { grid-template-columns: 1fr; gap: 4px; }
  .tl::before { left: -32px; }
  .tl::after { left: -26px; }
}

/* Idiomas */
.langs {
  margin: var(--xl) 0 0;
  padding-top: var(--lg);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: clamp(20px, 4vw, 56px);
  align-items: start;
}
.langs__lbl {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding-top: 6px;
}
.langs__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(14px, 2vw, 24px) clamp(20px, 3vw, 40px);
}
.lang {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 14px;
  border-left: 1px solid var(--border);
}
.lang__name {
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.1;
}
.lang__lvl {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-secondary);
}
@media (max-width: 720px) {
  .langs {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.about__pitch {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 4.5vw, 56px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  max-width: 22ch;
  margin: var(--xl) 0 0;
  padding-top: var(--lg);
  border-top: 1px solid var(--border);
}
.about__pitch .accent { color: var(--accent); font-style: italic; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  padding: var(--2xl) var(--gutter) var(--xl);
  max-width: var(--container);
  margin: 0 auto;
}
.contact__head {
  margin-bottom: var(--xl);
}
.contact__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(48px, 9vw, 128px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin: 0;
}
.contact__title .accent { color: var(--accent); font-style: italic; }
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 80px;
}
@media (max-width: 900px) {
  .contact__grid { grid-template-columns: 1fr; gap: 48px; }
}
.contact__info {
  display: flex; flex-direction: column;
  gap: 28px;
}
.cinfo {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  align-items: baseline;
}
.cinfo__lbl {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-tertiary);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.cinfo__val {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(16px, 1.4vw, 20px);
  letter-spacing: -0.005em;
  line-height: 1.3;
  word-break: break-word;
}
.cinfo__val a {
  position: relative;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: color 200ms;
}
.cinfo__val a:hover { color: var(--accent); }
.cinfo--whatsapp .cinfo__val { color: var(--accent); }

/* form */
.form { display: flex; flex-direction: column; gap: 28px; }
.field {
  position: relative;
  border-bottom: 1px solid var(--border-strong);
  padding-top: 22px;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: transparent;
  border: 0;
  padding: 8px 0 14px;
  color: var(--text-primary);
  font-family: var(--sans);
  font-size: 16px;
  outline: none;
  resize: none;
}
.field textarea { min-height: 100px; }
.field select { appearance: none; cursor: pointer; }
.field select {
  color-scheme: dark light;
}
.field select option {
  background: var(--surface-1);
  color: var(--text-primary);
}
.field label {
  position: absolute;
  top: 28px; left: 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-tertiary);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  pointer-events: none;
  transition: all 250ms var(--ease);
}
.field input:focus + label,
.field textarea:focus + label,
.field select:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:not(:placeholder-shown) + label,
.field.filled label {
  top: 0;
  font-size: 10px;
  color: var(--accent);
}
.field:focus-within { border-color: var(--accent); }
.field__caret {
  position: absolute; right: 0; top: 50%;
  transform: translateY(-25%);
  pointer-events: none;
  color: var(--text-secondary);
  font-family: var(--mono);
}
.form__submit { align-self: flex-start; margin-top: 12px; }
.form__success {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 8px;
  opacity: 0;
  transition: opacity 300ms;
}
.form__success.show { opacity: 1; }
.form__error {
  font-family: var(--mono);
  font-size: 12px;
  color: #E76F51;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 8px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 300ms, max-height 300ms;
}
.form__error.show { opacity: 1; max-height: 80px; }
[data-theme="light"] .form__error { color: #B5391E; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: var(--xl) var(--gutter) var(--lg);
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 900px) {
  .footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer__brand { grid-column: span 2; }
}
.footer__brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(40px, 6vw, 80px);
  line-height: 0.9;
  letter-spacing: -0.03em;
}
.footer__brand .accent { color: var(--accent); font-style: italic; font-weight: 500; }
.footer__col h5 {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-tertiary);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 16px;
  font-weight: 500;
}
.footer__col ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.footer__col a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 200ms;
}
.footer__col a:hover { color: var(--accent); }
.footer__bottom {
  max-width: var(--container);
  margin: var(--xl) auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
  flex-wrap: wrap;
  gap: 16px;
}

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }

.reveal-clip {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1100ms var(--ease);
}
.reveal-clip.in { clip-path: inset(0 0 0 0); }

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.reveal-stagger.in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 240ms; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 320ms; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 400ms; }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(14,11,10,0.92);
  backdrop-filter: blur(20px);
  z-index: 200;
  display: none;
  align-items: center; justify-content: center;
  padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox__inner {
  max-width: 1400px; width: 100%;
  aspect-ratio: 16/9;
  position: relative;
  border: 1px solid var(--border-strong);
  background: var(--surface-1);
  overflow: hidden;
}
.lightbox__inner svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.lightbox__close {
  position: absolute; top: -50px; right: 0;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; color: var(--text-primary);
  text-transform: uppercase;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
}

@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;
  }
  .reveal, .reveal-clip, .reveal-stagger > * {
    opacity: 1 !important; transform: none !important; clip-path: none !important;
  }
}

/* ============================================================
   v4.1 — Real renders + Portfolio button (added 2026-05-16)
   ============================================================ */

/* Picture/img inside hero render placeholder */
picture.hero__svg, .hero__svg picture { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero__svg img, picture.hero__svg img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Hero identity-mark variant (replaces photo render) */
.hero__render--logo { background: #1A1614; border-color: #3A332B; }
img.hero__svg.hero__logo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 1;
  display: block;
}

/* Gallery image inside gallery cell */
/* NOTE: removed aspect-ratio: 4/3 — conflictúa con grid-template-rows 240px+nth-child(1) span 2.
   El layout original ya garantiza alineación (cell 1 = 240+20+240 = 500 = altura de cell 2+gap+cell 4). */
.gallery__img, .gallery__cell picture { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.gallery__cell img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 800ms var(--ease, cubic-bezier(0.22, 1, 0.36, 1)); }
.gallery__cell:hover img { transform: scale(1.04); }

/* Compare slider images */
.compare__layer picture { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.compare__layer img { width: 100%; height: 100%; object-fit: cover; display: block; }
.compare__layer--top { clip-path: inset(0 0 0 50%); will-change: clip-path; }

/* Nav Portfolio group — label "Portfolio" + lang picker EN/ES */
.nav__portfolio-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border: 1px solid var(--accent);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.nav__portfolio-label {
  color: var(--text-secondary);
  text-transform: uppercase;
  pointer-events: none;
  user-select: none;
}
.nav__portfolio-lang {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  color: var(--accent) !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 2px 4px;
  border-radius: 2px;
  transition: color 180ms, background 180ms;
}
.nav__portfolio-lang:hover {
  color: var(--bg) !important;
  background: var(--accent);
}
.nav__portfolio-lang-icon {
  font-size: 0.85em;
  line-height: 1;
  opacity: 0.85;
}
.nav__portfolio-sep {
  color: var(--text-tertiary);
  user-select: none;
}
@media (max-width: 900px) {
  .nav__portfolio-group { display: none !important; }
}

/* Mobile menu Portfolio group — block label + lang picker EN/ES */
.mobile-menu__portfolio {
  display: flex;
  flex-direction: column;
  gap: 4mm;
  align-items: flex-start;
  margin-top: 8mm;
  padding-top: 8mm;
  border-top: 1px solid var(--border);
}
.mobile-menu__portfolio-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  pointer-events: none;
  user-select: none;
}
.mobile-menu__portfolio-langs {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing: -0.01em;
  color: var(--accent);
}
.mobile-menu__portfolio-langs a {
  color: var(--accent) !important;
  font-weight: 500;
  transition: color 180ms;
}
.mobile-menu__portfolio-langs a:hover {
  color: var(--accent-hover) !important;
}
.mobile-menu__portfolio-langs span {
  color: var(--text-tertiary);
  font-size: 0.7em;
}

/* CTA Works — 2 botones simétricos lado a lado: Portfolio · EN + Portfolio · ES */
/* Centrados para matchear el text-align: center del .works__cta-text */
.works__cta-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}
@media (max-width: 600px) {
  .works__cta-btns { flex-direction: column; align-items: stretch; gap: 10px; }
  .works__cta-btns .btn { justify-content: center; }
}

/* ============================================================
   v4.2 — Other Works Grid (Modelo C híbrido)
   ============================================================ */
.works-grid {
  margin-top: clamp(96px, 12vw, 192px);
  padding: 0 var(--gutter);
}
.works-grid__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 48px;
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
}
.works-grid__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.0;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}
.works-grid__sub {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.works-grid__cells {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 600px) {
  .works-grid__cells { grid-template-columns: 1fr; }
}
.wg-cell {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--surface-1);
  border: 1px solid var(--border);
  text-decoration: none;
  display: block;
  transition: border-color 220ms;
}
.wg-cell:hover { border-color: var(--accent); }
.wg-cell picture, .wg-cell img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 600ms var(--ease, cubic-bezier(0.22, 1, 0.36, 1)), filter 400ms;
}
.wg-cell:hover img { transform: scale(1.04); filter: brightness(0.8); }
.wg-cell__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  background: linear-gradient(180deg, transparent 0%, transparent 50%, rgba(26, 22, 20, 0.85) 100%);
}
.wg-cell__tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
  font-weight: 500;
}
.wg-cell__title {
  font-family: var(--serif);
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 500;
  line-height: 1.0;
  color: var(--text-primary);
  letter-spacing: -0.005em;
}
.wg-cell__title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}

/* Project featured cover overrides for picture */
.project__cover .project__cover-svg picture,
.project__cover-svg img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
