/* Versión 3 — estilos compartidos. Mezcla de dos referencias:
   - The Frame: letra clásica grande en mayúsculas, índice con fotitos entre palabras, fichas con datos en filas
   - Atelier: textos tipo máquina de escribir, tira de fotos, números romanos, estrella fina
   Colores duros (pedido de Ivan): blanco, negro, grises y un detalle en rojo oscuro */
:root {
  --paper: #FFFFFF;
  --bone: #EDEDED;     /* fondo mientras carga una foto */
  --stone: #A3A3A3;    /* gris medio */
  --stone-d: #7A7A7A;  /* gris oscuro */
  --char: #0B0B0B;
  --ink: #0B0B0B;
  --accent: #B8241C;   /* rojo oscuro: solo detalles */
  --line: rgba(11, 11, 11, .16);
  --serif: "Cormorant Garamond", "Cormorant", Garamond, Georgia, serif;
  --mono: "DM Mono", ui-monospace, Menlo, monospace;
  --m: clamp(16px, 2.6vw, 44px);
  --g: clamp(8px, 1.2vw, 20px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { background: var(--paper); color: var(--ink); font-family: var(--serif); font-variant-numeric: lining-nums; overflow-x: clip; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img, video { display: block; width: 100%; height: 100%; object-fit: cover; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3 { font-weight: inherit; font-size: inherit; }
::selection { background: var(--accent); color: var(--paper); }

.mono { font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; line-height: 1.6; }
/* La letra clásica fina va siempre en mayúsculas y con poco interlineado */
.cap { font-family: var(--serif); font-weight: 300; text-transform: uppercase; letter-spacing: -.005em; line-height: .86; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); padding: 0 var(--m); }
/* Bloques en negro */
.dark { background-color: var(--char); color: var(--paper); }
.dark ::selection { background: var(--paper); color: var(--ink); }


/* ---------- Escenas: bloque alto con contenido fijo mientras se scrollea ---------- */
.scene { position: relative; height: calc(var(--len, 2) * 100svh); }
.scene > .pin { position: sticky; top: 0; height: 100svh; overflow: hidden; }
/* Con "reducir movimiento": nada queda fijo y las filas se deslizan con el dedo o el trackpad */
.reduce .scene { height: auto; }
.reduce .scene > .pin { position: relative; height: auto; min-height: 100svh; }

/* Apariciones simples */
.rv { opacity: 0; transform: translateY(36px); transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
.rv.in { opacity: 1; transform: none; }
/* Palabras que se encienden */
.w { opacity: .16; transition: opacity .35s; }
.w.on { opacity: 1; }

/* ---------- Cabecera: se invierte sola sobre fotos y fondos oscuros ---------- */
.top { position: fixed; inset: 0 0 auto 0; z-index: 50; display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; padding: 16px var(--m); padding-top: calc(16px + env(safe-area-inset-top)); color: #fff; mix-blend-mode: difference; }
.top .mid { opacity: .75; }
.top nav { justify-self: end; display: flex; gap: 22px; align-items: baseline; }
.top a, .top button { position: relative; }
.top a::after, .top button::after { content: ""; position: absolute; inset: -12px -8px; }
.top a:hover, .top button:hover { text-decoration: underline; text-underline-offset: 3px; }
.top .lang { letter-spacing: inherit; text-transform: inherit; font-size: inherit; font-family: inherit; }
.top .lang span { opacity: .45; }
.top .lang span.on { opacity: 1; }
.top .menu-b { display: none; letter-spacing: inherit; text-transform: inherit; font-size: inherit; font-family: inherit; }
/* En tablet no entra «Portfolio — 2026» entre el nombre y el menú sin pegarse */
@media (max-width: 1000px) { .top .mid { visibility: hidden; } }
@media (max-width: 760px) {
  .top { grid-template-columns: 1fr auto; font-size: 10px; }
  .top .mid, .top nav a.opt { display: none; }
  .top nav { gap: 16px; }
  .top .menu-b { display: inline; }
}
.mnav { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; padding: calc(16px + env(safe-area-inset-top)) var(--m) 32px; opacity: 0; pointer-events: none; transition: opacity .35s; }
.mnav.on { opacity: 1; pointer-events: auto; }
.mnav-t { display: flex; justify-content: space-between; font-size: 10px; }
.mnav nav { margin-top: auto; display: grid; }
.mnav nav a { display: flex; align-items: baseline; gap: 14px; font-size: clamp(40px, 12vw, 64px); font-weight: 300; text-transform: uppercase; line-height: .95; border-bottom: 1px solid rgba(255, 255, 255, .2); padding: 8px 0; }
.mnav nav a .mono { opacity: .6; }

/* ---------- Botón «Hablemos»: siempre a mano mientras se recorre la página ---------- */
.talk { position: fixed; right: var(--m); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); border-radius: 999px; padding: 11px 18px; transition: opacity .35s, transform .35s var(--ease), background .3s, color .3s; }
.talk:hover { background: var(--ink); color: var(--paper); border-color: var(--paper); }
.talk.hide, .talk.pre { opacity: 0; transform: translateY(12px); pointer-events: none; }
.talk .t-up, .talk.up .t-go { display: none; }
.talk.up .t-up { display: inline; }

/* ---------- Videos ---------- */
.vbox { position: relative; width: 100%; height: 100%; }
.vbox video { cursor: pointer; }
.vbox .snd { position: absolute; left: 10px; bottom: 10px; color: #fff; mix-blend-mode: difference; font-size: 10px; padding: 6px 2px; }
.vbox .snd .on, .vbox.sound .snd .off { display: none; }
.vbox.sound .snd .on { display: inline; }

/* ---------- Contacto (The Frame: "Let's work together", foto chica al centro) ---------- */
.contact { position: relative; border-top: 1px solid rgba(255, 255, 255, .15); min-height: 100svh; display: flex; flex-direction: column; align-items: center; text-align: center; padding: calc(70px + 4vh) 0 calc(78px + env(safe-area-inset-bottom)); overflow: hidden; } /* abajo, lugar para el botón «Volver arriba» */
.c-h { font-weight: 300; text-transform: uppercase; font-size: clamp(44px, 8.4vw, 150px); line-height: .86; letter-spacing: -.01em; padding: 0 var(--m); }
.c-pic { width: clamp(96px, 11vw, 168px); aspect-ratio: 4 / 5; margin: 6vh auto; overflow: hidden; background: #333; }
.c-lines { display: grid; gap: .08em; font-size: clamp(20px, 3.2vw, 58px); font-weight: 300; text-transform: uppercase; line-height: .95; padding: 0 var(--m); }
.c-lines > * { transition: opacity .3s; }
.c-lines:hover > * { opacity: .4; }
.c-lines > *:hover { opacity: 1; }
.c-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 36px; margin-top: 7vh; }
.c-row a, .c-row button { padding: 8px 0; letter-spacing: inherit; text-transform: inherit; font-size: inherit; font-family: inherit; border-bottom: 1px solid transparent; }
.c-row a:hover, .c-row button:hover { border-color: currentColor; }
.c-foot { margin-top: auto; padding-top: 6vh; width: 100%; display: flex; justify-content: space-between; align-items: center; padding-left: var(--m); padding-right: var(--m); opacity: .7; }

/* ---------- Visor de fotos y videos (páginas de cliente y archivo) ---------- */
.lb { position: fixed; inset: 0; z-index: 90; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding: calc(16px + env(safe-area-inset-top)) var(--m) 16px; opacity: 0; pointer-events: none; transition: opacity .35s; }
.lb.on { opacity: 1; pointer-events: auto; }
.lb-t, .lb-b { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.lb-t button, .lb-b button { letter-spacing: inherit; text-transform: inherit; font-size: inherit; font-family: inherit; padding: 10px 4px; }
.lb-m { display: flex; align-items: center; justify-content: center; min-height: 0; padding: 2vh 0; }
.lb-m img, .lb-m video { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-b a { border-bottom: 1px solid; }
.lb-b button { white-space: nowrap; }
.lb-b span { text-align: center; }

/* ---------- Ventana para escribir un mail sin salir de la web ---------- */
.mb { position: fixed; inset: 0; z-index: 95; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(11, 11, 11, .72); opacity: 0; pointer-events: none; transition: opacity .35s; }
.mb.on { opacity: 1; pointer-events: auto; }
.mb-box { width: min(620px, 100%); max-height: 100%; overflow: auto; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); padding: 18px 22px 16px; transform: translateY(18px); transition: transform .5s var(--ease); }
.mb.on .mb-box { transform: none; }
.mb-t { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
.mb-t button, .mb-alt button { letter-spacing: inherit; text-transform: inherit; font-size: inherit; font-family: inherit; padding: 6px 0; }
.mb-f { display: grid; grid-template-columns: 11ch 1fr; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line); padding: 12px 0 10px; }
.mb-f > .mono:first-child { opacity: .5; }
.mb-f .mb-to { text-transform: none; letter-spacing: .02em; }
.mb input, .mb textarea { font: 300 22px/1.25 var(--serif); color: inherit; background: none; border: 0; outline: 0; width: 100%; padding: 0; border-radius: 0; }
.mb textarea { resize: none; min-height: 9.5em; flex: 1; padding: 16px 0; font-size: 20px; line-height: 1.4; }
.mb textarea::placeholder { color: var(--stone); }
.mb .bad { box-shadow: inset 0 -1px 0 var(--accent); }
.mb-hp { position: absolute; left: -9999px; }
.mb-b { display: flex; align-items: center; gap: 18px; padding-top: 12px; border-top: 1px solid var(--ink); }
.mb-send { background: var(--ink); color: var(--paper); padding: 12px 22px; border-radius: 999px; letter-spacing: inherit; text-transform: inherit; font-size: inherit; font-family: inherit; transition: opacity .3s; }
.mb-send:disabled { opacity: .4; }
.mb-st { opacity: .7; }
.mb-st a { border-bottom: 1px solid; text-transform: none; }
.mb-alt { margin-top: 14px; opacity: .55; }
.mb-alt a, .mb-alt button { border-bottom: 1px solid; }
.mb-ok { font-size: clamp(64px, 12vw, 140px); margin: 9vh 0 14px; }
.mb-ok2 { margin-bottom: 9vh; }
@media (max-width: 760px) {
  .mb { padding: 0; align-items: stretch; }
  .mb-box { width: 100%; padding: calc(14px + env(safe-area-inset-top)) var(--m) calc(14px + env(safe-area-inset-bottom)); }
  .mb-f { grid-template-columns: 9ch 1fr; }
  .mb input { font-size: 20px; }
}
