/* ═══════════════════════════════════════
   Design Tokens
═══════════════════════════════════════ */
:root {
  --pink: #FFB7D5;
  --blue: #9DD9FF;
  --purple: #D9C6FF;
  --bg: #0F1117;
  --surface: #1A1D26;
  --text: #FFFFFF;
  --text-secondary: #B7BCC7;
  --gradient: linear-gradient(135deg, #FFB7D5, #D9C6FF, #9DD9FF);
  --font-en: 'Sora', sans-serif;
  --font-fa: 'Peyda', sans-serif;
  --glass-bg: rgba(26, 29, 38, 0.55);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: 20px;
}

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

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  font-family: var(--font-en);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.loading { overflow: hidden; }

/* ═══════════════════════════════════════
   0 — Loading Screen
═══════════════════════════════════════ */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  text-align: center;
  width: min(320px, 80vw);
}

.loader-line {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  min-height: 1.6em;
  transition: color 0.3s ease;
}

.loader-line.welcome {
  font-size: 1.6rem;
  font-weight: 500;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.loader-bar {
  margin-top: 2rem;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient);
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* ═══════════════════════════════════════
   Ambient Glows
═══════════════════════════════════════ */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(120px);
  opacity: 0.3;
}

.ambient-glow--pink {
  width: 500px;
  height: 500px;
  background: var(--pink);
  top: -10%;
  left: -8%;
}

.ambient-glow--blue {
  width: 500px;
  height: 500px;
  background: var(--blue);
  bottom: -10%;
  right: -8%;
}

/* ═══════════════════════════════════════
   Sections
═══════════════════════════════════════ */
.section {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
}

/* ═══════════════════════════════════════
   1 — Hero
═══════════════════════════════════════ */
.section--hero {
  flex-direction: column;
  overflow: hidden;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 50%, rgba(255, 183, 213, 0.25), transparent),
    radial-gradient(ellipse 60% 50% at 80% 50%, rgba(157, 217, 255, 0.25), transparent),
    linear-gradient(135deg, rgba(255, 183, 213, 0.08), rgba(157, 217, 255, 0.08));
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-line {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.scroll-hint {
  margin-top: 3rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: float-hint 3s ease-in-out infinite;
}

@keyframes float-hint {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(8px); opacity: 1; }
}

/* ═══════════════════════════════════════
   Glass Card
═══════════════════════════════════════ */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.glass-card--center {
  text-align: center;
  max-width: 520px;
  width: 100%;
}

.glass-card--wide {
  max-width: 560px;
}

/* ═══════════════════════════════════════
   Questions
═══════════════════════════════════════ */
.section--question {
  flex-direction: column;
}

.q-panel {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: center;
}

.q-panel--active {
  display: flex;
}

.question-text {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 2.5rem;
}

.answer-label {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-align: center;
}

.answer-text {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  text-align: center;
  letter-spacing: -0.02em;
}

.answer-text--gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 500;
}

/* ═══════════════════════════════════════
   Buttons
═══════════════════════════════════════ */
.btn-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-group--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.btn {
  font-family: var(--font-en);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn--pink:hover {
  background: rgba(255, 183, 213, 0.15);
  border-color: var(--pink);
  box-shadow: 0 0 30px rgba(255, 183, 213, 0.4), 0 0 60px rgba(255, 183, 213, 0.15);
  transform: translateY(-2px);
}

.btn--blue:hover {
  background: rgba(157, 217, 255, 0.15);
  border-color: var(--blue);
  box-shadow: 0 0 30px rgba(157, 217, 255, 0.4), 0 0 60px rgba(157, 217, 255, 0.15);
  transform: translateY(-2px);
}

.btn--gradient {
  background: var(--gradient);
  border: none;
  color: var(--bg);
  font-weight: 600;
  padding: 1rem 3rem;
  font-size: 1.05rem;
}

.btn--gradient:hover {
  box-shadow: 0 0 40px rgba(255, 183, 213, 0.4);
  transform: translateY(-2px);
}

.btn:active { transform: scale(0.97); }

/* ═══════════════════════════════════════
   Photos
═══════════════════════════════════════ */
.section--photo {
  flex-direction: column;
  gap: 2rem;
}

.photo-tilt-wrap {
  perspective: 1000px;
}

.photo-tilt {
  width: min(420px, 85vw);
  border-radius: 16px;
  transform: rotate(-4deg);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(255, 183, 213, 0.15);
  transition: transform 0.5s ease;
}

.photo-tilt:hover {
  transform: rotate(-2deg) scale(1.02);
}

.photo-caption {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 300;
  font-style: italic;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.6;
}

/* Photo 2 — scroll zoom */
.section--photo-zoom {
  padding: 0;
  min-height: 120vh;
  flex-direction: column;
  justify-content: flex-start;
}

.photo-zoom-container {
  width: 100%;
  height: 70vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-zoom-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

.photo-zoom-text {
  padding: 3rem 2rem 5rem;
  text-align: center;
}

/* Photo 3 — full width */
.section--photo-full {
  padding: 0;
  min-height: 80vh;
}

.photo-full-wrap {
  position: relative;
  width: 100%;
  min-height: 80vh;
  overflow: hidden;
}

.photo-full-img {
  width: 100%;
  height: 80vh;
  object-fit: cover;
  display: block;
}

.photo-full-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 17, 23, 0.5);
}

.photo-full-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  z-index: 2;
}

.parallax-line {
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.parallax-line--gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 500;
}

/* ═══════════════════════════════════════
   3 — Time
═══════════════════════════════════════ */
.section--time { flex-direction: column; }

.time-container {
  text-align: center;
  width: 100%;
  max-width: 700px;
}

.time-stat { margin-bottom: 2.5rem; }

.time-number {
  display: block;
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 700;
  line-height: 1;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
}

.time-label {
  display: block;
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--text-secondary);
  margin-top: 0.5rem;
  font-weight: 300;
  letter-spacing: 0.08em;
}

.time-ending {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 300;
  font-style: italic;
  color: var(--text-secondary);
  margin-top: 2rem;
  line-height: 1.6;
}

/* ═══════════════════════════════════════
   5 — Memory Choice
═══════════════════════════════════════ */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  width: 100%;
  max-width: 900px;
}

.memory-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.45s ease,
              border-color 0.45s ease,
              padding 0.45s ease;
  overflow: hidden;
}

.memory-card:hover {
  transform: scale(1.05) rotate(1.5deg);
  border-color: rgba(255, 183, 213, 0.3);
  box-shadow: 0 0 40px rgba(255, 183, 213, 0.2), 0 20px 40px rgba(0, 0, 0, 0.3);
}

.memory-card:nth-child(2):hover { transform: scale(1.05) rotate(-1.5deg); }

.memory-card.active {
  transform: scale(1.03);
  border-color: rgba(157, 217, 255, 0.35);
  box-shadow: 0 0 50px rgba(157, 217, 255, 0.2);
  padding-bottom: 2rem;
}

.memory-emoji {
  display: block;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.memory-title {
  font-size: 1.1rem;
  font-weight: 500;
}

.memory-detail {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.5s ease, margin-top 0.5s ease;
}

.memory-card.active .memory-detail {
  max-height: 120px;
  opacity: 1;
  margin-top: 1.25rem;
}

/* ═══════════════════════════════════════
   6 — Developer
═══════════════════════════════════════ */
.glass-card--terminal {
  max-width: 560px;
  width: 100%;
  padding: 0;
  overflow: hidden;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot--pink { background: var(--pink); }
.terminal-dot--purple { background: var(--purple); }
.terminal-dot--blue { background: var(--blue); }

.terminal-title {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.terminal-body {
  padding: 1.5rem 1.25rem 2rem;
  font-size: 0.95rem;
}

.terminal-line {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  min-height: 1.5em;
}

.terminal-prompt { color: var(--pink); margin-right: 0.5rem; }

.cursor-blink {
  color: var(--blue);
  animation: blink 1s step-end infinite;
}

.cursor-blink.hidden { display: none; }

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

.terminal-checks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  transform: translateX(-10px);
}

.check-icon { font-weight: 700; font-size: 1.1rem; }
.check-item:nth-child(1) .check-icon { color: var(--pink); }
.check-item:nth-child(2) .check-icon { color: var(--purple); }
.check-item:nth-child(3) .check-icon { color: var(--blue); }

.terminal-result {
  opacity: 0;
  transform: translateY(10px);
  padding-top: 1rem;
  border-top: 1px solid var(--glass-border);
}

.result-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.result-text {
  font-size: 1.15rem;
  font-weight: 500;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ═══════════════════════════════════════
   7 — Final Question
═══════════════════════════════════════ */
.final-content { text-align: center; }

.final-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  margin-bottom: 2.5rem;
  letter-spacing: -0.02em;
}

.btn-group--final { gap: 1.25rem; }
.btn--final { padding: 1rem 2.5rem; font-size: 1.05rem; }

/* ═══════════════════════════════════════
   Season End — fullscreen photo
═══════════════════════════════════════ */
.section--season-end {
  padding: 0;
  min-height: 100vh;
  position: relative;
}

.season-end-bg {
  position: absolute;
  inset: 0;
}

.season-end-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.season-end-blur {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  background: rgba(15, 17, 23, 0.35);
}

.season-end-text {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
}

.season-line {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 400;
  opacity: 0;
  transform: translateY(20px);
  line-height: 1.5;
}

.season-line--2 {
  margin-top: 1.5rem;
  font-weight: 500;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ═══════════════════════════════════════
   Ending
═══════════════════════════════════════ */
.section--ending {
  background: #F5F3F0;
  color: #1A1D26;
  min-height: 100vh;
}

.ending-content {
  text-align: center;
}

.ending-content--final {
  display: none;
}

.ending-content--final.visible {
  display: block;
}

.ending-tbc {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 300;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #FFB7D5, #9DD9FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ═══════════════════════════════════════
   GSAP initial states
═══════════════════════════════════════ */
.gs-reveal {
  opacity: 0;
  transform: translateY(30px);
}

/* ═══════════════════════════════════════
   Responsive
═══════════════════════════════════════ */
@media (max-width: 600px) {
  .section { padding: 3rem 1.25rem; }
  .glass-card { padding: 2rem 1.5rem; }
  .memory-grid { grid-template-columns: 1fr; max-width: 320px; }
  .btn-group:not(.btn-group--grid) { flex-direction: column; align-items: center; }
  .btn-group:not(.btn-group--grid) .btn { width: 100%; max-width: 280px; }
  .section--photo-zoom,
  .section--photo-full,
  .section--season-end { padding: 0; }
}
