/* =========================================================
   Sandiq — the bride's dowry chest, tied with crimson silk and
   sealed with the couple's initials, opens into golden light;
   the bride's room on the wedding morning, painted in window light.
   Built on shared/base.css; this sheet is the look.
   ========================================================= */

:root {
  --bg: #f8f1e4;
  --ink: #2c2333;
  --ink-soft: #6c5f69;
  --accent: #9b2230;
  --accent-deep: #7c1622;
  --accent-soft: #f3e1dc;
  --indigo: #24386b;
  --saffron: #d39a35;
  --brass: #a9833d;
  --brass-soft: #e3c88f;
  --line: rgba(124, 22, 34, 0.14);
  --line-strong: rgba(124, 22, 34, 0.3);
  --surface: #fffaf2;
  --on-accent: #fbefd9;
  --shadow: 74 32 30;
  --glow: rgba(253, 247, 236, 0.95);
  --intro-bg: #2a1f17;

  --display: "Noto Serif Display", "Alegreya", Georgia, serif;
  --body: "Alegreya", Georgia, serif;
  --label: "Alegreya Sans SC", "Alegreya", sans-serif;

  --open-default: url("/styles/sandiq/media/open-poster.jpg");
  --amb-poster: url("/styles/sandiq/media/amb-poster.jpg");
  --close-poster: url("/styles/sandiq/media/close-poster.jpg");
  --dissolve: 1.9s;
  --pulse: rgba(255, 238, 200, 0.95);
  --pulse-glow: rgba(255, 196, 120, 0.6);
  --music-fg: #7c1622;

  /* one domed brass stud, as on the chest's metal bands */
  --stud: radial-gradient(circle at 42% 38%, #fbebc0 0 0.8px, #d4ac5c 1.6px, #8f6b2a 2.7px, rgba(80, 56, 20, 0.5) 3.2px, transparent 3.6px);
  --strip: linear-gradient(#c9a35a, #9c7834 55%, #7d5d26);
}

body {
  font-size: 19px;
}

.label {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: lowercase;
  color: var(--brass);
}

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

.intro__kicker {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: lowercase;
  color: #7a5520;
  text-shadow: 0 0 12px rgba(255, 246, 226, 0.95), 0 0 3px rgba(255, 246, 226, 0.9);
}

.intro__to {
  font-size: clamp(30px, 8.6vw, 40px);
  color: var(--accent-deep);
  text-shadow: 0 0 22px rgba(255, 247, 230, 0.98), 0 0 8px rgba(255, 247, 230, 0.95), 0 0 2px rgba(255, 247, 230, 0.9);
}

.intro__hint {
  white-space: nowrap;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: lowercase;
}

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

.hero__veil {
  background:
    radial-gradient(ellipse 100% 34% at 50% 22%, rgba(252, 246, 234, 0.84), rgba(252, 246, 234, 0.4) 55%, rgba(252, 246, 234, 0) 78%),
    linear-gradient(to bottom, rgba(248, 241, 228, 0) 80%, rgba(248, 241, 228, 0.85) 94%, var(--bg) 100%);
}

.hero__kicker {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 0 0 6px;
  font-family: var(--label);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: lowercase;
  color: #8a6222;
}

.stud {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #fbebc0, #c99d4c 45%, #7a5a22);
  box-shadow: 0 1px 2px rgba(60, 40, 10, 0.5);
}

.names {
  margin: 0;
  font-weight: 400;
}

.name {
  display: block;
  white-space: nowrap;
  font-family: var(--display);
  font-size: clamp(50px, 15vw, 70px);
  line-height: 1.04;
  color: var(--accent-deep);
  text-shadow: 0 0 26px var(--glow), 0 0 10px var(--glow), 0 0 3px var(--glow);
}

.names__amp {
  display: block;
  margin: 0 0 -2px;
  font-family: var(--body);
  font-style: italic;
  font-size: 34px;
  line-height: 1;
  color: var(--indigo);
  text-shadow: 0 0 12px var(--glow);
}

.hero__date {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 14px 0 0;
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 0.14em;
  color: var(--indigo);
  text-shadow: 0 0 12px var(--glow), 0 0 4px var(--glow);
  font-variant-numeric: lining-nums;
}

.hero__date i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #fbebc0, #c99d4c 45%, #7a5a22);
}

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

/* the names come up out of the light, like silk lifted from the chest */
.hero.is-in .names__one {
  animation: lift 2.6s var(--ease) 0.9s both;
}

.hero.is-in .names__amp {
  animation: focus 2s var(--ease) 1.7s both;
}

.hero.is-in .names__two {
  animation: lift 2.6s var(--ease) 2.1s both;
}

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

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

@keyframes lift {
  from {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: none;
  }
}

/* ---------- Living touch: dust in a sunbeam ---------- */

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

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

/* the beam falls from the upper left, the way the window light does in the painting */
.motes__beam {
  position: absolute;
  left: -40vw;
  top: -30vh;
  width: 70vw;
  height: 170vh;
  transform: rotate(-38deg);
  transform-origin: 50% 0;
  background: linear-gradient(90deg, rgba(255, 224, 160, 0) 0%, rgba(255, 224, 160, 0.12) 40%, rgba(255, 232, 180, 0.16) 52%, rgba(255, 224, 160, 0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 85%);
  mask-image: linear-gradient(to bottom, #000 30%, transparent 85%);
  animation: breathe 14s ease-in-out infinite alternate;
}

.motes i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 246, 214, 1) 0, rgba(240, 196, 110, 0.85) 45%, rgba(240, 196, 110, 0) 72%);
  opacity: 0;
  animation: drift var(--d) ease-in-out var(--delay) infinite;
}

.motes i:nth-child(2) { --x: 12%; --y: 22%; --s: 4px; --d: 19s; --delay: 0s; }
.motes i:nth-child(3) { --x: 30%; --y: 14%; --s: 3px; --d: 23s; --delay: 4s; }
.motes i:nth-child(4) { --x: 22%; --y: 42%; --s: 5px; --d: 21s; --delay: 8s; }
.motes i:nth-child(5) { --x: 46%; --y: 30%; --s: 3px; --d: 25s; --delay: 2s; }
.motes i:nth-child(6) { --x: 8%; --y: 60%; --s: 4px; --d: 22s; --delay: 11s; }
.motes i:nth-child(7) { --x: 38%; --y: 56%; --s: 3px; --d: 20s; --delay: 6s; }
.motes i:nth-child(8) { --x: 58%; --y: 18%; --s: 4px; --d: 26s; --delay: 14s; }
.motes i:nth-child(9) { --x: 16%; --y: 78%; --s: 3px; --d: 24s; --delay: 9s; }

@keyframes drift {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0);
  }
  20% {
    opacity: 0.9;
  }
  50% {
    opacity: 0.55;
    transform: translate3d(14px, -22px, 0);
  }
  80% {
    opacity: 0.85;
  }
  100% {
    opacity: 0;
    transform: translate3d(34px, -10px, 0);
  }
}

@keyframes breathe {
  from {
    opacity: 0.55;
  }
  to {
    opacity: 1;
  }
}

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

.title {
  font-size: clamp(38px, 11.5vw, 50px);
  color: var(--accent-deep);
}

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

/* an ikat atlas band, bound top and bottom with studded brass like the chest */
.band {
  height: 48px;
  margin: 8px 0;
  background:
    var(--stud) 0 0 / 18px 10px repeat-x,
    var(--stud) 0 100% / 18px 10px repeat-x,
    var(--strip) 0 0 / 100% 10px no-repeat,
    var(--strip) 0 100% / 100% 10px no-repeat,
    url("media/ikat.jpg") center / auto 112px repeat-x;
  box-shadow: 0 10px 20px -16px rgb(var(--shadow) / 0.7);
}

.corner {
  width: min(40vw, 190px);
  opacity: 0.92;
}

.corner--l {
  left: -18px;
}

.corner--r {
  right: -18px;
}

.emblem {
  width: 104px;
  margin: 0 auto 18px;
  filter: drop-shadow(0 10px 12px rgb(var(--shadow) / 0.3));
}

.invite {
  padding-top: 118px;
}

.invite__greet {
  font-size: clamp(30px, 8.8vw, 38px);
  color: var(--accent-deep);
}

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

.parents__names {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 400;
  color: var(--indigo);
}

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

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

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

.bigdate__side {
  font-family: var(--label);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--ink-soft);
}

/* the day on a little painted chest panel, rimmed with brass studs */
.bigdate__day {
  position: relative;
  display: grid;
  place-items: center;
  width: 138px;
  height: 138px;
  font-size: 76px;
  line-height: 1;
  color: #fbefd9;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 220, 160, 0.18), transparent 65%),
    linear-gradient(160deg, #a52a36, #6e121d);
  border: 5px solid #b28a45;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(255, 230, 180, 0.4), 0 16px 28px -16px rgb(var(--shadow) / 0.9);
  text-shadow: 0 2px 6px rgba(60, 10, 10, 0.45);
}

.bigdate__day::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 3px;
  background:
    var(--stud) 0 0 / 15px 9px repeat-x,
    var(--stud) 0 100% / 15px 9px repeat-x,
    var(--stud) 0 0 / 9px 15px repeat-y,
    var(--stud) 100% 0 / 9px 15px repeat-y;
  pointer-events: none;
}

.bigdate__meta {
  margin: 8px 0 30px;
  font-style: italic;
  font-size: 21px;
}

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

.cal__wd {
  font-size: 13px;
  text-transform: lowercase;
  color: var(--brass);
}

/* the day: a small ikat diamond in pomegranate */
.cal__d.is-day::before {
  width: 30px;
  height: 30px;
  border-radius: 3px;
  rotate: 45deg;
  background: linear-gradient(135deg, #a52a36, #6e121d);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--brass), 0 8px 14px -6px rgb(var(--shadow) / 0.6);
}

.cd__row {
  gap: 8px;
}

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

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

.cd__num {
  color: var(--accent-deep);
  font-size: 36px;
}

.cd__unit {
  font-size: 13px;
  text-transform: lowercase;
  color: var(--brass);
}

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

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

.btn {
  border-radius: 8px;
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: lowercase;
}

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

.copy {
  border-radius: 8px;
}

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

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

.tl__ico {
  background: linear-gradient(160deg, #2d4580, var(--indigo));
  border: 2px solid #c49a4c;
  color: #f3dca6;
}

.tl::before {
  background: repeating-linear-gradient(var(--brass) 0 3px, transparent 3px 10px);
  opacity: 0.65;
}

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

.tl__note {
  font-style: italic;
}

.detail {
  border-radius: 8px;
  border-top: 3px solid var(--brass);
}

.detail__ico {
  background: linear-gradient(160deg, #2d4580, var(--indigo));
  color: #f3dca6;
}

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

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

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

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

.map {
  border-radius: 6px;
}

/* ---------- Toʻyona: cards like painted chest panels ---------- */

.gift__owner {
  font-size: 14px;
}

.ccard {
  border-radius: 14px;
  color: #fbefd9;
  background: linear-gradient(135deg, #2d4580, #172650);
  border: 1px solid rgba(227, 200, 143, 0.6);
}

/* a strip of ikat along the bottom edge */
.ccard::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 16px;
  background: url("media/ikat.jpg") center / auto 64px repeat-x;
  opacity: 0.85;
  border-top: 2px solid #c49a4c;
}

.ccard--humo {
  background: linear-gradient(135deg, #a52a36, #5f0f18);
}

.ccard--visa {
  background: linear-gradient(135deg, #6b4a2a, #33210f);
}

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

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

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

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

.stepper {
  border-radius: 8px;
}

.sent__art {
  width: 116px;
}

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

/* ---------- Closing: the room at evening ---------- */

.closing__veil {
  background:
    linear-gradient(to bottom, var(--bg) 0%, rgba(248, 241, 228, 0.55) 8%, rgba(248, 241, 228, 0) 20%),
    radial-gradient(ellipse 95% 18% at 50% 19%, rgba(255, 240, 210, 0.7), rgba(255, 240, 210, 0) 76%),
    linear-gradient(to top, var(--bg) 0%, rgba(248, 241, 228, 0) 14%);
}

.closing__text {
  top: 13%;
}

.closing__wait {
  font-size: clamp(42px, 12.5vw, 58px);
  color: var(--accent-deep);
  text-shadow: 0 0 24px rgba(255, 240, 210, 0.95), 0 0 8px rgba(255, 240, 210, 0.9);
}

.closing__names {
  font-size: 15px;
  letter-spacing: 0.24em;
  text-transform: lowercase;
  color: #5a3d14;
  text-shadow: 0 0 12px rgba(255, 240, 210, 0.95);
}

.closing__amp {
  font-family: var(--body);
  font-style: italic;
  text-transform: none;
}

.footer__art {
  width: 84px;
}

.footer__sign {
  font-style: italic;
}

.footer__tag {
  font-size: 14px;
  letter-spacing: 0.14em;
}

/* ---------- 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(42px, 13vw, 58px);
  }

  .names__amp {
    font-size: 28px;
  }
}

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

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