/* ============================================================
   RWRK® — sitio 2026 · v2
   Grilla suiza invisible: 12 columnas (8 en tablet, 4 en mobile).
   Tocá G en la página para ver la grilla.
   ============================================================ */

:root {
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --bg: #ffffff;
  --ink: #0a0a0a;
  --muted: #6b6b6b;
  --tile: #f1f1f1;

  --font: "roc-grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --cols: 12;
  --gap: 24px;
  --gutter: clamp(16px, 3.3vw, 48px);
  --nav-h: 68px;
  --space: clamp(96px, 13vh, 168px);  /* aire vertical entre secciones */

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);       /* lo que queda detrás de la cortina */
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html.is-loading body { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, figure { margin: 0; }
b { font-weight: 700; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid #2b44ff; outline-offset: 3px; }

/* Lenis (smooth scroll) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- GRILLA ---------- */
.wrap { width: 100%; max-width: 1760px; margin-inline: auto; padding-inline: var(--gutter); }
.g12 {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  column-gap: var(--gap);
}
.grid-overlay { position: fixed; inset: 0; z-index: 9000; pointer-events: none; display: none; }
.grid-overlay .g12 { height: 100%; }
.grid-overlay i { background: rgba(255, 40, 40, 0.07); border-inline: 1px solid rgba(255, 40, 40, 0.18); }
html.show-grid .grid-overlay { display: block; }

.skip {
  position: fixed; top: 8px; left: 8px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 14px;
  transform: translateY(-150%);
}
.skip:focus { transform: none; }

/* ---------- TIPOGRAFÍA ---------- */
.label { font-size: 14px; line-height: 1.3; letter-spacing: 0.01em; }
.label-n { color: var(--muted); margin-right: 6px; font-variant-numeric: tabular-nums; }
.h2 { font-size: clamp(32px, 3.6vw, 60px); font-weight: 400; letter-spacing: -0.03em; line-height: 1.02; }
.head-lede { font-size: 15px; line-height: 1.45; color: var(--muted); }

/* Encabezado de sección: etiqueta en col 1–3, título desde la col 4 */
.head { row-gap: 16px; align-items: start; margin-bottom: clamp(36px, 6vh, 64px); }
.head .label { grid-column: 1 / 4; padding-top: 0.5em; }
.head .h2 { grid-column: 4 / 11; }
.head .head-lede { grid-column: 11 / 13; align-self: end; }

/* ---------- CURSOR ---------- */
.cursor { position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none; display: none; mix-blend-mode: difference; will-change: transform; }
html.has-cursor .cursor { display: block; }
html.has-cursor, html.has-cursor * { cursor: none !important; }
.cursor-dot {
  display: grid; place-items: center;
  width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%;
  background: #fff;
  transform: scale(0.17);
  transition: transform 420ms var(--ease-out), opacity 200ms ease;
}
/* "Click": solo sobre los cuadros de servicio. Ahí el círculo deja de invertir
   y toma los colores del cuadro (fondo = tinta del cuadro, texto = su color). */
.cursor-label {
  font-size: 13px; letter-spacing: 0.01em; line-height: 1; color: var(--cur-ink, #0a0a0a);
  opacity: 0; transform: scale(0.6);
  transition: opacity 200ms ease, transform 420ms var(--ease-out);
}
.cursor.is-click { mix-blend-mode: normal; }
.cursor.is-click .cursor-dot { background: var(--cur-bg, #0a0a0a); transform: scale(1); }
.cursor.is-click .cursor-label { opacity: 1; transform: scale(1); transition-delay: 60ms; }
.cursor.is-text .cursor-dot { transform: scale(0.65); }
.cursor.is-grow .cursor-dot { transform: scale(1); }
.cursor.is-down .cursor-dot { transform: scale(0.82) !important; transition-duration: 160ms; }
.cursor.is-hidden .cursor-dot { opacity: 0; }

/* ---------- LOADER ---------- */
.loader { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: var(--bg); pointer-events: none; }
html.no-loader .loader { display: none; }
.loader-word {
  display: flex; align-items: baseline;
  font-size: clamp(64px, 17vw, 260px); font-weight: 700; letter-spacing: -0.04em; line-height: 1;
  transform-origin: 50% 50%; will-change: transform;
}
.loader-word .ch { display: inline-block; opacity: 0; }
.loader-word .reg, .logo .reg { font-size: 0.32em; align-self: flex-start; margin-top: 0.1em; margin-left: 0.04em; letter-spacing: 0; }
.loader-word .caret {
  display: inline-block; width: 0.035em; height: 0.74em; margin-left: 0.06em;
  background: var(--ink); align-self: center; animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- NAV ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  background: var(--bg); color: var(--ink);
  transition: background-color 400ms ease, color 400ms ease;
}
html.svc-open .nav { opacity: 0; pointer-events: none; }
.nav.is-dark { background: var(--ink); color: #fff; }
.nav-inner { height: 100%; align-items: center; }
.nav-side { grid-column: 1 / 6; display: flex; gap: 28px; }
.nav-side--end { grid-column: 8 / 13; justify-content: flex-end; }
.logo { grid-column: 6 / 8; justify-self: center; font-size: 22px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; display: inline-flex; align-items: baseline; }
.nav-link { position: relative; font-size: 15px; padding-block: 12px; }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform 420ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .nav-link:hover::after { transform: scaleX(1); transform-origin: left; } }
.nav-side { transition: opacity 700ms var(--ease-out); }
html.is-loading .nav-side { opacity: 0; }

/* ---------- MAIN (la hoja blanca que sube) ---------- */
main { position: relative; z-index: 2; background: var(--bg); }

/* ---------- HERO: 100vh exacto ---------- */
.hero { height: 100vh; height: 100svh; min-height: 560px; }
.hero-inner {
  height: 100%;
  display: grid; grid-template-rows: minmax(0, 1fr) auto; row-gap: clamp(20px, 3.2vh, 36px);
  padding-top: var(--nav-h); padding-bottom: clamp(20px, 3.5vh, 40px);
}
.banner { position: relative; overflow: hidden; background: #0a0a0a; min-height: 0; }
.banner img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%;
}
.banner-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: #0a0a0a; }
html.is-loading .banner { clip-path: inset(100% 0 0 0); }
.banner { clip-path: inset(0 0 0 0); transition: clip-path 1300ms var(--ease-in-out); }

.hero-text { align-items: end; row-gap: 20px; }
.hero-title { grid-column: 1 / 9; font-size: clamp(40px, 5.5vw, 96px); font-weight: 400; letter-spacing: -0.04em; line-height: 0.96; }
.hero-side { grid-column: 9 / 13; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.hero-lede { font-size: clamp(15px, 1.1vw, 18px); line-height: 1.45; }

.line { display: block; overflow: hidden; padding-bottom: 0.16em; margin-bottom: -0.16em; }
.line-in { display: block; transition: transform 1100ms var(--ease-out); }
html.is-loading .line-in { transform: translateY(105%); }
.line:nth-child(2) .line-in { transition-delay: 90ms; }
.hero-fade { transition: opacity 900ms var(--ease-out) 300ms, transform 900ms var(--ease-out) 300ms; }
.btn.hero-fade { transition-delay: 380ms; }
html.is-loading .hero-fade { opacity: 0; transform: translateY(14px); }

/* ---------- BOTONES ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 52px; padding: 0 22px;
  background: var(--ink); color: #fff; border-radius: 999px; font-size: 15px;
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.btn.hero-fade { transition: opacity 900ms var(--ease-out) 380ms, transform 900ms var(--ease-out) 380ms, background-color 200ms ease; }
.btn-arrow { display: inline-block; transition: transform 300ms var(--ease-out); }
.btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover .btn-arrow { transform: translateX(4px); }
}
.btn--light { background: #fff; color: var(--ink); }

/* ---------- SERVICIOS ---------- */
.services { padding-block: var(--space) calc(var(--space) * 0.8); }
.svc { position: relative; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.tile {
  position: relative; isolation: isolate; overflow: hidden;
  width: 100%; aspect-ratio: 1 / 1;
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; align-content: space-between;
  padding: clamp(16px, 1.6vw, 26px);
  background: var(--tile); color: var(--ink);
  transition: color 380ms var(--ease-out), transform 160ms var(--ease-out);
}
.tile--dark { background: var(--ink); color: #fff; }
.tile:active { transform: scale(0.985); }
.tile-fill {
  position: absolute; inset: 0; z-index: -1; background: var(--c);
  transform: scaleY(0); transform-origin: 50% 100%;
  transition: transform 560ms var(--ease-out);
}
.tile-num { grid-column: 1; grid-row: 1; display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-variant-numeric: tabular-nums; }
.tile-num::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px rgba(0,0,0,0.06); transition: transform 500ms var(--ease-out); }
.tile--dark .tile-num::before { background: #fff; }
.tile-plus { grid-column: 2; grid-row: 1; font-size: 26px; line-height: 0.8; transition: transform 500ms var(--ease-out); }
.tile-title { grid-column: 1 / -1; grid-row: 2; align-self: end; font-size: clamp(22px, 2.1vw, 36px); letter-spacing: -0.03em; line-height: 1.02; }
@media (hover: hover) and (pointer: fine) {
  .tile:hover { color: var(--c-ink); }
  .tile:hover .tile-fill { transform: scaleY(1); }
  .tile:hover .tile-plus { transform: rotate(90deg); }
  .tile:hover .tile-num::before { transform: scale(0); }
  .tile--dark:hover .tile-fill { background: #262626; }
}
.tile:focus-visible { outline-offset: -3px; outline-color: var(--ink); }

/* Panel expandido */
.panel {
  position: absolute; inset: 0; z-index: 5;
  background: var(--c, #2b44ff); color: var(--c-ink, #fff);
  clip-path: inset(0 0 0 0);
  transition: background-color 600ms var(--ease-out), color 600ms var(--ease-out);
  overflow: hidden;
}
.panel[hidden] { display: none; }
.panel-inner {
  height: 100%; display: grid; grid-template-rows: auto 1fr auto; row-gap: 24px;
  padding: clamp(16px, 1.6vw, 26px);
  transition: opacity 280ms ease;
}
.panel.is-swapping .panel-inner { opacity: 0; }
.panel-top { display: flex; justify-content: space-between; align-items: start; }
.panel-num { font-size: 14px; font-variant-numeric: tabular-nums; opacity: 0.6; }
.panel-x { position: relative; width: 48px; height: 48px; margin: -10px -10px 0 0; border-radius: 50%; transition: transform 400ms var(--ease-out); }
.panel-x span { position: absolute; left: 12px; right: 12px; top: 50%; height: 2px; background: currentColor; }
.panel-x span:first-child { transform: rotate(45deg); }
.panel-x span:last-child { transform: rotate(-45deg); }
@media (hover: hover) and (pointer: fine) { .panel-x:hover { transform: rotate(90deg); } }
.panel-body { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 28px; align-content: end; min-height: 0; }
.panel-main { grid-column: 1 / 3; }
.panel-title { font-size: clamp(44px, 6vw, 112px); font-weight: 400; letter-spacing: -0.045em; line-height: 0.94; margin-bottom: clamp(16px, 2.4vh, 28px); }
.panel-text { font-size: clamp(17px, 1.4vw, 22px); line-height: 1.35; max-width: 34ch; }
.panel-list { grid-column: 3 / 5; align-self: end; }
.panel-k { font-size: 14px; opacity: 0.6; margin-bottom: 10px; }
.panel-list li { font-size: clamp(17px, 1.4vw, 22px); line-height: 1.3; padding-block: 6px; }
.panel-list li::before { content: "— "; opacity: 0.5; }
.panel-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.panel-nav { display: flex; gap: 28px; }
.panel-step, .panel-cta { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; font-size: 15px; position: relative; }
.panel-cta { padding: 0 22px; border-radius: 999px; background: var(--c-ink); color: var(--c); transition: transform 160ms var(--ease-out); }
.panel-cta:active { transform: scale(0.97); }
.panel-step span:first-child, .panel-step span:last-child { transition: transform 300ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  [data-prev]:hover span:first-child { transform: translateX(-4px); }
  [data-next-svc]:hover span:last-child { transform: translateX(4px); }
}

/* ---------- CLIENTES ---------- */
.clients { height: 240vh; position: relative; }
.clients-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; padding-top: var(--nav-h); }
.clients .label { grid-column: 1 / 4; padding-top: 0.9em; }
.reveal-text { grid-column: 4 / 13; font-size: clamp(30px, 4.3vw, 76px); letter-spacing: -0.035em; line-height: 1.06; }
.w {
  display: inline-block;
  opacity: 0.08; filter: blur(14px); transform: translateY(0.12em);
  transition: opacity 900ms var(--ease-out), filter 900ms var(--ease-out), transform 900ms var(--ease-out);
}
.w.on { opacity: 1; filter: blur(0); transform: none; }

/* Nombres de clientes + miniatura que sigue al cursor */
.client { transition: opacity 300ms ease; white-space: nowrap; } /* el nombre del cliente nunca se corta en dos renglones */
.thumb {
  position: fixed; top: 0; left: 0; z-index: 40; pointer-events: none;
  width: clamp(140px, 11vw, 190px); aspect-ratio: 3 / 2;
  will-change: transform, opacity;
  opacity: 0;
  transition: opacity 300ms var(--ease-out);   /* fade out */
}
.thumb.is-on { opacity: 1; transition-duration: 420ms; }   /* fade in, un poco más lento */
.thumb-card {
  width: 100%; height: 100%; overflow: hidden; border-radius: 12px; background: #e9e9e9;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.35);
  transform: scale(0.96);
  transition: transform 420ms var(--ease-out);
}
.thumb.is-on .thumb-card { transform: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
html:not(.has-cursor) .thumb { display: none; }

/* Entrada de cada cuadro / tarjeta (la activa el JS) */
html.js-reveal .reveal-card {
  transform: translateY(56px);
  transition: transform 1100ms var(--ease-out) var(--d, 0ms);
}
html.js-reveal .reveal-card > .tile {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1100ms var(--ease-out) var(--d, 0ms), color 380ms var(--ease-out), transform 160ms var(--ease-out);
}
html.js-reveal .reveal-card.is-in { transform: none; }
html.js-reveal .reveal-card.is-in > .tile { clip-path: inset(0 0 0 0); }
html.js-reveal .tiles .reveal-card .tile-title,
html.js-reveal .tiles .reveal-card .tile-num { opacity: 0; transform: translateY(14px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); }
html.js-reveal .tiles .reveal-card .tile-plus { opacity: 0; transition: opacity 700ms var(--ease-out), transform 500ms var(--ease-out); }
html.js-reveal .tiles .reveal-card.is-in .tile-title,
html.js-reveal .tiles .reveal-card.is-in .tile-num { opacity: 1; transform: none; transition-delay: calc(var(--d, 0ms) + 350ms); }
html.js-reveal .tiles .reveal-card.is-in .tile-plus { opacity: 1; transition-delay: calc(var(--d, 0ms) + 350ms), 0ms; }

/* Entrada de etiquetas, títulos, bajadas y bloques del contacto (una vez) */
html.js-reveal .rv:not(.h2) {
  opacity: 0; transform: translateY(24px);
  transition: opacity 900ms var(--ease-out) var(--d, 0ms), transform 900ms var(--ease-out) var(--d, 0ms);
}
html.js-reveal .rv.is-in:not(.h2) { opacity: 1; transform: none; }
.rv-mask { display: block; overflow: hidden; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.rv-in { display: block; }
html.js-reveal .h2.rv .rv-in { transform: translateY(105%); transition: transform 1000ms var(--ease-out) var(--d, 0ms); }
html.js-reveal .h2.rv.is-in .rv-in { transform: none; }

/* ---------- CORTINA + CONTACTO ---------- */
.curtain-spacer { height: 100vh; height: 100svh; pointer-events: none; }
.contact {
  position: fixed; inset: 0; z-index: 1; height: 100vh; height: 100svh;
  background: var(--ink); color: #fff; overflow: hidden; visibility: hidden;
}
.contact.is-visible { visibility: visible; }
.contact-inner {
  height: 100%; display: flex; flex-direction: column;
  padding-top: calc(var(--nav-h) + clamp(24px, 6vh, 72px)); padding-bottom: 20px;
  will-change: transform;
}
.contact .label-n, .contact .head-lede { color: #8d8d8d; }
.contact .head { margin-bottom: 0; }

.ask { flex: 1; align-content: center; padding-block: 24px; }
.ask-col { grid-column: 4 / 11; }
.ask-progress { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #8a8a8a; font-variant-numeric: tabular-nums; margin-bottom: clamp(14px, 2.6vh, 26px); }
.ask-bar { position: relative; width: 120px; height: 1px; background: #333; margin-left: 12px; overflow: hidden; }
.ask-bar span { position: absolute; inset: 0; background: #fff; transform: scaleX(0.2); transform-origin: left; transition: transform 600ms var(--ease-out); }

.step { border: 0; margin: 0; padding: 0; min-width: 0; display: none; }
.step.is-active { display: block; animation: stepIn 260ms var(--ease-out) both; }
@keyframes stepIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.step--done:focus { outline: none; }
.q { padding: 0; font-size: clamp(28px, 3.4vw, 54px); letter-spacing: -0.035em; line-height: 1.06; margin-bottom: clamp(14px, 2.6vh, 28px); }
.field {
  width: 100%; background: transparent; color: #fff;
  border: 0; border-bottom: 1px solid #444; border-radius: 0;
  padding: 10px 0 14px; font: inherit; font-size: clamp(20px, 1.9vw, 28px); letter-spacing: -0.02em;
  transition: border-color 300ms ease; -webkit-appearance: none; appearance: none;
}
.field::placeholder { color: #5c5c5c; }
.field:focus { outline: none; border-bottom-color: #fff; }
.field--area { resize: none; line-height: 1.35; }
.err { min-height: 22px; margin-top: 8px; font-size: 14px; color: #ff8a7a; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.fields { display: grid; gap: clamp(8px, 1.6vh, 16px); }
.step-hint { margin-top: 12px; font-size: 14px; color: #8a8a8a; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.chip span {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px;
  border: 1px solid #444; border-radius: 999px; font-size: 16px;
  transition: background-color 220ms ease, color 220ms ease, border-color 220ms ease;
}
@media (hover: hover) and (pointer: fine) { .chip:hover span { border-color: #fff; } }
.chip input:checked + span { background: #fff; color: var(--ink); border-color: #fff; }
.chip input:focus-visible + span { outline: 2px solid #2b44ff; outline-offset: 3px; }

.ask-actions { display: flex; align-items: center; gap: 24px; margin-top: clamp(16px, 3vh, 32px); }
.link-btn { padding: 12px 0; color: #9a9a9a; font-size: 15px; transition: color 200ms ease; }
.link-btn:hover { color: #fff; }
.hint { font-size: 13px; color: #6a6a6a; }
.done-text { color: #9a9a9a; font-size: 18px; }
.done-text a { text-decoration: underline; text-underline-offset: 3px; }
.ask.is-done .ask-actions, .ask.is-done .ask-progress { display: none; }

.foot { align-items: center; row-gap: 4px; font-size: 14px; }
.foot-meta { grid-column: 1 / 4; color: #8d8d8d; order: -1; }
.foot-links { grid-column: 4 / 13; display: flex; flex-wrap: wrap; gap: 0 28px; }
.foot-link { position: relative; padding-block: 12px; }
.foot-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform 420ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .foot-link:hover::after { transform: scaleX(1); transform-origin: left; } }

/* ---------- COOKIES ----------
   Primera visita: entra desde abajo (300 ms) y sale por el mismo camino (200 ms). */
.cookie {
  /* pegado al borde inferior: sale de abajo y vuelve a bajar */
  position: fixed; left: var(--gutter); bottom: 0; z-index: 95;
  width: min(440px, calc(100% - 2 * var(--gutter)));
  padding: 22px 22px calc(22px + env(safe-area-inset-bottom));
  background: var(--ink); color: #fff;
  border: 1px solid #2a2a2a; border-bottom: 0; border-radius: 16px 16px 0 0;
  transform: translateY(100%);
  transition: transform 220ms var(--ease-out);
}
.cookie[hidden] { display: none; }
.cookie.is-open { transform: none; transition-duration: 380ms; transition-timing-function: var(--ease-drawer); }
.cookie-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.cookie-text { font-size: 14px; line-height: 1.45; color: #b8b8b8; }
.cookie-prefs { margin-top: 14px; display: grid; gap: 2px; }
.cookie-prefs[hidden], .cookie-actions [hidden] { display: none; }
.cookie-prefs:not([hidden]) { animation: ckFade 200ms var(--ease-out) both; }
@keyframes ckFade { from { opacity: 0; } to { opacity: 1; } }
.cookie-opt { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; }
.cookie-opt-txt { display: grid; font-size: 14px; }
.cookie-opt-txt small { font-size: 12px; color: #8d8d8d; }
.cookie-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.sw { position: relative; flex: none; width: 36px; height: 20px; border-radius: 999px; background: #3a3a3a; transition: background-color 160ms ease; }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 160ms var(--ease-out); }
.cookie-opt input:checked + .sw { background: #20f994; }
.cookie-opt input:checked + .sw::after { transform: translateX(16px); }
.cookie-opt input:disabled + .sw { opacity: 0.5; }
.cookie-opt input:focus-visible + .sw { outline: 2px solid #fff; outline-offset: 2px; }
.cookie-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 16px; }
.ck-btn { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid #444; font-size: 14px; transition: transform 160ms var(--ease-out), background-color 160ms ease, border-color 160ms ease; }
.ck-btn--primary { background: #fff; color: var(--ink); border-color: #fff; }
.ck-btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .ck-btn:not(.ck-btn--primary):hover { border-color: #fff; } }
.ck-link { min-height: 44px; padding: 0 6px; font-size: 14px; color: #b8b8b8; text-decoration: underline; text-underline-offset: 3px; }
.ck-link:hover { color: #fff; }

/* ============================================================
   VARIANTE ISLA (/isla): sin navbar superior; RWRK® + menú abajo al centro.
   ============================================================ */
html.v-isla { --nav-h: 0px; --island-space: 104px; }
html.v-isla .hero-inner { padding-top: var(--gutter); padding-bottom: var(--island-space); }
html.v-isla .contact-inner { padding-top: clamp(40px, 9vh, 96px); padding-bottom: var(--island-space); }

.island {
  position: fixed; left: 50%; bottom: 20px; z-index: 90;
  width: min(380px, calc(100vw - 32px)); margin-left: calc(min(380px, calc(100vw - 32px)) / -2);
  display: flex; flex-direction: column;
  color: #fff; pointer-events: none;
  --ci: inset(calc(100% - 52px) 30% 0 30% round 26px);
}
.island-bg {
  position: absolute; inset: 0; z-index: -1;
  /* liquid glass oscuro: tinte translúcido + desenfoque de lo que hay detrás + brillo sutil abajo (donde vive la píldora) */
  background:
    linear-gradient(to top, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0) 56px),
    rgba(18, 18, 20, 0.76);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
  clip-path: var(--ci);
  transition: clip-path 380ms var(--ease-out), background-color 300ms ease, opacity 500ms var(--ease-out);
}
/* Abrir es más lento y suave que cerrar: el usuario está mirando cómo crece */
.island.is-open .island-bg {
  clip-path: inset(0 0 0 0 round 28px);
  transition: clip-path 720ms var(--ease-drawer), background-color 300ms ease, opacity 500ms var(--ease-out);
}

.island-menu { padding: 26px 26px 10px; display: grid; gap: 2px; visibility: hidden; }
.island.is-open .island-menu { visibility: visible; pointer-events: auto; }
.island-menu a {
  display: block; padding-block: 6px; font-size: 28px; letter-spacing: -0.03em; line-height: 1.1;
  opacity: 0; transform: translateY(8px);
  transition: opacity 120ms ease, transform 120ms var(--ease-out);
}
.island-menu .island-meta { display: flex; gap: 20px; padding-top: 10px; }
.island-menu .island-meta a { font-size: 15px; letter-spacing: 0; color: #9a9a9a; }
@media (hover: hover) and (pointer: fine) { .island-menu .island-meta a:hover { color: #fff; } .island.is-light .island-menu .island-meta a:hover { color: var(--ink); } }
.island.is-open .island-menu a {
  opacity: 1; transform: none;
  transition: opacity 420ms var(--ease-out), transform 620ms var(--ease-out);
}
.island.is-open .island-menu li:nth-child(1) a { transition-delay: 240ms; }
.island.is-open .island-menu li:nth-child(2) a { transition-delay: 300ms; }
.island.is-open .island-menu li:nth-child(3) a { transition-delay: 360ms; }
.island.is-open .island-menu li:nth-child(4) a { transition-delay: 420ms; }
.island.is-open .island-menu li:nth-child(5) a { transition-delay: 480ms; }
@media (hover: hover) and (pointer: fine) {
  .island-menu a:not(.island-meta a) { transition-property: opacity, transform, color; }
  .island-menu li:not(.island-meta) a:hover { color: #9a9a9a; }
}

.island-bar {
  align-self: center; display: flex; align-items: center; gap: 14px;
  height: 52px; padding: 0 6px 0 22px; pointer-events: auto;
}
.island-bar .logo { font-size: 18px; }
.island-burger { position: relative; width: 40px; height: 40px; border-radius: 50%; }
.island-burger span {
  position: absolute; left: 12px; right: 12px; height: 1.5px; background: currentColor;
  transition: transform 300ms var(--ease-out);
}
.island.is-open .island-burger span { transition-duration: 520ms; }
.island-burger span:first-child { top: 16px; }
.island-burger span:last-child { top: 23px; }
.island.is-open .island-burger span:first-child { transform: translateY(3.5px) rotate(45deg); }
.island.is-open .island-burger span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.island-burger:active { transform: scale(0.94); transition: transform 120ms var(--ease-out); }

/* Sobre el contacto negro, la isla se invierte */
.island.is-light { color: var(--ink); }
.island.is-light .island-bg {
  background:
    linear-gradient(to top, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 56px),
    rgba(255, 255, 255, 0.86);
}
.island.is-light .island-menu .island-meta a { color: var(--muted); }

/* Durante el loader solo existe el lugar del logo; la píldora aparece cuando aterriza */
html.is-loading .island-bg { opacity: 0; }
html.is-loading .island-burger { opacity: 0; }
.island-bg { opacity: 1; }
.island-burger { transition: opacity 500ms var(--ease-out) 200ms; }

html.svc-open .island { opacity: 0; pointer-events: none; }
@media (max-width: 720px) {
  html.v-isla { --island-space: 92px; }
  .island { bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .island-bg, .island-menu a, .island-burger span { transition-duration: 1ms !important; transition-delay: 0ms !important; }
}

/* ---------- TABLET: 8 columnas ---------- */
@media (max-width: 1024px) {
  :root { --cols: 8; --gap: 16px; }
  .nav-side { grid-column: 1 / 4; }
  .logo { grid-column: 4 / 6; }
  .nav-side--end { grid-column: 6 / 9; }
  .head .label { grid-column: 1 / 3; }
  .head .h2 { grid-column: 3 / 9; }
  .head .head-lede { grid-column: 3 / 9; }
  .hero-title { grid-column: 1 / 9; }
  .hero-side { grid-column: 1 / 9; flex-direction: row; align-items: end; justify-content: space-between; }
  .hero-lede { max-width: 46ch; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { aspect-ratio: 16 / 10; }
  .panel-body { grid-template-columns: 1fr 1fr; }
  .panel-main { grid-column: 1 / -1; }
  .panel-list { grid-column: 1 / -1; }
  .clients .label { grid-column: 1 / 3; }
  .reveal-text { grid-column: 3 / 9; }
  .ask-col { grid-column: 3 / 9; }
  .foot-meta { grid-column: 1 / 3; }
  .foot-links { grid-column: 3 / 9; }
}

/* ---------- MOBILE: 4 columnas ---------- */
@media (max-width: 720px) {
  :root { --cols: 4; --gap: 12px; --nav-h: 58px; }
  .nav-side { grid-column: 1 / 2; }
  .nav-side .nav-link:not([data-to-contact]) { display: none; }
  .logo { grid-column: 2 / 4; font-size: 19px; }
  .nav-side--end { grid-column: 4 / 5; }
  .nav-link { font-size: 14px; }
  .head .label, .head .h2, .head .head-lede,
  .hero-title, .hero-side, .clients .label, .reveal-text, .ask-col, .foot-meta, .foot-links { grid-column: 1 / -1; }
  .hero-side { flex-direction: column; align-items: stretch; gap: 16px; }
  /* el reel tiene texto en el centro: en el celular el banner es casi cuadrado para que la frase entre entera */
  /* en el celular el hero mide lo que ocupa: banner + texto, sin hueco en el medio */
  /* el hero ocupa la pantalla: video arriba, texto y botón abajo apoyados sobre la isla; Servicios aparece recién al scrollear */
  .hero { height: auto; min-height: 100vh; min-height: 100svh; }
  html.v-isla .hero-inner { height: auto; min-height: 100vh; min-height: 100svh; grid-template-rows: auto 1fr; row-gap: 20px; padding-bottom: var(--island-space); }
  /* título y bajada centrados en el espacio entre el video y el botón; el botón queda abajo */
  .hero-text { align-self: stretch; display: flex; flex-direction: column; row-gap: 16px; }
  .hero-text .hero-side { display: contents; }
  .hero-text .hero-title { margin-top: auto; }
  .hero-text .hero-lede { margin-bottom: auto; }
  .hero-text .btn { margin-top: 6px; }
  .banner { aspect-ratio: 4 / 3; }
  .hero-side .btn { width: 100%; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tile { aspect-ratio: 1 / 1; }
  .tile-title { font-size: 20px; }
  /* en mobile el panel ocupa la pantalla */
  .panel { position: fixed; z-index: 70; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .panel-inner { min-height: 100%; height: auto; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
  .panel-body { align-content: start; }
  .panel-foot { flex-direction: column-reverse; align-items: stretch; }
  .panel-cta { justify-content: space-between; }
  .panel-nav { justify-content: space-between; }
  :root { --space: 72px; }
  .services { padding-bottom: 24px; }
  /* el texto de clientes queda arriba (no centrado en la pantalla), así no hay un hueco antes */
  /* el texto de clientes queda centrado en la pantalla mientras se aclara */
  .clients { height: 160vh; }
  .clients-sticky { align-items: center; padding-top: 0; padding-bottom: 40px; }
  .clients .label { padding-top: 0; margin-bottom: 14px; }
  .contact .head-lede, .hint { display: none; }
  .contact .head { row-gap: 4px; }
  .foot { row-gap: 0; }
  .foot-meta { order: 1; }
}
@media (max-height: 680px) and (min-width: 721px) {
  .contact .head-lede { display: none; }
}

/* ---------- MOVIMIENTO REDUCIDO ---------- */
@media (prefers-reduced-motion: reduce) {
  .line-in, .hero-fade, .banner, .banner img { transition: none !important; }
  .tile-fill { transform: none; opacity: 0; transition: opacity 200ms ease; }
  .tile:hover .tile-fill { opacity: 1; }
  .w { opacity: 1; filter: none; transform: none; transition: none; }
  .step.is-active { animation: none; }
  .cookie { transform: none !important; opacity: 0; transition: opacity 200ms ease !important; }
  .cookie.is-open { opacity: 1; }
  html.js-reveal .rv:not(.h2), html.js-reveal .reveal-card, html.js-reveal .h2.rv .rv-in,
  html.js-reveal .tiles .reveal-card .tile-title, html.js-reveal .tiles .reveal-card .tile-num { transform: none !important; }
  html.js-reveal .rv:not(.h2), html.js-reveal .tiles .reveal-card .tile-title, html.js-reveal .tiles .reveal-card .tile-num,
  html.js-reveal .tiles .reveal-card .tile-plus { transition: opacity 200ms ease !important; }
  html.js-reveal .reveal-card > .tile { clip-path: none !important; }
  html.js-reveal .reveal-card { transition: none !important; }
  .loader-word .caret { animation: none; }
}
