/* ==========================================================================
   JUDAS · Miranda de Ebro
   Paleta: blanco y negro. El único color de la web es el del logo.
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */
:root {
  color-scheme: dark;

  /* Color */
  --bg: #0a0a0a;
  --bg-deep: #050505;
  --panel: #141414;
  --panel-hover: #1d1d1d;
  --line: #2e2e2e;
  --line-soft: #1e1e1e;
  --text: #f4f4f4;
  --muted: #9d9d9d;
  --accent: #ffffff;
  --accent-soft: #cfcfcf;

  /* Tipografía */
  --font-display: "Anton", "Arial Narrow", Impact, sans-serif;
  --font-body: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  --size-xs: 0.75rem;
  --size-sm: 0.875rem;
  --size-base: 1.0625rem;
  --size-md: clamp(1.125rem, 0.4vw + 1.05rem, 1.3rem);
  --size-lg: clamp(1.5rem, 1.2vw + 1.2rem, 2rem);
  --size-xl: clamp(2rem, 2.4vw + 1.4rem, 3rem);
  --size-2xl: clamp(2.5rem, 5.5vw + 0.5rem, 4.75rem);

  /* Espacio y medidas */
  --wrap: 68rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --space-section: clamp(3.5rem, 8vw, 6.5rem);
  --measure: 62ch;
  --radius: 2px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--size-base);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); text-underline-offset: 0.25em; }
a:hover { color: var(--accent-soft); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  margin: 0;
}

p { margin: 0 0 1.1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  translate: -50% -110%;
  z-index: 100;
  background: var(--accent);
  color: #0a0a0a;
  padding: 0.7em 1.2em;
  font-size: var(--size-sm);
  text-decoration: none;
}
.skip-link:focus-visible { translate: -50% 0; color: #16120a; }

/* --- Cabecera ----------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg-deep) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.5rem;
}

.brand { display: flex; flex-shrink: 0; }
.brand img {
  width: 108px;
  height: 58px;
  object-fit: cover;
  object-position: center 51%;
  mix-blend-mode: screen; /* funde el fondo negro del PNG */
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  font: inherit;
  font-size: var(--size-sm);
  padding: 0.45em 0.9em;
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--accent); }

.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  font-size: var(--size-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  padding-block: 0.4em;
  border-bottom: 1px solid transparent;
}
.nav a:hover { color: var(--accent-soft); }
.nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* --- Portada ------------------------------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: clamp(3rem, 10vw, 6rem);
  border-bottom: 1px solid var(--line);
  background: var(--bg-deep);
}

/* Surcos de vinilo */
.hero::before {
  content: "";
  position: absolute;
  inset: -30% -10%;
  z-index: 1;
  background:
    repeating-radial-gradient(circle at 50% 50%,
      transparent 0 9px,
      rgba(255, 255, 255, 0.05) 9px 10px),
    radial-gradient(circle at 50% 44%,
      rgba(255, 255, 255, 0.16) 0,
      rgba(255, 255, 255, 0.07) 24%,
      rgba(255, 255, 255, 0.02) 46%,
      transparent 66%);
  mask-image: radial-gradient(circle at 50% 45%, #000 20%, transparent 72%);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
}

.hero-logo,
.hero-lede,
.hero .wrap > p {
  position: relative;
  z-index: 2;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-bg video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}
.hero-bg video.is-active {
  opacity: 1;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(10, 10, 10, 0.28), rgba(10, 10, 10, 0.58));
}

.hero-logo {
  width: min(30rem, 84vw);
  aspect-ratio: 1.85;
  object-fit: cover;
  object-position: center 51%;
  margin-inline: auto;
  mix-blend-mode: screen;
}

.hero p {
  max-width: 40ch;
  margin-inline: auto;
}

.hero-lede {
  margin: 1.75rem auto 2rem;
  font-size: var(--size-md);
  color: var(--text);
  text-wrap: balance;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Secciones ---------------------------------------------------------- */
.section {
  padding-block: var(--space-section);
  border-bottom: 1px solid var(--line-soft);
}
.section:last-of-type { border-bottom: 0; }

.section > .wrap > h2 { font-size: var(--size-2xl); }

.deck {
  font-size: var(--size-md);
  color: var(--muted);
  margin-top: 1.25rem;
  margin-bottom: 2.5rem;
  max-width: 52ch;
}

.year-mark {
  display: block;
  font-family: var(--font-display);
  font-size: var(--size-sm);
  letter-spacing: 0.22em;
  color: var(--accent-soft);
  margin-bottom: 0.9rem;
}

/* --- Rejilla y tarjetas ------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.15rem;
  margin-block: 2.5rem;
}
.grid--tight { gap: 0.6rem; }
.grid--wide { grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); }

.card {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 1.6rem;
  border-radius: var(--radius);
}
.card h3 { font-size: var(--size-lg); margin-bottom: 0.6rem; }
.card p { color: var(--muted); font-size: var(--size-sm); }

.card--link { padding: 0; }
.card--link a {
  display: block;
  padding: 1.6rem;
  height: 100%;
  text-decoration: none;
  color: inherit;
  border-left: 2px solid transparent;
}
.card--link a:hover,
.card--link a:focus-visible {
  background: var(--panel-hover);
  border-left-color: var(--accent);
}
.card--link h3 { color: var(--accent); }

.member { display: flex; flex-direction: column; gap: 0.5rem; }
.member .role {
  font-size: var(--size-xs);
  letter-spacing: 0.14em;
  color: var(--accent-soft);
  margin: 0;
  max-width: none;
}
.member h3 { font-size: var(--size-lg); margin: 0; }
.member p:last-child { color: var(--muted); font-size: var(--size-sm); }

.member--photo {
  padding: 0;
  overflow: hidden;
  gap: 0;
}
.member-photo {
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  background: var(--bg-deep);
}
.member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  filter: grayscale(1);
}
.member-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.2rem 1.6rem 1.55rem;
  flex: 1 1 auto;
}

.photo {
  aspect-ratio: 4 / 3;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 1.25rem;
  border: 1px dashed var(--line);
  background: var(--panel);
  color: var(--muted);
  border-radius: var(--radius);
}
.photo strong { display: block; color: var(--text); font-family: var(--font-display); font-size: var(--size-md); text-transform: uppercase; }
.photo span { font-size: var(--size-xs); }

/* Galería tipo exposición */
.exhibit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.25rem, 3vw, 2rem);
  margin-block: 2.5rem;
  align-items: start;
}
.exhibit figure {
  margin: 0;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  padding: 0.85rem 0.85rem 1.1rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.exhibit img,
.exhibit video {
  width: 100%;
  height: auto;
  display: block;
  background: #000;
}
.exhibit video {
  aspect-ratio: 16 / 9;
  object-fit: contain;
}
.exhibit figcaption {
  margin-top: 0.85rem;
  padding-inline: 0.15rem;
}
.exhibit figcaption strong {
  display: block;
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--size-md);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.15;
}
.exhibit figcaption span {
  display: block;
  margin-top: 0.35rem;
  font-size: var(--size-xs);
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* --- Cronología --------------------------------------------------------- */
.timeline {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0 0 0 2rem;
  border-left: 1px solid var(--line);
}
.timeline > li { position: relative; margin-bottom: 2.75rem; }
.timeline > li:last-child { margin-bottom: 0; }
.timeline > li::before {
  content: "";
  position: absolute;
  left: calc(-2rem - 5px);
  top: 0.75rem;
  width: 9px;
  height: 9px;
  background: var(--accent-soft);
  border-radius: 50%;
}
.timeline .when {
  display: block;
  font-family: var(--font-display);
  font-size: var(--size-xl);
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.timeline p { color: var(--muted); }

/* --- Cita --------------------------------------------------------------- */
.quote {
  margin: 2.75rem 0;
  padding: 0.2em 0 0.2em 1.5rem;
  border-left: 3px solid var(--accent);
  font-family: var(--font-display);
  font-size: var(--size-xl);
  line-height: 1.15;
  text-transform: uppercase;
  max-width: 24ch;
}
.quote p { max-width: none; }
.quote--plain {
  font-family: var(--font-body);
  font-size: var(--size-md);
  text-transform: none;
  line-height: 1.5;
  max-width: 48ch;
  border-left-color: var(--line);
}

/* --- Botones ------------------------------------------------------------ */
.btn {
  display: inline-block;
  border: 1px solid #5a5a5a;
  color: var(--text);
  padding: 0.85em 1.4em;
  text-decoration: none;
  text-transform: uppercase;
  font-size: var(--size-xs);
  letter-spacing: 0.12em;
  border-radius: var(--radius);
}
.btn:hover,
.btn:focus-visible { background: var(--accent); color: var(--bg-deep); border-color: var(--accent); }

/* Botón principal: relleno, para la llamada de la portada */
.btn--strong {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg-deep);
}
.btn--strong:hover,
.btn--strong:focus-visible { background: transparent; color: var(--accent); }

/* --- Notas y pie -------------------------------------------------------- */
.note {
  font-size: var(--size-sm);
  color: var(--muted);
  margin-top: 2rem;
}

.site-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding-block: 3rem;
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
  color: var(--muted);
  font-size: var(--size-sm);
}
.site-footer p { max-width: 60ch; }

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 46rem) {
  .site-header .wrap {
    flex-wrap: wrap;
    padding-block: 0.9rem;
    gap: 0.75rem;
  }
  .nav-toggle { display: block; }
  .nav {
    flex-basis: 100%;
    display: none;
  }
  .nav[data-open="true"] { display: block; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav li + li { border-top: 1px solid var(--line-soft); }
  .nav a { display: block; padding-block: 0.8em; }
  .nav a[aria-current="page"] { border-bottom-color: transparent; }
  .exhibit { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header, .skip-link, .btn { display: none; }
  body { background: #fff; color: #000; }
}
