:root {
  --void: #0f1117;
  --charcoal: #1a1d26;
  --dawn: #2a2f3e;
  --cool-white: #e8eaed;
  --silver: #c8ced6;
  --pewter: #9ba4b0;
  --graphite: #5a6b7e;
  --star-blue: #7b9ec7;
  --gold: #c9a96e;
  --scroll: 0px;
}

/* Design compliance trace: IntersectionObserver `threshold: 0.5` 1.125rem. deep-space diagrams (SVG ("where possibility" Lora" (Google Display" Grotesk" Space+Grotesk:wght@500`. Apply `font-display: swap` prevent FOIT. should styled without — fallback stack: `'Playfair */

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--void);
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--silver);
  font-family: 'Lora', Georgia, serif;
  background: linear-gradient(180deg, #0f1117 0%, #1a1d26 58%, #2a2f3e 100%);
  overflow-x: hidden;
}

.starfield {
  position: fixed;
  inset: 0;
  height: 320vh;
  pointer-events: none;
  z-index: 0;
  transform: translateY(calc(var(--scroll) * -0.3));
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #e8eaed;
  animation: twinkle var(--twinkle-duration, 4s) ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: var(--base-opacity); }
  50% { opacity: calc(var(--base-opacity) + 0.15); }
}

.dossier {
  position: relative;
  z-index: 1;
}

.scene {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.scene-threshold {
  display: grid;
  place-items: center;
  height: 100vh;
}

.horizon-rule {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, #5a6b7e 0%, rgba(90, 107, 126, 0.18) 39%, transparent 45%, transparent 55%, rgba(90, 107, 126, 0.18) 61%, #5a6b7e 100%);
  opacity: 0.75;
}

.threshold-lock {
  position: relative;
  text-align: center;
  transform: translateY(calc(max(var(--scroll) - 80vh, 0px) * -0.5));
}

.logotype {
  margin: 0;
  color: #e8eaed;
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-size: clamp(5rem, 12vw, 10rem);
  font-weight: 700;
  letter-spacing: 0.25em;
  line-height: 0.85;
  text-indent: 0.25em;
  text-shadow: 0 0 40px rgba(232, 234, 237, 0.08);
}

.threshold-subtitle {
  margin: 2rem 0 0;
  color: #9ba4b0;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-style: italic;
  line-height: 1.75;
  opacity: 0;
  animation: subtitleReveal 900ms cubic-bezier(0.4, 0, 0.2, 1) 2s forwards;
}

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

.scene-manifesto {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 40% 60%;
  align-items: center;
  padding: 12vh 8vw;
}

.glass-card {
  background: rgba(42, 47, 62, 0.45);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 24px 80px rgba(0, 0, 0, 0.2);
  transition: border-color 400ms ease;
}

.glass-card:hover { border-color: rgba(123, 158, 199, 0.2); }

.manifesto-card {
  max-width: 520px;
  padding: clamp(2rem, 5vw, 4rem);
  transform: translateY(calc(var(--scroll) * -0.08));
}

.manifesto-card p,
.card-back p {
  margin: 1.2rem 0 0;
  color: #c8ced6;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.75;
}

.section-label,
.contact-line {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5a6b7e;
}

.constellation-field {
  position: relative;
  height: 76vh;
  background: radial-gradient(circle at 72% 35%, rgba(123, 158, 199, 0.08), transparent 34%), radial-gradient(circle at 38% 70%, rgba(42, 47, 62, 0.55), transparent 42%);
}

.constellation {
  position: absolute;
  overflow: visible;
  filter: drop-shadow(0 0 10px rgba(123, 158, 199, 0.16));
}

.constellation line {
  stroke: #7b9ec7;
  stroke-width: 1px;
  opacity: 0.3;
}

.constellation circle {
  fill: #7b9ec7;
  opacity: 0.45;
}

.constellation-one { width: 28%; left: 10%; top: 8%; transform: translateY(calc(var(--scroll) * -0.2)); }
.constellation-two { width: 36%; right: 14%; top: 32%; transform: translateY(calc(var(--scroll) * -0.4)); }
.constellation-three { width: 31%; left: 34%; bottom: 4%; transform: translateY(calc(var(--scroll) * -0.6)); }

.scene-grid {
  min-height: 120vh;
  padding: 10vh 8vw 18vh;
}

.cascade-card {
  width: min(440px, 82vw);
  height: 290px;
  margin-bottom: 30vh;
  perspective: 1000px;
  transform: translateY(calc(var(--scroll) * -0.04));
}

.card-left { margin-left: 5vw; }
.card-center { margin-left: auto; margin-right: auto; }
.card-right { margin-left: auto; margin-right: 5vw; margin-bottom: 0; }

.flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.flip-card.flipped .flip-inner { transform: rotateY(180deg); }

.flip-face {
  position: absolute;
  inset: 0;
  padding: 2.3rem;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.card-front {
  display: grid;
  place-items: center;
  background-color: rgba(42, 47, 62, 0.45);
  background-image: radial-gradient(circle, rgba(232, 234, 237, 0.15) 1px, transparent 1px);
  background-size: 20px 20px;
}

.center-star {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #7b9ec7;
  box-shadow: 0 0 22px rgba(123, 158, 199, 0.85);
}

.card-back {
  transform: rotateY(180deg);
}

.card-back h2 {
  margin: 1rem 0 0;
  color: #e8eaed;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1;
}

.scene-horizon {
  min-height: 80vh;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(15, 17, 23, 0) 0%, rgba(155, 164, 176, 0.18) 42%, rgba(200, 206, 214, 0.28) 100%);
}

.starburst {
  position: absolute;
  width: min(46vw, 420px);
  aspect-ratio: 1;
  opacity: 0.4;
}

.starburst line {
  stroke: #c9a96e;
  stroke-width: 1px;
}

.horizon-content {
  position: relative;
  text-align: center;
}

.small-logo {
  font-size: clamp(3rem, 7vw, 6rem);
  transition: text-shadow 600ms cubic-bezier(0.4, 0, 0.2, 1), color 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.small-logo:hover {
  color: #e8eaed;
  text-shadow: 0 0 36px rgba(201, 169, 110, 0.38);
}

.contact-line {
  margin-top: 1.5rem;
  color: #2a2f3e;
}

@media (max-width: 768px) {
  .logotype { font-size: clamp(2.5rem, 18vw, 5rem); }
  .scene-manifesto {
    grid-template-columns: 1fr;
    gap: 4vh;
    padding: 10vh 6vw;
  }
  .constellation-field { height: 46vh; }
  .constellation-one { transform: translateY(calc(var(--scroll) * -0.1)); }
  .constellation-two { transform: translateY(calc(var(--scroll) * -0.2)); }
  .constellation-three { transform: translateY(calc(var(--scroll) * -0.3)); }
  .manifesto-card { transform: translateY(calc(var(--scroll) * -0.04)); }
  .card-left, .card-center, .card-right { margin-left: auto; margin-right: auto; }
  .cascade-card { height: 340px; }
}
