:root {
  --bg: #fff;
  --fg: #0a0a0a;
  --muted: rgba(10, 10, 10, .55);
  --soft: rgba(10, 10, 10, .78);
  --line: rgba(10, 10, 10, .14);
  --panel: #f1f1f2;
  --panel-hover: #e8e8ea;
  --pill: #0a0a0a;
  --pill-fg: #fff;
  --pill-hover: #333;
  --veil: rgba(255, 255, 255, .96);
  --pad: 52px;
  --radius: 0;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
}

[data-theme="dark"] {
  --bg: #000; --fg: #fff; --muted: rgba(255,255,255,.5); --soft: rgba(255,255,255,.78); --line: rgba(255,255,255,.16);
  --panel: #0c0c0d; --panel-hover: #151516; --pill: #222; --pill-fg: #fff; --pill-hover: #3a3b3e; --veil: rgba(8,8,9,.96);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17.5px;
  line-height: 1.4;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading, body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: grid; place-items: center;
}
.loader__word { display: flex; font-size: clamp(13.6px, 1.8vw, 23px); letter-spacing: .3em; padding-left: .3em; /* compensa el espacio final del letter-spacing para centrar de verdad */ color: var(--fg); font-weight: 400; }
.loader__word .lc { display: inline-block; text-align: center; will-change: opacity, filter; }

/* ---------- Header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px var(--pad);
}
.header__logo { display: flex; align-items: center; gap: 10px; }
.header::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .4s; background: var(--bg); border-bottom: 1px solid var(--line); }
.header.is-scrolled::before { opacity: 1; }
.header { transition: transform .7s var(--ease), padding .4s var(--ease); }
.header.is-scrolled { padding-top: 16px; padding-bottom: 16px; }
.header.is-hidden { transform: translateY(-100%); }
body.menu-open .header { transform: none; }
.header__right { display: flex; align-items: center; gap: 20px; }
.lang-toggle { display: inline-flex; gap: 6px; background: none; border: 0; color: var(--fg); font: inherit; font-size: 13px; letter-spacing: .08em; cursor: pointer; }
.lang-toggle__opt { opacity: .4; transition: opacity .3s; }
.lang-toggle__opt.is-active { opacity: 1; }
.lang-toggle__sep { opacity: .3; }
.header__name { font-size: 14px; letter-spacing: .4em; color: var(--fg); }
.header__name .lc { display: inline-block; text-align: center; will-change: opacity, filter; }

.pill {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--pill); color: var(--pill-fg);
  border: 0; border-radius: 10px;
  padding: 12px 18px;
  font: inherit; font-size: 15px; cursor: pointer;
  transition: background .3s, transform .4s var(--ease);
}
.pill:hover { background: var(--pill-hover); }
.pill--light { background: var(--fg); color: var(--bg); padding: 16px 28px; }
.pill--light:hover { opacity: .8; }
.menu-btn__icon { display: grid; gap: 4px; }
.menu-btn__icon i { width: 14px; height: 1.5px; background: var(--pill-fg); transition: transform .4s var(--ease); }
.menu-open .menu-btn__icon i:first-child { transform: translateY(2.7px) rotate(45deg); }
.menu-open .menu-btn__icon i:last-child { transform: translateY(-2.7px) rotate(-45deg); }

/* ---------- Menu overlay ---------- */
.menu {
  position: fixed; inset: 0; z-index: 50;
  background: var(--veil);
  backdrop-filter: blur(20px);
  display: flex; align-items: flex-end; padding: var(--pad);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
}
.menu li { overflow: hidden; }
.menu a {
  display: flex; align-items: baseline; gap: 24px;
  font-size: clamp(48px, 9vw, 140px); line-height: 1.05; letter-spacing: -.04em;
  transition: color .3s;
}
.menu a b { font-weight: 400; }
.menu a span { font-size: 14px; letter-spacing: 0; color: var(--muted); }
.menu a:hover { color: var(--muted); }

/* ---------- Hero ---------- */
.hero { position: relative; height: 100vh; min-height: 560px; overflow: hidden; }
.hero__bg { position: absolute; inset: -5% 0; background: var(--bg); }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; }
.grain {
  position: absolute; inset: 0; opacity: .07; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.hero__shade { position: absolute; inset: 0; background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 40%, transparent), transparent 30%); }
.hero__fade { position: absolute; left: 0; right: 0; bottom: -1px; height: 48%; pointer-events: none; z-index: 1;
  background: linear-gradient(to bottom, transparent 0%,
    color-mix(in srgb, var(--bg) 6%, transparent) 14%,
    color-mix(in srgb, var(--bg) 22%, transparent) 30%,
    color-mix(in srgb, var(--bg) 48%, transparent) 50%,
    color-mix(in srgb, var(--bg) 76%, transparent) 72%,
    color-mix(in srgb, var(--bg) 94%, transparent) 90%, var(--bg) 100%); }
.hero__title { position: absolute; z-index: 2; left: var(--pad); right: var(--pad); bottom: 17vh; font-weight: 500; font-size: clamp(46px, 8.6vw, 148px); line-height: .94; letter-spacing: -.055em; text-shadow: 0 0 40px var(--bg), 0 0 18px var(--bg); }
.hero__roll { position: relative; display: block; overflow: hidden; }
.hero__roll > span { position: absolute; left: 0; top: 0; display: block; white-space: nowrap; line-height: 1; }
.hero__roll i { display: inline-block; font-style: normal; will-change: transform; }
.hero__roll--a { height: 1.12em; margin-bottom: -.12em; }
.hero__roll--a > span { padding-top: .04em; }
.hero__roll--b { height: 1.3em; margin: .02em 0 -.2em; color: var(--fg); font-family: var(--serif); font-style: normal; font-weight: 400; letter-spacing: -.025em; font-size: 1.12em; }
.hero__roll--b > span { padding-top: .06em; }
@media (max-width: 600px) { .hero__title { font-size: 9vw; } }
.hero__label, .hero__arrow, .hero__geo { position: absolute; bottom: 32px; }
.hero__geo { left: 0; right: 0; justify-content: center; pointer-events: none; display: flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: .16em; color: var(--muted); }
.hero__geo i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .7; }
.hero__label { left: var(--pad); }
.hero__arrow { right: var(--pad); animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }

/* ---------- Intro ---------- */
.intro { padding: 22vh var(--pad) 0; }
.reveal { max-width: 1000px; }
.intro__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 56px; }
.intro__row .reveal { flex: 1; max-width: 1100px; }
.seal { position: absolute; right: -5%; bottom: -58px; z-index: 2; width: clamp(96px, 8.8vw, 134px); }
.seal__bg { fill: var(--bg); }
.seal svg { display: block; width: 100%; overflow: visible; }
.seal text { font-family: var(--sans); font-size: 10.5px; letter-spacing: .18em; fill: var(--fg); }
.seal__line { fill: none; stroke: var(--fg); stroke-width: .8; }
.seal__ring { transform-origin: 80px 80px; animation: sealSpin 30s linear infinite; }
.seal__ai { font-size: 22px !important; font-weight: 500; letter-spacing: .04em !important; }
@keyframes sealSpin { to { transform: rotate(360deg); } }
@media (max-width: 760px) { .intro__row { flex-direction: column; gap: 32px; } .seal { width: 96px; right: -4px; bottom: -46px; } }
.reveal--lg { font-size: clamp(28px, 3.2vw, 46px); line-height: 1.1; letter-spacing: -.035em; }
.reveal .w { display: inline-block; }
.dribbble { position: relative; margin: 14vh auto 0; width: 100%; max-width: 810px; }
.card-panel { position: relative; display: block; overflow: hidden; width: 100%; aspect-ratio: 16 / 10; background: var(--panel); }
.card-panel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.card-panel img.is-on { display: block; }

/* ---------- Typography blocks ---------- */
.h3 { font-weight: 400; font-size: clamp(28px, 3.4vw, 43.75px); line-height: 1.1; letter-spacing: -.02em; max-width: 1000px; }
.body { color: var(--muted); max-width: 520px; margin-top: 32px; }
.body em { color: var(--fg); font-size: 1.15em; }
.statement { padding: 22vh var(--pad) 12vh; }
.label { font-size: 13px; color: var(--muted); }

/* ---------- Services ---------- */
.services { padding: 0 var(--pad) 18vh; }
.service {
  display: grid; grid-template-columns: 1fr 3fr minmax(220px, 1.4fr); gap: 24px; align-items: end;
  padding: 36px 0 28px; border-top: 1px solid var(--line);
}
.service:last-child { border-bottom: 1px solid var(--line); }
.service__desc { font-size: 14px; line-height: 1.45; color: var(--muted); max-width: 30ch; justify-self: end; text-align: left; padding-bottom: .6em; }
.service__num { font-size: 14px; color: var(--muted); }
.service__title { font-weight: 400; font-size: clamp(44px, 7vw, 100px); line-height: .95; letter-spacing: -.045em; }

/* ---------- Work ---------- */
.work { padding: 0 var(--pad) 18vh; }
.work__head { display: flex; justify-content: space-between; padding-bottom: 20px; }
.project { display: block; padding: 12vh 0; border-top: 1px solid var(--line); }
.project:last-of-type { padding-bottom: 4vh; }
.project__media { width: 80%; margin-inline: auto; overflow: hidden; border-radius: var(--radius); background: var(--panel); aspect-ratio: 16 / 9; }
.project__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.001); transition: transform 1.4s var(--ease), filter .6s; filter: brightness(.94); }
.project:hover .project__media img { transform: scale(1.04); filter: brightness(1); }
.project__meta { display: grid; grid-template-columns: 1fr 3fr 3fr 3fr; gap: 24px; align-items: start; padding: 0 0 6vh; }
.project__num { font-size: 14px; color: var(--muted); padding-top: .6em; }
.project__meta h3 { font-weight: 400; font-size: clamp(32px, 4.4vw, 64px); line-height: 1; letter-spacing: -.04em; }
.project__meta p { color: var(--muted); font-size: 16px; max-width: 34ch; padding-top: .3em; }
.project__tags { color: var(--muted); font-size: 13px; padding-top: .5em; justify-self: end; text-align: right; }
.cursor-pill { position: fixed; top: 0; left: 0; z-index: 70; pointer-events: none; background: var(--fg); color: var(--bg); font-size: 14px; padding: 10px 16px; border-radius: 999px; opacity: 0; transform: translate(-50%, -50%) scale(.6); transition: opacity .3s, transform .4s var(--ease); white-space: nowrap; }
.cursor-pill.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
@media (max-width: 900px) { .project__media { width: 100%; } .project__meta { grid-template-columns: 1fr; gap: 10px; } .project__tags { justify-self: start; text-align: left; } .cursor-pill { display: none; } }

/* ---------- Clientes ---------- */
.clients { padding: 0 var(--pad) 16vh; }
.clients__list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
.client { display: flex; align-items: baseline; gap: 24px; padding: 26px 0 22px; border-top: 1px solid var(--line); }
.client__num { font-size: 13px; color: var(--muted); min-width: 2.2em; }
.client__name { font-size: clamp(30px, 4.2vw, 64px); line-height: 1; letter-spacing: -.045em; transition: opacity .4s, transform .8s var(--ease); }
.clients__list:hover .client__name { opacity: .25; }
.clients__list .client:hover .client__name { opacity: 1; transform: translateX(10px); }
@media (max-width: 760px) { .clients__list { grid-template-columns: 1fr; } }

/* ---------- Sedes ---------- */
.offices { padding: 0 var(--pad) 18vh; }
.offices__layout { display: grid; grid-template-columns: minmax(260px, 360px) 1fr; gap: clamp(40px, 9vw, 150px); align-items: center; padding-top: 4vh; }
.globe { width: 100%; aspect-ratio: 1; }
.globe canvas { display: block; width: 100%; height: 100%; }
.offices__list { display: block; border-bottom: 1px solid var(--line); }
.office { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding: 3.2vh 0 3vh; border-top: 1px solid var(--line); cursor: default; transition: padding .6s var(--ease); }
.office__tag { font-size: 13px; color: var(--muted); order: 2; text-align: right; }
.office__name { font-weight: 400; font-size: clamp(34px, 4.2vw, 64px); letter-spacing: -.045em; line-height: 1; transition: transform .8s var(--ease); }
.office:hover .office__name { transform: translateX(10px); }
@media (max-width: 900px) { .offices__layout { grid-template-columns: 1fr; gap: 36px; } .globe { max-width: 300px; margin: 0 auto; } }

/* ---------- Timeline (experience) ---------- */
.about .h3 { margin-bottom: 16vh; }
.timeline { display: block; }
.exp { display: grid; grid-template-columns: 1fr 3fr; gap: 24px; padding: 7vh 0 8vh; border-top: 1px solid var(--line); }
.exp__when { font-size: 14px; color: var(--muted); }
.exp__when b { display: block; font-weight: 400; font-size: clamp(26px, 3vw, 44px); line-height: 1; letter-spacing: -.045em; color: var(--fg); margin-bottom: 10px; }
.exp__company { font-weight: 400; font-size: clamp(38px, 5.4vw, 84px); line-height: 1; letter-spacing: -.055em; }
.exp__meta { margin-top: 12px; font-size: 14px; color: var(--muted); }
.exp__roles { position: relative; margin-top: 6vh; padding-left: 38px; }
.exp__line { position: absolute; left: 0; top: .7em; bottom: 4vh; width: 1px; background: var(--line); }
.exp__line i { display: block; width: 100%; height: 100%; background: var(--fg); transform-origin: top; transform: scaleY(0); }
.role { position: relative; padding-bottom: 4.5vh; }
.role:last-child { padding-bottom: 0; }
.role::before { content: ""; position: absolute; left: -42.5px; top: .5em; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 1px solid var(--fg); }
.role__title { font-weight: 400; font-size: clamp(22px, 2.5vw, 36px); line-height: 1.1; letter-spacing: -.035em; }
.role__sub { margin-top: 8px; font-size: 14px; color: var(--muted); }
.role__sub span + span::before { content: "·"; margin: 0 .55em; opacity: .6; }
@media (max-width: 760px) { .exp { grid-template-columns: 1fr; } }

/* ---------- About / CTA ---------- */
.about { padding: 0 var(--pad) 22vh; }
.cta { padding: 12vh var(--pad) 18vh; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; gap: 48px; }
.cta__title { font-weight: 400; font-size: clamp(56px, 10vw, 150px); line-height: .95; letter-spacing: -.05em; }
.cta__title em { color: var(--muted); }
.footer { display: flex; justify-content: space-between; padding: 24px var(--pad); border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.footer__links { display: flex; gap: 24px; }
.footer a:hover { color: var(--fg); }

@media (max-width: 760px) {
  :root { --pad: 20px; }
  .service { grid-template-columns: 1fr; gap: 12px; }
  .service__desc { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* ---------- Case detail ---------- */
.case-hero { padding: 150px var(--pad) 8vh; }
.case-back { display: inline-block; font-size: 14px; color: var(--muted); margin-bottom: 8vh; transition: color .3s, transform .5s var(--ease); }
.case-back:hover { color: var(--fg); transform: translateX(-4px); }
.case-meta { display: flex; gap: 28px; font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.case-title { font-weight: 400; font-size: clamp(52px, 10vw, 150px); line-height: .95; letter-spacing: -.05em; margin-bottom: 4vh; overflow-wrap: anywhere; }
.case-lead { font-size: clamp(20px, 2.2vw, 32px); line-height: 1.25; letter-spacing: -.02em; max-width: 40ch; color: var(--soft); margin-bottom: 4vh; }
.case-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8vh; }
.case-tags li { font-size: 13px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.case-hero__media { overflow: hidden; border-radius: var(--radius); background: var(--panel); aspect-ratio: 16 / 9; }
.case-hero__media img, .case-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.case-section { padding: 12vh var(--pad); border-top: 1px solid var(--line); }
.case-section:first-of-type { border-top: 0; }
.case-section__head { display: grid; grid-template-columns: 1fr 3fr; gap: 24px; margin-bottom: 6vh; align-items: start; }
.case-section__head h2 { font-weight: 400; font-size: clamp(32px, 4.4vw, 64px); line-height: 1; letter-spacing: -.04em; }
.case-section__lead { margin-left: calc(25% + 6px); max-width: 60ch; font-size: clamp(18px, 1.7vw, 24px); line-height: 1.4; letter-spacing: -.015em; color: var(--soft); }
.case-objectives { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.case-objectives li { background: var(--panel); border-radius: var(--radius); padding: 28px; min-height: 240px; display: flex; flex-direction: column; gap: 14px; }
.case-objectives__num { font-size: 13px; color: var(--muted); }
.case-objectives h3 { font-weight: 400; font-size: clamp(24px, 2.4vw, 34px); line-height: 1.05; letter-spacing: -.03em; }
.case-objectives p { margin-top: auto; color: var(--muted); font-size: 15px; line-height: 1.45; max-width: 44ch; }
.case-media-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8vh; }
.case-media { overflow: hidden; border-radius: var(--radius); background: var(--panel); aspect-ratio: 4 / 3; }
.case-media--full { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.case-impact__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.case-impact__item { background: var(--panel); border-radius: var(--radius); padding: 32px 28px; min-height: 260px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.case-impact__num { font-size: clamp(52px, 6.5vw, 100px); line-height: 1; letter-spacing: -.05em; }
.case-impact__num--text { font-size: clamp(30px, 3.4vw, 52px); letter-spacing: -.04em; }
.case-impact__label { font-size: 14px; color: var(--muted); }
.case-next { padding: 14vh var(--pad); text-align: center; border-top: 1px solid var(--line); }
.case-next .label { margin-bottom: 20px; }
.case-next__link { display: inline-flex; align-items: baseline; gap: 24px; font-size: clamp(44px, 8vw, 120px); line-height: 1; letter-spacing: -.05em; transition: transform .6s var(--ease); }
.case-next__link:hover { transform: translateX(12px); }
.case-next__arrow { font-size: .5em; color: var(--muted); }
.case-page .cta { border-top: 1px solid var(--line); }
@media (max-width: 760px) {
  .case-section__head { grid-template-columns: 1fr; }
  .case-section__lead { margin-left: 0; }
  .case-objectives, .case-impact__grid, .case-media-grid { grid-template-columns: 1fr; }
}

/* ---------- Cookie notice (blueprint grid, white) ---------- */
.cookies { --cl: color-mix(in srgb, var(--fg) 22%, transparent); position: fixed; right: var(--pad); bottom: 24px; z-index: 80; width: min(340px, calc(100vw - 2 * var(--pad))); background: var(--bg); color: var(--fg); border: 1px solid var(--cl); font-size: 12.5px; line-height: 1.45; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .6s var(--ease), transform .6s var(--ease); }
.cookies.is-on { opacity: 1; transform: none; pointer-events: auto; }
.cookies__head { display: flex; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--cl); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cookies__text { padding: 14px 12px; border-bottom: 1px solid var(--cl);
  background-image: linear-gradient(color-mix(in srgb, var(--fg) 6%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--fg) 6%, transparent) 1px, transparent 1px);
  background-size: 14px 14px; background-position: -1px -1px; }
.cookies__text a { text-decoration: underline; text-underline-offset: 2px; color: var(--muted); }
.cookies__text a:hover { color: var(--fg); }
.cookies__btns { display: grid; grid-template-columns: 1fr 1fr; }
.cookies__btn { font: inherit; font-size: 12.5px; padding: 11px 12px; cursor: pointer; border: 0; background: var(--bg); color: var(--fg); transition: background .25s, color .25s; }
.cookies__btn + .cookies__btn { border-left: 1px solid var(--cl); }
.cookies__btn:hover { background: var(--fg); color: var(--bg); }

/* ---------- Policy page (blueprint grid) ---------- */
.policy-hero { padding: 150px var(--pad) 8vh; }
.policy-updated { margin-top: 3vh; font-size: 13px; color: var(--muted); }
.policy-grid { padding: 0 var(--pad) 14vh; }
.policy-grid ol { list-style: none; border-top: 1px solid var(--line); }
.pol { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; padding: 3.2vh 0 3.6vh; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.pol__head { display: flex; align-items: baseline; gap: 18px; }
.pol__num { font-size: 13px; color: var(--muted); min-width: 2em; }
.pol h2 { font-weight: 400; font-size: clamp(22px, 2.2vw, 32px); line-height: 1.1; letter-spacing: -.035em; }
.pol p { max-width: 62ch; font-size: 15px; line-height: 1.6; color: var(--soft); }
.pol p a { text-decoration: underline; text-underline-offset: 3px; color: var(--fg); }
@media (max-width: 760px) { .pol { grid-template-columns: 1fr; gap: 10px; } }
