/* Juan Víctor Ginés · Tito — hoja de estilos
   Mobile first. Breakpoints: 560px, 768px (tablet), 1024px (desktop), 1440px. */

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrumentserif-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrumentserif-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-normal.woff2") format("woff2");
  font-weight: 300 600; font-style: normal; font-display: swap;
}

:root {
  --bg: #fbfaf7;
  --panel: #f2f0ea;
  --ink: #161616;
  --text: #2c2c2c;
  --muted: #696969;
  --line: #e4e1d9;
  --dark: #151515;
  --serif: "Instrument Serif", "Iowan Old Style", "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1240px;
  --gutter: clamp(20px, 5vw, 56px);
  --section: clamp(72px, 10vw, 144px);
  --ease: cubic-bezier(.2, .6, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .25em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; color: var(--ink); font-family: var(--serif); font-weight: 400; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; font-size: 14px; }
.skip:focus { top: 12px; }

/* ---------- Tipografía ---------- */
.eyebrow { margin: 0; font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.eyebrow--light { color: #a7a7a7; }
.display { font-size: clamp(3.1rem, 9.5vw, 7.25rem); line-height: .96; letter-spacing: -.015em; margin: .3em 0 .32em; }
.h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1; letter-spacing: -.01em; margin: .3em 0 .4em; }
.h2 { font-size: clamp(2.2rem, 4.6vw, 3.75rem); line-height: 1.02; letter-spacing: -.01em; margin: .35em 0 .4em; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.65; color: var(--text); max-width: 38em; }
.muted { color: var(--muted); }
.small { font-size: 14px; line-height: 1.6; }
.prose p { max-width: 36em; }
.section-title { margin-bottom: clamp(36px, 5vw, 64px); }

/* ---------- Botones y enlaces ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 52px; padding: 0 30px;
  background: var(--ink); color: #fff; border: 1px solid var(--ink);
  font: 500 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
  cursor: pointer;
}
.btn:hover { background: #fff; color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--light { background: #fff; color: var(--ink); border-color: #fff; }
.btn--light:hover { background: transparent; color: #fff; }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn--outline-light:hover { background: #fff; color: var(--ink); border-color: #fff; }
.link-arrow { font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 4px; }
.link-arrow::after { content: " →"; }
.more { margin: clamp(48px, 6vw, 80px) 0 0; text-align: center; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(251, 250, 247, .94); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand { display: flex; flex-direction: column; gap: 3px; text-decoration: none; line-height: 1; }
.brand__name { font-family: var(--serif); font-size: 28px; color: var(--ink); }
.brand__sub { font-size: 10px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 7px; width: 48px; height: 48px; margin-right: -12px; padding: 0 12px; background: none; border: 0; cursor: pointer; color: var(--ink); }
.nav-toggle__bar { display: block; height: 1px; background: currentColor; transition: transform .3s var(--ease); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:first-of-type { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:last-of-type { transform: translateY(-4px) rotate(-45deg); }
.site-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 8px var(--gutter) 28px; }
.site-nav a { display: block; padding: 16px 0; font-family: var(--serif); font-size: 30px; line-height: 1.1; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.site-nav a[aria-current="page"] { font-style: italic; }
.site-nav .nav-cta { border-bottom: 0; }

@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .site-nav { position: static; display: block; background: none; border: 0; }
  .site-nav ul { display: flex; align-items: center; gap: 36px; padding: 0; }
  .site-nav a { padding: 6px 0; border: 0; font: 500 11px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
  .site-nav a:hover, .site-nav a[aria-current="page"] { font-style: normal; text-decoration: underline; }
  .site-nav .nav-cta { padding: 14px 20px; border: 1px solid var(--ink); }
  .site-nav .nav-cta:hover { background: var(--ink); color: #fff; text-decoration: none; }
  .header__inner { min-height: 84px; }
}

/* ---------- Secciones ---------- */
.section { padding-block: var(--section); }
.band { background: var(--panel); padding-block: var(--section); }
.hero { padding-block: clamp(64px, 11vw, 160px) clamp(48px, 7vw, 104px); }
.hero--compact { padding-bottom: clamp(40px, 5vw, 72px); }
.split { display: grid; gap: 24px; margin-bottom: clamp(48px, 7vw, 96px); }
@media (min-width: 1024px) { .split { grid-template-columns: 5fr 7fr; gap: 96px; align-items: start; } .split .prose { padding-top: 8px; } }

/* ---------- Slider de obras (inicio) ---------- */
.slider { --gap: 16px; --per: 1; padding-bottom: var(--section); }
.slider__viewport { margin-inline: calc(-1 * var(--gutter)); }
.slider__track {
  list-style: none; margin: 0; padding: 0 var(--gutter);
  display: flex; gap: var(--gap);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.slider__track::-webkit-scrollbar { display: none; }
.slider__track:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.slider__slide { flex: 0 0 86%; scroll-snap-align: start; }
.slider__link { display: block; text-decoration: none; }
.slider__frame { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 5; background: var(--panel); padding: clamp(20px, 7%, 56px); overflow: hidden; }
.slider__frame img { max-height: 100%; width: auto; object-fit: contain; transition: transform .8s var(--ease); }
.slider__caption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; margin-top: 16px; }
.slider__title { font-family: var(--serif); font-size: 24px; line-height: 1.2; color: var(--ink); }
.slider__meta { font-size: 13px; color: var(--muted); }
.slider__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.slider__count { margin: 0; font-size: 12px; font-weight: 500; letter-spacing: .16em; color: var(--muted); font-variant-numeric: tabular-nums; }
.slider__current { color: var(--ink); }
.slider__all { display: none; }
.slider__nav { display: flex; gap: 8px; }
.slider__btn { width: 48px; height: 48px; display: grid; place-items: center; background: transparent; color: var(--ink); border: 1px solid var(--ink); cursor: pointer; transition: background-color .3s var(--ease), color .3s var(--ease), opacity .3s var(--ease); }
.slider__btn:hover { background: var(--ink); color: #fff; }
.slider__btn:disabled { opacity: .25; cursor: default; background: transparent; color: var(--ink); }
@media (hover: hover) { .slider__link:hover .slider__frame img { transform: scale(1.025); } .slider__link:hover .slider__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; } }
@media (min-width: 560px) { .slider__slide { flex-basis: 62%; } }
@media (min-width: 768px) {
  .slider { --gap: clamp(24px, 4vw, 64px); }
  .slider__viewport { margin-inline: 0; }
  .slider__track { padding: 0; scroll-padding-inline: 0; }
  .slider__slide { flex-basis: calc((100% - var(--gap)) / 2); }
  .slider__all { display: inline-block; }
}

/* ---------- Galería ---------- */
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 56px 24px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px clamp(20px, 3vw, 40px); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 72px clamp(28px, 3vw, 48px); } }
.card { display: block; text-decoration: none; color: inherit; }
.card__frame { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 5; padding: clamp(18px, 8%, 40px); background: var(--bg); overflow: hidden; }
.band .card__frame { background: var(--bg); }
.section .card__frame, .grid--light .card__frame { background: var(--panel); }
.card__frame img { max-height: 100%; width: auto; object-fit: contain; transition: transform .8s var(--ease); }
.card__title { font-size: 24px; line-height: 1.2; margin: 18px 0 0; transition: color .3s var(--ease); }
.card__text { margin: 8px 0 0; font-size: 15px; line-height: 1.6; color: var(--muted); max-width: 30em; }
@media (hover: hover) {
  .card:hover .card__frame img { transform: scale(1.025); }
  .card:hover .card__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
}

/* ---------- Cita ---------- */
.quote { padding-block: clamp(96px, 13vw, 184px); }
.band--quote { padding-block: 0; }
.quote blockquote { margin: 0 auto; max-width: 900px; text-align: center; }
.quote p { font-family: var(--serif); font-style: italic; font-size: clamp(1.8rem, 3.8vw, 3.1rem); line-height: 1.22; color: var(--ink); margin: 0; }
.quote footer { margin-top: 32px; font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

/* ---------- Sobre el artista (inicio) ---------- */
.about { display: grid; gap: 40px; padding-block: var(--section); border-top: 1px solid var(--line); align-items: center; }
.about__media img { width: 100%; }
@media (min-width: 768px) { .about { grid-template-columns: 5fr 7fr; gap: clamp(40px, 7vw, 112px); } }

/* ---------- Banda de contacto ---------- */
.contact-band { background: var(--dark); color: #d6d6d6; padding-block: var(--section); }
.contact-band .h2 { color: #fff; }
.contact-band__inner { display: grid; gap: 40px; }
.stack { display: grid; gap: 12px; align-content: end; }
@media (min-width: 1024px) { .contact-band__inner { grid-template-columns: 1fr 1fr; gap: 112px; align-items: end; } }

/* ---------- Página de obra ---------- */
.work { padding-top: clamp(28px, 4vw, 48px); padding-bottom: var(--section); }
.crumbs { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 clamp(24px, 4vw, 48px); }
.crumbs a { text-decoration: none; color: var(--ink); }
.crumbs a:hover { text-decoration: underline; }
.work__grid { display: grid; gap: 40px; }
@media (min-width: 1024px) { .work__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(56px, 6vw, 104px); align-items: start; } .work__info { position: sticky; top: 120px; } }
.work__media { margin: 0; background: var(--panel); padding: clamp(20px, 6vw, 72px); }
.zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.zoom img { margin-inline: auto; max-height: 78vh; width: auto; }
.hint { margin-top: 16px; text-align: center; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.facts { margin: 32px 0; border-top: 1px solid var(--line); }
.facts > div { display: grid; grid-template-columns: minmax(110px, 34%) 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.facts dd { margin: 0; color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 16px; }
.actions .btn { flex: 1 1 200px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: clamp(64px, 8vw, 112px); padding-top: 32px; border-top: 1px solid var(--line); }
.pager a { display: flex; flex-direction: column; gap: 8px; text-decoration: none; }
.pager__next { text-align: right; align-items: flex-end; }
.pager__title { font-family: var(--serif); font-size: clamp(20px, 2.4vw, 28px); color: var(--ink); line-height: 1.15; }
.pager a:hover .pager__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }

/* ---------- Lightbox ---------- */
.lightbox { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(18, 18, 18, .96); color: #fff; }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(18, 18, 18, .96); }
.lightbox__img { max-width: calc(100vw - 32px); max-height: calc(100dvh - 112px); width: auto; height: auto; object-fit: contain; }
.lightbox__close { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; width: 48px; height: 48px; display: grid; place-items: center; background: none; border: 0; color: #fff; cursor: pointer; }
@media (min-width: 768px) { .lightbox__img { max-width: calc(100vw - 160px); max-height: calc(100vh - 120px); } .lightbox__close { top: 20px; right: 24px; } }
@supports (animation: none) {
  .lightbox[open] .lightbox__img { animation: fade .35s var(--ease); }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Biografía ---------- */
.bio { display: grid; gap: 40px; padding-block: clamp(48px, 7vw, 112px) var(--section); }
.bio__media { margin: 0; }
.bio__media figcaption { margin-top: 12px; font-size: 13px; color: var(--muted); }
@media (min-width: 1024px) { .bio { grid-template-columns: 5fr 7fr; gap: clamp(56px, 7vw, 112px); align-items: start; } .bio__media { position: sticky; top: 120px; } }

/* ---------- Contacto ---------- */
.contact { display: grid; gap: 48px; padding-block: var(--section); }
@media (min-width: 1024px) { .contact { grid-template-columns: 5fr 7fr; gap: 112px; } }
.contact__list { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--line); }
.contact__list li { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.contact__list a { text-decoration: none; color: var(--ink); }
.contact__list a:hover { text-decoration: underline; }
.form { display: grid; gap: 20px; }
.form__row { display: grid; gap: 20px; }
@media (min-width: 560px) { .form__row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 8px; }
.field span { font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 14px;
  font: 400 16px/1.5 var(--sans); color: var(--ink);
  background: #fff; border: 1px solid #cfcbc2; border-radius: 0; appearance: none; -webkit-appearance: none;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
.form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.form__actions p { margin: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 64px 0 calc(96px + env(safe-area-inset-bottom)); font-size: 15px; }
.footer__inner { display: grid; gap: 32px; }
.footer__name { font-family: var(--serif); font-size: 30px; line-height: 1; color: var(--ink); margin: 0 0 10px; }
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer__list a { text-decoration: none; }
.footer__list a:hover { text-decoration: underline; }
.footer__legal { margin-top: 48px; font-size: 12px; color: #8a8a8a; }
.footer__legal p { margin: 0; }
@media (min-width: 768px) { .footer__inner { grid-template-columns: 2fr 1fr 1fr; } .site-footer { padding-bottom: 56px; } }

/* ---------- WhatsApp flotante ---------- */
.wa-fab {
  position: fixed; z-index: 50;
  right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: #25d366; color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
  transition: transform .3s var(--ease), background-color .3s var(--ease);
}
.wa-fab:hover { color: #fff; background: #1fbd5a; transform: translateY(-2px); }
.wa-fab svg { width: 26px; height: 26px; }
@media (min-width: 1024px) { .wa-fab { right: 28px; bottom: 28px; width: 56px; height: 56px; } }
.lightbox[open] ~ .wa-fab, body.has-lightbox .wa-fab { display: none; }

/* ---------- Botón de música (solo inicio) ---------- */
.sound-toggle {
  position: fixed; z-index: 50;
  left: max(16px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom));
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(251, 250, 247, .92); color: var(--ink);
  border: 1px solid var(--line); cursor: pointer;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.sound-toggle:hover { background: var(--ink); color: #fff; }
.sound-toggle .sound-toggle__on { display: none; }
.sound-toggle[aria-pressed="true"] .sound-toggle__on { display: block; }
.sound-toggle[aria-pressed="true"] .sound-toggle__off { display: none; }
@media (min-width: 1024px) { .sound-toggle { left: 28px; bottom: 28px; width: 48px; height: 48px; } }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
