/* =========================================================
   Non — a patir non stamped with the couple's initials breaks
   in two and pours out light; a sunny courtyard under the vine
   on the morning of the fotiha. Fotiha toʻyi.
   Built on shared/base.css; this sheet is the look.
   ========================================================= */

:root {
  --bg: #faf4e8;
  --ink: #3a2816;
  --ink-soft: #7a644b;
  --accent: #5e7431;
  --accent-deep: #7b3f12;
  --accent-soft: #f1e2c2;
  --honey: #c98a2b;
  --honey-soft: #ecd3a0;
  --thread: #b22a32;
  --vine: #4f6a2a;
  --line: rgba(123, 63, 18, 0.14);
  --line-strong: rgba(123, 63, 18, 0.3);
  --surface: #fffbf3;
  --on-accent: #fff6e4;
  --shadow: 92 52 14;
  --glow: rgba(255, 249, 236, 0.95);
  --intro-bg: #efe6d6;

  --display: "Alegreya", "Vollkorn", serif;
  --body: "Vollkorn", Georgia, serif;
  --label: "Vollkorn SC", "Vollkorn", Georgia, serif;

  --open-default: url("/styles/non/media/open-poster.jpg");
  --amb-poster: url("/styles/non/media/amb-poster.jpg");
  --close-poster: url("/styles/non/media/close-poster.jpg");
  --stamp: url("/styles/non/media/stamp.svg");
  --dissolve: 2s;
  --pulse: rgba(255, 246, 220, 0.95);
  --pulse-glow: rgba(255, 200, 110, 0.65);
  --music-fg: #7b3f12;

  /* the crust of a patir: deep amber at the rim, pale wheat inside */
  --crust: radial-gradient(circle at 50% 50%, #f4dca6 0 50%, #e8bd78 57%, #b8682a 63%, #a35618 74%, #c98a3e 82%, #8a4512 94%, #6e3510 100%);
}

body {
  font-size: 18px;
}

.label {
  font-family: var(--label);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: var(--honey);
}

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

.intro__kicker {
  font-family: var(--label);
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: lowercase;
  color: #8a5a1c;
  text-shadow: 0 0 10px rgba(255, 250, 240, 0.95), 0 0 2px rgba(255, 250, 240, 0.9);
}

.intro__to {
  font-size: clamp(32px, 9vw, 42px);
  color: var(--accent-deep);
  text-shadow: 0 0 18px rgba(255, 250, 240, 0.95), 0 0 6px rgba(255, 250, 240, 0.9);
}

.intro__hint {
  font-family: var(--label);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: lowercase;
}

.intro__tap {
  border-color: var(--honey);
}

.intro__tap::after {
  background: var(--honey);
}

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

.hero__veil {
  background:
    radial-gradient(ellipse 95% 30% at 50% 22%, rgba(255, 249, 234, 0.82), rgba(255, 249, 234, 0) 74%),
    linear-gradient(to bottom, rgba(250, 244, 232, 0) 80%, rgba(250, 244, 232, 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: 600;
  letter-spacing: 0.22em;
  text-transform: lowercase;
  color: #8a5a1c;
  text-shadow: 0 0 10px var(--glow);
}

/* three pricked dots, like the edge of a chekich stamp */
.dot {
  display: inline-block;
  width: 22px;
  height: 4px;
  background: radial-gradient(circle, var(--honey) 0 1.6px, transparent 2px) 0 0 / 7.33px 4px repeat-x;
}

.names {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  font-weight: 400;
}

.name {
  display: block;
  white-space: nowrap;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(54px, 16vw, 74px);
  line-height: 1.02;
  color: var(--accent-deep);
  text-shadow: 0 0 26px var(--glow), 0 0 10px var(--glow), 0 1px 0 rgba(255, 238, 200, 0.9);
}

.names__amp {
  display: block;
  margin: -2px 0 -6px;
  font-family: var(--body);
  font-style: italic;
  font-size: 34px;
  line-height: 1;
  color: var(--honey);
  text-shadow: 0 0 14px 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 22px;
  border-radius: 999px;
  background: rgba(255, 248, 234, 0.9);
  border: 1px solid var(--honey-soft);
  box-shadow: inset 0 0 0 3px rgba(255, 248, 234, 0.9), inset 0 0 0 4px rgba(178, 42, 50, 0.35), 0 12px 26px -14px rgb(var(--shadow) / 0.8);
  white-space: nowrap;
  font-family: var(--label);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: var(--accent-deep);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

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

/* the names come up out of the warm light, like a stamp pressed into dough */
.hero.is-in .name {
  animation: knead 2.2s var(--ease) 1s both;
}

.hero.is-in .names__amp {
  animation: fade 1.6s var(--ease-soft) 1.7s both;
}

.hero.is-in .name + .names__amp + .name {
  animation-delay: 1.9s;
}

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

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

@keyframes knead {
  from {
    opacity: 0;
    filter: blur(8px);
    transform: scale(1.06);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: none;
  }
}

/* ---------- Flour motes in the light ---------- */

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

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

.motes i {
  position: absolute;
  left: var(--x);
  bottom: -20px;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 246, 222, 0.95), rgba(240, 196, 112, 0.5) 45%, transparent 70%);
  animation: drift var(--d) linear var(--delay) infinite;
  opacity: 0;
}

.motes i:nth-child(1) { --x: 12%; --s: 7px; --d: 26s; --delay: 1s; --w: 30px; }
.motes i:nth-child(2) { --x: 28%; --s: 4px; --d: 32s; --delay: 7s; --w: -24px; }
.motes i:nth-child(3) { --x: 46%; --s: 6px; --d: 29s; --delay: 13s; --w: 36px; }
.motes i:nth-child(4) { --x: 63%; --s: 5px; --d: 35s; --delay: 3s; --w: -30px; }
.motes i:nth-child(5) { --x: 78%; --s: 8px; --d: 27s; --delay: 18s; --w: 22px; }
.motes i:nth-child(6) { --x: 90%; --s: 4px; --d: 33s; --delay: 10s; --w: -18px; }
.motes i:nth-child(7) { --x: 36%; --s: 5px; --d: 38s; --delay: 22s; --w: 26px; }
.motes i:nth-child(8) { --x: 70%; --s: 6px; --d: 30s; --delay: 26s; --w: -34px; }

@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 0;
  }
  12% {
    opacity: 0.9;
  }
  50% {
    transform: translate3d(var(--w), -55vh, 0);
  }
  85% {
    opacity: 0.7;
  }
  100% {
    transform: translate3d(0, -110vh, 0);
    opacity: 0;
  }
}

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

.title {
  font-size: clamp(40px, 12vw, 52px);
  color: var(--accent-deep);
}

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

/* the embroidered hem of a dasturxon: crimson and green chain stitch on linen */
.hem {
  height: 26px;
  margin: 8px 0;
  background:
    radial-gradient(circle at 50% 50%, var(--thread) 0 3px, transparent 3.5px) 0 50% / 26px 26px repeat-x,
    radial-gradient(ellipse 5px 2.4px at 50% 50%, var(--vine) 0 100%, transparent 105%) 13px calc(50% - 5px) / 26px 26px repeat-x,
    radial-gradient(ellipse 5px 2.4px at 50% 50%, var(--vine) 0 100%, transparent 105%) 13px calc(50% + 5px) / 26px 26px repeat-x,
    repeating-linear-gradient(90deg, rgba(201, 138, 43, 0.6) 0 6px, transparent 6px 10px) 0 3px / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, rgba(201, 138, 43, 0.6) 0 6px, transparent 6px 10px) 0 calc(100% - 3px) / 100% 1px no-repeat,
    #fffaf0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  opacity: 0.9;
}

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

/* mirror in place (flipping around the right edge would push it off screen) */
.corner--r {
  transform-origin: 50% 0;
}

/* the couple's own bread, stamped with their initials */
.loaf {
  width: 128px;
  margin: 0 auto 18px;
  filter: drop-shadow(0 14px 16px rgb(var(--shadow) / 0.3));
}

.invite {
  padding-top: 132px;
}

.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: 22px;
  font-weight: 400;
  color: var(--accent-deep);
}

.invite__quote {
  position: relative;
  padding-top: 26px;
  font-style: italic;
  font-family: var(--body);
  font-size: 22px;
  color: var(--vine);
}

.invite__quote::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 38px;
  height: 6px;
  translate: -50% 0;
  background: radial-gradient(circle, var(--honey) 0 1.8px, transparent 2.2px) 0 0 / 7.6px 6px repeat-x;
}

/* ---------- Date: the day pressed into a stamped bread ---------- */

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

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

.bigdate__day {
  position: relative;
  display: grid;
  place-items: center;
  width: 156px;
  height: 156px;
  border-radius: 50%;
  background: var(--crust);
  box-shadow: inset 0 -6px 12px rgba(120, 60, 10, 0.35), inset 0 5px 10px rgba(255, 236, 190, 0.6), 0 16px 28px -14px rgb(var(--shadow) / 0.75);
}

.bigdate__day::before {
  content: "";
  position: absolute;
  inset: 30px;
  background: rgba(138, 75, 23, 0.7);
  -webkit-mask: var(--stamp) center / contain no-repeat;
  mask: var(--stamp) center / contain no-repeat;
}

.bigdate__day span {
  position: relative;
  font-family: var(--display);
  font-size: 54px;
  line-height: 1;
  color: #7b3f12;
  text-shadow: 0 1px 0 rgba(255, 236, 190, 0.8), 0 -1px 0 rgba(90, 40, 6, 0.35);
}

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

.cal {
  border-radius: 20px;
  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-size: 12px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--honey);
}

/* the day: a tiny round loaf */
.cal__d.is-day {
  color: #7b3f12;
}

.cal__d.is-day::before {
  width: 38px;
  height: 38px;
  background: var(--crust);
  box-shadow: inset 0 -2px 4px rgba(120, 60, 10, 0.35), 0 6px 12px -6px rgb(var(--shadow) / 0.7);
}

.cd__row {
  gap: 8px;
}

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

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

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

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

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

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

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

.btn--solid {
  background: linear-gradient(180deg, #a35a1d, var(--accent-deep));
  box-shadow: inset 0 1px 0 rgba(255, 226, 170, 0.5), 0 12px 24px -14px rgb(var(--shadow) / 0.9);
}

.copy {
  border-radius: 999px;
}

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

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

.tl__ico {
  background: var(--crust);
  border: 0;
  color: #6e3810;
  box-shadow: inset 0 -2px 5px rgba(120, 60, 10, 0.3), 0 8px 16px -10px rgb(var(--shadow) / 0.8);
}

.tl::before {
  background: repeating-linear-gradient(var(--honey) 0 3px, transparent 3px 8px);
  opacity: 0.7;
}

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

.tl__note {
  font-style: italic;
}

.detail {
  border-radius: 16px;
}

.detail__ico {
  background: var(--crust);
  color: #6e3810;
}

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

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

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

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

.map {
  border-radius: 14px;
}

/* ---------- Toʻyona: cards with a chekich stamp in the corner ---------- */

.ccard {
  border-radius: 16px;
  color: #fff3dc;
  background: linear-gradient(135deg, #a5611f, #6b3410);
  border: 1px solid rgba(236, 211, 160, 0.6);
}

.ccard::before {
  content: "";
  position: absolute;
  right: -46px;
  bottom: -46px;
  width: 170px;
  height: 170px;
  background: rgba(255, 228, 170, 0.32);
  -webkit-mask: var(--stamp) center / contain no-repeat;
  mask: var(--stamp) center / contain no-repeat;
}

.ccard--humo {
  background: linear-gradient(135deg, #5f7a34, #34481a);
}

.ccard--visa {
  background: linear-gradient(135deg, #a8323a, #66141b);
}

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

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

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

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

.stepper {
  border-radius: 999px;
}

.sent__art {
  width: 110px;
  filter: drop-shadow(0 12px 14px rgb(var(--shadow) / 0.3));
}

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

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

.closing__veil {
  background:
    linear-gradient(to bottom, var(--bg) 0%, rgba(250, 244, 232, 0.55) 8%, rgba(250, 244, 232, 0) 24%),
    radial-gradient(ellipse 80% 15% at 50% 19%, rgba(255, 240, 222, 0.78), transparent 78%),
    linear-gradient(to top, var(--bg) 0%, rgba(250, 244, 232, 0) 14%);
}

.closing__wait {
  margin: 0 auto;
  font-size: clamp(36px, 10.4vw, 50px);
  color: var(--accent-deep);
  text-shadow: 0 0 22px var(--glow), 0 0 8px var(--glow);
}

.closing__names {
  font-family: var(--label);
  font-size: 16px;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: #6e3810;
  text-shadow: 0 0 12px var(--glow), 0 0 4px var(--glow);
}

.footer__art {
  width: 84px;
  filter: drop-shadow(0 10px 12px rgb(var(--shadow) / 0.25));
}

.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) + 60px));
  }

  .name {
    font-size: clamp(44px, 13.5vw, 58px);
  }

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

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

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