/* =========================================================
   Shahzoda — white pigeons take off from a Bukhara courtyard;
   the little prince on his decorated horse. Sunnat toʻy.
   Built on shared/base.css; this sheet is the look.
   ========================================================= */

:root {
  --bg: #fbf6ec;
  --ink: #22305c;
  --ink-soft: #66708f;
  --accent: #1f4fa3;
  --accent-deep: #173c80;
  --accent-soft: #e3eaf7;
  --gold: #c39233;
  --gold-soft: #e9cf8f;
  --pomegranate: #b3262f;
  --line: rgba(31, 79, 163, 0.14);
  --line-strong: rgba(31, 79, 163, 0.3);
  --surface: #fffdf8;
  --on-accent: #fdf7e8;
  --shadow: 23 50 110;
  --glow: rgba(255, 251, 242, 0.95);
  --intro-bg: #2b2117;

  --display: "Forum", "Lora", serif;
  --body: "Lora", Georgia, serif;
  --label: "Lora", Georgia, serif;

  --open-default: url("/styles/shahzoda/media/open-poster.jpg");
  --amb-poster: url("/styles/shahzoda/media/amb-poster.jpg");
  --close-poster: url("/styles/shahzoda/media/close-poster.jpg");
  --dissolve: 2s;
  --pulse: rgba(255, 244, 214, 0.95);
  --pulse-glow: rgba(255, 214, 140, 0.6);
  --music-fg: #173c80;

  /* a strip of Bukhara tiles: gold eight-point stars on lapis */
  --tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Crect width='32' height='32' fill='%23173c80'/%3E%3Cg fill='%23d9a944'%3E%3Crect x='10' y='10' width='12' height='12'/%3E%3Crect x='10' y='10' width='12' height='12' transform='rotate(45 16 16)'/%3E%3C/g%3E%3Ccircle cx='16' cy='16' r='3' fill='%23fbf6ec'/%3E%3Cg fill='%2357a8c9'%3E%3Ccircle cx='0' cy='0' r='2.5'/%3E%3Ccircle cx='32' cy='0' r='2.5'/%3E%3Ccircle cx='0' cy='32' r='2.5'/%3E%3Ccircle cx='32' cy='32' r='2.5'/%3E%3C/g%3E%3C/svg%3E");
}

body {
  font-size: 18px;
}

.label {
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.26em;
  color: var(--gold);
}

/* ---------- Opening ---------- */

.intro__kicker {
  color: #f6e2b0;
  text-shadow: 0 1px 10px rgba(30, 20, 10, 0.8);
}

.intro__to {
  font-size: clamp(32px, 9vw, 42px);
  color: #fffaf0;
  text-shadow: 0 2px 18px rgba(30, 20, 10, 0.85), 0 0 4px rgba(30, 20, 10, 0.5);
}

.intro__hint {
  font-family: var(--label);
  letter-spacing: 0.14em;
}

/* ---------- Hero ---------- */

.hero__veil {
  background:
    radial-gradient(ellipse 90% 30% at 50% 21%, rgba(255, 251, 242, 0.78), rgba(255, 251, 242, 0) 72%),
    linear-gradient(to bottom, rgba(251, 246, 236, 0) 80%, rgba(251, 246, 236, 0.85) 94%, var(--bg) 100%);
}

.hero__kicker {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 0 0 4px;
  font-family: var(--label);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: #9a6f1c;
}

/* a small gold eight-point star */
.star {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--gold);
  clip-path: polygon(50% 0, 62% 26%, 85% 15%, 74% 38%, 100% 50%, 74% 62%, 85% 85%, 62% 74%, 50% 100%, 38% 74%, 15% 85%, 26% 62%, 0 50%, 26% 38%, 15% 15%, 38% 26%);
}

.name {
  white-space: nowrap;
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(54px, 16.5vw, 78px);
  line-height: 1.02;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-deep);
  text-shadow: 0 2px 0 rgba(233, 207, 143, 0.9), 0 0 24px var(--glow), 0 0 8px var(--glow);
}

.hero__sub {
  margin: 6px 0 0;
  font-style: italic;
  font-size: 19px;
  color: var(--ink);
  text-shadow: 0 0 12px var(--glow), 0 0 4px var(--glow);
}

.hero__date {
  position: absolute;
  left: 50%;
  bottom: max(98px, calc(env(safe-area-inset-bottom) + 86px));
  translate: -50% 0;
  margin: 0;
  padding: 9px 20px;
  border-radius: 999px;
  background: rgba(23, 60, 128, 0.88);
  border: 1px solid var(--gold-soft);
  white-space: nowrap;
  font-family: var(--label);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fbeccb;
  box-shadow: 0 12px 26px -14px rgb(var(--shadow) / 0.8);
}

.hero.is-in .hero__kicker {
  animation: rise 1.8s var(--ease) 0.5s both;
}

/* the name rises like a banner being raised */
.hero.is-in .name {
  animation: raise 2.4s var(--ease) 1s both;
}

.hero.is-in .hero__sub {
  animation: rise 1.8s var(--ease) 2.2s both;
}

.hero.is-in .hero__date {
  animation: rise 1.8s var(--ease) 3s both;
}

.hero {
  --cue-d: 4s;
}

@keyframes raise {
  from {
    opacity: 0;
    transform: translateY(30px);
    clip-path: inset(100% 0 0 0);
  }
  to {
    opacity: 1;
    transform: none;
    clip-path: inset(-20% -10% -20% -10%);
  }
}

/* ---------- Pigeons crossing the page ---------- */

.birds {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 3s var(--ease-soft);
}

body.is-open .birds {
  opacity: 1;
}

.birds i {
  position: absolute;
  left: -60px;
  top: var(--y);
  width: var(--s);
  animation: cross var(--d) linear var(--delay) infinite;
}

.birds svg {
  display: block;
  width: 100%;
  fill: #fff;
  filter: drop-shadow(0 2px 3px rgba(23, 50, 110, 0.35));
  animation: flap 0.9s ease-in-out infinite;
  transform-origin: 50% 70%;
}

.birds i:nth-child(1) { --y: 18%; --s: 30px; --d: 26s; --delay: 2s; }
.birds i:nth-child(2) { --y: 26%; --s: 22px; --d: 30s; --delay: 9s; }
.birds i:nth-child(3) { --y: 64%; --s: 26px; --d: 34s; --delay: 18s; }

.birds i:nth-child(2) svg {
  animation-delay: -0.4s;
}

@keyframes cross {
  0% {
    transform: translate3d(0, 0, 0);
  }
  /* most of the loop the sky is empty: a pigeon is a moment, not wallpaper */
  30% {
    transform: translate3d(calc(100vw + 120px), -14vh, 0);
  }
  100% {
    transform: translate3d(calc(100vw + 120px), -14vh, 0);
  }
}

@keyframes flap {
  50% {
    transform: scaleY(0.45);
  }
}

/* ---------- Sections ---------- */

.title {
  font-size: clamp(40px, 12vw, 52px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.divider {
  width: min(72%, 270px);
}

.tiles {
  height: 22px;
  margin: 10px 0;
  background: var(--tile) repeat-x center / 22px 22px;
  border-top: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  opacity: 0.92;
}

.emblem {
  width: 92px;
  margin: 0 auto 16px;
  filter: drop-shadow(0 10px 14px rgb(var(--shadow) / 0.25));
}

.invite {
  padding-top: 112px;
}

.invite__greet {
  font-size: clamp(32px, 9.4vw, 40px);
  color: var(--accent-deep);
}

.invite .divider {
  margin: 0 auto 28px;
}

.parents__names {
  font-family: var(--display);
  font-size: 23px;
  color: var(--accent-deep);
}

.invite__quote {
  font-style: italic;
  font-family: var(--body);
  font-size: 21px;
  color: var(--pomegranate);
}

/* ---------- Date ---------- */

.bigdate {
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  justify-items: stretch;
  margin-bottom: 4px;
}

.bigdate__side {
  font-family: var(--label);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.bigdate__day {
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  font-size: 82px;
  line-height: 1;
  color: var(--on-accent);
  background: var(--accent-deep);
  clip-path: polygon(50% 0, 62% 21%, 85% 15%, 79% 38%, 100% 50%, 79% 62%, 85% 85%, 62% 79%, 50% 100%, 38% 79%, 15% 85%, 21% 62%, 0 50%, 21% 38%, 15% 15%, 38% 21%);
  box-shadow: inset 0 0 0 4px var(--gold);
}

.bigdate__meta {
  margin: 4px 0 30px;
  font-style: italic;
  font-size: 20px;
}

.cal {
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 0 5px var(--surface), 0 0 0 6px var(--line);
}

.cal__wd {
  color: var(--gold);
}

/* the day: a lapis star */
.cal__d.is-day::before {
  width: 40px;
  height: 40px;
  border-radius: 0;
  background: var(--accent-deep);
  box-shadow: none;
  clip-path: polygon(50% 0, 62% 21%, 85% 15%, 79% 38%, 100% 50%, 79% 62%, 85% 85%, 62% 79%, 50% 100%, 38% 79%, 15% 85%, 21% 62%, 0 50%, 21% 38%, 15% 15%, 38% 21%);
}

.cd__row {
  gap: 8px;
}

.cd__cell {
  padding: 12px 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
}

.cd__cell:first-child {
  border-left: 1px solid var(--line-strong);
}

.cd__num {
  color: var(--accent-deep);
}

.cd__unit {
  color: var(--gold);
}

.cd__past {
  color: var(--accent-deep);
}

/* ---------- Buttons ---------- */

.btn {
  border-radius: 6px;
  font-family: var(--label);
  font-weight: 600;
}

.btn--solid {
  background: linear-gradient(180deg, #2457b0, var(--accent-deep));
  box-shadow: inset 0 0 0 1px rgba(233, 207, 143, 0.6), 0 12px 24px -14px rgb(var(--shadow) / 0.9);
}

.copy {
  border-radius: 6px;
}

/* ---------- Program ---------- */

.tl__time {
  color: var(--accent-deep);
  font-size: 22px;
}

.tl__ico {
  background: var(--accent-deep);
  border: 2px solid var(--gold-soft);
  color: #f6dc9c;
}

.tl::before {
  background: repeating-linear-gradient(var(--gold) 0 4px, transparent 4px 9px);
  opacity: 0.6;
}

.tl__title {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 400;
}

.tl__note {
  font-style: italic;
}

.detail {
  border-radius: 6px;
}

.detail__ico {
  background: var(--accent-deep);
  color: #f6dc9c;
}

.detail__title {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 400;
}

/* ---------- Venue ---------- */

.venue__name {
  font-size: 32px;
  color: var(--accent-deep);
}

.mapcard {
  border-radius: 8px;
  border-color: var(--line-strong);
}

.map {
  border-radius: 4px;
}

/* ---------- Toʻyona: lapis cards with a tile corner ---------- */

.ccard {
  border-radius: 14px;
  color: #fbeccb;
  background: linear-gradient(135deg, #2457b0, #142f66);
  border: 1px solid rgba(233, 207, 143, 0.6);
}

.ccard::before {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 140px;
  height: 140px;
  background: var(--tile) 0 0 / 28px 28px;
  opacity: 0.35;
  border-radius: 50%;
}

.ccard--humo {
  background: linear-gradient(135deg, #b3262f, #6d1219);
}

.ccard--visa {
  background: linear-gradient(135deg, #1f6e7a, #0f3b44);
}

.ccard__chip {
  background: linear-gradient(135deg, #f6dc9c, #b88a2e);
}

/* ---------- Answer ---------- */

.reply {
  border-radius: 8px;
  border-color: var(--line-strong);
}

.choice span {
  border-radius: 6px;
}

.stepper {
  border-radius: 6px;
}

.sent__art {
  width: 110px;
}

.sent__title {
  color: var(--accent-deep);
}

/* ---------- Closing ---------- */

.closing__veil {
  background:
    linear-gradient(to bottom, var(--bg) 0%, rgba(251, 246, 236, 0.6) 8%, rgba(251, 246, 236, 0) 22%),
    radial-gradient(ellipse 90% 18% at 50% 18%, rgba(255, 246, 228, 0.72), transparent 76%),
    linear-gradient(to top, var(--bg) 0%, rgba(251, 246, 236, 0) 14%);
}

.closing__wait {
  font-size: clamp(42px, 12.5vw, 58px);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-deep);
  text-shadow: 0 2px 0 rgba(233, 207, 143, 0.9), 0 0 22px var(--glow);
}

.closing__names {
  color: #8a5f12;
  text-shadow: 0 0 12px var(--glow);
}

.footer__art {
  width: 72px;
}

.footer__sign {
  font-style: italic;
}

/* ---------- Small and wide screens ---------- */

@media (max-height: 700px) and (max-aspect-ratio: 3/4) {
  .hero__text {
    top: max(6%, calc(env(safe-area-inset-top) + 50px));
  }

  .name {
    font-size: clamp(46px, 14vw, 62px);
  }
}

@media (min-aspect-ratio: 3/4) {
  .name {
    font-size: min(78px, 8vh);
  }
}

@media (prefers-reduced-motion: reduce) {
  .birds {
    display: none;
  }
}
