/* ============================================
   SCROLLING INTO THE VOID — STYLE.CSS
   Interactive Storytelling Website
   ============================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;900&display=swap');

/* ---------- CSS Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', sans-serif;
  color: #fff;
  overflow-x: hidden;
  background: #0a0a0a;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Utility / Scroll-Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* staggered children */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.25s; }
.reveal-delay-3 { transition-delay: 0.4s; }
.reveal-delay-4 { transition-delay: 0.55s; }

/* ============================================
   SECTION 1 — HERO: "It Starts Innocent"
   ============================================ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 30%, #f093fb 60%, #f5576c 100%);
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
}

.hero-subtitle {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2.8rem, 8vw, 7rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  text-shadow: 0 4px 30px rgba(0,0,0,0.2);
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-weight: 300;
  opacity: 0.85;
  max-width: 500px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.7;
  animation: bobDown 2s ease-in-out infinite;
}

.scroll-cue .arrow {
  font-size: 1.4rem;
}

@keyframes bobDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

/* Floating social UI elements */
.floating-elements {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.float-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  padding: 14px 20px;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  pointer-events: auto;
  cursor: default;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.float-card:hover {
  transform: scale(1.08) !important;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.float-card .icon { font-size: 1.2rem; }

.fc-1 { top: 12%; left: 8%;  animation: floatA 6s ease-in-out infinite; }
.fc-2 { top: 18%; right: 6%; animation: floatB 7s ease-in-out infinite 0.5s; }
.fc-3 { bottom: 22%; left: 12%; animation: floatA 8s ease-in-out infinite 1s; }
.fc-4 { bottom: 15%; right: 10%; animation: floatB 6.5s ease-in-out infinite 0.3s; }
.fc-5 { top: 45%; left: 3%;  animation: floatA 7.5s ease-in-out infinite 0.8s; }
.fc-6 { top: 50%; right: 4%; animation: floatB 6s ease-in-out infinite 1.2s; }

@keyframes floatA {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-20px) rotate(2deg); }
}

@keyframes floatB {
  0%, 100% { transform: translateY(0) rotate(2deg); }
  50%      { transform: translateY(-25px) rotate(-2deg); }
}

/* ============================================
   SECTION 2 — LOOP: "You Keep Scrolling"
   ============================================ */
#loop {
  min-height: 100vh;
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem;
  position: relative;
  overflow: hidden;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 1rem;
}

.loop-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  letter-spacing: -0.02em;
}

.loop-title span {
  background: linear-gradient(90deg, #e2e2e2, #888);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  width: 100%;
  max-width: 900px;
}

.feed-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.5rem;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  cursor: pointer;
}

.feed-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
  border-color: rgba(255,255,255,0.2);
}

.feed-card .card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
}

.card-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.card-avatar.av1 { background: linear-gradient(135deg, #667eea, #764ba2); }
.card-avatar.av2 { background: linear-gradient(135deg, #f093fb, #f5576c); }
.card-avatar.av3 { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.card-avatar.av4 { background: linear-gradient(135deg, #fa709a, #fee140); }
.card-avatar.av5 { background: linear-gradient(135deg, #a18cd1, #fbc2eb); }
.card-avatar.av6 { background: linear-gradient(135deg, #fccb90, #d57eeb); }

.card-name {
  font-weight: 600;
  font-size: 0.85rem;
}

.card-time {
  font-size: 0.7rem;
  opacity: 0.4;
}

.card-body {
  font-size: 0.9rem;
  line-height: 1.55;
  opacity: 0.7;
  margin-bottom: 1rem;
}

.card-bar {
  height: 4px;
  border-radius: 4px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.card-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  width: 0%;
  transition: width 1.5s ease;
}

.feed-card.visible .card-bar-fill {
  width: var(--bar-width, 60%);
}

.loop-caption {
  margin-top: 3rem;
  font-size: 1rem;
  opacity: 0.35;
  font-style: italic;
  text-align: center;
}

/* ============================================
   SECTION 3 — OVERLOAD: "Too Much, Too Fast"
   ============================================ */
#overload {
  min-height: 100vh;
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
}

/* Neon glow background */
#overload::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,0,100,0.25) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: neonPulse 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes neonPulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: 1;   transform: translate(-50%, -50%) scale(1.15); }
}

.glitch-title {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 900;
  text-align: center;
  position: relative;
  color: #fff;
  z-index: 2;
  margin-bottom: 1rem;
}

/* Glitch layers */
.glitch-title::before,
.glitch-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.glitch-title::before {
  color: #ff004c;
  animation: glitch1 2s infinite linear alternate-reverse;
  clip-path: inset(0 0 60% 0);
}

.glitch-title::after {
  color: #00e5ff;
  animation: glitch2 2.5s infinite linear alternate-reverse;
  clip-path: inset(60% 0 0 0);
}

@keyframes glitch1 {
  0%   { transform: translate(0); }
  20%  { transform: translate(-3px, 2px); }
  40%  { transform: translate(3px, -2px); }
  60%  { transform: translate(-2px, -1px); }
  80%  { transform: translate(2px, 1px); }
  100% { transform: translate(0); }
}

@keyframes glitch2 {
  0%   { transform: translate(0); }
  20%  { transform: translate(3px, -2px); }
  40%  { transform: translate(-3px, 2px); }
  60%  { transform: translate(2px, 1px); }
  80%  { transform: translate(-2px, -1px); }
  100% { transform: translate(0); }
}

.overload-sub {
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  opacity: 0.5;
  text-align: center;
  z-index: 2;
  margin-bottom: 2.5rem;
}

/* Notification popups */
.notif-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.notif {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  animation: notifPop 0.4s ease-out forwards, notifFade 3s ease-in forwards 0.4s;
  opacity: 0;
  box-shadow: 0 0 20px rgba(255, 0, 100, 0.15);
}

@keyframes notifPop {
  0%   { opacity: 0; transform: scale(0.5) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes notifFade {
  0%, 70% { opacity: 1; }
  100%    { opacity: 0; }
}

/* Mute button */
.mute-btn {
  position: relative;
  z-index: 3;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 12px 28px;
  border-radius: 50px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.35s ease;
  letter-spacing: 0.05em;
  margin-top: 1rem;
}

.mute-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 30px rgba(255, 0, 100, 0.2);
}

.mute-btn.muted {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  opacity: 0.5;
}

/* Muted state — calm things down */
#overload.muted::before {
  animation: none;
  opacity: 0.2;
}

#overload.muted .glitch-title::before,
#overload.muted .glitch-title::after {
  animation: none;
}

#overload.muted .notif-container {
  opacity: 0.1;
}

/* ============================================
   SECTION 4 — VOID: "And Then... Nothing"
   ============================================ */
#void {
  min-height: 100vh;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  position: relative;
}

.void-text {
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  font-weight: 300;
  letter-spacing: 0.05em;
  opacity: 0;
  transition: opacity 2s ease;
  line-height: 1.4;
}

.void-text.visible {
  opacity: 1;
}

.void-text span {
  display: block;
  font-size: clamp(0.85rem, 2vw, 1rem);
  font-weight: 300;
  opacity: 0.3;
  margin-top: 1.5rem;
  letter-spacing: 0.1em;
}

.void-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: rgba(255, 255, 255, 0.6);
  margin-left: 4px;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* ============================================
   SECTION 5 — WAKE UP: "Look Up"
   ============================================ */
#wakeup {
  min-height: 100vh;
  background: linear-gradient(180deg, #0a0a0a 0%, #1a1510 20%, #2d2418 40%, #f5e6d3 70%, #fdf6ee 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
}

.wakeup-title {
  font-size: clamp(3rem, 9vw, 7rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 1.5rem;
  background: linear-gradient(180deg, #f5e6d3 0%, #c4956a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.wakeup-message {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 300;
  max-width: 520px;
  line-height: 1.8;
  color: #4a3728;
  margin-bottom: 2.5rem;
}

.cta-btn {
  position: relative;
  z-index: 3;
  background: linear-gradient(135deg, #c4956a, #a67c52);
  color: #1a1510;
  border: none;
  padding: 16px 40px;
  border-radius: 60px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s ease;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 30px rgba(196, 149, 106, 0.3);
}

.cta-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 40px rgba(196, 149, 106, 0.5);
}

.cta-btn:active {
  transform: translateY(0) scale(0.98);
}

/* Full-screen calm overlay */
.calm-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle, #fdf6ee 0%, #f5e6d3 50%, #e8d5bc 100%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.5s ease;
}

.calm-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.calm-overlay .calm-text {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 300;
  color: #6b5a47;
  letter-spacing: 0.05em;
  animation: calmBreathe 4s ease-in-out infinite;
}

.calm-overlay .calm-sub {
  margin-top: 1rem;
  font-size: 1rem;
  color: #4a3728;
  opacity: 0.7;
}

@keyframes calmBreathe {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50%      { transform: scale(1.05); opacity: 1; }
}

/* ============================================
   PROGRESS BAR (top of page)
   ============================================ */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c);
  z-index: 10000;
  width: 0%;
  transition: width 0.15s ease-out;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .float-card {
    padding: 10px 14px;
    font-size: 0.75rem;
    border-radius: 12px;
  }

  .fc-1 { top: 8%; left: 4%; }
  .fc-2 { top: 14%; right: 3%; }
  .fc-3 { bottom: 18%; left: 5%; }
  .fc-4 { bottom: 10%; right: 4%; }
  .fc-5 { display: none; }
  .fc-6 { display: none; }

  .feed-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .notif {
    font-size: 0.7rem;
    padding: 8px 12px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.4rem;
  }

  .glitch-title {
    font-size: 2rem;
  }

  .wakeup-title {
    font-size: 2.5rem;
  }
}
