*,
*::before,
*::after { box-sizing: border-box; }

:root {
  --bg-0: #0b0712;
  --ink: #fff5e6;
  --ink-dim: rgba(255, 245, 230, 0.62);
  --ink-mute: rgba(255, 245, 230, 0.38);
  --gold: #f1c452;
  --gold-soft: #ffe1a0;
  --line: rgba(255, 225, 160, 0.16);
  --card: rgba(20, 8, 18, 0.55);
  --card-border: rgba(241, 196, 82, 0.18);
  --shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.55);
  --maxw: 1040px;
}

html, body { margin: 0; padding: 0; min-height: 100%; }

body {
  font-family: "Heebo", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg-0);
  color: var(--ink);
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ----- BACKGROUND ----- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.bg__sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, #3b0f2a 0%, transparent 60%),
    radial-gradient(900px 500px at 10% 10%, #1d0a2c 0%, transparent 60%),
    linear-gradient(180deg, #07050f 0%, #110718 45%, #2a0915 100%);
}
.bg__skyline {
  position: absolute; inset: auto 0 0 0;
  width: 100%; height: clamp(180px, 28vh, 320px);
  filter: drop-shadow(0 -8px 24px rgba(0, 0, 0, 0.55));
  opacity: 0.95;
}
.bg__moon {
  position: absolute; top: 8%; left: 12%;
  width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff8dc 0%, #f1c452 55%, #b9892f 100%);
  box-shadow: 0 0 60px rgba(241, 196, 82, 0.35), 0 0 120px rgba(241, 196, 82, 0.2);
}
.stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 24% 8%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 35% 30%, #ffe7b5 50%, transparent 51%),
    radial-gradient(1px 1px at 48% 14%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 60% 26%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 72% 10%, #ffe7b5 50%, transparent 51%),
    radial-gradient(1px 1px at 84% 32%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 40%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 45%, #fff 50%, transparent 51%);
  opacity: 0.85;
  animation: twinkle 4.5s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.55; } to { opacity: 1; } }

/* ----- LAYOUT ----- */
.topbar {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 26px 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.02em;
}
.route {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gold-soft);
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 13px;
}
.route svg {
  width: 56px;
  height: 20px;
  color: var(--gold-soft);
  opacity: 0.8;
  transform: scaleX(-1);
}

.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 56px 24px 64px;
}
.hero__inner > * + * { margin-top: 40px; }

.title {
  margin: 0;
  display: grid;
  gap: 4px;
}
.title__big {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-weight: 900;
  font-size: clamp(72px, 13vw, 176px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #fff5e6 0%, #f1c452 55%, #c08027 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  direction: ltr;
}
.title__sub {
  font-weight: 700;
  font-size: clamp(14px, 1.6vw, 18px);
  letter-spacing: 0.4em;
  color: var(--ink-dim);
  direction: ltr;
  padding-top: 6px;
}

/* ----- COUNTDOWN ----- */
.countdown {
  padding: 28px 24px 22px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.countdown__row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  direction: ltr;
}
.track {
  margin-top: 22px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}
.track__lbl {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 700;
}
.track__lbl--gold { color: var(--gold-soft); }
.track__bar {
  height: 3px;
  background: rgba(255, 245, 230, 0.08);
  border-radius: 999px;
  overflow: hidden;
}
.track__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffe1a0, #f1c452, #b9892f);
  border-radius: inherit;
  transition: width 0.6s ease;
}
.unit { text-align: center; }
.num {
  font-family: "Playfair Display", "Heebo", serif;
  font-weight: 900;
  font-style: italic;
  font-size: clamp(48px, 8vw, 110px);
  line-height: 1;
  background: linear-gradient(180deg, #fff5e6 0%, #f1c452 60%, #8a5d1d 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.lbl {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 700;
}
.sep {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-weight: 900;
  font-size: clamp(36px, 6vw, 80px);
  color: var(--ink-mute);
  transform: translateY(-12px);
}

/* ----- CALENDAR ----- */
.calendar { display: grid; gap: 14px; }
.calendar__hd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.calendar__hd h2 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-soft);
  font-weight: 700;
}
.legend {
  display: inline-flex;
  gap: 14px;
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
}
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.lg--past   { background: rgba(255, 87, 112, 0.55); }
.lg--today  { background: var(--gold); box-shadow: 0 0 0 2px rgba(241, 196, 82, 0.25); }
.lg--flight { background: #c91432; box-shadow: 0 0 0 2px rgba(201, 20, 50, 0.3); }

.months {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.month {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 14px 12px 12px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.month__name {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-soft);
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
}
.weekdays, .days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  direction: rtl;
}
.weekday {
  text-align: center;
  font-size: 9.5px;
  color: var(--ink-mute);
  padding: 2px 0 6px;
  letter-spacing: 0.04em;
}
.day {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  color: var(--ink-dim);
  border-radius: 6px;
  position: relative;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.day--empty { color: transparent; }
.day--past {
  color: rgba(255, 245, 230, 0.22);
}
.day--past::after {
  content: "×";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: rgba(255, 87, 112, 0.6);
  line-height: 1;
  pointer-events: none;
}
.day--today {
  background: linear-gradient(180deg, rgba(241, 196, 82, 0.28), rgba(241, 196, 82, 0.14));
  color: var(--gold-soft);
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(241, 196, 82, 0.45);
}
.day--flight {
  background: linear-gradient(180deg, rgba(201, 20, 50, 0.34), rgba(201, 20, 50, 0.18));
  color: #ffd6dd;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(201, 20, 50, 0.5);
  font-size: 14px;
}

/* ----- CREW ----- */
.crew { display: grid; gap: 18px; }
.couples {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.couple {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  background:
    linear-gradient(135deg, rgba(241, 196, 82, 0.14), rgba(201, 20, 50, 0.18)),
    var(--card);
  isolation: isolate;
}
.couple__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
}
.couple::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.55) 78%, rgba(0, 0, 0, 0.85) 100%);
  pointer-events: none;
  z-index: 1;
}
.couple__name {
  position: absolute;
  bottom: 14px;
  inset-inline-start: 16px;
  inset-inline-end: 16px;
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55), 0 1px 2px rgba(0, 0, 0, 0.55);
  z-index: 2;
}
.couple__initials {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-weight: 900;
  font-size: 56px;
  color: var(--gold-soft);
  letter-spacing: 0.04em;
  opacity: 0;
  z-index: 0;
}
.couple--empty .couple__initials { opacity: 1; }

.sheffer {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  align-self: start;
  padding: 10px 16px 10px 12px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: rgba(20, 8, 18, 0.45);
  color: var(--ink-dim);
  font-size: 13.5px;
  width: fit-content;
}
.sheffer svg {
  width: 22px;
  height: 22px;
  color: var(--gold-soft);
  opacity: 0.9;
  flex-shrink: 0;
}
.sheffer strong {
  color: var(--ink);
  font-weight: 700;
  margin-inline-end: 6px;
}

/* ----- RESPONSIVE ----- */
@media (max-width: 800px) {
  .topbar {
    padding: 20px max(18px, env(safe-area-inset-right)) 0 max(18px, env(safe-area-inset-left));
  }
  .hero {
    padding: 32px max(18px, env(safe-area-inset-right)) 56px max(18px, env(safe-area-inset-left));
  }
  .hero__inner > * + * { margin-top: 28px; }
  .couples { grid-template-columns: 1fr; gap: 14px; }
  .couple { aspect-ratio: 4 / 3; }
  .countdown { padding: 20px 16px 18px; }
  .countdown__row { gap: 4px; }
  .sep { transform: translateY(-6px); }
  .title__big { font-size: clamp(64px, 16vw, 132px); }
  .title__sub { font-size: 13px; letter-spacing: 0.36em; }
}

@media (max-width: 560px) {
  .bg__moon { width: 90px; height: 90px; top: 6%; left: 8%; }
  .brand { font-size: 18px; }
  .route { font-size: 11px; gap: 8px; }
  .route svg { width: 44px; height: 16px; }

  .title__big { font-size: clamp(56px, 17vw, 96px); line-height: 0.92; }
  .title__sub { font-size: 12px; letter-spacing: 0.36em; padding-top: 4px; }

  .countdown { padding: 18px 14px 16px; }
  .countdown__row {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  .sep { display: none; }
  .num { font-size: clamp(30px, 10vw, 44px); }
  .lbl { font-size: 9px; letter-spacing: 0.18em; margin-top: 6px; }
  .track { margin-top: 16px; gap: 10px; }
  .track__lbl { font-size: 10px; letter-spacing: 0.18em; }

  .couple__name { font-size: 15px; bottom: 10px; inset-inline-start: 12px; inset-inline-end: 12px; }
  .couple__initials { font-size: 38px; }

  .months { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .month { padding: 12px 10px 10px; }
  .day { font-size: 11px; }
  .day--past::after { font-size: 16px; }
  .calendar__hd { gap: 8px; }
  .legend { font-size: 10px; gap: 10px; }

  .sheffer { font-size: 13px; padding: 9px 14px 9px 10px; }
  .sheffer svg { width: 20px; height: 20px; }
}

@media (max-width: 360px) {
  .topbar { padding: 16px 14px 0; }
  .hero { padding: 24px 14px 40px; }
  .title__big { font-size: 52px; }
  .countdown { padding: 14px 10px 14px; }
  .countdown__row { gap: 4px; }
  .num { font-size: 28px; }
  .lbl { font-size: 8.5px; letter-spacing: 0.14em; }
  .route { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .stars, .dot { animation: none; }
}
