/* ============================================
   BHVD.CO — Design System
   Near-black atmosphere. Blue luminosity.
   Restrained left-aligned typography.
   ============================================ */

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

:root {
  /* Palette — derived from the Phase 1 blue form */
  --black: #08080c;
  --bg: #0a0a10;
  --bg-surface: #0e0e16;
  --border: rgba(255,255,255,0.06);

  --blue-bright: #2EB5F0;
  --blue-mid: #1A8EC8;
  --blue-deep: #0E5A8A;
  --blue-glow: rgba(46,181,240,0.08);
  --blue-glow-strong: rgba(46,181,240,0.15);

  /* Text — accessible contrast values (WCAG AA on #08080c) */
  --text-primary: rgba(232,228,220,0.92);
  --text-secondary: rgba(232,228,220,0.62);
  --text-tertiary: rgba(232,228,220,0.50);
  --text-accent: var(--blue-bright);

  /* Type */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;

  /* Space */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 48px;
  --space-xl: 80px;
  --space-2xl: 140px;

  /* Layout */
  --max-w: 1200px;
  --max-w-narrow: 680px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--black);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--text-primary); }
a:focus-visible {
  outline: 2px solid var(--blue-bright);
  outline-offset: 4px;
  border-radius: 2px;
}

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

/* --- Navigation --- */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 16px 40px;
  height: 64px;
  background: rgba(8,8,12,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}
#nav.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Logo — absolutely centered in the nav */
.nav-mark {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
}

.nav-logo {
  height: 36px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 32px;
}
.nav-links a {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: rgba(232,228,220,0.88); }
.nav-links a:focus-visible {
  outline: 2px solid var(--blue-bright);
  outline-offset: 4px;
}

/* --- Sections --- */
.section {
  position: relative;
  padding: var(--space-2xl) 40px;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
}
.container--narrow {
  max-width: var(--max-w-narrow);
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: var(--space-lg);
}

/* --- SECTION 1: Hero --- */
.section--hero {
  position: relative;
  height: 160vh; /* reduced from 200vh — tighter scroll to content */
  padding: 0;
}

.hero-stage {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  overflow: hidden;
  background: var(--black);
}

/* Video — centered, sized to leave room for copy below */
.hero-video {
  width: auto;
  height: 50vh;
  max-width: 90vw;
  will-change: opacity;
  /* Hidden until loaded — JS removes this */
  opacity: 0;
  transition: opacity 0.6s ease;
}
.hero-video.loaded {
  opacity: 1;
}

/* Copy — centered below the video, always visible */
.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 560px;
  transition: opacity 0.4s ease;
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: var(--space-md);
}

.hero-sub {
  font-size: 18px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.hero-promise {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-primary);
}

/* --- SECTION 2: Statement --- */
.section--statement {
  background: var(--bg);
  padding: var(--space-xl) 40px var(--space-2xl);
  border-top: 1px solid var(--border);
}

.statement-heading {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.statement-body {
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 540px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease 0.15s, transform 0.8s ease 0.15s;
}

.statement.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- SECTION 3: Current Work --- */
.section--work {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}

.project {
  padding: var(--space-xl) 0;
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.project.visible {
  opacity: 1;
  transform: translateY(0);
}
.project:last-child { border-bottom: none; }

.project--flagship {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.project-image {
  aspect-ratio: 2/3;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.placeholder-image::after {
  content: attr(data-label);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
  text-align: center;
  padding: 20px;
}

.placeholder-form {
  position: absolute;
  width: 60px;
  height: 100px;
  background: linear-gradient(180deg, var(--blue-bright) 0%, var(--blue-deep) 100%);
  border-radius: 50% 50% 40% 40% / 30% 30% 50% 50%;
  opacity: 0.15;
  filter: blur(8px);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.project-title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.project-desc {
  font-size: 16px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 440px;
  margin-bottom: var(--space-md);
}

.project-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-accent) !important;
  letter-spacing: 0.02em;
  padding: 10px 0;
  border-bottom: 1px solid rgba(46,181,240,0.2);
  transition: border-color 0.2s ease, gap 0.2s ease;
}
.project-cta:hover {
  border-color: var(--blue-bright);
  gap: 12px;
}
.project-cta:focus-visible {
  outline: 2px solid var(--blue-bright);
  outline-offset: 4px;
}

.cta-arrow {
  font-size: 16px;
  transition: transform 0.2s ease;
}
.project-cta:hover .cta-arrow {
  transform: translateX(2px);
}

.project--editorial {
  padding-left: 0;
}

/* --- SECTION 4: Direction --- */
.section--direction {
  background: var(--bg);
  border-top: 1px solid var(--border);
  overflow: hidden;
}

.direction-lead {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.direction-body {
  font-size: 16px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 480px;
}

.direction-fragments {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 40%;
  pointer-events: none;
}

.fragment {
  position: absolute;
  border-radius: 50% 50% 40% 40% / 30% 30% 50% 50%;
  background: linear-gradient(180deg, var(--blue-bright) 0%, var(--blue-deep) 100%);
  filter: blur(40px);
  opacity: 0;
  transition: opacity 1.2s ease;
}
.fragment.visible { opacity: 1; }

.fragment--1 {
  width: 80px;
  height: 130px;
  top: 20%;
  right: 15%;
  opacity: 0.06;
}
.fragment--2 {
  width: 50px;
  height: 80px;
  top: 45%;
  right: 30%;
  opacity: 0.04;
  transform: rotate(15deg);
}
.fragment--3 {
  width: 35px;
  height: 55px;
  top: 70%;
  right: 10%;
  opacity: 0.03;
  transform: rotate(-10deg);
}

/* --- SECTION 5: Ethos --- */
.section--ethos {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}

.ethos-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.ethos-item {
  max-width: 520px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.ethos-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.ethos-principle {
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.ethos-note {
  font-size: 15px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- SECTION 6: Final Resolution --- */
.section--final {
  background: var(--black);
  border-top: 1px solid var(--border);
  padding: var(--space-2xl) 40px var(--space-xl);
  text-align: center;
}

.final-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.final-mark {
  width: 40px;
  height: auto;
  margin-bottom: var(--space-md);
  opacity: 0.6;
  filter: drop-shadow(0 0 12px rgba(46,181,240,0.2));
}

.final-mark img {
  width: 100%;
  height: auto;
}

.final-brand {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--text-primary);
}

.final-promise {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-primary);
}

.final-links {
  display: flex;
  gap: 32px;
  margin-top: var(--space-md);
}
.final-links a {
  font-size: 13px;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}
.final-links a:hover { color: var(--text-accent); }
.final-links a:focus-visible {
  outline: 2px solid var(--blue-bright);
  outline-offset: 4px;
}

.final-legal {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: var(--space-lg);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

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

/* --- Mobile --- */
@media (max-width: 768px) {
  .section { padding: var(--space-xl) 24px; }
  #nav { padding: 20px 24px; }
  .nav-links { gap: 20px; }
  .nav-links a { font-size: 12px; }

  .hero-copy { padding: 0 24px var(--space-lg); }

  .hero-video {
    height: auto;
    width: 75vw;
  }

  .section--hero { height: 180vh; }

  .project--flagship {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .direction-fragments { display: none; }

  .section--statement { padding: var(--space-xl) 24px; }
  .section--final { padding: var(--space-xl) 24px var(--space-lg); }
}

@media (max-width: 480px) {
  .hero-promise { font-size: 28px; }
  .project-title { font-size: 22px; }
  .direction-lead { font-size: 24px; }
  .ethos-principle { font-size: 20px; }
  .final-promise { font-size: 26px; }
}
