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

:root {
  --gold: #c9a84c;
  --gold-light: #f0d080;
  --white: #f0efec;
  --dark: #020810;
  --font-body: 'DM Sans', -apple-system, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
}

html { scroll-behavior: auto; }

body {
  background: var(--dark);
  color: var(--white);
  font-family: var(--font-body);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

/* ─────────────────────────────────────────
   CANVAS & OVERLAYS
───────────────────────────────────────── */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

#vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 60%, transparent 35%, rgba(2,8,16,0.72) 100%);
}

/* ─────────────────────────────────────────
   INTRO
───────────────────────────────────────── */
#intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 8, 16, 0.55);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}

.intro-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding: 0 24px;
  animation: fadeUp 1.2s ease both;
}

.intro-for {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  animation: fadeUp 1s ease 0.2s both;
}

.intro-name {
  font-family: var(--font-display);
  font-size: clamp(64px, 18vw, 92px);
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1;
  background: linear-gradient(150deg, #ffffff 30%, var(--gold-light) 70%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeUp 1s ease 0.4s both;
}

.intro-star {
  font-size: 28px;
  display: block;
  margin-top: 4px;
  animation: pulse 2.5s ease-in-out infinite, fadeUp 1s ease 0.6s both;
}

#start-btn {
  margin-top: 36px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.85);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  padding: 14px 28px 14px 22px;
  border-radius: 50px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.25s, border-color 0.25s, transform 0.15s;
  animation: fadeUp 1s ease 1s both;
}

.btn-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
  animation: blink 1.6s ease-in-out infinite;
}

#start-btn:active {
  transform: scale(0.95);
  background: rgba(255,255,255,0.1);
}

/* ─────────────────────────────────────────
   EXPERIENCE
───────────────────────────────────────── */
#experience {
  position: relative;
  z-index: 10;
}

#experience.hidden { display: none; }

#story { position: relative; }

/* ─────────────────────────────────────────
   STORY SECTIONS
───────────────────────────────────────── */
.scene-section {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
  position: relative;
}

.text-card {
  max-width: 320px;
  opacity: 0;
  transform: translateY(28px);
  will-change: opacity, transform;
}

/* Alignment variants */
[data-pos="left"]  .text-card { margin-right: auto; margin-left: 0;    text-align: left; }
[data-pos="right"] .text-card { margin-left: auto;  margin-right: 0;   text-align: right; }
[data-pos="center"] .text-card { text-align: center; margin: 0 auto; }

.tl {
  display: block;
  font-size: clamp(22px, 5.8vw, 30px);
  font-weight: 300;
  line-height: 1.45;
  color: #ffffff;
  text-shadow: 0 2px 32px rgba(0,0,0,0.95), 0 0 80px rgba(0,0,0,0.7);
}

.tl-d1 {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.88);
}

.tl-italic { font-style: italic; }

/* ─────────────────────────────────────────
   CINEMATIC APPROACH (no text, pure visual)
───────────────────────────────────────── */
#cinematic-approach {
  height: 80vh;
  pointer-events: none;
}

/* ─────────────────────────────────────────
   FINAL SECTION
───────────────────────────────────────── */
#final-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#fw-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  display: none;
  pointer-events: none;
}

#final-text {
  position: relative;
  z-index: 20;
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  padding: 40px 28px;
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
}

#ft-main {
  font-family: var(--font-display);
  font-size: clamp(26px, 6.5vw, 46px);
  font-weight: 700;
  line-height: 1.3;
  background: linear-gradient(135deg, #ffffff 0%, var(--gold-light) 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  filter: drop-shadow(0 0 20px rgba(201,168,76,0.4));
}

#ft-sig {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(18px, 4.5vw, 26px);
  color: rgba(255,255,255,0.5);
  opacity: 0;
  margin-top: 14px;
  letter-spacing: 0.05em;
}

/* ─────────────────────────────────────────
   SCROLL HINT
───────────────────────────────────────── */
#scroll-hint {
  position: fixed;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

#scroll-hint.visible {
  opacity: 1;
  pointer-events: auto;
}

.sh-arrow {
  font-size: 22px;
  color: rgba(255, 255, 255, 0.55);
  animation: sh-bounce 1.6s ease-in-out infinite;
  display: block;
  line-height: 1;
}

.sh-label {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

@keyframes sh-bounce {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(7px); }
}

/* ─────────────────────────────────────────
   PROGRESS BAR
───────────────────────────────────────── */
#prog-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  z-index: 1000;
  pointer-events: none;
  transition: width 0.12s linear;
}

/* ─────────────────────────────────────────
   KEYFRAMES
───────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.18); }
}

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

/* ─────────────────────────────────────────
   SAFE AREA / MOBILE
───────────────────────────────────────── */
@supports (padding: env(safe-area-inset-bottom)) {
  .scene-section {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

@media (max-height: 600px) {
  .intro-name { font-size: 52px; }
  .scene-section { height: 100svh; }
}
