/* ==========================================================
   Personal site — minimal, Apple-inspired, white + orange accent
   ========================================================== */

:root{
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --accent: #ff5a1f;
  --accent-dark: #e04a13;
  --border: #d2d2d7;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
          Roboto, Helvetica, Arial, sans-serif;
}

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

body{
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

h1, h2, h3{
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

p{ margin: 0 0 16px; color: var(--text-muted); }

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

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

.eyebrow{
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}

/* ---------- layout helpers ---------- */
.section{ padding: 120px 24px; }
.section-inner{ max-width: var(--maxw); margin: 0 auto; }
.section-alt{ background: var(--bg-alt); }
.section-sub{ font-size: 19px; max-width: 560px; margin-bottom: 56px; }

/* ---------- fade-in on scroll ---------- */
.fade-in{
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible{
  opacity: 1;
  transform: translateY(0);
}

/* ---------- buttons ---------- */
.btn{
  display: inline-block;
  padding: 14px 28px;
  border-radius: 980px;
  font-size: 17px;
  font-weight: 500;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary{
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover{
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 90, 31, 0.3);
}
.btn-secondary{
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover{
  border-color: var(--text);
  transform: translateY(-2px);
}

/* ---------- nav ---------- */
.nav{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.nav.scrolled{ border-bottom-color: var(--border); }

.nav-inner{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo{
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.nav-links{
  display: flex;
  gap: 32px;
}
.nav-links a{
  font-size: 14px;
  color: var(--text);
  opacity: 0.85;
  transition: opacity 0.2s ease, color 0.2s ease;
}
.nav-links a:hover{ opacity: 1; color: var(--accent); }

.nav-toggle{
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span{
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2){ opacity: 0; }
.nav-toggle.open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero{
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 24px 80px;
  position: relative;
  z-index: 0;
  overflow: hidden;
  color: #fff;
  background: #1d1d1f; /* fallback while hero-bg image loads */
}
/* Background photo lives in its own oversized layer so it can drift at a
   slower rate than the page on scroll (parallax) without ever exposing an
   edge. The scale provides the buffer the JS translateY moves within. */
.hero-bg{
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.25) 45%, rgba(0,0,0,0.55) 100%),
    url('../assets/images/domenico-hero.jpg');
  background-size: cover;
  background-position: 50% 58%;
  background-repeat: no-repeat;
  transform: scale(1.3);
  will-change: transform;
  z-index: -1;
}
.hero-inner{ max-width: 780px; }
.hero h1{
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.05;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.hero-sub{
  font-size: 24px;
  max-width: 560px;
  margin: 0 auto 36px;
  color: rgba(255,255,255,0.88);
}
.hero-cta{
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero .btn-secondary{
  color: #fff;
  border-color: rgba(255,255,255,0.55);
}
.hero .btn-secondary:hover{
  border-color: #fff;
}

/* ---------- music grid ---------- */
.music-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.track-card{
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.track-card:hover{
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}
.cover{
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.cover-1{ background: linear-gradient(135deg, #ffb385, #ff5a1f); }
.cover-2{ background: linear-gradient(135deg, #2d2d2f, #6e6e73); }
.cover-3{ background: linear-gradient(135deg, #ffe0cc, #ff8a4c); }

.play-btn{
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.play-btn:hover{ transform: scale(1.08); background: #fff; }
.play-btn svg{ width: 22px; height: 22px; fill: var(--accent); }
.play-btn svg.icon-hidden{ display: none; }

/* ---------- inline video preview card (poster + click-to-embed) ---------- */
.cover-video{
  aspect-ratio: 16 / 9;
  cursor: pointer;
  background: #000;
}
.cover-video .cover-poster{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cover-video::before{
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.18);
}
.cover-video .play-btn{
  position: relative;
  z-index: 1;
}
.cover-video iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.track-info{ padding: 20px; }
.track-info h3{ font-size: 18px; margin-bottom: 4px; }
.track-meta{ font-size: 14px; margin-bottom: 14px; }
.track-links{ display: flex; gap: 14px; flex-wrap: wrap; }
.track-links a{
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.track-links a:hover{ color: var(--accent); }

/* ---------- filter tabs (segmented control) ---------- */
.filter-tabs{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--bg-alt);
  padding: 6px;
  border-radius: 980px;
  width: fit-content;
  margin-bottom: 48px;
}
.filter-btn{
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 10px 18px;
  border-radius: 980px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease;
}
.filter-btn:hover{ color: var(--text); }
.filter-btn.active{
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.track-card.is-hidden{ display: none; }

/* ---------- about ---------- */
.about-inner{
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 64px;
  align-items: center;
}
.about-photo{
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #f5f5f7, #d2d2d7);
  overflow: hidden;
}
.about-photo img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Portrait shot cropped to a square — biased toward the top so the
     face stays framed instead of a dead-center crop cutting into it. */
  object-position: 50% 50%;
  display: block;
}
.tags{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.tags span{
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 980px;
  background: var(--bg-alt);
  color: var(--text);
}

/* ---------- contact ---------- */
.contact-inner{ text-align: center; }
.contact-inner .section-sub{ margin-left: auto; margin-right: auto; }
.contact-inner h2{ margin-bottom: 40px; }
.socials{
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.socials a{
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.socials a:hover{ color: var(--accent); }

/* ---------- footer ---------- */
.footer{
  padding: 40px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--maxw);
  margin: 0 auto;
  font-size: 13px;
  color: var(--text-muted);
}
.back-to-top{ transition: color 0.2s ease; }
.back-to-top:hover{ color: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 860px){
  .about-inner{ grid-template-columns: 1fr; }
  .about-photo{ max-width: 220px; margin: 0 auto; }
  .music-grid{ grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px){
  .section{ padding: 80px 20px; }
  .music-grid{ grid-template-columns: 1fr; }
  .nav-links{
    position: absolute;
    top: 52px; left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav-links.open{ max-height: 260px; }
  .nav-links a{
    padding: 16px 24px;
    border-bottom: 1px solid var(--bg-alt);
  }
  .nav-toggle{ display: flex; }
  .writing-item{ flex-direction: column; gap: 8px; }
  .footer{ flex-direction: column; gap: 12px; text-align: center; }
}
