/* ============================================
   OUTDUN PRODUCTIONS — CINEMATIC INTAKE FORM
   Adapted for website integration
   ============================================ */

/* Intake page body override — pure black for cinematic feel */
body.page-intake {
  background: #000;
}

:root {
  --bg: #000000;
  --text: #f0f0f0;
  --text-secondary: #999999;
  --text-muted: #555555;
  --purple: #7c3aed;
  --purple-bright: #a78bfa;
  --purple-glow: rgba(124, 58, 237, 0.5);
  --purple-soft: rgba(124, 58, 237, 0.15);
  --gold: #c9a84c;
  --gold-soft: rgba(201, 168, 76, 0.15);
  --gold-glow: rgba(201, 168, 76, 0.3);
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.12);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* --- Film Grain (low z-index, no click blocking) --- */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.03;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.05) 2px,
      rgba(255, 255, 255, 0.05) 3px
    );
  background-size: 100% 3px;
}

/* --- Ambient Orbs --- */
.ambient-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  transition: opacity 2s ease;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--purple) 0%, transparent 70%);
  top: 10%;
  left: -10%;
  animation: drift-1 28s ease-in-out infinite;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.7) 0%, transparent 70%);
  bottom: 15%;
  right: -5%;
  animation: drift-2 32s ease-in-out infinite;
}

.orb-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.6) 0%, transparent 70%);
  top: 50%;
  left: 35%;
  animation: drift-3 24s ease-in-out infinite;
}

.orb-4 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.5) 0%, transparent 70%);
  top: 20%;
  right: 25%;
  animation: drift-4 30s ease-in-out infinite;
}

@keyframes drift-4 {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-60px, 40px); }
  50% { transform: translate(50px, -60px); }
  75% { transform: translate(-30px, -40px); }
}

@keyframes drift-1 {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(80px, 60px); }
  50% { transform: translate(30px, -40px); }
  75% { transform: translate(-50px, 70px); }
}

@keyframes drift-2 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(-70px, -50px); }
  66% { transform: translate(60px, 40px); }
}

@keyframes drift-3 {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-40px, 50px); }
  50% { transform: translate(70px, -40px); }
  75% { transform: translate(20px, 80px); }
}

/* --- Glass Utility --- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 4px 24px rgba(0, 0, 0, 0.3);
}

/* --- Sticky Header (below website nav) --- */
.sticky-header {
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  z-index: 99;
  padding: 1.35rem 1.5rem 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.sticky-header.visible {
  opacity: 1;
  transform: translateY(0);
}

.header-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding-bottom: 1rem;
}

.header-badge {
  flex-shrink: 0;
  opacity: 0.85;
}

.header-phases {
  display: flex;
  align-items: center;
}

.phase-label {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.3rem 0.8rem;
  transition: color 0.5s ease, text-shadow 0.5s ease;
}

.phase-label.active {
  color: var(--purple-bright);
  text-shadow:
    0 0 16px rgba(124, 58, 237, 0.6),
    0 0 32px rgba(124, 58, 237, 0.35),
    0 0 64px rgba(124, 58, 237, 0.15);
}

.phase-label.completed {
  color: #666;
}

.phase-divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 0.25rem;
}

.progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--purple-soft), var(--purple), var(--purple-soft));
  box-shadow:
    0 0 10px var(--purple-glow),
    0 0 24px rgba(124, 58, 237, 0.35);
  transition: width 0.5s ease;
}

/* --- Opening (cinematic fade from black) --- */
.opening {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1.5rem;
  padding-top: 100px;
  position: relative;
  z-index: 1;
  background: transparent;
  overflow: hidden;
}

.opening-content {
  text-align: center;
  max-width: 700px;
  will-change: opacity, transform;
  position: relative;
  overflow: hidden;
}

.opening-content::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 140%;
  height: 140%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(ellipse 60% 50% at 50% 45%, rgba(124, 58, 237, 0.09) 0%, transparent 70%),
    radial-gradient(ellipse 45% 40% at 55% 50%, rgba(201, 168, 76, 0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
}

/* Black spacer between opening and form */
.black-spacer {
  height: 15vh;
  background: transparent;
  position: relative;
  z-index: 1;
}

.opening-logo {
  margin: 0 auto 2.5rem;
  opacity: 0;
  filter: drop-shadow(0 0 20px rgba(124, 58, 237, 0.15)) brightness(1.1);
  transition: opacity 1.6s ease;
}

.opening-logo.glass-logo {
  filter:
    drop-shadow(0 0 24px rgba(124, 58, 237, 0.25))
    drop-shadow(0 0 48px rgba(124, 58, 237, 0.12))
    drop-shadow(0 0 36px rgba(201, 168, 76, 0.08))
    brightness(1.15);
}

/* Headline: sequential sweep reveal across two lines */
.opening-headline {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fafafa;
  margin-bottom: 1.2rem;
  opacity: 0;
  text-shadow:
    0 0 60px rgba(201, 168, 76, 0.08),
    0 0 120px rgba(124, 58, 237, 0.06);
}

.headline-line {
  display: block;
}

.headline-line.revealing {
  -webkit-mask-image: linear-gradient(
    to right,
    black var(--reveal, -30%),
    transparent calc(var(--reveal, -30%) + 35%)
  );
  mask-image: linear-gradient(
    to right,
    black var(--reveal, -30%),
    transparent calc(var(--reveal, -30%) + 35%)
  );
}

.opening-sub {
  font-size: clamp(0.9rem, 1.8vw, 1.05rem);
  color: #b0a899;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  opacity: 0;
  transition: opacity 1.4s ease;
}

/* Phase reveal words - simple white, smooth fade */
.phase-reveal {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 3rem;
}

.phase-reveal-word {
  font-size: clamp(1.4rem, 3.5vw, 2.1rem);
  font-weight: 800;
  letter-spacing: 0.3em;
  color: var(--purple-bright);
  opacity: 0;
  transition: opacity 0.4s ease;
  text-shadow:
    0 0 24px rgba(124, 58, 237, 0.6),
    0 0 48px rgba(124, 58, 237, 0.3),
    0 0 96px rgba(124, 58, 237, 0.12);
}

.scroll-cue {
  color: var(--purple-bright);
  opacity: 0;
  transition: opacity 0.5s ease;
  filter:
    drop-shadow(0 0 6px rgba(124, 58, 237, 0.5))
    drop-shadow(0 0 16px rgba(124, 58, 237, 0.25));
}

.scroll-cue.visible {
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50%      { opacity: 0.7; transform: translateY(6px); }
}

/* --- Main --- */
main {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
  position: relative;
  z-index: 1;
}

/* --- Question Blocks (scroll-linked fade from black) --- */
.q-block {
  min-height: auto;
  display: flex;
  align-items: center;
  padding: 6rem 0 4rem;
  position: relative;
  z-index: 1;
}

.q-inner {
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  --fade: 0;
  --shift: 50px;
  opacity: var(--fade);
  transform: translateY(var(--shift));
  will-change: opacity, transform;
}

/* --- Phase Intro (title cards that scroll into view) --- */
.phase-intro {
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 0 3rem;
  margin-top: 15vh;
  position: relative;
  z-index: 1;
}

.phase-intro-inner {
  display: flex;
  justify-content: center;
}

.phase-intro-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 0;
  border: none !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  position: relative;
}

/* Decorative horizontal lines flanking the label */
.phase-intro-card::before,
.phase-intro-card::after {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--purple), transparent);
  opacity: 0.5;
}

.phase-intro-card::before { margin-right: 1.5rem; }
.phase-intro-card::after { margin-left: 1.5rem; }

.phase-intro-label {
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: 0.35em;
  color: var(--purple-bright);
  text-align: center;
  text-shadow:
    0 0 24px rgba(124, 58, 237, 0.6),
    0 0 48px rgba(124, 58, 237, 0.3),
    0 0 96px rgba(124, 58, 237, 0.12);
}

/* --- Step Pips (subtle progress within phase) --- */
.step-pips {
  display: flex;
  gap: 8px;
  margin-bottom: 0.85rem;
}

.pip {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pip.active {
  background: var(--purple-bright);
  border-color: var(--purple);
  box-shadow: 0 0 8px rgba(167, 139, 250, 0.6), 0 0 16px rgba(124, 58, 237, 0.3);
}

.step-heading {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fafafa;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.step-sub {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.sub-section {
  margin-bottom: 2rem;
}

.sub-section .step-sub {
  margin-bottom: 0.75rem;
}

/* --- Text Inputs --- */
.input-group {
  margin-bottom: 1.5rem;
}

.input-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.req {
  color: var(--purple-bright);
}

.text-input {
  width: 100%;
  padding: 0.65rem 0;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
  background: transparent;
  color: #fafafa;
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 500;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  -webkit-appearance: none;
  position: relative;
  z-index: 2;
}

.text-input::placeholder {
  color: var(--text-muted);
}

.text-input:focus {
  outline: none;
  border-bottom-color: var(--purple);
  box-shadow: 0 4px 20px -10px var(--purple-glow);
}

.text-input.error {
  border-bottom-color: #ef4444;
}

.text-area {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fafafa;
  font-family: var(--font);
  font-size: 0.9rem;
  resize: vertical;
  min-height: 72px;
  transition: border-color 0.3s ease;
  position: relative;
  z-index: 2;
}

.text-area::placeholder {
  color: var(--text-muted);
}

.text-area:focus {
  outline: none;
  border-color: var(--purple);
}

/* --- Card Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.card {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1rem;
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  font-family: var(--font);
  text-align: left;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  --card-y: 16px;
  transform: translateY(var(--card-y));
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.5s ease;
}

.card.stagger-in {
  --card-y: 0px;
}

@media (hover: hover) {
  .card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    --card-y: -2px;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.15),
      0 8px 32px rgba(0, 0, 0, 0.4);
  }
}

.card.selected {
  border-color: var(--purple);
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.12), rgba(124, 58, 237, 0.04));
  box-shadow:
    0 0 0 1px var(--purple),
    0 0 16px rgba(124, 58, 237, 0.45),
    0 0 36px rgba(124, 58, 237, 0.2),
    0 0 72px rgba(124, 58, 237, 0.08),
    inset 0 1px 0 rgba(124, 58, 237, 0.25);
  animation: breathe 3.5s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% {
    box-shadow:
      0 0 0 1px var(--purple),
      0 0 16px rgba(124, 58, 237, 0.4),
      0 0 36px rgba(124, 58, 237, 0.18),
      0 0 72px rgba(124, 58, 237, 0.06),
      inset 0 1px 0 rgba(124, 58, 237, 0.25);
  }
  50% {
    box-shadow:
      0 0 0 1px var(--purple),
      0 0 24px rgba(124, 58, 237, 0.55),
      0 0 48px rgba(124, 58, 237, 0.3),
      0 0 80px rgba(124, 58, 237, 0.12),
      inset 0 1px 0 rgba(124, 58, 237, 0.3);
  }
}

.card.selected .card-title {
  color: var(--purple-bright);
}

.card.selected .card-desc {
  color: var(--text-secondary);
}

.card.selected .card-icon {
  color: var(--purple-bright);
}

.card--compact {
  padding: 0.8rem 1rem;
}

.card-icon {
  width: 22px;
  height: 22px;
  margin-bottom: 0.6rem;
  color: var(--text-muted);
  transition: color 0.25s ease;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 0.25s ease;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  line-height: 1.35;
}

/* --- Tags --- */
.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.95rem;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  opacity: 0;
  transform: translateY(12px);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, opacity 0.4s ease, transform 0.4s ease;
}

.tag.stagger-in {
  opacity: 1;
  transform: translateY(0);
}

@media (hover: hover) {
  .tag:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text);
  }
}

.tag.selected {
  border-color: var(--purple);
  background: rgba(124, 58, 237, 0.14);
  color: var(--purple-bright);
  box-shadow:
    0 0 12px rgba(124, 58, 237, 0.4),
    0 0 28px rgba(124, 58, 237, 0.15);
}

/* --- Expand --- */
.expand-area {
  margin-bottom: 1.5rem;
}

.expand-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.35rem 0;
  transition: color 0.2s ease;
  position: relative;
  z-index: 2;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .expand-toggle:hover {
    color: var(--purple-bright);
  }
}

.expand-icon {
  display: inline-block;
  transition: transform 0.3s ease;
  font-weight: 300;
}

.expand-toggle.open .expand-icon {
  transform: rotate(45deg);
}

.expand-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease;
}

.expand-content.open {
  max-height: 200px;
  opacity: 1;
  margin-top: 0.6rem;
}

/* --- Submit --- */
/* --- Scroll Indicator (pulsing arrow between sections) --- */
.scroll-indicator {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
  position: relative;
  z-index: 1;
}

.scroll-indicator svg {
  color: var(--purple-bright);
  opacity: 0.35;
  filter:
    drop-shadow(0 0 6px rgba(124, 58, 237, 0.5))
    drop-shadow(0 0 16px rgba(124, 58, 237, 0.25));
  animation: scroll-pulse 2.5s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.2; transform: translateY(0); }
  50%      { opacity: 0.5; transform: translateY(5px); }
}

.submit-block {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 0 6rem;
}

.submit-inner {
  text-align: center;
}

.submit-note {
  color: #fafafa;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 2.5rem;
  line-height: 1.3;
  text-shadow:
    0 0 40px rgba(124, 58, 237, 0.15),
    0 0 80px rgba(124, 58, 237, 0.08);
}

.submit-btn {
  display: inline-block;
  padding: 1.1rem 3.5rem;
  border-radius: 10px;
  color: #fafafa;
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  position: relative;
  z-index: 2;
  border-color: var(--purple) !important;
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.2), rgba(124, 58, 237, 0.08)) !important;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.submit-btn:hover {
  box-shadow:
    0 0 24px rgba(124, 58, 237, 0.5),
    0 0 48px rgba(124, 58, 237, 0.25),
    0 0 80px rgba(124, 58, 237, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* --- Brief Overlay --- */
.brief-overlay[hidden] {
  display: none !important;
}

.brief-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6rem 1.5rem 3rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.brief-overlay.visible {
  opacity: 1;
}

.brief-overlay-inner {
  max-width: 500px;
  width: 100%;
  text-align: center;
}

.brief-heading {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  margin-bottom: 0.75rem;
}

.brief-thankyou {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.brief-snapshot {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}

.brief-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(124, 58, 237, 0.2);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.brief-loading-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.brief-eyebrow {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--purple-bright);
  margin-bottom: 1.5rem;
}

.brief-card {
  padding: 1.25rem;
  border-radius: 12px;
  border-color: rgba(124, 58, 237, 0.2) !important;
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.08), rgba(0, 0, 0, 0.6)) !important;
  text-align: left;
}

.brief-card h3 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--purple-bright);
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

.brief-section {
  margin-bottom: 0.6rem;
}

.brief-section-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--purple-bright);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.brief-section p {
  font-size: 0.9rem;
  color: #bbb;
  line-height: 1.6;
}

.brief-back {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.7rem 2rem;
  border-radius: 8px;
  border: 1px solid rgba(124, 58, 237, 0.3);
  background: rgba(124, 58, 237, 0.1);
  color: var(--purple-bright);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.brief-back:hover {
  border-color: var(--purple);
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.4), 0 0 32px rgba(124, 58, 237, 0.2);
  color: #c4b5fd;
}

.brief-footer {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 1.5rem;
  line-height: 1.5;
}

.brief-result,
.brief-fallback {
  opacity: 0;
  animation: briefFadeIn 0.8s ease forwards;
}

@keyframes briefFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Brief section stagger */
.brief-stagger {
  opacity: 0;
  transform: translateY(14px);
  animation: briefItemIn 0.6s ease forwards;
}

@keyframes briefItemIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Music Toggle (fixed bottom-left) --- */
.music-toggle {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(124, 58, 237, 0.3);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--purple-bright);
  cursor: pointer;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
  animation: breathe-arrow 3s ease-in-out infinite;
}

.music-toggle svg {
  filter:
    drop-shadow(0 0 4px rgba(124, 58, 237, 0.5))
    drop-shadow(0 0 10px rgba(124, 58, 237, 0.25));
}

.music-toggle:hover {
  border-color: var(--purple);
  box-shadow:
    0 0 16px rgba(124, 58, 237, 0.5),
    0 0 32px rgba(124, 58, 237, 0.25);
}

/* Icon states */
.music-icon { display: none; }

/* Default: show music note */
.music-toggle .music-icon--note { display: block; }

/* Playing: show animated EQ, hide note */
.music-toggle.playing .music-icon--note { display: none; }
.music-toggle.playing .music-icon--eq { display: flex; }

/* Muted: show muted icon only */
.music-toggle.muted .music-icon--note { display: none; }
.music-toggle.muted .music-icon--eq { display: none; }
.music-toggle.muted .music-icon--muted { display: block; }

/* EQ Bars */
.music-icon--eq {
  align-items: flex-end;
  gap: 3px;
  height: 16px;
}

.eq-bar {
  display: block;
  width: 3px;
  border-radius: 1.5px;
  background: var(--purple-bright);
  height: 4px;
  filter:
    drop-shadow(0 0 4px rgba(124, 58, 237, 0.5))
    drop-shadow(0 0 10px rgba(124, 58, 237, 0.25));
}

/* Static bars before playing */
.music-toggle .eq-bar { height: 4px; }

/* Animate bars when playing */
.music-toggle.playing .eq-bar {
  animation: eq-bounce 1s ease-in-out infinite;
}

.music-toggle.playing .eq-bar:nth-child(1) { animation-duration: 0.8s; }
.music-toggle.playing .eq-bar:nth-child(2) { animation-duration: 1.1s; animation-delay: 0.1s; }
.music-toggle.playing .eq-bar:nth-child(3) { animation-duration: 0.9s; animation-delay: 0.2s; }
.music-toggle.playing .eq-bar:nth-child(4) { animation-duration: 1.0s; animation-delay: 0.05s; }

@keyframes eq-bounce {
  0%, 100% { height: 4px; }
  50%      { height: 16px; }
}

/* Glow pulse when playing */
.music-toggle.playing {
  animation: music-pulse 2s ease-in-out infinite;
}

@keyframes music-pulse {
  0%, 100% {
    box-shadow: 0 0 8px rgba(124, 58, 237, 0.2), 0 0 20px rgba(124, 58, 237, 0.08);
    border-color: rgba(124, 58, 237, 0.3);
  }
  50% {
    box-shadow: 0 0 14px rgba(124, 58, 237, 0.45), 0 0 28px rgba(124, 58, 237, 0.2);
    border-color: rgba(124, 58, 237, 0.5);
  }
}

/* --- Quick Contact Widget --- */
.quick-contact {
  position: fixed;
  right: 2rem;
  top: 100px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.quick-contact__toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(124, 58, 237, 0.3);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--purple-bright);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
  animation: quick-contact-pulse 3s ease-in-out infinite;
}

@keyframes quick-contact-pulse {
  0%, 100% {
    box-shadow: 0 0 8px rgba(124, 58, 237, 0.2), 0 0 20px rgba(124, 58, 237, 0.08);
    border-color: rgba(124, 58, 237, 0.3);
  }
  50% {
    box-shadow: 0 0 14px rgba(124, 58, 237, 0.45), 0 0 28px rgba(124, 58, 237, 0.2);
    border-color: rgba(124, 58, 237, 0.5);
  }
}

.quick-contact__toggle:hover {
  border-color: var(--purple);
  box-shadow:
    0 0 16px rgba(124, 58, 237, 0.5),
    0 0 32px rgba(124, 58, 237, 0.25);
}

.quick-contact__toggle svg {
  filter:
    drop-shadow(0 0 4px rgba(124, 58, 237, 0.5))
    drop-shadow(0 0 10px rgba(124, 58, 237, 0.25));
}

.quick-contact__icon--close { display: none; }
.quick-contact.open .quick-contact__icon--chat { display: none; }
.quick-contact.open .quick-contact__icon--close { display: block; }

.quick-contact.open .quick-contact__toggle {
  animation: none;
  border-color: var(--purple);
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.5), 0 0 32px rgba(124, 58, 237, 0.25);
}

.quick-contact.scrolled-past {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

@media (min-width: 769px) {
  .quick-contact.scrolled-past {
    opacity: 1;
    pointer-events: auto;
  }
}

.quick-contact__panel {
  position: absolute;
  top: 52px;
  right: 0;
  min-width: 260px;
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid rgba(124, 58, 237, 0.2);
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(124, 58, 237, 0.1);
  opacity: 0;
  transform: translateY(-8px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.quick-contact.open .quick-contact__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.quick-contact__heading {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fafafa;
  margin-bottom: 0.75rem;
}

.quick-contact__link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  font-size: 0.85rem;
  color: var(--purple-bright);
  text-decoration: none;
  transition: color 0.2s ease;
}

.quick-contact__link:hover {
  color: #c4b5fd;
}

.quick-contact__link svg {
  flex-shrink: 0;
  opacity: 0.7;
}

/* Back to top (intake version — fixed, cinematic style) */
.page-intake .back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem;
  border-radius: 50%;
  border: 1px solid rgba(124, 58, 237, 0.3);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--purple-bright);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  pointer-events: none;
  animation: breathe-arrow 3s ease-in-out infinite;
}

.page-intake .back-to-top svg {
  filter:
    drop-shadow(0 0 4px rgba(124, 58, 237, 0.5))
    drop-shadow(0 0 10px rgba(124, 58, 237, 0.25));
}

.page-intake .back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.page-intake .back-to-top:hover {
  border-color: var(--purple);
  box-shadow:
    0 0 16px rgba(124, 58, 237, 0.5),
    0 0 32px rgba(124, 58, 237, 0.25);
  transform: translateY(-2px);
}

@keyframes breathe-arrow {
  0%, 100% { box-shadow: 0 0 8px rgba(124, 58, 237, 0.2), 0 0 20px rgba(124, 58, 237, 0.08); }
  50% { box-shadow: 0 0 14px rgba(124, 58, 237, 0.4), 0 0 28px rgba(124, 58, 237, 0.15); }
}

/* --- Cursor Spotlight (opening section) --- */
.cursor-spotlight {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(124, 58, 237, 0.09) 0%,
    rgba(201, 168, 76, 0.04) 30%,
    transparent 70%
  );
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.opening:hover .cursor-spotlight {
  opacity: 1;
}

/* --- Phase Color Shift (ambient orbs respond to scroll phase) --- */
/* DREAM: purple dominant */
.ambient-orbs.phase-dream .orb-1 { opacity: 0.2; }
.ambient-orbs.phase-dream .orb-3 { opacity: 0.18; }
.ambient-orbs.phase-dream .orb-2 { opacity: 0.06; }
.ambient-orbs.phase-dream .orb-4 { opacity: 0.05; }

/* CREATE: balanced purple + gold */
.ambient-orbs.phase-create .orb-1 { opacity: 0.14; }
.ambient-orbs.phase-create .orb-3 { opacity: 0.14; }
.ambient-orbs.phase-create .orb-2 { opacity: 0.14; }
.ambient-orbs.phase-create .orb-4 { opacity: 0.12; }

/* IMPACT: gold dominant */
.ambient-orbs.phase-impact .orb-1 { opacity: 0.06; }
.ambient-orbs.phase-impact .orb-3 { opacity: 0.08; }
.ambient-orbs.phase-impact .orb-2 { opacity: 0.2; }
.ambient-orbs.phase-impact .orb-4 { opacity: 0.2; }

/* --- Selection Ripple --- */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.35) 0%, transparent 70%);
  transform: scale(0);
  animation: ripple-expand 0.6s ease-out forwards;
  pointer-events: none;
}

@keyframes ripple-expand {
  to {
    transform: scale(1);
    opacity: 0;
  }
}

/* --- Brief Typewriter --- */
.brief-typewriter {
  display: inline;
  border-right: 2px solid var(--purple-bright);
  animation: blink-cursor 0.7s step-end infinite;
}

.brief-typewriter.done {
  border-right: none;
  animation: none;
}

@keyframes blink-cursor {
  0%, 100% { border-color: var(--purple-bright); }
  50% { border-color: transparent; }
}

.brief-stagger-waiting {
  opacity: 0;
  transform: translateY(14px);
}

.brief-stagger-waiting.reveal {
  animation: briefItemIn 0.6s ease forwards;
}

/* --- Shake --- */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

.shake { animation: shake 0.4s ease; }

/* --- Mobile Menu Override (solid background, hide form content) --- */
@media (max-width: 768px) {
  .page-intake .nav__links {
    background: rgba(0, 0, 0, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  body.page-intake.menu-open .opening,
  body.page-intake.menu-open main,
  body.page-intake.menu-open .sticky-header,
  body.page-intake.menu-open .grain,
  body.page-intake.menu-open .ambient-orbs,
  body.page-intake.menu-open .music-toggle,
  body.page-intake.menu-open .quick-contact,
  body.page-intake.menu-open .back-to-top,
  body.page-intake.menu-open .brief-overlay {
    opacity: 0;
    transition: opacity 0.2s ease;
  }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  main { padding: 0 1rem 6rem; }

  /* Performance: reduce GPU-heavy effects on mobile */
  .card.glass {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    will-change: transform;
  }

  .tag {
    will-change: transform;
  }

  /* Simplify orbs — static, no animation */
  .orb {
    animation: none !important;
  }

  /* Lighten the grain */
  .grain {
    opacity: 0.015;
  }

  /* Reduce blur on sticky header */
  .sticky-header {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .q-block {
    min-height: auto;
    padding: 4rem 0 3rem;
  }

  .q-block.submit-block {
    min-height: 100vh;
  }

  .card-grid { grid-template-columns: 1fr; }

  .header-inner { gap: 0.75rem; }
  .header-badge { width: 32px; height: 32px; }
  .phase-label { font-size: 0.7rem; padding: 0.2rem 0.45rem; }
  .phase-divider { margin: 0 0.1rem; }

  .opening-logo { width: 90px; height: 90px; }
  .phase-reveal { gap: 1.25rem; }
  .phase-reveal-word { font-size: clamp(1.2rem, 4vw, 1.6rem); }

  .phase-intro { padding: 2rem 0 1.5rem; margin-top: 10vh; }
  .phase-intro-card::before,
  .phase-intro-card::after { width: 40px; }

  .brief-card { padding: 1rem; }
  .brief-section p { font-size: 0.8rem; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .grain, .ambient-orbs { display: none; }
  .q-inner { --fade: 1 !important; --shift: 0px !important; }
  .opening-logo, .opening-headline, .opening-sub,
  .phase-reveal-word, .scroll-cue, .tag { opacity: 1 !important; transform: none !important; }
  .headline-line { -webkit-mask-image: none !important; mask-image: none !important; }
}

/* --- Focus Visible --- */
.card:focus-visible,
.tag:focus-visible,
.submit-btn:focus-visible,
.expand-toggle:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}
