/* ==========================================================================
   JAZZ DIGITAL — Where AI meets soul
   Design System: Neo-Jazz Lounge × AI Future
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400..900;1,6..96,400..900&family=Fraunces:ital,opsz,wght@0,9..144,300..900;1,9..144,300..900&family=Italiana&family=Manrope:wght@200..800&family=JetBrains+Mono:wght@300;400;500;700&display=fallback');

/* --- Design Tokens --- */
:root {
  --bg: #0a0a0f;
  --bg-deeper: #050508;
  --surface: #13131a;
  --surface-2: #1c1c26;
  --border: rgba(212, 175, 55, 0.14);
  --border-strong: rgba(212, 175, 55, 0.35);

  --gold: #d4af37;
  --gold-light: #f4d03f;
  --gold-dim: #8b7424;
  --gold-glow: #ffdf6b;
  --cream: #f5efde;
  --cream-dim: #d8d0bd;

  --cyan: #00e5ff;
  --magenta: #ff2e80;
  --coral: #ff6b4a;

  --text: #f5efde;
  --text-mute: #a8a297;
  --text-dim: #6e6a60;

  --font-display: 'Fraunces', 'Noto Serif Thai', 'Bodoni Moda', 'Times New Roman', serif;
  --font-deco: 'Italiana', 'Noto Serif Thai', serif;
  --font-body: 'Manrope', 'Noto Sans Thai', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Noto Sans Thai', monospace;

  --shadow-gold: 0 0 40px rgba(212, 175, 55, 0.25);
  --shadow-deep: 0 30px 80px -20px rgba(0, 0, 0, 0.6);

  --ease-smooth: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-snap: cubic-bezier(0.2, 0.9, 0.3, 1.4);
}

/* --- Reset & Base --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
  position: relative;
  min-height: 100vh;
}

/* Hide custom cursor on touch devices */
@media (hover: none) {
  body { cursor: auto; }
  .cursor, .cursor-trail { display: none !important; }
}

/* Background atmosphere */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(212, 175, 55, 0.08), transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(0, 229, 255, 0.05), transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(255, 46, 128, 0.03), transparent 60%);
  z-index: -2;
  pointer-events: none;
}

/* Film grain */
body::after {
  content: '';
  position: fixed;
  inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3CfeColorMatrix values='0 0 0 0 0.83 0 0 0 0 0.69 0 0 0 0 0.21 0 0 0 0.4 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.08;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: -1;
  animation: grain 8s steps(8) infinite;
}

@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-5%, -5%); }
  20% { transform: translate(5%, -2%); }
  30% { transform: translate(-3%, 4%); }
  40% { transform: translate(4%, 3%); }
  50% { transform: translate(-4%, -4%); }
  60% { transform: translate(3%, 5%); }
  70% { transform: translate(-5%, 2%); }
  80% { transform: translate(2%, -3%); }
  90% { transform: translate(-2%, 4%); }
}

/* --- Custom Cursor --- */
.cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--gold);
  opacity: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.25s, height 0.25s, background 0.25s;
  box-shadow: 0 0 12px var(--gold);
  mix-blend-mode: screen;
}

.cursor-trail {
  position: fixed;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.18s var(--ease-smooth), width 0.3s, height 0.3s, border-color 0.3s;
  mix-blend-mode: screen;
}

.cursor.hover { width: 4px; height: 4px; background: var(--cream); box-shadow: 0 0 24px var(--cream); }
.cursor-trail.hover { width: 64px; height: 64px; border-color: var(--gold-light); }

/* Light theme: purple cursor, no blend mode (gold on cream = invisible) */
[data-theme="light"] .cursor {
  background: var(--purple);
  box-shadow: 0 0 12px rgba(94, 31, 138, 0.6);
  mix-blend-mode: normal;
}
[data-theme="light"] .cursor-trail {
  border-color: rgba(94, 31, 138, 0.45);
  mix-blend-mode: normal;
}
[data-theme="light"] .cursor.hover {
  background: var(--purple-light);
  box-shadow: 0 0 24px var(--purple);
}
[data-theme="light"] .cursor-trail.hover { border-color: var(--purple); }

/* --- Typography --- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--cream);
}

.display-xl {
  font-size: clamp(2.45rem, 8.4vw, 7.7rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.9;
}

.display-lg {
  font-size: clamp(1.75rem, 4.9vw, 4.2rem);
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.display-md {
  font-size: clamp(1.4rem, 3.15vw, 2.625rem);
}

.italic-accent {
  font-family: var(--font-deco);
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}

.gold-text {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dim) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--gold);
  font-weight: 400;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--gold);
}

p { color: var(--text-mute); font-weight: 300; }

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

/* --- Layout --- */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

section { position: relative; padding: 8rem 0; }

@media (max-width: 768px) {
  section { padding: 5rem 0; }
  .container { padding: 0 1.5rem; }
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.5rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 10, 15, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.4s var(--ease-smooth);
}

.nav.scrolled { padding: 1rem 2.5rem; background: rgba(5, 5, 8, 0.9); }

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--cream);
}

.nav-logo svg { width: 30px; height: 38px; }

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

.nav-menu a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-dim);
  position: relative;
  padding: 0.5rem 0;
  transition: color 0.3s;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: all 0.4s var(--ease-smooth);
  transform: translateX(-50%);
}

.nav-menu a:hover { color: var(--gold); }
.nav-menu a:hover::after { width: 100%; }
.nav-menu a.active { color: var(--gold); }
.nav-menu a.active::after { width: 100%; }

.nav-cta {
  padding: 1.3rem 3.8rem;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: none;
  position: relative;
  overflow: hidden;
  transition: color 0.4s;
}

.nav-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: translateY(101%);
  transition: transform 0.4s var(--ease-smooth);
  z-index: -1;
}

.nav-cta:hover { color: var(--bg); }
.nav-cta:hover::before { transform: translateY(0); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--gold);
  cursor: none;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 1px;
  background: var(--cream);
  transition: all 0.3s;
}

@media (max-width: 880px) {
  .nav { padding: 1rem 1.5rem; }
  .nav-menu {
    position: fixed;
    top: 0; right: 0;
    width: min(80vw, 360px);
    height: 100vh;
    background: var(--bg-deeper);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform 0.5s var(--ease-smooth);
    border-left: 1px solid var(--border);
  }
  .nav-menu.open { transform: translateX(0); }
  .nav-toggle { display: flex; z-index: 102; }
  .nav-cta { display: none; }
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 7rem;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(212, 175, 55, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 175, 55, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(circle at center, black, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at center, black, transparent 75%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: end;
  width: 100%;
}

@media (max-width: 980px) {
  .hero-content { grid-template-columns: 1fr; }
}

.hero-text { max-width: 900px; }

.hero-title {
  font-size: clamp(2.45rem, 8.4vw, 7.7rem);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.hero-title .line {
  display: block;
  overflow: hidden;
}

.hero-title .line-inner {
  display: block;
  opacity: 0;
  transform: translateY(110%);
  animation: reveal-up 1.2s var(--ease-smooth) forwards;
}

.hero-title .line:nth-child(1) .line-inner { animation-delay: 0.2s; }
.hero-title .line:nth-child(2) .line-inner { animation-delay: 0.4s; }
.hero-title .line:nth-child(3) .line-inner { animation-delay: 0.6s; }

@keyframes reveal-up {
  to { opacity: 1; transform: translateY(0); }
}

.hero-sub {
  margin-top: 2rem;
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  max-width: 540px;
  color: var(--cream-dim);
  font-weight: 300;
  line-height: 1.6;
  opacity: 0;
  animation: fade-in 1s ease forwards 1s;
}

@keyframes fade-in { to { opacity: 1; } }

.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-end;
  opacity: 0;
  animation: fade-in 1s ease forwards 1.3s;
}

@media (max-width: 980px) {
  .hero-meta { align-items: flex-start; }
}

.hero-cta-row {
  margin-top: 3rem;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fade-in 1s ease forwards 1.2s;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: none;
  border: none;
  background: none;
  position: relative;
  overflow: hidden;
  transition: color 0.4s;
}

.btn-primary {
  background: var(--gold);
  color: var(--bg);
  border: 1px solid var(--gold);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--cream);
  transform: translateY(100%);
  transition: transform 0.4s var(--ease-smooth);
  z-index: -1;
}

.btn-primary:hover::before { transform: translateY(0); }

.btn-ghost {
  border: 1px solid var(--border-strong);
  color: var(--cream);
  background: transparent;
}

.btn-ghost::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: translateY(101%);
  transition: transform 0.4s var(--ease-smooth);
  z-index: -1;
}

.btn-ghost:hover { color: var(--bg); border-color: var(--gold); }
.btn-ghost:hover::before { transform: translateY(0); }

.btn .arrow {
  display: inline-block;
  transition: transform 0.4s var(--ease-snap);
}

.btn:hover .arrow { transform: translateX(6px); }

/* --- Equalizer --- */
.equalizer {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 28px;
}

.equalizer .bar {
  width: 3px;
  background: var(--gold);
  border-radius: 1px;
  animation: eq-bounce 1.2s ease-in-out infinite;
  animation-play-state: paused;   /* frozen until audio plays */
  transform: scaleY(0.3);         /* resting state — short bars */
}

/* Bars animate only while audio is playing */
html.audio-playing .equalizer .bar {
  animation-play-state: running;
}

.equalizer .bar:nth-child(1) { animation-delay: 0s; height: 30%; }
.equalizer .bar:nth-child(2) { animation-delay: 0.15s; height: 60%; }
.equalizer .bar:nth-child(3) { animation-delay: 0.3s; height: 90%; }
.equalizer .bar:nth-child(4) { animation-delay: 0.45s; height: 50%; }
.equalizer .bar:nth-child(5) { animation-delay: 0.6s; height: 75%; }
.equalizer .bar:nth-child(6) { animation-delay: 0.75s; height: 40%; }
.equalizer .bar:nth-child(7) { animation-delay: 0.9s; height: 65%; }

@keyframes eq-bounce {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1.4); }
}

.equalizer-large { height: 80px; gap: 6px; }
.equalizer-large .bar { width: 5px; }

/* --- Saxophone Hero Visual --- */
.hero-sax {
  position: fixed;
  right: 2%;
  /* Centre within the space below the nav bar (~80px) on any screen size */
  top: calc(80px + (100vh - 80px) / 2);
  width: clamp(220px, 30vw, 520px);
  aspect-ratio: 220 / 320;   /* matches original SVG viewBox; Three.js renderer fills it */
  opacity: 0.9;
  pointer-events: none;
  cursor: default;
  z-index: 1;
  /* All animation driven by scroll JS in main.js */
}

@keyframes float-sax {
  0%, 100% { transform: translateY(-50%) rotate(-3deg); }
  50%       { transform: translateY(-57%) rotate(-1deg); }
}

@media (max-width: 980px) {
  .hero-sax { opacity: 0.18; right: -20%; }
}

.note {
  position: absolute;
  font-size: 2rem;
  color: var(--gold);
  opacity: 0;
  animation: float-note 4s ease-out infinite;
  pointer-events: none;
}

@keyframes float-note {
  0% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(0.5); }
  20% { opacity: 0.8; }
  100% { opacity: 0; transform: translate(var(--tx, 50px), -200px) rotate(20deg) scale(1.2); }
}

/* --- Sections --- */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 3rem;
  margin-bottom: 5rem;
  flex-wrap: wrap;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  max-width: 800px;
}

.section-meta {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-mute);
  line-height: 1.6;
  max-width: 280px;
}

/* --- Marquee --- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
  background: var(--bg-deeper);
  position: relative;
  /* Isolate the animated child into its own compositing context so it
     doesn't interfere with the fixed 3D saxophone's GPU layer */
  isolation: isolate;
  transform: translateZ(0);
  will-change: transform;
}

.marquee-track {
  display: inline-flex;
  white-space: nowrap;
  animation: marquee 40s linear infinite;
  gap: 4rem;
  padding-right: 4rem;
  will-change: transform;
}

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

.marquee-item {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2rem, 5vw, 4rem);
  color: var(--cream);
  display: inline-flex;
  align-items: center;
  gap: 4rem;
}

.marquee-item .dot {
  width: 12px;
  height: 12px;
  background: var(--gold);
  border-radius: 50%;
  display: inline-block;
}

/* --- Services Grid --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.service-card {
  background: var(--bg);
  padding: 3rem 2.5rem;
  position: relative;
  overflow: hidden;
  transition: background 0.5s;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: none;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(212, 175, 55, 0.15), transparent 50%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.service-card:hover::before { opacity: 1; }
.service-card:hover { background: var(--surface); }

.service-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold);
  letter-spacing: 0.2em;
}

.service-icon {
  width: 64px;
  height: 64px;
  margin: 2rem 0;
  color: var(--gold);
  transition: transform 0.5s var(--ease-snap);
}

.service-card:hover .service-icon { transform: rotate(12deg) scale(1.1); }

.service-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  color: var(--cream);
}

.service-desc {
  color: var(--text-mute);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: auto;
}

.service-link .arrow { transition: transform 0.4s; }
.service-card:hover .service-link .arrow { transform: translateX(6px); }

/* --- Stats --- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.stat {
  background: var(--bg);
  padding: 3.5rem 2.5rem;
  text-align: left;
}

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 400;
  background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dim));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 1rem;
}

.stat-num .plus { font-size: 0.6em; }

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-mute);
}

/* --- Process Section --- */
.process {
  position: relative;
  padding: 8rem 0;
  border-top: 1px solid var(--border);
}

.process-list {
  display: grid;
  gap: 0;
}

.process-step {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 3rem;
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  align-items: center;
  position: relative;
  transition: background 0.4s, padding 0.4s;
  cursor: none;
}

.process-step:last-child { border-bottom: 1px solid var(--border); }

.process-step:hover {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.06), transparent);
  padding-left: 2rem;
}

.process-num {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--gold);
  font-style: italic;
}

.process-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.75rem);
}

.process-desc {
  max-width: 380px;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .process-step {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 2rem 0;
  }
  .process-step:hover { padding-left: 0; }
}

/* --- Work / Portfolio --- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2rem;
}

.work-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: none;
  transition: transform 0.6s var(--ease-smooth), border-color 0.4s;
  display: block;
}

.work-card:hover { border-color: var(--border-strong); }

.work-card.span-7 { grid-column: span 7; }
.work-card.span-5 { grid-column: span 5; }
.work-card.span-6 { grid-column: span 6; }
.work-card.span-12 { grid-column: span 12; }

@media (max-width: 880px) {
  .work-card { grid-column: span 12 !important; }
}

.work-visual {
  aspect-ratio: 16/10;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--surface-2), var(--bg-deeper));
}

.work-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(10, 10, 15, 0.95));
}

.work-info {
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

.work-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.work-category {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.work-arrow {
  width: 48px;
  height: 48px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  transition: all 0.4s var(--ease-snap);
}

.work-card:hover .work-arrow {
  background: var(--gold);
  color: var(--bg);
  transform: rotate(-45deg);
}

/* Generative project artwork */
.work-art {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-art svg { width: 80%; height: 80%; }

/* --- Testimonial --- */
.testimonial {
  text-align: center;
  max-width: 1000px;
  margin: 0 auto;
}

.testimonial-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.5rem, 3.5vw, 3rem);
  line-height: 1.3;
  margin-bottom: 3rem;
  color: var(--cream);
  position: relative;
}

.testimonial-quote::before,
.testimonial-quote::after {
  font-family: var(--font-display);
  font-size: 5rem;
  color: var(--gold);
  line-height: 0;
  vertical-align: -0.4em;
  opacity: 0.4;
}

.testimonial-quote::before { content: '"'; margin-right: 0.2em; }
.testimonial-quote::after { content: '"'; margin-left: 0.1em; }

.testimonial-author {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  text-transform: uppercase;
}

.testimonial-role {
  display: block;
  margin-top: 0.5rem;
  color: var(--text-mute);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}

/* --- Tech Stack --- */
.tech-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 3rem;
}

.tech-item {
  background: var(--bg);
  padding: 2rem 1.5rem;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--cream-dim);
  transition: all 0.4s;
  cursor: none;
}

.tech-item:hover {
  background: var(--gold);
  color: var(--bg);
}

/* --- CTA Section --- */
.cta-section {
  text-align: center;
  position: relative;
  border-top: 1px solid var(--border);
  padding: 10rem 0;
  overflow: hidden;
}

.cta-section::before {
  content: 'JAZZ';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: clamp(15rem, 35vw, 35rem);
  font-weight: 900;
  color: rgba(212, 175, 55, 0.04);
  pointer-events: none;
  white-space: nowrap;
  letter-spacing: -0.05em;
}

.cta-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 7rem);
  line-height: 0.95;
  margin-bottom: 3rem;
  position: relative;
}

.cta-title .italic-accent { display: inline; }

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 5rem 0 2rem;
  background: var(--bg-deeper);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

.footer-brand h3 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.9rem;
  max-width: 320px;
  color: var(--text-mute);
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.75rem; }
.footer-col a {
  color: var(--cream-dim);
  font-size: 0.9rem;
  transition: color 0.3s;
  position: relative;
}
.footer-col a:hover { color: var(--gold); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  flex-wrap: wrap;
  gap: 1rem;
}

/* --- Reveal-on-scroll --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease-smooth), transform 1s var(--ease-smooth);
}

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

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease-smooth), transform 1s var(--ease-smooth);
}

.reveal-stagger.in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 0.15s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 0.25s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 0.35s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 0.45s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 0.55s; }

/* --- Sound wave decoration --- */
.soundwave {
  display: flex;
  align-items: center;
  gap: 4px;
  position: absolute;
  opacity: 0.4;
}

.soundwave .wave {
  width: 2px;
  background: var(--gold);
  animation: wave-pulse 1.8s ease-in-out infinite;
}

@keyframes wave-pulse {
  0%, 100% { height: 8px; opacity: 0.4; }
  50% { height: 32px; opacity: 1; }
}

/* --- Vinyl spinner --- */
.vinyl {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--gold) 0%, var(--gold) 15%, var(--bg) 15%, var(--bg) 18%, #1a1a1a 18%, #0a0a0a 100%);
  position: relative;
  animation: spin 8s linear infinite;
}

.vinyl::before {
  content: '';
  position: absolute;
  inset: 25%;
  border-radius: 50%;
  background: repeating-radial-gradient(circle at center, transparent, transparent 2px, rgba(212, 175, 55, 0.03) 2px, rgba(212, 175, 55, 0.03) 4px);
  pointer-events: none;
}

.vinyl::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 16px;
  height: 16px;
  background: var(--bg);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Page-Specific: About --- */
.about-hero {
  padding-top: 12rem;
  padding-bottom: 4rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}

@media (max-width: 880px) {
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.value-card {
  padding: 2.5rem;
  border: 1px solid var(--border);
  background: var(--bg);
  transition: all 0.4s;
  cursor: none;
}

.value-card:hover {
  border-color: var(--border-strong);
  background: var(--surface);
  transform: translateY(-4px);
}

.value-symbol {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 3rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
  line-height: 1;
}

.value-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* --- Team --- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}

.team-card {
  position: relative;
  cursor: none;
}

.team-photo {
  aspect-ratio: 3/4;
  background: var(--surface-2);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
  transition: border-color 0.4s;
}

.team-card:hover .team-photo { border-color: var(--gold); }

.team-silhouette {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  opacity: 0.5;
  transition: opacity 0.4s;
}

.team-card:hover .team-silhouette { opacity: 0.9; }

.team-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
}

.team-role {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

/* --- Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 6rem;
}

@media (max-width: 880px) {
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
}

.form-group {
  margin-bottom: 2rem;
  position: relative;
}

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 1rem 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-strong);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.4s;
  cursor: none;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--gold);
}

.form-group textarea { min-height: 120px; resize: vertical; font-family: var(--font-body); }

.contact-info {
  padding: 3rem;
  border: 1px solid var(--border);
  background: var(--bg-deeper);
  position: relative;
  overflow: hidden;
}

.contact-info-item {
  margin-bottom: 2.5rem;
}

.contact-info-item:last-child { margin-bottom: 0; }

.contact-info-item h5 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
  font-weight: 400;
}

.contact-info-item p, .contact-info-item a {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--cream);
  line-height: 1.4;
  transition: color 0.3s;
}

.contact-info-item a:hover { color: var(--gold); }

/* --- Detailed Services Page --- */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 6rem;
  align-items: center;
  padding: 6rem 0;
  border-bottom: 1px solid var(--border);
}

.service-detail:nth-child(even) {
  grid-template-columns: 1.4fr 1fr;
}

.service-detail:nth-child(even) .service-detail-visual {
  order: 2;
}

@media (max-width: 880px) {
  .service-detail,
  .service-detail:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 4rem 0;
  }
  .service-detail:nth-child(even) .service-detail-visual { order: -1; }
}

.service-detail-visual {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--surface), var(--bg-deeper));
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-detail-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 1rem;
  display: block;
}

.service-detail-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 1.5rem;
  line-height: 1;
}

.service-detail-desc {
  margin-bottom: 2rem;
  line-height: 1.7;
}

.service-features {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.service-features li {
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.9rem;
  color: var(--cream-dim);
}

.service-features li::before {
  content: '♪';
  position: absolute;
  left: 0;
  color: var(--gold);
}

/* --- Loader --- */
.loader {
  position: fixed;
  inset: 0;
  background: var(--bg-deeper);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2rem;
  transition: opacity 0.8s, visibility 0.8s;
}

.loader.gone {
  opacity: 0;
  visibility: hidden;
}

.loader-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 2rem;
  color: var(--gold);
  letter-spacing: -0.02em;
}

/* --- Utility --- */
.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
}

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

/* --- Selection --- */
::selection {
  background: var(--gold);
  color: var(--bg);
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-deeper); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ==========================================================================
   LIGHT THEME — "Jazz Club by Afternoon"
   Warm ivory + deep purple + champagne gold
   ========================================================================== */

/* Smooth theme transition */
*, *::before, *::after {
  transition-property: background-color, border-color, color;
  transition-duration: 0.35s;
  transition-timing-function: ease;
}
/* Exclude elements that have their own specific transitions */
.cursor, .cursor-trail, .loader, .btn, .btn::before, .nav-cta, .nav-cta::before,
.service-card, .service-card::before, .work-card, .note, .reveal, .reveal-stagger > *,
.equalizer .bar, [data-glitch], .hero-sax, .hero-title .line-inner {
  transition-property: none;
}

/* --- Light theme token overrides --- */
[data-theme="light"] {
  --bg:           #ede6d6;
  --bg-deeper:    #e2d9c4;
  --surface:      #d8ccb8;
  --surface-2:    #cec0a8;
  --border:       rgba(94, 31, 138, 0.13);
  --border-strong:rgba(94, 31, 138, 0.32);

  --gold:         #9e6e0e;
  --gold-light:   #c08a12;
  --gold-dim:     #7a5208;
  --gold-glow:    #b07c10;
  --cream:        #1c150e;
  --cream-dim:    #5a4e3c;

  --cyan:         #006d8f;
  --magenta:      #b8105e;
  --coral:        #c44020;

  --text:         #1c150e;
  --text-mute:    #5a4e3c;
  --text-dim:     #9a8c7c;

  --shadow-gold:  0 0 40px rgba(158, 110, 14, 0.18);
  --shadow-deep:  0 30px 80px -20px rgba(0, 0, 0, 0.12);

  /* Purple — the new accent in light mode */
  --purple:       #5e1f8a;
  --purple-light: #7d3aad;
  --purple-dim:   #3d1462;
  --purple-pale:  #ede4f8;
}

/* --- Background atmosphere (light) --- */
[data-theme="light"] body::before {
  background:
    radial-gradient(circle at 15% 20%, rgba(94, 31, 138, 0.06), transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(158, 110, 14, 0.05), transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(94, 31, 138, 0.03), transparent 60%);
}

[data-theme="light"] body::after { opacity: 0.025; }

/* --- Typography --- */
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5 { color: var(--cream); }

[data-theme="light"] p { color: var(--text-mute); }

[data-theme="light"] .italic-accent { color: var(--purple); }

[data-theme="light"] .gold-text {
  background: linear-gradient(135deg, var(--purple-light) 0%, var(--purple) 50%, var(--purple-dim) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .eyebrow { color: var(--purple); }
[data-theme="light"] .eyebrow::before { background: var(--purple); }
[data-theme="light"] .mono-label { color: var(--purple); }

::selection {
  background: var(--purple, #5e1f8a);
  color: #fff;
}
[data-theme="light"] ::selection { background: var(--purple); color: #fff; }

/* --- Navigation --- */
[data-theme="light"] .nav {
  background: rgba(248, 244, 238, 0.88);
  border-bottom-color: rgba(94, 31, 138, 0.1);
}
[data-theme="light"] .nav.scrolled { background: rgba(237, 230, 214, 0.97); }

[data-theme="light"] .nav-logo { color: var(--cream); }

[data-theme="light"] .nav-menu a { color: var(--text-mute); }
[data-theme="light"] .nav-menu a::after { background: var(--purple); }
[data-theme="light"] .nav-menu a:hover { color: var(--purple); }
[data-theme="light"] .nav-menu a.active { color: var(--purple); }
[data-theme="light"] .nav-menu a.active::after { background: var(--purple); }

[data-theme="light"] .nav-cta {
  border-color: rgba(94, 31, 138, 0.35);
  color: var(--purple);
  transition: color 0.4s;
}
[data-theme="light"] .nav-cta::before { background: var(--purple); }
[data-theme="light"] .nav-cta:hover { color: #fff; }

[data-theme="light"] .nav-toggle { color: var(--purple); }
[data-theme="light"] .nav-toggle span { background: var(--cream); }

/* Mobile nav open */
[data-theme="light"] .nav-menu.open {
  background: var(--bg);
  border-left-color: var(--border);
}

/* --- Buttons --- */
[data-theme="light"] .btn-primary {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}
[data-theme="light"] .btn-primary::before { background: var(--purple-light); }

[data-theme="light"] .btn-ghost {
  color: var(--cream);
  border-color: rgba(94, 31, 138, 0.3);
}
[data-theme="light"] .btn-ghost::before { background: var(--purple); }
[data-theme="light"] .btn-ghost:hover { color: #fff; border-color: var(--purple); }

/* --- Marquee --- */
[data-theme="light"] .marquee-item .dot { background: var(--purple); }

/* --- Services --- */
[data-theme="light"] .service-card::before {
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(94, 31, 138, 0.1), transparent 50%);
}
[data-theme="light"] .service-card:hover { background: var(--surface); }
[data-theme="light"] .service-num { color: var(--purple); }
[data-theme="light"] .service-icon { color: var(--purple); }
[data-theme="light"] .service-title { color: var(--cream); }
[data-theme="light"] .service-link { color: var(--purple); }

/* --- Stats --- */
[data-theme="light"] .stat-num {
  background: linear-gradient(135deg, var(--purple-light), var(--purple), var(--purple-dim));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Process --- */
[data-theme="light"] .process-step:hover {
  background: linear-gradient(90deg, rgba(94, 31, 138, 0.05), transparent);
}
[data-theme="light"] .process-num { color: var(--purple); }

/* --- Work cards --- */
[data-theme="light"] .work-visual::after {
  background: linear-gradient(180deg, transparent 40%, rgba(20, 5, 40, 0.88));
}
[data-theme="light"] .work-category { color: var(--purple); }
[data-theme="light"] .work-arrow {
  border-color: rgba(94, 31, 138, 0.3);
  color: var(--purple);
}

/* --- Testimonial --- */
[data-theme="light"] .testimonial-quote {
  border-left-color: var(--purple);
}

/* --- Tech rail --- */
[data-theme="light"] .tech-item:hover {
  background: var(--purple);
  color: #fff;
}

/* --- CTA section — dark purple band, always dramatic --- */
[data-theme="light"] .cta-section {
  background: linear-gradient(135deg, #2d0a4e 0%, #1a0832 100%);
  border-top-color: rgba(94, 31, 138, 0.3);
}
[data-theme="light"] .cta-section::before {
  color: rgba(255, 255, 255, 0.035);
}
[data-theme="light"] .cta-section .cta-bg-word {
  color: rgba(255, 255, 255, 0.035) !important;
}
[data-theme="light"] .cta-section h1,
[data-theme="light"] .cta-section h2,
[data-theme="light"] .cta-section h3 { color: #f0e8ff; }
[data-theme="light"] .cta-section p { color: rgba(240, 232, 255, 0.7); }
[data-theme="light"] .cta-section .eyebrow { color: #c4a4e8; }
[data-theme="light"] .cta-section .eyebrow::before { background: #c4a4e8; }
[data-theme="light"] .cta-section .italic-accent { color: var(--gold); }
[data-theme="light"] .cta-section .gold-text {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dim) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="light"] .cta-section .btn-ghost {
  color: rgba(240, 232, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
}
[data-theme="light"] .cta-section .btn-ghost:hover { color: #fff; }

/* --- Footer --- */
[data-theme="light"] .footer-col h4 { color: var(--purple); }
[data-theme="light"] .footer-col a:hover { color: var(--purple); }

/* --- About / Values --- */
[data-theme="light"] .value-symbol { color: var(--purple); }
[data-theme="light"] .team-card:hover .team-photo { border-color: var(--purple); }
[data-theme="light"] .team-silhouette { color: var(--purple); }
[data-theme="light"] .team-role { color: var(--purple); }

/* --- Contact --- */
[data-theme="light"] .contact-info-item h5 { color: var(--purple); }
[data-theme="light"] .contact-info-item a:hover { color: var(--purple); }
[data-theme="light"] .form-group label { color: var(--text-mute); }
[data-theme="light"] .form-group input:focus,
[data-theme="light"] .form-group textarea:focus,
[data-theme="light"] .form-group select:focus {
  border-bottom-color: var(--purple);
}

/* --- Service detail pages --- */
[data-theme="light"] .feature-tag {
  background: var(--purple-pale);
  color: var(--purple);
  border-color: rgba(94, 31, 138, 0.2);
}
[data-theme="light"] .engagement-card {
  border-top-color: var(--purple);
}

/* --- Scrollbar --- */
[data-theme="light"] ::-webkit-scrollbar-track { background: var(--bg-deeper); }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(94, 31, 138, 0.35); }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: var(--purple); }

/* --- Theme Toggle Button --- */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  cursor: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.theme-toggle:hover {
  border-color: var(--gold);
  color: var(--gold);
}
[data-theme="light"] .theme-toggle:hover {
  border-color: var(--purple);
  color: var(--purple);
}
/* In dark mode: show sun (click to go light) */
.theme-toggle .icon-sun  { display: block; }
.theme-toggle .icon-moon { display: none; }
/* In light mode: show moon (click to go dark) */
[data-theme="light"] .theme-toggle .icon-sun  { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }


/* ==========================================================================
   HERO TITLE — Fraunces (jazz-soul vibe, distinct from Bodoni)
   ========================================================================== */
.hero-title {
  font-family: 'Fraunces', 'Bodoni Moda', serif;
  font-weight: 400;
  font-variation-settings: "SOFT" 100, "WONK" 0, "opsz" 144;
  letter-spacing: -0.025em;
  font-style: normal;
}

.hero-title .italic-accent {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  font-weight: 400;
  color: var(--gold);
}

[data-theme="light"] .hero-title .italic-accent {
  color: var(--purple);
}

/* ==========================================================================
   INTERNATIONALIZATION (EN / TH)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+Thai:wght@400;500;600;700&family=Noto+Sans+Thai:wght@300;400;500;600&display=fallback');

/* Default: show English, hide Thai */
.lang-th { display: none; }
[data-lang="th"] .lang-en { display: none; }
[data-lang="th"] .lang-th { display: revert; }

/* Thai-only typographic refinements (line-height for legibility — fonts cascade via font stack) */
[data-lang="th"] {
  letter-spacing: 0;
}
[data-lang="th"] .hero-title,
[data-lang="th"] .display-xl,
[data-lang="th"] .display-lg,
[data-lang="th"] .display-md {
  line-height: 1.15;
}
/* Thai italic-accent: only applies inside Thai content spans, never in the logo/brand wordmark */
[data-lang="th"] .lang-th .italic-accent {
  font-style: normal;
  font-weight: 600;
}

/* Language Toggle Button */
.lang-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--cream-dim);
  cursor: none;
  height: 34px;
  padding: 0 0.7rem;
  border-radius: 17px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  transition: border-color 0.3s, color 0.3s;
}
.lang-toggle:hover {
  border-color: var(--gold);
  color: var(--gold);
}
[data-theme="light"] .lang-toggle:hover {
  border-color: var(--purple);
  color: var(--purple);
}
.lang-toggle .lang-current { font-weight: 700; color: var(--cream); }
.lang-toggle .lang-divider { opacity: 0.4; }
.lang-toggle .lang-other   { opacity: 0.75; }

/* ==========================================================================
   MUSIC NOTE CURSOR TRAIL — notes drift in direction of mouse movement
   ========================================================================== */
.music-note-trail {
  position: fixed;
  pointer-events: none;
  color: var(--gold);
  font-family: 'Bodoni Moda', serif;
  z-index: 9998;
  opacity: 0.9;
  user-select: none;
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
  will-change: transform, opacity;
  transition: transform 1.3s cubic-bezier(0.22, 0.61, 0.36, 1),
              opacity 1.3s cubic-bezier(0.4, 0, 0.6, 1);
  /* keep transitions ignoring the global * transition rule */
  transition-property: transform, opacity !important;
}
[data-theme="light"] .music-note-trail {
  color: var(--purple);
  text-shadow: 0 0 12px rgba(94, 31, 138, 0.3);
}
/* Hide trail on touch devices */
@media (pointer: coarse) {
  .music-note-trail { display: none; }
}

/* Saxophone click — ring pulse + glow when audio plays */
.hero-sax:hover {
  opacity: 1;
  filter: drop-shadow(0 0 18px rgba(212, 175, 55, 0.45));
}
[data-theme="light"] .hero-sax:hover {
  filter: drop-shadow(0 0 18px rgba(94, 31, 138, 0.45));
}
.hero-sax {
  cursor: none;
}
.hero-sax.playing {
  filter: drop-shadow(0 0 30px var(--gold)) brightness(1.35);
  transition: filter 0.15s ease-out;
}
@keyframes sax-ring {
  0%   { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}
.sax-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--gold);
  pointer-events: none;
  animation: sax-ring 0.7s ease-out forwards;
}
[data-theme="light"] .sax-ring { border-color: var(--purple); }

/* Saxophone playing state — gentle pulse while music plays */
.hero-sax[data-playing] {
  filter: drop-shadow(0 0 22px rgba(212, 175, 55, 0.5));
  animation: float-sax 8s ease-in-out infinite, sax-pulse 2.4s ease-in-out infinite;
}
@keyframes sax-pulse {
  0%, 100% { filter: brightness(0.95); }
  50%       { filter: brightness(1.05); }
}
[data-theme="light"] .hero-sax[data-playing] {
  filter: drop-shadow(0 0 22px rgba(94, 31, 138, 0.4));
}

/* ═══════════════════════════════════════════════════════
   SAX PLAYING NOTES — large notes floating from the bell
   ═══════════════════════════════════════════════════════ */
.sax-playing-note {
  position: fixed;
  pointer-events: none;
  z-index: 200;
  font-family: serif;
  color: #9b4de0;    /* vivid purple — visible on both dark and light */
  text-shadow:
    0 0 18px rgba(155, 77, 224, 0.85),
    0 0 40px rgba(155, 77, 224, 0.45),
    0 0 80px rgba(155, 77, 224, 0.2);
  user-select: none;
  will-change: transform, opacity;
  animation: sax-note-rise var(--dur, 3s) cubic-bezier(0.2, 0.6, 0.3, 1) forwards;
}
@keyframes sax-note-rise {
  0%   { opacity: 0;    transform: translate(0,     0)     rotate(0deg)   scale(0.6); }
  12%  { opacity: 1;                                                                    }
  100% { opacity: 0;    transform: translate(var(--tx, -60px), -180px) rotate(var(--rot, -18deg)) scale(1.3); }
}

/* ── 3D Saxophone overlay (sax3d.js) ── */
#sax-3d {
  position: fixed !important;
  right: 0 !important;
  will-change: transform !important;
  backface-visibility: hidden !important;
  -webkit-backface-visibility: hidden !important;
  top: calc(50% + 80px) !important;
  width: clamp(280px, 30vw, 520px) !important;
  height: auto !important;
  aspect-ratio: 3 / 4 !important;
  z-index: 50 !important;
  pointer-events: all !important;
  overflow: visible !important;
}
#sax-3d canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
