/* =========================================================
   Anor — one ripe pomegranate on a Rishton plate splits open and
   its ruby seeds glow into light; a Fergana pomegranate orchard
   at golden hour. Weddings.
   Built on shared/base.css; this sheet is the look.
   ========================================================= */

:root {
  --bg: #fbf1eb;
  --ink: #3a1519;
  --ink-soft: #7d5251;
  --accent: #a8172f;
  --accent-deep: #7c0e22;
  --accent-soft: #f6dcd8;
  --cobalt: #1f4796;
  --cobalt-soft: #e6ecf7;
  --leaf: #4f7b3b;
  --gold: #d7953a;
  --line: rgba(124, 14, 34, 0.14);
  --line-strong: rgba(124, 14, 34, 0.3);
  --surface: #fff8f4;
  --on-accent: #fff6ef;
  --shadow: 110 20 30;
  --glow: rgba(255, 246, 236, 0.95);
  --intro-bg: #1c0f0a;

  --display: "Playfair", Georgia, serif;
  --body: "Spectral", Georgia, serif;
  --label: "Spectral", Georgia, serif;

  --open-default: url("/styles/anor/media/open-poster.jpg");
  --amb-poster: url("/styles/anor/media/amb-poster.jpg");
  --close-poster: url("/styles/anor/media/close-poster.jpg");
  --dissolve: 2s;
  --pulse: rgba(255, 226, 200, 0.95);
  --pulse-glow: rgba(255, 120, 90, 0.5);

  /* a crinkled scarlet pomegranate petal, and one ruby seed */
  --petal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 48'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ff7a5c'/%3E%3Cstop offset='.55' stop-color='%23e3352f'/%3E%3Cstop offset='1' stop-color='%23a8162a'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M20 46c-3-1-6-6-8-11C8 27 3 22 4 14c1-6 5-10 9-11 1 2 3 2 4 0 2 2 4 2 6 0 1 2 3 2 4 0 4 1 9 5 9 12 0 8-5 13-9 20-2 5-4 10-7 11Z' fill='url(%23g)'/%3E%3Cpath d='M20 44c0-10-1-22 0-36M20 26c-4-4-8-7-11-13M20 26c4-4 8-7 11-13M20 18c-3-3-5-6-6-11M20 18c3-3 5-6 6-11' stroke='%23b31e24' stroke-width='.8' fill='none' opacity='.55'/%3E%3C/svg%3E");
  --seed: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 24'%3E%3Cpath d='M10 1c5 4 9 9 9 14a9 9 0 0 1-18 0C1 10 5 5 10 1Z' fill='%23b0102c'/%3E%3Cpath d='M10 3c3 3 7 7 7 12a7 7 0 0 1-7 7' fill='none' stroke='%23e3485c' stroke-width='1.2' opacity='.6'/%3E%3Cellipse cx='7' cy='12' rx='2' ry='3.2' fill='%23ffd2d6' opacity='.85'/%3E%3C/svg%3E");
}

body {
  font-size: 18.5px;
  background:
    radial-gradient(ellipse 140% 50% at 50% 0%, rgba(238, 170, 120, 0.16), transparent 70%),
    var(--bg);
}

.label {
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.26em;
}

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

.intro__kicker {
  color: #f3c79a;
  text-shadow: 0 1px 10px rgba(20, 8, 4, 0.9);
}

.intro__to {
  font-size: clamp(28px, 8vw, 38px);
  color: #fff3e6;
  text-shadow: 0 2px 18px rgba(20, 8, 4, 0.9), 0 0 4px rgba(20, 8, 4, 0.6);
}

.intro__hint {
  letter-spacing: 0.16em;
  background: rgba(36, 16, 12, 0.6);
  border-color: rgba(243, 199, 154, 0.38);
  color: #f6d3ac;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.8);
}

.intro__tap {
  border-color: #f3c79a;
}

.intro__tap::after {
  background: #e65a4a;
}

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

.hero__veil {
  background:
    radial-gradient(ellipse 96% 30% at 50% 24%, rgba(255, 244, 228, 0.62), rgba(255, 244, 228, 0) 74%),
    linear-gradient(to bottom, rgba(251, 241, 235, 0) 82%, rgba(251, 241, 235, 0.8) 95%, var(--bg) 100%);
}

.hero__text {
  top: max(9%, calc(env(safe-area-inset-top) + 58px));
  padding: 0 22px;
}

.hero__kicker {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--accent-deep);
  text-shadow: 0 0 12px var(--glow), 0 0 4px var(--glow);
}

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

.name {
  display: block;
  white-space: nowrap;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(58px, 17.5vw, 78px);
  line-height: 1.08;
  letter-spacing: 0.01em;
  color: var(--accent-deep);
  text-shadow: 0 0 22px var(--glow), 0 0 7px var(--glow);
}

.names__amp {
  display: block;
  margin: 2px 0 0;
  font-family: var(--body);
  font-style: italic;
  font-size: clamp(24px, 7vw, 30px);
  line-height: 1.1;
  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;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 22px;
  border-radius: 999px;
  background: rgba(255, 248, 242, 0.9);
  border: 1px solid var(--line-strong);
  white-space: nowrap;
  font-style: italic;
  font-size: 18px;
  color: var(--ink);
  box-shadow: 0 12px 26px -14px rgb(var(--shadow) / 0.7);
}

/* a ruby seed between the date and the weekday */
.hero__date i {
  width: 8px;
  height: 10px;
  background: var(--seed) center / contain no-repeat;
}

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

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

.hero.is-in .name--one {
  animation: ripen 2.4s var(--ease) 0.8s both;
}

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

.hero.is-in .name--two {
  animation: ripen 2.4s var(--ease) 2s both;
}

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

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

/* the names glow out of rose-gold light, like the seeds did */
@keyframes ripen {
  0% {
    opacity: 0;
    filter: blur(10px);
    color: #f0b48c;
    transform: scale(0.97);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    filter: blur(0);
    color: var(--accent-deep);
    transform: none;
  }
}

/* ---------- Falling petals and seeds ---------- */

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

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

.petals i {
  position: absolute;
  top: -40px;
  left: var(--x);
  width: var(--s);
  height: calc(var(--s) * 1.2);
  background: var(--petal) center / contain no-repeat;
  opacity: 0.82;
  will-change: transform;
  animation: drift var(--d) linear var(--delay) infinite;
}

/* two of them are seeds: smaller, they fall straighter */
.petals i:nth-child(3),
.petals i:nth-child(6) {
  background-image: var(--seed);
  opacity: 0.9;
  filter: drop-shadow(0 0 4px rgba(255, 150, 160, 0.6));
}

.petals i:nth-child(1) { --x: 8%; --s: 26px; --d: 24s; --delay: -4s; --sway: 60px; }
.petals i:nth-child(2) { --x: 28%; --s: 20px; --d: 29s; --delay: -15s; --sway: -55px; }
.petals i:nth-child(3) { --x: 46%; --s: 12px; --d: 21s; --delay: -9s; --sway: 18px; }
.petals i:nth-child(4) { --x: 66%; --s: 24px; --d: 27s; --delay: -20s; --sway: -70px; }
.petals i:nth-child(5) { --x: 88%; --s: 21px; --d: 25s; --delay: -11s; --sway: 45px; }
.petals i:nth-child(6) { --x: 78%; --s: 11px; --d: 23s; --delay: -2s; --sway: -16px; }
.petals i:nth-child(7) { --x: 38%; --s: 18px; --d: 33s; --delay: -26s; --sway: 50px; }

@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  25% {
    transform: translate3d(var(--sway), 28vh, 0) rotate(80deg);
  }
  50% {
    transform: translate3d(0, 56vh, 0) rotate(150deg);
  }
  75% {
    transform: translate3d(var(--sway), 84vh, 0) rotate(240deg);
  }
  100% {
    transform: translate3d(0, 112vh, 0) rotate(320deg);
  }
}

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

.title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(36px, 10.5vw, 46px);
  letter-spacing: 0.01em;
  color: var(--accent-deep);
}

.divider {
  width: min(78%, 290px);
  margin-top: 14px;
}

.corner {
  width: min(38vw, 165px);
}

/* the branch art is taller than wide: start the text below it */
.section:has(> .corner) {
  padding-top: 196px;
}

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

.invite__text {
  font-size: 19px;
}

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

.parents__names {
  font-style: italic;
  font-size: 20px;
}

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

/* ---------- Date: the day inside a ruby pomegranate ---------- */

.bigdate {
  gap: 10px;
  margin-bottom: 6px;
}

.bigdate__month {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--cobalt);
}

.fruit {
  position: relative;
  display: grid;
  place-items: center;
  width: 168px;
  height: 160px;
  margin-top: 26px;
  border-radius: 50% 50% 48% 48% / 52% 52% 48% 48%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 200, 196, 0.55), rgba(255, 200, 196, 0) 26%),
    radial-gradient(circle at 60% 65%, #b81d36, #8c0f25 58%, #5e0816 100%);
  box-shadow:
    inset -10px -14px 26px rgba(50, 0, 10, 0.45),
    0 22px 30px -18px rgb(var(--shadow) / 0.75);
}

/* the crown */
.fruit::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -22px;
  width: 46px;
  height: 32px;
  translate: -50% 0;
  background: linear-gradient(180deg, #b0402f, #7c1420 80%);
  clip-path: polygon(0 0, 17% 42%, 27% 6%, 39% 46%, 50% 0, 61% 46%, 73% 6%, 83% 42%, 100% 0, 80% 100%, 20% 100%);
}

.bigdate__day {
  font-family: var(--display);
  font-size: 72px;
  font-weight: 400;
  line-height: 1;
  color: #fff3ea;
  text-shadow: 0 2px 12px rgba(60, 0, 10, 0.5);
}

.bigdate__side {
  font-style: italic;
  font-size: 20px;
  color: var(--ink-soft);
}

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

.cal {
  border-radius: 16px;
}

.cal__d.is-day {
  color: #fff3ea;
}

.cal__d.is-day::before {
  background: radial-gradient(circle at 35% 30%, #d0384c, var(--accent) 55%, var(--accent-deep));
  box-shadow: 0 0 0 4px var(--accent-soft), 0 8px 16px -6px rgb(var(--shadow) / 0.6);
}

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

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

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

.btn {
  font-weight: 600;
  letter-spacing: 0.14em;
}

.btn--solid {
  background: linear-gradient(180deg, #c0273f, var(--accent-deep));
}

/* ---------- Program: Rishton cobalt rings ---------- */

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

.tl__ico {
  background: #fff;
  border: 2px solid var(--cobalt);
  color: var(--cobalt);
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 4px rgba(31, 71, 150, 0.25);
}

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

.tl__title {
  font-weight: 600;
}

.tl__note {
  font-style: italic;
}

.detail__ico {
  background: #fff;
  border: 2px solid var(--cobalt);
  color: var(--cobalt);
}

.detail__title {
  font-weight: 600;
}

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

.venue__name {
  font-family: var(--display);
  font-weight: 400;
  color: var(--accent-deep);
}

/* ---------- Gifts: ruby, cobalt and leaf cards, sprinkled with seeds ---------- */

.ccard {
  color: #fff6ef;
  border: 1px solid rgba(255, 220, 210, 0.5);
  background: linear-gradient(135deg, #b8213a, #6a0b1d);
}

.ccard::before {
  content: "";
  position: absolute;
  right: -18px;
  top: -20px;
  width: 140px;
  height: 140px;
  background:
    radial-gradient(circle, rgba(255, 210, 215, 0.4) 0 3px, transparent 4px) 0 0 / 22px 24px,
    radial-gradient(circle, rgba(255, 210, 215, 0.25) 0 2px, transparent 3px) 11px 12px / 22px 24px;
  border-radius: 50%;
  -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%);
  mask: radial-gradient(circle, #000 30%, transparent 70%);
}

.ccard--humo {
  background: linear-gradient(135deg, #2b5bb4, #142f6b);
}

.ccard--visa {
  background: linear-gradient(135deg, #5d8a45, #2f4d22);
}

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

.sent__art {
  width: 130px;
}

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

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

.closing__veil {
  background:
    linear-gradient(to bottom, var(--bg) 0%, rgba(251, 241, 235, 0.55) 7%, rgba(251, 241, 235, 0) 20%),
    radial-gradient(ellipse 90% 18% at 50% 19%, rgba(30, 18, 60, 0.5), transparent 76%),
    linear-gradient(to top, var(--bg) 0%, rgba(251, 241, 235, 0) 14%);
}

.closing__wait {
  font-family: var(--display);
  font-size: clamp(40px, 12vw, 56px);
  color: #fff1e4;
  text-shadow: 0 2px 18px rgba(20, 8, 40, 0.8);
}

.closing__names {
  color: #ffc9a0;
  text-shadow: 0 1px 10px rgba(20, 8, 40, 0.85);
}

.closing__amp {
  font-family: var(--body);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: none;
}

.footer__art {
  width: 120px;
}

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

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

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

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