@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300&family=Inter:wght@300;400&display=swap');

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

:root {
  --void:       #020408;
  --star-cold:  #a8c4e8;
  --beam-core:  #ddeeff;
  --ember:      #e8621a;
  --ash:        #8899aa;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-ui:      'Inter', system-ui, sans-serif;
}

html, body {
  background: var(--void);
  color: var(--star-cold);
  font-family: var(--font-ui);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* LAYER 1: Canvas — fixed behind everything */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  display: block;
}

/* LAYER 2: DOM scroll container */
#dom-layer {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

/* Each scene is 300vh tall — gives scroll room for GSAP */
.scene-trigger {
  position: relative;
  height: 300vh;
  width: 100%;
}

/* CTA scene is shorter */
.scene-trigger--cta {
  height: 100vh;
  pointer-events: auto;
}

/* Text block sticks to center while scrolling through its section */
.scene-text {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 2rem;
  opacity: 0;
}

/* LAYER 3: Fixed HUD */
#ui-layer {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

/* LAYER 4: Transition overlay */
#transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
  opacity: 0;
  pointer-events: none;
}

/* Typography */
.t-hero {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 300;
  color: var(--beam-core);
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.t-hero--dim {
  color: var(--star-cold);
  font-style: italic;
}

.t-sub {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-style: italic;
  color: var(--ash);
  line-height: 1.6;
}

.t-label {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ash);
}

.t-domain-era {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 0.75rem;
}

.t-domain-name {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 300;
  color: var(--beam-core);
  line-height: 1;
  margin-bottom: 1rem;
}

.t-whisper {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: var(--ash);
  line-height: 1.7;
  max-width: 500px;
}

.t-approach {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.2rem, 3vw, 2rem);
  color: var(--ash);
}

.t-ending {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 300;
  color: var(--star-cold);
  line-height: 1.3;
}

.t-ending--accent {
  color: var(--ember);
  font-style: italic;
}

.t-cta-line {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  color: var(--star-cold);
  margin-bottom: 2.5rem;
}

#cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 3rem;
  border: 1px solid rgba(168,196,232,0.35);
  color: var(--beam-core);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-decoration: none;
  pointer-events: auto;
  cursor: pointer;
  transition: border-color 0.4s ease, background 0.4s ease;
  margin-bottom: 2rem;
}

#cta-button:hover {
  border-color: rgba(168,196,232,0.8);
  background: rgba(168,196,232,0.06);
}

.btn-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--star-cold);
  box-shadow: 0 0 8px 2px var(--star-cold);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.5); }
}

.t-logo {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(136,153,170,0.4);
  margin-top: 1rem;
}

/* Year Counter */
#year-counter {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  text-align: right;
  opacity: 0;
  transition: opacity 0.6s ease;
}

#year-counter.visible { opacity: 1; }

.year-label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 0.2rem;
}

.year-value {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 300;
  color: var(--star-cold);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* Scroll Hint */
#scroll-hint {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  transition: opacity 0.8s ease;
}

#scroll-hint.visible { opacity: 1; }

#scroll-hint span {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ash);
}

.hint-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--ash), transparent);
  animation: hintDrop 2s ease-in-out infinite;
}

@keyframes hintDrop {
  0%   { transform: scaleY(0); transform-origin: top;    opacity: 1; }
  50%  { transform: scaleY(1); transform-origin: top;    opacity: 1; }
  100% { transform: scaleY(1); transform-origin: bottom; opacity: 0; }
}

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

@media (max-width: 768px) {
  .t-domain-name { font-size: 2.2rem; }
  .t-hero        { font-size: 1.8rem; }
}
