/* =========================================================
   Ana Simón Estudio · estilos compartidos por todo el sitio
   Escala: el diseño se dibujó en 1440 × 900. --u es "un píxel
   del tablero" y se ajusta al tamaño de la ventana (sitio.js).
   ========================================================= */

:root {
  --negro: #000000;
  --blanco: #FFFFFF;
  --carbon: #0B0B0A;
  --goudy: 'goudy-old-style', 'EB Garamond', Georgia, serif;
  --jost: 'Jost', sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --u: min(calc(100vw / 1440), calc(100vh / 640));
}

html { -webkit-text-size-adjust: 100%; }
html.bloqueo { overflow: hidden; }
body {
  margin: 0;
  background: var(--blanco);
  color: var(--negro);
  font-family: var(--goudy);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
@media (hover: hover) { a:hover { opacity: 0.6; } }
p, h2, h3 { text-wrap: pretty; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

.sitio { position: relative; overflow-x: clip; }
.j { font-family: var(--jost); font-weight: 200; }
.escena { position: relative; width: calc(1440 * var(--u)); margin: 0 auto; }
/* Cortes por sentido: cada frase se mantiene entera; el renglón solo corta entre frases */
.fr { display: inline-block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Líneas que emergen */
.linea { display: block; overflow: hidden; padding-top: 0.22em; margin-top: -0.22em; }
.linea > span { display: block; transition: transform 1s var(--ease), opacity 1s ease; }

/* Tipografía viva: hover en titulares (solo la línea en mayúsculas) */
.viva .caps { transition: letter-spacing 0.8s var(--ease); }
.viva:hover .caps { letter-spacing: 0.09em !important; }

/* Links con flecha: la flecha avanza 4 px y el subrayado crece desde después de la flecha */
a.fl {
  display: inline-flex; align-items: center; gap: 12px; text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat; background-position: 28px 100%; background-size: 0 1px;
  padding-bottom: 3px; transition: background-size 0.5s var(--ease);
}
a.fl:hover { opacity: 1; background-size: calc(100% - 28px) 1px; }
a.fl svg { flex: none; transition: transform 0.4s var(--ease); }
a.fl:hover svg { transform: translateX(4px); }

/* Atenuar los hermanos al pasar sobre uno */
.op .o { transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.op .o:hover { opacity: 1; }
@media (hover: hover) { .op:has(.o:hover) .o:not(:hover) { opacity: 0.35; } }

/* Profundidad de lente en las fotos (solo con mouse) */
.lente .foto img {
  transform: perspective(800px) translate(calc(var(--mx, 0) * -12px), calc(var(--my, 0) * -12px)) scale(var(--ms, 1)) rotateY(calc(var(--mx, 0) * 1.5deg)) rotateX(calc(var(--my, 0) * -1.5deg));
  transition: transform 1.2s var(--ease);
}
.lente .foto.activa img { transition: transform 0.5s var(--ease); }

/* ---------- Textura de papel fija a la ventana ---------- */
.papel { position: fixed; inset: 0; z-index: 40; pointer-events: none; mix-blend-mode: multiply; opacity: 0.11; }
.papel svg, .tex svg { display: block; width: 100%; height: 100%; }
.tex { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; }

/* ---------- Header ---------- */
.cab {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: calc(112 * var(--u)); box-sizing: border-box; padding: 0 calc(64 * var(--u));
  display: flex; align-items: center; justify-content: space-between;
  color: var(--blanco); mix-blend-mode: difference; pointer-events: none;
}
.cab-logo { font-size: calc(24 * var(--u)); letter-spacing: 0.14em; text-decoration: none; transition: opacity 0.5s ease; }
a.cab-logo { pointer-events: auto; }
a.cab-logo:hover { opacity: 1; }
.logo-off .cab-logo { opacity: 0; pointer-events: none; }
.cab-nav {
  display: flex; align-items: center; gap: calc(40 * var(--u));
  font-family: var(--jost); font-weight: 200; font-size: calc(15 * var(--u));
  transition: opacity 0.4s ease; pointer-events: auto;
}
.cab-nav a { text-decoration: none; }
.es-en { display: none; } /* oculto hasta que exista la versión en inglés */
.hamb {
  position: absolute; right: calc(48 * var(--u)); top: calc(34 * var(--u));
  width: calc(76 * var(--u)); height: calc(44 * var(--u));
  background: transparent; border: none; padding: 0; cursor: pointer; color: var(--blanco);
  display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: calc(7 * var(--u));
  opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
.hamb span { display: block; width: calc(44 * var(--u)); height: 1.5px; background: var(--blanco); }
.compacto .cab-nav { opacity: 0; pointer-events: none; }
.compacto .hamb { opacity: 1; pointer-events: auto; }

/* ---------- Rótulo lateral girado ---------- */
.rotulo {
  position: fixed; left: calc(100% - 22 * var(--u)); top: 50%; z-index: 50;
  transform: translate(-50%, -50%) rotate(90deg); white-space: nowrap;
  font-family: var(--jost); font-weight: 200; font-size: calc(11 * var(--u)); letter-spacing: 0.18em;
  color: var(--blanco); mix-blend-mode: difference; opacity: 0; transition: opacity 0.6s ease; pointer-events: none;
}
.rotulo.on { opacity: 0.55; }

/* ---------- Barra fija inferior ---------- */
.barra {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: calc(56 * var(--u)); box-sizing: border-box; padding: 0 calc(64 * var(--u));
  background: var(--negro); color: var(--blanco);
  display: flex; align-items: center; justify-content: space-between;
  transform: translateY(calc(60 * var(--u)));
  transition: transform 0.5s ease, background-color 0.6s var(--ease), color 0.6s var(--ease);
}
.barra-vis .barra { transform: none; }
.barra-inv .barra { background: var(--blanco); color: var(--negro); }
.barra-izq { font-size: calc(19 * var(--u)); letter-spacing: 0; transition: letter-spacing 0.4s ease; }
.barra-ses .barra-izq { font-size: calc(18 * var(--u)); letter-spacing: 0.14em; }
.barra-der { display: flex; align-items: center; gap: calc(40 * var(--u)); font-family: var(--jost); font-weight: 200; font-size: calc(15 * var(--u)); }
.barra-der a { text-decoration: none; }
.sonido {
  padding: 0; background: transparent; border: none; color: inherit; cursor: pointer;
  font-family: var(--jost); font-weight: 200; font-size: calc(12 * var(--u)); letter-spacing: 0.12em; opacity: 0.6;
}

/* ---------- Menú desplegado ---------- */
.velo {
  position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  opacity: 0; pointer-events: none; transition: opacity 0.5s ease;
}
.menu {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: 0; overflow: hidden;
  background: var(--negro); color: var(--blanco); visibility: hidden;
  transition: height 0.45s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.45s;
}
.menu-abierto .velo { opacity: 1; pointer-events: auto; }
.menu-abierto .menu { height: calc(620 * var(--u)); visibility: visible; transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0s; }
.menu-in { position: relative; width: calc(1440 * var(--u)); height: calc(620 * var(--u)); margin: 0 auto; }
.menu a { text-decoration: none; }
.mi { opacity: 0; transform: translateY(-10px); transition: opacity 0.45s ease, transform 0.6s var(--ease); transition-delay: 0s; }
.menu-abierto .mi { opacity: 1; transform: none; transition-delay: calc(0.2s + 0.04s * var(--i, 0)); }
.menu-cerrar {
  position: absolute; right: calc(52 * var(--u)); top: calc(30 * var(--u)); width: 44px; height: 44px;
  background: transparent; border: none; padding: 0; cursor: pointer; color: inherit;
}
.menu-cerrar svg { width: calc(28 * var(--u)); height: calc(28 * var(--u)); }
.menu-logo { position: absolute; left: calc(64 * var(--u)); top: calc(128 * var(--u)); font-size: calc(40 * var(--u)); letter-spacing: 0.14em; }
.menu-prin { position: absolute; left: calc(1080 * var(--u)); top: calc(118 * var(--u)); display: flex; flex-direction: column; font-size: calc(56 * var(--u)); line-height: 1.12; }
.menu-prin a { transition: letter-spacing 0.8s var(--ease), opacity 0.45s ease, transform 0.6s var(--ease); }
.menu-prin a:hover { letter-spacing: 0.02em; }
.menu-sec { position: absolute; left: calc(733 * var(--u)); top: calc(132 * var(--u)); display: flex; flex-direction: column; gap: calc(6 * var(--u)); font-size: calc(19 * var(--u)); line-height: 1.4; }
.menu-sec a, .menu-con a { align-self: flex-start; }
.menu-con { position: absolute; left: calc(733 * var(--u)); bottom: calc(56 * var(--u)); display: flex; flex-direction: column; gap: calc(6 * var(--u)); font-family: var(--jost); font-weight: 200; font-size: calc(15 * var(--u)); line-height: 1.5; }
.foco .fx { transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1); }
.foco:has(a:focus-visible) a:not(:focus-visible) .fx { opacity: 0.3; }
@media (hover: hover) { .foco:has(a:hover) a:not(:hover) .fx { opacity: 0.3; } }
.menu-gc {
  position: absolute; left: calc(64 * var(--u)); bottom: calc(56 * var(--u));
  width: calc(430 * var(--u)); height: calc(120 * var(--u)); box-sizing: border-box; padding: calc(10 * var(--u));
  display: flex; gap: calc(24 * var(--u)); align-items: stretch; background: var(--blanco); color: var(--negro);
}
.menu-gc img { width: calc(80 * var(--u)); height: calc(100 * var(--u)); object-fit: cover; }
.menu-gc > span { display: flex; flex-direction: column; justify-content: space-between; padding: calc(4 * var(--u)) 0; }
.menu-gc .r { font-family: var(--jost); font-weight: 200; font-size: calc(13 * var(--u)); letter-spacing: 0.06em; }
.menu-gc .t { font-size: calc(19 * var(--u)); line-height: 1.25; }
.menu-gc .v { font-family: var(--jost); font-weight: 200; font-size: calc(15 * var(--u)); text-decoration: underline; text-underline-offset: 5px; }

/* ---------- Footer (FooterF · definitivo) ---------- */
.pie {
  position: relative; height: calc(141 * var(--u)); box-sizing: border-box; padding: calc(36 * var(--u)) calc(64 * var(--u)) calc(30 * var(--u));
  background: var(--carbon); color: var(--blanco); font-family: var(--goudy);
  display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
}
.pie .tex { opacity: 0.14; }
.pie-f1 { position: relative; display: flex; justify-content: space-between; align-items: baseline; }
.pie-marca { display: flex; align-items: baseline; gap: calc(40 * var(--u)); white-space: nowrap; }
.pie-marca span { font-size: calc(20 * var(--u)); letter-spacing: 0.14em; }
.pie-marca a { font-family: var(--jost); font-weight: 200; font-size: calc(15 * var(--u)); text-decoration: underline; text-underline-offset: 5px; }
.pie-nav { display: flex; gap: calc(40 * var(--u)); white-space: nowrap; font-family: var(--jost); font-weight: 200; font-size: calc(15 * var(--u)); }
.pie-nav a, .pie-f2 a { text-decoration: none; }
.pie-nav a:hover, .pie-f2 a:hover { opacity: 1; }
.pie-nav .actual { opacity: 0.35; pointer-events: none; }
.pie-f2 {
  position: relative; display: flex; justify-content: space-between; align-items: baseline; white-space: nowrap;
  font-family: var(--jost); font-weight: 200; font-size: calc(13 * var(--u)); letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.5);
}

/* ---------- Cursor propio (solo con mouse) ---------- */
.cur, .cur-dot { position: fixed; left: 0; top: 0; z-index: 300; pointer-events: none; mix-blend-mode: difference; opacity: 0; transition: opacity 0.3s ease; will-change: transform; display: none; }
.con-cursor .cur { display: block; }
.cur-in { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%) scale(var(--cs, 1)); transition: transform 0.25s ease; }
.cur-c { display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--blanco); transition: width 0.45s var(--ease), height 0.45s var(--ease); }
.cur.link .cur-c { width: 6px; height: 6px; }
/* Solo el círculo: se oculta la flecha del sistema en todo el sitio */
.con-cursor, .con-cursor * { cursor: none !important; }

/* ---------- Tamaños mínimos de lectura en pantallas medianas ---------- */
@media (max-width: 1300px) and (min-width: 1024px) {
  .rotulo, .sonido { font-size: max(10px, calc(11 * var(--u))); }
  .cab-nav, .barra-der, .pie-nav, .pie-marca a, .menu-con { font-size: max(13px, calc(15 * var(--u))); }
  .pie-f2 { font-size: max(11px, calc(13 * var(--u))); }
}

/* =========================================================
   CELULAR Y TABLET VERTICAL (menos de 1024 px)
   ========================================================= */
@media (max-width: 1023px) {
  .escena { width: auto; }
  .br-d { display: none; } /* cortes fijos solo en pantalla grande */
  .cab { height: 72px; padding: 0 20px; }
  .cab-logo { font-size: 18px; }
  .logo-off .cab-logo { opacity: 1; pointer-events: auto; }
  .cab-nav { display: none; }
  .hamb, .compacto .hamb { right: 8px; top: 14px; width: 56px; height: 44px; gap: 7px; padding-right: 12px; opacity: 1; pointer-events: auto; }
  .hamb span { width: 30px; }
  .rotulo { display: none; }

  .barra { height: 48px; padding: 0 16px; transform: translateY(52px); justify-content: flex-end; }
  .barra-izq { display: none; }
  .barra-der { gap: 20px; font-size: 13px; }
  .sonido { font-size: 11px; }

  .menu-abierto .menu { height: 100vh; height: 100dvh; }
  .menu-in { width: auto; height: 100%; box-sizing: border-box; padding: 96px 24px 32px; display: flex; flex-direction: column; gap: 36px; overflow-y: auto; }
  .menu-cerrar { right: 10px; top: 14px; }
  .menu-cerrar svg { width: 24px; height: 24px; }
  .menu-logo { left: 24px; top: 28px; font-size: 18px; }
  .menu-prin, .menu-sec, .menu-con, .menu-gc { position: static; }
  .menu-prin { font-size: 40px; line-height: 1.15; }
  .menu-sec { gap: 6px; font-size: 19px; }
  .menu-con { gap: 6px; font-size: 15px; }
  .menu-gc { width: 100%; max-width: 430px; height: auto; padding: 10px; gap: 20px; margin-top: auto; }
  .menu-gc img { width: 80px; height: 100px; }
  .menu-gc > span { padding: 4px 0; gap: 8px; }
  .menu-gc .r { font-size: 12px; }
  .menu-gc .t { font-size: 19px; }
  .menu-gc .v { font-size: 15px; }

  .pie { height: auto; padding: 32px 24px 28px; gap: 28px; }
  .pie-f1 { flex-direction: column; gap: 24px; }
  .pie-marca { gap: 24px; }
  .pie-marca span { font-size: 18px; }
  .pie-marca a, .pie-nav { font-size: 15px; }
  .pie-nav { flex-wrap: wrap; gap: 10px 24px; white-space: normal; }
  .pie-f2 { flex-direction: column; gap: 8px; font-size: 12px; white-space: normal; }

}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .lente .foto img { transform: none; }
  .linea > span, .mi, .menu, .velo, .barra { transition-duration: 0.01s !important; transition-delay: 0s !important; }
}
