/* Playfair Display is loaded via <link> in the HTML head for optimal performance */

:root {
  --bg: #f8f5ee;
  --bg-soft: #fffdf9;
  --surface: rgba(255, 251, 244, 0.82);
  --surface-strong: #ffffff;
  --text: #40513b;
  --text-soft: #6d7e61;
  --accent: #556b2f;
  --accent-deep: #3a4d1f;
  --border: rgba(85, 107, 47, 0.24);
  --shadow: 0 18px 40px rgba(85, 107, 47, 0.12);
  --gold: #c9a84c;
  --gold-soft: rgba(201, 168, 76, 0.12);
  --gold-border: rgba(201, 168, 76, 0.32);
  --anim-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ── KEYFRAME ANIMATIONS ─────────────────────────────── */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(36px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-48px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(48px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes floatBob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-14px); }
}

@keyframes swayLR {
  0%, 100% { transform: rotate(-1.5deg) scale(1); }
  50%       { transform: rotate(1.5deg) scale(1.01); }
}

@keyframes pulseScale {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.05); }
}

@keyframes shimmerGold {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

@keyframes monogramGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.18); }
  50%       { box-shadow: 0 0 0 8px rgba(201, 168, 76, 0); }
}

@keyframes rotateInTL {
  from { transform: rotate(0deg) scale(0.5); opacity: 0; }
  to   { transform: rotate(90deg) scale(1); opacity: 1; }
}

@keyframes rotateInTR {
  from { transform: rotate(0deg) scale(0.5); opacity: 0; }
  to   { transform: rotate(-180deg) scale(1); opacity: 1; }
}

@keyframes rotateInBL {
  from { transform: rotate(90deg) scale(0.5); opacity: 0; }
  to   { transform: rotate(0) scale(1); opacity: 1; }
}

@keyframes rotateInBR {
  from { transform: scaleX(-1) scale(0.5); opacity: 0; }
  to   { transform: scaleX(-1) scale(1); opacity: 1; }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 14px 28px rgba(85, 107, 47, 0.28); }
  50%       { box-shadow: 0 16px 36px rgba(201, 168, 76, 0.4); }
}

@keyframes countdownPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); color: var(--gold); }
  100% { transform: scale(1); }
}

@keyframes openingEntrance {
  from { opacity: 0; transform: translateY(28px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes curtainOpenLeft {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

@keyframes curtainOpenRight {
  from { transform: translateX(0); }
  to   { transform: translateX(100%); }
}

@keyframes sideDriftUp {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-20px); }
}

@keyframes petalFall {
  0% {
    transform: translate3d(var(--drift-start, 0), -10vh, 0) rotate(0deg);
    opacity: 0;
  }
  8% { opacity: var(--petal-opacity, 0.85); }
  92% { opacity: var(--petal-opacity, 0.85); }
  100% {
    transform: translate3d(var(--drift-end, 40px), 110vh, 0) rotate(340deg);
    opacity: 0;
  }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50%       { opacity: 0.6;  transform: scale(1.08); }
}

@keyframes letterIn {
  from { opacity: 0; transform: translateY(16px) rotate(4deg); filter: blur(2px); }
  to   { opacity: 1; transform: translateY(0) rotate(0deg); filter: blur(0); }
}

@keyframes revealLine {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes ringPulse {
  0%   { transform: scale(0.9); opacity: 0.55; }
  70%  { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}

/* ── RESET & BASE ────────────────────────────────────── */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(85, 107, 47, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(236, 198, 145, 0.16), transparent 24%),
    linear-gradient(180deg, #fdfbf6 0%, #f7f4ec 100%);
}

body::before,
body::after {
  content: '';
  position: fixed;
  inset: auto;
  width: 220px;
  height: 220px;
  pointer-events: none;
  opacity: 0.25;
  filter: blur(4px);
  z-index: 0;
}

body::before {
  top: 8%;
  left: -60px;
  background: radial-gradient(circle, rgba(85, 107, 47, 0.7), transparent 58%);
}

body::after {
  bottom: 10%;
  right: -80px;
  background: radial-gradient(circle, rgba(231, 189, 133, 0.7), transparent 58%);
}

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

.hidden {
  visibility: hidden;
}

/* ── FIXED SIDE DECORATIONS ──────────────────────────── */

.deco-fixed-left,
.deco-fixed-right {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  pointer-events: none;
  z-index: 2;
  opacity: 0.38;
  animation: sideDriftUp 6s ease-in-out infinite;
}

.deco-fixed-left {
  left: 4px;
  animation-delay: 0s;
}

.deco-fixed-right {
  right: 4px;
  transform: translateY(-50%) scaleX(-1);
  animation-delay: 3s;
}

.deco-fixed-left img,
.deco-fixed-right img {
  width: 100%;
  height: auto;
}

/* ── OPENING SCREEN ──────────────────────────────────── */

.opening-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 60% 50% at 50% 40%, rgba(201, 168, 76, 0.08) 0%, transparent 72%),
    radial-gradient(ellipse at top left, rgba(85, 107, 47, 0.05), transparent 55%),
    radial-gradient(ellipse at bottom right, rgba(201, 168, 76, 0.05), transparent 55%),
    rgba(248, 245, 238, 0.94);
  backdrop-filter: blur(14px);
  z-index: 12;
  overflow: hidden;
  transition: opacity 0.55s var(--anim-ease), visibility 0.55s var(--anim-ease);
}

.opening-screen.closed {
  opacity: 0;
  visibility: hidden;
}

/* ── OPENING GLOW & PETALS ────────────────────────────── */

.opening-glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle at 50% 42%, rgba(201, 168, 76, 0.22), transparent 55%);
  animation: glowPulse 6.5s ease-in-out infinite;
}

.petal-field {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: 0;
  left: var(--x, 50%);
  width: var(--size, 10px);
  height: var(--size, 10px);
  background: radial-gradient(circle at 30% 30%, #f4e6c1, var(--gold) 70%);
  border-radius: 60% 0 60% 0;
  will-change: transform, opacity;
  animation: petalFall var(--dur, 9s) linear var(--delay, 0s) infinite;
}

/* ── REVEAL-LINE (opening text stagger) ──────────────── */

.reveal-line {
  opacity: 0;
  animation: revealLine 0.7s var(--anim-ease) var(--rd, 0s) both;
}

#openInvitationButton {
  opacity: 0;
  animation:
    revealLine 0.7s var(--anim-ease) var(--rd, .9s) both,
    pulseGlow 3.2s ease-in-out 1.8s infinite;
}

#openInvitationButton:hover,
#openInvitationButton:focus-visible {
  animation: none;
  opacity: 1;
  transform: translateY(-3px);
}

/* Per-letter stagger, applied by script.js via .stagger-letter spans */
.stagger-letter {
  display: inline;
  opacity: 0;
  animation: letterIn 0.55s var(--anim-ease) both;
  animation-delay: calc(var(--rd, 0s) + var(--i, 0) * 45ms);
}

.stagger-letter.is-space {
  width: 0.3em;
}

/* Letters inside a shimmering headline must inherit the parent's
   gradient-clip text fill, otherwise each per-letter span paints
   with no background of its own and the title disappears. */
.shimmer-text .stagger-letter {
  background-image: inherit;
  background-position: inherit;
  background-size: inherit;
  background-clip: inherit;
  -webkit-background-clip: inherit;
  color: inherit;
  -webkit-text-fill-color: inherit;
}

/* Shimmering gold sweep across headline text */
.shimmer-text {
  background-image: linear-gradient(
    100deg,
    var(--accent-deep) 34%,
    var(--gold) 44%,
    #f4e6c1 50%,
    var(--gold) 56%,
    var(--accent-deep) 66%
  );
  background-size: 240% auto;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.01em;
  animation: shimmerGold 8s ease-in-out infinite;
}

/* ── CURTAINS ────────────────────────────────────────── */

.curtain {
  position: absolute;
  top: 0;
  height: 100%;
  width: 50%;
  z-index: 2;
  pointer-events: none;
  will-change: transform;
  background:
    radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.16) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72'%3E%3Cg fill='none' stroke='%23c9a84c' stroke-width='0.8' opacity='0.4'%3E%3Ccircle cx='18' cy='18' r='13'/%3E%3Ccircle cx='54' cy='18' r='13'/%3E%3Ccircle cx='18' cy='54' r='13'/%3E%3Ccircle cx='54' cy='54' r='13'/%3E%3Ccircle cx='36' cy='36' r='13'/%3E%3Ccircle cx='0' cy='0' r='13'/%3E%3Ccircle cx='72' cy='0' r='13'/%3E%3Ccircle cx='0' cy='72' r='13'/%3E%3Ccircle cx='72' cy='72' r='13'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(155deg, #4c6329 0%, #34461b 52%, #405327 100%);
  background-size: cover, 72px 72px, cover;
}

.curtain-left {
  left: 0;
  border-right: 3px solid var(--gold);
  box-shadow: inset -16px 0 32px rgba(0, 0, 0, 0.22), 6px 0 18px rgba(0, 0, 0, 0.15);
}

.curtain-right {
  right: 0;
  border-left: 3px solid var(--gold);
  box-shadow: inset 16px 0 32px rgba(0, 0, 0, 0.22), -6px 0 18px rgba(0, 0, 0, 0.15);
}

.opening-screen.curtain-opening .curtain-left {
  animation: curtainOpenLeft 0.85s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.opening-screen.curtain-opening .curtain-right {
  animation: curtainOpenRight 0.85s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.opening-card {
  position: relative;
  max-width: 520px;
  padding: 58px 44px;
  text-align: center;
  overflow: visible;
  z-index: 3;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.94), rgba(255, 251, 244, 0.86));
  outline: 1px solid var(--gold-border);
  outline-offset: -14px;
  animation: openingEntrance 0.9s var(--anim-ease) both;
}

.opening-card p {
  position: relative;
  z-index: 1;
}

/* ── MONOGRAM ─────────────────────────────────────────── */

.opening-monogram {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.monogram-ring {
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold-border);
  background: radial-gradient(circle, rgba(201, 168, 76, 0.1), transparent 70%);
  animation: monogramGlow 3.6s ease-in-out infinite;
}

.monogram-ring::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px solid var(--gold-border);
  opacity: 0.55;
}

.monogram-letters {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.5rem;
  color: var(--accent-deep);
  letter-spacing: 0.02em;
}

.monogram-amp {
  display: inline-block;
  margin: 0 3px;
  color: var(--gold);
  font-size: 1.1rem;
}

/* ── EYEBROW FLANKED BY GOLD LINES ────────────────────── */

.eyebrow-flanked {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.eyebrow-flanked::before,
.eyebrow-flanked::after {
  content: '';
  height: 1px;
  width: 26px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.eyebrow-flanked::after {
  background: linear-gradient(90deg, var(--gold), transparent);
}

/* ── DECORATIVE DIVIDER ───────────────────────────────── */

.opening-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  margin: 20px auto 24px;
}

.opening-divider::before,
.opening-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-border));
}

.opening-divider::after {
  background: linear-gradient(90deg, var(--gold-border), transparent);
}

.opening-divider-diamond {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  margin: 0 12px;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.14);
}

/* ── GUEST LABEL TAG ──────────────────────────────────── */

.guest-label {
  display: inline-flex;
  margin: 0 auto 10px;
  padding: 8px 22px;
  border: 1px solid var(--gold-border);
  border-radius: 999px;
  background: rgba(201, 168, 76, 0.06);
  font-style: italic;
  color: var(--text-soft);
  font-size: 0.95rem;
}

#guestName {
  font-style: normal;
  font-weight: 600;
  color: var(--accent-deep);
}

/* ── OPENING BUTTON REFINEMENT ────────────────────────── */

.opening-button {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 16px 36px;
  margin-top: 6px;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.opening-button-icon {
  font-size: 0.95rem;
  transform: translateY(-1px);
}

/* ── CORNER DECORATIONS ──────────────────────────────── */

.deco-corner {
  position: absolute;
  width: 58px;
  height: 58px;
  pointer-events: none;
  opacity: 0.6;
}

.deco-tl { top: -4px;  left: -4px;  transform: rotate(90deg);   animation: rotateInTL 0.7s var(--anim-ease) 0.3s both; }
.deco-tr { top: -4px;  right: -4px;  animation: rotateInTR 0.7s var(--anim-ease) 0.45s both; }
.deco-bl { bottom: -4px; left: -4px;  transform: rotate(90deg); animation: rotateInBL 0.7s var(--anim-ease) 0.6s both; }
.deco-br { bottom: -4px; right: -4px; transform: scaleX(-1); animation: rotateInBR 0.7s var(--anim-ease) 0.75s both; }

.deco-corner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── SECTION-HEADING DECOS ───────────────────────────── */

.section-heading {
  position: relative;
}

.heading-deco {
  position: absolute;
  width: 44px;
  height: 44px;
  pointer-events: none;
  opacity: 0.55;
}

.heading-deco-l {
  left: -8px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
}

.heading-deco-r {
  right: -8px;
  top: 50%;
  transform: translateY(-50%) rotate(-180deg);
}

/* ── CARD / PANEL SHARED ─────────────────────────────── */

.opening-card,
.panel,
.event-card,
.gallery-card,
.map-card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 28px;
}

/* Gold accent top-line on cards */
.event-card::before,
.panel::before {
  content: '';
  display: block;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin-bottom: 18px;
  opacity: 0.7;
}

/* ── ARABIC / ISLAMIC TEXT ───────────────────────────── */

/* Arabic script uses 'Scheherazade New' (available on most modern OS) or falls back to 'Traditional Arabic' */
.opening-arabic {
  font-family: 'Scheherazade New', 'Traditional Arabic', serif;
  font-size: 1.3rem;
  color: var(--gold);
  direction: rtl;
  margin: 0 0 8px;
  letter-spacing: 0.04em;
  animation: fadeIn 1s ease 0.5s both;
}

.opening-arabic.small {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.hero-arabic {
  font-family: 'Scheherazade New', 'Traditional Arabic', serif;
  font-size: 1.05rem;
  color: var(--gold);
  direction: rtl;
  margin: 0 0 16px;
  opacity: 0.85;
}

.quran-verse {
  font-style: italic;
  font-size: 0.96rem;
  color: var(--text-soft);
  border-left: 3px solid var(--gold-border);
  padding-left: 14px;
  margin-top: 18px;
  text-align: left;
}

.quran-verse em {
  font-style: normal;
  font-weight: 700;
  color: var(--accent-deep);
}

.closing-dua {
  font-family: 'Scheherazade New', 'Traditional Arabic', serif;
  font-size: 1.5rem;
  color: var(--gold);
  direction: rtl;
  margin: 24px 0 8px;
}

.closing-dua-id {
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-soft);
  margin-top: 0;
}

/* ── EYEBROW ─────────────────────────────────────────── */

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-deep);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-date {
  font-size: 2rem;
  letter-spacing: 0.12em;
}

/* ── TYPOGRAPHY ──────────────────────────────────────── */

h1,
h2,
h3 {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  margin: 0;
}

h1 {
  font-size: clamp(2.8rem, 7vw, 5rem);
  line-height: 1.05;
}

h2 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 18px;
}

h3 {
  font-size: 1.45rem;
}

p,
label,
input,
select,
textarea,
button,
a {
  font: inherit;
}

p {
  line-height: 1.75;
}

/* ── PAGE SHELL ──────────────────────────────────────── */

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100% - 80px));
  margin: 0 auto;
  padding: 36px 0 56px;
}

.section {
  padding: 52px 0;
}

/* ── HERO ────────────────────────────────────────────── */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 36px;
  min-height: 100vh;
  min-height: 100svh;
}

/* Mountain backdrop */
.mountain-backdrop {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.14;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mountain-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.hero-copy,
.hero-art {
  position: relative;
  z-index: 1;
}

.hero-subtitle {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--gold);
  margin: -10px 0 18px;
}

.hero-text {
  font-size: 1.08rem;
  max-width: 58ch;
}

.hero-actions,
.gift-grid,
.event-grid,
.gallery-grid,
.interaction-grid {
  display: grid;
  gap: 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  margin-top: 28px;
  gap: 12px;
}

/* Wayang illustration */
.hero-art {
  padding: 28px;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,251,244,0.95));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero-art::before {
  content: '';
  position: absolute;
  inset: 16px;
  border: 1px solid var(--gold-border);
  border-radius: 24px;
  pointer-events: none;
}

.wayang-figure {
  animation: swayLR 7s ease-in-out infinite;
  transform-origin: bottom center;
}

.wayang-gallery {
  animation: floatBob 5s ease-in-out infinite;
}

/* ── BUTTONS ─────────────────────────────────────────── */

.primary-button,
.secondary-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 14px 28px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.22s var(--anim-ease), box-shadow 0.22s var(--anim-ease), background 0.22s ease;
  position: relative;
  overflow: hidden;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent) 0%, #b9c9a8 50%, var(--accent) 100%);
  background-size: 200% auto;
  color: #fff;
  box-shadow: 0 14px 28px rgba(85, 107, 47, 0.28);
}

.primary-button:hover {
  background-position: right center;
  box-shadow: 0 18px 36px rgba(85, 107, 47, 0.38);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.8);
  color: var(--accent-deep);
  border: 1px solid rgba(85, 107, 47, 0.3);
}

.primary-button:hover,
.secondary-button:hover,
.sound-toggle:hover {
  transform: translateY(-3px);
}

.primary-button:active,
.secondary-button:active {
  transform: translateY(0) scale(0.97);
}

@media (hover: none) {
  .person-card:hover,
  .event-card:hover,
  .panel:hover,
  .gallery-card:hover {
    transform: none;
    box-shadow: var(--shadow);
  }
}

/* ── SECTION HEADING ─────────────────────────────────── */

.section-heading {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 32px;
}

.section-heading.narrow {
  max-width: 560px;
}

/* Gold underline on h2 in section headings */
.section-heading h2::after {
  content: '';
  display: block;
  width: 72px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 14px auto 0;
}

/* ── COUPLE GRID ─────────────────────────────────────── */

.couple-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
}

.person-card,
.connector {
  min-height: 100%;
}

.person-card {
  padding: 32px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  border-radius: 26px;
  text-align: center;
  transition: transform 0.28s var(--anim-ease), box-shadow 0.28s var(--anim-ease);
}

.person-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(85, 107, 47, 0.18);
}

.person-card span,
.card-tag {
  display: inline-flex;
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid var(--gold-border);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.connector {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-soft), rgba(255,255,255,0.86));
  border: 1px solid var(--gold-border);
  color: var(--gold);
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  animation: floatBob 4s ease-in-out infinite;
}

/* ── COUNTDOWN ───────────────────────────────────────── */

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(80px, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.countdown div {
  padding: 20px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--gold-border);
  transition: transform 0.15s ease;
}

.countdown strong {
  display: block;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--gold);
}

.countdown span {
  font-size: 0.95rem;
}

.countdown strong.pop {
  animation: countdownPop 0.4s ease;
}

/* ── EVENT / GIFT / INTERACTION / GALLERY GRIDS ──────── */

.event-grid,
.gift-grid,
.interaction-grid,
.gallery-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.interaction-grid.single {
  grid-template-columns: minmax(0, 680px);
  justify-content: center;
}

.event-card,
.panel,
.gallery-card,
.map-card {
  padding: 28px;
}

.event-card,
.panel,
.gallery-card {
  transition: transform 0.28s var(--anim-ease), box-shadow 0.28s var(--anim-ease);
}

.event-card:hover,
.panel:hover,
.gallery-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 48px rgba(85, 107, 47, 0.16);
}

.map-card {
  margin-top: 20px;
  text-align: center;
}

.feature-card img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
  border-radius: 22px;
  background: #fff;
}

.quote-card {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--gold-soft), rgba(255,255,255,0.9));
  border: 1px solid var(--gold-border);
}

.quote-card p {
  font-size: 1.18rem;
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  text-align: center;
}

/* ── FORMS ───────────────────────────────────────────── */

form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
  color: var(--accent-deep);
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(85, 107, 47, 0.3);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.12);
}

textarea {
  resize: vertical;
}

.form-message {
  min-height: 1.5em;
  margin: 0;
  color: var(--accent-deep);
  font-size: 0.95rem;
}

.guestbook-panel {
  display: grid;
  gap: 20px;
}

.guestbook-list {
  display: grid;
  gap: 14px;
}

.guestbook-item {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(201, 168, 76, 0.18);
  animation: fadeInUp 0.4s var(--anim-ease) both;
}

.guestbook-item strong {
  display: block;
  margin-bottom: 6px;
  color: var(--gold);
}

/* ── SOUND TOGGLE ────────────────────────────────────── */

.sound-toggle {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 10;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--gold-border);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.22s var(--anim-ease);
}

.sound-toggle-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--gold);
  animation: ringPulse 2.6s ease-out infinite;
}

.sound-toggle-icon {
  position: relative;
  z-index: 1;
}

.sound-toggle:active {
  transform: scale(0.92);
}

/* ── BANK LOGO ───────────────────────────────────────── */

.bank-logo {
  height: 40px;
  width: auto;
  margin: 4px 0 10px;
}

/* Compact text spacing inside transfer bank panel */
.gift-section .panel h3 {
  margin-bottom: 6px;
}

.gift-section .panel p {
  margin: 2px 0;
  line-height: 1.4;
}

/* ── CLOSING SECTION ─────────────────────────────────── */

.closing-section {
  padding-bottom: 72px;
}

/* ── SCROLL-REVEAL ANIMATION ─────────────────────────── */

[data-animate] {
  opacity: 0;
  transition:
    opacity 0.75s var(--anim-ease),
    transform 0.75s var(--anim-ease);
}

[data-animate='fade-up'] {
  transform: translateY(36px);
}

[data-animate='slide-left'] {
  transform: translateX(-48px);
}

[data-animate='slide-right'] {
  transform: translateX(48px);
}

[data-animate].is-visible {
  opacity: 1;
  transform: translate(0);
}

[data-animate-delay='150'][data-animate].is-visible {
  transition-delay: 150ms;
}

[data-animate-delay='250'][data-animate].is-visible {
  transition-delay: 250ms;
}

/* ── RESPONSIVE ──────────────────────────────────────── */

@media (max-width: 920px) {
  .hero,
  .event-grid,
  .gift-grid,
  .interaction-grid,
  .gallery-grid,
  .couple-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 84px;
  }

  .connector {
    margin: 0 auto;
  }

  .heading-deco {
    display: none;
  }

  .deco-fixed-left,
  .deco-fixed-right {
    display: none;
  }

  .page-shell {
    width: min(1160px, calc(100% - 40px));
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 24px, 1160px);
    padding-top: 24px;
  }

  .section {
    padding: 40px 0;
  }

  .opening-card,
  .event-card,
  .panel,
  .gallery-card,
  .map-card,
  .person-card {
    padding: 22px;
  }

  .opening-card {
    max-width: 92vw;
    padding: 38px 24px;
    border-radius: 22px;
    outline-offset: -10px;
  }

  .monogram-ring {
    width: 64px;
    height: 64px;
  }

  .monogram-letters {
    font-size: 1.25rem;
  }

  .opening-divider {
    width: 120px;
    margin: 16px auto 20px;
  }

  .guest-label {
    padding: 7px 18px;
    font-size: 0.88rem;
  }

  .deco-corner {
    width: 40px;
    height: 40px;
  }

  .countdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .countdown div {
    padding: 14px 8px;
  }

  h1 {
    font-size: 2.5rem;
  }

  .hero {
    padding-top: 96px;
    gap: 28px;
  }

  .hero-art {
    padding: 16px;
    border-radius: 24px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .primary-button,
  .hero-actions .secondary-button {
    width: 100%;
  }

  .couple-grid {
    gap: 14px;
  }

  .connector {
    width: 64px;
    height: 64px;
    font-size: 1.8rem;
  }

  .sound-toggle {
    width: 46px;
    height: 46px;
    right: 14px;
  }

  .gallery-grid {
    gap: 14px;
  }

  /* Fewer, lighter petals on small screens for smoother performance */
  .petal:nth-child(n + 9) {
    display: none;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  .opening-card h1 {
    font-size: 2.1rem;
  }

  .opening-card p {
    font-size: 0.92rem;
  }

  .primary-button,
  .secondary-button {
    padding: 13px 20px;
    font-size: 0.95rem;
  }

  .opening-button {
    padding: 14px 24px;
    letter-spacing: 0.1em;
  }

  .monogram-ring {
    width: 56px;
    height: 56px;
  }

  .monogram-letters {
    font-size: 1.1rem;
  }
}

/* Short / landscape viewports (phones rotated) */
@media (max-height: 480px) and (orientation: landscape) {
  .opening-screen {
    align-items: flex-start;
    padding: 14px;
  }

  .opening-card {
    padding: 18px 24px;
    max-width: 460px;
  }

  .opening-card h1 {
    font-size: 1.8rem;
  }

  .opening-card p {
    margin: 6px 0;
    font-size: 0.85rem;
  }

  .deco-corner,
  .petal-field,
  .opening-monogram,
  .opening-divider {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 88px 0 40px;
  }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .petal-field,
  .opening-glow,
  .sound-toggle-ring {
    display: none;
  }

  [data-animate] {
    opacity: 1;
    transform: none;
  }

  .shimmer-text {
    background: none;
    color: var(--accent-deep);
    -webkit-text-fill-color: currentColor;
  }
}

