:root {
  --ink: #24131f;
  --ink-soft: #432838;
  --wine: #6d2d46;
  --wine-deep: #351723;
  --wine-bright: #8b405d;
  --blush: #d88b9d;
  --rose-mist: #ecd2d5;
  --ivory: #fff9f2;
  --ivory-soft: #f8eee5;
  --paper: #f4e7db;
  --gold: #d8b27a;
  --gold-light: #f0d39f;
  --sage: #6b7a5c;
  --white: #fffdf9;
  --shadow: 0 24px 70px rgba(36, 19, 31, 0.22);
  --display-font: 'Aref Ruqaa', 'Noto Naskh Arabic', 'Geeza Pro', serif;
  --body-font: 'Tajawal', 'Noto Sans Arabic', 'Geeza Pro', sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --page-padding: clamp(1.25rem, 5vw, 5rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--gold) var(--wine-deep);
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--wine-deep);
  font-family: var(--body-font);
  font-weight: 400;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.js body.invitation-locked {
  height: 100vh;
  overflow: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
p {
  margin-block-start: 0;
}

::selection {
  color: var(--white);
  background: var(--wine);
}

:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--wine-deep) !important;
}

main:focus {
  outline: none;
  box-shadow: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 10000;
  inset-block-start: 0.75rem;
  inset-inline-start: 0.75rem;
  padding: 0.65rem 1rem;
  color: var(--white);
  background: var(--wine-deep);
  border: 1px solid var(--gold);
  border-radius: 999px;
  transform: translateY(-180%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.section {
  position: relative;
  isolation: isolate;
}

.section-shell {
  width: min(1120px, calc(100% - (var(--page-padding) * 2)));
  margin-inline: auto;
}

.section-kicker {
  margin-block-end: 0.7rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.section-heading {
  max-width: 670px;
  margin-inline: auto;
  margin-block-end: clamp(2.5rem, 7vw, 4.5rem);
  text-align: center;
}

.section-heading h2,
.date-copy h2,
.welcome h2,
.blessing h2 {
  margin-block-end: 1rem;
  font-family: var(--display-font);
  font-size: clamp(2.55rem, 6vw, 4.8rem);
  font-weight: 700;
  line-height: 1.35;
}

.section-heading > p:last-child,
.date-copy > p,
.welcome__content > p {
  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 2;
}

.flourish {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  width: min(190px, 60%);
  margin: 1rem auto 1.4rem;
  color: var(--wine);
}

.flourish span {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor);
}

.flourish span:last-child {
  background: linear-gradient(90deg, currentColor, transparent);
}

.flourish i {
  font-size: 0.48rem;
  font-style: normal;
  transform: rotate(45deg);
}

.flourish--light {
  color: var(--gold);
}

.js .reveal {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 0.9s var(--ease-out),
    transform 0.9s var(--ease-out);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Opening scene */
.opening-screen {
  position: fixed;
  z-index: 9000;
  inset: 0;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  color: var(--ivory);
  background: transparent;
}

.no-js .opening-screen {
  display: none;
}

.opening-screen[hidden] {
  display: none;
}

.opening-screen__curtain {
  position: absolute;
  z-index: -2;
  inset-block: 0;
  width: calc(50% + 2px);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.02), transparent 9%, transparent 91%, rgba(0, 0, 0, 0.13)),
    radial-gradient(circle at 50% 32%, #82415a 0, #572439 38%, #2c1420 100%);
  transition: transform 1.25s 0.5s var(--ease-out);
}

.opening-screen__curtain::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background-image: repeating-linear-gradient(90deg, transparent 0 22px, rgba(255, 255, 255, 0.08) 23px, transparent 47px);
}

.opening-screen__curtain--right {
  inset-inline-start: 0;
  border-inline-end: 1px solid rgba(216, 178, 122, 0.3);
}

.opening-screen__curtain--left {
  inset-inline-end: 0;
  border-inline-start: 1px solid rgba(216, 178, 122, 0.3);
}

.opening-screen__glow {
  position: absolute;
  z-index: -1;
  width: min(72vw, 720px);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(216, 178, 122, 0.18), transparent 65%);
  filter: blur(2px);
  animation: breathe 4s ease-in-out infinite;
}

.opening-screen__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(92vw, 620px);
  padding: 2rem 1rem;
  text-align: center;
  transition:
    opacity 0.45s ease,
    transform 0.65s var(--ease-out);
}

.opening-screen__eyebrow {
  margin-block-end: clamp(1rem, 4vh, 2rem);
  color: var(--gold-light);
  font-size: 0.78rem;
  font-weight: 500;
}

.opening-screen__title {
  max-width: 520px;
  margin: clamp(1.25rem, 4vh, 2.2rem) auto 0.3rem;
  font-family: var(--display-font);
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1.5;
}

.opening-screen__date {
  margin-block-end: clamp(1.2rem, 3vh, 2rem);
  color: rgba(255, 249, 242, 0.73);
  font-size: 0.9rem;
}

.opening-screen__hint {
  margin: 0.75rem 0 0;
  color: rgba(255, 249, 242, 0.68);
  font-size: 0.74rem;
}

.envelope {
  position: relative;
  width: min(76vw, 330px);
  aspect-ratio: 1.55;
  perspective: 900px;
  filter: drop-shadow(0 24px 24px rgba(0, 0, 0, 0.25));
}

.envelope__shadow {
  position: absolute;
  z-index: -1;
  inset: 75% 8% -12%;
  background: rgba(0, 0, 0, 0.32);
  border-radius: 50%;
  filter: blur(13px);
}

.envelope__back,
.envelope__front,
.envelope__flap {
  position: absolute;
  inset: 0;
  border-radius: 7px;
}

.envelope__back {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), transparent 45%),
    #eadbca;
  border: 1px solid rgba(216, 178, 122, 0.68);
}

.envelope__letter {
  position: absolute;
  z-index: 1;
  inset: 8% 8% 12%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--wine-deep);
  background: var(--ivory);
  border: 1px solid rgba(216, 178, 122, 0.55);
  border-radius: 4px;
  transition: transform 0.8s 0.08s var(--ease-out);
}

.envelope__letter span {
  color: var(--wine);
  font-size: 0.68rem;
}

.envelope__letter strong {
  font-family: var(--display-font);
  font-size: clamp(1.2rem, 4vw, 1.7rem);
}

.envelope__letter i {
  color: var(--gold);
  font-style: normal;
}

.envelope__front {
  z-index: 3;
  background:
    linear-gradient(145deg, transparent 49.5%, #f3e8dc 50%) left / 51% 100% no-repeat,
    linear-gradient(215deg, transparent 49.5%, #eadac9 50%) right / 51% 100% no-repeat;
  clip-path: polygon(0 38%, 50% 76%, 100% 38%, 100% 100%, 0 100%);
  border-block-end: 1px solid rgba(176, 137, 91, 0.45);
}

.envelope__flap {
  z-index: 4;
  height: 57%;
  background: linear-gradient(180deg, #f6ecdf, #e5d2bf);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top;
  transition: transform 0.7s var(--ease-out);
}

.envelope__seal {
  position: absolute;
  z-index: 5;
  inset-block-start: 44%;
  inset-inline-start: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  color: #f7dec1;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.28), transparent 18%),
    radial-gradient(circle, #9a4b61 0 55%, #713147 57% 70%, #8b4057 72%);
  border-radius: 46% 54% 50% 48%;
  box-shadow: 0 5px 13px rgba(56, 19, 35, 0.34);
  font-family: var(--display-font);
  font-size: 1.2rem;
  transform: translate(50%, -20%);
  transition:
    transform 0.55s var(--ease-out),
    opacity 0.35s ease;
}

.envelope__seal i {
  margin-inline: 0.15rem;
  color: var(--gold-light);
  font-size: 0.65rem;
  font-style: normal;
}

.opening-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  min-height: 54px;
  padding: 0.65rem 1.4rem 0.65rem 0.8rem;
  overflow: hidden;
  color: var(--wine-deep);
  background: linear-gradient(135deg, #f9e6c3, #cfa469);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  font-weight: 700;
  transition:
    transform 0.3s var(--ease-out),
    box-shadow 0.3s ease;
}

.opening-trigger::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.55) 45%, transparent 65%);
  transform: translateX(120%);
  animation: button-shine 3.6s 1.2s ease-in-out infinite;
}

.opening-trigger > span {
  position: relative;
  z-index: 1;
}

.opening-trigger__icon,
.opening-trigger__arrow {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  background: rgba(109, 45, 70, 0.12);
  border-radius: 50%;
}

.opening-trigger__arrow {
  width: auto;
  background: transparent;
  transition: transform 0.25s ease;
}

.opening-trigger:hover {
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
  transform: translateY(-3px);
}

.opening-trigger:hover .opening-trigger__arrow {
  transform: translateX(-4px);
}

.opening-screen.is-opening .envelope__flap {
  transform: rotateX(178deg);
}

.opening-screen.is-opening .envelope__letter {
  transform: translateY(-30%);
}

.opening-screen.is-opening .envelope__seal {
  opacity: 0;
  transform: translate(50%, -20%) scale(1.35) rotate(18deg);
}

.opening-screen.is-opening .opening-screen__content {
  opacity: 0;
  transform: scale(1.04);
  transition-delay: 0.55s;
}

.opening-screen.is-opening .opening-screen__curtain--right {
  transform: translateX(103%);
}

.opening-screen.is-opening .opening-screen__curtain--left {
  transform: translateX(-103%);
}

/* Global floating controls */
.topbar {
  position: fixed;
  z-index: 800;
  inset-block-start: max(0.7rem, env(safe-area-inset-top));
  inset-inline: max(0.7rem, env(safe-area-inset-right)) max(0.7rem, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: auto;
  max-width: 950px;
  min-height: 58px;
  margin-inline: auto;
  padding: 0.45rem 0.55rem;
  color: var(--ivory);
  background: rgba(37, 19, 31, 0.73);
  border: 1px solid rgba(240, 211, 159, 0.25);
  border-radius: 999px;
  box-shadow: 0 12px 36px rgba(32, 11, 22, 0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-24px);
  transition:
    opacity 0.6s ease,
    transform 0.7s var(--ease-out);
}

body.is-opened .topbar {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.topbar__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  width: 46px;
  height: 46px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(216, 178, 122, 0.32);
  border-radius: 50%;
  font-family: var(--display-font);
  font-size: 1.05rem;
}

.topbar__brand i {
  margin-inline: 0.08rem;
  color: var(--gold);
  font-size: 0.58rem;
  font-style: normal;
}

.topbar__date {
  margin: 0;
  color: var(--gold-light);
  font-size: 0.78rem;
  font-weight: 500;
}

.topbar__actions {
  display: flex;
  justify-self: end;
  gap: 0.35rem;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--ivory);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.icon-button:hover {
  color: var(--gold-light);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.icon-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.icon-button svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

#effectsToggle svg path {
  fill: none;
}

#effectsToggle[aria-pressed='true'] svg path {
  fill: rgba(240, 211, 159, 0.18);
}

.sound-on {
  display: none;
}

#soundToggle[aria-pressed='true'] .sound-on {
  display: block;
}

#soundToggle[aria-pressed='true'] .sound-off {
  display: none;
}

/* Petal effects */
.petal-layer {
  position: fixed;
  z-index: 700;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.petal {
  position: absolute;
  inset-block-start: -10%;
  inset-inline-start: var(--x);
  width: var(--size);
  height: calc(var(--size) * 0.7);
  opacity: var(--opacity);
  background: linear-gradient(135deg, #f3c6cd, #b85d78);
  border-radius: 80% 18% 70% 20%;
  filter: blur(var(--blur));
  transform: rotate(var(--rotation));
  animation: petal-fall var(--duration) var(--delay) linear infinite;
}

.burst-petal {
  position: fixed;
  z-index: 9500;
  width: 10px;
  height: 7px;
  pointer-events: none;
  background: linear-gradient(135deg, var(--gold-light), var(--blush));
  border-radius: 85% 18% 75% 22%;
  animation: petal-burst 1.2s var(--ease-out) forwards;
}

body.effects-paused .petal-layer {
  opacity: 0;
}

body.effects-paused .petal,
body.effects-paused .hero__ornament,
body.effects-paused .welcome__rings,
body.effects-paused .scroll-cue i,
body.effects-paused .scroll-cue i::after,
body.effects-paused .signature i,
body.effects-paused .countdown-separator,
body.effects-paused .countdown-card__number,
body.effects-paused .date-card__shine,
body.effects-paused .blessing__star {
  animation: none;
}

body.effects-paused .petal-layer,
body.effects-paused .interactive-card,
body.effects-paused .reveal {
  transition: none !important;
}

body.effects-paused .reveal {
  opacity: 1 !important;
  transform: none !important;
}

body.effects-paused .countdown-card__number {
  opacity: 1;
  transform: none;
}

body.effects-paused .countdown-separator {
  opacity: 0.6;
}

body.effects-paused .date-card__shine {
  opacity: 0;
}

/* Hero */
.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(6.8rem, 13vh, 9rem) var(--page-padding) clamp(6rem, 11vh, 8rem);
  overflow: hidden;
  background: var(--paper);
  isolation: isolate;
}

.hero__image,
.hero__wash {
  position: absolute;
  z-index: -3;
  inset: 0;
}

.hero__image {
  background-image: url('assets/engagement-floral-hero.webp');
  background-position: center;
  background-size: cover;
  transform: scale(1.04);
  transition: transform 2.2s var(--ease-out);
}

body.is-opened .hero__image {
  transform: scale(1);
}

.hero__wash {
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(255, 249, 242, 0.18), rgba(255, 249, 242, 0.07) 55%, rgba(56, 26, 38, 0.17)),
    radial-gradient(circle at center, rgba(255, 252, 247, 0.4), transparent 65%);
}

.hero__ornament {
  position: absolute;
  color: rgba(109, 45, 70, 0.32);
  font-size: 0.72rem;
  animation: ornament-float 5s ease-in-out infinite;
}

.hero__ornament--one {
  inset-block-start: 20%;
  inset-inline-start: 12%;
}

.hero__ornament--two {
  inset-block-end: 25%;
  inset-inline-end: 11%;
  animation-delay: -2.2s;
}

.hero-card {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  width: min(100%, 660px);
  padding: 8px;
  background: rgba(255, 250, 244, 0.56);
  border: 1px solid rgba(112, 66, 55, 0.23);
  box-shadow:
    0 34px 90px rgba(67, 38, 38, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  border-radius: 2px 38px 2px 38px;
  backdrop-filter: blur(13px);
  -webkit-backdrop-filter: blur(13px);
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.25s ease-out;
}

.hero-card__inner {
  position: relative;
  padding: clamp(2.5rem, 7vw, 5.2rem) clamp(1.2rem, 6vw, 4.2rem) clamp(2.4rem, 6vw, 4rem);
  text-align: center;
  border: 1px solid rgba(153, 105, 62, 0.47);
  border-radius: 0 30px 0 30px;
}

.hero-card__inner::before,
.hero-card__inner::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  color: rgba(109, 45, 70, 0.54);
  background: currentColor;
  clip-path: polygon(50% 0, 59% 39%, 100% 50%, 59% 61%, 50% 100%, 41% 61%, 0 50%, 41% 39%);
}

.hero-card__inner::before {
  inset-block-start: 0.65rem;
  inset-inline-start: 0.85rem;
}

.hero-card__inner::after {
  inset-block-end: 0.65rem;
  inset-inline-end: 0.85rem;
  transform: rotate(180deg);
}

.bismillah {
  margin-block-end: 0.8rem;
  color: var(--wine-deep);
  font-family: var(--display-font);
  font-size: clamp(0.95rem, 2.2vw, 1.25rem);
}

.hero-card__eyebrow {
  margin-block-end: 0.2rem;
  color: var(--wine);
  font-size: 0.78rem;
  font-weight: 700;
}

.couple-names {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  color: var(--wine-deep);
  font-family: var(--display-font);
  font-weight: 700;
  line-height: 0.92;
}

.couple-names:focus {
  outline: none;
  box-shadow: none !important;
}

.couple-names__name {
  font-size: clamp(4.6rem, 15vw, 8.5rem);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.75);
}

.couple-names__join {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0.05rem 0 0.35rem;
  color: var(--gold);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  line-height: 1;
}

.couple-names__join i {
  width: clamp(35px, 9vw, 70px);
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor);
}

.couple-names__join i:last-child {
  background: linear-gradient(90deg, currentColor, transparent);
}

.hero-card__copy {
  max-width: 430px;
  margin: 1.4rem auto 1rem;
  color: rgba(36, 19, 31, 0.77);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
}

.hero-card__date {
  margin-block-end: 1.6rem;
  color: var(--wine-deep);
  font-size: clamp(0.9rem, 2vw, 1rem);
  font-weight: 700;
}

.hero-card__date span {
  margin-inline: 0.4rem;
  color: var(--gold);
}

.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 49px;
  padding: 0.6rem 1.35rem;
  color: var(--ivory);
  background: var(--wine-deep);
  border: 1px solid var(--wine-deep);
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(69, 25, 43, 0.18);
  font-size: 0.9rem;
  font-weight: 700;
  transition:
    color 0.25s ease,
    background 0.25s ease,
    transform 0.25s var(--ease-out);
}

.primary-link:hover {
  color: var(--wine-deep);
  background: transparent;
  transform: translateY(-3px);
}

.scroll-cue {
  position: absolute;
  inset-block-end: 1.2rem;
  inset-inline-start: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: rgba(50, 24, 36, 0.68);
  font-size: 0.68rem;
  transform: translateX(50%);
}

.scroll-cue i {
  position: relative;
  width: 22px;
  height: 35px;
  border: 1px solid rgba(80, 42, 56, 0.45);
  border-radius: 999px;
}

.scroll-cue i::after {
  content: '';
  position: absolute;
  inset-block-start: 7px;
  inset-inline-start: calc(50% - 2px);
  width: 4px;
  height: 4px;
  background: var(--wine);
  border-radius: 50%;
  animation: scroll-dot 1.8s ease-in-out infinite;
}

.js .hero-card__eyebrow,
.js .couple-names__name,
.js .couple-names__join,
.js .hero-card__copy,
.js .hero-card__date,
.js .primary-link,
.js .bismillah,
.js .hero-card .flourish {
  opacity: 0;
  transform: translateY(18px);
}

body.is-opened .hero-card__eyebrow,
body.is-opened .couple-names__name,
body.is-opened .couple-names__join,
body.is-opened .hero-card__copy,
body.is-opened .hero-card__date,
body.is-opened .primary-link,
body.is-opened .bismillah,
body.is-opened .hero-card .flourish {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.75s var(--ease-out),
    transform 0.75s var(--ease-out);
}

body.is-opened .bismillah { transition-delay: 0.18s; }
body.is-opened .hero-card .flourish { transition-delay: 0.28s; }
body.is-opened .hero-card__eyebrow { transition-delay: 0.36s; }
body.is-opened .couple-names__name:first-child { transition-delay: 0.46s; }
body.is-opened .couple-names__join { transition-delay: 0.58s; }
body.is-opened .couple-names__name:last-child { transition-delay: 0.68s; }
body.is-opened .hero-card__copy { transition-delay: 0.8s; }
body.is-opened .hero-card__date { transition-delay: 0.9s; }
body.is-opened .primary-link { transition-delay: 1s; }

/* Welcome */
.welcome {
  min-height: 760px;
  padding: clamp(7rem, 13vw, 11rem) 0;
  overflow: hidden;
  color: var(--ivory);
  background:
    radial-gradient(circle at 12% 22%, rgba(139, 64, 93, 0.3), transparent 24%),
    radial-gradient(circle at 88% 75%, rgba(216, 178, 122, 0.12), transparent 26%),
    var(--ink);
}

.welcome::before,
.welcome::after {
  content: '';
  position: absolute;
  z-index: -1;
  width: 270px;
  height: 450px;
  opacity: 0.16;
  border: 1px solid var(--gold);
  border-radius: 50%;
  transform: rotate(35deg);
}

.welcome::before {
  inset-block-start: -190px;
  inset-inline-end: -90px;
}

.welcome::after {
  inset-block-end: -250px;
  inset-inline-start: -70px;
}

.welcome__halo {
  position: absolute;
  z-index: -1;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  width: min(85vw, 680px);
  aspect-ratio: 1;
  border: 1px solid rgba(216, 178, 122, 0.08);
  border-radius: 50%;
  box-shadow:
    0 0 0 70px rgba(216, 178, 122, 0.025),
    0 0 0 140px rgba(216, 178, 122, 0.018);
  transform: translate(50%, -50%);
}

.welcome__content {
  max-width: 760px;
  text-align: center;
}

.welcome h2 {
  color: var(--white);
}

.welcome__content > p:not(.section-kicker) {
  color: rgba(255, 249, 242, 0.68);
}

.welcome__rings {
  position: relative;
  width: 136px;
  height: 84px;
  margin: 0 auto 2.6rem;
  animation: ornament-float 5s ease-in-out infinite;
}

.welcome__rings span {
  position: absolute;
  inset-block-start: 7px;
  width: 72px;
  aspect-ratio: 1;
  border: 2px solid var(--gold);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 3px var(--ink),
    inset 0 0 0 4px rgba(240, 211, 159, 0.36),
    0 4px 14px rgba(0, 0, 0, 0.3);
}

.welcome__rings span:first-child {
  inset-inline-start: 13px;
}

.welcome__rings span:nth-child(2) {
  inset-inline-end: 13px;
}

.welcome__rings i {
  position: absolute;
  z-index: 2;
  inset-block-start: -10px;
  inset-inline-start: calc(50% - 10px);
  color: var(--gold-light);
  font-size: 1.1rem;
  font-style: normal;
  filter: drop-shadow(0 0 8px rgba(240, 211, 159, 0.5));
}

.signature {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-block-start: 2.4rem;
  color: var(--gold-light);
  font-family: var(--display-font);
  font-size: clamp(1.4rem, 4vw, 2rem);
}

.signature i {
  color: var(--blush);
  font-family: var(--body-font);
  font-size: 0.68rem;
  font-style: normal;
  animation: heart-beat 2s ease-in-out infinite;
}

/* Countdown */
.countdown {
  padding: clamp(6rem, 12vw, 10rem) 0;
  overflow: hidden;
  color: var(--ivory);
  background:
    linear-gradient(135deg, rgba(132, 53, 83, 0.93), rgba(70, 25, 44, 0.98)),
    var(--wine);
}

.countdown::before,
.countdown::after {
  content: '';
  position: absolute;
  z-index: -1;
  width: clamp(9rem, 23vw, 21rem);
  aspect-ratio: 1;
  color: rgba(240, 211, 159, 0.16);
  background: currentColor;
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
}

.countdown::before {
  inset-block-start: -5%;
  inset-inline-end: -4%;
}

.countdown::after {
  inset-block-end: -12%;
  inset-inline-start: -4%;
}

.countdown .section-heading h2 {
  color: var(--white);
}

.countdown .section-heading > p:last-child {
  color: rgba(255, 249, 242, 0.68);
}

.countdown-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: clamp(0.35rem, 1.8vw, 1.1rem);
  max-width: 900px;
  margin-inline: auto;
}

.countdown-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  aspect-ratio: 0.9;
  overflow: hidden;
  background: rgba(255, 252, 248, 0.08);
  border: 1px solid rgba(240, 211, 159, 0.32);
  border-radius: clamp(16px, 3vw, 28px);
  box-shadow:
    0 20px 42px rgba(31, 8, 20, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(9px);
}

.countdown-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.09), transparent 50%);
}

.countdown-card__number {
  position: relative;
  direction: rtl;
  color: var(--white);
  font-family: var(--display-font);
  font-size: clamp(2rem, 7vw, 5rem);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1;
}

.countdown-card__number.is-ticking {
  animation: number-tick 0.32s var(--ease-out);
}

.countdown-card__label {
  position: relative;
  margin-block-start: 0.55rem;
  color: var(--gold-light);
  font-size: clamp(0.65rem, 1.5vw, 0.85rem);
}

.countdown-separator {
  color: rgba(240, 211, 159, 0.6);
  font-family: var(--display-font);
  font-size: clamp(1.6rem, 5vw, 3rem);
  animation: separator-pulse 1s ease-in-out infinite;
}

.countdown__message {
  margin: 2rem 0 0;
  color: rgba(255, 249, 242, 0.58);
  font-size: 0.86rem;
  text-align: center;
}

/* Date card */
.date-section {
  padding: clamp(6.5rem, 12vw, 11rem) 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 5% 10%, rgba(216, 139, 157, 0.2), transparent 24%),
    radial-gradient(circle at 95% 90%, rgba(107, 122, 92, 0.15), transparent 27%),
    var(--ivory-soft);
}

.date-section__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: center;
  gap: clamp(3rem, 8vw, 7rem);
}

.date-copy {
  max-width: 470px;
}

.date-copy h2 {
  color: var(--wine-deep);
}

.date-copy > p {
  color: rgba(36, 19, 31, 0.69);
}

.date-copy__line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 120px;
  margin: 2rem 0 1.2rem;
  color: var(--wine);
}

.date-copy__line span {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, currentColor, transparent);
}

.date-copy__line i {
  font-size: 0.52rem;
  font-style: normal;
}

.date-copy .date-copy__note {
  color: var(--wine);
  font-family: var(--display-font);
  font-size: 1.35rem;
}

.date-card {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  width: min(100%, 570px);
  margin-inline-start: auto;
  padding: clamp(1.5rem, 4vw, 3rem);
  overflow: hidden;
  color: var(--ivory);
  background:
    radial-gradient(circle at 75% 5%, rgba(180, 89, 118, 0.34), transparent 37%),
    linear-gradient(145deg, #4b2032, #27141f);
  border: 1px solid rgba(216, 178, 122, 0.48);
  border-radius: 36px 5px 36px 5px;
  box-shadow: 0 35px 70px rgba(64, 30, 43, 0.25);
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.25s ease-out;
}

.js .date-card.reveal {
  opacity: 0;
  transform: translateY(36px) perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
}

.js .date-card.reveal.is-visible {
  opacity: 1;
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
}

.date-card::before {
  content: '';
  position: absolute;
  inset: 10px;
  pointer-events: none;
  border: 1px solid rgba(216, 178, 122, 0.25);
  border-radius: 28px 2px 28px 2px;
}

.date-card__shine {
  position: absolute;
  z-index: 3;
  inset: -60% auto -60% -35%;
  width: 20%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: rotate(18deg);
}

.date-card.is-visible .date-card__shine {
  animation: card-shine 1.5s 0.6s ease both;
}

.date-card__topline {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-block-end: 1.4rem;
  color: var(--gold-light);
  font-size: 0.75rem;
  font-weight: 500;
}

.date-card__topline i {
  font-size: 0.45rem;
  font-style: normal;
  transform: rotate(45deg);
}

.calendar-sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 2rem;
  color: var(--wine-deep);
  background:
    linear-gradient(rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.72)),
    url('assets/engagement-floral-hero.webp') center / cover;
  border-radius: 22px 2px 22px 2px;
  box-shadow: inset 0 0 0 1px rgba(127, 75, 58, 0.16);
}

.calendar-sheet::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(109, 45, 70, 0.22);
  border-radius: inherit;
  transform: scale(0.95);
}

.calendar-sheet__month {
  position: relative;
  z-index: 1;
  color: var(--wine);
  font-size: 1rem;
  font-weight: 700;
}

.calendar-sheet strong {
  position: relative;
  z-index: 1;
  margin-block: 0 -0.2rem;
  font-family: var(--body-font);
  font-size: clamp(6.5rem, 17vw, 10rem);
  line-height: 1;
  font-weight: 300;
}

.calendar-sheet__year {
  position: relative;
  z-index: 1;
  font-size: 0.82rem;
  font-weight: 700;
}

.date-card__caption {
  position: relative;
  margin: 1.2rem 0;
  color: rgba(255, 249, 242, 0.72);
  font-family: var(--display-font);
  font-size: 1.16rem;
  text-align: center;
}

.date-card__actions {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 49px;
  padding: 0.65rem 0.8rem;
  color: var(--ivory);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 249, 242, 0.2);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  transition:
    background 0.25s ease,
    border 0.25s ease,
    color 0.25s ease,
    transform 0.25s var(--ease-out);
}

.action-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.action-button--primary {
  color: var(--wine-deep);
  background: var(--gold-light);
  border-color: var(--gold-light);
}

.action-button:hover {
  color: var(--wine-deep);
  background: var(--ivory);
  border-color: var(--ivory);
  transform: translateY(-3px);
}

.action-status {
  position: relative;
  min-height: 1.5em;
  margin: 0.7rem 0 0;
  color: var(--gold-light);
  font-size: 0.74rem;
  text-align: center;
}

.date-section__leaf {
  position: absolute;
  z-index: -1;
  width: 260px;
  height: 370px;
  opacity: 0.13;
  border: 1px solid var(--sage);
  border-radius: 100% 0 100% 0;
}

.date-section__leaf--one {
  inset-block-start: -110px;
  inset-inline-start: -100px;
  transform: rotate(-28deg);
}

.date-section__leaf--two {
  inset-block-end: -170px;
  inset-inline-end: -110px;
  transform: rotate(155deg);
}

/* Closing blessing */
.blessing {
  display: grid;
  place-items: center;
  min-height: 760px;
  padding: clamp(5.5rem, 10vw, 9rem) var(--page-padding);
  overflow: hidden;
  color: var(--ivory);
  background:
    radial-gradient(circle at center, rgba(125, 54, 81, 0.25), transparent 50%),
    linear-gradient(150deg, #23121d, #3d1928 55%, #1c1018);
}

.blessing::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.2;
  background-image:
    radial-gradient(circle at 20% 25%, var(--gold-light) 0 1px, transparent 1.5px),
    radial-gradient(circle at 78% 18%, var(--gold-light) 0 1px, transparent 1.5px),
    radial-gradient(circle at 85% 73%, var(--gold-light) 0 1px, transparent 1.5px),
    radial-gradient(circle at 14% 79%, var(--gold-light) 0 1px, transparent 1.5px);
  background-size: 180px 160px, 230px 210px, 270px 260px, 210px 250px;
}

.blessing__frame {
  position: relative;
  width: min(900px, 100%);
  padding: clamp(3.5rem, 9vw, 7rem) clamp(1.4rem, 8vw, 6rem);
  text-align: center;
  border: 1px solid rgba(216, 178, 122, 0.45);
  border-radius: 50% 50% 20px 20px / 18% 18% 20px 20px;
  box-shadow:
    inset 0 0 0 9px rgba(216, 178, 122, 0.035),
    0 28px 80px rgba(0, 0, 0, 0.25);
}

.blessing__frame::before,
.blessing__frame::after {
  content: '';
  position: absolute;
  width: 90px;
  height: 90px;
  border-color: var(--gold);
  border-style: solid;
  opacity: 0.5;
}

.blessing__frame::before {
  inset-block-start: 13px;
  inset-inline-start: 13px;
  border-width: 1px 0 0 1px;
  border-radius: 70% 0 0 0;
}

.blessing__frame::after {
  inset-block-end: 13px;
  inset-inline-end: 13px;
  border-width: 0 1px 1px 0;
  border-radius: 0 0 70% 0;
}

.blessing__star {
  display: inline-block;
  margin-block-end: 1.4rem;
  color: var(--gold-light);
  font-size: 1.25rem;
  filter: drop-shadow(0 0 11px rgba(240, 211, 159, 0.45));
  animation: ornament-float 4s ease-in-out infinite;
}

.blessing h2 {
  color: var(--white);
  font-size: clamp(2.2rem, 5.6vw, 4.3rem);
}

.blessing__frame > p:not(.section-kicker) {
  color: rgba(255, 249, 242, 0.7);
  font-size: 1rem;
}

.blessing__names {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-block-start: 2rem;
  color: var(--gold-light);
  font-family: var(--display-font);
  font-size: clamp(1.7rem, 4vw, 2.7rem);
}

.blessing__names i {
  color: var(--blush);
  font-size: 0.8em;
  font-style: normal;
}

.footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  min-height: 100px;
  padding: 1.4rem var(--page-padding);
  color: rgba(255, 249, 242, 0.5);
  background: #140b11;
  font-size: 0.75rem;
}

.footer p {
  margin: 0;
}

.footer p:last-child {
  text-align: left;
}

.footer div {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--gold);
  font-family: var(--display-font);
  font-size: 1.1rem;
}

.footer div i {
  color: var(--wine-bright);
  font-family: var(--body-font);
  font-size: 0.55rem;
  font-style: normal;
}

.noscript-message {
  position: fixed;
  z-index: 10000;
  inset-block-end: 0;
  inset-inline: 0;
  margin: 0;
  padding: 0.75rem;
  color: var(--white);
  background: var(--wine-deep);
  text-align: center;
}

.no-js .topbar,
.no-js .date-card__actions,
.no-js .countdown-grid {
  display: none;
}

/* Animations */
@keyframes breathe {
  0%, 100% { opacity: 0.68; transform: scale(0.94); }
  50% { opacity: 1; transform: scale(1.06); }
}

@keyframes button-shine {
  0%, 58% { transform: translateX(135%); }
  82%, 100% { transform: translateX(-135%); }
}

@keyframes petal-fall {
  0% { transform: translate3d(0, -12vh, 0) rotate(var(--rotation)); }
  30% { transform: translate3d(38px, 32vh, 0) rotate(calc(var(--rotation) + 135deg)); }
  65% { transform: translate3d(-24px, 70vh, 0) rotate(calc(var(--rotation) + 300deg)); }
  100% { transform: translate3d(42px, 115vh, 0) rotate(calc(var(--rotation) + 520deg)); }
}

@keyframes petal-burst {
  0% { opacity: 1; transform: translate3d(0, 0, 0) rotate(0); }
  100% { opacity: 0; transform: translate3d(var(--tx), var(--ty), 0) rotate(var(--turn)); }
}

@keyframes ornament-float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-11px) rotate(7deg); }
}

@keyframes scroll-dot {
  0% { opacity: 0; transform: translateY(0); }
  35% { opacity: 1; }
  80%, 100% { opacity: 0; transform: translateY(14px); }
}

@keyframes heart-beat {
  0%, 48%, 100% { transform: scale(1); }
  20% { transform: scale(1.3); }
  34% { transform: scale(0.94); }
}

@keyframes number-tick {
  0% { opacity: 0.35; transform: translateY(-5px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes separator-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.9; }
}

@keyframes card-shine {
  from { transform: translateX(0) rotate(18deg); }
  to { transform: translateX(650%) rotate(18deg); }
}

/* Responsive */
@media (max-width: 760px) {
  :root {
    --page-padding: 1.15rem;
  }

  .topbar {
    grid-template-columns: 1fr auto;
  }

  .topbar__date {
    display: none;
  }

  .hero {
    padding-block-start: 6rem;
  }

  .hero-card {
    border-radius: 2px 28px 2px 28px;
  }

  .hero-card__inner {
    border-radius: 0 21px 0 21px;
  }

  .welcome {
    min-height: 680px;
  }

  .countdown-grid {
    gap: 0.25rem;
  }

  .countdown-card {
    min-height: 105px;
    aspect-ratio: auto;
    border-radius: 15px;
  }

  .countdown-separator {
    font-size: 1.2rem;
  }

  .date-section__grid {
    grid-template-columns: 1fr;
  }

  .date-copy {
    margin-inline: auto;
    text-align: center;
  }

  .date-copy__line {
    margin-inline: auto;
  }

  .date-card {
    margin-inline: auto;
  }

  .footer {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 160px;
    text-align: center;
  }

  .footer p:last-child {
    text-align: center;
  }
}

@media (max-width: 430px) {
  .opening-screen__content {
    padding-block: 1rem;
  }

  .opening-screen__eyebrow {
    margin-block-end: 1rem;
  }

  .opening-screen__title {
    margin-block-start: 1rem;
  }

  .hero-card__inner {
    padding-inline: 0.85rem;
  }

  .couple-names__name {
    font-size: clamp(4.2rem, 21vw, 6.4rem);
  }

  .scroll-cue span {
    display: none;
  }

  .countdown-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  .countdown-separator {
    display: none;
  }

  .countdown-card {
    min-height: 124px;
  }

  .countdown-card__number {
    font-size: 2.7rem;
  }

  .calendar-sheet {
    min-height: 250px;
  }

  .date-card__actions {
    grid-template-columns: 1fr;
  }

  .blessing__frame {
    border-radius: 46% 46% 14px 14px / 10% 10% 14px 14px;
  }
}

@media (max-height: 700px) and (min-width: 560px) {
  .opening-screen__content {
    transform: scale(0.82);
  }

  .opening-screen.is-opening .opening-screen__content {
    transform: scale(0.87);
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .opening-screen__content {
    display: grid;
    grid-template-columns: minmax(170px, 0.9fr) minmax(220px, 1.1fr);
    grid-template-areas:
      'visual eyebrow'
      'visual title'
      'visual date'
      'visual trigger';
    column-gap: clamp(0.55rem, 3vw, 3rem);
    width: min(94vw, 900px);
    padding: 0.75rem;
    transform: none;
  }

  .opening-screen__eyebrow {
    grid-area: eyebrow;
    align-self: end;
    margin: 0;
  }

  .envelope {
    grid-area: visual;
    align-self: center;
    width: min(36vw, 290px);
  }

  .opening-screen__title {
    grid-area: title;
    margin: 0;
    font-size: clamp(1.45rem, 3.5vw, 2.15rem);
  }

  .opening-screen__date {
    grid-area: date;
    margin: 0.1rem 0 0.55rem;
  }

  .opening-trigger {
    grid-area: trigger;
    justify-self: center;
  }

  .opening-screen__hint {
    display: none;
  }

  .opening-screen.is-opening .opening-screen__content {
    transform: scale(1.02);
  }
}

@media (max-width: 440px) and (max-height: 520px) and (orientation: landscape) {
  .opening-screen__content {
    grid-template-columns: minmax(112px, 0.7fr) minmax(205px, 1.3fr);
    column-gap: 0.35rem;
    width: 98vw;
    padding: 0.2rem;
  }

  .envelope {
    width: 31vw;
  }

  .opening-screen__eyebrow {
    font-size: 0.65rem;
  }

  .opening-screen__title {
    font-size: 1.15rem;
  }

  .opening-screen__date {
    font-size: 0.72rem;
  }
}

@media (pointer: coarse) {
  .interactive-card {
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .petal-layer,
  .burst-petal {
    display: none;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .opening-screen,
  .topbar,
  .petal-layer,
  .scroll-cue,
  .date-card__actions,
  .action-status,
  .footer {
    display: none !important;
  }

  body {
    color: #24131f;
    background: #fff;
  }

  .hero,
  .welcome,
  .countdown,
  .date-section,
  .blessing {
    min-height: auto;
    break-inside: avoid;
  }
}

/* =========================================================
   Rose garden edition — one continuous floral visual language
   ========================================================= */
:root {
  --ink: #493239;
  --ink-soft: #755e64;
  --wine: #8d4b5f;
  --wine-deep: #6f3b4d;
  --wine-bright: #ad6678;
  --blush: #e7b9bd;
  --rose-mist: #f2d9d9;
  --ivory: #fffaf4;
  --ivory-soft: #f9f0e7;
  --paper: #efe3d3;
  --gold: #c5a263;
  --gold-light: #ead8ad;
  --sage: #737858;
  --white: #fffdf9;
  --surface: rgba(255, 250, 244, 0.84);
  --line: rgba(141, 75, 95, 0.2);
  --shadow: 0 28px 70px rgba(106, 71, 70, 0.15);
}

html {
  scrollbar-color: var(--blush) var(--ivory-soft);
}

body {
  color: var(--ink);
  background: var(--ivory-soft);
}

main {
  background:
    radial-gradient(circle at 8% 28%, rgba(231, 185, 189, 0.16), transparent 25rem),
    radial-gradient(circle at 92% 68%, rgba(197, 162, 99, 0.1), transparent 28rem),
    var(--ivory-soft);
}

.section-kicker {
  color: var(--wine);
}

.welcome,
.countdown,
.date-section,
.blessing {
  border-block-start: 1px solid rgba(197, 162, 99, 0.2);
}

/* Delicate floral opener */
.opening-screen {
  color: var(--ink);
}

.opening-screen__curtain {
  background:
    linear-gradient(90deg, rgba(255, 250, 244, 0.64), rgba(248, 231, 229, 0.5)),
    url('assets/engagement-floral-hero.webp') center / 200% 100% no-repeat;
  border-color: rgba(197, 162, 99, 0.42);
  box-shadow: inset 0 0 90px rgba(141, 75, 95, 0.08);
  transition: transform 0.86s 1.52s var(--ease-out);
}

.opening-screen__curtain--right {
  background-position: center, right center;
}

.opening-screen__curtain--left {
  background-position: center, left center;
}

.opening-screen__curtain::after {
  opacity: 0.13;
  background-image:
    repeating-linear-gradient(90deg, transparent 0 30px, rgba(141, 75, 95, 0.08) 31px, transparent 62px),
    linear-gradient(rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.18));
}

.opening-screen__glow {
  width: min(78vw, 760px);
  background: radial-gradient(circle, rgba(231, 185, 189, 0.34), rgba(234, 216, 173, 0.12) 34%, transparent 68%);
}

.opening-screen__content {
  width: min(94vw, 650px);
  padding: 1.2rem;
}

.opening-screen__eyebrow {
  margin-block-end: 0.45rem;
  color: var(--wine);
  font-size: 0.82rem;
}

.opening-screen__title {
  width: 100%;
  margin: 0 auto 0.2rem;
  color: var(--ink);
  font-size: clamp(1.8rem, 4.8vw, 2.85rem);
  text-wrap: balance;
}

.opening-screen__date {
  margin-block-end: clamp(1.1rem, 3vh, 1.8rem);
  color: var(--ink-soft);
  font-weight: 500;
}

.opening-screen__hint {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 1.1rem 0 0;
  color: var(--wine);
  font-size: 0.78rem;
}

.opening-screen__hint span {
  color: var(--gold);
  animation: seal-hint 2.2s ease-in-out infinite;
}

.envelope {
  position: relative;
  display: block;
  width: min(78vw, 360px);
  aspect-ratio: 1.58;
  padding: 0;
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  perspective: 1200px;
  filter: drop-shadow(0 25px 24px rgba(110, 70, 72, 0.2));
  transition: transform 0.35s var(--ease-out), filter 0.35s ease;
}

.envelope:not(:disabled):hover {
  filter: drop-shadow(0 30px 28px rgba(110, 70, 72, 0.24));
  transform: translateY(-5px) rotate(-0.4deg);
}

.envelope:disabled {
  opacity: 1;
  cursor: default;
}

.envelope__shadow {
  inset: 78% 7% -11%;
  background: rgba(115, 77, 78, 0.18);
  filter: blur(16px);
}

.envelope__back {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), transparent 42%),
    linear-gradient(160deg, #fffaf3, #ead6ce);
  border: 1px solid rgba(197, 162, 99, 0.68);
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.3);
}

.envelope__letter {
  inset: 7% 7% 11%;
  padding: 1.2rem 0.8rem;
  background:
    linear-gradient(rgba(255, 251, 245, 0.88), rgba(255, 251, 245, 0.9)),
    url('assets/engagement-floral-hero.webp') center / cover;
  border: 1px solid rgba(197, 162, 99, 0.58);
  border-radius: 10px 2px 10px 2px;
  box-shadow: 0 8px 22px rgba(100, 67, 69, 0.09);
}

.envelope__letter::before {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(141, 75, 95, 0.18);
  border-radius: 7px 1px 7px 1px;
}

.envelope__letter-kicker,
.envelope__letter-date,
.envelope__letter strong {
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateY(5px);
}

.envelope__letter .envelope__letter-kicker {
  color: var(--wine);
  font-size: 0.68rem;
  font-weight: 700;
}

.envelope__letter strong {
  margin-block: 0.1rem;
  font-size: clamp(1.45rem, 4.4vw, 2rem);
}

.envelope__letter .envelope__letter-date {
  color: var(--ink-soft);
  font-size: 0.65rem;
  font-weight: 600;
}

.envelope__front {
  background:
    linear-gradient(145deg, transparent 49.5%, #f8ebe3 50%) left / 51% 100% no-repeat,
    linear-gradient(215deg, transparent 49.5%, #efdcd5 50%) right / 51% 100% no-repeat;
  border-block-end: 1px solid rgba(197, 162, 99, 0.5);
  filter: drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.45));
}

.envelope__flap {
  height: 59%;
  background: transparent;
  clip-path: none;
  transform-style: preserve-3d;
  backface-visibility: visible;
}

.envelope__flap-face {
  position: absolute;
  inset: 0;
  display: block;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.envelope__flap-face--paper {
  background: linear-gradient(175deg, #fff9f1, #ead3cf);
  border-block-start: 1px solid rgba(197, 162, 99, 0.55);
}

.envelope__flap-face--lining {
  background:
    linear-gradient(rgba(246, 222, 219, 0.55), rgba(255, 248, 242, 0.54)),
    url('assets/engagement-floral-hero.webp') 50% 16% / cover;
  transform: rotateX(180deg);
}

.envelope__seal {
  inset-block-start: 43%;
  width: 58px;
  height: 58px;
  color: #ffe7d5;
  background:
    radial-gradient(circle at 33% 27%, rgba(255, 255, 255, 0.34), transparent 16%),
    radial-gradient(circle, #b7657c 0 52%, #8d455b 54% 68%, #a75a70 70%);
  border: 1px solid rgba(255, 232, 204, 0.55);
  box-shadow:
    0 7px 15px rgba(96, 51, 66, 0.28),
    inset 0 0 0 4px rgba(255, 255, 255, 0.06);
}

.opening-screen.is-opening .opening-screen__content {
  opacity: 1;
  transform: none;
  transition: none;
}

.opening-screen.is-opening .opening-screen__eyebrow,
.opening-screen.is-opening .opening-screen__title,
.opening-screen.is-opening .opening-screen__date,
.opening-screen.is-opening .opening-screen__hint {
  animation: opener-copy-away 0.34s ease both;
}

.opening-screen.is-opening .envelope__seal {
  animation: seal-lift 0.42s 0.08s var(--ease-out) both;
}

.opening-screen.is-opening .envelope__flap {
  animation: flap-open 0.78s 0.28s var(--ease-out) both;
}

.opening-screen.is-opening .envelope__letter {
  animation: letter-rise 0.92s 0.9s var(--ease-out) both;
}

.opening-screen.is-opening .envelope__letter-kicker {
  animation: letter-copy-in 0.42s 1.12s var(--ease-out) both;
}

.opening-screen.is-opening .envelope__letter strong {
  animation: letter-copy-in 0.42s 1.2s var(--ease-out) both;
}

.opening-screen.is-opening .envelope__letter-date {
  animation: letter-copy-in 0.42s 1.28s var(--ease-out) both;
}

.opening-screen.is-opening .envelope {
  animation: envelope-away 0.65s 1.76s ease both;
}

.opening-screen.is-opening .opening-screen__glow {
  animation: opener-glow-away 0.7s 1.55s ease both;
}

/* Soft glass navigation */
.topbar {
  color: var(--ink);
  background: rgba(255, 250, 244, 0.8);
  border-color: rgba(141, 75, 95, 0.18);
  box-shadow: 0 12px 38px rgba(106, 71, 70, 0.12);
}

.topbar__brand {
  color: var(--wine-deep);
  background: rgba(231, 185, 189, 0.24);
  border-color: rgba(197, 162, 99, 0.5);
}

.topbar__date {
  color: var(--wine);
}

.icon-button {
  color: var(--wine-deep);
}

.icon-button:hover {
  color: var(--wine-deep);
  background: rgba(231, 185, 189, 0.28);
}

/* Hero refinements */
.hero__wash {
  background:
    linear-gradient(180deg, rgba(255, 250, 244, 0.08), rgba(255, 250, 244, 0.12) 55%, rgba(231, 185, 189, 0.16)),
    radial-gradient(circle at center, rgba(255, 253, 249, 0.28), transparent 68%);
}

.hero-card {
  background: rgba(255, 250, 244, 0.72);
  border-color: rgba(141, 75, 95, 0.2);
  border-radius: 4px 44px 4px 44px;
  box-shadow:
    0 34px 80px rgba(106, 71, 70, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.85);
}

.hero-card__inner {
  border-color: rgba(197, 162, 99, 0.56);
  border-radius: 2px 35px 2px 35px;
}

/* Welcome keeps the paper and rose tones */
.welcome {
  min-height: 720px;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 252, 247, 0.94), transparent 44%),
    radial-gradient(circle at 12% 18%, rgba(231, 185, 189, 0.23), transparent 26%),
    linear-gradient(180deg, #fff9f3, #f7e5e4);
}

.welcome::before,
.welcome::after {
  opacity: 0.13;
  background:
    linear-gradient(rgba(255, 250, 244, 0.18), rgba(255, 250, 244, 0.18)),
    url('assets/engagement-floral-hero.webp') center / cover;
  border-color: rgba(197, 162, 99, 0.32);
}

.welcome__halo {
  border-color: rgba(141, 75, 95, 0.08);
  box-shadow:
    0 0 0 70px rgba(231, 185, 189, 0.04),
    0 0 0 140px rgba(197, 162, 99, 0.025);
}

.welcome h2 {
  color: var(--ink);
}

.welcome__content > p:not(.section-kicker) {
  color: var(--ink-soft);
}

.welcome__rings {
  animation: none;
}

.welcome__rings span {
  border-color: var(--gold);
  box-shadow:
    inset 0 0 0 3px var(--ivory-soft),
    inset 0 0 0 4px rgba(197, 162, 99, 0.42),
    0 6px 14px rgba(106, 71, 70, 0.12);
}

.signature {
  color: var(--wine-deep);
}

/* Light blush countdown */
.countdown {
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 15%, rgba(255, 255, 255, 0.48), transparent 28%),
    linear-gradient(145deg, #fbf4ed, #f4dddd 55%, #faeee6);
}

.countdown::before,
.countdown::after {
  color: rgba(180, 108, 126, 0.09);
}

.countdown .section-heading h2 {
  color: var(--ink);
}

.countdown .section-heading > p:last-child {
  color: var(--ink-soft);
}

.countdown-card {
  background: rgba(255, 251, 246, 0.68);
  border-color: rgba(141, 75, 95, 0.2);
  box-shadow:
    0 18px 38px rgba(106, 71, 70, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.countdown-card::before {
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.62), transparent 54%);
}

.countdown-card__number {
  color: var(--wine-deep);
}

.countdown-card__label {
  color: var(--wine);
}

.countdown-separator {
  color: var(--gold);
  animation: none;
}

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

/* Date card returns to ivory */
.date-section {
  background:
    radial-gradient(circle at 6% 12%, rgba(231, 185, 189, 0.23), transparent 25%),
    radial-gradient(circle at 94% 88%, rgba(115, 120, 88, 0.1), transparent 27%),
    linear-gradient(180deg, #fff9f3, #f9eee6);
}

.date-copy h2 {
  color: var(--ink);
}

.date-copy > p {
  color: var(--ink-soft);
}

.date-card {
  --mx: 50%;
  --my: 50%;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% 6%, rgba(231, 185, 189, 0.28), transparent 35%),
    linear-gradient(145deg, rgba(255, 252, 248, 0.96), rgba(248, 231, 229, 0.94));
  border-color: rgba(197, 162, 99, 0.62);
  box-shadow: 0 34px 68px rgba(106, 71, 70, 0.15);
}

.date-card::before {
  border-color: rgba(141, 75, 95, 0.18);
}

.date-card__shine {
  z-index: 0;
  inset: 0;
  width: auto;
  opacity: 0.75;
  background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, 0.68), transparent 33%);
  transform: none;
  transition: opacity 0.28s ease;
}

.date-card.is-visible .date-card__shine {
  animation: none;
}

.date-card__topline,
.calendar-sheet,
.date-card__caption,
.date-card__actions,
.action-status {
  position: relative;
  z-index: 1;
}

.date-card__topline {
  color: var(--wine);
}

.calendar-sheet {
  background:
    linear-gradient(rgba(255, 252, 248, 0.84), rgba(255, 252, 248, 0.84)),
    url('assets/engagement-floral-hero.webp') center / cover;
  box-shadow:
    inset 0 0 0 1px rgba(141, 75, 95, 0.16),
    0 12px 28px rgba(106, 71, 70, 0.08);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s ease;
}

.date-card:hover .calendar-sheet {
  box-shadow:
    inset 0 0 0 1px rgba(141, 75, 95, 0.18),
    0 18px 34px rgba(106, 71, 70, 0.12);
  transform: translateY(-4px);
}

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

.action-button {
  color: var(--wine-deep);
  background: rgba(255, 252, 248, 0.64);
  border-color: rgba(141, 75, 95, 0.28);
}

.action-button--primary {
  color: var(--white);
  background: var(--wine);
  border-color: var(--wine);
}

.action-button:hover {
  color: var(--white);
  background: var(--wine-deep);
  border-color: var(--wine-deep);
}

.action-status {
  color: var(--wine);
}

/* Floral closing scene */
.blessing {
  min-height: 720px;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 250, 244, 0.84), rgba(248, 235, 230, 0.91)),
    url('assets/engagement-floral-hero.webp') center / cover;
}

.blessing::before {
  opacity: 0.22;
}

.blessing__frame {
  background: rgba(255, 250, 244, 0.7);
  border-color: rgba(197, 162, 99, 0.58);
  box-shadow:
    inset 0 0 0 9px rgba(197, 162, 99, 0.04),
    0 28px 70px rgba(106, 71, 70, 0.13);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.blessing__frame::before,
.blessing__frame::after {
  border-color: var(--wine);
}

.blessing h2 {
  color: var(--ink);
}

.blessing__frame > p:not(.section-kicker) {
  color: var(--ink-soft);
}

.blessing__names {
  color: var(--wine-deep);
}

.footer {
  color: var(--ink-soft);
  background: linear-gradient(180deg, #f5e4e2, #fff8f1);
  border-block-start: 1px solid rgba(197, 162, 99, 0.32);
}

/* One-time, polished motion */
.js .welcome__rings.reveal.is-visible {
  animation: rings-arrive 0.88s 0.12s var(--ease-out) both;
}

.js .countdown-grid:not(.is-visible) .countdown-card {
  opacity: 0;
  transform: translateY(18px) scale(0.97);
}

.js .countdown-grid.is-visible .countdown-card {
  animation: rose-card-arrive 0.64s var(--ease-out) both;
}

.js .countdown-grid.is-visible .countdown-card:nth-of-type(2) {
  animation-delay: 0.08s;
}

.js .countdown-grid.is-visible .countdown-card:nth-of-type(3) {
  animation-delay: 0.16s;
}

.js .countdown-grid.is-visible .countdown-card:nth-of-type(4) {
  animation-delay: 0.24s;
}

.js .blessing__frame.reveal.is-visible {
  animation: blessing-arrive 0.82s var(--ease-out) both;
}

body.effects-paused .opening-screen__hint span,
body.effects-paused .welcome__rings,
body.effects-paused .countdown-card,
body.effects-paused .blessing__frame,
body.page-hidden .petal {
  animation: none !important;
}

@keyframes seal-hint {
  0%, 100% { opacity: 0.5; transform: scale(0.86) rotate(0); }
  50% { opacity: 1; transform: scale(1.12) rotate(15deg); }
}

@keyframes opener-copy-away {
  to { opacity: 0; transform: translateY(-7px); }
}

@keyframes seal-lift {
  0% { opacity: 1; transform: translate(50%, -20%) scale(1) rotate(0); }
  48% { opacity: 1; transform: translate(50%, -30%) scale(1.05) rotate(-6deg); }
  100% { opacity: 0; transform: translate(50%, -52%) scale(0.92) rotate(8deg); }
}

@keyframes flap-open {
  0% { z-index: 4; transform: rotateX(0); }
  49% { z-index: 4; }
  50%, 100% { z-index: 0; }
  100% { transform: rotateX(178deg); }
}

@keyframes letter-rise {
  0% { transform: translateY(0); }
  72% { transform: translateY(-63%); }
  88% { transform: translateY(-59%); }
  100% { transform: translateY(-61%); }
}

@keyframes letter-copy-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes envelope-away {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-10px) scale(1.025); }
}

@keyframes opener-glow-away {
  to { opacity: 0; transform: scale(1.15); }
}

@keyframes rings-arrive {
  0% { opacity: 0; transform: translateY(15px) scale(0.82) rotate(-7deg); }
  68% { opacity: 1; transform: translateY(-2px) scale(1.03) rotate(1deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

@keyframes rose-card-arrive {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes blessing-arrive {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 620px) {
  .welcome,
  .blessing {
    min-height: auto;
    padding-block: 5.5rem;
  }

  .countdown-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.72rem;
  }

  .countdown-separator {
    display: none;
  }

  .countdown-card {
    min-height: 122px;
    aspect-ratio: auto;
  }

  .date-card {
    padding: 1.1rem;
  }

  .calendar-sheet {
    min-height: 245px;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .opening-screen__content {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    grid-template-areas:
      'visual eyebrow'
      'visual title'
      'visual date'
      'visual hint';
    column-gap: clamp(0.75rem, 2.5vw, 2.4rem);
    width: min(96vw, 900px);
  }

  .opening-screen__hint {
    grid-area: hint;
    display: flex;
    align-self: start;
    justify-self: center;
    margin: 0.2rem 0 0;
  }

  .envelope {
    grid-area: visual;
    width: min(38vw, 330px);
  }

  .opening-screen__title {
    width: 100%;
    max-width: 340px;
    justify-self: center;
    font-size: clamp(1.25rem, 3.5vw, 2.15rem);
  }
}

@media (max-width: 520px) and (max-height: 520px) and (orientation: landscape) {
  .opening-screen__content {
    width: 98vw;
    column-gap: 0.45rem;
    padding: 0.25rem;
  }

  .opening-screen__eyebrow {
    font-size: 0.66rem;
  }

  .opening-screen__title {
    font-size: 1.18rem;
  }

  .opening-screen__date {
    font-size: 0.7rem;
  }

  .opening-screen__hint {
    font-size: 0.65rem;
  }

  .envelope {
    width: min(39vw, 190px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .opening-screen.is-opening .envelope__seal,
  .opening-screen.is-opening .envelope__flap,
  .opening-screen.is-opening .envelope__letter,
  .opening-screen.is-opening .envelope__letter-kicker,
  .opening-screen.is-opening .envelope__letter strong,
  .opening-screen.is-opening .envelope__letter-date,
  .opening-screen.is-opening .envelope,
  .opening-screen.is-opening .opening-screen__glow {
    animation: none !important;
  }
}
