/* =========================================================
   Elif – Modern & Dreamy landing page
   Style: glassmorphism, gradient sky, serif headlines
   ========================================================= */

:root {
  --c-text:       #2a1f3d;
  --c-text-soft:  #5a4a78;
  --c-accent:     #b27cc3;
  --c-accent-2:   #f4a6cd;
  --c-gold:       #e8c66b;
  --c-bg-1:       #fde2f3;
  --c-bg-2:       #d6c7f5;
  --c-bg-3:       #b8e0f6;
  --c-bg-4:       #f8d9c4;

  --radius-lg:    24px;
  --radius-md:    16px;
  --shadow-soft:  0 10px 40px rgba(122, 70, 156, 0.18);
  --glass-bg:     rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.7);

  --font-serif:   "Cormorant Garamond", Georgia, serif;
  --font-sans:    "Quicksand", system-ui, sans-serif;
}

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

html, body {
  min-height: 100%;
  font-family: var(--font-sans);
  color: var(--c-text);
  background: transparent;
  overflow-x: hidden;
}

/* =========================================================
   Animated dreamy background
   ========================================================= */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg,
    var(--c-bg-1) 0%,
    var(--c-bg-2) 35%,
    var(--c-bg-3) 70%,
    var(--c-bg-4) 100%);
  background-size: 200% 200%;
  animation: skyShift 22s ease-in-out infinite alternate;
  overflow: hidden;
}

@keyframes skyShift {
  from { background-position:   0% 0%; }
  to   { background-position: 100% 100%; }
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  mix-blend-mode: screen;
}
.blob-1 { width: 480px; height: 480px; background: #ffb3d9; top: -120px; left: -100px; animation: blobMove 24s ease-in-out infinite alternate; }
.blob-2 { width: 520px; height: 520px; background: #b4d4ff; bottom: -160px; right: -120px; animation: blobMove 28s ease-in-out infinite alternate-reverse; }
.blob-3 { width: 380px; height: 380px; background: #d6b4ff; top: 40%; left: 55%; animation: blobMove 30s ease-in-out infinite alternate; }

@keyframes blobMove {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(60px, -40px) scale(1.15); }
}

.float {
  position: absolute;
  left: var(--x);
  bottom: -60px;
  font-size: 2rem;
  opacity: 0.7;
  animation: floatUp var(--d) linear infinite;
  animation-delay: var(--delay);
  filter: drop-shadow(0 4px 10px rgba(122, 70, 156, 0.25));
  pointer-events: none;
}

@keyframes floatUp {
  0%   { transform: translateY(0) rotate(0deg);     opacity: 0; }
  10%  {                                              opacity: 0.8; }
  90%  {                                              opacity: 0.8; }
  100% { transform: translateY(-110vh) rotate(360deg); opacity: 0; }
}

/* =========================================================
   Glass surface
   ========================================================= */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

/* =========================================================
   Top bar
   ========================================================= */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(120deg, var(--c-accent), var(--c-accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lang-switch {
  display: flex;
  gap: 0.3rem;
  padding: 0.3rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.lang-btn {
  border: 0;
  background: transparent;
  font: 600 0.85rem var(--font-sans);
  color: var(--c-text-soft);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.lang-btn:hover { color: var(--c-text); }
.lang-btn.active {
  background: linear-gradient(120deg, var(--c-accent), var(--c-accent-2));
  color: #fff;
  box-shadow: 0 4px 12px rgba(178, 124, 195, 0.4);
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  max-width: 1200px;
  margin: 1rem auto 3rem;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.hero-card {
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: center;
}

.hero-text { min-width: 0; }

.kicker {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  color: var(--c-accent);
  margin-bottom: 1rem;
}

h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 500;
  line-height: 1.05;
  margin-bottom: 0.5rem;
}

h1 .name {
  display: block;
  background: linear-gradient(120deg, var(--c-accent), var(--c-accent-2), var(--c-gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
  font-style: italic;
}

.age {
  display: inline-block;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--c-accent);
  background: rgba(178, 124, 195, 0.12);
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--c-text-soft);
  max-width: 38ch;
}

.hero-photo {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transform: rotate(-2deg);
  transition: transform 0.4s ease;
  aspect-ratio: 4 / 5;
}
.hero-photo:hover { transform: rotate(0deg) scale(1.02); }
.hero-photo img,
.hero-photo svg.ph { width: 100%; height: 100%; display: block; object-fit: cover; }

.photo-hint,
.img-hint,
.shelf-hint {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.72rem;
  color: var(--c-text-soft);
  opacity: 0.75;
}
.photo-hint {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 0.4rem 0.6rem;
  background: rgba(255, 255, 255, 0.85);
  margin-top: 0;
  text-align: center;
}
.photo-hint code, .img-hint code, .shelf-hint code {
  background: rgba(178, 124, 195, 0.15);
  padding: 0 0.3rem;
  border-radius: 4px;
  font-size: 0.7rem;
}

/* =========================================================
   Countdowns
   ========================================================= */
.counters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
}

.counter-card {
  padding: 1.6rem;
  text-align: center;
  transition: transform 0.3s ease;
}
.counter-card:hover { transform: translateY(-4px); }

.counter-icon { font-size: 2.4rem; margin-bottom: 0.4rem; }

.counter-number {
  font-family: var(--font-serif);
  font-size: 3.4rem;
  font-weight: 700;
  background: linear-gradient(120deg, var(--c-accent), var(--c-accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}

.counter-label {
  margin-top: 0.4rem;
  font-weight: 600;
  color: var(--c-text);
}

.counter-sub {
  margin-top: 0.3rem;
  font-size: 0.85rem;
  color: var(--c-text-soft);
  min-height: 1.2em;
}

#holiday-card.hidden { display: none; }

/* =========================================================
   Section blocks
   ========================================================= */
.section {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.section h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 500;
  text-align: center;
  margin-bottom: 2rem;
}

/* Hobby cards */
.hobby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.hobby-card {
  padding: 1.2rem;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.hobby-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 48px rgba(122, 70, 156, 0.28);
}

.hobby-card img,
.hobby-card .hobby-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md);
  display: block;
  margin-bottom: 1rem;
}

.hobby-card h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.hobby-card p {
  color: var(--c-text-soft);
  line-height: 1.55;
  margin-bottom: 0.6rem;
}

/* =========================================================
   Author / Bookshelf
   ========================================================= */
.author { text-align: center; }

.author-lead {
  max-width: 56ch;
  margin: 0 auto 2.5rem;
  font-size: 1.1rem;
  color: var(--c-text-soft);
  line-height: 1.6;
}

.shelf {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  justify-content: center;
  padding: 2rem 0 1rem;
  position: relative;
}

.shelf::after {
  content: "";
  position: absolute;
  left: 10%; right: 10%; bottom: 0;
  height: 12px;
  background: linear-gradient(90deg, transparent, rgba(122, 70, 156, 0.35), transparent);
  border-radius: 999px;
  filter: blur(4px);
}

.book-spine {
  position: relative;
  width: 120px;
  height: 280px;
  background: linear-gradient(160deg, var(--c1), var(--c2));
  border-radius: 4px 14px 14px 4px;
  box-shadow: 6px 8px 24px rgba(0, 0, 0, 0.18), inset -8px 0 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 0.6rem;
  color: #fff;
  cursor: pointer;
  transition: transform 0.35s ease;
}
.book-spine:hover {
  transform: translateY(-12px) rotate(-2deg);
}

.book-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.badge {
  font-size: 0.65rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--c-text);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.shelf-hint { text-align: center; margin-top: 1rem; }

/* =========================================================
   Footer
   ========================================================= */
.footer {
  max-width: 1200px;
  margin: 3rem auto 2rem;
  padding: 1.4rem 2rem;
  text-align: center;
  color: var(--c-text-soft);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
}

/* =========================================================
   Music toggle (floating bottom-right)
   ========================================================= */
.music-toggle {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem 0.6rem 0.8rem;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  font: 600 0.85rem var(--font-sans);
  color: var(--c-text);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.music-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(122, 70, 156, 0.3);
}

.music-toggle .music-icon {
  font-size: 1.15rem;
  display: inline-block;
}

.music-toggle.playing .music-icon {
  animation: musicPulse 1.4s ease-in-out infinite;
}

@keyframes musicPulse {
  0%, 100% { transform: scale(1)   rotate(0deg); }
  50%      { transform: scale(1.2) rotate(-8deg); }
}

.music-toggle.unavailable {
  opacity: 0.55;
  cursor: not-allowed;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 720px) {
  .topbar { padding: 1rem; }
  .hero-card { grid-template-columns: 1fr; padding: 1.6rem; }
  .hero-photo { transform: none; }
  .section { margin: 3rem auto; }
  .book-spine { width: 90px; height: 220px; }
  .counter-number { font-size: 2.6rem; }
  .music-toggle { right: 0.8rem; bottom: 0.8rem; padding: 0.5rem 0.8rem; }
  .music-toggle .music-label { display: none; }
}
