/* ══ BACKSTAGE DIGITAL — SHARED STYLES ══ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Space+Mono:wght@400;700&display=swap');

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

:root {
  --bg:       #0e0d0b;
  --bg2:      #141310;
  --bg3:      #1a1916;
  --bg-light: #f5f2ec;
  --border:   rgba(212,168,83,0.10);
  --border-md:rgba(212,168,83,0.18);
  --text:     #f0ece3;
  --muted:    rgba(240,236,227,0.50);
  --muted2:   rgba(240,236,227,0.25);
  --gold:     #d4a853;
  --gold2:    #e8c97a;
  --gold-glow:rgba(212,168,83,0.12);
  --red:      #e05c3a;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── INTRO OVERLAY ── */
/* Only shown when JS is running — otherwise it would cover the page forever.
   Skipped entirely after the first visit in a session, and for reduced motion. */
#intro-overlay { display: none; }

html.js #intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #060503;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

html.intro-skip #intro-overlay { display: none; }

.intro-skip-hint {
  position: absolute;
  bottom: 24px;
  right: 32px;
  z-index: 5;
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(240,236,227,0.3);
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* Vertical strips for the reveal */
.intro-strip {
  position: absolute;
  top: 0;
  bottom: 0;
  background: #060503;
  z-index: 3;
  transform: translateY(0);
  /* transition set in JS */
}

/* Hide nav until intro done — but only when JS can bring it back */
#nav { transition: opacity 0.5s ease; }
html.js #nav { opacity: 0; }
html.js #nav.intro-done,
html.intro-skip #nav { opacity: 1; }

#intro-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  mix-blend-mode: overlay;
  opacity: 0.6;
}

.intro-content {
  position: relative;
  z-index: 4;
  width: 100%;
  max-width: 1200px;
  padding: 0 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100vh;
}

.intro-wordmark {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.intro-line1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(72px, 14vw, 180px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.9;
  color: var(--text);
  opacity: 0;
  font-variant-numeric: tabular-nums;
}

.intro-line2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(72px, 14vw, 180px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.9;
  color: var(--gold);
  opacity: 0;
  font-variant-numeric: tabular-nums;
}

.intro-bottom {
  padding-bottom: 56px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.intro-tag {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted2);
  opacity: 0;
  transition: opacity 0.4s;
}

.intro-progress {
  width: 100%;
  height: 1px;
  background: rgba(212,168,83,0.15);
  overflow: hidden;
}

#intro-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--gold);
}

/* ── NAV ── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 70px;
  display: flex;
  align-items: center;
  padding: 0 48px;
  transition: background 0.3s, border-color 0.3s;
}

#nav.scrolled {
  background: rgba(14,13,11,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.nav-logo em { font-style: normal; color: var(--gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--text); }

.nav-cta {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase;
  color: var(--bg) !important;
  background: var(--gold);
  padding: 9px 22px;
  border-radius: 4px;
  transition: background 0.2s !important;
}

.nav-cta:hover { background: var(--gold2) !important; color: var(--bg) !important; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  width: 30px;
  height: 30px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.2s;
}

/* Hamburger morphs into a close cross when the menu is open */
.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 30px;
  border-radius: 4px;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-gold {
  background: var(--gold);
  color: var(--bg);
}

.btn-gold:hover {
  background: var(--gold2);
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(212,168,83,0.25);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-md);
}

.btn-outline:hover {
  border-color: rgba(212,168,83,0.4);
  color: var(--gold);
}

.btn-dark {
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-dark:hover {
  border-color: var(--border-md);
  color: var(--gold);
}

/* ── TYPOGRAPHY ── */
h1,h2,h3,h4,h5 {
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.page-title {
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 700;
  line-height: 1.0;
  margin-bottom: 24px;
}

.section-title {
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 700;
}

.lead {
  font-size: clamp(16px, 1.8vw, 20px);
  color: var(--muted);
  line-height: 1.7;
  max-width: 580px;
}

/* ── LAYOUT ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
}

section { padding: 100px 0; }

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

/* ── GOLD LINE ACCENT ── */
.gold-line {
  display: inline-block;
  width: 40px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  margin-bottom: 24px;
}

/* ── CARDS ── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px;
  transition: border-color 0.2s, background 0.2s;
}

.card:hover {
  border-color: var(--border-md);
  background: var(--bg3);
}

/* ── MARQUEE ── */
.marquee-section {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  padding: 16px 0;
}

.marquee-track {
  display: flex;
  gap: 60px;
  animation: marquee 30s linear infinite;
  white-space: nowrap;
  width: max-content;
}

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

.marquee-item {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.marquee-sep {
  color: var(--gold);
  opacity: 0.6;
}

/* ── REVEAL ── */
/* Gated on html.js so that without JS the content is simply visible
   rather than stuck at opacity 0 forever. */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

html.js [data-reveal].visible { opacity: 1; transform: translateY(0); }
[data-delay="1"] { transition-delay: 0.1s; }
[data-delay="2"] { transition-delay: 0.2s; }
[data-delay="3"] { transition-delay: 0.3s; }
[data-delay="4"] { transition-delay: 0.4s; }
[data-delay="5"] { transition-delay: 0.5s; }

/* ── FOOTER ── */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
}

.footer-top {
  padding: 72px 0 56px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.footer-brand em { font-style: normal; color: var(--gold); }

.footer-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

.footer-col-title {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.footer-col a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-size: 12px;
  color: var(--muted2);
  line-height: 1.7;
}

.footer-legal {
  display: flex;
  gap: 24px;
}

.footer-legal a {
  font-size: 12px;
  color: var(--muted2);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-legal a:hover { color: var(--muted); }

/* ── RESPONSIVE ── */

/* The nav collapses earlier than the rest of the layout. Measured: the eight
   links plus the CTA need 641px, and with the logo (142px) and 48px page padding
   either side the desktop nav needs a 880px viewport as an absolute floor. The
   breakpoint sits at 1000px so it always has ~120px of slack rather than
   butting the logo against the first link, as it used to. */
@media (max-width: 1000px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    background: rgba(14,13,11,0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px 24px;
    gap: 2px;
    z-index: 199;
  }

  .nav-links.open a {
    display: block;
    padding: 12px 4px;
    font-size: 15px;
  }

  .nav-links.open .nav-cta {
    margin-top: 12px;
    text-align: center;
    padding: 14px 22px;
  }
}

@media (max-width: 1100px) {
  .footer-top { grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
}

@media (max-width: 900px) {
  .container { padding: 0 24px; }
  #nav { padding: 0 24px; }
  section { padding: 72px 0; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 600px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  /* The marquee and scroll pulse loop forever — stop them outright rather than
     running them at 0.01ms, which just pins them at their end state. */
  .marquee-track,
  .hero-scroll-line,
  .work-card-live-dot,
  .case-live-dot { animation: none !important; }

  html.js [data-reveal] { opacity: 1 !important; transform: none !important; }
}
