/* ─── Reset ──────────────────────────────────────────── */

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

/* ─── Base ───────────────────────────────────────────── */

:root {
  --fg:        #0F0F0F;
  --muted:     #666666;
  --bg:        #F8F8F5;
  --bg-dark:   #0A0A0A;
  --blue:      #2563EB;
  --light:     #E8E8E3;

  /* RGB channels for rgba() compositing */
  --fg-rgb:    15, 15, 15;
  --light-rgb: 232, 232, 227;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  color: var(--fg);
  background: var(--bg);
}

/* ─── Nav pill ───────────────────────────────────────── */

.nav-pill {
  position: fixed;
  top: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: 0.55rem 1.4rem 0.55rem 1.2rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(24px) saturate(2);
  backdrop-filter: blur(24px) saturate(2);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 24px rgba(var(--fg-rgb), 0.08);
  white-space: nowrap;
}

.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo {
  height: 1.4rem;
  width: auto;
  filter: invert(1);
}

.nav-links {
  display: flex;
  gap: 1.8rem;
}

.nav-link {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
  transition: color 180ms ease;
}

.nav-link:hover {
  color: var(--fg);
}

/* ─── Scroll sections ────────────────────────────────── */

.section {
  height: 100vh;
  height: 100dvh;
  position: relative;
  overflow: hidden;
}

.s-hero  { background: var(--bg); }
.s-about { background: var(--bg); }
.s-enter { background: var(--bg-dark); color: var(--light); }

/* ─── §1 Hero ────────────────────────────────────────── */

.hero-cube {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 55%;
}

#hero-cube-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Fade: right (where text is) and bottom */
.hero-cube-fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to right, transparent 50%, var(--bg) 95%),
    linear-gradient(to bottom, transparent 60%, var(--bg) 92%);
}

/* Text: overlaid on the right half */
.hero-text {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 8vw 8vh 2vw;
}

.wordmark {
  font-size: clamp(2.8rem, 6.5vw, 7rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--fg);
  margin-bottom: 1rem;
}

.hero-sub {
  font-size: 0.82rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: rgba(var(--fg-rgb), 0.55);
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.4rem;
  color: var(--fg);
  opacity: 0.25;
  animation: nudge 2.4s ease-in-out infinite;
}

@keyframes nudge {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ─── §2 About ───────────────────────────────────────── */

/* Vivid blue left panel */
.s-about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 40%;
  background: var(--blue);
  z-index: 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 38% 62%;
  height: 100%;
  align-items: center;
  padding: 0 8vw;
  gap: 6vw;
  position: relative;
  z-index: 1;
}

.about-display {
  font-size: clamp(2rem, 4vw, 4.2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.92);
}

.about-body {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  max-width: 52ch;
}

.about-body p {
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--fg);
}

.about-body a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(var(--fg-rgb), 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 180ms ease;
}

.about-body a:hover {
  text-decoration-color: rgba(var(--fg-rgb), 0.7);
}

/* ─── §3 Enter (dark) ────────────────────────────────── */

.enter-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 3rem;
  padding-bottom: 6rem;
}

.enter-heading {
  font-size: clamp(2.5rem, 5vw, 5.5rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--light);
  text-align: center;
}

.enter-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

/* ─── Site footer ────────────────────────────────────── */

.site-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.8rem;
  padding: 1.6rem;
}

.site-footer a {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(var(--light-rgb), 0.3);
  transition: color 200ms ease;
}

.site-footer a:hover {
  color: rgba(var(--light-rgb), 0.65);
}

.site-footer .sep {
  color: rgba(var(--light-rgb), 0.1);
  font-size: 0.62rem;
  user-select: none;
}

/* ─── Buttons ────────────────────────────────────────── */

.btn-primary {
  display: inline-block;
  border: 1px solid rgba(var(--fg-rgb), 0.22);
  padding: 0.75rem 2rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}

.btn-primary:hover {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.btn-ghost {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
  transition: color 180ms ease;
}

.btn-ghost:hover {
  color: var(--fg);
}

.btn-light {
  display: inline-block;
  border: 1px solid rgba(var(--light-rgb), 0.35);
  padding: 0.75rem 2.4rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--light);
  text-decoration: none;
  transition: background 200ms ease;
}

.btn-light:hover {
  background: rgba(var(--light-rgb), 0.1);
}

.btn-ghost-light {
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: rgba(var(--light-rgb), 0.38);
  text-decoration: none;
  transition: color 200ms ease;
}

.btn-ghost-light:hover {
  color: rgba(var(--light-rgb), 0.7);
}

/* ─── Mobile ─────────────────────────────────────────── */

@media (max-width: 768px) {
  .hero-cube {
    width: 100%;
    height: 65%;
    bottom: auto;
  }

  .hero-cube-fade {
    display: none;
  }

  .hero-text {
    top: 60%;
    width: 100%;
    padding: 0 2rem 3rem;
    justify-content: flex-start;
  }

  .s-about::before {
    display: none;
  }

  .about-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    height: 100%;
    padding: 0;
    gap: 0;
  }

  .about-display {
    display: block;
    background: var(--blue);
    padding: 6rem 2rem 3rem;
    font-size: clamp(1.8rem, 7vw, 3rem);
  }

  .about-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 2rem 4rem;
  }

  .enter-inner {
    gap: 2rem;
    padding-bottom: 5rem;
  }

  .nav-pill {
    gap: 1.4rem;
    padding: 0.55rem 1rem;
  }

  .nav-links {
    gap: 1.2rem;
  }
}

@media (max-width: 480px) {
  .scroll-hint {
    display: none;
  }
}
