/* ── Variables ───────────────────────────────────────── */
:root {
  --navy:   #0a0e1a;
  --navy2:  #0f1629;
  --cream:  #f5ecd9;
  --gold:   #d4af37;
  --gold2:  #b8962e;
  --muted:  rgba(245,236,217,0.55);
  --text:   rgba(245,236,217,0.88);
  --ff-heb: 'Frank Ruhl Libre', 'David', serif;
  --ff-lat: 'Cormorant Garamond', Georgia, serif;
  --ease:   cubic-bezier(0.16,1,0.3,1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--navy);
  color: var(--text);
  font-family: var(--ff-heb);
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.9;
  overflow-x: hidden;
  direction: rtl;
}

#particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ── Reveal animations ───────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── HERO ────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 1;
  padding: 2rem 1.5rem;
}

.hero-inner { position: relative; z-index: 2; }

.hero-label {
  font-family: var(--ff-lat);
  font-size: clamp(0.75rem, 1.5vw, 0.9rem);
  letter-spacing: 0.35em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  opacity: 0;
  animation: fadeUp 1s var(--ease) 0.3s forwards;
}

.hero-thirty {
  font-size: clamp(7rem, 22vw, 18rem);
  font-weight: 900;
  color: var(--cream);
  line-height: 1;
  cursor: pointer;
  user-select: none;
  letter-spacing: -0.03em;
  opacity: 0;
  animation: fadeUp 1.1s var(--ease) 0.6s forwards;
  transition: color 0.3s, text-shadow 0.3s;
  -webkit-tap-highlight-color: transparent;
}
.hero-thirty:hover, .hero-thirty:active {
  color: var(--gold);
  text-shadow: 0 0 60px rgba(212,175,55,0.35);
}

.hero-name {
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  font-weight: 300;
  color: var(--gold);
  letter-spacing: 0.12em;
  margin-top: 0.15em;
  opacity: 0;
  animation: fadeUp 1s var(--ease) 0.9s forwards;
}

.hero-subtitle {
  font-family: var(--ff-lat);
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--muted);
  margin-top: 1.5rem;
  font-style: italic;
  letter-spacing: 0.04em;
  min-height: 2em;
  opacity: 0;
  animation: fadeUp 1s var(--ease) 1.2s forwards;
}

.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  animation: fadeIn 1s ease 2s forwards;
}
.scroll-dot {
  animation: scrollBounce 2s ease-in-out infinite;
}

/* ── General section spacing ─────────────────────────── */
.section {
  position: relative;
  z-index: 1;
  padding: clamp(3rem, 8vw, 6rem) clamp(1.25rem, 5vw, 3rem);
}

.container {
  max-width: 720px;
  margin: 0 auto;
}

/* ── Letter ──────────────────────────────────────────── */
.letter-section { background: var(--navy2); }

.letter-wrap {
  border-right: 2px solid rgba(212,175,55,0.25);
  padding-right: clamp(1.5rem, 4vw, 2.5rem);
}

.letter-open {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 1.8rem;
}

.letter-para {
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  color: var(--text);
  margin-bottom: 1.8rem;
  line-height: 2;
}

.letter-close .letter-wrap { border: none; text-align: center; }

.letter-sign {
  font-family: var(--ff-lat);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-style: italic;
  color: var(--cream);
  margin-bottom: 2rem;
}
.letter-sign span { color: var(--gold); }

.sig-art svg {
  width: 100%;
  max-width: 400px;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 0 20px rgba(212,175,55,0.3));
}

/* ── Photo sections ──────────────────────────────────── */
.photo-section { background: var(--navy); }

.photo-pair {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.photo-pair--left { direction: ltr; }
.photo-pair--left .photo-text { direction: rtl; }

.photo-frame {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 4/3;
  background: rgba(255,255,255,0.03);
}

.photo-frame--portrait { aspect-ratio: 3/4; }

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 8s linear;
}
.photo-frame.visible img { transform: scale(1.06); }

.img-error-placeholder {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--muted);
}
.photo-frame.img-error img { display: none; }
.photo-frame.img-error .img-error-placeholder { display: flex; }

.photo-text { padding: 1rem 0; }

.eyebrow {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.photo-text h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 300;
  color: var(--cream);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.photo-text p {
  font-size: clamp(1rem, 1.8vw, 1.1rem);
  color: var(--text);
  line-height: 1.9;
}

/* ── Song Player ─────────────────────────────────────── */
.song-section { background: var(--navy2); }

.song-card {
  background: rgba(212,175,55,0.06);
  border: 1px solid rgba(212,175,55,0.18);
  border-radius: 12px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 1.5rem;
}

.song-top { margin-bottom: 1.25rem; }

.song-eyebrow {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.song-title {
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  font-weight: 700;
  color: var(--cream);
}

#waveform {
  width: 100%;
  height: 56px;
  display: block;
  margin: 1rem 0;
}

.song-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  direction: ltr;
}

.play-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: transparent;
  color: var(--gold);
  font-size: 1.2rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.play-btn:hover, .play-btn.playing {
  background: var(--gold);
  color: var(--navy);
}

.song-progress { flex: 1; }
.progress-bar {
  height: 20px;
  background: transparent;
  border-radius: 2px;
  overflow: visible;
  margin-bottom: 0.4rem;
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.progress-bar::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 3px;
  background: rgba(212,175,55,0.2);
  border-radius: 2px;
}
.progress-fill {
  height: 3px;
  width: 0%;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.25s linear;
  position: relative;
  z-index: 1;
}
.progress-fill::after {
  content: '';
  position: absolute;
  right: -7px; top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(212,175,55,.8);
}

.song-time {
  font-size: 0.75rem;
  color: var(--muted);
  font-family: monospace;
}

.song-unavail {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted);
  text-align: center;
}
.song-unavail.hidden { display: none; }

.ambient-row { text-align: center; }

.ambient-btn {
  background: transparent;
  border: 1px solid rgba(212,175,55,0.3);
  color: var(--muted);
  padding: 0.5rem 1.25rem;
  border-radius: 99px;
  cursor: pointer;
  font-size: 0.875rem;
  font-family: var(--ff-heb);
  transition: border-color 0.2s, color 0.2s;
}
.ambient-btn:hover, .ambient-btn.active {
  border-color: var(--gold);
  color: var(--gold);
}

/* ── Footer ──────────────────────────────────────────── */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--navy);
  text-align: center;
  padding: clamp(3rem, 8vw, 5rem) 1.5rem;
  border-top: 1px solid rgba(212,175,55,0.1);
}

.footer-num {
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 900;
  color: rgba(212,175,55,0.08);
  line-height: 1;
  margin-bottom: 0.5rem;
  user-select: none;
}

.footer-text {
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  color: var(--muted);
  margin-bottom: 1rem;
}

.footer-hint {
  font-size: 0.8rem;
  color: rgba(245,236,217,0.3);
}

/* ── Easter Egg ──────────────────────────────────────── */
.easter-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10,14,26,0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.easter-overlay.visible {
  opacity: 1;
  pointer-events: all;
}
.easter-overlay.hidden { display: none; }

.easter-inner {
  text-align: center;
  padding: 2rem;
  position: relative;
  z-index: 2;
  max-width: 500px;
}

.easter-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.easter-big {
  font-size: clamp(6rem, 20vw, 12rem);
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
  animation: pulse 1.5s ease-in-out infinite;
}

.easter-msg {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--cream);
  margin-top: 1.5rem;
  line-height: 1.8;
}

.easter-close {
  margin-top: 2rem;
  background: transparent;
  border: 1px solid rgba(212,175,55,0.4);
  color: var(--muted);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  transition: border-color 0.2s, color 0.2s;
}
.easter-close:hover { border-color: var(--gold); color: var(--gold); }

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

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 0.6; }
}

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

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

@keyframes starFly {
  0%   { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-120px) scale(0); opacity: 0; }
}

/* ── Progress bar seek ───────────────────────────── */

/* ── Song picker ─────────────────────────────────── */
.song-picker { display: flex; gap: .5rem; margin: .5rem 0 .75rem; }
.song-pick {
  padding: .3rem .9rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: transparent;
  color: inherit;
  font-size: .8rem;
  cursor: pointer;
  transition: background .2s, border-color .2s, opacity .2s;
  opacity: .6;
}
.song-pick.active { background: rgba(212,175,55,.2); border-color: #d4af37; opacity: 1; }
.song-pick:hover:not(.active) { opacity: .9; background: rgba(255,255,255,.08); }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 700px) {
  .photo-pair {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .photo-pair--left { direction: rtl; }
  .photo-frame { aspect-ratio: 16/9; }
  .photo-frame--portrait { aspect-ratio: 4/3; }
}
