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

:root {
  --bg: #0A0A0A;
  --bg-card: #161616;
  --bg-card-light: #1e1e1e;
  --blue-dark: #1a1a4e;
  --blue-mid: #2d2d7f;
  --blue-light: #4a9eff;
  --amber: #D4A574;
  --amber-soft: #b8926e;
  --text: #ffffff;
  --text-dim: #a0a0a0;
  --text-faint: #666666;
  --radius: 12px;
  --radius-lg: 16px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  padding-bottom: 0;
  min-height: 100dvh;
}

img {
  display: block;
  max-width: 100%;
}

button {
  border: none;
  cursor: pointer;
  font-family: inherit;
}

/* ==================== LANDING SECTIONS ==================== */
.section {
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.section-player {
  min-height: 100dvh;
}

.section-about {
  min-height: auto;
}

/* ==================== PLAYER SECTION ==================== */
.section-player {
  background: linear-gradient(180deg, #1a2744 0%, #0f1a30 40%, #0A0A0A 100%);
  padding-top: env(safe-area-inset-top, 20px);
}

.player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.player-title-top {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.player-chevron, .player-dots {
  opacity: 0.7;
}

.player-artwork {
  margin: 8px auto 24px;
  width: min(85vw, 340px);
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.player-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-info {
  max-width: 380px;
  margin: 0 auto;
  width: 100%;
}

.player-song-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.player-song {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
}

.player-artist {
  font-size: 14px;
  color: var(--text-dim);
  margin-top: 2px;
}

.player-progress {
  margin-bottom: 12px;
}

.player-progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  overflow: hidden;
}

.player-progress-fill {
  width: 0%;
  height: 100%;
  background: white;
  border-radius: 2px;
  transition: width 0.3s linear;
}

.player-times {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 4px;
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.player-play-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-play-btn .icon-play {
  margin-left: 3px;
}

.player-play-btn .icon-pause {
  margin-left: 0;
}

/* Spotify embed */
.spotify-embed {
  max-width: 380px;
  margin: 16px auto 0;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.spotify-embed iframe {
  display: block;
}

.scroll-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-dim);
  animation: bounceDown 2s ease-in-out infinite;
}

@keyframes bounceDown {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ==================== ABOUT SECTION ==================== */
.section-about {
  padding: 32px 20px;
}

.about-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 400px;
  margin: 0 auto;
  width: 100%;
}

.about-photo {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-names {
  font-size: 24px;
  font-weight: 800;
  padding: 20px 20px 4px;
}

.about-since {
  font-size: 14px;
  color: var(--text-dim);
  padding: 0 20px 16px;
}

.counter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0 16px 16px;
}

.counter-grid:first-of-type {
  margin-bottom: 0;
}

.counter-item {
  background: var(--bg-card-light);
  border-radius: var(--radius);
  padding: 14px 8px;
  text-align: center;
}

.counter-number {
  display: block;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.counter-label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* second row: 5 items need different grid */
.counter-grid {
  grid-template-columns: repeat(5, 1fr);
}

/* ==================== MESSAGE SECTION ==================== */
.section-message {
  padding: 40px 20px;
  min-height: auto;
}

.message-card {
  background: linear-gradient(135deg, #3a6ea5 0%, #4a8ec9 100%);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 400px;
  margin: 0 auto;
  width: 100%;
}

.message-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.message-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.5s ease;
  opacity: 0;
}

.message-content.open {
  max-height: 500px;
  opacity: 1;
}

.message-content p {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
}

.message-toggle {
  background: white;
  color: #1a1a1a;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 50px;
  margin-top: 16px;
  transition: transform 0.2s;
}

.message-toggle:active {
  transform: scale(0.96);
}

/* ==================== MOMENTS SECTION ==================== */
.section-moments {
  padding: 32px 20px;
  min-height: auto;
}

.moments-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.photos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  max-width: 400px;
  margin: 0 auto;
}

.photo-item {
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  border-radius: 4px;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.photo-item:active img {
  transform: scale(1.05);
}

/* ==================== WRAPPED CTA ==================== */
.section-wrapped-cta {
  background: var(--bg);
  padding: 60px 20px 160px;
  min-height: auto;
  text-align: center;
  position: relative;
}

.wrapped-cta-shapes {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(180, 60, 60, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 30%, rgba(180, 60, 80, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.wrapped-cta-content {
  position: relative;
  z-index: 1;
}

.wrapped-cta-title {
  font-size: clamp(28px, 8vw, 40px);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 12px;
}

.wrapped-cta-sub {
  font-size: 16px;
  color: var(--text-dim);
  margin-bottom: 32px;
}

.wrapped-cta-btn {
  background: #e0e0e0;
  color: #0A0A0A;
  font-size: 16px;
  font-weight: 700;
  padding: 16px 48px;
  border-radius: 50px;
  transition: transform 0.2s;
}

.wrapped-cta-btn:active {
  transform: scale(0.96);
}

/* ==================== LIGHTBOX ==================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 910;
  background: none;
  color: white;
  font-size: 32px;
  padding: 8px;
}

.lightbox-swiper {
  width: 100%;
  height: 80dvh;
}

.lightbox-swiper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-swiper .swiper-slide img {
  max-width: 90vw;
  max-height: 75dvh;
  object-fit: contain;
  border-radius: var(--radius);
}

/* ==================== WRAPPED STORIES ==================== */
.wrapped {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #0A0A0A;
  display: none;
}

.wrapped.open {
  display: block;
}

.wrapped-progress {
  position: absolute;
  top: env(safe-area-inset-top, 8px);
  left: 8px;
  right: 8px;
  z-index: 1010;
  display: flex;
  gap: 4px;
  padding-top: 8px;
}

.progress-segment {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  overflow: hidden;
}

.progress-segment-fill {
  width: 0%;
  height: 100%;
  background: white;
  border-radius: 2px;
  transition: width 0.3s linear;
}

.progress-segment.done .progress-segment-fill {
  width: 100%;
}

.progress-segment.active .progress-segment-fill {
  width: 100%;
  transition: width 5s linear;
}

.wrapped-swiper {
  width: 100%;
  height: 100dvh;
}

.wrapped-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Slide backgrounds */
.wrapped-slide[data-bg="gradient-1"] {
  background: linear-gradient(135deg, #0f1a30 0%, #1a1a4e 50%, #0A0A0A 100%);
}

.wrapped-slide[data-bg="gradient-2"] {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d4e 100%);
}

.wrapped-slide[data-bg="gradient-3"] {
  background: linear-gradient(135deg, #1a2a1a 0%, #0A0A0A 100%);
}

.wrapped-slide[data-bg="gradient-4"] {
  background: linear-gradient(135deg, #1a1a4e 0%, #4e1a4e 50%, #0A0A0A 100%);
}

.wrapped-slide[data-bg="dark"] {
  background: #050505;
}

.wrapped-slide[data-bg="gradient-warm"] {
  background: linear-gradient(135deg, #1a1a1a 0%, #3d2b1a 50%, #4e3a2a 100%);
}

.wrapped-slide[data-bg="proposal"] {
  background: linear-gradient(135deg, #0A0A0A 0%, #1a1520 40%, #2a1a2a 100%);
}

.wrapped-slide[data-bg="photo"] {
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
}

/* Story content */
.story-content {
  padding: 60px 28px;
  text-align: center;
  width: 100%;
}

.story-overlay {
  background: linear-gradient(transparent 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.8) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 120px;
}

.story-overlay-bottom {
  justify-content: flex-end;
  padding-bottom: 100px;
}

.story-date {
  font-size: clamp(32px, 9vw, 48px);
  font-weight: 900;
  line-height: 1.1;
  opacity: 0;
}

.story-text {
  font-size: clamp(24px, 7vw, 36px);
  font-weight: 600;
  line-height: 1.4;
  opacity: 0;
}

.story-text-bold {
  font-size: clamp(28px, 8vw, 42px);
  font-weight: 900;
  line-height: 1.2;
  margin-top: 8px;
  opacity: 0;
}

.story-text-small {
  font-size: clamp(16px, 4.5vw, 20px);
  font-weight: 400;
  color: var(--text-dim);
  line-height: 1.4;
  margin-top: 8px;
  opacity: 0;
}

.story-text-fade {
  font-size: clamp(22px, 6vw, 32px);
  font-weight: 400;
  color: var(--text-dim);
  line-height: 1.4;
  opacity: 0;
}

.story-number {
  font-size: clamp(64px, 20vw, 120px);
  font-weight: 900;
  line-height: 1;
  opacity: 0;
}

.story-route {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-dim);
  opacity: 0;
}

.story-photos {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 20px;
  opacity: 0;
}

.story-photo {
  width: 45%;
  max-width: 160px;
  aspect-ratio: 0.8;
  object-fit: cover;
  border-radius: var(--radius);
}

.story-proposal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.story-proposal-ask {
  font-size: clamp(28px, 8vw, 44px);
  font-weight: 900;
  margin-top: 32px;
  color: var(--amber);
  opacity: 0;
}

.proposal-line-1,
.proposal-line-2,
.proposal-line-3 {
  font-size: clamp(22px, 6.5vw, 34px);
  font-weight: 600;
  line-height: 1.4;
}

/* Tap zones */
.wrapped-tap {
  position: absolute;
  top: 60px;
  bottom: 0;
  z-index: 1005;
}

.wrapped-tap-left {
  left: 0;
  width: 30%;
}

.wrapped-tap-right {
  right: 0;
  width: 70%;
}

.wrapped-close {
  position: absolute;
  top: env(safe-area-inset-top, 8px);
  right: 12px;
  z-index: 1020;
  background: none;
  color: white;
  font-size: 28px;
  padding: 20px 8px 8px;
  opacity: 0.7;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
  width: 0;
  background: transparent;
}

/* ==================== UTILITIES ==================== */
.hidden {
  display: none !important;
}
