/* ═══════════════════════════════════════════════════════════════
   snowballanything.com — Cinematic Scroll Experience
   Deep layered backgrounds. Not flat. Feels like moving through a world.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --frost: #534AB7;
  --frost-light: #7B6FE0;
  --frost-glow: rgba(83, 74, 183, 0.3);
  --ice: #E8E6FF;
  --deep: #0A0A1A;
  --deeper: #060612;
  --surface: #12122A;
  --surface-light: #1A1A3E;
  --gold: #FFD700;
  --text: #E2E0F0;
  --text-dim: #8888AA;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background: var(--deeper);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--frost);
  color: #fff;
}

/* ═══ CURTAIN ═══ */
.curtain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
}

.curtain-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background: var(--deep);
  transition: transform 1.2s cubic-bezier(0.76, 0, 0.24, 1);
}

.curtain-left { left: 0; }
.curtain-right { right: 0; }

.curtain-logo {
  position: relative;
  z-index: 2;
  font-size: 4rem;
  animation: pulse-glow 2s ease-in-out infinite;
}

.curtain.open .curtain-left {
  transform: translateX(-105%);
}

.curtain.open .curtain-right {
  transform: translateX(105%);
}

.curtain.open .curtain-logo {
  opacity: 0;
  transition: opacity 0.3s;
}

.curtain.done {
  pointer-events: none;
}

/* ═══ NAV ═══ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 3rem;
  font-family: var(--font-display);
  opacity: 0;
  transform: translateY(-20px);
  transition: background 0.4s, opacity 0.6s, transform 0.6s;
}

.nav.visible {
  opacity: 1;
  transform: translateY(0);
}

.nav.scrolled {
  background: rgba(10, 10, 26, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(83, 74, 183, 0.15);
}

.nav-brand {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.accent {
  color: var(--frost-light);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--frost-light);
}

/* ═══ SCROLL INDICATOR ═══ */
.scroll-indicator {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 1;
  transition: opacity 0.6s;
}

.scroll-indicator.hidden {
  opacity: 0;
  pointer-events: none;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--frost-light));
  animation: scroll-pulse 2s ease-in-out infinite;
}

.scroll-indicator span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-dim);
}

/* ═══ SECTIONS ═══ */
.section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ═══ DEPTH LAYERS ═══ */
.depth-layer {
  position: absolute;
  inset: -20%;
  will-change: transform;
}

.depth-1 {
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(83, 74, 183, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 80% 60%, rgba(30, 20, 80, 0.4) 0%, transparent 70%);
}

.depth-2 {
  background:
    radial-gradient(circle 400px at 30% 30%, rgba(83, 74, 183, 0.05) 0%, transparent 100%),
    radial-gradient(circle 300px at 70% 70%, rgba(123, 111, 224, 0.04) 0%, transparent 100%);
}

.depth-3 {
  background:
    radial-gradient(circle 200px at 50% 50%, rgba(255, 215, 0, 0.02) 0%, transparent 100%);
}

/* ═══ HERO ═══ */
.hero {
  background: var(--deeper);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 2rem;
}

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  border: 1px solid rgba(83, 74, 183, 0.3);
  border-radius: 100px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--frost-light);
  margin-bottom: 2rem;
  opacity: 0;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -3px;
  margin-bottom: 1.5rem;
}

.title-line {
  display: block;
  opacity: 0;
  transform: translateY(60px);
}

.title-line.accent {
  color: var(--frost-light);
  text-shadow: 0 0 80px rgba(83, 74, 183, 0.4);
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: var(--text-dim);
  font-weight: 300;
  opacity: 0;
  transform: translateY(30px);
}

.hero-sub-small {
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  color: var(--text-dim);
  font-weight: 300;
  opacity: 0;
  margin-top: 0.5rem;
}

/* ═══ FROST PARTICLES ═══ */
.frost-particles {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}

.frost-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(123, 111, 224, 0.4);
  border-radius: 50%;
  animation: drift linear infinite;
}

@keyframes drift {
  0% { transform: translateY(100vh) translateX(0) scale(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-10vh) translateX(50px) scale(1); opacity: 0; }
}

/* ═══ SECTION TAGS ═══ */
.section-tag {
  display: block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--frost);
  letter-spacing: 4px;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-dim);
  font-weight: 300;
  max-width: 500px;
}

/* ═══ WORLDS SECTION ═══ */
.worlds {
  background: var(--deep);
  flex-direction: column;
  padding: 8rem 3rem;
}

.worlds-header {
  text-align: center;
  margin-bottom: 4rem;
}

.worlds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  width: 100%;
}

.world-card {
  position: relative;
  padding: 2.5rem 2rem;
  background: var(--surface);
  border: 1px solid rgba(83, 74, 183, 0.1);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.4s, border-color 0.4s;
  cursor: pointer;
}

.world-card:hover {
  transform: translateY(-8px);
  border-color: rgba(83, 74, 183, 0.4);
}

.card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--frost-glow) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.6s;
  pointer-events: none;
}

.world-card:hover .card-glow {
  opacity: 0.15;
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.world-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.world-card p {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.card-status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 4px;
  background: rgba(83, 74, 183, 0.15);
  color: var(--frost-light);
  border: 1px solid rgba(83, 74, 183, 0.25);
}

/* ═══ STACK SECTION ═══ */
.stack {
  background: var(--deeper);
}

.stack-content {
  padding: 6rem 3rem;
  max-width: 1000px;
  width: 100%;
}

.tech-orbit {
  position: relative;
  width: 400px;
  height: 400px;
  margin: 3rem auto;
}

.orbit-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.orbit-core {
  font-size: 3rem;
  display: block;
  animation: pulse-glow 3s ease-in-out infinite;
}

.orbit-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

.orbit-ring {
  position: absolute;
  inset: 0;
  animation: slow-rotate 30s linear infinite;
}

.orbit-node {
  position: absolute;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1px solid rgba(83, 74, 183, 0.2);
  border-radius: 50%;
  text-align: center;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
  cursor: default;
}

.orbit-node:hover {
  background: var(--surface-light);
  border-color: var(--frost);
  transform: scale(1.15);
}

/* Position nodes in a circle */
.orbit-node:nth-child(1) { top: -40px; left: 50%; margin-left: -40px; }
.orbit-node:nth-child(2) { top: 15%; right: -10px; }
.orbit-node:nth-child(3) { top: 50%; right: -20px; margin-top: -40px; }
.orbit-node:nth-child(4) { bottom: 15%; right: -10px; }
.orbit-node:nth-child(5) { bottom: -40px; left: 50%; margin-left: -40px; }
.orbit-node:nth-child(6) { bottom: 15%; left: -10px; }

.stack-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.stack-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.5rem;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid rgba(83, 74, 183, 0.08);
}

.stack-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stack-item h4 {
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.stack-item p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ═══ EMPIRE SECTION ═══ */
.empire {
  background: var(--deep);
  flex-direction: column;
}

.empire-content {
  padding: 6rem 3rem;
  max-width: 800px;
  text-align: center;
}

.family-tree {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.family-node {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2rem;
  background: var(--surface);
  border: 1px solid rgba(83, 74, 183, 0.1);
  border-radius: 12px;
  transition: transform 0.3s, border-color 0.3s;
  position: relative;
  cursor: default;
}

.family-node:hover {
  transform: scale(1.05);
  border-color: rgba(83, 74, 183, 0.3);
}

.node-ring {
  position: absolute;
  inset: -4px;
  border-radius: 16px;
  border: 2px solid transparent;
  transition: border-color 0.3s;
  pointer-events: none;
}

.family-node:hover .node-ring {
  border-color: var(--frost-glow);
}

.family-node.patriarch {
  border-color: rgba(255, 215, 0, 0.2);
  padding: 1.5rem 3rem;
}

.family-node.patriarch:hover {
  border-color: rgba(255, 215, 0, 0.4);
}

.node-icon {
  font-size: 1.8rem;
}

.node-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
}

.node-role {
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.family-branches {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.frost-pack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.frost-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--frost);
  letter-spacing: 3px;
  text-transform: uppercase;
}

.frost-wolves {
  display: flex;
  gap: 0.75rem;
}

.wolf-badge {
  padding: 0.4rem 1rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--frost-light);
  background: rgba(83, 74, 183, 0.1);
  border: 1px solid rgba(83, 74, 183, 0.2);
  border-radius: 6px;
  letter-spacing: 1px;
}

/* ═══ CONTACT ═══ */
.contact {
  background: var(--deeper);
}

.contact-content {
  text-align: center;
  padding: 6rem 3rem;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 3rem;
  margin-top: 2rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  background: var(--frost);
  border: none;
  border-radius: 100px;
  text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 0 40px rgba(83, 74, 183, 0.3);
}

.cta-button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 60px rgba(83, 74, 183, 0.5);
}

.cta-icon {
  font-size: 1.2rem;
}

.contact-note {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ═══ FOOTER ═══ */
.footer {
  padding: 3rem;
  text-align: center;
  background: var(--deeper);
  border-top: 1px solid rgba(83, 74, 183, 0.08);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text-dim);
}

.footer-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
  opacity: 0.5;
}

/* ═══ ANIMATIONS ═══ */
@keyframes pulse-glow {
  0%, 100% { opacity: 1; filter: brightness(1); }
  50% { opacity: 0.7; filter: brightness(1.3); }
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; height: 20px; }
  50% { opacity: 1; height: 40px; }
}

@keyframes slow-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  .nav { padding: 1rem 1.5rem; }
  .nav-links { gap: 1.5rem; }
  .nav-links a { font-size: 0.75rem; }
  .hero-title { letter-spacing: -1px; }
  .worlds { padding: 6rem 1.5rem; }
  .worlds-grid { grid-template-columns: 1fr; }
  .tech-orbit { width: 300px; height: 300px; }
  .orbit-node { width: 60px; height: 60px; font-size: 0.6rem; }
  .family-branches { flex-direction: column; align-items: center; }
  .stack-content { padding: 4rem 1.5rem; }
  .stack-detail { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .nav-links { display: none; }
  .tech-orbit { width: 250px; height: 250px; }
}