/* ==========================================================
   Brandon Davis Lighting Design — Stylesheet
   ========================================================== */

:root {
  --bg: #0b0b0d;
  --bg-alt: #121216;
  --surface: #1a1a20;
  --line: #2a2a32;
  --text: #f2f0ea;
  --muted: #9a98a0;
  --accent: #f5b942;        /* warm tungsten amber */
  --accent-2: #4fb3ff;      /* cool daylight blue */
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --radius: 10px;
  --max: 1200px;
}

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

html { scroll-behavior: smooth; }

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
}
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.25rem; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
  font-family: inherit;
}
.btn-primary { background: var(--accent); color: #111; }
.btn-primary:hover { transform: translateY(-2px); background: #ffc95e; }
.btn-ghost { border-color: var(--line); color: var(--text); background: rgba(11, 11, 13, 0.75); backdrop-filter: blur(6px); }
.btn-ghost:hover { border-color: var(--text); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(11, 11, 13, 0.85);
  backdrop-filter: blur(12px);
  border-color: var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.brand { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.logo { display: block; }
.brand-ig {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  transition: color 0.2s;
}
.brand-ig:hover { color: var(--accent); }
.logo img {
  height: 44px;
  width: auto;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.45));
}
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.nav-links a {
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links .nav-cta {
  color: var(--text);
  border: 1px solid var(--line);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
}
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 32px;
  height: 32px;
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 4px; right: 4px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s, top 0.3s;
}
.nav-toggle span:first-child { top: 11px; }
.nav-toggle span:last-child { top: 19px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 15px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 15px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 120%, #1c1a24 0%, var(--bg) 60%);
}
.hero-beams span {
  position: absolute;
  top: -20%;
  width: 22vw;
  height: 140%;
  transform-origin: top center;
  filter: blur(40px);
  opacity: 0.35;
  animation: sweep 12s ease-in-out infinite alternate;
}
.hero-beams span:nth-child(1) {
  left: 10%;
  background: linear-gradient(to bottom, var(--accent), transparent 80%);
  transform: rotate(18deg);
}
.hero-beams span:nth-child(2) {
  left: 42%;
  background: linear-gradient(to bottom, #ffffff, transparent 70%);
  opacity: 0.15;
  animation-delay: -4s;
}
.hero-beams span:nth-child(3) {
  right: 8%;
  background: linear-gradient(to bottom, var(--accent-2), transparent 80%);
  transform: rotate(-18deg);
  animation-delay: -8s;
}
@keyframes sweep {
  from { rotate: -6deg; }
  to   { rotate: 6deg; }
}
.hero-logo {
  display: block;
  width: min(85vw, 820px);
  margin: 0 auto 2.5rem;
  opacity: 0.3;
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.8));
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; padding-block: 130px 150px; text-align: center; }
.hero h1 {
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  font-weight: 700;
  margin-bottom: 2.5rem;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--accent), #fff 60%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  max-width: 540px;
  font-size: 1.125rem;
  color: var(--muted);
  margin: 0 auto 1.5rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}
.scroll-cue::after {
  content: "";
  display: block;
  width: 1px;
  height: 40px;
  margin: 10px auto 0;
  background: linear-gradient(var(--muted), transparent);
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(80px, 12vw, 140px); }
.section-alt { background: var(--bg-alt); }
.section-head { margin-bottom: 3rem; }

/* ---------- Work ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}
.filter {
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}
.filter:hover { color: var(--text); border-color: var(--muted); }
.filter.active { background: var(--text); color: var(--bg); border-color: var(--text); }

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform 0.3s, border-color 0.3s;
}
.card:hover { transform: translateY(-4px); border-color: #3a3a44; }
.card.hidden { display: none; }
.card-media {
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s;
}
.card:hover .card-media { transform: scale(1.04); }
.card-body { padding: 1.25rem 1.5rem 1.5rem; }
.card-body h3 { margin-bottom: 0.25rem; }
.card-body p { margin: 0; color: var(--muted); font-size: 0.875rem; }
.card-tag {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

/* Placeholder "stage light" gradients — replace with real photos */
.grad-1 { background-image: radial-gradient(circle at 30% 20%, #f5b942 0%, transparent 45%), radial-gradient(circle at 75% 30%, #ff6b6b 0%, transparent 40%), linear-gradient(#1a1420, #0b0b0d); }
.grad-2 { background-image: radial-gradient(circle at 50% 0%, #4fb3ff 0%, transparent 50%), radial-gradient(circle at 20% 80%, #8a5cff 0%, transparent 40%), linear-gradient(#0e1422, #0b0b0d); }
.grad-3 { background-image: radial-gradient(circle at 70% 20%, #ff3cac 0%, transparent 45%), radial-gradient(circle at 25% 40%, #784ba0 0%, transparent 45%), linear-gradient(#1a0e1c, #0b0b0d); }
.grad-4 { background-image: radial-gradient(circle at 50% 50%, #ffd36b 0%, transparent 40%), radial-gradient(circle at 10% 10%, #4fb3ff 0%, transparent 35%), linear-gradient(#141418, #0b0b0d); }
.grad-5 { background-image: radial-gradient(circle at 20% 30%, #2ee6c5 0%, transparent 40%), radial-gradient(circle at 80% 70%, #4fb3ff 0%, transparent 40%), linear-gradient(#0c1818, #0b0b0d); }
.grad-6 { background-image: radial-gradient(circle at 40% 10%, #fff2d6 0%, transparent 40%), radial-gradient(circle at 80% 60%, #f5b942 0%, transparent 35%), linear-gradient(#18140e, #0b0b0d); }

/* ---------- Gallery ---------- */
.gallery-grid {
  columns: 3 280px;
  column-gap: 1rem;
}
.gallery-item {
  margin: 0 0 1rem;
  break-inside: avoid;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.gallery-item button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.gallery-item img { width: 100%; transition: transform 0.5s; }
.gallery-item:hover img { transform: scale(1.03); }
.gallery-item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2rem 1rem 0.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  pointer-events: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(5, 5, 7, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top, 0px) 16px env(safe-area-inset-bottom, 0px);
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 90vw; text-align: center; }
.lightbox img { max-height: 82vh; width: auto; margin: 0 auto; border-radius: 6px; }
.lightbox figcaption { margin-top: 0.75rem; color: var(--muted); font-size: 0.9rem; min-height: 1.4em; }
.lightbox button {
  position: absolute;
  background: none;
  border: 0;
  color: var(--text);
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.5rem 1rem;
  opacity: 0.7;
}
.lightbox button:hover { opacity: 1; }
.lightbox-close { top: calc(12px + env(safe-area-inset-top, 0px)); right: 8px; }
.lightbox-nav.prev { left: 4px; }
.lightbox-nav.next { right: 4px; }

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.about-head { position: sticky; top: 120px; }
.about-text p { color: var(--muted); }
.stats {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 1.5rem 3.5rem;
  list-style: none;
  padding: 2rem 0 0;
  margin: 2rem 0 0;
  border-top: 1px solid var(--line);
}
.stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2.25rem;
  color: var(--text);
}
.stats span { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.service {
  background: var(--bg);
  padding: 2.5rem 2rem;
  transition: background 0.3s;
}
.service:hover { background: var(--surface); }
.service-num {
  display: block;
  font-family: var(--font-display);
  color: var(--accent);
  font-size: 0.85rem;
  margin-bottom: 2rem;
}
.service p { color: var(--muted); margin: 0; font-size: 0.95rem; }

/* ---------- Credits ---------- */
.credits-table { overflow-x: auto; }
.credit-row {
  display: grid;
  grid-template-columns: 3fr 1fr 0.8fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.credit-row span:first-child { font-weight: 500; }
.credit-row span:not(:first-child) { color: var(--muted); }
.credits-note { margin: 2rem 0 0; color: var(--muted); font-size: 0.95rem; }
.credits-note strong { color: var(--text); font-weight: 500; }
.affiliations { font-size: 0.875rem; }
@media (max-width: 600px) {
  .credit-row { grid-template-columns: 1fr auto auto; gap: 0.75rem; font-size: 0.85rem; }
}
.credit-head span {
  font-size: 0.7rem !important;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  font-weight: 500 !important;
}

/* ---------- Contact ---------- */
.contact {
  background: radial-gradient(ellipse at 50% 0%, rgba(245, 185, 66, 0.12), transparent 60%), var(--bg);
}
.contact-inner { max-width: 720px; text-align: center; }
.contact-sub { color: var(--muted); margin-bottom: 2.5rem; }
.contact-form { display: grid; gap: 1rem; text-align: left; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.95rem 1rem;
  color: var(--text);
  font: inherit;
  transition: border-color 0.2s;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--accent); }
.contact-form button { justify-self: start; }
.form-note { color: var(--accent); margin: 0; }
.hp-field { position: absolute; left: -9999px; }
.contact-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 3rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.contact-links a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2rem calc(2rem + env(safe-area-inset-bottom, 0px));
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-inner p { margin: 0; }
.footer-inner a:hover { color: var(--text); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s, transform 0.8s; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    inset: 84px 0 auto 0;
    flex-direction: column;
    gap: 0;
    background: rgba(11, 11, 13, 0.97);
    border-bottom: 1px solid var(--line);
    padding: 1rem 0;
    transform: translateY(-120%);
    transition: transform 0.35s;
    z-index: -1;
  }
  .nav-links.open { transform: none; }
  .nav-links li { width: 100%; text-align: center; }
  .nav-links a { display: block; padding: 1rem; font-size: 1.1rem; }
  .nav-links .nav-cta { border: 0; }
  .about { grid-template-columns: 1fr; gap: 0; }
  .about-head { position: static; }
  .form-row { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .work-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
