/* ============================================================
   ACCESS — A Digital Architectural Universe
   A single continuous 3D corridor. Scroll is camera-flight.
   ============================================================ */

:root {
  --void:        #000000;
  --ink:         #07080a;
  --graphite:    #111316;
  --mist:        #1d2025;
  --fog:         #2a2e35;
  --silver:      #a8a59c;
  --platinum:    #e8e6e0;
  --bone:        #f4f1e8;
  --silver-dim:  rgba(232, 230, 224, 0.55);
  --silver-fad:  rgba(232, 230, 224, 0.18);
  --silver-edge: rgba(232, 230, 224, 0.08);
  --copper:      #b89a7a;
  --copper-warm: #d4b08a;
  --teal-cool:   #6b8e93;

  --display: 'Bodoni Moda', 'Bodoni 72', Didot, serif;
  --serif:   'Instrument Serif', 'Bodoni Moda', serif;
  --mono:    'DM Mono', ui-monospace, monospace;
  --sans:    'DM Sans', system-ui, -apple-system, sans-serif;

  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft:  cubic-bezier(0.65, 0, 0.35, 1);
  --ease-glide: cubic-bezier(0.25, 1, 0.5, 1);
}

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

html {
  background: var(--void);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--void);
  color: var(--bone);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.55;
  cursor: none;
  overflow-x: hidden;
  /* Total scroll height — sets scroll-driven scene length */
  min-height: 1300vh;
}
@media (max-width: 900px) { body { cursor: auto; min-height: 800vh; } }

::selection { background: var(--bone); color: var(--void); }

/* Fine grain across the universe */
.grain {
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.91 0 0 0 0 0.89 0 0 0 0 0.84 0 0 0 0.4 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.07;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 9000;
}

/* ============================================================
   CUSTOM CURSOR — a thin ring, label appears on hover
   ============================================================ */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 28px; height: 28px;
  border: 1.5px solid var(--bone);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9500;
  transform: translate(-50%, -50%);
  background: rgba(232, 230, 224, 0.04);
  box-shadow:
    0 0 0 1px rgba(7, 8, 10, 0.55),
    0 0 14px rgba(212, 176, 138, 0.35),
    0 0 30px rgba(7, 8, 10, 0.4);
  transition: width 0.5s var(--ease-out), height 0.5s var(--ease-out),
              border-color 0.4s, background 0.4s, opacity 0.3s;
  will-change: transform;
  display: grid; place-items: center;
}
.cursor::after {
  /* Center dot so the cursor always has a visible focal point */
  content: '';
  position: absolute;
  width: 4px; height: 4px;
  background: var(--copper-warm);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(212, 176, 138, 0.8);
}
body.day .cursor {
  border-color: var(--bone);
  box-shadow:
    0 0 0 1px rgba(232, 226, 210, 0.6),
    0 0 14px rgba(110, 74, 38, 0.35);
}
body.day .cursor::after { background: var(--copper); box-shadow: 0 0 6px rgba(110, 74, 38, 0.7); }
.cursor-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bone);
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.3s;
  text-shadow: 0 0 8px rgba(7, 8, 10, 0.85);
}
.cursor.expand {
  width: 84px; height: 84px;
  border-color: var(--copper-warm);
  background: rgba(7, 8, 10, 0.55);
}
.cursor.expand::after { display: none; }
.cursor.expand .cursor-label { opacity: 1; }
.cursor.dot {
  width: 8px; height: 8px;
  background: var(--copper-warm);
  border-color: var(--copper-warm);
}
.cursor.dot::after { display: none; }
@media (max-width: 900px) { .cursor { display: none; } }

/* ============================================================
   THREE.JS CANVAS — fixed beneath everything
   ============================================================ */
#scene-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
}

/* ============================================================
   LOADER
   ============================================================ */
.loader {
  position: fixed; inset: 0;
  background: var(--void);
  z-index: 10000;
  display: grid;
  place-items: center;
  transition: opacity 1s var(--ease-out), visibility 1s;
}
.loader.gone { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; position: relative; }
.loader-circle {
  width: 84px; height: 84px;
  margin: 0 auto 36px;
  border: 1px solid var(--silver-fad);
  border-radius: 50%;
  position: relative;
}
.loader-circle::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: var(--bone);
  animation: spin 1.4s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-circle::after {
  content: '';
  position: absolute;
  inset: 50%;
  width: 4px; height: 4px;
  background: var(--bone);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.loader-text {
  font-family: var(--display);
  font-weight: 300;
  font-size: 22px;
  letter-spacing: 0.32em;
  color: var(--bone);
}
.loader-meta {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--silver-dim);
  display: flex; justify-content: center; gap: 18px;
}
.loader-meta .pct { color: var(--bone); min-width: 32px; text-align: right; }

/* ============================================================
   FLOATING UI — NAV / CHAPTER / SCROLL
   ============================================================ */
.ui {
  position: fixed;
  z-index: 100;
  pointer-events: none;
}
.ui > * { pointer-events: auto; }

/* TOP NAV */
.nav {
  top: 0; left: 0; right: 0;
  padding: 22px 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  mix-blend-mode: difference;
  color: var(--bone);
}
@media (max-width: 600px) { .nav { padding: 16px 18px; } }
.nav-mark {
  display: flex; gap: 12px; align-items: center;
  text-decoration: none;
  color: inherit;
}
.nav-mark svg { width: 20px; height: 20px; }
.nav-mark-text {
  font-family: var(--display);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.36em;
  line-height: 1;
}
.nav-mark-text .it {
  display: block;
  font-style: italic;
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--silver-dim);
  margin-top: 4px;
  text-transform: lowercase;
}

.nav-coords {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--silver-dim);
  text-transform: uppercase;
  text-align: right;
  line-height: 1.7;
}
.nav-coords .now {
  color: var(--bone);
  display: block;
}

@media (max-width: 700px) { .nav { padding: 16px 18px; } .nav-coords { font-size: 9px; } }

/* RIGHT RAIL — CHAPTER INDEX */
.rail {
  top: 50%;
  right: 28px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: flex-end;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--silver-fad);
  text-transform: uppercase;
  mix-blend-mode: difference;
}
.rail-item {
  display: flex; gap: 14px; align-items: center;
  transition: color 0.6s var(--ease-out);
  position: relative;
}
.rail-item.active { color: var(--bone); }
.rail-item .num { min-width: 24px; text-align: right; opacity: 0.6; }
.rail-item.active .num { opacity: 1; }
.rail-item .name { opacity: 0.6; }
.rail-item.active .name { opacity: 1; }
.rail-item .bar {
  width: 28px; height: 1px;
  background: currentColor;
  opacity: 0.3;
  transition: width 0.6s var(--ease-out), opacity 0.4s;
}
.rail-item.active .bar { width: 60px; opacity: 1; background: var(--bone); }
@media (max-width: 900px) { .rail { display: none; } }

/* BOTTOM BAR — scroll progress + sound toggle */
.bottom {
  bottom: 24px; left: 0; right: 0;
  padding: 0 36px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  mix-blend-mode: difference;
  color: var(--bone);
}
@media (max-width: 700px) { .bottom { padding: 0 18px; bottom: 16px; } }

.scroll-prompt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--silver-dim);
  text-transform: uppercase;
  display: flex; align-items: center; gap: 14px;
}
.scroll-prompt .line {
  width: 48px; height: 1px;
  background: var(--silver-fad);
  position: relative; overflow: hidden;
}
.scroll-prompt .line::after {
  content: '';
  position: absolute; top: 0; left: -50%;
  width: 50%; height: 100%;
  background: var(--bone);
  animation: slide 2.4s ease-in-out infinite;
}
@keyframes slide {
  0% { left: -50%; }
  60% { left: 100%; }
  100% { left: 100%; }
}

.sound-toggle {
  display: inline-flex; gap: 12px; align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--silver-dim);
  text-transform: uppercase;
  background: none;
  border: 1px solid var(--silver-fad);
  border-radius: 100px;
  padding: 8px 16px;
  cursor: none;
  transition: color 0.4s, border-color 0.4s;
}
.sound-toggle:hover { color: var(--bone); border-color: var(--bone); }
.sound-toggle .bars { display: inline-flex; gap: 2px; align-items: end; height: 10px; }
.sound-toggle .bars span {
  width: 2px;
  background: currentColor;
  animation: pulse 1.2s ease-in-out infinite;
}
.sound-toggle .bars span:nth-child(1) { height: 60%; animation-delay: 0s; }
.sound-toggle .bars span:nth-child(2) { height: 100%; animation-delay: 0.2s; }
.sound-toggle .bars span:nth-child(3) { height: 40%; animation-delay: 0.4s; }
.sound-toggle.muted .bars span { animation-play-state: paused; opacity: 0.3; }
@keyframes pulse { 0%, 100% { transform: scaleY(0.4); } 50% { transform: scaleY(1); } }

/* PROGRESS RING in nav */
.progress {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--silver-dim);
  text-transform: uppercase;
  display: flex; align-items: center; gap: 18px;
  mix-blend-mode: difference;
  pointer-events: none;
}
.progress-track {
  width: 220px; height: 1px;
  background: var(--silver-fad);
  position: relative;
}
.progress-fill {
  position: absolute; left: 0; top: 0;
  height: 100%;
  width: 0%;
  background: var(--bone);
  transition: width 0.15s linear;
}
@media (max-width: 700px) { .progress { top: 60px; } .progress-track { width: 120px; } }

/* ============================================================
   SCENE OVERLAY CONTENT
   ============================================================ */
.scenes {
  position: relative;
  z-index: 10;
  /* The total height is set on body to define scroll length */
}

.scene {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  pointer-events: none;
}
.scene > * { pointer-events: auto; }

/* Centered horizontal padding */
.scene-inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 60px;
}
@media (max-width: 768px) { .scene-inner { padding: 0 24px; } }

/* === Scene I — Idea === */
.s-idea {
  height: 130vh;
  align-items: center;
  justify-content: center;
}
.s-idea-text {
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(28px, 4.4vw, 64px);
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--bone);
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}
.s-idea-text .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  animation: ideaFade 1.4s var(--ease-out) forwards;
}
@keyframes ideaFade { to { opacity: 1; transform: translateY(0); } }
.s-idea-meta {
  margin-top: 60px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.4em;
  color: var(--silver-dim);
  text-transform: uppercase;
}

/* === Scene II — Blueprint === */
.s-blueprint {
  height: 100vh;
}
.s-blueprint-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
@media (max-width: 900px) { .s-blueprint-grid { grid-template-columns: 1fr; gap: 40px; } }
.s-blueprint-text h2 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(36px, 5.6vw, 84px);
  line-height: 0.96;
  letter-spacing: -0.02em;
  color: var(--bone);
}
.s-blueprint-text h2 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  color: var(--silver);
}
.s-blueprint-text p {
  margin-top: 32px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--silver-dim);
  max-width: 460px;
}
.s-blueprint-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--copper-warm);
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 12px;
}
.s-blueprint-tag::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--copper-warm);
}

/* === Scene III, IV, V — World blocks === */
.world {
  height: 130vh;
  display: flex;
  align-items: center;
}
.world-frame {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 100px;
}
@media (max-width: 900px) { .world-frame { grid-template-columns: 1fr; gap: 40px; } }

.world-side-1 .world-content { grid-column: 1; }
.world-side-2 .world-content { grid-column: 2; }
@media (max-width: 900px) { .world-side-2 .world-content { grid-column: 1; } }

.world-num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 88px;
  line-height: 1;
  color: var(--silver);
  margin-bottom: 24px;
  display: block;
}
.world-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--copper-warm);
  margin-bottom: 28px;
  display: flex; align-items: center; gap: 12px;
}
.world-tag::before { content:''; width: 24px; height: 1px; background: currentColor; }

.world-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(38px, 5.4vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.025em;
  color: var(--bone);
  text-shadow:
    0 0 24px rgba(7, 8, 10, 0.92),
    0 0 60px rgba(7, 8, 10, 0.65);
}
.world-title .brand-prefix {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 0.32em;
  letter-spacing: 0.18em;
  color: var(--bone);
  text-transform: uppercase;
  margin-bottom: 6px;
  opacity: 0.82;
  text-shadow: 0 0 14px rgba(7, 8, 10, 0.9);
}
.world-title .brand-word {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  color: var(--copper-warm);
  line-height: 0.94;
  letter-spacing: -0.015em;
}
.world-title .it {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  display: block;
  font-size: 0.5em;
  color: var(--silver);
  margin-top: 14px;
  line-height: 1.3;
  text-shadow:
    0 0 18px rgba(7, 8, 10, 0.92),
    0 0 40px rgba(7, 8, 10, 0.55);
}
.world-desc {
  margin-top: 36px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--silver-dim);
  max-width: 440px;
  text-shadow:
    0 0 14px rgba(7, 8, 10, 0.95),
    0 0 36px rgba(7, 8, 10, 0.7);
}
/* Soft dark backdrop vignette behind the world-content column so text
   reads cleanly over the holographic wireframe without covering it */
.world-content {
  position: relative;
}
.world-content::before {
  content: '';
  position: absolute;
  inset: -56px -40px;
  background:
    radial-gradient(ellipse 75% 65% at 35% 50%,
      rgba(7, 8, 10, 0.55) 0%,
      rgba(7, 8, 10, 0.30) 50%,
      transparent 80%);
  z-index: -1;
  pointer-events: none;
}
.world-list {
  margin-top: 36px;
  list-style: none;
  display: grid; gap: 14px;
  max-width: 380px;
}
.world-list li {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--silver-edge);
  padding-top: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone);
}
.world-list li span:last-child { color: var(--silver-dim); }

/* Gateway CTA — link from universe vertical card to dedicated page */
.world-cta {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 44px;
  padding: 16px 28px;
  border: 1px solid var(--bone);
  background: rgba(7, 8, 10, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--bone);
  text-decoration: none;
  cursor: none;
  transition: all 0.5s var(--ease-out);
  white-space: nowrap;
}
.world-cta svg {
  width: 14px; height: 14px;
  transition: transform 0.5s var(--ease-out);
}
.world-cta:hover {
  background: var(--copper-warm);
  border-color: var(--copper-warm);
  color: var(--void);
  transform: translateY(-2px);
}
.world-cta:hover svg { transform: translateX(6px); }
@media (max-width: 700px) {
  .world-cta {
    font-size: 10px;
    padding: 16px 26px;
    margin-top: 32px;
    min-height: 48px;
    /* Wider tap target — Apple HIG minimum 44pt */
  }
}

/* === Projects scene === */
.s-projects {
  height: 220vh;
  display: block;
  padding-top: 20vh;
}
.proj-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 60px;
  margin-bottom: 100px;
}
@media (max-width: 900px) { .proj-header { grid-template-columns: 1fr; } }
.proj-header-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--copper-warm);
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 12px;
}
.proj-header-tag::before { content:''; width: 24px; height: 1px; background: currentColor; }
.proj-header h2 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(48px, 6.4vw, 108px);
  line-height: 0.94;
  letter-spacing: -0.025em;
  color: var(--bone);
}
.proj-header h2 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  color: var(--silver);
}
.proj-header p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--silver-dim);
  max-width: 380px;
  justify-self: end;
}

.proj-row {
  display: grid;
  grid-template-columns: 90px 1.5fr 1fr 0.8fr 60px;
  gap: 36px;
  align-items: center;
  padding: 28px 0;
  border-top: 1px solid var(--silver-edge);
  position: relative;
  cursor: none;
  transition: padding 0.6s var(--ease-out);
}
.proj-row:last-child { border-bottom: 1px solid var(--silver-edge); }
.proj-row::before {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: var(--bone);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s var(--ease-out);
}
.proj-row:hover::before { transform: scaleX(1); }
.proj-row:hover { padding: 40px 0; }

@media (max-width: 900px) {
  .proj-row { grid-template-columns: 60px 1fr; gap: 12px; }
  .proj-row > *:not(.proj-num):not(.proj-name) { grid-column: 2; }
}

.proj-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--silver-dim);
  transition: color 0.4s, transform 0.6s var(--ease-out);
}
.proj-row:hover .proj-num { color: var(--copper-warm); transform: translateX(4px); }

.proj-name {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(28px, 3.6vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--bone);
  transition: transform 0.6s var(--ease-out);
}
.proj-name em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  color: var(--silver);
}
.proj-row:hover .proj-name { transform: translateX(8px); }

.proj-loc, .proj-meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--silver-dim);
}
.proj-meta { text-align: right; }

.proj-arrow {
  width: 44px; height: 44px;
  border: 1px solid var(--silver-fad);
  border-radius: 50%;
  display: grid; place-items: center;
  transition: all 0.5s var(--ease-out);
  justify-self: end;
}
.proj-arrow svg {
  width: 12px; height: 12px;
  stroke: var(--bone);
  transition: transform 0.5s var(--ease-out), stroke 0.5s;
}
.proj-row:hover .proj-arrow {
  background: var(--bone);
  border-color: var(--bone);
}
.proj-row:hover .proj-arrow svg {
  stroke: var(--void);
  transform: rotate(-45deg);
}

/* === Horizon scene === */
.s-horizon {
  height: 130vh;
  align-items: center;
}
.horizon-content {
  text-align: center;
  width: 100%;
  position: relative;
}
.horizon-mega {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(56px, 13vw, 220px);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--bone);
  display: flex;
  flex-direction: column;
  gap: 0;
}
.horizon-mega .word { display: block; }
.horizon-mega .word em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  color: var(--silver);
}
.horizon-mega .stroke {
  -webkit-text-stroke: 1px var(--silver);
  color: transparent;
}
.horizon-meta {
  margin-top: 80px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 800px;
  margin-left: auto; margin-right: auto;
  border-top: 1px solid var(--silver-edge);
  padding-top: 40px;
}
@media (max-width: 700px) { .horizon-meta { grid-template-columns: 1fr; gap: 20px; } }
.horizon-meta-item {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--silver-dim);
  text-align: center;
}
.horizon-meta-item strong {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 24px;
  letter-spacing: -0.01em;
  color: var(--bone);
  text-transform: none;
  margin-top: 8px;
}
.horizon-meta-item a {
  color: inherit;
  text-decoration: none;
  cursor: none;
  transition: color 0.4s;
}
.horizon-meta-item a:hover strong { color: var(--copper-warm); }

.horizon-cta {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-top: 80px;
  padding: 22px 36px;
  background: var(--bone);
  color: var(--void);
  border: 0;
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-weight: 500;
  text-decoration: none;
  cursor: none;
  transition: transform 0.5s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.horizon-cta::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--copper-warm);
  transform: translateY(101%);
  transition: transform 0.6s var(--ease-out);
}
.horizon-cta span, .horizon-cta svg { position: relative; z-index: 1; }
.horizon-cta svg { width: 14px; height: 14px; transition: transform 0.4s var(--ease-out); }
.horizon-cta:hover { transform: translateY(-3px); }
.horizon-cta:hover::before { transform: translateY(0); }
.horizon-cta:hover svg { transform: rotate(-45deg); }

/* === Ecosystem inline mark — small architectural emblems === */
.world-emblem {
  margin-bottom: 32px;
  width: 60px; height: 60px;
  opacity: 0.65;
}
.world-emblem svg { width: 100%; height: 100%; }

/* === Scroll-driven reveals on overlays === */
.fade-target {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.4s var(--ease-out), transform 1.4s var(--ease-out);
}
.fade-target.in { opacity: 1; transform: translateY(0); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  position: relative;
  z-index: 10;
  background: var(--void);
  padding: 80px 60px 28px;
  border-top: 1px solid var(--silver-edge);
}
@media (max-width: 700px) { .footer { padding: 60px 24px 24px; } }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  max-width: 1400px;
  margin: 0 auto 60px;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; gap: 40px; } }

.footer-brand {
  font-family: var(--display);
  font-weight: 400;
  font-size: 18px;
  letter-spacing: 0.32em;
  color: var(--bone);
  display: flex; align-items: center; gap: 12px;
}
.footer-brand em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--silver-dim);
}
.footer-tag {
  margin-top: 18px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 28px;
  color: var(--copper-warm);
  letter-spacing: -0.01em;
}
.footer-h {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--silver-dim);
  margin-bottom: 20px;
}
.footer-link {
  display: block;
  color: var(--bone);
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 8px;
  transition: color 0.3s, transform 0.4s var(--ease-out);
  cursor: none;
}
.footer-link:hover { color: var(--copper-warm); transform: translateX(4px); }

.footer-rule {
  max-width: 1400px;
  margin: 0 auto;
  height: 1px;
  background: var(--silver-edge);
}
.footer-mark {
  max-width: 1400px;
  margin: 60px auto 40px;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(60px, 16vw, 240px);
  line-height: 0.85;
  letter-spacing: -0.04em;
  text-align: center;
  color: transparent;
  -webkit-text-stroke: 1px var(--silver-fad);
  user-select: none;
}
.footer-mark em {
  font-family: var(--serif);
  font-style: italic;
  -webkit-text-stroke: 1px rgba(184, 154, 122, 0.4);
}

.footer-base {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--silver-dim);
}
@media (max-width: 700px) { .footer-base { flex-direction: column; gap: 12px; text-align: center; } }
.footer-base .gold { color: var(--copper-warm); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   NEW — PROCESS STEPS (chapter 5)
   ============================================================ */
.s-process {
  height: 130vh;
  align-items: center;
}
.process-block {
  width: 100%;
}
.process-head {
  text-align: center;
  margin-bottom: 80px;
}
.process-head h2 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(48px, 7vw, 110px);
  line-height: 0.96;
  letter-spacing: -0.025em;
  color: var(--bone);
}
.process-head h2 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  color: var(--copper-warm);
}
.process-head .process-sub {
  margin-top: 18px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--silver-dim);
}
.process-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}
@media (max-width: 900px) { .process-steps { grid-template-columns: 1fr; gap: 32px; } }
.process-line {
  position: absolute;
  top: 32px;
  left: 16.66%;
  right: 16.66%;
  height: 1px;
  background: var(--silver-fad);
  z-index: 0;
}
@media (max-width: 900px) { .process-line { display: none; } }
.process-step {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 18px;
}
.process-dot {
  width: 64px; height: 64px;
  margin: 0 auto 28px;
  border: 1px solid var(--silver-fad);
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--void);
  position: relative;
  transition: border-color 0.6s, transform 0.8s var(--ease-out);
}
.process-step:hover .process-dot {
  border-color: var(--copper-warm);
  transform: scale(1.06);
}
.process-dot-num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 26px;
  color: var(--copper-warm);
}
.process-step .step-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--silver-dim);
  margin-bottom: 10px;
}
.process-step h3 {
  font-family: var(--display);
  font-weight: 300;
  font-size: 26px;
  color: var(--bone);
  margin-bottom: 14px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.process-step h3 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  color: var(--copper-warm);
}
.process-step p {
  font-size: 13px;
  line-height: 1.65;
  color: var(--silver-dim);
  max-width: 240px;
  margin: 0 auto;
}

/* ============================================================
   NEW — BRAND MARQUEE (inside Who We Served)
   ============================================================ */
.brands-block {
  margin-top: 120px;
  padding-top: 80px;
  border-top: 1px solid var(--silver-edge);
}
.brands-head {
  text-align: center;
  margin-bottom: 60px;
}
.brands-head .tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--copper-warm);
  margin-bottom: 22px;
  display: inline-flex; align-items: center; gap: 12px;
}
.brands-head .tag::before, .brands-head .tag::after {
  content: ''; width: 28px; height: 1px;
  background: var(--copper-warm);
}
.brands-head h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 1.25;
  color: var(--bone);
  max-width: 780px;
  margin: 0 auto;
}
.brands-head h3 em {
  font-style: italic;
  color: var(--copper-warm);
  font-family: var(--serif);
}
.brands-head h3 .stroke {
  -webkit-text-stroke: 1px var(--silver-dim);
  color: transparent;
  font-style: normal;
}
.brands-marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.brands-track {
  display: flex;
  width: max-content;
  animation: marquee 50s linear infinite;
  gap: 60px;
}
.brands-track:hover { animation-play-state: paused; }
.brand {
  flex-shrink: 0;
  height: 80px;
  display: flex; align-items: center;
  padding: 0 28px;
  border-left: 1px solid var(--silver-edge);
  font-family: var(--display);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--silver);
  white-space: nowrap;
  transition: color 0.4s;
}
.brand em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--copper-warm);
  margin-left: 6px;
}
.brand:hover { color: var(--bone); }
.brand img {
  max-height: 44px;
  max-width: 160px;
  object-fit: contain;
  filter: grayscale(1) brightness(1.4);
  opacity: 0.7;
  transition: filter 0.4s, opacity 0.4s;
}
.brand:hover img { filter: grayscale(0) brightness(1); opacity: 1; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============================================================
   NEW — IMAGE-SLOT INDICATOR (small badge bottom-right of each
   world that supports an uploadable hero image)
   ============================================================ */
.slot-indicator {
  margin-top: 28px;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--silver-dim);
  padding: 7px 14px;
  border: 1px dashed var(--silver-fad);
  border-radius: 100px;
  background: rgba(7, 8, 10, 0.4);
  backdrop-filter: blur(4px);
}
.slot-indicator::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--copper-warm);
  animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.4); }
}
.slot-indicator.filled { border-style: solid; }
.slot-indicator.filled::before { background: #4ad295; animation: none; }

/* ============================================================
   NEW — DAY-MODE VARIABLES (toggled by .day on <body>)
   ============================================================ */
body.day {
  --void:        #ece6d6;
  --ink:         #d4cdb8;
  --teal:        #c2bba4;
  --teal-mid:    #a09a85;
  --teal-glow:   #b89e6e;
  --char:        #2a261d;
  --mist:        #3a352a;
  --fog:         #50473a;
  --silver:      #4a4434;
  --silver-dim:  rgba(38, 32, 22, 0.62);
  --silver-fad:  rgba(38, 32, 22, 0.20);
  --silver-edge: rgba(38, 32, 22, 0.08);
  --bone:        #1a1612;
  --platinum:    #28231b;
  --copper:      #6e4a26;
  --copper-warm: #8a5b30;
  --teal-cool:   #4a6d72;
}
body.day::selection { background: var(--copper); color: var(--bone); }

/* ============================================================
   NEW — THEME TOGGLE BUTTON
   ============================================================ */
.theme-toggle {
  position: fixed;
  top: 28px;
  right: 36px;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 12px;
  background: rgba(15, 18, 22, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--silver-fad);
  border-radius: 100px;
  color: var(--bone);
  cursor: none;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  transition: border-color 0.4s, background 0.4s, transform 0.4s var(--ease-out);
  pointer-events: auto;
}
.theme-toggle:hover {
  border-color: var(--bone);
  background: rgba(15, 18, 22, 0.85);
  transform: translateY(-1px);
}
body.day .theme-toggle {
  background: rgba(248, 244, 232, 0.7);
  border-color: rgba(38, 32, 22, 0.25);
}
body.day .theme-toggle:hover {
  background: rgba(248, 244, 232, 0.95);
  border-color: var(--bone);
}
.theme-icon { width: 18px; height: 18px; display: grid; place-items: center; }
.theme-icon svg { width: 16px; height: 16px; }
.theme-icon-night { display: grid; }
.theme-icon-day   { display: none; }
body.day .theme-icon-night { display: none; }
body.day .theme-icon-day   { display: grid; }
.theme-label { color: var(--bone); }
@media (max-width: 900px) {
  .theme-toggle { top: 18px; right: 18px; padding: 8px 14px 8px 10px; }
}
@media (max-width: 600px) {
  .theme-toggle { padding: 7px 10px; gap: 6px; }
  .theme-label { display: none; }
}

/* ============================================================
   NEW — NAV LOGO IMAGE
   ============================================================ */
.nav-logo-img {
  height: 64px;
  width: auto;
  display: block;
  filter: brightness(1);
  transition: filter 0.4s, height 0.4s var(--ease-out);
}
body.day .nav-logo-img { filter: invert(1) brightness(0.15); }
@media (max-width: 900px) { .nav-logo-img { height: 52px; } }
@media (max-width: 600px) { .nav-logo-img { height: 42px; } }

/* ============================================================
   NEW — VERTICAL LOGO (replaces SVG emblems in Realty/Living/Catalyst)
   ============================================================ */
.world-logo {
  margin-bottom: 36px;
  height: 56px;
  width: auto;
  display: block;
  opacity: 0.9;
  transition: filter 0.4s;
}
body.day .world-logo { filter: invert(1) brightness(0.15); }
@media (max-width: 700px) { .world-logo { height: 44px; } }

/* ============================================================
   NEW — STATS BAR (after the three verticals)
   ============================================================ */
.s-stats {
  height: 70vh;
  align-items: center;
}
.stats-block { width: 100%; }
.stats-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--copper-warm);
  margin-bottom: 30px;
  display: inline-flex; align-items: center; gap: 12px;
  justify-content: center;
}
.stats-tag::before, .stats-tag::after {
  content: ''; width: 28px; height: 1px; background: var(--copper-warm);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--silver-edge);
  border-bottom: 1px solid var(--silver-edge);
  text-align: center;
}
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat {
  padding: 56px 24px;
  border-right: 1px solid var(--silver-edge);
  position: relative;
  transition: background 0.5s;
}
.stat:last-child { border-right: none; }
@media (max-width: 900px) {
  .stat:nth-child(2n) { border-right: none; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--silver-edge); }
}
.stat:hover { background: rgba(212, 176, 138, 0.04); }
.stat-num {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(54px, 7vw, 96px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--bone);
  display: flex; align-items: baseline; justify-content: center; gap: 4px;
}
.stat-num .plus {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.4em;
  color: var(--copper-warm);
  font-weight: 300;
}
.stat-label {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--silver-dim);
}

/* ============================================================
   NEW — HORIZONTAL PROJECTS SHOWCASE
   ============================================================ */
.s-served {
  height: auto;
  min-height: 130vh;
  padding: 18vh 0 12vh;
  display: block;
}
.served-head {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  align-items: end;
  gap: 60px;
  margin-bottom: 80px;
}
@media (max-width: 900px) { .served-head { grid-template-columns: 1fr; } }
.served-head .tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--copper-warm);
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 12px;
}
.served-head .tag::before { content: ''; width: 24px; height: 1px; background: var(--copper-warm); }
.served-head h2 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(48px, 6.4vw, 108px);
  line-height: 0.94;
  letter-spacing: -0.025em;
  color: var(--bone);
}
.served-head h2 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  color: var(--silver);
}
.served-head p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.5;
  color: var(--silver-dim);
  max-width: 380px;
  justify-self: end;
}
@media (max-width: 900px) { .served-head p { justify-self: start; } }

.h-scroll-wrap {
  position: relative;
  margin: 0 -48px;
  padding: 0 48px;
}
@media (max-width: 768px) { .h-scroll-wrap { margin: 0 -24px; padding: 0 24px; } }

.h-scroll {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--silver-fad) transparent;
}
.h-scroll::-webkit-scrollbar { height: 6px; }
.h-scroll::-webkit-scrollbar-track { background: transparent; }
.h-scroll::-webkit-scrollbar-thumb { background: var(--silver-fad); border-radius: 3px; }
.h-scroll::-webkit-scrollbar-thumb:hover { background: var(--copper-warm); }

.proj-card {
  flex: 0 0 auto;
  width: clamp(300px, 40vw, 520px);
  scroll-snap-align: start;
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: none;
  transition: transform 0.6s var(--ease-out);
}
.proj-card:hover { transform: translateY(-6px); }

.proj-card-img {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--char);
  border: 1px solid var(--silver-edge);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}
.proj-card-img::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(7,8,10,0.85) 100%);
  pointer-events: none;
  z-index: 1;
}
.proj-card-img-empty {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--silver-dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
.proj-card-img-empty::before {
  content: '';
  position: absolute;
  inset: 28px;
  border: 1px dashed var(--silver-fad);
}

.proj-card-meta {
  position: absolute;
  left: 24px; right: 24px; bottom: 22px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: end;
}
.proj-card-text .year {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--copper-warm);
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}
.proj-card-text .title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--bone);
  text-shadow: 0 4px 16px rgba(0,0,0,0.6);
}
.proj-card-text .title em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--copper-warm);
}
.proj-card-text .loc {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--silver-dim);
}
.proj-card-arrow {
  width: 38px; height: 38px;
  border: 1px solid var(--silver-fad);
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(7, 8, 10, 0.6);
  backdrop-filter: blur(6px);
  flex-shrink: 0;
  transition: all 0.4s var(--ease-out);
}
.proj-card:hover .proj-card-arrow {
  background: var(--copper-warm);
  border-color: var(--copper-warm);
}
.proj-card-arrow svg {
  width: 12px; height: 12px;
  stroke: var(--bone);
  transition: transform 0.4s var(--ease-out), stroke 0.4s;
}
.proj-card:hover .proj-card-arrow svg {
  stroke: var(--void);
  transform: rotate(-45deg);
}

.h-scroll-hint {
  display: flex; align-items: center; gap: 12px;
  margin-top: 30px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--silver-dim);
}
.h-scroll-hint .arrow {
  width: 28px; height: 1px;
  background: var(--silver-dim);
  position: relative;
}
.h-scroll-hint .arrow::after {
  content: '';
  position: absolute;
  right: 0; top: -3px;
  border-top: 1px solid var(--silver-dim);
  border-right: 1px solid var(--silver-dim);
  width: 6px; height: 6px;
  transform: rotate(45deg);
  transform-origin: right;
}

/* ============================================================
   NEW — TEAM SECTION (chapter 8)
   ============================================================ */
.s-team {
  height: 130vh;
  align-items: center;
}
.team-head { text-align: center; margin-bottom: 80px; }
.team-head .tag {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--copper-warm);
  margin-bottom: 24px;
}
.team-head .tag::before, .team-head .tag::after {
  content: ''; width: 28px; height: 1px; background: var(--copper-warm);
}
.team-head h2 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(40px, 6vw, 96px);
  line-height: 0.96;
  letter-spacing: -0.02em;
  color: var(--bone);
}
.team-head h2 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  color: var(--copper-warm);
}
.team-head p {
  margin-top: 22px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--silver-dim);
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 1100px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .team-grid { grid-template-columns: 1fr; } }
.team-card {
  position: relative;
  background: linear-gradient(180deg, rgba(20,22,26,0.6), rgba(8,10,12,0.4));
  border: 1px solid var(--silver-edge);
  padding: 24px 22px 28px;
  cursor: none;
  transition: border-color 0.5s, transform 0.6s var(--ease-out);
}
.team-card:hover {
  border-color: var(--copper-warm);
  transform: translateY(-4px);
}
.team-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--char);
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.team-photo::after {
  content: 'photo';
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--silver-dim);
  border: 1px dashed var(--silver-fad);
  margin: 16px;
}
.team-card[data-filled="true"] .team-photo::after { display: none; }
.team-num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--copper-warm);
  margin-bottom: 8px;
}
.team-name {
  font-family: var(--display);
  font-weight: 300;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--bone);
  line-height: 1.1;
  margin-bottom: 6px;
}
.team-name em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--copper-warm);
}
.team-bio {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  line-height: 1.5;
  color: var(--silver-dim);
  margin-top: 10px;
  max-width: 32ch;
  letter-spacing: 0.005em;
}
/* ============================================================
   MOBILE MENU
   ============================================================ */
.mobile-menu-trigger {
  display: none;
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 90;
  width: 44px;
  height: 44px;
  background: rgba(7, 10, 12, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(232, 230, 224, 0.18);
  border-radius: 4px;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.mobile-menu-trigger span {
  display: block;
  width: 18px;
  height: 1px;
  background: var(--bone);
  transition: all 0.3s var(--ease-out);
}
body.day .mobile-menu-trigger {
  background: rgba(236, 230, 214, 0.85);
  border-color: rgba(40, 42, 48, 0.3);
}
body.day .mobile-menu-trigger span { background: var(--char); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(5, 8, 7, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease-out), visibility 0.4s;
  overflow-y: auto;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
body.day .mobile-menu { background: rgba(236, 230, 214, 0.97); }

.mobile-menu-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid rgba(232, 230, 224, 0.18);
  border-radius: 4px;
  cursor: pointer;
  color: var(--bone);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-menu-close svg { width: 20px; height: 20px; }
body.day .mobile-menu-close { color: var(--char); border-color: rgba(40, 42, 48, 0.3); }

.mobile-menu-inner {
  padding: 80px 28px 40px;
  max-width: 460px;
  margin: 0 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mobile-menu-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--copper-warm);
  margin-bottom: 30px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s 0.2s, transform 0.5s 0.2s;
}
.mobile-menu.open .mobile-menu-label { opacity: 1; transform: translateY(0); }

.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.mobile-menu-nav a {
  display: block;
  padding: 18px 0;
  font-family: var(--display);
  font-weight: 300;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--bone);
  text-decoration: none;
  border-bottom: 1px solid rgba(232, 230, 224, 0.08);
  transition: color 0.3s, padding-left 0.3s var(--ease-out);
  opacity: 0;
  transform: translateY(12px);
}
.mobile-menu-nav a em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--copper-warm);
}
.mobile-menu.open .mobile-menu-nav a {
  opacity: 1;
  transform: translateY(0);
}
.mobile-menu.open .mobile-menu-nav a:nth-child(1) { transition: opacity 0.5s 0.30s, transform 0.5s 0.30s; }
.mobile-menu.open .mobile-menu-nav a:nth-child(2) { transition: opacity 0.5s 0.36s, transform 0.5s 0.36s; }
.mobile-menu.open .mobile-menu-nav a:nth-child(3) { transition: opacity 0.5s 0.42s, transform 0.5s 0.42s; }
.mobile-menu.open .mobile-menu-nav a:nth-child(4) { transition: opacity 0.5s 0.48s, transform 0.5s 0.48s; }
.mobile-menu.open .mobile-menu-nav a:nth-child(5) { transition: opacity 0.5s 0.54s, transform 0.5s 0.54s; }
.mobile-menu.open .mobile-menu-nav a:nth-child(6) { transition: opacity 0.5s 0.60s, transform 0.5s 0.60s; }
.mobile-menu.open .mobile-menu-nav a:nth-child(7) { transition: opacity 0.5s 0.66s, transform 0.5s 0.66s; }
.mobile-menu.open .mobile-menu-nav a:nth-child(8) { transition: opacity 0.5s 0.72s, transform 0.5s 0.72s; }
.mobile-menu.open .mobile-menu-nav a:nth-child(9) { transition: opacity 0.5s 0.78s, transform 0.5s 0.78s; }
.mobile-menu.open .mobile-menu-nav a:nth-child(10) { transition: opacity 0.5s 0.84s, transform 0.5s 0.84s; }

.mobile-menu-cta {
  margin-top: 24px;
  padding: 24px 0 !important;
  font-size: 18px !important;
  color: var(--copper-warm) !important;
  border-top: 1px solid rgba(212, 176, 138, 0.4) !important;
  border-bottom: 1px solid rgba(212, 176, 138, 0.4) !important;
}

.mobile-menu-foot {
  margin-top: 40px;
  padding-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid rgba(232, 230, 224, 0.08);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--silver-dim);
  opacity: 0;
  transition: opacity 0.5s 0.9s;
}
.mobile-menu.open .mobile-menu-foot { opacity: 1; }
.mobile-menu-foot a {
  color: var(--silver-dim);
  text-decoration: none;
  transition: color 0.3s;
}
.mobile-menu-foot a:hover { color: var(--bone); }
body.day .mobile-menu-nav a { color: var(--char); border-bottom-color: rgba(40, 42, 48, 0.15); }
body.day .mobile-menu-foot a { color: var(--char-soft); }
body.day .mobile-menu-foot { border-top-color: rgba(40, 42, 48, 0.15); }

/* Show hamburger only on mobile/tablet */
@media (max-width: 900px) {
  .mobile-menu-trigger { display: flex; }
  /* Hide theme toggle text on mobile — keep just the icon */
  .theme-toggle .theme-label { display: none; }
  .theme-toggle { right: 76px !important; }
}

/* ============================================================
   PROJECT RAIL — mobile dots + counter
   ============================================================ */
.proj-rail-dots {
  display: none;
  margin-top: 24px;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.proj-rail-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--silver-fad);
  transition: all 0.4s var(--ease-out);
}
.proj-rail-dot.active {
  background: var(--copper-warm);
  width: 24px;
  border-radius: 3px;
}
@media (max-width: 900px) {
  .proj-rail-dots { display: flex; }
  .h-scroll-hint { display: none; }
}

/* ============================================================
   MOBILE-FIRST RESHAPE — small screens get a stacked page
   layout instead of the long scroll-flight corridor.
   The 3D canvas still renders behind, but the heavy
   parallax-coupling and 1300vh body height are dropped.
   ============================================================ */
@media (max-width: 768px) {

  /* Body: keep scroll-driven flight, but with a shorter total height that
     fits a phone session (vs the long desktop 1300vh corridor). */
  body { min-height: 800vh; cursor: auto; font-size: 14px; }
  /* Loader scaled for mobile */
  .loader-text { font-size: clamp(48px, 14vw, 80px) !important; }
  .loader-meta { font-size: 9px !important; }
  /* Scenes can still be pinned (height: 100vh) on mobile — gives proper flight rhythm */

  /* Cursor: hardware cursor on mobile, hide custom one */
  .cursor { display: none; }

  /* Grain effect dimmer on mobile (battery) */
  .grain { opacity: 0.04; }

  /* === Top nav: single-row, logo left, toggle right === */
  .nav {
    padding: 14px 18px;
    align-items: center;
    gap: 10px;
  }
  .nav-coords, .nav-mark-text { display: none; }

  /* Hide the right rail (chapter index) on mobile entirely */
  .rail { display: none; }

  /* Hide top progress bar — we don't have a single long scroll anymore */
  .progress { display: none; }

  /* Bottom UI bar: keep sound toggle, simplify */
  .bottom {
    padding: 14px 18px;
    flex-direction: row;
    justify-content: flex-end;
  }
  .sound-toggle { font-size: 9px; padding: 6px 10px; }

  /* === Scene flow: stacked sections instead of pinned 100vh === */
  .scene {
    height: auto !important;
    min-height: auto;
    padding: 60px 0;
    align-items: stretch;
  }
  .scene-inner { padding: 0 20px; }

  /* Hero / Open scene */
  .s-idea { padding: 120px 0 80px; min-height: 80vh; }
  .s-idea-text {
    font-size: clamp(34px, 9vw, 52px) !important;
    line-height: 1.05;
    word-break: keep-all;
  }
  /* Stack each word on its own line on very small screens for impact */
  @media (max-width: 420px) {
    .s-idea-text { font-size: clamp(32px, 10vw, 44px) !important; }
  }
  .s-idea-meta { font-size: 9px; margin-top: 30px; }

  /* Vision / Blueprint scene: stack columns */
  .s-blueprint .s-blueprint-grid {
    grid-template-columns: 1fr !important;
    gap: 30px;
  }
  .s-blueprint h2 {
    font-size: clamp(34px, 8vw, 52px) !important;
    line-height: 1.05;
  }

  /* === Vertical sections (Reality / Living / Catalyst) === */
  .world {
    height: auto;
    min-height: auto;
    padding: 80px 0;
  }
  .world-frame {
    grid-template-columns: 1fr !important;
    gap: 30px;
  }
  .world-side-1 .world-content,
  .world-side-2 .world-content { grid-column: 1 !important; }
  .world-content::before {
    /* Simpler vignette on mobile */
    inset: -30px -20px;
    background: radial-gradient(ellipse 90% 70% at 50% 50%,
      rgba(7,8,10,0.65) 0%,
      rgba(7,8,10,0.35) 60%,
      transparent 90%);
  }
  .world-num {
    font-size: 60px;
    top: -20px; right: -8px;
  }
  .world-tag {
    font-size: 9px;
    margin-bottom: 18px;
    flex-wrap: wrap;
  }
  .world-title {
    font-size: clamp(34px, 8vw, 52px) !important;
  }
  .world-title .brand-prefix { font-size: 0.36em; }
  .world-title .it { font-size: 0.55em; margin-top: 10px; }
  .world-desc { font-size: 15px; line-height: 1.6; margin-top: 24px; }
  /* Bigger CTA on mobile so it's easy to tap */
  .world-cta { padding: 18px 28px !important; font-size: 11px !important; }
  /* Horizon mega text — more breath on mobile */
  .horizon-mega { font-size: clamp(56px, 16vw, 96px) !important; }
  .world-list { margin-top: 24px; max-width: 100%; }
  .world-list li { font-size: 12px; padding: 10px 0; }
  .slot-indicator { font-size: 8px; margin-top: 18px; }

  /* === Stats === */
  .s-stats { padding: 60px 0; min-height: auto; }
  .stats-block .stats-tag { font-size: 9px; }
  .stats-block h2 { font-size: clamp(28px, 7vw, 44px) !important; }
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .stat { padding: 32px 12px; }
  .stat-num { font-size: clamp(40px, 10vw, 60px) !important; }
  .stat-label { font-size: 9px; margin-top: 10px; letter-spacing: 0.24em; }

  /* === Process === */
  .s-process { padding: 60px 0; }
  .process-head { margin-bottom: 50px; }
  .process-head h2 { font-size: clamp(34px, 8vw, 52px) !important; }
  .process-head .process-sub { font-size: 16px; }
  .process-steps { grid-template-columns: 1fr !important; gap: 36px; }
  .process-line { display: none; }
  .process-step h3 { font-size: 22px; }
  .process-step p { font-size: 13px; max-width: 100%; }

  /* === Our Work / Served === */
  .s-served { padding: 60px 0; min-height: auto; }
  .served-head {
    grid-template-columns: 1fr !important;
    gap: 24px;
    margin-bottom: 40px;
  }
  .served-head h2 { font-size: clamp(36px, 9vw, 56px) !important; }
  .served-head p { justify-self: start !important; font-size: 14px; }

  /* Horizontal scroll — narrower cards, snap-aligned */
  .h-scroll-wrap { margin: 0 -20px; padding: 0 20px; }
  .h-scroll { gap: 16px; padding-bottom: 16px; }
  .proj-card {
    width: 78vw;
    max-width: 320px;
  }
  .proj-card-img { aspect-ratio: 4/5; }
  .proj-card-text .title { font-size: 22px; }
  .proj-card-text .year { font-size: 9px; }
  .proj-card-text .loc { font-size: 8px; }
  .proj-card-arrow { width: 32px; height: 32px; }

  .h-scroll-hint { font-size: 8px; margin-top: 20px; }

  /* Brands marquee — slightly tighter on mobile */
  .brands-block { margin-top: 60px; padding-top: 50px; }
  .brands-head { margin-bottom: 40px; }
  .brands-head h3 { font-size: clamp(20px, 5vw, 32px) !important; }
  .brands-track { gap: 32px; }
  .brand { font-size: 17px; padding: 0 18px; height: 60px; }

  /* === Team === */
  .s-team { padding: 60px 0; min-height: auto; }
  .team-head { margin-bottom: 50px; }
  .team-head h2 { font-size: clamp(30px, 7.5vw, 48px) !important; }
  .team-head p { font-size: 16px; }
  .team-grid { grid-template-columns: 1fr 1fr !important; gap: 14px; }
  .team-card { padding: 16px 14px 20px; }
  .team-name { font-size: 18px; }
  .team-bio { font-size: 11px; margin-top: 6px; }
  .team-num { font-size: 9px; }
  .team-role { font-size: 9px; letter-spacing: 0.18em; }

  /* === Contact / Horizon === */
  .s-horizon { padding: 80px 0 60px; min-height: auto; }
  .horizon-mega .word { font-size: clamp(40px, 10vw, 64px) !important; }
  .horizon-meta {
    grid-template-columns: 1fr !important;
    gap: 24px;
    text-align: left;
  }
  .horizon-meta-item span { font-size: 9px; }
  .horizon-meta-item strong, .horizon-meta-item a { font-size: 16px; }
  .horizon-cta { font-size: 11px; padding: 18px 28px; }

  /* === 3D canvas: keep but lighter on mobile === */
  /* The canvas is fixed-position and renders behind everything.
     The IIFE inside the JS adapts pixel-ratio for mobile devices. */
}

/* === Even smaller (< 480px) === */
@media (max-width: 480px) {
  .nav { padding: 12px 14px; }
  .nav-logo-img { height: 36px; }
  .scene-inner { padding: 0 16px; }
  .team-grid { grid-template-columns: 1fr !important; }
  .stats-grid .stat { padding: 26px 10px; }
}

/* === Touch device — smooth scroll snapping for project cards === */
@media (hover: none) and (pointer: coarse) {
  .h-scroll { scroll-snap-type: x mandatory; }
  .proj-card { scroll-snap-align: start; }
  /* Disable the cursor expand on touch */
  .cursor { display: none !important; }
  /* Bigger tap targets */
  .theme-toggle { min-height: 40px; }
  .sound-toggle { min-height: 40px; }
  a, button { min-height: 36px; }
  .proj-row, .proj-card { min-height: 60px; }
}
/* ============================================================================
   COMPREHENSIVE DAY-MODE TUNING
   The base palette flips automatically via body.day variables, but several
   visual treatments use hardcoded near-black for shadows, vignettes,
   gradients, and stroke effects. Those would create dark blobs on the cream
   background. This block re-tunes each one with warm tones that read
   correctly in day mode.
   ============================================================================ */
html.day { background: #ece6d6; }
body.day {
  background: #ece6d6;
}

/* Grain — invert (dark grain dots on cream instead of light dots on black) */
body.day .grain {
  filter: invert(1) hue-rotate(180deg);
  opacity: 0.10;
}

/* Cursor backdrop blur lifted */
body.day .cursor {
  background: rgba(232, 226, 210, 0.25);
}
body.day .cursor.expand {
  background: rgba(232, 226, 210, 0.85);
  border-color: var(--copper-warm);
}

/* Hero text stroke — visible on cream */
body.day .s-idea-text .stroke,
body.day .horizon-mega .stroke {
  -webkit-text-stroke-color: var(--silver);
  color: transparent;
}

/* World title shadows — replace deep black halos with warm cream halos */
body.day .world-title {
  text-shadow:
    0 0 24px rgba(232, 226, 210, 0.92),
    0 0 60px rgba(232, 226, 210, 0.65);
}
body.day .world-title .brand-prefix {
  text-shadow: 0 0 14px rgba(232, 226, 210, 0.9);
}
body.day .world-title .it {
  text-shadow:
    0 0 18px rgba(232, 226, 210, 0.92),
    0 0 40px rgba(232, 226, 210, 0.55);
}
body.day .world-desc {
  text-shadow:
    0 0 14px rgba(232, 226, 210, 0.95),
    0 0 36px rgba(232, 226, 210, 0.7);
}

/* World content vignette — soft warm glow instead of dark blob */
body.day .world-content::before {
  background: radial-gradient(ellipse 75% 65% at 35% 50%,
    rgba(232, 226, 210, 0.65) 0%,
    rgba(232, 226, 210, 0.35) 50%,
    transparent 80%);
}

/* Project card image gradient + arrow chip — cream tones */
body.day .proj-card-img::before {
  background: linear-gradient(180deg, transparent 50%, rgba(232, 226, 210, 0.85) 100%);
}
body.day .proj-card-text .title {
  text-shadow: 0 4px 16px rgba(232, 226, 210, 0.7);
}
body.day .proj-card-arrow {
  background: rgba(232, 226, 210, 0.75);
}

/* Slot indicator badge — cream backing */
body.day .slot-indicator {
  background: rgba(232, 226, 210, 0.5);
}

/* Loader — warm cream backdrop */
body.day .loader {
  background: #ece6d6;
}

/* Selection */
body.day::selection { background: var(--copper); color: #ece6d6; }

/* Brand marquee track — slightly darker borders on cream */
body.day .brand {
  border-left-color: rgba(38, 32, 22, 0.15);
}
body.day .brand img {
  filter: grayscale(1) brightness(0.4) contrast(1.2);
}
body.day .brand:hover img {
  filter: grayscale(0) brightness(1) contrast(1);
}

/* Mobile vignette tweak */
@media (max-width: 768px) {
  body.day .world-content::before {
    background: radial-gradient(ellipse 90% 70% at 50% 50%,
      rgba(232, 226, 210, 0.75) 0%,
      rgba(232, 226, 210, 0.40) 60%,
      transparent 90%);
  }
}

/* Process step dots — cream interior */
body.day .process-dot {
  background: #ece6d6;
}

/* Stat hover wash */
body.day .stat:hover {
  background: rgba(110, 74, 38, 0.05);
}

/* Team card backing */
body.day .team-card {
  background: linear-gradient(180deg, rgba(255, 248, 232, 0.75), rgba(232, 226, 210, 0.5));
  border-color: rgba(38, 32, 22, 0.12);
}
body.day .team-card:hover {
  border-color: var(--copper);
}
body.day .team-photo { background: #d4cdb8; }

/* Bottom UI sound toggle — cream feel */
body.day .sound-toggle {
  border-color: rgba(38, 32, 22, 0.2);
}
body.day .sound-toggle:hover {
  background: rgba(232, 226, 210, 0.7);
}

/* Day-mode horizon CTA */
body.day .horizon-cta {
  border-color: var(--bone);
  color: var(--bone);
}
body.day .horizon-cta:hover {
  background: var(--bone);
  color: #ece6d6;
}

/* Day-mode chapter rail — darker hairlines */
body.day .rail-item .bar { background: rgba(38, 32, 22, 0.3); }
body.day .rail-item.active .bar { background: var(--bone); }
body.day .progress { background: rgba(38, 32, 22, 0.08); }
body.day .progress-bar { background: var(--copper); }