/* ============ RESET + BASE ============ */
html, body { margin: 0; padding: 0; }
body {
  background: #0d120f;
  font-family: "PT Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: #ece7d7;
}
a { color: inherit; text-decoration: none; }
* { -webkit-tap-highlight-color: transparent; box-sizing: border-box; }

/* ============ THEMES ============ */
#root {
  --bg:#1b241f; --bg-hi:#26332c; --bg-deep:#141c17; --panel:#232f29;
  --ink:#ece7d7; --muted:#9aa79b; --line:rgba(201,162,74,.26);
  --gold:#c9a24a; --gold-2:#e6cf8e;
  --m1:#f0dca0; --m2:#c9a24a; --m3:#9c7628;
  position:relative; width:100%; background:var(--bg); color:var(--ink); overflow:hidden;
  transition: background .8s ease, color .8s ease;
}
#root[data-theme="burgundy"] {
  --bg:#241417; --bg-hi:#361a20; --bg-deep:#180d0f; --panel:#2f1f23;
  --ink:#f1e3df; --muted:#bb9aa0; --line:rgba(207,157,122,.28);
  --gold:#cf9d7a; --gold-2:#eac6ac;
  --m1:#f4dcc6; --m2:#cf9d7a; --m3:#9c6a48;
}
#root[data-theme="midnight"] {
  --bg:#131a26; --bg-hi:#1c2740; --bg-deep:#0d1420; --panel:#1c2434;
  --ink:#e7ecf3; --muted:#94a1b6; --line:rgba(185,194,208,.26);
  --gold:#b9c2d0; --gold-2:#e3e9f1;
  --m1:#eff3f8; --m2:#c2ccda; --m3:#8a93a3;
}
#root[data-theme="plum"] {
  --bg:#201826; --bg-hi:#2f2039; --bg-deep:#160f1c; --panel:#2a2032;
  --ink:#efe6ec; --muted:#a99ab2; --line:rgba(201,138,90,.28);
  --gold:#c98a5a; --gold-2:#e8bd93;
  --m1:#f1cca7; --m2:#c98a5a; --m3:#945f36;
}

/* ============ KEYFRAMES ============ */
@keyframes softUp { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:none} }
@keyframes nameGlow {
  0% { opacity:0; transform:translateY(18px) scale(.94); letter-spacing:.06em; filter:blur(6px); }
  60% { filter:blur(0); }
  100% { opacity:1; transform:none; letter-spacing:0; filter:none; }
}
@keyframes drawLine { to { stroke-dashoffset: 0; } }
@keyframes shimmer { 0%{background-position:-160% 0} 100%{background-position:260% 0} }
@keyframes floatUp {
  0%   { transform: translateY(30px) rotate(0); opacity:0; }
  10%  { opacity:.85; }
  90%  { opacity:.7; }
  100% { transform: translateY(-108vh) rotate(320deg); opacity:0; }
}
@keyframes sway { 0%,100%{transform:translateX(0)} 50%{transform:translateX(26px)} }
@keyframes hintB { 0%,100%{transform:translateY(0);opacity:.5} 50%{transform:translateY(7px);opacity:1} }
@keyframes ringPulse { 0%{transform:scale(1);opacity:.8} 100%{transform:scale(2.4);opacity:0} }
@keyframes musicPulse { 0%,100%{box-shadow:0 0 0 0 rgba(201,162,74,.55)} 50%{box-shadow:0 0 0 12px rgba(201,162,74,0)} }

.g-name > .hero-name { animation: nameGlow 1.6s cubic-bezier(.2,.7,.2,1) both; }
.g-name > .hero-name:nth-of-type(2) { animation-delay: .8s !important; }
.g-fade { animation: softUp 1.1s ease-out both; }
.draw { stroke-dashoffset: 360; animation: drawLine 2s ease-out .5s forwards; }
.shine {
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: shimmer 6.5s linear infinite;
}

/* ============ LANG SWITCH ============ */
.lang-switch {
  position: fixed; top: 18px; left: 18px; z-index: 81;
  display: flex; gap: 4px;
  padding: 4px;
  background: rgba(0,0,0,.5);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.lang-switch a {
  padding: 5px 10px;
  font: 700 11px/1 'PT Sans', sans-serif;
  color: var(--muted);
  border-radius: 999px;
  text-transform: uppercase;
  transition: background .2s, color .2s;
}
.lang-switch a.active {
  background: var(--gold);
  color: var(--bg);
}
.lang-switch a:not(.active):hover { color: var(--gold-2); }

/* ============ THEME SWITCH ============ */
.theme-switch {
  position: fixed; top: 18px; left: 130px; z-index: 80;
  display: flex; gap: 7px; align-items: center;
  padding: 6px;
  background: rgba(0,0,0,.5);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.theme-switch button {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.25); cursor: pointer;
  transition: transform .2s;
}
.theme-switch button:hover { transform: scale(1.15); }
.theme-switch button.active { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.3); }

/* ============ MUSIC BUTTON ============ */
#music-toggle {
  position: fixed; top: 18px; right: 18px; z-index: 80;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--gold);
  background: rgba(0,0,0,.5);
  color: var(--gold-2); font-size: 17px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  animation: musicPulse 2.4s ease-out infinite;
  transition: transform .2s;
}
#music-toggle:hover { transform: scale(1.1); }

/* ============ COVER (portal-open overlay) ============ */
@keyframes coverPortalOpen {
  0%   { transform: scale(1);   opacity: 1; filter: blur(0); }
  30%  { transform: scale(1.15); opacity: .95; }
  100% { transform: scale(3.8); opacity: 0; filter: blur(24px); }
}
@keyframes coverFadeIn { 0%{opacity:0;transform:scale(1.03)} 100%{opacity:1;transform:none} }
@keyframes coverSealGrow {
  0%   { transform: scale(1); box-shadow: 0 0 0 0 var(--gold); opacity:1; }
  40%  { transform: scale(2.2); box-shadow: 0 0 80px 30px var(--gold); }
  100% { transform: scale(12); box-shadow: 0 0 300px 100px var(--gold); opacity:0; }
}
@keyframes coverHintPulse { 0%,100%{opacity:.55;transform:translateY(0)} 50%{opacity:1;transform:translateY(-3px)} }
@keyframes coverSparkleFloat {
  0%   { transform: translate(0,0) scale(0); opacity: 0; }
  10%  { transform: translate(var(--sx1), var(--sy1)) scale(1); opacity: 1; }
  100% { transform: translate(var(--sx2), var(--sy2)) scale(.2); opacity: 0; }
}

#cover {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: radial-gradient(120% 80% at 50% 12%, var(--bg-hi) 0%, var(--bg) 55%, var(--bg-deep) 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  cursor: pointer;
  padding: 40px;
  box-sizing: border-box;
  transform-origin: 50% 50%;
  animation: coverFadeIn 1.2s ease-out both;
}
#cover.opening {
  animation: coverPortalOpen 1.6s cubic-bezier(.65,0,.35,1) forwards;
  pointer-events: none;
}
#cover.opening .cover-seal {
  animation: coverSealGrow 1.5s cubic-bezier(.55,0,.4,1) forwards;
}
#cover.opening .cover-hint { opacity: 0 !important; transition: opacity .3s; }

.cover-frame { position: absolute; pointer-events: none; }
.cover-frame-1 { inset: 20px; border: 1px solid var(--line); }
.cover-frame-2 { inset: 30px; border: 1px solid var(--line); opacity: .45; }
.cover-corner { position: absolute; width: 130px; height: 130px; pointer-events: none; }
.cover-corner-tl { top: 16px; left: 16px; }
.cover-corner-tr { top: 16px; right: 16px; transform: scaleX(-1); }
.cover-corner-bl { bottom: 16px; left: 16px; transform: scaleY(-1); }
.cover-corner-br { bottom: 16px; right: 16px; transform: scale(-1); }

.cover-eyebrow {
  position: relative;
  font: 400 12px/1 'PT Serif', serif;
  letter-spacing: .42em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 20px;
}
.cover-names { position: relative; text-align: center; line-height: 1.3; }
.cover-name {
  display: block;
  font-family: 'Great Vibes', cursive;
  font-size: 76px;
  padding: 0.1em 0.15em;
  background-image: linear-gradient(105deg, var(--m3), var(--m1) 35%, #fff7e2 50%, var(--m1) 65%, var(--m3));
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 0 10px rgba(201,162,74,.4));
}
.cover-and {
  display: block;
  font: italic 400 24px/1 'PT Serif', serif;
  color: var(--muted);
  margin: 4px 0;
}
.cover-divider {
  width: 44px; height: 1px; background: var(--gold);
  margin: 26px 0;
  position: relative;
}
.cover-seal {
  width: 82px; height: 82px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.cover-seal > svg { width: 62px; height: 46px; display: block; }
.cover-hint {
  position: absolute; bottom: 40px;
  font: 700 11px/1.4 'PT Sans', sans-serif;
  letter-spacing: .24em; text-transform: uppercase;
  color: var(--gold-2);
  animation: coverHintPulse 2.2s ease-in-out infinite;
}

#cover-sparkles {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.cover-sparkle {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, var(--gold) 40%, transparent 70%);
  box-shadow: 0 0 8px 2px var(--gold);
  animation: coverSparkleFloat 2.8s ease-out forwards;
}

/* ============ PETALS ============ */
#petals {
  position: absolute; inset: 0; overflow: hidden;
  pointer-events: none; z-index: 1;
}
.petal {
  position: absolute; bottom: -40px;
  border-radius: 0 100% 0 100%;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  will-change: transform, opacity;
}

/* ============ HERO ============ */
.hero {
  position: relative; z-index: 2;
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 90px 30px 100px;
  background: radial-gradient(130% 80% at 50% 8%, var(--bg-hi) 0%, var(--bg) 52%, var(--bg-deep) 100%);
}
.frame { position: absolute; pointer-events: none; }
.frame-1 { inset: 20px; border: 1px solid var(--line); }
.frame-2 { inset: 28px; border: 1px solid var(--line); opacity: .45; }
.corner { position: absolute; width: 130px; height: 130px; pointer-events: none; z-index: 3; }
.corner-tl { top: 16px; left: 16px; }
.corner-tr { top: 16px; right: 16px; transform: scaleX(-1); }
.corner-bl { bottom: 16px; left: 16px; transform: scaleY(-1); }
.corner-br { bottom: 16px; right: 16px; transform: scale(-1); }

.g-name { position: relative; }
.hero-name {
  display: block;
  font-family: 'Great Vibes', cursive;
  font-size: 104px;
  line-height: 1.3;
  padding: 0.1em 0.15em;
  background-image: linear-gradient(105deg, var(--m3), var(--m1) 35%, #fff7e2 50%, var(--m1) 65%, var(--m3));
  filter: drop-shadow(0 0 10px rgba(201,162,74,.4));
}
.hero-and {
  display: block;
  font-family: 'PT Serif', serif; font-style: italic;
  font-size: 30px; color: var(--muted);
  margin: 6px 0;
}
.hero-quote {
  margin: 30px auto 0; max-width: 520px;
  font: 400 17px/1.7 'PT Serif', serif; font-style: italic;
  color: var(--ink);
  position: relative; z-index: 3;
}
.hero-date-row {
  margin-top: 36px;
  display: flex; align-items: center; gap: 22px;
  font: 700 13px/1.3 'PT Sans', sans-serif;
  letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
  position: relative; z-index: 3;
}
.hero-day-block { display: flex; align-items: center; gap: 16px; }
.hero-vline { width: 1px; height: 38px; background: var(--line); }
.hero-day { font: 500 58px/1 'Playfair Display', serif; color: var(--gold-2); letter-spacing: 0; }
.hero-time {
  margin-top: 14px;
  font: 700 15px/1 'PT Sans', sans-serif;
  letter-spacing: .24em; color: var(--gold-2);
  position: relative; z-index: 3;
}
.scroll-hint {
  position: absolute; bottom: 34px; left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  color: var(--muted);
}
.scroll-hint span {
  font: 700 10px/1 'PT Sans', sans-serif;
  letter-spacing: .3em; text-transform: uppercase;
}
.scroll-hint svg { animation: hintB 2s ease-in-out infinite; }

/* ============ SECTIONS ============ */
.sec {
  position: relative; z-index: 2;
  padding: 90px 30px;
  text-align: center;
}
.eyebrow {
  font: 700 11px/1 'PT Sans', sans-serif;
  letter-spacing: .3em; text-transform: uppercase; color: var(--gold-2);
}
.section-title {
  margin: 10px 0 46px;
  font: 600 40px/1.1 'Playfair Display', serif;
  color: var(--ink);
}

/* Countdown */
.countdown-section {
  background: linear-gradient(180deg, var(--bg-deep), var(--bg));
}
#countdown {
  margin: 30px auto 0; max-width: 600px;
  display: flex; justify-content: center; align-items: stretch;
}
.cd-cell { flex: 1; padding: 0 4px; }
.cd-num {
  font: 500 62px/1 'Playfair Display', serif;
  color: var(--gold-2);
  font-variant-numeric: tabular-nums;
}
.cd-lbl {
  margin-top: 10px;
  font: 700 11px/1 'PT Sans', sans-serif;
  letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
}
.cd-sep { width: 1px; margin: 4px 0; background: var(--line); align-self: stretch; }

/* Quote */
.quote-section { padding: 100px 30px; }
.rings-wrap { margin: 0 auto 30px; width: 110px; height: 88px; }
.big-quote {
  margin: 0 auto; max-width: 760px;
  font: 400 34px/1.5 'Playfair Display', serif; font-style: italic;
  color: var(--ink);
}
.quote-hr {
  margin: 36px auto 0;
  width: 56px; height: 1px; background: var(--gold);
}
.quote-body {
  margin: 24px auto 0; max-width: 600px;
  font: 400 15px/1.75 'PT Sans', sans-serif; color: var(--muted);
}

/* Event details */
.event-section { background: var(--bg-deep); }
.event-grid {
  max-width: 960px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.event-card {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 34px 26px;
  text-align: center;
  transition: transform .3s ease, box-shadow .3s ease;
}
.event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(201,162,74,.15);
}
.event-icon { margin: 0 auto 16px; width: 46px; height: 46px; }
.event-icon svg { width: 100%; height: 100%; display: block; }
.event-eyebrow {
  font: 700 10px/1 'PT Sans', sans-serif;
  letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
.event-value {
  margin-top: 10px;
  font: 600 22px/1.3 'Playfair Display', serif; color: var(--ink);
}
.event-sub {
  margin-top: 4px;
  font: 400 13px/1.4 'PT Sans', sans-serif; color: var(--muted);
}

/* Program */
.program-timeline {
  max-width: 620px; margin: 0 auto; position: relative;
}
.program-line {
  position: absolute; left: 70px; top: 6px; bottom: 6px;
  width: 1px; background: var(--line);
}
.program-item {
  display: flex; gap: 26px; align-items: flex-start;
  padding: 16px 0;
  text-align: left;
}
.program-time {
  width: 56px; flex: none; text-align: right;
  font: 600 19px/1.2 'Playfair Display', serif; color: var(--gold-2);
}
.program-dot-wrap {
  position: relative; width: 28px; flex: none;
  display: flex; justify-content: center; padding-top: 5px;
}
.program-dot {
  width: 11px; height: 11px;
  background: var(--gold); border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(201,162,74,.18);
}
.program-title {
  font: 700 16px/1.3 'PT Sans', sans-serif; color: var(--ink);
}
.program-desc {
  margin-top: 3px;
  font: 400 13.5px/1.5 'PT Sans', sans-serif; color: var(--muted);
}

/* Route */
.route-section { background: var(--bg-deep); }
.route-grid {
  max-width: 960px; margin: 0 auto;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 26px; align-items: stretch;
}
.route-map {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); background: var(--panel);
  min-height: 320px;
}
.route-map img { width: 100%; height: 100%; object-fit: cover; display: block; }
.map-pin {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 5; pointer-events: none;
}
.map-pin-ring {
  position: absolute; left: 50%; top: 50%;
  width: 16px; height: 16px; margin: -8px 0 0 -8px;
  border-radius: 50%; background: var(--gold);
  animation: ringPulse 2s ease-out infinite;
}
.map-pin-dot {
  position: relative;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--gold-2);
  box-shadow: 0 0 0 3px var(--bg);
  display: block;
}
.route-info {
  border: 1px solid var(--line); background: var(--panel);
  padding: 32px 30px;
  display: flex; flex-direction: column; justify-content: center; gap: 20px;
  text-align: left;
}
.route-block .route-eyebrow {
  font: 700 10px/1.5 'PT Sans', sans-serif;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.route-value {
  margin-top: 5px;
  font: 400 15px/1.5 'PT Sans', sans-serif; color: var(--ink);
}
.route-buttons {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px;
}
.route-buttons a {
  text-align: center; padding: 12px 4px;
  border: 1px solid var(--line);
  background: var(--bg-hi);
  font: 700 12px/1.1 'PT Sans', sans-serif; color: var(--gold-2);
  transition: background .2s;
}
.route-buttons a:hover { background: var(--gold); color: var(--bg); }
.route-phone {
  margin-top: 5px; display: inline-block;
  font: 700 16px/1.4 'PT Sans', sans-serif; color: var(--gold-2);
}

/* Footer */
.footer {
  position: relative; z-index: 2;
  padding: 96px 30px 104px;
  text-align: center;
  background: radial-gradient(130% 100% at 50% 100%, var(--bg-hi), var(--bg-deep));
}
.footer .corner { opacity: .85; }
.footer-names {
  font-family: 'Great Vibes', cursive;
  font-size: 62px; line-height: 1.3;
  padding: 0.1em 0.15em;
  background-image: linear-gradient(105deg, var(--m3), var(--m1) 35%, #fff7e2 50%, var(--m1) 65%, var(--m3));
  position: relative; z-index: 3;
}
.footer-and {
  font-family: 'PT Serif', serif; font-style: italic;
  font-size: 26px;
  -webkit-text-fill-color: var(--muted) !important;
  color: var(--muted) !important;
}
.footer-sub {
  margin-top: 16px;
  font: 400 12px/1.5 'PT Sans', sans-serif;
  letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
  position: relative; z-index: 3;
}
.footer-hr {
  width: 40px; height: 1px; background: var(--gold); margin: 26px auto;
  position: relative; z-index: 3;
}
.footer-contact-label {
  font: 700 9px/1 'PT Sans', sans-serif;
  letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
  position: relative; z-index: 3;
}
.footer-phone {
  display: inline-block; margin-top: 9px;
  font: 700 17px/1 'PT Sans', sans-serif; color: var(--gold-2);
  position: relative; z-index: 3;
}
.footer-kutib {
  margin-top: 34px;
  font: 400 11px/1 'PT Sans', sans-serif;
  color: var(--muted); opacity: .7;
  position: relative; z-index: 3;
}

/* Reveal — CSS animation fires automatically at load (fallback if JS fails).
   If JS is active, it hides with .pre and re-reveals with .in on scroll. */
@keyframes revealBase {
  0%   { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: none; }
}
[data-reveal] {
  animation: revealBase 1s cubic-bezier(.2,.7,.2,1) .2s both;
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
}
[data-reveal].pre {
  animation: none;
  opacity: 0; transform: translateY(20px);
}
[data-reveal].in {
  animation: none;
  opacity: 1; transform: none;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 720px) {
  .hero-name { font-size: 64px !important; }
  .footer-names { font-size: 42px !important; }
  .sec { padding-left: 22px !important; padding-right: 22px !important; }
  .event-grid { grid-template-columns: 1fr !important; }
  .route-grid { grid-template-columns: 1fr !important; }
  .cd-num { font-size: 38px !important; }
  .big-quote { font-size: 22px !important; }
  .section-title { font-size: 28px !important; }
  .hero-date-row { gap: 12px; font-size: 11px; }
  .hero-day { font-size: 44px; }
  .hero-vline { height: 30px; }
  .corner { width: 90px; height: 90px; }
  .theme-switch { top: 12px; left: 12px; }
  #music-toggle { top: 12px; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .draw { stroke-dashoffset: 0 !important; }
}
