/* ═══════════════════════════════════════════════════
   BASE RESET & GLOBAL
════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --font-body: 'Inter', sans-serif;
  --font-display: 'Playfair Display', serif;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-back: cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

body {
  font-family: var(--font-body);
  overflow-x: hidden;
  background: #0a0a0a;
}

/* ═══════════════════════════════════════════════════
   SITE HEADER
════════════════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 14px 28px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header-text {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

/* ═══════════════════════════════════════════════════
   SIDE NAV DOTS
════════════════════════════════════════════════════ */
.side-nav {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nav-dot {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  transition: background 0.3s ease, transform 0.3s ease;
  text-decoration: none;
}

.nav-dot::after {
  content: attr(data-label);
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.55);
  padding: 4px 9px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.nav-dot:hover::after,
.nav-dot.active::after {
  opacity: 1;
}

.nav-dot.active {
  background: #fff;
  transform: scale(1.3);
}

.nav-dot:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}

/* ═══════════════════════════════════════════════════
   SHARED SECTION STYLES
════════════════════════════════════════════════════ */
.demo-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  scroll-snap-align: start;
}

.demo-content {
  position: relative;
  z-index: 10;
  max-width: 820px;
  padding: 0 40px;
  text-align: left;
}

.demo-tag {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 20px;
  display: inline-block;
}

.demo-tag.light { color: rgba(255, 255, 255, 0.7); }
.demo-tag.mono  { color: rgba(0, 0, 0, 0.45); font-family: monospace; letter-spacing: 0.1em; }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(56px, 10vw, 120px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 28px;
}

.hero-title em {
  font-style: italic;
}

.hero-sub {
  font-family: var(--font-body);
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.65);
  max-width: 460px;
  margin-bottom: 28px;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 7px 14px;
  border-radius: 999px;
}

.hero-badge.dark {
  color: rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.15);
}

.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 10;
  opacity: 0.5;
  animation: scroll-hint-fade 2s ease-in-out infinite;
}

.scroll-hint span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
  animation: scroll-bounce 1.5s ease-in-out infinite;
}

@keyframes scroll-hint-fade {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.9; }
}

@keyframes scroll-bounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(5px); }
}

/* ═══════════════════════════════════════════════════
   DEMO 1: GRADIENT MESH
════════════════════════════════════════════════════ */
.demo1 {
  background: #0d0015;
}

.gradient-mesh-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.mesh-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.75;
  will-change: transform;
}

.orb1 {
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, #6b21a8, #4c1d95, transparent 70%);
  top: -15%;
  left: -10%;
  animation: orb-drift1 18s ease-in-out infinite alternate;
}

.orb2 {
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, #0d9488, #0891b2, transparent 70%);
  bottom: -10%;
  right: -10%;
  animation: orb-drift2 22s ease-in-out infinite alternate;
}

.orb3 {
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, #f97316, #ea580c, transparent 70%);
  top: 30%;
  left: 30%;
  animation: orb-drift3 16s ease-in-out infinite alternate;
}

.orb4 {
  width: 35vw;
  height: 35vw;
  background: radial-gradient(circle, #a855f7, #7c3aed, transparent 70%);
  bottom: 20%;
  left: 5%;
  animation: orb-drift4 25s ease-in-out infinite alternate;
}

.mesh-noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.04;
  mix-blend-mode: overlay;
}

@keyframes orb-drift1 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(8vw, 6vh) scale(1.15); }
}
@keyframes orb-drift2 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-6vw, -8vh) scale(1.1); }
}
@keyframes orb-drift3 {
  from { transform: translate(0, 0) scale(0.9); }
  to   { transform: translate(-10vw, 5vh) scale(1.2); }
}
@keyframes orb-drift4 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(5vw, -10vh) scale(1.05); }
}

.gradient-text {
  background: linear-gradient(135deg, #e879f9 0%, #22d3ee 50%, #fb923c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradient-shift 6s ease-in-out infinite alternate;
}

@keyframes gradient-shift {
  from { background-position: 0% 0%; }
  to   { background-position: 100% 100%; }
}

/* ═══════════════════════════════════════════════════
   DEMO 2: PARTICLE CANVAS
════════════════════════════════════════════════════ */
.demo2 {
  background: #050810;
}

#particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.glass-card-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  pointer-events: none;
}

.glass-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 48px 52px;
  pointer-events: all;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ═══════════════════════════════════════════════════
   DEMO 3: MORPHING BLOB
════════════════════════════════════════════════════ */
.demo3 {
  background: linear-gradient(135deg, #fdf4ff 0%, #f0f9ff 50%, #fff7ed 100%);
}

.blob-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.blob-svg {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.blob {
  opacity: 0.75;
}

.b1 {
  fill: #c084fc;
  animation: blob-morph1 8s ease-in-out infinite;
}
.b2 {
  fill: #67e8f9;
  animation: blob-morph2 10s ease-in-out infinite;
}
.b3 {
  fill: #86efac;
  animation: blob-morph3 12s ease-in-out infinite;
}
.b4 {
  fill: #fda4af;
  animation: blob-morph4 9s ease-in-out infinite;
}
.b5 {
  fill: #fcd34d;
  animation: blob-morph5 11s ease-in-out infinite;
}

@keyframes blob-morph1 {
  0%, 100% { rx: 180; ry: 140; cx: 250; cy: 200; }
  25%       { rx: 200; ry: 120; cx: 280; cy: 220; }
  50%       { rx: 160; ry: 160; cx: 230; cy: 180; }
  75%       { rx: 190; ry: 130; cx: 260; cy: 210; }
}
@keyframes blob-morph2 {
  0%, 100% { rx: 160; ry: 130; cx: 580; cy: 160; }
  33%       { rx: 180; ry: 110; cx: 600; cy: 190; }
  66%       { rx: 140; ry: 150; cx: 560; cy: 140; }
}
@keyframes blob-morph3 {
  0%, 100% { rx: 200; ry: 150; cx: 420; cy: 400; }
  50%       { rx: 170; ry: 180; cx: 440; cy: 380; }
}
@keyframes blob-morph4 {
  0%, 100% { rx: 140; ry: 120; cx: 700; cy: 380; }
  40%       { rx: 160; ry: 100; cx: 720; cy: 400; }
  80%       { rx: 130; ry: 130; cx: 690; cy: 360; }
}
@keyframes blob-morph5 {
  0%, 100% { rx: 120; ry: 100; cx: 100; cy: 430; }
  50%       { rx: 140; ry: 90;  cx: 120; cy: 450; }
}

.demo3 .demo-tag {
  color: rgba(80, 40, 120, 0.55);
}

.blob-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 28px;
  padding: 52px 56px;
  box-shadow: 0 24px 64px rgba(120, 60, 180, 0.12), inset 0 1px 0 rgba(255,255,255,0.9);
}

.demo3 .hero-title {
  color: #1a0a2e;
}

.demo3 .hero-title em {
  color: #7c3aed;
}

.demo3 .hero-sub {
  color: rgba(30, 10, 60, 0.6);
}

.demo3 .hero-badge {
  color: rgba(80, 40, 120, 0.6);
  background: rgba(120, 60, 200, 0.08);
  border-color: rgba(120, 60, 200, 0.2);
}

/* ═══════════════════════════════════════════════════
   DEMO 4: TEXT REVEAL
════════════════════════════════════════════════════ */
.demo4 {
  background: #f8f8f6;
}

.text-reveal-wrap {
  text-align: center;
  max-width: 900px;
  width: 100%;
}

.reveal-block {
  margin: 10px 0 36px;
  line-height: 0.9;
}

.reveal-line {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(72px, 15vw, 160px);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #0a0a0a;
  overflow: hidden;
  position: relative;
}

.reveal-line span.char {
  display: inline-block;
  opacity: 0;
  transform: translateY(60px) rotate(4deg);
  transition: opacity 0.5s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

.reveal-line.revealed span.char {
  opacity: 1;
  transform: translateY(0) rotate(0deg);
}

.reveal-sub {
  font-size: 16px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.45);
  max-width: 500px;
  margin: 0 auto 28px;
  line-height: 1.7;
}

.reveal-sub .reveal-char-wrap {
  display: block;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease 0.4s, transform 0.6s ease 0.4s;
}

.demo4.in-view .reveal-sub .reveal-char-wrap {
  opacity: 1;
  transform: translateY(0);
}

.mono-badge {
  color: rgba(0, 0, 0, 0.45);
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  font-family: monospace;
}

.demo4 .demo-tag {
  color: rgba(0, 0, 0, 0.35);
}

/* ═══════════════════════════════════════════════════
   DEMO 5: PARALLAX LAYERS
════════════════════════════════════════════════════ */
.demo5 {
  background: #0a1628;
  overflow: hidden;
}

.parallax-scene {
  position: absolute;
  inset: -20%;
  z-index: 1;
}

.parallax-layer {
  position: absolute;
  left: 0;
  right: 0;
  will-change: transform;
}

.layer-sky {
  top: 0;
  height: 100%;
  background: linear-gradient(
    180deg,
    #0a0520 0%,
    #0d1b3e 30%,
    #1a2f5e 60%,
    #1e3a5f 100%
  );
}

.layer-mountains {
  bottom: 38%;
  height: 55%;
  background:
    radial-gradient(ellipse 60% 100% at 15% 100%, #1a2b4a 0%, transparent 60%),
    radial-gradient(ellipse 55% 100% at 40% 100%, #1e3355 0%, transparent 60%),
    radial-gradient(ellipse 50% 100% at 65% 100%, #162240 0%, transparent 60%),
    radial-gradient(ellipse 60% 100% at 88% 100%, #1a2a48 0%, transparent 60%);
}

.layer-hills {
  bottom: 28%;
  height: 40%;
  background:
    radial-gradient(ellipse 80% 100% at 20% 100%, #1e3d28 0%, transparent 60%),
    radial-gradient(ellipse 70% 100% at 55% 100%, #1a3522 0%, transparent 60%),
    radial-gradient(ellipse 75% 100% at 80% 100%, #1c3a26 0%, transparent 60%);
}

.layer-trees {
  bottom: 15%;
  height: 35%;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(10, 20, 10, 0.3) 2px,
      rgba(10, 20, 10, 0.3) 3px
    ),
    linear-gradient(180deg, transparent 0%, #0f2010 60%, #0a1a0a 100%);
  background-color: transparent;
}

/* Trees as CSS triangles via pseudo-element pattern */
.layer-trees::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 3% 30% at 8% 70%, #0d1f0e 50%, transparent 51%),
    radial-gradient(ellipse 3% 35% at 14% 65%, #0f2210 50%, transparent 51%),
    radial-gradient(ellipse 2.5% 28% at 20% 72%, #0c1e0d 50%, transparent 51%),
    radial-gradient(ellipse 3% 32% at 27% 68%, #111f12 50%, transparent 51%),
    radial-gradient(ellipse 2.5% 30% at 33% 71%, #0d1f0e 50%, transparent 51%),
    radial-gradient(ellipse 3.5% 38% at 40% 63%, #0f2210 50%, transparent 51%),
    radial-gradient(ellipse 3% 33% at 47% 67%, #0c1e0d 50%, transparent 51%),
    radial-gradient(ellipse 2.5% 29% at 53% 70%, #111f12 50%, transparent 51%),
    radial-gradient(ellipse 3% 35% at 59% 65%, #0d1f0e 50%, transparent 51%),
    radial-gradient(ellipse 3.5% 37% at 66% 64%, #0f2210 50%, transparent 51%),
    radial-gradient(ellipse 3% 31% at 73% 69%, #0c1e0d 50%, transparent 51%),
    radial-gradient(ellipse 2.5% 28% at 79% 72%, #111f12 50%, transparent 51%),
    radial-gradient(ellipse 3% 34% at 85% 66%, #0d1f0e 50%, transparent 51%),
    radial-gradient(ellipse 3.5% 36% at 92% 64%, #0f2210 50%, transparent 51%);
}

.layer-ground {
  bottom: 0;
  height: 25%;
  background: linear-gradient(180deg, #0d1e0e 0%, #060f07 100%);
}

/* Stars for sky */
.layer-sky::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.8) 0%, transparent 100%),
    radial-gradient(1px 1px at 25% 8%,  rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 38% 20%, rgba(255,255,255,0.9) 0%, transparent 100%),
    radial-gradient(1px 1px at 52% 6%,  rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 67% 18%, rgba(255,255,255,0.8) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 80% 10%, rgba(255,255,255,0.75) 0%, transparent 100%),
    radial-gradient(1px 1px at 91% 22%, rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 15% 35%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 45% 30%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 72% 28%, rgba(255,255,255,0.8) 0%, transparent 100%),
    radial-gradient(1px 1px at 5%  40%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 58% 42%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 88% 35%, rgba(255,255,255,0.6) 0%, transparent 100%);
  animation: star-twinkle 4s ease-in-out infinite alternate;
}

/* Moon glow */
.layer-sky::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 80px;
  right: 15%;
  top: 12%;
  background: radial-gradient(circle, #fffde7 0%, #fff9c4 30%, rgba(255,245,157,0.3) 60%, transparent 75%);
  border-radius: 50%;
  box-shadow: 0 0 40px 20px rgba(255, 245, 157, 0.2);
  animation: moon-glow 6s ease-in-out infinite alternate;
}

@keyframes star-twinkle {
  from { opacity: 0.7; }
  to   { opacity: 1; }
}

@keyframes moon-glow {
  from { box-shadow: 0 0 40px 20px rgba(255, 245, 157, 0.2); }
  to   { box-shadow: 0 0 60px 30px rgba(255, 245, 157, 0.35); }
}

.parallax-fixed-text {
  position: relative;
  z-index: 10;
  pointer-events: none;
}

.light-title {
  color: #f0f4ff;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.6);
}

.light-title em {
  color: #fcd34d;
}

.light-sub {
  color: rgba(200, 220, 255, 0.7);
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .side-nav { right: 14px; }
  .nav-dot::after { display: none; }
  .demo-content { padding: 0 24px; }
  .glass-card { padding: 32px 28px; }
  .blob-card { padding: 36px 32px; }
  .site-header { padding: 12px 20px; }
  .site-header-text { font-size: 10px; }

  .reveal-line {
    font-size: clamp(56px, 18vw, 100px);
  }
}

@media (max-width: 480px) {
  .hero-sub { font-size: 14px; }
  .glass-card, .blob-card { padding: 28px 22px; }
}
