/* ============================================================
   Ball de Diables de Torrelles de Foix · design system
   Palette drawn from Projecte Inferis: soot black, bone white,
   Penedès terracotta and ember. "Sense el negre, les flames
   no tindrien la màgia que tenen."
   Els tokens de marca viuen a brand/tokens.css (font única).
   ============================================================ */

@import url("../brand/tokens.css");

:root {
  --nav-h: 3.5rem;
  --wrap: 74rem;
  --pad: clamp(1.25rem, 5vw, 2.5rem);
}

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

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

body {
  background: var(--negre);
  color: var(--cendra);
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection { background: var(--principal); color: var(--negre); }

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

a { color: inherit; text-decoration: none; }

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  background: var(--os);
  color: var(--negre);
  padding: 0.6rem 1.1rem;
  border-radius: 99px;
  font-size: 0.85rem;
  transition: top 0.25s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

/* ---------- type ---------- */

h1, h2, h3 { color: var(--os); text-wrap: balance; }

.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 5.8vw, 4.4rem);
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.6vw, 2.8rem);
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.subtitle {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.25rem, 2.1vw, 1.7rem);
  line-height: 1.25;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--principal);
}

.lead {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  font-weight: 300;
  line-height: 1.6;
  color: var(--cendra);
  max-width: 38em;
}

p strong, li strong { color: var(--os); font-weight: 500; }

.serif-i { font-family: var(--font-display); font-weight: 400; }

/* ---------- layout ---------- */

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

.section { padding-block: clamp(5rem, 11vw, 8.5rem); }

.section-head { max-width: 44rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head .eyebrow { margin-bottom: 1.1rem; }
.section-head .title { margin-bottom: 1.25rem; }

/* the signature: an ember seam, like the burnt hems of the costumes */
.seam {
  height: 1px;
  border: 0;
  background: var(--grad-foc);
  background-size: 220% 100%;
  opacity: 0.85;
  animation: seam-breathe 7s ease-in-out infinite alternate;
}
.seam--soft { opacity: 0.4; }

@keyframes seam-breathe {
  from { background-position: 0% 0; }
  to { background-position: 100% 0; }
}

.hairline { border: 0; border-top: 1px solid var(--vora); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.7rem;
  border-radius: 99px;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: transform 0.15s var(--ease-out), background-color 0.25s, color 0.25s, border-color 0.25s;
}
.btn:active { transform: scale(0.96); }

.btn--primary { background: var(--principal); color: var(--negre); }
.btn--primary:hover { background: var(--suau); }

.btn--ghost { border: 1px solid rgba(244, 241, 238, 0.28); color: var(--os); }
.btn--ghost:hover { border-color: var(--os); background: rgba(244, 241, 238, 0.06); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--os);
  font-size: 0.95rem;
  font-weight: 500;
}
.link-arrow::after {
  content: "→";
  color: var(--principal);
  transition: transform 0.25s var(--ease-out);
}
.link-arrow:hover::after { transform: translateX(0.35rem); }

/* ---------- nav ---------- */

.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: var(--negre);
  border-bottom: 1px solid var(--vora);
  transition: transform 0.45s var(--ease-out);
}
.nav.nav-hidden { transform: translateY(-100%); }
@media (prefers-reduced-motion: reduce) {
  .nav { transition: none; }
}

.nav-inner {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand { display: flex; align-items: center; gap: 0.9rem; flex-shrink: 0; }
.brand-boc { height: var(--nav-h); width: auto; display: block; }
.brand-name {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--os);
  line-height: 1.3;
}
.brand-name small { font-size: 0.9rem; font-weight: 700; color: var(--cendra); letter-spacing: 0.01em; }
@media (max-width: 40rem) { .brand-name { display: none; } }

.nav-links { display: flex; align-items: center; gap: 1.9rem; list-style: none; }
.nav-links a:not(.btn) {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--cendra);
  transition: color 0.2s;
}
.nav-links a:not(.btn):hover { color: var(--os); }
.nav-links a[aria-current="page"] { color: var(--os); }
.nav-links .btn { padding: 0.55rem 1.2rem; font-size: 0.82rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
}
.nav-toggle span {
  display: block;
  width: 1.35rem;
  height: 1.5px;
  background: var(--os);
  transition: transform 0.3s var(--ease-out), opacity 0.2s;
}
.menu-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 68rem) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.4rem;
    padding: var(--pad);
    background: rgba(18, 18, 18, 0.92);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    backdrop-filter: blur(24px) saturate(150%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s var(--ease-out), visibility 0.35s;
  }
  .menu-open .nav-links { opacity: 1; visibility: visible; }
  .nav-links li { width: 100%; border-bottom: 1px solid var(--vora); }
  .nav-links li:last-child { border-bottom: 0; margin-top: 1.5rem; }
  .nav-links a:not(.btn) {
    display: block;
    padding: 1.05rem 0;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--os);
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
    transition-delay: calc(var(--i, 0) * 45ms);
  }
  .menu-open .nav-links a:not(.btn) { opacity: 1; transform: none; }
  body.menu-open { overflow: hidden; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: clip;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: -12% 0;
  z-index: -1;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  animation: hero-zoom 14s var(--ease-out) forwards;
}
@keyframes hero-zoom { to { transform: scale(1); } }

.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(18, 18, 18, 0.55), rgba(18, 18, 18, 0.15) 40%, rgba(18, 18, 18, 0.92) 92%),
    radial-gradient(120% 60% at 50% 100%, rgba(18, 18, 18, 0.6), transparent 60%);
}

.hero-content {
  width: 100%;
  padding-bottom: clamp(4.5rem, 10vh, 7.5rem);
}
.hero-content .eyebrow { color: var(--os); font-weight: 700; margin-bottom: 1.4rem; }
.hero-content .display { max-width: 11em; margin-bottom: 1.6rem; }
.hero-content .lead { margin-bottom: 2.4rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.hero .seam { position: absolute; bottom: 0; left: 0; right: 0; }

.scroll-cue {
  position: absolute;
  right: var(--pad);
  bottom: clamp(4.5rem, 10vh, 7.5rem);
  width: 1px;
  height: 4.5rem;
  background: rgba(244, 241, 238, 0.25);
  overflow: hidden;
}
.scroll-cue::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--suau);
  animation: cue 2.2s var(--ease-out) infinite;
}
@keyframes cue {
  from { transform: translateY(-100%); }
  60%, to { transform: translateY(100%); }
}
@media (max-width: 48rem) { .scroll-cue { display: none; } }

/* page heroes (interior pages) */
.page-hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(4rem, 10vw, 7.5rem));
  padding-bottom: clamp(3.5rem, 7vw, 5.5rem);
}
.page-hero .eyebrow { margin-bottom: 1.2rem; }
.page-hero .display { margin-bottom: 1.5rem; max-width: 12em; }

/* ---------- reveal on scroll ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
[data-reveal].in { opacity: 1; transform: none; }

[data-reveal="fade"] { transform: none; }
[data-reveal="scale"] { transform: scale(0.96); }
[data-reveal="scale"].in { transform: none; }

/* ---------- stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem var(--pad);
}
@media (max-width: 56rem) { .stats { grid-template-columns: repeat(2, 1fr); } }

.stat { border-top: 1px solid var(--vora); padding-top: 1.4rem; }
.stat-num {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  line-height: 1;
  color: var(--os);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.stat-num sup { font-size: 0.45em; color: var(--principal); }
.stat-label {
  margin-top: 0.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cendra);
}

/* ---------- cards / characters ---------- */

.chars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 1.75rem);
}
@media (max-width: 56rem) { .chars { grid-template-columns: 1fr; } }

.char-card {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}
.char-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease-out), filter 0.6s;
  filter: saturate(0.92);
}
.char-card:hover img { transform: scale(1.05); filter: saturate(1.05); }
.char-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(18, 18, 18, 0.88));
}
.char-meta {
  position: absolute;
  z-index: 1;
  inset-inline: 1.5rem;
  bottom: 1.4rem;
}
.char-meta .subtitle { margin-bottom: 0.2rem; }
.char-meta span { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--suau); }

/* ---------- editorial split ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: center;
}
@media (max-width: 56rem) { .split { grid-template-columns: 1fr; } }

.split figure {
  overflow: hidden;
  border-radius: 6px;
}
.split figure img { transition: transform 1.2s var(--ease-out); }
.split figure:hover img { transform: scale(1.04); }

.split .title { margin-block: 1.1rem 1.4rem; }
.split p + p { margin-top: 1rem; }
.split .link-arrow, .split .btn { margin-top: 1.9rem; }

/* ---------- quote band ---------- */

.quote-band {
  position: relative;
  text-align: center;
  padding-block: clamp(6rem, 14vw, 10rem);
  overflow: clip;
}
.quote-band blockquote {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.4rem, 2.9vw, 2.2rem);
  line-height: 1.4;
  color: var(--os);
  max-width: 21em;
  margin-inline: auto;
}
.quote-band cite {
  display: block;
  margin-top: 1.6rem;
  font-family: var(--font-ui);
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--principal);
}
.quote-band .bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.quote-band .bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.22; }
.quote-band .bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 90% at 50% 50%, transparent, var(--negre) 85%);
}

/* ---------- horizontal gallery strip ---------- */

.strip {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-inline: max(var(--pad), calc((100vw - var(--wrap)) / 2 + var(--pad)));
  padding-bottom: 1rem;
  scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip > a, .strip > figure {
  flex: 0 0 auto;
  width: clamp(16rem, 30vw, 24rem);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 6px;
  scroll-snap-align: center;
  background: rgba(255, 255, 255, 0.04);
}
.strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}
.strip a:hover img { transform: scale(1.05); }

/* ---------- CTA band ---------- */

.cta-band {
  position: relative;
  text-align: center;
  padding-block: clamp(6rem, 13vw, 10rem);
  overflow: clip;
  isolation: isolate;
}
.cta-band .bg { position: absolute; inset: 0; z-index: -1; }
.cta-band .bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.35; }
.cta-band .bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--negre), rgba(18, 18, 18, 0.45) 50%, var(--negre));
}
.cta-band .display { margin-bottom: 1.2rem; }
.cta-band .lead { margin-inline: auto; margin-bottom: 2.4rem; }
.cta-band .hero-actions { justify-content: center; }

/* ---------- timeline (història) ---------- */

.timeline { position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--vora);
}
.timeline-progress {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 0;
  background: var(--grad-foc);
  box-shadow: 0 0 12px rgba(237, 141, 117, 0.55);
}

.era {
  position: relative;
  padding: 0 0 clamp(4rem, 9vw, 7rem) clamp(2rem, 5vw, 4rem);
}
.era:last-child { padding-bottom: 0; }
.era::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 0.5rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--principal);
  box-shadow: 0 0 0 5px rgba(237, 141, 117, 0.15);
}
.era-year {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1;
  color: var(--os);
}
.era-title {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--principal);
  font-weight: 600;
}
.era-body {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  margin-top: 1.75rem;
  align-items: start;
}
@media (max-width: 56rem) { .era-body { grid-template-columns: 1fr; } }
.era-body p + p { margin-top: 1rem; }
.era-body figure { overflow: hidden; border-radius: 6px; }
.era-body figure img { width: 100%; max-height: 26rem; object-fit: cover; }
.era-body figcaption {
  margin-top: 0.7rem;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: rgba(165, 160, 155, 0.75);
}
.era-slideshow {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  aspect-ratio: 4 / 3;
  max-height: 26rem;
}
.era-slideshow figure {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s var(--ease-out);
}
.era-slideshow figure.is-active { opacity: 1; }
.era-slideshow img { width: 100%; height: 100%; max-height: none; object-fit: cover; }
.era-slideshow figcaption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  margin: 0;
  padding: 2.4rem 1.1rem 0.9rem;
  background: linear-gradient(transparent, rgba(18, 18, 18, 0.85));
  color: var(--os);
}

/* ---------- legend chapters (ball parlat) ---------- */

.chapter { position: relative; }
.chapter-media {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: clip;
  z-index: -1;
}
.chapter-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}
.chapter-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--negre), transparent 30%, transparent 65%, var(--negre)),
    radial-gradient(100% 100% at 50% 50%, transparent 40%, rgba(18, 18, 18, 0.75));
}
.chapter-text {
  position: relative;
  margin-top: -55svh;
  padding-bottom: clamp(8rem, 20vh, 14rem);
}
.chapter-text .panel {
  max-width: 36rem;
  margin-inline: auto;
  text-align: center;
  text-shadow: 0 1px 22px rgba(18, 18, 18, 0.85), 0 1px 4px rgba(18, 18, 18, 0.6);
}
.chapter-num {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.35em;
  color: var(--principal);
  margin-bottom: 1.2rem;
}
.chapter-text .subtitle { font-size: clamp(1.5rem, 2.9vw, 2.1rem); margin-bottom: 1.5rem; }
.chapter-text p {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.85;
  color: rgba(244, 241, 238, 0.82);
}
.chapter-text p + p { margin-top: 1.2rem; }

/* ---------- inferis character blocks ---------- */

.figura {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(3.5rem, 7vw, 6rem);
}
@media (max-width: 56rem) { .figura { grid-template-columns: 1fr; } }
.figura:nth-child(even) .figura-media { order: 2; }
@media (max-width: 56rem) { .figura:nth-child(even) .figura-media { order: 0; } }

.figura-media { position: relative; }
.figura-media .main {
  overflow: hidden;
  border-radius: 6px;
  aspect-ratio: 3 / 4;
}
.figura-media .main img { width: 100%; height: 100%; object-fit: cover; }
.figura-media .croquis {
  position: absolute;
  right: -0.9rem;
  bottom: -1.5rem;
  width: clamp(6.5rem, 12vw, 9.5rem);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
  transform: rotate(2.5deg);
  cursor: zoom-in;
  transition: transform 0.4s var(--ease-out);
  border: 0;
  padding: 0;
}
.figura-media .croquis:hover { transform: rotate(0deg) scale(1.04); }

.figura-shot { position: relative; }
.figura-shot .slide { height: 100%; }
.figura-shot .slide.hide { display: none; }
.fig-arrow {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  z-index: 2;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(18, 18, 18, 0.55);
  border: 1px solid rgba(244, 241, 238, 0.25);
  color: var(--os);
  transition: background-color 0.2s, border-color 0.2s;
}
.fig-arrow:hover { background: rgba(18, 18, 18, 0.85); border-color: var(--os); }
.fig-prev { left: 0.8rem; }
.fig-next { right: 0.8rem; }

/* transició del logotip: del diable vermell al crani de boc */
.logo-pas { margin: 0; cursor: zoom-in; }
.logo-pas img { width: 100%; border-radius: 6px; }
.logo-pas figcaption {
  margin-top: 0.7rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cendra);
}
.logo-fletxa {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-block: 1.4rem;
  color: var(--principal);
  font-size: 1.5rem;
}
.logo-fletxa::before,
.logo-fletxa::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--grad-foc);
  opacity: 0.5;
}
.logo-fletxa span { transform: rotate(90deg); }

.figura-info .eyebrow { margin-bottom: 0.9rem; }
.figura-info .title { margin-bottom: 1.3rem; }
.figura-info p + p { margin-top: 1rem; }
.figura-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.7rem;
  list-style: none;
}
.figura-facts li {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cendra);
  border: 1px solid var(--vora);
  border-radius: 99px;
  padding: 0.38rem 0.9rem;
}

/* ---------- versots ---------- */

.versot-year {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  padding-block: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--vora);
  align-items: baseline;
}
.versot-year:last-of-type { border-bottom: 1px solid var(--vora); }
.versot-year .any {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: 1;
  color: var(--os);
  min-width: 3.2em;
}
.versot-year ul { list-style: none; }
.versot-year li {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  color: var(--os);
  padding-block: 0.3rem;
}
.versot-year li span { font-style: normal; font-family: var(--font-ui); font-size: 0.85rem; color: var(--cendra); }
.versot-year li a { transition: color 0.2s; }
.versot-year li a:hover { color: var(--principal); }
.versot-year .nota { font-size: 0.95rem; color: var(--cendra); }
@media (max-width: 40rem) { .versot-year { grid-template-columns: 1fr; gap: 0.75rem; } }

/* ---------- actes / esdeveniments ---------- */

.actes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 2vw, 1.75rem);
}
@media (max-width: 56rem) { .actes-grid { grid-template-columns: 1fr; } }

.acte {
  position: relative;
  border: 1px solid var(--vora);
  border-radius: 6px;
  padding: clamp(1.75rem, 3.5vw, 2.75rem);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
  transition: border-color 0.3s, transform 0.3s var(--ease-out);
}
.acte:hover { border-color: rgba(237, 141, 117, 0.4); transform: translateY(-3px); }
.acte .subtitle { margin-block: 0.9rem 0.8rem; }
.acte .quan {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--suau);
}

.normes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}
@media (max-width: 56rem) { .normes { grid-template-columns: 1fr; } }
.normes h3 { margin-bottom: 1.4rem; }
.normes ul { list-style: none; }
.normes li {
  position: relative;
  padding: 0.85rem 0 0.85rem 1.9rem;
  border-bottom: 1px solid var(--vora);
  font-size: 0.98rem;
}
.normes li::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 0.85rem;
  color: var(--principal);
  font-size: 0.8rem;
}

/* ---------- galeria ---------- */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.filter-bar button {
  padding: 0.55rem 1.3rem;
  border-radius: 99px;
  border: 1px solid var(--vora);
  font-size: 0.85rem;
  color: var(--cendra);
  transition: all 0.25s var(--ease-out);
}
.filter-bar button:hover { color: var(--os); border-color: rgba(244, 241, 238, 0.3); }
.filter-bar button[aria-pressed="true"] {
  background: var(--os);
  color: var(--negre);
  border-color: var(--os);
  font-weight: 500;
}
.filter-bar button:active { transform: scale(0.96); }

.masonry { columns: 3 16rem; column-gap: 1rem; }
.masonry figure {
  break-inside: avoid;
  margin-bottom: 1rem;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  cursor: zoom-in;
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}
.masonry figure.hide { display: none; }
.masonry img { width: 100%; transition: transform 0.8s var(--ease-out); }
.masonry figure:hover img { transform: scale(1.04); }

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(18, 18, 18, 0.94);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease-out), visibility 0.3s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 4px;
  transform: scale(0.96);
  transition: transform 0.35s var(--ease-out);
}
.lightbox.open img { transform: scale(1); }
.lightbox-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 50%;
  border: 1px solid rgba(244, 241, 238, 0.25);
  color: var(--os);
  font-size: 1.15rem;
  background: rgba(18, 18, 18, 0.5);
  transition: background-color 0.2s, transform 0.15s var(--ease-out);
}
.lightbox-btn:hover { background: rgba(244, 241, 238, 0.12); }
.lightbox-btn:active { transform: scale(0.92); }
.lightbox-close { top: 1.25rem; right: 1.25rem; }
.lightbox-prev { left: 1.25rem; top: 50%; translate: 0 -50%; }
.lightbox-next { right: 1.25rem; top: 50%; translate: 0 -50%; }

/* ---------- steps (fes-te diable) ---------- */

.steps { list-style: none; counter-reset: pas; max-width: 46rem; }
.steps li {
  counter-increment: pas;
  position: relative;
  padding: 1.9rem 0 1.9rem 5rem;
  border-bottom: 1px solid var(--vora);
}
.steps li::before {
  content: counter(pas, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1.75rem;
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--principal);
}
.steps h3 { font-size: 1.15rem; font-weight: 500; margin-bottom: 0.35rem; font-family: var(--font-ui); }
.steps p { font-size: 0.98rem; }

.edats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}
@media (max-width: 48rem) { .edats { grid-template-columns: 1fr; } }
.edat {
  border: 1px solid var(--vora);
  border-radius: 6px;
  padding: 2rem 1.75rem;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
}
.edat .stat-num { font-size: clamp(2.4rem, 4vw, 3.4rem); }
.edat p { margin-top: 0.7rem; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; }

/* ---------- contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
@media (max-width: 56rem) { .contact-grid { grid-template-columns: 1fr; } }

.contact-list { list-style: none; }
.contact-list li { border-bottom: 1px solid var(--vora); }
.contact-list a, .contact-list .row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1.4rem 0;
  transition: padding-left 0.3s var(--ease-out);
}
.contact-list a:hover { padding-left: 0.6rem; }
.contact-list .label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--principal);
}
.contact-list .value {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--os);
  overflow-wrap: anywhere;
}

.form { display: grid; gap: 1.1rem; }
.form label {
  display: grid;
  gap: 0.45rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cendra);
}
.form input, .form textarea {
  font: inherit;
  color: var(--os);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--vora);
  border-radius: 6px;
  padding: 0.9rem 1.1rem;
  transition: border-color 0.25s;
}
.form input:focus, .form textarea:focus {
  outline: none;
  border-color: var(--principal);
}
.form textarea { min-height: 9rem; resize: vertical; }
.form .btn { justify-self: start; margin-top: 0.4rem; }
.form-note { font-size: 0.85rem; color: rgba(165, 160, 155, 0.8); }

.map-embed {
  margin-top: clamp(3rem, 6vw, 5rem);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--vora);
  filter: grayscale(1) invert(0.92) contrast(0.9) sepia(0.18);
}
.map-embed iframe { display: block; width: 100%; height: 24rem; border: 0; }

/* ---------- marca / downloads ---------- */

.marca-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2vw, 1.75rem);
}
@media (max-width: 48rem) { .marca-grid { grid-template-columns: 1fr; } }
.marca-item {
  border: 1px solid var(--vora);
  border-radius: 6px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}
.marca-item.clar { background: var(--os); }
.marca-item img { width: min(11rem, 50%); }
.marca-item .btn { font-size: 0.82rem; padding: 0.6rem 1.3rem; }
.marca-item.clar .btn--ghost { border-color: rgba(18, 18, 18, 0.3); color: var(--negre); }
.marca-item.clar .btn--ghost:hover { border-color: var(--negre); background: rgba(18, 18, 18, 0.05); }

/* ---------- manual de marca ---------- */

.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1rem;
}
.swatch {
  border: 1px solid var(--vora);
  border-radius: 6px;
  overflow: hidden;
}
.swatch .chip { height: 7.5rem; }
.swatch .info { padding: 1.1rem 1.2rem; background: rgba(255, 255, 255, 0.04); }
.swatch .info strong { display: block; color: var(--os); font-weight: 500; font-size: 0.95rem; }
.swatch .info span {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--cendra);
  margin-top: 0.3rem;
  font-variant-numeric: tabular-nums;
}

.specimen { border-top: 1px solid var(--vora); padding-block: 2rem; display: grid; grid-template-columns: 11rem 1fr; gap: 1.5rem; align-items: baseline; }
@media (max-width: 48rem) { .specimen { grid-template-columns: 1fr; gap: 0.6rem; } }
.specimen .spec {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cendra);
  line-height: 2;
}
.specimen .spec b { color: var(--principal); font-weight: 600; display: block; }

.regles { list-style: none; max-width: 44rem; }
.regles li {
  position: relative;
  padding: 0.8rem 0 0.8rem 1.9rem;
  border-bottom: 1px solid var(--vora);
  font-size: 0.98rem;
}
.regles li::before { content: "✦"; position: absolute; left: 0; top: 0.8rem; color: var(--principal); font-size: 0.8rem; }
.regles li.no::before { content: "✕"; color: var(--vermell); }

.plantilles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 1.75rem);
  align-items: start;
}
@media (max-width: 56rem) { .plantilles { grid-template-columns: 1fr; } }
.plantilla { border: 1px solid var(--vora); border-radius: 6px; overflow: hidden; background: rgba(255, 255, 255, 0.04); }
.plantilla img { width: 100%; }
.plantilla .info { padding: 1.3rem 1.4rem 1.5rem; }
.plantilla .info strong { color: var(--os); font-weight: 500; display: block; margin-bottom: 0.2rem; }
.plantilla .info span { font-size: 0.82rem; color: var(--cendra); display: block; margin-bottom: 0.9rem; }
.plantilla .btn { font-size: 0.78rem; padding: 0.5rem 1.1rem; }

.recursos { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.footer-bottom a { color: inherit; transition: color 0.2s; }
.footer-bottom a:hover { color: var(--os); }

/* ---------- footer ---------- */

.footer {
  position: relative;
  margin-top: clamp(3rem, 7vw, 5rem);
  padding-block: clamp(3.5rem, 7vw, 5.5rem) 2.5rem;
  background: #0d0d0d;
}
.footer .seam { position: absolute; top: 0; left: 0; right: 0; }

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  padding-bottom: 3rem;
}
@media (max-width: 56rem) { .footer-top { grid-template-columns: 1fr; } }

.footer-brand img { width: 5.5rem; margin-bottom: 1.4rem; opacity: 0.95; }
.footer-brand p {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--os);
  max-width: 16em;
}

.footer h4 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--principal);
  margin-bottom: 1.2rem;
}
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 0.55rem; }
.footer ul a { font-size: 0.92rem; color: var(--cendra); transition: color 0.2s; }
.footer ul a:hover { color: var(--os); }

.footer-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.4rem 2.4rem;
  padding-block: 2rem;
  border-top: 1px solid var(--vora);
}
.footer-logos span {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cendra);
  margin-right: 0.6rem;
}
.footer-logos img { height: 2.5rem; width: auto; opacity: 0.75; transition: opacity 0.25s; }
.footer-logos img:hover { opacity: 1; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--vora);
  font-size: 0.8rem;
  color: rgba(165, 160, 155, 0.7);
}
.socials { display: flex; gap: 0.6rem; }
.socials a {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--vora);
  border-radius: 50%;
  color: var(--cendra);
  transition: all 0.25s var(--ease-out);
}
.socials a:hover { color: var(--negre); background: var(--os); border-color: var(--os); transform: translateY(-2px); }
.socials svg { width: 1rem; height: 1rem; fill: currentColor; }

/* ---------- misc ---------- */

.parallax-img { will-change: transform; }

.text-block { max-width: 44rem; }
.text-block p + p { margin-top: 1.1rem; }

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.15s !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .hero-media img { transform: none; animation: none; }
  .parallax-img { transform: none !important; }
  .scroll-cue { display: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .nav.scrolled, .nav.menu-open, .nav-links { background: var(--negre); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .lightbox { background: var(--negre); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
