/* ====== Base ====== */
:root{
  --bg: #fffdf8;
  --text: #1c1f33;
  --muted: #49516f;
  --line: rgba(28,31,51,.18);
  --card: rgba(83, 129, 255, .08);
  --radius: 14px;
  --max: 1100px;
  --brand: #ff6b6b;
  --brand-2: #ffd93d;
  --brand-3: #6bc5ff;
  color-scheme: light;

  /* PicoCSS tokens (forcem tema clar + contrast coherent) */
  --pico-background-color: var(--bg);
  --pico-color: var(--text);
  --pico-muted-color: var(--muted);
  --pico-h1-color: var(--text);
  --pico-h2-color: var(--text);
  --pico-h3-color: var(--text);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: "Atkinson Hyperlegible", "Nunito", "Avenir Next", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 5%, rgba(255,217,61,.26), transparent 38%),
    radial-gradient(circle at 95% 10%, rgba(107,197,255,.22), transparent 42%),
    var(--bg);
  line-height: 1.55;
  overflow-x: hidden;
}
.main {padding: 0;}
img, video{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
code{ background: var(--card); padding: .15rem .35rem; border-radius: .4rem; }

.wrap{
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.section{
  padding: 3rem 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 88px;
}

.section-alt{
  background: linear-gradient(to bottom, rgba(0,0,0,.02), rgba(0,0,0,.00));
}

h1,h2,h3{ line-height: 1.1; margin: 0 0 .75rem; }
h1{ font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.02em; }
h2{ font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -0.01em; }
p{ margin: 0 0 1rem; }
.muted{ color: var(--muted); }

h1, h2, h3, p, li, summary{
  color: var(--text);
}

.sr-only{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ====== Header ====== */
.site-header{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 30;
  background: transparent;
  border-bottom: 1px solid transparent;
  backdrop-filter: none;
  padding: 0;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
}

.site-header.is-scrolled{
  background: rgba(28,31,51,.95);
  border-bottom-color: rgba(255,255,255,.14);
  backdrop-filter: blur(8px);
}

.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .6rem 0;
}

.brand{
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
}

.brand-logo{
  width: 60px;
  max-width: 60px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,.35));
}

.nav{
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative; /* perquè el desplegable es posicioni bé en mòbil */
}

.nav-toggle{
  display: none;
  color: #fff;
  border: 1px solid rgba(255,255,255,.3);
  background: transparent;
  margin: 0;
  padding: .45rem .7rem;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
}

/* Menú desktop */
.nav-list{
  list-style: none;
  display: flex;
  gap: 1rem;
  padding: 0;
  margin: 0;
}

/* Enllaços del menú en blanc */
.nav-list a{
  color: #fff;
  padding: .45rem .6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-shadow: 0 2px 12px rgba(0,0,0,.45);
}

.nav-list a:hover{
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.2);
}

/* ====== Hero ====== */
.hero{
  border-top: 0;
  padding: 0;
}

/* Si tens un .hero-inner al HTML, no fa mal deixar-lo */
.hero-inner{
  position: relative;
}

/* Slider a ample complet del contenidor */
.hero-slider{
  position: relative;
  width: 100%;
  min-height: 100svh;
  height: 100svh;
  overflow: hidden;
  border: 0;
  background: #0f1221;
}

/* Overlay fosc suau per llegibilitat */
.hero-slider::after{
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(8,11,22,.66), rgba(8,11,22,.48)),
    linear-gradient(to top, rgba(8,11,22,.72), rgba(8,11,22,.18) 35%, rgba(8,11,22,.32));
  z-index: 1;
  pointer-events: none;
}

/* Slides (et faltava la definició completa) */
.slide{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity .6s ease, transform .8s ease;
  will-change: opacity, transform;
}

.slide.is-active{
  opacity: 1;
  transform: scale(1);
}

/* Text superposat */
.hero-copy{
  position: absolute;
  inset: 0;
  z-index: 2; /* per sobre del overlay */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: clamp(5.5rem, 10vh, 8rem) clamp(1rem, 4vw, 3rem) 7rem;
  color: #fff;
  width: min(900px, calc(100% - 2rem));
  margin-inline: auto;
}

.hero-copy h1,
.hero-copy p{ color: #fff; }

.hero-copy h1{
  font-size: clamp(2.4rem, 8vw, 6rem);
  text-wrap: balance;
  margin-bottom: 1rem;
}

.hero-copy p{
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  max-width: 56ch;
}

.hero-actions{
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.3rem;
  justify-content: center;
}

.btn-pill{
  min-width: 220px;
}

/* Botons base */
.btn{
  background: var(--brand);
  border-radius: 999px;
  border: 1px solid var(--brand);
  color: #fff;
  display: inline-block;
  font-weight: 700;
  max-width: 20ch;
  padding: .65rem 1rem;
}
.btn:hover{ opacity: .92; }

.btn-ghost{
  background: transparent;
  color: var(--text);
}

/* Botons del hero (a sobre d’imatge) */
.hero .btn{
  background: rgba(255,255,255,.1);
  color: #fff;
  border: 2px solid rgba(255,255,255,.92);
  backdrop-filter: blur(2px);
}
.hero .btn:hover{ opacity: .9; }

.hero .btn-ghost{
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.88);
}
.hero .btn-ghost:hover{
  background: rgba(255,255,255,.22);
}

/* Dots */
.slider-dots{
  position: absolute;
  right: 1.2rem;
  bottom: 1.4rem;
  display: flex;
  gap: .4rem;
  z-index: 2;
}

.dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.8);
  background: rgba(0,0,0,.25);
}

.dot.is-active{
  background: rgba(255,255,255,.9);
}

main > .section{
  content-visibility: auto;
  contain-intrinsic-size: 1px 900px;
}

.scroll-down{
  position: absolute;
  left: 50%;
  bottom: 1.2rem;
  z-index: 2;
  transform: translateX(-50%);
  color: #fff;
  font-size: 2.4rem;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0,0,0,.4);
  animation: bounce-down 1.6s ease-in-out infinite;
}

@keyframes bounce-down{
  0%, 100%{ transform: translateX(-50%) translateY(0); }
  50%{ transform: translateX(-50%) translateY(8px); }
}

/* ====== Sobre ====== */
.two-col{
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1.2fr .8fr;
  align-items: start;
}

.facts{
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,255,255,.74));
  list-style: none;
  padding: 1rem 1.25rem;
}

.facts ul {padding-inline-start: 14px;}
.facts li{
  padding: .35rem 0;
}

.facts li::before{
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--text);
  margin-top: .5em;
}

/* ====== Songs ====== */
.songs{
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

.song{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fcfdff);
  padding: 1rem;
}

.song-head{
  display: grid;
  gap: .75rem;
  grid-template-columns: 1fr;
  align-items: start;
  border-radius: var(--radius) var(--radius) 0 0;
  border-block-end: 0;
  margin-block-end: 0;
}

.song audio{
  display: block;
  width: 100%;
  height: 52px;
  min-height: 0;
  align-self: start;
}

.lyrics{
  margin-top: .75rem;
  border-top: 1px solid var(--line);
  padding-top: .75rem;
}

.lyrics summary{
  cursor: pointer;
  font-weight: 600;
}

.lyrics-body{
  margin-top: .75rem;
  padding: .9rem;
  border-radius: calc(var(--radius) - 6px);
  background: var(--card);
}

/* ====== Galeria ====== */
.grid{
  display: grid;
  gap: .9rem;
  margin-top: 1.25rem;
}

.gallery{
  grid-template-columns: repeat(3, 1fr);
}

.gallery figure{
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.02);
  aspect-ratio: 4 / 3;
}

.gallery img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.gallery figure:hover img{
  transform: scale(1.03);
}

/* ====== Videos ====== */
.videos{
  grid-template-columns: repeat(2, 1fr);
}

.videos video{
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(0,0,0,.02);
  aspect-ratio: 16 / 9;
}

/* ====== Contacte + Footer ====== */
.contact-card{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255,217,61,.24), rgba(107,197,255,.18));
  padding: 1rem;
}

.contact-form{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255,217,61,.2), rgba(107,197,255,.16));
  padding: clamp(1rem, 2.5vw, 1.5rem);
}

.form-field{
  margin-bottom: .9rem;
}

.form-field label{
  display: inline-block;
  margin-bottom: .35rem;
  font-weight: 700;
}

.contact-form input,
.contact-form textarea{
  width: 100%;
  border: 1px solid rgba(28,31,51,.26);
  border-radius: 12px;
  background: rgba(255,255,255,.95);
}

.contact-form textarea{
  resize: vertical;
}

.form-help{
  margin: .35rem 0 1rem;
  color: var(--muted);
  font-size: .95rem;
}

.form-feedback{
  margin: .9rem 0 0;
  padding: .65rem .8rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(255,255,255,.74);
}

.form-feedback.is-success{
  border-color: rgba(32, 114, 52, .35);
  color: #145523;
}

.form-feedback.is-error{
  border-color: rgba(156, 41, 41, .35);
  color: #8d2020;
}

.hp-field{
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
audio:focus-visible,
video:focus-visible{
  outline: 3px solid var(--brand-3);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{
    animation: none !important;
    transition: none !important;
  }
  .slider-dots{
    display: none;
  }
  .scroll-down{
    animation: none;
  }
}

.site-footer{
  border-top: 1px solid var(--line);
  padding: 1.25rem 0;
}

.footer-logo-wrap{
  display: flex;
  justify-content: center;
  align-items: center;
  padding: .15rem 1rem 0;
  margin-block-end: 60px;
}

.footer-logo{
  width: min(320px, 68vw);
  height: auto;
  display: block;
}

.footer-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-legal{
  display: flex;
  align-items: center;
  gap: .85rem;
}

.footer-legal a{
  font-size: .95rem;
  color: var(--muted);
  border-bottom: 1px solid transparent;
}

.footer-legal a:hover{
  color: var(--text);
  border-bottom-color: var(--line);
}

.to-top{
  padding: .35rem .6rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.to-top:hover{
  border-color: var(--line);
  background: rgba(0,0,0,.03);
}

/* ====== Responsive ====== */
@media (max-width: 900px){
  .two-col{ grid-template-columns: 1fr; }
  .gallery{ grid-template-columns: repeat(2, 1fr); }
  .videos{ grid-template-columns: 1fr; }

  .hero-copy{ max-width: 100%; }
}

@media (max-width: 720px){
  .btn{
    max-width: 100%;
  }
  /* Header mòbil: logo esquerra + botó dreta */
  .nav-toggle{ 
    display: inline-flex; 
    font-size: small;
  }

  /* IMPORTANT: el menú ha d'estar amagat a mòbil fins que s'obri */
  .nav-list{
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + .6rem);
    flex-direction: column;
    gap: .25rem;
    padding: .6rem;
    border-radius: var(--radius);
    min-width: 220px;
    background: rgba(14,16,28,.95);
    border: 1px solid rgba(255,255,255,.24);
    box-shadow: 0 12px 30px rgba(0,0,0,.35);
  }
  .nav-list.is-open{ display: flex; }

  .nav-list a{
    padding: .6rem .7rem;
    border-radius: 10px;
  }

  .brand-logo{
    width: 44px;
    max-width: 80px;
    height: auto;
  }

  .gallery{ grid-template-columns: 1fr; }

  /* Hero mòbil: més altura perquè no es tallin títol i botons */
  .hero-copy{
    max-width: min(560px, 100%);
    padding: 5.8rem 1rem 8rem;
    text-align: center;
    align-items: center;
  }

  .hero-actions{
    justify-content: center;
    flex-direction: column;
    width: min(360px, 100%);
  }

  .hero-actions .btn{
    width: 100%;
  }

  .scroll-down{
    bottom: 1rem;
  }

  .footer-inner{
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-legal{
    flex-wrap: wrap;
  }
}

