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

:root {
  --bg: #0B1A2B;
  --white-88: rgba(255,255,255,0.88);
  --white-42: rgba(255,255,255,0.42);
  --white-35: rgba(255,255,255,0.35);
  --white-22: rgba(255,255,255,0.22);
  --white-18: rgba(255,255,255,0.18);
  --white-12: rgba(255,255,255,0.12);
  --serif: 'Noto Serif JP', 'Cormorant Garamond', serif;
  --sans: 'Noto Sans JP', 'DM Sans', sans-serif;
  --brand-font: 'Cormorant Garamond', serif;
}

html { scroll-behavior: smooth; }

body {
  background: radial-gradient(
    circle at 50% 30%,
    #11263f 0%,
    #0b1a2b 60%,
    #08121d 100%
  );
  color: var(--white-88);
  font-family: var(--sans);
  height: auto;
  overflow-x: hidden;
}

/* ── Canvas ───────────────────────────────────────────────────── */
#field-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
}

/* ── Progress Rail ────────────────────────────────────────────── */
#progress-rail {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100;
}

.tick {
  width: 2px;
  height: 10px;
  background: var(--white-22);
  transition: height 0.3s, background 0.3s;
}

.tick.active {
  height: 18px;
  background: var(--white-88);
}

.tick.past {
  background: var(--white-35);
}

/* ── Hero (sticky container) ──────────────────────────────────── */
#hero {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  z-index: 3;
}

/* ── Nav ──────────────────────────────────────────────────────── */
#nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 52px;
  z-index: 50;
  opacity: 0.3;
}

.nav-brand {
  font-family: var(--brand-font);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--white-88);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 36px;
}

.nav-links li {
  font-family: var(--sans);
  font-size: 11px;
  font-variant: small-caps;
  letter-spacing: 0.14em;
  color: var(--white-42);
  cursor: pointer;
}

.nav-links li a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.25s;
}

.nav-links li a:hover {
  opacity: 0.75;
}

/* ── Scenes (all stacked, absolutely positioned) ─────────────── */
.scene {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
}

/* ── Scene 1: Intro ───────────────────────────────────────────── */
#scene-intro {
  opacity: 1;
  flex-direction: column;
  gap: 0;
}

.intro-headline {
  text-align: center;
}

.intro-line-1 {
  font-family: var(--brand-font);
  font-size: clamp(36px, 5.5vw, 70px);
  font-weight: 700;
  color: var(--white-88);
  line-height: 1.1;
  letter-spacing: 0.08em;
}

.intro-line-2 {
  font-family: var(--brand-font);
  font-size: clamp(26px, 3.8vw, 50px);
  font-weight: 300;
  font-style: italic;
  color: var(--white-88);
  margin-left: 2em;
  line-height: 1.1;
}

.scroll-hint {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: var(--white-35);
}

.scroll-label {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--white-35);
  text-transform: uppercase;
}

/* ── Section Counter ──────────────────────────────────────────── */
.section-counter {
  position: absolute;
  top: 52px;
  left: 52px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--white-22);
  opacity: 0;
}

/* ── Scene 2: Lock ────────────────────────────────────────────── */
#scene-lock {
  flex-direction: column;
}

.lock-word {
  font-family: var(--brand-font);
  font-size: clamp(80px, 11vw, 130px);
  font-weight: 600;
  color: var(--white-88);
  letter-spacing: 0.38em;
  transform: scaleX(0.9);
  transform-origin: center;
  will-change: transform, letter-spacing;
}

/* ── Scene 3: Hero ────────────────────────────────────────────── */
#scene-hero {
  opacity: 0;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 52px 80px;
}

.hero-left {
  flex: 1;
  opacity: 0;
  transform: translateY(20px);
}

.hero-line-1 {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  color: var(--white-88);
  line-height: 1.1;
}

.hero-line-2 {
  font-family: var(--serif);
  font-size: clamp(24px, 3.2vw, 42px);
  font-weight: 300;
  font-style: italic;
  color: rgba(255,255,255,0.42);
  margin-left: 1.5em;
  margin-top: 4px;
  line-height: 1.1;
}

.hero-right {
  width: 320px;
  flex-shrink: 0;
  opacity: 0;
  transform: translateY(20px);
}

.hero-rule {
  width: 100%;
  height: 1px;
  background: var(--white-22);
  margin-bottom: 20px;
}

.hero-body {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.8;
  color: var(--white-35);
  font-weight: 300;
  margin-bottom: 28px;
}

.hero-cta {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--white-88);
  text-decoration: none;
  border-bottom: 1px solid var(--white-42);
  padding-bottom: 2px;
  pointer-events: all;
}
/* ── Hero Video ───────────────────────────────────────────────── */
#hero-video-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  filter:
    saturate(0.45)
    hue-rotate(160deg)
    brightness(0.38)
    contrast(1.15);
}

#hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% center;
  opacity: 0;
  will-change: opacity;
}

#hero-video-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 30% 50%,
      transparent 30%,
      rgba(11, 26, 43, 0.65) 70%,
      rgba(11, 26, 43, 0.95) 100%);
  pointer-events: none;
}

/* ── Spacetime Canvas ─────────────────────────────────────────── */
#spacetime-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 2;
  opacity: 1;
}

/* ── Hero Track (scroll space for GSAP animations) ────────────── */
#hero-track {
  position: relative;
  height: 350vh;
}

/* ── Fade-in (Intersection Observer) ─────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity  0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
.fade-in.delay-1 { transition-delay: 0.12s; }
.fade-in.delay-2 { transition-delay: 0.24s; }
.fade-in.delay-3 { transition-delay: 0.36s; }

/* ── Content Sections (shared) ────────────────────────────────── */
.content-section {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  padding: 120px 52px;
  background: #0B1A2B;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--sans);
  font-size: 10px;
  font-variant: small-caps;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.22);
  margin-bottom: 40px;
}

.section-heading {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 600;
  color: rgba(255,255,255,0.88);
  line-height: 1.15;
}

.section-heading em {
  font-style: italic;
  font-weight: 300;
}

.body-text {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.9;
  color: rgba(255,255,255,0.68);
  font-weight: 300;
}

.body-text + .body-text { margin-top: 18px; }

/* ── Purpose ──────────────────────────────────────────────────── */
.purpose-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  margin-top: 40px;
  align-items: start;
}

.pillars {
  margin-top: 48px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.pillar {
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-family: var(--sans);
  font-size: 11px;
  font-variant: small-caps;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.35);
}

/* ── Works ────────────────────────────────────────────────────── */
.works-subtitle {
  font-family: var(--sans);
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  margin-top: 8px;
  margin-bottom: 0;
}

.works-subtitle a {
  color: rgba(201,168,76,0.75);
  text-decoration: none;
  border-bottom: 1px solid rgba(201,168,76,0.3);
  padding-bottom: 1px;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.work-cell {
  aspect-ratio: 1;
  border: 1px solid rgba(201,168,76,0.22);
  background: rgba(8,18,29,0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.work-cell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(201,168,76,0.04) 0%, transparent 60%);
}

.work-coming-line {
  width: 24px;
  height: 1px;
  background: rgba(201,168,76,0.30);
}

.work-coming-label {
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.22em;
  color: rgba(201,168,76,0.45);
  font-variant: small-caps;
}

.works-cta {
  display: inline-block;
  margin-top: 36px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.22);
  padding: 12px 28px;
  transition: border-color 0.3s, color 0.3s;
}

.works-cta:hover {
  border-color: rgba(255,255,255,0.55);
  color: #fff;
}

/* ── Projects ─────────────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.project-card {
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(8,18,29,0.5);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(8,18,29,0.65) 100%);
}

.project-tag {
  font-family: var(--sans);
  font-size: 8px;
  font-variant: small-caps;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.25);
  position: relative;
  z-index: 1;
  margin-bottom: 4px;
}

.project-title {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.40);
  position: relative;
  z-index: 1;
}

/* ── Team ─────────────────────────────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px;
  margin-top: 56px;
}

.team-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.team-photo {
  width: 76px;
  height: 76px;
  border: 1px solid rgba(201,168,76,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(201,168,76,0.65);
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  margin-bottom: 4px;
}

.team-role {
  font-family: var(--sans);
  font-size: 10px;
  font-variant: small-caps;
  letter-spacing: 0.16em;
  color: rgba(255,255,255,0.30);
}

.team-name {
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 600;
  color: rgba(255,255,255,0.88);
  line-height: 1.2;
}

.team-rule {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.10);
  margin: 0;
}

.team-bio {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.9;
  color: rgba(255,255,255,0.60);
  font-weight: 300;
}

/* ── Footer ───────────────────────────────────────────────────── */
#footer {
  position: relative;
  z-index: 10;
  background: #08121d;
  padding: 96px 52px 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.footer-brand {
  font-family: var(--brand-font);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: rgba(255,255,255,0.88);
}

.footer-tagline {
  font-family: var(--sans);
  font-size: 13px;
  color: rgba(255,255,255,0.38);
  letter-spacing: 0.06em;
  font-weight: 300;
}

.footer-links {
  display: flex;
  gap: 36px;
  margin-top: 8px;
}

.footer-links a {
  font-family: var(--sans);
  font-size: 12px;
  color: rgba(255,255,255,0.38);
  text-decoration: none;
  letter-spacing: 0.08em;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  padding-bottom: 2px;
  transition: color 0.3s;
}

.footer-links a:hover { color: rgba(255,255,255,0.75); }

.footer-copy {
  font-family: var(--sans);
  font-size: 11px;
  color: rgba(255,255,255,0.15);
  letter-spacing: 0.08em;
  margin-top: 12px;
}

/* ── Section backgrounds & dividers ──────────────────────────── */
#purpose {
  background: #0B1A2B;
  border-top: 1px solid rgba(201,168,76,0.20);
}

#works {
  background: #060f1a;
  border-top: 1px solid rgba(201,168,76,0.20);
}

#projects {
  background: #0B1A2B;
  border-top: 1px solid rgba(201,168,76,0.20);
}

#team {
  background: #060f1a;
  border-top: 1px solid rgba(201,168,76,0.20);
}

/* ── Mobile ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Nav */
  #nav          { padding: 20px 24px; }
  .nav-links    { gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
  .nav-links li { font-size: 10px; }

  /* Hero scenes */
  .lock-word { font-size: clamp(32px, 9vw, 80px); }

  #scene-hero {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 0 24px 72px;
    gap: 24px;
  }

  .hero-left  { flex: none; width: 100%; }
  .hero-right { width: 100%; }

  .intro-line-2 { margin-left: 0.5em; }

  /* Content sections */
  .content-section { padding: 72px 24px; }
  .purpose-layout  { grid-template-columns: 1fr; gap: 40px; }
  .works-grid      { grid-template-columns: repeat(2, 1fr); }
  .projects-grid   { grid-template-columns: 1fr; }
  .team-grid       { grid-template-columns: 1fr; gap: 48px; }

  /* Footer */
  #footer         { padding: 64px 24px 48px; }
  .footer-links   { gap: 20px; flex-wrap: wrap; justify-content: center; }
}