/* =========================================================
   Beshik — a painted Uzbek cradle in a moonlit room rocks by
   itself and fills the room with fireflies; a picture-book
   night over the mahalla. Beshik toʻyi.
   Built on shared/base.css; this sheet is the look.
   ========================================================= */

/* Bad Script draws ‘ as a wide floating comma ("To ‘y"); the oʻ/gʻ tick comes from Piazzolla (the body font, same file) instead */
@font-face {
  font-family: "Beshik Tick";
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/piazzolla/v42/N0bE2SlTPu5rIkWIZjVKKtYtfxYqZ4RJBFzFV4kLYNpCJaE.woff2) format("woff2");
  unicode-range: U+2018-2019, U+02BB-02BC;
}

:root {
  --bg: #f9f5f1;
  --ink: #3b4366;
  --ink-soft: #747a96;
  --accent: #b9637a;
  --accent-deep: #94465c;
  --accent-soft: #f6e5e8;
  --blue: #7d9cc8;
  --blue-deep: #4c6596;
  --gold: #b88d3e;
  --gold-soft: #ecd7a6;
  --leaf: #8fab88;
  --line: rgba(148, 70, 92, 0.14);
  --line-strong: rgba(148, 70, 92, 0.3);
  --surface: #fffdfb;
  --on-accent: #fff8f2;
  --shadow: 70 78 120;
  --glow: rgba(255, 252, 247, 0.95);
  --intro-bg: #1c2536;

  --display: "Beshik Tick", "Bad Script", "Piazzolla", cursive;
  --body: "Piazzolla", Georgia, serif;
  --label: "Andika", "Piazzolla", sans-serif;

  --open-default: url("/styles/beshik/media/open-poster.jpg");
  --amb-poster: url("/styles/beshik/media/amb-poster.jpg");
  --close-poster: url("/styles/beshik/media/close-poster.jpg");
  --dissolve: 2s;
  --pulse: rgba(255, 240, 200, 0.95);
  --pulse-glow: rgba(255, 210, 120, 0.6);
  --music-fg: #4c6596;

  /* an embroidered band: rose flowers, green leaves and gold stars between two running stitches */
  --stitch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='26'%3E%3Cpath d='M0 3.5H56M0 22.5H56' stroke='%23c47b8d' stroke-width='1.3' stroke-dasharray='4 3'/%3E%3Cg fill='%23d0849a'%3E%3Ccircle cx='10' cy='9.4' r='2.6'/%3E%3Ccircle cx='10' cy='16.6' r='2.6'/%3E%3Ccircle cx='6.4' cy='13' r='2.6'/%3E%3Ccircle cx='13.6' cy='13' r='2.6'/%3E%3C/g%3E%3Ccircle cx='10' cy='13' r='1.7' fill='%23e2bd6a'/%3E%3Cg fill='%238fab88'%3E%3Cellipse cx='22' cy='10.5' rx='4' ry='1.7' transform='rotate(-30 22 10.5)'/%3E%3Cellipse cx='22' cy='15.5' rx='4' ry='1.7' transform='rotate(30 22 15.5)'/%3E%3Cellipse cx='42' cy='10.5' rx='4' ry='1.7' transform='rotate(30 42 10.5)'/%3E%3Cellipse cx='42' cy='15.5' rx='4' ry='1.7' transform='rotate(-30 42 15.5)'/%3E%3C/g%3E%3Cpath d='M32 7.5l1.5 4 4 1.5-4 1.5-1.5 4-1.5-4-4-1.5 4-1.5z' fill='%23c9a14f'/%3E%3C/svg%3E");
}

body {
  font-size: 18px;
}

.label {
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.24em;
  color: var(--gold);
}

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

.intro__kicker {
  font-family: var(--label);
  font-weight: 700;
  color: #f3e3bd;
  text-shadow: 0 1px 10px rgba(10, 16, 30, 0.85);
}

.intro__to {
  font-family: var(--display);
  font-size: clamp(34px, 10vw, 44px);
  color: #fffaf0;
  text-shadow: 0 2px 18px rgba(10, 16, 30, 0.9), 0 0 4px rgba(10, 16, 30, 0.6);
}

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

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

.hero__veil {
  background:
    radial-gradient(ellipse 92% 30% at 50% 21%, rgba(250, 247, 244, 0.7), rgba(250, 247, 244, 0) 72%),
    linear-gradient(to bottom, rgba(249, 245, 241, 0) 80%, rgba(249, 245, 241, 0.85) 94%, var(--bg) 100%);
}

.hero__kicker {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  font-family: var(--label);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent-deep);
  text-shadow: 0 0 10px var(--glow);
}

/* a small gold four-point star and a crescent moon, like the cradle-painters' cutouts */
.star {
  display: inline-block;
  width: 11px;
  height: 11px;
  background: var(--gold);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

.moon {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-shadow: inset -3.2px 1px 0 0 var(--gold);
  rotate: -20deg;
}

.name {
  white-space: nowrap;
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(72px, 21vw, 100px);
  line-height: 1;
  color: var(--blue-deep);
  -webkit-text-stroke: 0.7px var(--blue-deep);
  text-shadow: 0 0 26px var(--glow), 0 0 10px var(--glow), 0 2px 0 rgba(236, 215, 166, 0.8);
}

.hero__sub {
  margin: 26px 0 0;
  font-family: var(--body);
  font-size: 20px;
  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: 10px 22px;
  border-radius: 999px;
  background: rgba(255, 252, 248, 0.88);
  border: 1px solid var(--gold-soft);
  white-space: nowrap;
  font-family: var(--label);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
  box-shadow: 0 12px 26px -14px rgb(var(--shadow) / 0.8);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

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

/* the name is written in, as if by a slow pen */
.hero.is-in .name {
  animation: write 2.6s var(--ease-soft) 1s both;
}

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

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

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

@keyframes write {
  from {
    opacity: 0;
    clip-path: inset(-20% 100% -20% -10%);
  }
  20% {
    opacity: 1;
  }
  to {
    opacity: 1;
    clip-path: inset(-20% -10% -20% -10%);
  }
}

/* ---------- Living touch: fireflies and tiny stars drifting slowly ---------- */

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

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

.glow i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle, #fffbe8 0 30%, #f6cf6e 55%, rgba(246, 207, 110, 0) 72%);
  box-shadow: 0 0 14px 5px rgba(244, 200, 100, 0.45);
  animation:
    wander var(--d) ease-in-out var(--delay) infinite alternate,
    blink 4.6s ease-in-out var(--delay) infinite;
}

.glow i:nth-child(1) { --x: 12%; --y: 30%; --d: 19s; --delay: -3s; }
.glow i:nth-child(2) { --x: 84%; --y: 18%; --d: 23s; --delay: -11s; }
.glow i:nth-child(3) { --x: 70%; --y: 62%; --d: 21s; --delay: -6s; }
.glow i:nth-child(4) { --x: 22%; --y: 78%; --d: 26s; --delay: -15s; }
.glow i:nth-child(5) { --x: 92%; --y: 86%; --d: 24s; --delay: -8s; }

.glow b {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 10px;
  height: 10px;
  background: #d9b25c;
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  animation: twinkle var(--d) ease-in-out var(--delay) infinite;
}

.glow b:nth-child(6) { --x: 6%; --y: 52%; --d: 7s; --delay: -2s; }
.glow b:nth-child(7) { --x: 90%; --y: 40%; --d: 9s; --delay: -5s; }
.glow b:nth-child(8) { --x: 48%; --y: 94%; --d: 8s; --delay: -1s; }

@keyframes wander {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(18px, -26px);
  }
  66% {
    transform: translate(-14px, -52px);
  }
  100% {
    transform: translate(10px, -80px);
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 0.15;
  }
  45%,
  60% {
    opacity: 1;
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.4) rotate(0deg);
  }
  50% {
    opacity: 0.9;
    transform: scale(1) rotate(45deg);
  }
}

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

.title {
  font-size: clamp(46px, 13.5vw, 58px);
  line-height: 1.15;
  color: var(--accent-deep);
}

.divider {
  width: min(78%, 290px);
}

/* the embroidered border of the cradle quilt */
.stitch {
  height: 26px;
  margin: 12px 0;
  background: var(--stitch) repeat-x center / 56px 26px;
  opacity: 0.9;
}

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

.invite {
  padding-top: 112px;
}

.invite__greet {
  font-family: var(--display);
  font-size: clamp(34px, 10vw, 42px);
  color: var(--accent-deep);
}

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

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

.invite__quote {
  font-family: var(--display);
  font-size: 25px;
  line-height: 1.35;
  color: var(--accent);
}

/* ---------- 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: 11.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* the day: a full moon with a gold halo */
.bigdate__day {
  display: grid;
  place-items: center;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  font-family: var(--label);
  font-weight: 400;
  font-size: 62px;
  line-height: 1;
  color: var(--blue-deep);
  background: radial-gradient(circle at 38% 34%, #ffffff 0, #f4f1ea 45%, #e4e2ea 100%);
  box-shadow: 0 0 0 2px var(--gold-soft), 0 0 0 9px rgba(236, 215, 166, 0.25), 0 0 36px 8px rgba(125, 156, 200, 0.28);
}

.bigdate__meta {
  margin: 10px 0 30px;
  font-size: 20px;
}

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

.cal__wd {
  font-family: var(--label);
  font-weight: 700;
  color: var(--gold);
}

.cal__d {
  font-family: var(--label);
}

.cal__d.is-day::before {
  width: 40px;
  height: 40px;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 14px 4px rgba(185, 99, 122, 0.3);
}

.cd__row {
  gap: 8px;
}

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

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

.cd__num {
  font-family: var(--label);
  font-weight: 400;
  color: var(--blue-deep);
}

.cd__unit {
  font-family: var(--label);
  color: var(--accent);
}

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

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

.btn {
  border-radius: 999px;
  font-family: var(--label);
  font-weight: 700;
  font-size: 14px;
}

.btn--solid {
  background: linear-gradient(180deg, #c97489, var(--accent-deep));
  box-shadow: inset 0 0 0 1px rgba(236, 215, 166, 0.55), 0 12px 24px -14px rgb(var(--shadow) / 0.9);
}

.copy {
  border-radius: 999px;
  font-family: var(--label);
}

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

.tl__time {
  font-family: var(--label);
  font-weight: 700;
  color: var(--blue-deep);
  font-size: 19px;
}

.tl__ico {
  background: var(--surface);
  border: 1.5px solid var(--accent);
  color: var(--accent-deep);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

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

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

.tl__note {
  color: var(--ink-soft);
}

.detail {
  border-radius: 18px;
}

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

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

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

.venue__name {
  font-family: var(--body);
  font-size: 30px;
  font-weight: 400;
  color: var(--blue-deep);
}

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

.map {
  border-radius: 16px;
}

/* ---------- Toʻyona: soft night-blue and rose cards ---------- */

.ccard {
  border-radius: 18px;
  color: #fdf3df;
  background: linear-gradient(135deg, #6f8ec0, #3e5385);
  border: 1px solid rgba(236, 215, 166, 0.6);
}

.ccard::before {
  content: "";
  position: absolute;
  right: -46px;
  top: -40px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  box-shadow: inset -34px 12px 0 0 rgba(246, 222, 160, 0.16);
  rotate: -20deg;
  pointer-events: none;
}

.ccard--humo {
  background: linear-gradient(135deg, #c97489, #87405a);
}

.ccard--visa {
  background: linear-gradient(135deg, #7ea69a, #44695f);
}

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

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

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

.choice span {
  border-radius: 999px;
  font-family: var(--label);
  font-size: 14px;
  font-weight: 400;
}

.stepper {
  border-radius: 999px;
}

.sent__art {
  width: 120px;
}

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

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

.closing__veil {
  background:
    linear-gradient(to bottom, var(--bg) 0%, rgba(249, 245, 241, 0.6) 8%, rgba(249, 245, 241, 0) 22%),
    radial-gradient(ellipse 95% 22% at 50% 21%, rgba(255, 246, 240, 0.86), rgba(255, 246, 240, 0.4) 55%, transparent 80%),
    linear-gradient(to top, var(--bg) 0%, rgba(249, 245, 241, 0) 14%);
}

.closing__alla {
  margin: 0 0 4px;
  font-family: var(--body);
  font-size: 19px;
  color: var(--ink);
  text-shadow: 0 0 12px var(--glow);
}

.closing__wait {
  font-size: clamp(44px, 13vw, 60px);
  line-height: 1.15;
  color: var(--accent-deep);
  text-shadow: 0 0 22px var(--glow), 0 0 8px var(--glow);
}

.closing__names {
  color: var(--blue-deep);
  text-shadow: 0 0 12px var(--glow);
}

.footer__art {
  width: 84px;
}

.footer__sign {
  font-family: var(--display);
  font-size: 22px;
}

/* ---------- 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) + 64px));
  }

  .name {
    font-size: clamp(60px, 18vw, 78px);
  }

  .hero__kicker {
    margin-bottom: 8px;
  }

  .hero__sub {
    margin-top: 18px;
  }
}

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

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