/* ==========================================================================
   BALLIXART · Fotografía — hoja de estilos
   Identidad: azul tinta #00147E + azul cian #008ACD · Archivo Expanded + Montserrat
   ========================================================================== */

/* ---------- 1. Fuentes (alojadas en local, sin Google) ------------------- */
@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/archivo-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("../assets/fonts/montserrat-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- 2. Variables y base ------------------------------------------ */
:root {
  --ballixart-navy: #00147e;
  --ballixart-blue: #008acd;
  --ink: #0a1022;
  --muted: #4a5468;
  --paper: #ffffff;
  --mist: #f1f4f9;
  --line: #d9dfea;
  --line-dark: rgba(255, 255, 255, 0.18);

  --font-display: "Archivo", "Arial Black", system-ui, sans-serif;
  --font-body: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --header-h: 76px;
  --gutter: clamp(20px, 4.5vw, 64px);
  --max: 1320px;
  --gap: clamp(6px, 0.9vw, 12px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, p, figure, blockquote, dl, dd, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--ballixart-blue); color: #fff; }

:focus-visible {
  outline: 3px solid var(--ballixart-blue);
  outline-offset: 3px;
}

.on-dark :focus-visible,
.lightbox :focus-visible { outline-color: #fff; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 400;
  padding: 12px 20px;
  background: var(--ballixart-navy);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform 0.25s var(--ease);
}

.skip-link:focus { transform: translateY(0); }

section[id] { scroll-margin-top: calc(var(--header-h) - 1px); }

/* Entrada suave. Solo se atenúa el desplazamiento si el sistema pide menos movimiento */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: var(--d, 0s);
}

.js .reveal.is-visible,
.reveal-fallback .reveal {
  opacity: 1;
  transform: none;
}

/* ---------- 3. Tipografía común ------------------------------------------ */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ballixart-navy);
}

.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--ballixart-blue);
  flex: none;
}

.on-dark .eyebrow { color: #fff; }

.title {
  margin-top: 16px;
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(1.9rem, 4.2vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--ballixart-navy);
}

.on-dark .title { color: #fff; }

.lead {
  max-width: 52ch;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.7;
  color: var(--ink);
}

.copy {
  max-width: 60ch;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--muted);
}

/* ---------- 4. Botones --------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 14px 28px;
  border: 2px solid transparent;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background 0.3s var(--ease), color 0.3s var(--ease),
    border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.btn:hover { transform: translateY(-2px); }

.btn__arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease);
}

.btn:hover .btn__arrow { transform: translateX(4px); }

.btn--primary { background: var(--ballixart-blue); color: #fff; }
.btn--primary:hover { background: #0a9be3; }

.btn--navy { background: var(--ballixart-navy); color: #fff; }
.btn--navy:hover { background: #0a24a6; }

.btn--ghost { border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }

/* ---------- 5. Cabecera -------------------------------------------------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s var(--ease);
}

.header.is-scrolled { box-shadow: 0 6px 24px rgba(0, 20, 126, 0.08); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--max);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.logo { display: flex; align-items: center; gap: 14px; }

.logo img {
  display: block;
  width: 58px;
  height: 58px;
}

.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo__name {
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ballixart-navy);
}

.logo__sub {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 40px); }

.nav__link {
  position: relative;
  padding: 8px 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ballixart-navy);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--ballixart-blue);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease);
}

.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); }

.nav__cta {
  padding: 12px 22px;
  background: var(--ballixart-navy);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background 0.3s var(--ease);
}

.nav__cta:hover { background: var(--ballixart-blue); }

.burger {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  width: 48px;
  height: 48px;
  margin-right: -10px;
  color: var(--ballixart-navy);
}

.burger span {
  display: block;
  width: 26px;
  height: 3px;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}

.burger.is-active span:first-child { transform: translateY(4.5px) rotate(45deg); }
.burger.is-active span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

/* ---------- 6. Portada --------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: calc(100svh);
  padding: calc(var(--header-h) + 80px) var(--gutter) clamp(72px, 12vh, 120px);
  overflow: hidden;
  background: var(--ink);
  color: #fff;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 55%;
  animation: heroIn 2.4s var(--ease-out) both;
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 10, 40, 0.82) 0%, rgba(4, 10, 40, 0.5) 45%, rgba(4, 10, 40, 0.08) 100%),
    linear-gradient(180deg, rgba(4, 10, 40, 0.35) 0%, rgba(4, 10, 40, 0) 30%, rgba(4, 10, 40, 0.65) 100%);
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
}

.hero__block {
  max-width: 900px;
  padding-left: clamp(18px, 2.4vw, 32px);
  border-left: 5px solid var(--ballixart-blue);
}

.hero .eyebrow { color: #fff; }

.hero__title {
  margin: 22px 0 24px;
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(2rem, 5.2vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}

.hero__title span { display: block; }
.hero__title em { font-style: normal; color: #5cc8ff; }

.hero__text {
  max-width: 46ch;
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.92);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.hero__meta i {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--ballixart-blue);
}

/* ---------- 7. Obra (galería) ------------------------------------------- */
.work {
  padding: clamp(64px, 9vw, 120px) var(--gutter);
  background: var(--mist);
}

.work__inner { max-width: var(--max); margin: 0 auto; }

.work__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.work__note {
  max-width: 34ch;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--muted);
}

.sample-note {
  margin-top: 26px;
  padding: 14px 18px;
  border-left: 5px solid var(--ballixart-blue);
  background: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ballixart-navy);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: clamp(28px, 4vw, 44px) 0 clamp(20px, 3vw, 28px);
}

.filter {
  min-height: 44px;
  padding: 10px 18px;
  border: 2px solid var(--line);
  background: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ballixart-navy);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.filter span {
  margin-left: 6px;
  font-weight: 600;
  color: var(--muted);
}

.filter:hover { border-color: var(--ballixart-navy); }

.filter.is-active {
  background: var(--ballixart-navy);
  border-color: var(--ballixart-navy);
  color: #fff;
}

.filter.is-active span { color: rgba(255, 255, 255, 0.8); }

/* Filas justificadas: mantienen el orden y no recortan las fotos */
.gallery {
  --rowh: 280px;
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
}

.gallery::after { content: ""; flex-grow: 1000000; }

.item {
  flex: calc(var(--ar) * 100) 1 calc(var(--ar) * var(--rowh));
  min-width: 0;
}

.item.is-in { animation: itemIn 0.5s var(--ease-out) both; }

.item__btn {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: var(--ar);
  overflow: hidden;
  background: #dbe2ee;
  color: #fff;
  text-align: left;
  cursor: zoom-in;
}

.item__btn img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out), filter 0.9s var(--ease-out);
}

.item__btn:hover img,
.item__btn:focus-visible img { transform: scale(1.04); filter: brightness(0.85); }

.item__idx {
  position: absolute;
  top: 0;
  left: 0;
  padding: 7px 12px;
  background: var(--ballixart-navy);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fff;
}

.item__tag {
  position: absolute;
  top: 0;
  right: 0;
  padding: 7px 12px;
  background: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ballixart-navy);
}

.item__cap {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 56px 18px 16px;
  background: linear-gradient(to top, rgba(4, 10, 40, 0.88), rgba(4, 10, 40, 0));
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.item__btn:hover .item__cap,
.item__btn:focus-visible .item__cap { opacity: 1; transform: none; }

.item__title {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
}

.item__meta {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
}

.work__empty { padding: 56px 0; text-align: center; color: var(--muted); }

.work__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: 28px;
  border-top: 2px solid var(--ballixart-navy);
}

.work__cta p {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  color: var(--ballixart-navy);
}

/* ---------- 8. Sobre mí -------------------------------------------------- */
.about {
  position: relative;
  padding: clamp(64px, 9vw, 120px) var(--gutter);
  overflow: hidden;
}

.about__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(40px, 7vw, 110px);
  align-items: start;
  max-width: var(--max);
  margin: 0 auto;
}

.about__year {
  position: absolute;
  right: var(--gutter);
  bottom: -0.2em;
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 900;
  font-size: clamp(7rem, 14vw, 13rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px var(--line);
  pointer-events: none;
  user-select: none;
}

.about .lead { margin-top: 26px; }
.about .copy { margin-top: 18px; }

.facts { border-top: 2px solid var(--ballixart-navy); background: rgba(255, 255, 255, 0.85); }

.facts div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.facts dt {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ballixart-blue);
}

.facts dd { font-size: 0.95rem; font-weight: 500; line-height: 1.5; }

/* ---------- 9. Qué hago -------------------------------------------------- */
.areas {
  padding: clamp(64px, 9vw, 120px) var(--gutter);
  background: var(--ballixart-navy);
  color: #fff;
}

.areas__inner { max-width: var(--max); margin: 0 auto; }

.areas__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: clamp(32px, 5vw, 56px);
  border-top: 1px solid var(--line-dark);
}

.area {
  padding: 28px clamp(18px, 2.4vw, 34px) 32px 0;
}

.area + .area {
  padding-left: clamp(18px, 2.4vw, 34px);
  border-left: 1px solid var(--line-dark);
}

.area__num {
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: 2.2rem;
  line-height: 1;
  color: #5cc8ff;
}

.area h3 {
  margin: 16px 0 10px;
  font-family: var(--font-display);
  font-stretch: 118%;
  font-weight: 800;
  font-size: 1.35rem;
  text-transform: uppercase;
}

.area p {
  max-width: 34ch;
  font-size: 0.98rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.86);
}

.areas__more {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
  padding-bottom: 6px;
  border-bottom: 2px solid #5cc8ff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: gap 0.3s var(--ease);
}

.areas__more:hover { gap: 22px; }

/* ---------- 10. Contacto ------------------------------------------------- */
.contact {
  padding: clamp(64px, 9vw, 120px) var(--gutter);
  background: var(--mist);
}

.contact__inner {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(40px, 7vw, 110px);
  max-width: var(--max);
  margin: 0 auto;
}

.contact .copy { margin-top: 22px; }

.contact__mail {
  display: inline-block;
  margin-top: 28px;
  padding-bottom: 6px;
  border-bottom: 3px solid var(--ballixart-blue);
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  color: var(--ballixart-navy);
  overflow-wrap: anywhere;
}

.contact__loc {
  margin-top: 18px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.socials a {
  min-height: 44px;
  padding: 10px 18px;
  border: 2px solid var(--ballixart-navy);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ballixart-navy);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.socials a:hover { background: var(--ballixart-navy); color: #fff; }

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-content: start;
  padding: clamp(22px, 3vw, 40px);
  background: #fff;
  border-top: 5px solid var(--ballixart-navy);
}

.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }

.field label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ballixart-navy);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 2px solid var(--line);
  border-radius: 0;
  background: #fff;
  font-size: 1rem;
  transition: border-color 0.25s var(--ease);
}

.field input::placeholder,
.field textarea::placeholder { color: #727c90; }

.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-color: var(--ballixart-blue); }

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { outline: 3px solid var(--ballixart-blue); outline-offset: 2px; }

.field select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2300147e' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.field textarea { min-height: 130px; resize: vertical; line-height: 1.6; }

/* Campo trampa para bots: fuera de la vista y del teclado */
.field--trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--muted);
}

.consent input {
  flex: none;
  width: 22px;
  height: 22px;
  min-height: 0;
  margin-top: 1px;
  accent-color: var(--ballixart-navy);
}

.consent a { color: var(--ballixart-navy); font-weight: 600; text-decoration: underline; }

.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }

.form__status {
  min-height: 1.4em;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ballixart-navy);
}

.form__status.is-error { color: #b3261e; }

/* ---------- 11. Pie ------------------------------------------------------ */
.footer {
  padding: 34px var(--gutter);
  background: #fff;
  border-top: 1px solid var(--line);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 30px;
  max-width: var(--max);
  margin: 0 auto;
  font-size: 0.82rem;
  color: var(--muted);
}

.footer__links { display: flex; flex-wrap: wrap; gap: 8px 24px; }

.footer a {
  font-weight: 600;
  color: var(--ballixart-navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 12. Visor ---------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  padding: clamp(18px, 4vh, 48px);
  border: 0;
  background: transparent;
  color: #fff;
  overflow: hidden;
}

.lightbox[open] { display: flex; align-items: center; justify-content: center; }

.lightbox::backdrop {
  background: rgba(3, 7, 28, 0.96);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 100%;
  max-height: 100%;
}

.lightbox__img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(92vw, 1280px);
  max-height: 78vh;
  object-fit: contain;
  background: #0d1536;
  transition: opacity 0.3s var(--ease);
}

.lightbox__img.is-loading { opacity: 0.25; }

.lightbox__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 4px 16px;
  text-align: center;
}

#lb-title {
  font-family: var(--font-display);
  font-stretch: 118%;
  font-weight: 700;
  font-size: 1.1rem;
}

#lb-meta {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.lightbox__btn {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: rgba(0, 20, 126, 0.55);
  font-size: 1.3rem;
  line-height: 1;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}

.lightbox__btn:hover { background: var(--ballixart-blue); border-color: #fff; }

.lightbox__close { top: clamp(12px, 2.4vw, 24px); right: clamp(12px, 2.4vw, 24px); }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: clamp(10px, 2vw, 24px); }
.lightbox__nav--next { right: clamp(10px, 2vw, 24px); }

.lightbox__counter {
  position: absolute;
  top: clamp(20px, 3vw, 32px);
  left: clamp(20px, 3vw, 32px);
  z-index: 3;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

/* ---------- 13. Páginas legales ----------------------------------------- */
.legal { max-width: 820px; margin: 0 auto; padding: calc(var(--header-h) + 56px) var(--gutter) 80px; }
.legal h1 { margin-bottom: 8px; }
.legal h2 {
  margin: 36px 0 10px;
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 800;
  font-size: 1.2rem;
  text-transform: uppercase;
  color: var(--ballixart-navy);
}
.legal p, .legal li { font-size: 1rem; line-height: 1.8; color: var(--ink); }
.legal p + p { margin-top: 12px; }
.legal ul { margin: 10px 0 0 20px; list-style: disc; }
.legal a { color: var(--ballixart-navy); font-weight: 600; text-decoration: underline; }
.legal .todo { background: #fff3c4; padding: 0 4px; font-weight: 600; }

/* ---------- 14. Animaciones --------------------------------------------- */
@keyframes heroIn {
  from { opacity: 0.4; transform: scale(1.06); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes itemIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 15. Pantallas ----------------------------------------------- */
@media (max-width: 1100px) {
  .gallery { --rowh: 240px; }
}

@media (max-width: 940px) {
  .about__inner,
  .contact__inner { grid-template-columns: 1fr; }
  .about__year { font-size: clamp(6rem, 30vw, 12rem); }
  .areas__grid { grid-template-columns: 1fr; }
  .area, .area + .area { padding: 26px 0; border-left: 0; }
  .area + .area { border-top: 1px solid var(--line-dark); }
}

@media (max-width: 900px) {
  :root { --header-h: 68px; }

  .logo img { width: 50px; height: 50px; }
  .burger { display: flex; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px rgba(0, 20, 126, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  }

  .nav.is-open { opacity: 1; visibility: visible; transform: none; }

  .nav__link {
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.95rem;
  }

  .nav__link::after { display: none; }
  .nav__cta { margin-top: 18px; padding: 16px; text-align: center; font-size: 0.9rem; }

  .gallery { --rowh: 200px; }
}

@media (max-width: 680px) {
  /* Filas justificadas pequeñas: se ve mucha obra de un vistazo y el visor la amplía */
  .gallery { --rowh: 125px; }
  .item__cap { display: none; }
  .item__idx, .item__tag { padding: 5px 8px; font-size: 0.68rem; }

  .hero { padding-bottom: 72px; }
  .hero__actions .btn { flex: 1 1 100%; }

  .facts div { grid-template-columns: 1fr; gap: 4px; }
  .form { grid-template-columns: 1fr; }
  .work__cta .btn { width: 100%; }

  .lightbox { padding: 14px; padding-bottom: 84px; }
  .lightbox__img { max-width: 100%; max-height: 66vh; }

  /* En móvil los botones de navegar van abajo, siempre visibles */
  .lightbox__nav { top: auto; bottom: 18px; transform: none; width: 56px; height: 56px; }
  .lightbox__nav--prev { left: 18px; }
  .lightbox__nav--next { right: 18px; }
}

@media (max-width: 420px) {
  .logo__sub { display: none; }
  .btn { width: 100%; }
}

/* Táctil: los pies de foto se ven siempre (en pantallas grandes; en móvil se leen en el visor) */
@media (hover: none) and (min-width: 681px) {
  .item__cap { opacity: 1; transform: none; padding: 44px 14px 12px; }
}

/* Menos movimiento: solo se quita lo intrusivo (zoom inicial y desplazamientos grandes).
   Las transiciones suaves de color y opacidad se mantienen. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__bg { animation: none; }
  .js .reveal { transform: none; transition: opacity 0.5s linear; }
  .item.is-in { animation: none; }
  .item__btn:hover img,
  .item__btn:focus-visible img { transform: none; }
}


/* ---------- 16. Acciones del público: favoritas, compartir, sorpresa ------- */
.item { position: relative; }

.item__fav {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #7a86ad;
  font-size: 1.15rem;
  line-height: 1;
  box-shadow: 0 2px 10px rgba(0, 20, 126, 0.25);
  transition: transform 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}
.item__fav:hover { transform: scale(1.08); color: #d6204a; }
.item__fav[aria-pressed="true"] { color: #d6204a; background: #fff; }
.item__fav:focus-visible { outline: 3px solid var(--ballixart-blue); outline-offset: 2px; }

.filter--fav .filter__heart { color: #d6204a; margin: 0 2px 0 0; font-weight: 400; }
.filter--fav.is-active .filter__heart { color: #ff9db3; }
.filter--random { margin-left: auto; border-style: dashed; }
.filter[hidden] { display: none; }

.btn--ghost { cursor: pointer; font: inherit; }
.inline-link { color: var(--ballixart-navy); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.lightbox__actions {
  position: absolute;
  top: clamp(12px, 2.4vw, 24px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 8px;
}
.lightbox__act { position: static; width: auto; min-width: 52px; padding: 0 16px; gap: 8px; grid-auto-flow: column; font-size: 1.1rem; }
.lightbox__acttxt { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.lightbox__act[aria-pressed="true"] { background: #d6204a; border-color: #fff; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 1000;
  max-width: min(92vw, 420px);
  padding: 14px 22px;
  background: var(--ballixart-navy);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 20, 126, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 680px) {
  .lightbox__acttxt { display: none; }
  .lightbox__act { padding: 0; width: 52px; }
  .filter--random { margin-left: 0; }
  .item__fav { width: 44px; height: 44px; top: 4px; right: 4px; }
}

/* ---------- 17. Paginación ------------------------------------------------- */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: clamp(28px, 4vw, 44px);
}
.pager[hidden] { display: none; }

.pager__btn {
  min-width: 44px;
  min-height: 44px;
  padding: 10px 16px;
  border: 2px solid var(--ballixart-navy);
  background: #fff;
  color: var(--ballixart-navy);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), opacity 0.25s var(--ease);
}
.pager__btn:hover:not(:disabled) { background: var(--ballixart-navy); color: #fff; }
.pager__btn:disabled { opacity: 0.35; cursor: not-allowed; border-color: var(--line); }
.pager__btn:focus-visible { outline: 3px solid var(--ballixart-blue); outline-offset: 2px; }

.pager__info {
  flex-basis: 100%;
  order: 5;
  margin-top: 6px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

@media (min-width: 900px) {
  .pager__info { flex-basis: auto; order: 0; margin: 0 14px; }
}

@media (max-width: 480px) {
  .pager__txt { display: none; }
  .pager__btn { flex: 1 1 0; }
}
