/* ORVA Studio — estilos del sitio. Valores tomados de marca/tokens.json. */

:root {
  --paper: #FFFFFF;
  --surface: #F4F4F2;
  --stone: #D6D6D2;
  --stone-2: #C9C9C4;
  --line: #E4E4E0;
  --ink: #0E0E0E;
  --ink-muted: #6B6B6B;
  --on-ink: #FFFFFF;
  --accent: #B5524F;
  --on-accent: #FFFFFF;
  --good: #1E8A4C;
  --bad: #C0392B;

  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;

  --radius-sm: 4px;
  --radius-full: 999px;

  --gutter: var(--space-4);
  --section: var(--space-16);
  --max: 1200px;
  --hh: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0E0E0E;
    --surface: #181818;
    --stone: #3A3A38;
    --stone-2: #2F2F2D;
    --line: #2A2A2A;
    --ink: #F5F5F3;
    --ink-muted: #9A9A9A;
    --on-ink: #0E0E0E;
    --accent: #C9645F;
    --on-accent: #0E0E0E;
    --good: #3DBE74;
    --bad: #E5675B;
    color-scheme: dark;
  }
}

@media (min-width: 900px) {
  :root {
    --gutter: var(--space-12);
    --section: var(--space-24);
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: var(--hh); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 26px;
  font-weight: 400;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ---------- tipografía ---------- */
.display { font-size: clamp(44px, 9vw, 72px); line-height: 1; font-weight: 500; letter-spacing: -0.02em; text-wrap: balance; }
h2, .h2 { font-size: 28px; line-height: 34px; font-weight: 500; letter-spacing: -0.01em; text-wrap: balance; }
h3 { font-size: 20px; line-height: 28px; font-weight: 500; }
.small { font-size: 14px; line-height: 20px; }
.muted { color: var(--ink-muted); }
.label {
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
@media (min-width: 900px) { h2, .h2 { font-size: 40px; line-height: 44px; } }

/* ---------- botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 12px var(--space-6);
  border-radius: var(--radius-sm);
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--on-ink);
  font: 500 15px/20px var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: opacity .2s;
}
.btn:hover { opacity: .85; }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--line { background: transparent; color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-4); }

/* ---------- encabezado ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header .wrap { display: flex; align-items: center; justify-content: space-between; height: var(--hh); }
.logo { font-size: 20px; font-weight: 500; letter-spacing: 0.04em; text-decoration: none; }
.nav { display: flex; gap: var(--space-8); }
.nav a { text-decoration: none; font-size: 15px; padding-block: 4px; border-bottom: 1px solid transparent; }
.nav a:hover { color: var(--ink-muted); }
.nav a[aria-current="page"] { border-color: var(--ink); }
.menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font: 500 14px/1 var(--sans);
  padding: 10px 14px;
  cursor: pointer;
}
@media (max-width: 719px) {
  .menu-btn { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: var(--hh);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .nav a { padding: var(--space-4) var(--gutter); border-top: 1px solid var(--line); border-bottom: 0; }
}

/* ---------- secciones ---------- */
.section { padding-block: var(--section); border-bottom: 1px solid var(--line); }
.section-head { display: flex; flex-direction: column; gap: var(--space-4); margin-bottom: var(--space-12); max-width: 760px; }
.hero { padding-block: var(--section); }
.hero .wrap { display: flex; flex-direction: column; gap: var(--space-8); }
.hero p { max-width: 560px; font-size: 18px; line-height: 28px; }

/* ---------- placeholders de foto / video ---------- */
.ph-in {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--stone);
}
.ph-in.tone-1 { background: var(--stone-2); }
.ph-in.tone-2 { background: var(--line); }
.ph-in img, .ph-in video { width: 100%; height: 100%; object-fit: cover; }
.ph-in > img, .ph-in > video { position: absolute; inset: 0; }
/* en la vista en grande se ve completa (fotos y videos verticales) sobre fondo oscuro */
.lb-media .ph-in { background: #0E0E0E; }
.lb-media .ph-in img, .lb-media .ph-in video { object-fit: contain; }
/* galería: las fotos se deslizan de lado */
.gal-strip { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gal-strip::-webkit-scrollbar { display: none; }
.gal-strip img, .gal-strip video { flex: 0 0 100%; min-width: 0; height: 100%; scroll-snap-align: center; }
.gal-btn {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  color: #0E0E0E;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.gal-btn.prev { left: var(--space-4); }
.gal-btn.next { right: var(--space-4); }
.gal-btn:disabled { opacity: 0; pointer-events: none; }
.gal-count { position: absolute; top: var(--space-4); left: 50%; translate: -50% 0; color: #FFFFFF; opacity: .8; }

/* ============ MOVIMIENTO ============
   Solo se activa con html.js (el script lo pone si la persona no pidió menos movimiento).
   Sin script, todo se ve en su lugar final. */

/* aparece desde abajo */
html.js .rv { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s var(--ease); transition-delay: calc(var(--d, 0) * 100ms); }
html.js .rv.in { opacity: 1; transform: none; }

/* texto que entra palabra por palabra */
[data-split] .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .1em; margin-bottom: -.1em; }
[data-split] .w > span { display: inline-block; }
html.js [data-split] .w > span { transform: translateY(110%); transition: transform .9s var(--ease); transition-delay: calc(var(--base, 0ms) + var(--i) * var(--step, 70ms)); }
html.js [data-split].in .w > span { transform: none; }

/* foto que se destapa de abajo hacia arriba */
.media { position: relative; overflow: hidden; background: var(--stone); }
html.js .media { clip-path: inset(100% 0 0 0); transition: clip-path 1.2s var(--ease); }
html.js .media.in { clip-path: inset(0 0 0 0); }
html.js .media .ph-in { transform: scale(1.18); transition: transform 1.8s var(--ease); }
html.js .media.in .ph-in { transform: none; }

/* transición entre páginas */
html.js body.enter main { animation: page-in .7s var(--ease) both; }
html.js body.leave main, html.js body.leave footer { animation: page-out .25s ease both; }
@keyframes page-in { from { opacity: 0; transform: translateY(16px); } }
@keyframes page-out { to { opacity: 0; transform: translateY(-8px); } }

/* ---------- 0. Portada que entra sola, como video ----------
   Colores fijos: es el cuadro del video, se ve igual en tema claro y oscuro. */
.opening { padding: var(--space-2) var(--space-2) 0; }
.opening-box {
  position: relative;
  height: calc(100svh - var(--hh) - var(--space-2));
  min-height: 480px;
  background: #0E0E0E;
  color: #FFFFFF;
  overflow: hidden;
}
.opening-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.opening-box .label { color: #FFFFFF; opacity: .6; }
/* el video ocupa todo el recuadro; el "Desliza" va encima */
.opening-hint { z-index: 1; }
.opening-hint {
  position: absolute;
  bottom: var(--space-6);
  left: 50%;
  translate: -50% 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}
.opening-hint i { width: 1px; height: 40px; background: #FFFFFF; transform-origin: top; animation: hint 1.6s ease-in-out infinite; }
html.js .opening-box { animation: open-box .9s var(--ease) both; }
html.js .opening:not(.in) .opening-box,
html.js .opening:not(.in) .opening-box * { animation-play-state: paused; }
html.js .opening-hint { animation: fade-in .6s ease 1.2s both; }
@keyframes open-box { from { clip-path: inset(22% 30%); } to { clip-path: inset(0); } }
@keyframes fade-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .opening-hint i { animation: none; } }

/* ---------- 1. ORVA se arma letra por letra ---------- */
.intro { position: relative; }
/* la sección mide una pantalla; la animación la dispara main.js al verla */
.intro-stick {
  position: relative;
  height: calc(100svh - var(--hh));
  min-height: 520px;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding-inline: var(--gutter);
}
.word {
  display: flex;
  font-size: min(26vw, 32svh);
  line-height: .9;
  font-weight: 500;
  letter-spacing: -0.04em;
}
.word-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: min(26vw, 32svh);
  transform: translateY(calc(var(--copy, 1) * -0.5em));
}
.word .l { display: inline-block; will-change: transform, opacity; }
.intro-copy {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: var(--space-16);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
}
.intro-phrase { font-size: clamp(26px, 4.4vw, 56px); line-height: 1.1; font-weight: 500; letter-spacing: -0.02em; text-wrap: balance; }
html.js .intro-copy .actions { opacity: 0; transform: translateY(12px); transition: opacity .7s ease 900ms, transform .7s var(--ease) 900ms; }
html.js .intro-copy.on .actions { opacity: 1; transform: none; }
html.js .intro-copy[data-hidden] { visibility: hidden; }
.hint {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  translate: -50% 0;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}
html.js .hint { display: flex; opacity: var(--hint, 0); }
.hint i { width: 1px; height: 40px; background: var(--ink); transform-origin: top; animation: hint 1.6s ease-in-out infinite; }
@keyframes hint { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- 3. Resultados: antes y después de ORVA ---------- */
.results .section-head { margin-bottom: var(--space-8); }
.sample {
  display: inline-block;
  margin-left: var(--space-2);
  padding: 2px 8px;
  border: 1px dashed var(--ink-muted);
  border-radius: var(--radius-full);
  font-size: 12px;
  line-height: 18px;
}
.sample.real { border-style: solid; border-color: var(--line); }
.res-controls { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-4); margin-bottom: var(--space-6); }
.res-brands { display: flex; flex-wrap: wrap; gap: var(--space-2); }
/* interruptor Antes / Con ORVA */
.res-switch {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.res-switch span { position: relative; z-index: 1; padding: 6px 16px; text-align: center; transition: color .35s ease; }
.res-switch::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: var(--radius-full);
  background: var(--ink);
  transition: transform .45s var(--ease), background .35s ease;
}
.res-switch[aria-pressed="true"]::before { transform: translateX(100%); background: var(--accent); }
.res-switch[aria-pressed="false"] span:first-child,
.res-switch[aria-pressed="true"] span:last-child { color: var(--on-ink); }
.res-switch:disabled { opacity: .4; cursor: default; }

.res-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); margin-bottom: var(--space-8); }
@media (max-width: 899px) { .res-grid { grid-template-columns: 1fr 1fr; } }
.metric {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-4);
  border-top: 1px solid var(--ink);
}
.metric b { font-size: clamp(36px, 5vw, 64px); line-height: 1; font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.metric .delta { font-size: 14px; color: var(--good); opacity: 0; transform: translateY(6px); transition: opacity .4s ease, transform .4s var(--ease); }
.metric.after .delta { opacity: 1; transform: none; }
.metric .bar { height: 4px; background: var(--line); overflow: hidden; margin-top: var(--space-2); }
.metric .bar i { display: block; height: 100%; width: var(--w, 0%); background: var(--ink); transition: width 1s var(--ease), background .4s ease; }
.metric.after .bar i { background: var(--good); }
.metric.down .delta { color: var(--bad); }
.metric.down.after .bar i { background: var(--bad); }
.res-total { grid-column: 1 / -1; order: 1; color: var(--ink-muted); font-size: 16px; line-height: 24px; }
.res-empty { grid-column: 1 / -1; padding: var(--space-8) 0; border-top: 1px solid var(--ink); color: var(--ink-muted); font-size: 18px; line-height: 28px; }

/* ---------- 4. Servicios: nombres enormes ---------- */
.section--ink { background: var(--ink); color: var(--on-ink); border-bottom: 0; position: relative; }
.section--ink .label { color: var(--on-ink); opacity: .6; }
.svc-list { list-style: none; padding: 0; border-top: 1px solid rgba(127, 127, 127, .35); }
.svc {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: var(--space-2) var(--space-4);
  align-items: baseline;
  padding-block: var(--space-6);
  border-bottom: 1px solid rgba(127, 127, 127, .35);
  transition: opacity .35s ease;
}
.svc .n { opacity: .6; font-size: 14px; font-variant-numeric: tabular-nums; }
.svc h3 { font-size: clamp(40px, 8vw, 112px); line-height: 1; letter-spacing: -0.03em; transition: transform .5s var(--ease), clip-path 1s var(--ease); }
.svc p { grid-column: 2; opacity: .7; max-width: 36ch; }
html.js .svc h3 { clip-path: inset(0 0 100% 0); }
html.js .svc.in h3 { clip-path: inset(0 0 -10% 0); }
@media (hover: hover) and (min-width: 900px) {
  .svc { grid-template-columns: 64px 1fr 32ch; }
  .svc p { grid-column: 3; opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .35s var(--ease); }
  .svc-list:hover .svc { opacity: .3; }
  .svc-list .svc:hover { opacity: 1; }
  .svc:hover h3 { transform: translateX(var(--space-6)); }
  .svc:hover p { opacity: .7; transform: none; }
}
/* vista previa que sigue al cursor */
.peek {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 40;
  width: 280px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  translate: -50% -50%;
  scale: .85;
  transition: opacity .3s ease, scale .4s var(--ease);
  display: none;
}
.peek.on { opacity: 1; scale: 1; }
@media (hover: hover) and (min-width: 900px) { html.js .peek { display: block; } }

/* ---------- 5. Estudio: el texto se enciende al bajar ---------- */
.manifesto .wrap { display: flex; flex-direction: column; gap: var(--space-8); }
.manifesto-text { font-size: clamp(28px, 4.6vw, 60px); line-height: 1.15; letter-spacing: -0.02em; font-weight: 500; max-width: 24ch; }
html.js .manifesto-text .mw { color: var(--stone); transition: color .3s ease; }
html.js .manifesto-text .mw.lit { color: var(--ink); }

/* ---------- 6. Contacto ---------- */
.contact .wrap { display: flex; flex-direction: column; gap: var(--space-8); }
/* un solo renglón en cualquier pantalla: el tamaño crece con el ancho y nunca se parte */
.contact-big { font-size: min(12vw, 120px); line-height: 1.05; font-weight: 500; letter-spacing: -0.03em; white-space: nowrap; }
.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-6) var(--space-8); }
.contact-mail { font-size: clamp(22px, 3vw, 36px); line-height: 1.2; text-decoration: none; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.contact-mail:hover { border-color: var(--ink); }

/* ---------- pie ---------- */
.footer { padding-block: var(--space-16) var(--space-8); }
.footer-cols { display: grid; grid-template-columns: 1fr; gap: var(--space-8); }
.footer-cols > div { display: flex; flex-direction: column; gap: var(--space-2); }
.footer-cols a { text-decoration: none; }
.footer-cols a:hover { color: var(--ink-muted); }
.footer-copy { margin-top: var(--space-12); padding-top: var(--space-6); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-4); }
@media (min-width: 720px) { .footer-cols { grid-template-columns: 2fr 1fr 1fr; } }

/* ============ PÁGINA TRABAJO ============ */
.pagehead { padding-block: var(--space-16) var(--space-8); }
.pagehead .wrap { display: flex; flex-direction: column; gap: var(--space-6); }
.pagehead p { max-width: 560px; }
.filters { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip {
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--ink);
  padding: 8px 16px;
  font: 500 14px/20px var(--sans);
  cursor: pointer;
}
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.chip small { opacity: .6; margin-left: 6px; font-size: 12px; font-variant-numeric: tabular-nums; }
.work { padding-block: var(--space-8) var(--section); border-bottom: 1px solid var(--line); }
.work-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-8) var(--space-6); }
@media (min-width: 600px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .work-grid { grid-template-columns: repeat(3, 1fr); } }
.wcard {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
  will-change: transform, opacity;
}
.wcard[hidden] { display: none; }
.wcard .thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; width: 100%; }
.wcard .thumb .ph-in { transition: transform .8s var(--ease); }
.wcard:hover .thumb .ph-in { transform: scale(1.05); }
.wcard .meta { display: flex; justify-content: space-between; gap: var(--space-4); align-items: baseline; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(14, 14, 14, .88);
  display: grid;
  place-items: center;
  padding: var(--space-4);
}
html.js .lightbox:not([hidden]) { animation: page-in .4s var(--ease) both; }
.lb-box {
  position: relative;
  width: 100%;
  max-width: 960px;
  max-height: calc(100svh - 32px);
  overflow: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr;
}
.lb-media { position: relative; aspect-ratio: 4 / 5; max-height: 70svh; }
.lb-info { padding: var(--space-8) var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.lb-info .btn { align-self: flex-start; margin-top: var(--space-4); }
.lb-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
@media (min-width: 800px) { .lb-box { grid-template-columns: 3fr 2fr; } .lb-media { aspect-ratio: auto; max-height: none; min-height: 560px; } }

.cta-band { padding-block: var(--section); }
.cta-band h2 { font-size: min(12vw, 72px); line-height: 1.1; white-space: nowrap; }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-8); }

/* ---------- menos movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hint i { animation: none; }
}

/* ---------- Marcas con las que trabajamos ---------- */
.clients .wrap { display: flex; flex-direction: column; gap: var(--space-8); }
.client-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-8);
  font-size: clamp(24px, 3.4vw, 44px);
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.client-list li { color: var(--ink-muted); transition: color .3s ease; }
.client-list li:hover { color: var(--ink); }

/* ---------- etiquetas dentro de cada programa ---------- */
.svc .tags { display: block; margin-top: var(--space-2); font-size: 13px; letter-spacing: .04em; opacity: .7; }

/* ---------- Contacto: varias puertas ---------- */
.doors { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
.door {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.door-t { font-size: clamp(20px, 2.4vw, 28px); line-height: 1.25; overflow-wrap: anywhere; }
a.door:hover .door-t { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
/* 2 × 2 en pantallas medianas, 4 en una fila en las grandes (así el correo no se parte) */
@media (min-width: 720px) {
  .doors { grid-template-columns: repeat(2, 1fr); }
  .door { padding-right: var(--space-6); }
  .door:nth-child(2n) { border-left: 1px solid var(--line); padding-left: var(--space-6); }
}
@media (min-width: 1200px) {
  .doors { grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
  .door { border-bottom: 0; padding: var(--space-6) var(--space-6) var(--space-6) 0; }
  .door + .door { border-left: 1px solid var(--line); padding-left: var(--space-6); }
}
.door-t { overflow-wrap: normal; }

/* ---------- caso en la vista en grande: reto, idea, resultado ---------- */
.case { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.case > div { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-4) 0; border-bottom: 1px solid var(--line); }
.wcard .meta > div { display: flex; flex-direction: column; gap: 2px; }

/* ---------- ORVA: reflejo debajo del nombre, con las disciplinas ---------- */
.reflect {
  display: grid;
  height: .85em;
  overflow: hidden;
  margin-top: -.18em;
  opacity: var(--copy, 1);
}
.reflect > * { grid-area: 1 / 1; }
.reflect-letters {
  transform: scaleY(-1);
  filter: url(#water);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, .18), transparent 65%);
  mask-image: linear-gradient(to top, rgba(0, 0, 0, .18), transparent 65%);
}
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* disciplinas: van sobre el reflejo, sin recortarse, para poder caer desde arriba */
.reflect-words {
  position: absolute;
  top: .72em;
  left: 0;
  right: 0;
  justify-content: center;
  pointer-events: none;
}
.reflect-words span { position: relative; display: inline-block; height: .85em; color: transparent; }
.reflect-words i {
  position: absolute;
  top: 42%;
  left: 50%;
  translate: -50% 0;
  font-style: normal;
  font-size: 16px;
  line-height: 20px;
  font-weight: 500;
  letter-spacing: .1em;
  padding-left: .1em; /* compensa el espacio que deja la última letra */
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}
html.js .reflect-words i { opacity: 0; transform: translateY(-90px); transition: transform .7s cubic-bezier(.55, 0, .9, .5), opacity .5s ease; }
html.js .reflect-words i.down { opacity: 1; transform: none; }
@media (max-width: 719px) { .reflect-words i { font-size: 12px; letter-spacing: .06em; } }

/* ---------- Postura: segundo párrafo ---------- */
.manifesto-sub { max-width: 56ch; font-size: 18px; line-height: 28px; color: var(--ink-muted); }

/* ---------- Disciplinas: la letra en lugar del número ---------- */
.svc .n { font-size: 18px; font-weight: 500; opacity: .5; }

/* ---------- Trabajo reciente: carrusel horizontal ----------
   Sin movimiento (o en celular) es una fila que se desliza con el dedo.
   Con movimiento en compu, la sección se queda fija y la fila avanza mientras bajas. */
.hwork { position: relative; border-bottom: 1px solid var(--line); }
.hwork-stick { display: flex; flex-direction: column; gap: var(--space-8); padding-block: var(--section); overflow: hidden; }
.hwork-head { display: flex; justify-content: space-between; align-items: end; gap: var(--space-4); padding-inline: var(--gutter); max-width: calc(var(--max) + 2 * var(--gutter)); width: 100%; margin-inline: auto; }
.hwork-head > div { display: flex; flex-direction: column; gap: var(--space-4); }
.hwork-track {
  display: flex;
  gap: var(--space-4);
  padding-inline: var(--gutter);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.hwork-track::-webkit-scrollbar { display: none; }
.hcard {
  flex: none;
  width: min(72vw, 360px);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
}
.hcard-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--stone); }
.hcard-media img, .hcard-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.hcard:hover .hcard-media img, .hcard:hover .hcard-media video { transform: scale(1.04); }
.hcard-n { position: absolute; top: var(--space-2); left: var(--space-2); padding: 2px 8px; background: var(--paper); color: var(--ink); font-size: 12px; line-height: 18px; font-variant-numeric: tabular-nums; }
.hcard b { font-weight: 500; font-size: 18px; line-height: 24px; }
.hcard .label { color: var(--ink-muted); }
.hcard-more { display: grid; place-items: center; aspect-ratio: 4 / 5; border: 1px solid var(--ink); font-size: 22px; font-weight: 500; text-align: center; padding: var(--space-6); }
.hcard-more:hover { background: var(--ink); color: var(--on-ink); }
@media (min-width: 900px) {
  html.js .hwork-stick { position: sticky; top: var(--hh); height: calc(100svh - var(--hh)); min-height: 560px; padding-block: var(--space-8); justify-content: center; }
  html.js .hwork-track { overflow: visible; scroll-snap-type: none; will-change: transform; }
  html.js .hcard { width: calc((100svh - var(--hh) - 260px) * .8); min-width: 260px; max-width: 420px; }
}

/* ---------- WhatsApp: botón flotante (abajo a la derecha, en todas las páginas) ---------- */
.wa-float {
  position: fixed;
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 12px 18px;
  border-radius: var(--radius-full);
  background: var(--ink);
  color: var(--on-ink);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
  transition: transform .3s var(--ease);
}
.wa-float:hover { transform: translateY(-2px); }
.wa-float i { width: 8px; height: 8px; border-radius: 50%; background: #25D366; box-shadow: 0 0 0 3px rgba(37, 211, 102, .25); }
html.js .wa-float { animation: fade-in .6s ease 2.5s both; }

/* ---------- iconos de redes ---------- */
.socials { display: flex; gap: var(--space-2); margin-top: var(--space-1); }
.socials a {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.socials a:hover { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.socials svg { width: 22px; height: 22px; }
.socials--sm a { width: 36px; height: 36px; }
.socials--sm svg { width: 18px; height: 18px; }
