/* ==========================================================
   Lightsong Studio — styles
   Change the brand colors in :root to re-theme the whole site.
   ========================================================== */

:root {
  --bg: #0d0b14;
  --bg-alt: #13101d;
  --surface: #1a1626;
  --border: #2a2438;
  --text: #ece8f4;
  --muted: #9a93ad;
  --glow: #ffcf7a;      /* the "light" */
  --accent: #b69cff;    /* the "song" */
  --radius: 14px;
  --max: 1120px;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

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

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: clamp(2.6rem, 7vw, 5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.35rem; }
h1 em, h2 em { font-style: italic; color: var(--glow); }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--glow); color: #000; padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: 8px; }

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

.eyebrow {
  font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 14px 26px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; text-decoration: none;
  transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
}
.btn-primary {
  background: var(--glow); color: #1a1206;
  box-shadow: 0 0 0 0 rgba(255, 207, 122, .4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px -6px rgba(255, 207, 122, .55); }
.btn-ghost { border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-large { font-size: 1.15rem; padding: 18px 34px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  background: rgba(13, 11, 20, .72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; }
.brand-mark { width: 28px; height: 28px; color: var(--glow); }
.nav-links { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: .95rem; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-links .nav-cta { color: var(--text); border: 1px solid var(--border); padding: 8px 18px; border-radius: 999px; }
.nav-links .nav-cta:hover { border-color: var(--glow); }

.nav-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 9px; right: 9px; height: 2px; background: var(--text); transition: transform .25s; }
.nav-toggle span:first-child { top: 15px; }
.nav-toggle span:last-child { top: 23px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 8px 24px 20px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 0; font-size: 1.05rem; }
  .nav-links .nav-cta { border: 0; padding: 12px 0; color: var(--glow); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; overflow: hidden;
  padding: 120px 0 80px;
}
.hero::before {
  content: ""; position: absolute; width: 900px; height: 900px; border-radius: 50%;
  top: 50%; right: -260px; transform: translateY(-50%);
  background: radial-gradient(circle, rgba(255, 207, 122, .16) 0%, rgba(182, 156, 255, .08) 35%, transparent 65%);
  pointer-events: none;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; }
.hero-inner { position: relative; }
.lede { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 560px; margin: 0 0 2.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Sections ---------- */
.section { padding: 110px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { margin-bottom: 52px; }
.section-sub { color: var(--muted); margin: 0; max-width: 560px; }

/* ---------- Work ---------- */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; }
@media (max-width: 400px) { .project-grid { grid-template-columns: 1fr; } }

.project {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .3s, border-color .3s;
}
.project:hover { transform: translateY(-4px); border-color: #3b3350; }

.project-cover {
  --hue: 265;
  position: relative; aspect-ratio: 16 / 10;
  background:
    radial-gradient(circle at 30% 40%, hsla(var(--hue), 80%, 70%, .45), transparent 55%),
    radial-gradient(circle at 75% 70%, hsla(calc(var(--hue) + 40), 70%, 55%, .35), transparent 50%),
    linear-gradient(135deg, hsl(var(--hue), 30%, 14%), hsl(calc(var(--hue) + 30), 35%, 9%));
}
.project-cover img { width: 100%; height: 100%; object-fit: cover; }
.project-tag {
  position: absolute; left: 14px; bottom: 14px;
  background: rgba(13, 11, 20, .7); backdrop-filter: blur(6px);
  padding: 5px 12px; border-radius: 999px; font-size: .78rem; font-weight: 500;
}
.project-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.project-body h3 { margin-bottom: .2em; }
.project-meta { color: var(--accent); font-size: .85rem; margin: 0 0 .8em; }
.project-body > p:not(.project-meta) { color: var(--muted); font-size: .95rem; margin: 0 0 1.2em; }

/* ---------- Audio tracks ---------- */
.tracks { list-style: none; margin: auto 0 0; padding: 0; display: grid; gap: 8px; }
.track {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  padding: 10px 14px 10px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
}
.track.playing { border-color: rgba(255, 207, 122, .5); }
.track.unavailable { opacity: .55; }

.play {
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--glow); position: relative; flex-shrink: 0;
  transition: transform .15s;
}
.play:hover { transform: scale(1.07); }
.play::before { /* play triangle */
  content: ""; position: absolute; left: 14px; top: 11px;
  border-left: 13px solid #1a1206; border-top: 8px solid transparent; border-bottom: 8px solid transparent;
}
.track.playing .play::before { /* pause bars */
  left: 12px; top: 12px; width: 14px; height: 14px; border: 0;
  background: linear-gradient(90deg, #1a1206 0 5px, transparent 5px 9px, #1a1206 9px);
}
.track.unavailable .play { background: var(--border); cursor: not-allowed; }
.track.unavailable .play::before { border-left-color: var(--muted); }

.track-info { min-width: 0; }
.track-title { display: block; font-size: .9rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 6px; }
.progress { height: 4px; background: var(--border); border-radius: 4px; cursor: pointer; position: relative; }
.progress::after { content: ""; position: absolute; inset: -8px 0; } /* bigger hit area */
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--glow)); border-radius: 4px; }
.time { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Services ---------- */
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 24px; }
.service { padding: 30px 26px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.service svg { width: 34px; height: 34px; fill: none; stroke: var(--glow); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 18px; }
.service p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 64px; align-items: center; }
.about-text p:not(.eyebrow) { color: var(--muted); }
.facts { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--border); }
.facts li { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.facts strong { font-weight: 500; }
.facts span { color: var(--muted); text-align: right; }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; gap: 40px; } }

/* ---------- Contact ---------- */
.contact { text-align: center; position: relative; overflow: hidden; }
.contact::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 700px; height: 700px;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 207, 122, .12), transparent 60%);
  pointer-events: none;
}
.contact-inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.contact .section-sub { margin-bottom: 2.2rem; }
.socials { list-style: none; padding: 0; margin: 2.4rem 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; }
.socials a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.socials a:hover { color: var(--glow); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; font-size: .88rem; color: var(--muted); }
.site-footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
