﻿@font-face {
  font-family: "The Nautigal";
  src: url("./fonts/TheNautigal-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "The Nautigal";
  src: url("./fonts/TheNautigal-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Fz Qellia";
  src: url("./fonts/Fz_Qellia_Fix.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("./fonts/Lora-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("./fonts/CormorantGaramond-Variable.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --gold: #9e753c;
  --gold-dark: #80571e;
  --cream: rgba(249, 241, 230, 0.98);
  --cream-solid: #f9f1e6;
  --ink: #3a2e22;
  --page: #f5efe6;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Lora, "Times New Roman", serif;
  color: var(--ink);
  background: var(--page);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; }

/* ===== COVER ===== */
.cover {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  transition: opacity .7s ease, visibility .7s ease;
}
.cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.cover-petals {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.cover-petals span {
  position: absolute;
  top: -40px;
  width: 14px;
  height: 14px;
  background: radial-gradient(circle at 30% 30%, #fff8ee, #e8d5b5);
  border-radius: 60% 40% 60% 40%;
  opacity: .55;
  animation: petal-fall linear infinite;
}
@keyframes petal-fall {
  0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
  10% { opacity: .55; }
  100% { transform: translateY(110vh) translateX(var(--sway, 20px)) rotate(360deg); opacity: 0; }
}

.cover-card-wrap {
  position: relative;
  width: min(92vw, 600px);
  max-width: 600px;
}
.cover-card {
  position: relative;
  border-radius: 8px;
  overflow: visible;
  min-height: 420px;
}
.cover-card-bg {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: var(--cream);
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
  overflow: hidden;
}
.cover-flower {
  position: absolute;
  pointer-events: none;
  z-index: 2;
}
.cover-flower-tr {
  top: 0; right: 0;
  width: 46%;
  max-width: 280px;
  transform: translate(12%, -12%);
  opacity: .95;
}
.cover-flower-tl {
  top: 0; left: 0;
  width: 46%;
  max-width: 280px;
  transform: translate(-12%, -12%) scaleX(-1);
}
.cover-flower-bottom {
  bottom: 0; left: 50%;
  width: 92%;
  max-width: 480px;
  transform: translate(-50%, 36%);
  opacity: .95;
  z-index: 1;
}
.cover-content {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 7rem 1.5rem 3.5rem;
}
.cover-heart {
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 30%, var(--gold), var(--gold-dark));
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
.cover-names {
  margin: 1.25rem 0 .5rem;
  font-family: "The Nautigal", cursive;
  font-weight: 400;
  font-size: clamp(2.2rem, 6vw, 2.75rem);
  line-height: 1.05;
  color: var(--gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .05em;
}
.cover-names.arabic-names,
.person-name.arabic-names {
  font-family: Amiri, Cairo, "Segoe UI", Tahoma, sans-serif;
  font-weight: 700;
  letter-spacing: 0;
  direction: rtl;
  unicode-bidi: isolate;
}
.cover-names.arabic-names {
  font-size: clamp(2.4rem, 7vw, 3.1rem);
  line-height: 1.25;
  gap: .12em;
}
.cover-names .amp { font-size: .85em; line-height: 1; font-family: "The Nautigal", cursive; direction: ltr; }
.person-fullname-en {
  margin-top: 2px;
  font-size: 11px;
  letter-spacing: .04em;
  color: #8a7355;
  line-height: 1.3;
  max-width: 140px;
}
.cover-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  margin: .75rem auto 1rem;
  color: var(--gold);
}
.cover-divider .line {
  display: block;
  width: 54px;
  height: 1px;
  background: var(--gold);
  opacity: .7;
}
.cover-divider .dot { font-size: .85rem; }
.cover-date {
  margin: 0;
  font-family: Lora, "Times New Roman", serif;
  font-size: 1.15rem;
  color: var(--gold);
}
.cover-invite {
  margin: .55rem 0 1.5rem;
  font-family: Lora, "Times New Roman", serif;
  font-size: 1rem;
  color: var(--gold);
}
.open-btn {
  background: var(--gold);
  color: #fff;
  border-radius: 999px;
  padding: 10px 32px;
  font-size: 1.125rem;
  font-weight: 600;
  font-family: Lora, "Times New Roman", serif;
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
  transition: transform .2s ease, box-shadow .2s ease;
}
.open-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0,0,0,.22); }

/* ===== INVITE PAGE ===== */
.invite {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 0 80px;
  overflow: hidden;
}
.invite[hidden] { display: none !important; }
.castle-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.castle-top, .castle-bottom {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 300%;
  max-width: none;
  opacity: .15;
  height: auto;
}
.castle-top { top: 120px; }
.castle-bottom { bottom: 0; }

.section { position: relative; padding: 12px 0 28px; }
.section-title {
  margin: 0;
  font-family: "Times New Roman", Times, serif;
  font-weight: 700;
  font-size: clamp(20px, 4vw, 26px);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--gold);
}
.section-sub {
  margin: 14px auto 0;
  max-width: 320px;
  text-align: center;
  font-size: 14px;
  line-height: 1.55;
  color: #5a4a38;
}
.section-kicker {
  margin: 18px 0 8px;
  font-family: "Times New Roman", Times, serif;
  font-weight: 600;
  font-size: clamp(14px, 3vw, 18px);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gold);
}

/* Ceremony frame */
.frame-block {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 133%;
  max-width: none;
  aspect-ratio: 588 / 688;
}
.frame-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 0;
}
.lantern-top {
  position: absolute;
  top: 3%;
  width: 5.8%;
  z-index: 10;
  height: auto;
}
.lantern-top.left { left: 21%; }
.lantern-top.right { right: 21%; }
.calligraphy {
  position: absolute;
  top: 16%;
  left: 50%;
  transform: translateX(-50%);
  width: 33%;
  z-index: 10;
}
.flower-corner {
  position: absolute;
  z-index: 20;
  height: auto;
  max-width: none;
}
.flower-corner.tl {
  top: -10%; left: -8%; width: 38%;
  transform: scaleX(-1);
}
.flower-corner.tr { top: -10%; right: -8%; width: 38%; }
.flower-corner.bl { bottom: -4%; left: -9%; width: 50%; }
.flower-corner.br {
  bottom: -4%; right: -9%; width: 50%;
  transform: scaleX(-1);
}
.frame-content {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18% 18% 16%;
  text-align: center;
}
.couple {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
  width: 100%;
}
.person {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
.person-name {
  margin: 0;
  font-family: "Fz Qellia", serif;
  font-size: clamp(28px, 7vw, 38px);
  font-weight: 400;
  color: var(--gold);
  line-height: 1.2;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.person-name.arabic-names {
  font-size: clamp(30px, 7.5vw, 42px);
  min-height: 48px;
}
.person-role {
  margin-top: 4px;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #7a6548;
}
.couple-ring {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding-top: 8px;
}

/* Reception / venue decor blocks */
.decor-block {
  position: relative;
  isolation: isolate;
  padding: 52px 14px 24px;
  z-index: 10;
}
.golden-frame-img {
  pointer-events: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -30px;
  width: 102%;
  max-width: none;
  height: auto;
  z-index: 0;
  object-fit: contain;
}
.venue-frame { top: -46px; }
.side-flower, .side-leaf, .side-lantern {
  pointer-events: none;
  position: absolute;
  max-width: none;
  height: auto;
  z-index: 2;
}
.side-flower.left {
  top: 42%; left: -46%; width: 70%;
  transform: translateY(40px);
}
.side-leaf.right {
  top: 63%; right: -14%; width: 29%;
  transform: translateY(40px);
}
.side-lantern.left {
  top: 68%; left: 7%; width: 8%; z-index: 1;
  transform: translateY(24px);
}
.side-lantern.right {
  top: 79%; right: 0; width: 8%; z-index: 1;
  transform: translateY(24px);
}
.side-leaf.left.flip {
  top: 19%; left: -12%; width: 34%;
  transform: translateY(40px) rotate(180deg);
}
.side-flower.right.angled {
  top: 28%; right: -40%; width: 70%;
  transform: translateY(40px) rotate(20.86deg);
}
.side-lantern.left.mid {
  top: 30%; left: 5%; width: 9%;
  transform: translateY(24px);
}
.side-lantern.right.mid2 {
  top: 45%; right: 2%; width: 9%;
  transform: translateY(24px);
}
.decor-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.event-time {
  margin: 10px 0 4px;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(42px, 10vw, 56px);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .04em;
}
.event-date-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: "Times New Roman", Times, serif;
  color: var(--gold);
  text-transform: uppercase;
}
.event-date-row span { font-size: clamp(12px, 3vw, 16px); }
.event-date-row .day-num {
  font-size: clamp(30px, 7vw, 40px);
  font-weight: 700;
  line-height: 1;
}
.event-date-row .sep { opacity: .55; }
.event-year {
  margin: 4px 0 0;
  font-size: clamp(14px, 3vw, 18px);
  color: var(--gold);
  letter-spacing: .2em;
}

.countdown-label {
  margin: 28px 0 8px;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(14px, 3vw, 18px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gold);
}
.countdown {
  margin: 0;
  font-size: clamp(15px, 3.5vw, 18px);
  color: #5a4a38;
}

.calendar-wrap {
  position: relative;
  margin: 32px auto 0;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 403 / 364;
}
.calendar-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.calendar-inner {
  position: absolute;
  inset: 14% 16% 18% 16%;
  display: flex;
  flex-direction: column;
  z-index: 2;
}
.cal-month {
  margin: 0 0 8px;
  text-align: center;
  font-family: "Times New Roman", Times, serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .06em;
}
.cal-weekdays, .cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}
.cal-weekdays span {
  font-size: 11px;
  color: #8a7355;
  padding: 2px 0;
}
.cal-days span {
  position: relative;
  font-size: 12px;
  color: #4a3c2c;
  padding: 6px 0;
  line-height: 1;
}
.cal-days span.empty { visibility: hidden; }
.cal-days span.heart-day {
  font-weight: 700;
  color: #fff;
  z-index: 1;
}
.cal-days span.heart-day::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 24px;
  transform: translate(-50%, -50%);
  background: url("./assets/heart.webp") center / contain no-repeat;
  z-index: -1;
}

.add-cal, .map-link {
  margin-top: 18px;
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 4px;
  letter-spacing: .06em;
  font-size: 14px;
}
.map-link { margin-top: 12px; }

.venue-address {
  margin: 14px auto 18px;
  max-width: 360px;
  font-size: 15px;
  line-height: 1.5;
  color: #4a3c2c;
}
.map-wrap {
  width: min(92%, 520px);
  aspect-ratio: 16 / 11;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  border: 1px solid rgba(158,117,60,.25);
}
.map-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.divider-line {
  width: 240px;
  margin: 24px auto 20px;
  height: auto;
}

.schedule {
  text-align: center;
  padding-bottom: 28px;
  overflow: visible;
}
.schedule-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 28px auto 18px;
}
.cake-icon {
  position: absolute;
  right: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 46px;
  object-fit: contain;
}
.sched-time {
  font-size: 17px;
  color: #4a3c2c;
  letter-spacing: .04em;
}
.sched-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}
.sched-name {
  font-size: 18px;
  font-weight: 500;
  color: #4a3c2c;
}
.closing {
  margin: 12px auto 0;
  max-width: 360px;
  font-size: clamp(14px, 3.5vw, 18px);
  line-height: 1.55;
  color: #5a4a38;
}
.flower-bottom-page {
  position: relative;
  display: block;
  left: 50%;
  transform: translateX(-50%);
  width: 125%;
  max-width: none;
  margin: 28px 0 0;
  pointer-events: none;
  z-index: 0;
}
.maker-credit {
  position: relative;
  z-index: 3;
  margin: 4px 0 0;
  padding: 14px 12px 22px;
  text-align: center;
  font-family: "Cairo", "Amiri", sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0;
  color: #9e753c;
  opacity: 0.6;
}
.maker-credit p {
  margin: 0;
}
.maker-credit a {
  color: inherit;
  text-decoration: none;
  border-bottom: none;
}

@media (min-width: 768px) {
  .decor-block { padding: 68px 28px 40px; }
  .golden-frame-img { width: 86%; }
  .calendar-wrap { max-width: 480px; }
  .divider-line { width: 300px; }
  .side-lantern.left { top: 83%; }
  .side-lantern.left.mid { top: 38%; }
  .side-lantern.right.mid2 { top: 58%; }
  .flower-bottom-page { width: 100%; }
  .cover-content { padding-top: 6rem; padding-bottom: 2rem; }
}

@media (max-width: 640px) {
  .frame-block { width: 118%; }
  .person-name { font-size: 28px; min-height: 60px; }
  .side-flower.left, .side-flower.right.angled { width: 58%; }
  .side-flower.left { left: -38%; }
  .side-flower.right.angled { right: -32%; }
}

/* ===== MUSIC TOGGLE ===== */
.mute-btn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(145deg, var(--gold), var(--gold-dark));
  box-shadow: 0 8px 22px rgba(80, 55, 20, 0.35);
  transition: transform .2s ease, box-shadow .2s ease, opacity .25s ease;
}
.mute-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(80, 55, 20, 0.42);
}
.mute-btn[hidden] { display: none !important; }
.mute-btn .mute-icon-off { display: none; }
.mute-btn.is-muted .mute-icon-on { display: none; }
.mute-btn.is-muted .mute-icon-off { display: block; }
