/* ========================================
   ROBERTO BARLOCCI — Official Website
   Dark cinematic design for a pro musician
   ======================================== */

/* --- Reset & Custom Properties --- */

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

:root {
  --bg: #050505;
  --bg-card: #0c0c0c;
  --bg-nav-scroll: rgba(5, 5, 5, 0.88);
  --text: #f0f0f0;
  --text-muted: #666;
  --text-subtle: #444;
  --accent: #c8a04e;
  --accent-dim: rgba(200, 160, 78, 0.15);
  --border: rgba(255, 255, 255, 0.06);
  --font-display: 'Bebas Neue', Impact, sans-serif;
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #333 var(--bg);
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

::selection {
  background: rgba(200, 160, 78, 0.3);
  color: #fff;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #555; }


/* --- Film Grain Overlay --- */

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

.grain::before {
  content: '';
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}


/* --- Navigation --- */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.75rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.5s var(--ease-smooth);
}

.site-nav.scrolled {
  background: var(--bg-nav-scroll);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  padding: 1rem 3rem;
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #fff;
  transition: opacity 0.3s;
}

.nav-brand:hover { opacity: 0.8; }

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.4s var(--ease-out);
}

.nav-links a:hover { color: #fff; }
.nav-links a:hover::after { width: 100%; }

/* Hamburger toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: #fff;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle span:nth-child(2) { margin: 6px 0; }

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}


/* --- Hero Section --- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  transform: scale(1.08);
  animation: heroZoom 25s ease-out forwards;
  will-change: transform;
}

@keyframes heroZoom {
  to { transform: scale(1); }
}

/* YouTube background video */
.hero-video {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.hero-video.playing {
  opacity: 1;
}

.hero-video iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-height: 100vh;
  min-width: 177.78vh;
  transform: translate(-50%, -50%);
  pointer-events: none;
  border: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(0, 0, 0, 0.15) 30%,
    rgba(0, 0, 0, 0.3) 60%,
    rgba(5, 5, 5, 1) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 3;
  padding: 0 2rem;
}

.hero-content > * {
  animation: fadeUp 1s var(--ease-out) both;
}

.hero-content > :nth-child(1) { animation-delay: 0.3s; }
.hero-content > :nth-child(2) { animation-delay: 0.5s; }
.hero-content > :nth-child(3) { animation-delay: 0.7s; }
.hero-content > :nth-child(4) { animation-delay: 0.9s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 12vw, 10rem);
  letter-spacing: 0.04em;
  line-height: 0.92;
  margin-bottom: 1.25rem;
  font-weight: 400;
}

.hero-role {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(0.7rem, 1.4vw, 1rem);
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2.5rem;
}

.hero-socials {
  display: flex;
  gap: 1.8rem;
  justify-content: center;
}

.hero-socials a {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.3s, transform 0.3s;
}

.hero-socials a:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

/* Sound toggle button */
.sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  background: #e91e63;
  border: none;
  border-radius: 50px;
  padding: 0.75rem 1.6rem;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
  animation: pulsePink 2s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(233, 30, 99, 0.4);
  -webkit-tap-highlight-color: transparent;
}

.sound-toggle i {
  font-size: 0.95rem;
}

@keyframes pulsePink {
  0%, 100% { box-shadow: 0 0 20px rgba(233, 30, 99, 0.4); }
  50% { box-shadow: 0 0 35px rgba(233, 30, 99, 0.6); }
}

.sound-toggle:hover {
  background: #f50057;
  box-shadow: 0 0 30px rgba(233, 30, 99, 0.6);
}

.sound-toggle.unmuted {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
  animation: none;
  box-shadow: none;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  animation: scrollBounce 2.5s ease-in-out infinite;
  color: rgba(255, 255, 255, 0.2);
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.4; }
  50% { transform: translateX(-50%) translateY(12px); opacity: 0.1; }
}

.scroll-indicator svg {
  width: 20px;
  height: 20px;
}


/* --- Sections --- */

.section {
  padding: 7rem 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-header {
  margin-bottom: 3.5rem;
}

.section-label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-label::after {
  content: '';
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: var(--accent);
  opacity: 0.4;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  letter-spacing: 0.03em;
}


/* --- Album Grid --- */

.album-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.album-card {
  display: block;
  background: var(--bg-card);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s;
}

.album-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  pointer-events: none;
  z-index: 2;
  transition: border-color 0.4s;
}

.album-card:hover {
  transform: translateY(-10px);
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(200, 160, 78, 0.06);
}

.album-card:hover::before {
  border-color: rgba(200, 160, 78, 0.15);
}

.album-art {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
}

.album-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}

.album-card:hover .album-art img {
  transform: scale(1.08);
}

/* Play icon overlay on hover */
.album-art::after {
  content: '\f04b';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 1;
}

.album-card:hover .album-art::after {
  opacity: 1;
}

.album-meta {
  padding: 1.2rem 1rem;
}

.album-meta h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
  text-transform: uppercase;
}

.album-meta p {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}


/* --- Album Detail Pages --- */

.album-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.album-hero .hero-bg {
  filter: blur(40px) brightness(0.35);
  transform: scale(1.4);
  animation: none;
}

.album-hero .hero-overlay {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(5, 5, 5, 0.95) 100%
  );
}

.album-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 6rem 2rem 2rem;
  max-width: 500px;
  width: 100%;
  animation: fadeUp 1s var(--ease-out) 0.2s both;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 2.5rem;
  transition: color 0.3s;
}

.back-link:hover { color: var(--accent); }

.album-band {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.album-detail-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 5rem);
  letter-spacing: 0.04em;
  line-height: 1;
  margin-bottom: 2.5rem;
  font-weight: 400;
}

.bandcamp-wrap {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.bandcamp-wrap iframe {
  border: 0;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
  max-width: 100%;
}


/* --- Discography Page Header --- */

.page-header {
  padding: 10rem 0 2rem;
  text-align: center;
}

.page-header .section-label {
  justify-content: center;
}

.page-header .section-label::after {
  display: none;
}

.page-header .section-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
}

.discography-grid-section {
  padding: 2rem 0 7rem;
}


/* --- Footer --- */

.site-footer {
  padding: 4rem 0 3rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-socials {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.footer-socials a {
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: color 0.3s, transform 0.3s;
}

.footer-socials a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

.footer-copy {
  font-size: 0.7rem;
  color: var(--text-subtle);
  letter-spacing: 0.05em;
}


/* --- Reveal Animations --- */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }


/* --- Responsive --- */

@media (max-width: 1024px) {
  .album-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .site-nav {
    padding: 1.25rem 1.5rem;
  }

  .site-nav.scrolled {
    padding: 0.85rem 1.5rem;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 5, 0.97);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    flex-direction: column;
    justify-content: center;
    gap: 2.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    font-size: 1rem;
    letter-spacing: 0.2em;
  }

  .section {
    padding: 5rem 0;
  }

  .album-grid {
    gap: 1rem;
  }

  .album-hero-content {
    padding: 5rem 1.5rem 2rem;
  }

  .page-header {
    padding: 8rem 0 1.5rem;
  }
}

@media (max-width: 480px) {
  .album-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .album-meta {
    padding: 0.8rem 0.75rem;
  }

  .album-meta h3 {
    font-size: 0.75rem;
  }

  .album-meta p {
    font-size: 0.65rem;
  }

  .hero-socials {
    gap: 1.5rem;
  }

  .bandcamp-wrap {
    padding: 0.5rem;
  }
}
