/* Shande Villa · hoja de estilos.
   Una página tranquila, de galería: fondo cálido plano, títulos en cursiva condensada (Instrument Serif),
   texto en grotesca limpia (Hanken Grotesk) y la película solo donde es un objeto real: el carrete de fotos,
   la polaroid y el texto impreso en el borde. Un único acento: el ámbar de la película.
   Monoespaciada SOLO para ese texto impreso y los números de fotograma. */

@font-face { font-family: "SV Display"; src: url("../fonts/instrument-serif-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "SV Display"; src: url("../fonts/instrument-serif-italic-latin.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "SV Sans"; src: url("../fonts/hanken-grotesk-latin.woff2") format("woff2"); font-weight: 300 600; font-style: normal; font-display: swap; }
@font-face { font-family: "SV Mono"; src: url("../fonts/dm-mono-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
/* La firma 山德 de la polaroid: solo esos dos caracteres (1,3 KB) */
@font-face { font-family: "SV Mano"; src: url("../fonts/long-cang-firma.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
/* El chino de los títulos solo se descarga cuando se elige chino: únicamente html[lang="zh-Hans"] usa esta familia.
   El texto corrido en chino usa la tipografía sans del sistema (PingFang, Microsoft YaHei…), que no se descarga. */
@font-face { font-family: "SV Han"; src: url("../fonts/noto-serif-sc-zh.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }

:root {
  --mesa: #120D0A;       /* fondo de la página */
  --tira: #3A1D0C;       /* base de película (carrete) */
  --ventana: #0B0705;
  --papel: #F1ECE2;      /* blanco papel fotográfico */
  --tenue: #C4B8A8;      /* texto secundario */
  --ambar: #F5A03A;      /* único acento */
  --impreso: #FFC46B;    /* ámbar claro para el texto impreso en el borde */
  --filete: rgba(241, 236, 226, .16);
  --col: 600px;
  --lado: 20px;
  --hf: 236px;           /* alto de un fotograma del carrete */
  --display: "SV Display", "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "SV Sans", "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SV Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --cjk-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", "WenQuanYi Micro Hei", sans-serif;
  --cjk-display: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
}
html[lang="zh-Hans"] {
  --cjk-display: "SV Han", "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
}

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; font-synthesis: none; }
body {
  margin: 0; background: var(--mesa); color: var(--papel);
  font-family: var(--sans), var(--cjk-sans); font-size: 1rem; line-height: 1.65; font-weight: 400; overflow-x: clip;
}
html[lang="zh-Hans"] body { line-height: 1.85; letter-spacing: .02em; }
/* Serif: el título (cursiva) y los nombres/títulos de las listas (redonda). Todo lo demás es sans; mono solo para números de fotograma */
.display, .frase, .nombre, .post-titulo { font-family: var(--display), var(--cjk-display); font-weight: 400; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ol, ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--ambar); outline-offset: 3px; }

.oculto {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.saltar { position: absolute; left: 12px; top: -64px; z-index: 30; background: var(--ambar); color: #1b0e04; padding: 10px 16px; font-weight: 600; text-decoration: none; }
.saltar:focus { top: 12px; }

/* Mientras llega el JSON del idioma elegido no se enseña el texto en español (el espacio se mantiene) */
html.i18n-espera [data-i18n] { visibility: hidden; }

/* Flecha de enlace externo, dibujada (ninguna de las fuentes trae ↗) */
.flecha {
  display: inline-block; flex: none; width: 1.1em; height: 1.1em; background: currentColor;
  -webkit-mask: url("flecha.svg") center / contain no-repeat; mask: url("flecha.svg") center / contain no-repeat;
}

/* ───────── Cabecera y menú ───────── */
.cabecera, .pagina, .pie, .menu-in { max-width: var(--col); margin-inline: auto; padding-inline: var(--lado); }
.cabecera { position: relative; isolation: isolate; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 6px 4px; padding-inline: var(--lado) calc(var(--lado) - 10px); }
/* Un flare en la esquina: fuga de luz, un reflejo y una estela corta. Decorativo, queda por detrás del texto */
.cabecera::before {
  content: ""; position: absolute; z-index: -1; top: 0; bottom: -46px; right: calc(50% - 50vw); width: min(86vw, 560px); pointer-events: none;
  background:
    radial-gradient(circle at 106% -12%, rgba(255, 196, 110, .5) 0, rgba(255, 140, 50, .2) 2rem, transparent 5rem);
}
.cabecera::after {
  content: ""; position: absolute; z-index: -1; top: 14px; right: calc(50% - 50vw); width: min(48vw, 300px); height: 2px; pointer-events: none;
  background: rgba(255, 205, 140, .5); filter: blur(1.2px);
}
.marca { font-size: .8125rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.idioma { display: none; }
html.js .idioma { display: flex; }
.idioma button { min-width: 44px; min-height: 44px; padding: 0 10px; font-size: .9375rem; letter-spacing: .06em; color: var(--papel); background: none; border: 0; cursor: pointer; }
.idioma button[aria-pressed="true"] { color: var(--papel); text-decoration: underline; text-decoration-color: var(--ambar); text-decoration-thickness: 2px; text-underline-offset: 7px; }

/* El menú se queda arriba y marca dónde estás; sus números son los mismos de los títulos de sección */
.menu { position: sticky; top: 0; z-index: 20; background: var(--mesa); border-block: 1px solid var(--filete); }
.menu::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 106% -20%, rgba(255, 160, 70, .22) 0, transparent 4.2rem); }
.menu-in { position: relative; display: flex; gap: 4px 16px; overflow-x: auto; scrollbar-width: none; counter-reset: menu; }
.menu-in::-webkit-scrollbar { display: none; }
.menu a {
  counter-increment: menu; flex: none; display: inline-flex; align-items: baseline; gap: 6px; min-height: 46px; padding-top: 14px;
  color: var(--tenue); text-decoration: none; font-size: .6875rem; font-weight: 600; letter-spacing: .15em; text-transform: uppercase;
}
.menu a::before { content: counter(menu, decimal-leading-zero); font-family: var(--mono); font-weight: 400; font-size: 10px; letter-spacing: .1em; color: var(--impreso); opacity: .7; }
html[lang="zh-Hans"] .menu a { font-size: .875rem; letter-spacing: .12em; }
.menu a:hover { color: var(--papel); }
.menu a[aria-current="true"] { color: var(--papel); box-shadow: inset 0 -2px 0 var(--ambar); }
.menu a[aria-current="true"]::before { opacity: 1; }

/* ───────── Estructura de secciones ───────── */
.pagina { counter-reset: seccion; }
.pagina > section { padding-top: 56px; scroll-margin-top: 46px; }
.pagina > section.portada { padding-top: 0; }
.titulo {
  counter-increment: seccion; display: flex; align-items: center; gap: 14px; margin-bottom: 22px;
  font-size: .75rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--tenue); line-height: 1.4;
}
.titulo::before { content: counter(seccion, decimal-leading-zero); font-family: var(--mono); font-weight: 400; font-size: 10.5px; letter-spacing: .1em; color: var(--impreso); }
.titulo::after { content: ""; flex: 1; height: 1px; background: var(--filete); }
html[lang="zh-Hans"] .titulo { font-size: .875rem; letter-spacing: .14em; }

/* Texto impreso en el borde de la película: lo único en monoespaciada */
.borde {
  display: flex; align-items: center; height: 24px; margin: 0;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--impreso); white-space: nowrap; overflow: hidden;
}

/* ───────── Portada: una sola composición ───────── */
.ventana { background: #000; }
.ventana.grande { position: relative; aspect-ratio: 4 / 3; margin-inline: calc(var(--lado) * -1); }
.ventana.grande img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
/* la polaroid nace de la foto y el título se apoya a su lado */
.rotulo { position: relative; z-index: 2; display: flex; align-items: flex-start; gap: 20px; margin-top: -112px; }
.polaroid { flex: none; width: 46%; max-width: 220px; margin: 0; padding: 8px 8px 0; background: var(--papel); transform: rotate(-3deg); outline: 1px solid rgba(0, 0, 0, .3); }
.polaroid img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 30%; background: #000; }
.firma {
  display: block; padding: 6px 0 10px; text-align: center; transform: rotate(-2deg);
  font-family: "SV Mano", "Long Cang", "Kaiti SC", "STKaiti", cursive; font-size: 2rem; line-height: 1.1; letter-spacing: .08em; color: #2a211b;
}
.titulos { padding-top: 128px; min-width: 0; }
.frase { font-size: clamp(1.9rem, 8.6vw, 2.6rem); font-style: italic; line-height: 1; letter-spacing: -.01em; text-wrap: balance; }
html[lang="zh-Hans"] .frase { font-style: normal; font-size: clamp(1.75rem, 7.6vw, 2.3rem); letter-spacing: .04em; line-height: 1.25; }
/* Texto corrido: la presentación y el párrafo de contacto comparten estilo */
.bio, .contacto p { font-size: 1.0625rem; line-height: 1.6; font-weight: 300; text-wrap: pretty; }
.bio { margin-top: 24px; }
html[lang="zh-Hans"] .bio, 
/* ───────── Redes: dos carretes. Fuera de China (amarillo y rojo) y en China (verde) ───────── */
.enlaces { counter-reset: enlace; }
.grupo { margin-top: 18px; border: 1px solid var(--borde-g); border-radius: 4px; overflow: hidden; }
.grupo-int { --banda: #EDB52F; --tinta: #1b0e04; --cinta: #C42B25; --borde-g: rgba(237, 181, 47, .42); }
.grupo-cn  { --banda: #26704A; --tinta: #F4F1E8; --cinta: #F4F1E8; --borde-g: rgba(74, 160, 110, .42); margin-top: 22px; }
.grupo-cab {
  display: flex; align-items: center; gap: 12px; height: 34px; padding-right: 14px; margin: 0;
  background: var(--banda); color: var(--tinta);
  font-size: .6875rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; white-space: nowrap;
}
.grupo-cab::before { content: ""; align-self: stretch; width: 16px; margin-right: 2px; background: var(--cinta); }
html[lang="zh-Hans"] .grupo-cab { font-size: .8125rem; letter-spacing: .1em; }

.redes-lista li { counter-increment: enlace; }
.redes-lista a {
  display: grid; grid-template-columns: 2.4rem 1fr auto; align-items: center; column-gap: 6px; padding: 14px 16px 14px 14px;
  border-bottom: 1px solid var(--filete); color: var(--papel); text-decoration: none;
}
.redes-lista li:last-child a { border-bottom: 0; }
.redes-lista .n::before { content: counter(enlace) "A"; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; color: var(--impreso); }
.redes-lista .nombre { display: block; font-size: 1.5rem; line-height: 1.15; }
.redes-lista .post { display: block; margin-top: 8px; }
.redes-lista .post-etiqueta { display: block; color: var(--tenue); font-size: .6875rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; line-height: 1.4; }
html[lang="zh-Hans"] .redes-lista .post-etiqueta { font-size: .8125rem; letter-spacing: .1em; }
.redes-lista .post-titulo { display: block; margin-top: 3px; color: var(--papel); font-size: 1.125rem; line-height: 1.25; }
.redes-lista .glosa { display: block; margin-top: 3px; color: var(--tenue); font-size: .6875rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; line-height: 1.4; }
html[lang="zh-Hans"] .redes-lista .glosa { display: none; }
.redes-lista .flecha { width: 1.3rem; height: 1.3rem; color: var(--ambar); transition: transform .25s ease; }
.redes-lista a:hover .nombre { color: var(--ambar); }
.redes-lista a:hover .flecha { transform: translate(3px, -3px); }
/* lo de China pesa menos: son filas más bajas, en dos columnas */
.grupo-cn .redes-lista { display: grid; grid-template-columns: 1fr 1fr; }
.grupo-cn .redes-lista li + li a { border-left: 1px solid var(--filete); }
.grupo-cn .redes-lista a { grid-template-columns: 1fr auto; padding: 14px 12px 14px 14px; border-bottom: 0; }
.grupo-cn .redes-lista .n { display: none; }
.grupo-cn .redes-lista .flecha { width: 1.1rem; height: 1.1rem; }

/* ───────── Fotos: el selector de categoría ───────── */
.selector-carrete { display: none; }
html.js .selector-carrete {
  display: flex; gap: 24px; margin: -6px calc(var(--lado) * -1) 14px; padding-inline: var(--lado);
  overflow-x: auto; scrollbar-width: none; scroll-padding-inline: var(--lado);
}
.selector-carrete::-webkit-scrollbar { display: none; }
.selector-carrete button {
  flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px;
  color: var(--tenue); background: none; border: 0; font-size: .9375rem; white-space: nowrap; cursor: pointer;
}
.selector-carrete button:hover { color: var(--papel); }
.selector-carrete button[aria-selected="true"] { color: var(--papel); }
.selector-carrete button[aria-selected="true"] span {
  text-decoration: underline; text-decoration-color: var(--ambar); text-decoration-thickness: 2px; text-underline-offset: 8px;
}

.rollo { margin: 0 calc(var(--lado) * -1) 0; padding-inline: var(--lado); overflow: hidden; } /* sangra con el carrete; el recorte es para la animación de entrada */
.rollo[hidden] { display: none; }
.rollo-titulo { font-size: 1.125rem; font-weight: 500; margin: 2px 0 8px; }
html.js .rollo-titulo { display: none; }

.carrete {
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; overscroll-behavior-x: contain;
  scrollbar-width: none; cursor: grab; -webkit-overflow-scrolling: touch; scroll-padding-left: 16px;
  /* el carrete es una tira más oscura */
  background-color: #3A1D0C;
  margin-inline: calc(var(--lado) * -1); /* a sangre: se ve que el carrete sigue */
  border-block: 1px solid #1f0f06;
}
.carrete::-webkit-scrollbar { display: none; }
.carrete.arrastrando { cursor: grabbing; scroll-snap-type: none; }
.carrete:focus-visible { outline-offset: -3px; }
.cinta { position: relative; display: flex; gap: 10px; width: max-content; padding: 30px 16px 46px; counter-reset: f; }
.cinta::before, .cinta::after {
  content: ""; position: absolute; left: 0; right: 0; height: 16px;
  background: url("perforacion-h.svg") repeat-x left center / 22px 16px;
}
.cinta::before { top: 7px; }
.cinta::after { bottom: 7px; }
.foto { position: relative; counter-increment: f; flex: none; scroll-snap-align: start; }
.foto a {
  display: block; height: var(--hf); width: calc(var(--a) * var(--hf)); overflow: hidden;
  background: #000; outline: 1px solid #1f0f06;
}
.foto img { width: 100%; height: 100%; object-fit: cover; }
.foto a:focus-visible { outline-offset: 2px; }
.foto a:hover img { opacity: .85; }
.foto .num {
  display: block; margin-top: 7px; height: 12px; line-height: 12px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: var(--ambar);
}
.foto .num::before { content: counter(f) "   " counter(f) "A"; }

.mandos { display: none; }
html.js .mandos { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.mandos button {
  width: 46px; height: 46px; padding: 0; font-size: 1.15rem; line-height: 1; color: var(--papel);
  background: none; border: 1px solid rgba(241, 236, 226, .42); border-radius: 50%; cursor: pointer;
}
.mandos button:hover { border-color: var(--ambar); color: var(--ambar); }
.mandos .cuenta { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--impreso); }

/* el carrete nuevo entra deslizándose, como si lo enrollaras */
@media (prefers-reduced-motion: no-preference) {
  .rollo.entra .carrete { animation: enrolla .9s cubic-bezier(.16, .84, .3, 1) both; }
}
@keyframes enrolla { from { transform: translateX(70%); } to { transform: none; } }

/* ───────── Contacto ───────── */
.contacto p { max-width: 34rem; }
html[lang="zh-Hans"] .contacto p { font-weight: 400; }
.accion { margin-top: 20px; }
.contacto-fila {
  width: 100%; background: none; border-inline: 0; font: inherit; text-align: left; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0;
  border-block: 1px solid var(--filete); color: var(--papel); text-decoration: none;
}
.contacto-fila .nombre { font-size: 1.5rem; line-height: 1.15; }
.contacto-fila .flecha { width: 1.3rem; height: 1.3rem; color: var(--ambar); transition: transform .25s ease; }
.contacto-fila:hover .nombre { color: var(--ambar); }
.contacto-fila:hover .flecha { transform: translate(3px, -3px); }

.pie { padding-block: 48px 48px; color: var(--tenue); font-size: .8125rem; font-weight: 300; }
.pie p + p { margin-top: 4px; }

/* ───────── Formulario de contacto: una ventana con marcas de recorte de visor ───────── */
.formulario {
  width: min(calc(100vw - 16px), 460px); max-width: none; max-height: calc(100dvh - 16px); margin: auto; padding: 0;
  background: var(--ventana); color: var(--papel); border: 1px solid var(--filete); border-radius: 3px; overflow: auto;
}
.formulario::backdrop { background: rgba(8, 5, 3, .86); }
.formulario form { position: relative; padding: 8px 18px 20px; }
/* las cuatro esquinas del visor, dibujadas con líneas finas ámbar */
.f-marcas {
  position: absolute; inset: 8px; pointer-events: none; background-repeat: no-repeat;
  background-image:
    linear-gradient(var(--ambar), var(--ambar)), linear-gradient(var(--ambar), var(--ambar)),
    linear-gradient(var(--ambar), var(--ambar)), linear-gradient(var(--ambar), var(--ambar)),
    linear-gradient(var(--ambar), var(--ambar)), linear-gradient(var(--ambar), var(--ambar)),
    linear-gradient(var(--ambar), var(--ambar)), linear-gradient(var(--ambar), var(--ambar));
  background-size: 16px 1px, 1px 16px, 16px 1px, 1px 16px, 16px 1px, 1px 16px, 16px 1px, 1px 16px;
  background-position: left top, left top, right top, right top, left bottom, left bottom, right bottom, right bottom;
}
.f-cab { display: flex; align-items: center; justify-content: space-between; padding-left: 4px; }
.f-cerrar { min-width: 44px; min-height: 44px; margin-right: -10px; font-size: 1.6rem; line-height: 1; color: var(--papel); background: none; border: 0; cursor: pointer; }
.f-cerrar:hover { color: var(--ambar); }
.f-titulo { margin-top: 2px; font-family: var(--display), var(--cjk-display); font-weight: 400; font-size: 1.75rem; line-height: 1.15; }
.f-intro { margin-top: 6px; color: var(--tenue); font-size: .9375rem; font-weight: 300; }
html[lang="zh-Hans"] .f-intro { font-weight: 400; }
.f-campo { margin-top: 16px; }
.f-campo label, .f-trampa label { display: block; color: var(--tenue); font-size: .6875rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; line-height: 1.4; }
html[lang="zh-Hans"] .f-campo label { font-size: .8125rem; letter-spacing: .1em; }
.f-campo input, .f-campo textarea {
  display: block; width: 100%; margin-top: 4px; padding: 9px 0; color: var(--papel); background: transparent;
  font: inherit; font-size: 1rem; border: 0; border-bottom: 1px solid var(--filete); border-radius: 0;
}
.f-campo textarea { min-height: 7.5rem; padding: 10px 12px; resize: vertical; border: 1px solid var(--filete); }
.f-campo input:focus, .f-campo textarea:focus { border-color: var(--ambar); }
.f-trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.f-captcha { margin-top: 18px; min-height: 66px; }
.f-estado { min-height: 1.5em; margin-top: 8px; color: var(--tenue); font-size: .9375rem; }
.f-estado.error { color: var(--impreso); }
.f-enviar { margin-top: 4px; }
.f-enviar[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.f-alt { margin-top: 12px; color: var(--tenue); font-size: .875rem; }
.f-alt a { text-decoration-color: var(--ambar); text-decoration-thickness: 2px; text-underline-offset: 3px; }
html.formulario-abierto { overflow: hidden; }

/* ───────── Visor ───────── */
.visor {
  width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none;
  margin: 0; padding: 0; border: 0; background: #000; color: var(--papel);
}
.visor[open] { display: flex; flex-direction: column; }
.visor::backdrop { background: #000; }
.visor-barra { display: flex; justify-content: flex-end; padding: 4px 6px; }
.visor-foto { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 8px; touch-action: pan-y; }
.visor-foto img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.visor-pie { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 10px; }
.visor-cuenta { color: var(--tenue); font-size: .9375rem; }
.visor button { min-width: 48px; min-height: 48px; font-size: 1.6rem; line-height: 1; color: var(--papel); background: none; border: 0; cursor: pointer; }
.visor button:hover { color: var(--ambar); }
html.visor-abierto { overflow: hidden; }

/* en móviles estrechos el menú cabe entero: tipo y espacios algo más cerrados */
@media (max-width: 400px) {
  .menu-in { gap: 4px 14px; }
  .menu a { font-size: .65rem; letter-spacing: .11em; gap: 5px; }
}
@media (min-width: 700px) {
  :root { --hf: 300px; --lado: 28px; }
  .ventana.grande { aspect-ratio: 2 / 1; margin-inline: 0; }
  .rotulo { margin-top: -124px; }
  .titulos { padding-top: 144px; }
}
