/* ==========================================================================
   Variables / Base
   ========================================================================== */

:root {
  --blue: #458ac5;
  --yellow: #ffbf1c;
  --offwhite: #ebebeb;

  --container: 1280px;

  /* Breakpoints */
  --bp-tablet-min: 768px;
  --bp-desktop-min: 1024px;

  /* Transicions */
  --t-fast: 300ms ease-out;
}

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

html {
  scroll-behavior: smooth; /* també fem scroll amb JS per control extra */
}

body {
  margin: 0;
  background: var(--offwhite);
  color: var(--blue);
  font-family: "Reddit Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Utilitat: contenidor centrat (fons de secció sempre a 100% viewport) */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

/* Cada secció: mínim 100vh, amb espai consistent */
.section {
  min-height: 100vh;
  width: 100%;
  position: relative;
  padding-block: 48px;
}

/* ==========================================================================
   Header / Navegació
   ========================================================================== */

/* ==========================================================================
   HEADER BAR (flotant només a HOME)
   - Mida de referència desktop: 1239x57 (aprox)
   - Fons #EBEBEB + stroke 4px #458AC5
   - Logo esquerra (64x29)
   - Menú dreta amb separadors 4px i text blau
   - Tablet/Mobile: 2 files (wrap)
   ========================================================================== */

.site-header {
  position: absolute;          /* flota sobre HOME */
  inset: 18px 0 auto 0;        /* separació superior (ajusta si vols) */
  z-index: 10;
}

/* Contenidor únic del header (la "barra") */
.header-bar {
  height: 57px;                /* segons especificació */
  width: 100%;
  background: var(--offwhite);
  border: 4px solid var(--blue);

  display: flex;
  align-items: stretch;
}

/* Logo encaixat a l’esquerra */
.header-bar__logo {
  display: inline-flex;
  align-items: center;
  padding-inline: 18px;        /* espai intern del bloc del logo */
  text-decoration: none;
}

/* Separador vertical entre logo i menú */
.header-bar__logo {
  border-right: 4px solid var(--blue);
}

.header-bar__logo-img {
  width: 64px;
  height: 29px;
  display: block;
}

/* Nav ocupa la resta */
.header-bar__nav {
  flex: 1;
  display: flex;
}

/* Llista del menú: una fila en desktop, 2 files en tablet/mobile per wrap */
.header-nav {
  list-style: none;
  margin: 0;
  padding: 0;

  display: flex;
  flex-wrap: wrap;             /* això crea 2 files a tablet/mobile */
  width: 100%;
  height: 100%;
}

/* Cada item del menú: separador vertical 4px (entre items) */
.header-nav__item {
  display: flex;
}

.header-nav__item + .header-nav__item {
  border-left: 4px solid var(--blue);
}

/* El nav ocupa tot l'espai restant i empeny el menú cap a la dreta */
.header-bar__nav {
  flex: 1;
  display: flex;
  justify-content: flex-end; /* menú a la dreta */
}

/* La llista del menú també s'alinea a la dreta */
.header-nav {
  justify-content: flex-end; /* items a la dreta */
}

/* Link: text blau, padding aprox 30px */
.header-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 100%;
  padding-inline: 30px;        /* confirmat aprox */
  text-decoration: none;

  font-family: "Stack Sans Headline", system-ui, sans-serif;
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;

  color: var(--blue);
  transition: opacity var(--t-fast);
}

/* Hover: opacity 50% (confirmat) */
.header-nav__link:hover,
.header-nav__link:focus-visible {
  opacity: 0.5;
  outline: none;
}

.header-nav__link--disabled {
  cursor: default;
}

/* ===== Tablet/Mobile layout =====
   - Com que fem flex-wrap, els items saltaran a segona fila.
   - Necessitem que la "barra" creixi en alçada automàticament.
*/
@media (max-width: 1023px) {
  .header-bar {
    height: auto;              /* permet 2 files */
  }

  .header-nav__link {
    padding-block: 18px;       /* dona aire a la segona fila */
    height: auto;
  }
}

/* ==========================================================================
   Botó sticky de scroll (dreta)
   ========================================================================== */

.scroll-sticky {
  position: fixed; /* "sticky mentre es fa scroll" */
  right: 18px;
  top: 110px;
  z-index: 50;

  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.scroll-sticky__img {
  display: block;
  width: 56px;
  height: auto;
}

/* ==========================================================================
   HOME (slideshow)
   ========================================================================== */

.section--home {
  padding-block: 0;
  overflow: hidden;
  color: var(--offwhite);
}

.home-bg {
  position: absolute;
  inset: 0;
  z-index: 0;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.home__content {
  position: relative;
  z-index: 1;
  min-height: 100vh;

  display: flex;
  align-items: flex-end;
  padding-bottom: 64px;
}

.home-title {
  margin: 0;
  line-height: 0.95;
  text-transform: uppercase;

  /* Font principal (si "Stack Sans Headline" no carrega, caurà a system-ui) */
  font-family: "Stack Sans Headline", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  font-size: 123px; /* desktop */
}

.home-title__bold {
  font-weight: 700;
  display: inline;
}

.home-title__regular {
  font-weight: 400;
  display: inline;
}

/* HOME responsive */
@media (max-width: 1023px) {
  .home-title {
    font-size: 105px; /* tablet */
  }
}

@media (max-width: 475px) {
  .home-title {
    font-size: 80px; /* mobile */
  }
}

/* ==========================================================================
   PRESENTACION
   ========================================================================== */

.section--presentacion {
  background: var(--offwhite);
}

.presentacion {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
  align-items: start;
  padding-top: 32px;
}

.presentacion-subtitle {
  margin: 0 0 24px 0;
  font-family: "Stack Sans Headline", system-ui, sans-serif;
  font-size: 24px;
  color: var(--blue);
  text-transform: none;
}

.presentacion-subtitle__light {
  font-weight: 300;
  margin-right: 8px;
}

.presentacion-subtitle__semibold {
  font-weight: 600;
}

.presentacion-text p {
  margin: 0 0 14px 0;
  font-size: 16px;
  font-weight: 500; /* medium */
  line-height: 1.5;
  color: var(--blue);
}

.presentacion-photo {
  margin: 70px 0 0 0;
  width: 435px;
  max-width: 100%;
  border: 4px solid var(--yellow);
  transform: rotate(0deg);
  transition: transform 400ms ease-out;
}

.presentacion-photo img {
  display: block;
  width: 100%;
  height: auto;
}

/* Estat in-view (rotació 17°) */
.presentacion-photo.is-inview {
  transform: rotate(17deg);
}

/* Botons basats en imatge (swap on hover via JS) */
.btn-img {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.btn-img__img {
  display: block;
  height: auto;
  max-width: 100%;
}

/* PRESENTACION responsive */
@media (max-width: 1023px) {
  .presentacion {
    grid-template-columns: 1fr;
  }

  .presentacion__right {
    display: grid;
    gap: 16px;
  }

  .presentacion-photo {
    width: 435px;
    justify-self: start;
  }
}

/* ==========================================================================
   Reveal horitzontal (slide + mask) - 6s loop
   - El text entra des de la dreta (X+)
   - Es va revelant (mask de dreta->esquerra)
   - Després s'amaga i reinicia
   ========================================================================== */

.reveal-slide {
  display: block;
  width: 100%;
}

/* Mascara: controla què es veu del text (reveal) */
.reveal-slide__mask {
  overflow: hidden;
  /* Reveal progressiu de dreta -> esquerra */
  animation: rs-mask 6s ease-in-out infinite;
}

/* Text: es mou horitzontalment */
.reveal-slide__text {
  margin: 0;
  text-transform: uppercase;
  font-family: "Stack Sans Headline", system-ui, sans-serif;
  font-weight: 300; /* light per la secció giratòria */
  line-height: 1;
  white-space: nowrap; /* important: comportament horitzontal */
  color: var(--yellow);

  /* Moviment del text de dreta->esquerra */
  animation: rs-move 6s linear infinite;
}

/* Variants de mida */
.reveal-slide--medium .reveal-slide__text {
  font-size: 96px;
}

.reveal-slide--big .reveal-slide__text {
  font-size: 300px;
  font-weight: 700;
  color: var(--offwhite); /* al footer el text és clar sobre fons blau */
}

.reveal-slide__text--bold {
  font-weight: 700;
}

/* TEXTO GIRATORIO: que no ocupi tota la pantalla */
.section--texto-giratorio {
  min-height: auto;      /* en lloc de 100vh */
  padding-block: 20px;   /* espai vertical dins la secció */
  margin-bottom: 20px;   /* gap real amb TICKETS */
}

/* 1) Mascara: revela de dreta->esquerra, aguanta, i torna a amagar */
@keyframes rs-mask {
  0%   { clip-path: inset(0 100% 0 0); } /* amagat */
  20%  { clip-path: inset(0 0 0 0); }   /* revelat complet */
  70%  { clip-path: inset(0 0 0 0); }   /* aguanta visible */
  100% { clip-path: inset(0 100% 0 0); }/* amaga i reinicia */
}

/* 2) Moviment: entra des de fora dreta i surt per l'esquerra */
@keyframes rs-move {
  0%   { transform: translateX(100%); }
  100% { transform: translateX(-120%); }
}

/* ==========================================================================
   TICKETS
   ========================================================================== */

.section--tickets {
  padding: 0;
  overflow: hidden;
}

.tickets__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tickets__overlay {
  position: relative;
  z-index: 1;
  min-height: 100vh;

  display: grid;
  place-items: center;
  padding-block: 64px;
}

/* ==========================================================================
   CLAIM
   ========================================================================== */

.section--claim {
  background: var(--blue);
  color: var(--offwhite);
}

.claim {
  display: grid;
  gap: 200px;          /* gap entre frase i foto */
  align-content: start;
}

.claim__title {
  margin: 0;
  text-transform: uppercase;
  font-family: "Stack Sans Headline", system-ui, sans-serif;
  font-weight: 400; /* regular */
  font-size: 96px; /* desktop & tablet */
  line-height: 1;
  color: var(--offwhite);
}

.claim__mueve {
  display: inline-block;
  transition: transform var(--t-fast), color var(--t-fast);
  transform-origin: left bottom; /* confirmat: cantonada inferior esquerra */
}

/* Hover de MUEVE: rota 45° i es torna groc */
.claim__mueve:hover,
.claim__mueve:focus-visible {
  color: var(--yellow);
  transform: rotate(45deg);
  outline: none;
}

/* Imatge amb stroke groc i escala en in-view */
.claim__image {
  margin: 0;
  width: 919px;
  max-width: 100%;
  border: 4px solid var(--yellow);
  transform: scale(0.01);
  transition: transform var(--t-fast);
  transform-origin: center;
}

/* ================================
   CLAIM image responsive sizing
   Desktop: 919x656
   Tablet:  600x393 (alineada esquerra)
   Mobile:  472x337 (centrada)
   ================================ */

.section--claim {
  background: var(--blue);
  color: var(--offwhite);
  padding-block: 24px;
}

.claim {
  display: grid;
  gap: 200px;              /* el que volies (no 200) */
  align-content: start;
}

.claim__title {
  margin: 0;
  text-transform: uppercase;
  font-family: "Stack Sans Headline", system-ui, sans-serif;
  font-weight: 400;
  font-size: 96px;
  line-height: 1;
  color: var(--offwhite);
}

/* Card imatge (base) */
.claim__image {
  margin: 0;
  border: 4px solid var(--yellow);

  /* Animació in-view */
  transform: scale(0.01);
  transition: transform var(--t-fast);
  transform-origin: center;

  /* Evita desbordaments */
  max-width: 100%;
}

.claim__image.is-inview {
  transform: scale(1);
}

.claim__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Desktop */
@media (min-width: 1024px) {
  .claim__image {
    width: 919px;
    height: 656px;
  }
}

/* Tablet */
@media (max-width: 1023px) {
  .claim__image {
    width: min(600px, 100%);   /* mai més ample que la pantalla */
    height: 393px;
    margin-left: 0;
    margin-right: auto;        /* esquerra */
  }
}

/* Mobile */
@media (max-width: 475px) {
  .claim__title {
    font-size: 70px;
  }

  .claim {
    gap: 60px;                 /* recomanat en mobile (125/200 és massa) */
  }

  .claim__image {
    width: min(472px, 100%);   /* clau: evita overflow en mòbils petits */
    height: 337px;
    margin-left: auto;
    margin-right: auto;        /* centre */
  }
}

/* ==========================================================================
   ABOUT US
   ========================================================================== */

.section--about {
  background: var(--offwhite);
}

.about__headline img {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
}

.about__body {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1fr 4px 1fr;
  gap: 24px;
  align-items: start;
}

.about__col p {
  margin: 0 0 14px 0;
  font-size: 16px;
  font-weight: 500; /* medium */
  line-height: 1.55;
  color: var(--blue);
}

.about__divider {
  background: var(--blue);
  width: 4px;
  height: 100%;
  border-radius: 2px;
}

/* Tablet/Mobile: divisor horitzontal */
@media (max-width: 1023px) {
  .about__body {
    grid-template-columns: 1fr;
  }

  .about__divider {
    width: 100%;
    height: 4px;
  }
}

/* ABOUT US - animació d'entrada (des de baix + fade) */
.about__body[data-animate="fade-up"] {
  opacity: 0.4;
  transform: translateY(200px);
  transition: opacity 700ms ease-out, transform 700ms ease-out;
  will-change: opacity, transform;
}

.about__body[data-animate="fade-up"].is-inview {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   INTEGRANTES (scroll horitzontal)
   ========================================================================== */

.section--integrantes {
  background: var(--offwhite);
}

.integrantes__headline img {
  display: block;
  width: 300px;
  max-width: 100%;
  height: auto;
  margin-bottom: 22px;
}

.integrantes__rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 469px; /* ample card fix segons especificació */
  gap: 22px;

  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

/* Cards */
.member-card {
  height: 573px;
  background: var(--offwhite);
  color: var(--blue);
  border: 4px solid var(--blue); /* inside stroke simulada com a border */
  border-radius: 8px;

  padding: 16px;
  scroll-snap-align: start;

  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;

  transition: background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  cursor: pointer;
}

.member-card__photo {
  border: 2px solid var(--blue);
  border-radius: 6px;
  overflow: hidden;
  height: 220px;
}

.member-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.member-card__name {
  margin: 0 0 10px 0;
  font-family: "Reddit Sans", system-ui, sans-serif;
  font-size: 32px;
  font-weight: 400;
  text-transform: uppercase;
}

.member-card__alias {
  margin: 0 0 12px 0;
  font-family: "Stack Sans Headline", system-ui, sans-serif;
  font-size: 24px;
  font-weight: 300; /* light */
  text-transform: uppercase;
}

.member-card__desc {
  margin: 0;
  font-family: "Reddit Sans", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

/* Hover / Active (equivalent a CARD2) */
.member-card:hover,
.member-card.is-active,
.member-card:focus-visible {
  background: var(--blue);
  color: var(--offwhite);
  border-color: var(--offwhite);
  outline: none;
}

.member-card:hover .member-card__photo,
.member-card.is-active .member-card__photo,
.member-card:focus-visible .member-card__photo {
  border-color: var(--offwhite);
}

/* ==========================================================================
   CONCERT CAROUSEL (3 rows, marquee loop)
   - Fons blau, altura target 808px (min-height)
   - Items 234x234 (quadrats)
   - Row1/Row3: dreta->esquerra | Row2: esquerra->dreta
   ========================================================================== */

.section--concert-carousel {
  background: var(--blue);
  min-height: 808px;
  padding-block: 48px;
  overflow: hidden; /* important per ocultar el "track" */
}

.concert-carousel {
  /* separació vertical entre files segons les captures */
  display: grid;
  gap: 48px;
  align-content: center;
}

/* Una fila és una "finestra" (viewport) del track */
.carousel-row {
  overflow: hidden;
}

/* El track és el que es mou */
.carousel-track {
  display: flex;
  width: max-content;
  gap: 0;
}

/* Cada set conté les imatges; en dupliquem 2 per fer loop */
.carousel-set {
  display: flex;
  gap: 24px; /* separació entre fotos (ajusta si vols) */
  padding-right: 24px;
}

/* Imatge quadrada 234x234 */
.carousel-item {
  width: 234px;
  height: 234px;
  object-fit: cover;
  display: block;
  flex: 0 0 auto;
}

/* Animacions (durada: ajusta per velocitat) */
.carousel-row--rtl .carousel-track {
  animation: marquee-rtl 22s linear infinite;
}

.carousel-row--ltr .carousel-track {
  animation: marquee-ltr 22s linear infinite;
}

/* Movem el track exactament la meitat (perquè tenim 2 sets iguals) */
@keyframes marquee-rtl {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes marquee-ltr {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

/* Respecta usuaris amb reducció de moviment */
@media (prefers-reduced-motion: reduce) {
  .carousel-row--rtl .carousel-track,
  .carousel-row--ltr .carousel-track {
    animation: none;
  }
}

/* Tablet/Mobile: dona més aire i evita que quedi massa "tancat" */
@media (max-width: 1023px) {
  .section--concert-carousel {
    min-height: auto; /* en pantalles petites no forcem 808px */
  }

  .concert-carousel {
    gap: 36px;
  }

  .carousel-set {
    gap: 18px;
    padding-right: 18px;
  }
}

@media (max-width: 475px) {
  .concert-carousel {
    gap: 28px;
  }

  /* Si en mobile vols mantenir 234x234 exactes, ho deixem tal qual.
     Si vols que s'adaptin, m'ho dius i fem width: min(234px, 60vw) etc. */
}


/* ==========================================================================
   GALERIA
   ========================================================================== */

.section--galeria {
  background: var(--offwhite);
}

.galeria__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}

/* GALERIA cards: que no surtin del container */
.concert-card {
  width: 100%;          /* en lloc de 610px */
  max-width: 610px;     /* manté la mida màxima del disseny */
  cursor: pointer;
  transition: transform var(--t-fast), opacity var(--t-fast);
  transform-origin: center;
}

.concert-card img {
  display: block;
  width: 100%;
  height: 224px;        /* com el disseny */
  object-fit: cover;
}

.concert-card img {
  display: block;
  width: 100%;
  height: 224px;
  object-fit: cover;
}

.concert-card__label {
  margin: 10px 0 0 0;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--blue);
  font-family: "Stack Sans Headline", system-ui, sans-serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--blue);
  text-transform: uppercase;
}

/* Hover: opacitat 70% i scale 0.8 */
.concert-card:hover,
.concert-card:focus-visible {
  opacity: 0.7;
  transform: scale(0.8);
  outline: none;
}

@media (max-width: 1023px) {
  .galeria__grid {
    grid-template-columns: 1fr;
    justify-items: center; /* centra la card dins la columna */
  }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.section--footer {
  background: var(--blue);
  color: var(--offwhite);
  overflow: hidden; /* el text gegant pot sortir */
}

.footer {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 28px;
}

.footer__contact {
  padding-top: 18px;
}

.footer__title {
  margin: 0 0 14px 0;
  font-family: "Stack Sans Headline", system-ui, sans-serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--offwhite);
  text-transform: uppercase;
}

.footer__line {
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 10px;

  font-family: "Stack Sans Headline", system-ui, sans-serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--offwhite);
}

.footer__bullet {
  width: 18px;
  height: auto;
  flex: 0 0 auto;
}

/* Hover per cada "paraula" / item (aquí ho fem per línia sencera) */
.footer__hover {
  display: inline-block;
  transition: opacity var(--t-fast);
}

.footer__hover:hover,
.footer__hover:focus-visible {
  opacity: 0.69;
  outline: none;
}

/* Zona text gran */
.footer__big {
  align-self: end;
  padding-bottom: 20px;
}

/* Ajustos d'espai per pantalles petites */
@media (max-width: 475px) {
  .scroll-sticky__img {
    width: 48px;
  }

  .section {
    padding-block: 36px;
  }
}