/* Graduation invitation — styles */

:root {
  --bg: #0e1726;
  --bg-2: #15213a;
  --card: rgba(255, 255, 255, 0.04);
  --line: rgba(212, 175, 98, 0.35);
  --gold: #d4af62;
  --gold-soft: #f1dca7;
  --text: #f4efe4;
  --muted: #a9b1c2;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text);
  background: radial-gradient(ellipse at top, var(--bg-2), var(--bg) 60%) fixed, var(--bg);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}
canvas#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; }

/* ---------- Opening screen: a vertical card that opens like a book ---------- */
#intro {
  --cw: min(300px, 72vw, 52vh);          /* card width */
  --ch: calc(var(--cw) * 1.42);          /* card height (portrait) */
  --open-scale: 1;
  cursor: pointer;                       /* tapping anywhere opens the card */
  position: fixed; inset: 0; z-index: 40;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  background: radial-gradient(ellipse at 50% 40%, #1a2742, var(--bg) 70%);
  perspective: 1600px;
  transition: opacity .9s ease, visibility .9s ease;
}
#intro.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.book {
  position: relative; width: var(--cw); height: var(--ch);
  transform-style: preserve-3d;
  transition: transform 1.5s cubic-bezier(.55,.05,.25,1);
  animation: float 5s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-8px) rotateX(3deg); } }
.book::after {                          /* soft shadow on the "table" */
  content: ""; position: absolute; left: 6%; right: 6%; bottom: -26px; height: 24px;
  background: radial-gradient(closest-side, rgba(0,0,0,.55), transparent); filter: blur(4px);
  transform: translateZ(-1px);
}

/* shared paper look */
.page-inside, .cover-front, .cover-back {
  position: absolute; inset: 0; border-radius: 6px 14px 14px 6px; overflow: hidden;
  background:
    radial-gradient(120% 80% at 30% 0%, rgba(241,220,167,.10), transparent 60%),
    linear-gradient(160deg, #1d2a46, #121b2e 70%);
  border: 1px solid rgba(212,175,98,.45);
  box-shadow: 0 30px 60px rgba(0,0,0,.55);
}

/* inside right page */
.page-inside { display: grid; place-items: center; padding: 16px; transform: translateZ(-1px); }
.page-inside::after {                   /* shadow cast by the cover, lifts as it opens */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,.65), rgba(0,0,0,.25) 40%, transparent 80%);
  transition: opacity 1.3s ease .2s;
}
.pi-frame {
  width: 100%; height: 100%; border: 1px solid rgba(212,175,98,.3); border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 12px; text-align: center;
}
.pi-orn { color: var(--gold); font-size: .8rem; }
.pi-eyebrow { font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-top: 10px; }
.pi-title { font-family: "Cormorant Garamond", serif; font-size: calc(var(--cw) * .085); color: var(--text); }
.pi-name {
  font-family: "Great Vibes", cursive; font-size: calc(var(--cw) * .14); line-height: 1.15; padding: .1em .15em;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pi-date { font-family: "Playfair Display", serif; letter-spacing: .25em; color: var(--gold); font-size: calc(var(--cw) * .05); margin-bottom: 10px; }

/* the cover, hinged on its left edge */
.cover {
  position: absolute; inset: 0; transform-origin: left center; transform-style: preserve-3d;
  transition: transform 1.5s cubic-bezier(.55,.05,.25,1);
  cursor: pointer;
}
.cover-front, .cover-back { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.cover-back {
  transform: rotateY(180deg); border-radius: 14px 6px 6px 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px;
  background:
    repeating-linear-gradient(45deg, rgba(212,175,98,.05) 0 1px, transparent 1px 14px),
    linear-gradient(200deg, #1b2741, #10182a 70%);
}
.cb-mono { font-family: "Great Vibes", cursive; font-size: calc(var(--cw) * .3); line-height: 1; color: rgba(212,175,98,.35); }
.cb-quote { font-family: "Cormorant Garamond", serif; font-style: italic; font-size: calc(var(--cw) * .058); color: var(--muted); text-align: center; max-width: 85%; }

.cover-front { padding: 14px; }
.cover-front::before {                  /* light sheen that sweeps across while it turns */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255,240,200,.18) 48%, transparent 65%);
  transition: opacity .6s ease;
}
.cf-frame {
  position: relative; height: 100%; border: 1px solid var(--gold); border-radius: 8px;
  outline: 1px solid rgba(212,175,98,.35); outline-offset: -7px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center;
}
.cf-frame::before, .cf-frame::after {   /* little corner ornaments */
  content: "✦"; position: absolute; color: var(--gold); font-size: .7rem; line-height: 1;
}
.cf-frame::before { top: 12px; left: 50%; transform: translateX(-50%); }
.cf-frame::after { bottom: 12px; left: 50%; transform: translateX(-50%); }
.cf-eyebrow { font-size: .62rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.cf-year { font-family: "Cormorant Garamond", serif; font-style: italic; color: var(--muted); font-size: 1rem; margin-bottom: 8px; }
.cf-to {
  font-family: "Great Vibes", cursive; font-size: calc(var(--cw) * .11); line-height: 1.2; color: var(--gold-soft);
  margin-top: 8px; padding: 0 12px;
}
.seal {
  position: relative; width: calc(var(--cw) * .32); height: calc(var(--cw) * .32); border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e9c97f, #a9822f);
  display: grid; place-items: center; color: #3b2a0a;
  box-shadow: 0 8px 26px rgba(0,0,0,.45), 0 0 30px rgba(212,175,98,.3), inset 0 -4px 8px rgba(0,0,0,.25);
  cursor: pointer; border: none;
  animation: pulse 2.4s ease-in-out infinite;
}
.seal::after {                          /* stamped inner ring */
  content: ""; position: absolute; inset: 8%; border-radius: 50%; border: 1px dashed rgba(59,42,10,.45);
}
@keyframes pulse { 50% { transform: scale(1.05); box-shadow: 0 8px 26px rgba(0,0,0,.45), 0 0 50px rgba(212,175,98,.55), inset 0 -4px 8px rgba(0,0,0,.25); } }
.intro-hint { color: var(--muted); letter-spacing: .2em; text-transform: uppercase; font-size: .72rem; transition: opacity .4s ease; }

/* step 1 — the seal pops off */
#intro.opening .book { animation: none; }
#intro.opening .seal { animation: sealOff .55s cubic-bezier(.5,-0.4,.7,1) forwards; }
#intro.opening .intro-hint { opacity: 0; }
@keyframes sealOff {
  40% { transform: scale(1.18) rotate(-8deg); }
  100% { transform: translateY(-40px) scale(0) rotate(25deg); opacity: 0; }
}
/* step 2 — the cover swings open, the card slides so the spread is centred */
#intro.open .book { transform: translateX(calc(var(--cw) / 2 * var(--open-scale))) scale(var(--open-scale)); }
#intro.open .cover { transform: rotateY(-178deg); }
#intro.open .cover-front::before { opacity: 1; }
#intro.open .page-inside::after { opacity: 0; }
/* step 3 — fly into the page */
#intro.hidden .book {
  transform: translateX(calc(var(--cw) / 2 * var(--open-scale))) scale(calc(var(--open-scale) * 1.25));
  transition-duration: 1s;
}

/* ---------- Layout ---------- */
main { max-width: 760px; margin: 0 auto; padding: 64px 16px 56px; }
section { margin-bottom: 72px; }
main > section:last-child { margin-bottom: 0; }   /* the footer follows right after */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s ease; }
.reveal.in { opacity: 1; transform: none; }

.eyebrow { text-transform: uppercase; letter-spacing: .3em; font-size: .75rem; color: var(--gold); }
.divider { display: flex; align-items: center; gap: 14px; justify-content: center; color: var(--gold); margin: 24px auto; max-width: 280px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Hero ---------- */
.hero { text-align: center; margin-bottom: 44px; }   /* the date block opens with its own ✦ rule, so less space is needed */
.hero .cap { font-size: 3.2rem; display: block; margin-bottom: 12px; }
.hero .greeting { font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 1.3rem; color: var(--muted); margin-top: 18px; }
.hero h1 {
  font-family: "Great Vibes", cursive; font-weight: 400;
  font-size: clamp(3.2rem, 12vw, 5.6rem); line-height: 1.1;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  /* script swashes reach past the line box; padding gives the gradient room so they aren't cut */
  padding: .18em .12em .14em; margin: calc(10px - .12em) 0 calc(4px - .1em);
}
.hero .degree { font-family: "Cormorant Garamond", serif; font-size: 1.5rem; }
.hero .school { font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 1.2rem; color: var(--muted); letter-spacing: .01em; margin-top: 2px; text-wrap: balance; }
.note-section { margin-bottom: 56px; text-align: center; }
.note-card { position: relative; max-width: 500px; margin: 0 auto; padding: 30px 8px 0; }
.note-card::before, .note-card::after {          /* short gold rules either side of the quote mark */
  content: ""; position: absolute; top: 30px; width: calc(50% - 46px); height: 1px;
}
.note-card::before { left: 0; background: linear-gradient(90deg, transparent, var(--line)); }
.note-card::after { right: 0; background: linear-gradient(90deg, var(--line), transparent); }
.note-mark {
  position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  font-family: "Playfair Display", serif; font-size: 4.6rem; line-height: 1; color: var(--gold);
  opacity: .8; height: 60px; overflow: hidden;
}
.note-card .message {
  margin: 34px auto 0; font-family: "Cormorant Garamond", serif; font-style: italic; font-weight: 500;
  font-size: clamp(1.4rem, 4.6vw, 1.7rem); line-height: 1.5; color: #efe6d2; text-wrap: balance;
}

/* ---------- Countdown ---------- */
/* Flip-clock: split cards with a hinge line; digits flip in when they change */
.cd-section { text-align: center; }
.cd-section .eyebrow { margin-bottom: 20px; }
.countdown {
  display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  column-gap: 10px; row-gap: 12px; max-width: 500px; margin: 0 auto; align-items: center;
}
.cd-card {
  position: relative; aspect-ratio: 1 / 1.08; border-radius: 14px; display: grid; place-items: center;
  perspective: 300px; overflow: hidden;
  background: linear-gradient(180deg, #232b3f 0%, #1c2334 50%, #161c2b 50%, #121726 100%);
  border: 1px solid rgba(212,175,98,.35);
  box-shadow: 0 16px 34px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.07);
}
.cd-card::after {           /* the hinge, with a tiny gold pin at each end */
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px;
  background: rgba(0,0,0,.6); box-shadow: 0 1px 0 rgba(255,255,255,.05);
}
.cd-card::before {
  content: ""; position: absolute; top: calc(50% - 3px); left: 5px; right: 5px; height: 6px; z-index: 1;
  background: radial-gradient(circle at 3px 3px, var(--gold) 2px, transparent 2.5px) left / 6px 6px no-repeat,
              radial-gradient(circle at 3px 3px, var(--gold) 2px, transparent 2.5px) right / 6px 6px no-repeat;
  opacity: .7;
}
.cd-card b {
  font-family: "Playfair Display", serif; font-weight: 500; font-variant-numeric: lining-nums tabular-nums;
  font-size: clamp(2rem, 9vw, 3.1rem); line-height: 1;
  background: linear-gradient(180deg, #fbefcf 0%, var(--gold-soft) 50%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cd-card b.flip { animation: flip .55s cubic-bezier(.2,.8,.3,1); }
@keyframes flip { from { transform: rotateX(-80deg); opacity: .25; } to { transform: none; opacity: 1; } }
.cd-sep {
  font-style: normal; font-family: "Playfair Display", serif; font-size: 1.8rem; line-height: 1;
  color: var(--gold); margin-top: -4px; animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: .25; } }
.cd-label { grid-row: 2; font-size: .7rem; text-transform: uppercase; letter-spacing: .22em; color: var(--muted); }
.cd-caption { margin-top: 22px; font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 1.15rem; color: var(--muted); }
.countdown-done { text-align: center; font-family: "Cormorant Garamond", serif; font-size: 1.6rem; color: var(--gold-soft); }

/* ---------- Details ---------- */
h2 { font-family: "Cormorant Garamond", serif; font-weight: 500; font-size: 2rem; text-align: center; margin-bottom: 8px; }

/* ---------- Save the date (the big date & time block) ---------- */
.when {
  position: relative; isolation: isolate; max-width: 560px; margin: 0 auto; text-align: center; padding: 8px 0;
}
/* frameless: just a soft golden glow behind the date, fading into the page */
.when::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: min(130%, 100vw); height: 120%;
  transform: translate(-50%, -50%); pointer-events: none; z-index: -1;
  background: radial-gradient(closest-side, rgba(212,175,98,.16), rgba(212,175,98,.05) 55%, transparent);
}
.when-ornament { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--gold); margin: 0 auto 14px; max-width: 220px; }
.when-ornament::before, .when-ornament::after { content: ""; flex: 1; height: 1px; }
.when-ornament::before { background: linear-gradient(90deg, transparent, var(--gold)); }
.when-ornament::after { background: linear-gradient(90deg, var(--gold), transparent); }
.when-ornament.bottom { margin: 22px auto 0; }
.when .eyebrow { margin-bottom: 4px; }
.when-title { font-family: "Great Vibes", cursive; font-size: clamp(2.3rem, 9vw, 3rem); color: var(--gold-soft); line-height: 1.2; }
.when-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 18px; margin: 22px 0 14px; }
.when-side {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 96px; padding: 10px 4px;
  border-top: 1px solid; border-bottom: 1px solid;
  border-image: linear-gradient(90deg, transparent, var(--gold) 35%, var(--gold) 65%, transparent) 1;
}
.when-side:first-child { border-image-source: linear-gradient(90deg, transparent, var(--gold) 60%); }
.when-side:last-child { border-image-source: linear-gradient(90deg, var(--gold) 40%, transparent); }
.when-side .ico { width: 20px; height: 20px; color: var(--gold); }
.when-side b {
  font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.45rem; line-height: 1.1;
  text-transform: uppercase; letter-spacing: .08em; color: var(--gold-soft);
}
#whenTime .t { white-space: nowrap; }   /* "10:45 – 12:00" wraps only between the two times */
.when-side small { font-size: .7rem; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); }
/* Cormorant only has old-style figures; Playfair gives tall, even digits for the time */
#whenTime { font-family: "Playfair Display", serif; font-variant-numeric: lining-nums; font-size: 1.45rem; letter-spacing: .01em; font-weight: 500; }
.when-side.tba b { font-size: 1.05rem; letter-spacing: .04em; text-transform: none; }
.when-day {
  align-self: center;
  font-family: "Cormorant Garamond", serif; font-weight: 600;
  font-size: clamp(5rem, 22vw, 7rem); line-height: .85; padding: 0 4px;
  background: linear-gradient(180deg, #fbefcf 0%, var(--gold-soft) 45%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 22px rgba(212,175,98,.35));
}
.when-month { font-size: .85rem; letter-spacing: .4em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.when .actions { margin-top: 24px; }
/* ---------- Venue: pin medallion with ripples over a faint "map" of contour rings ---------- */
.venue { position: relative; isolation: isolate; max-width: 560px; margin: 0 auto; text-align: center; padding: 6px 0 0; }
.venue::before {           /* contour rings radiating from the pin, fading out */
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 50%; top: 38px; width: min(620px, 100vw); aspect-ratio: 1; transform: translate(-50%, -50%);
  background: repeating-radial-gradient(circle, transparent 0 34px, rgba(212,175,98,.13) 34px 35px);
  -webkit-mask-image: radial-gradient(closest-side, #000 15%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 15%, transparent 100%);
}
.venue-pin {
  position: relative; width: 76px; height: 76px; margin: 0 auto 22px; border-radius: 50%;
  display: grid; place-items: center; color: #3b2a0a;
  background: radial-gradient(circle at 35% 30%, #f1d590, #b88c38);
  box-shadow: 0 10px 30px rgba(0,0,0,.45), 0 0 0 6px rgba(212,175,98,.12);
}
.venue-pin .ico { width: 32px; height: 32px; }
.venue-pin::before, .venue-pin::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--gold);
  animation: ping 3s ease-out infinite;
}
.venue-pin::after { animation-delay: 1.5s; }
@keyframes ping { from { transform: scale(1); opacity: .7; } to { transform: scale(2.3); opacity: 0; } }
.venue .eyebrow { margin-bottom: 10px; }
.venue-name {
  font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: clamp(1.7rem, 6.4vw, 2.35rem);
  line-height: 1.2; color: #f4ead2; margin: 0 auto 10px; max-width: 480px; text-wrap: balance;
}
.venue-addr { font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 1.2rem; color: var(--muted); max-width: 420px; margin: 0 auto; text-wrap: balance; }
.venue-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
.venue-tile {
  display: flex; align-items: center; gap: 12px; padding: 14px 14px; text-align: left;
  font: inherit; color: inherit; cursor: pointer; border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
  border: 1px solid var(--line); transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.venue-tile:hover { transform: translateY(-2px); border-color: var(--gold); background: rgba(212,175,98,.08); }
.vt-ico { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--gold); border: 1px solid rgba(212,175,98,.45); background: rgba(212,175,98,.08); }
.vt-ico .ico { width: 20px; height: 20px; }
.vt-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vt-text b { font-weight: 600; font-size: .95rem; color: var(--gold-soft); }
.vt-text small { font-size: .78rem; color: var(--muted); line-height: 1.3; }
.vt-go { flex: none; font-size: 1.5rem; line-height: 1; color: var(--gold); transition: transform .2s ease; }
.venue-tile:hover .vt-go { transform: translateX(3px); }

/* ---------- Call me: frameless, like a handwritten note — the number is the hero ---------- */
.call { text-align: center; max-width: 520px; margin: 0 auto; }
.call .eyebrow { margin-bottom: 10px; }
.call-title {
  font-family: "Cormorant Garamond", serif; font-style: italic; font-weight: 500;
  font-size: clamp(1.9rem, 6.5vw, 2.4rem); line-height: 1.2; color: #f4ead2; margin-bottom: 6px;
}
.call-sub { font-family: "Cormorant Garamond", serif; font-size: 1.25rem; color: var(--muted); letter-spacing: .01em; }
.call-number {
  position: relative; display: inline-flex; align-items: center; gap: 16px;
  margin: 26px auto 6px; padding: 6px 4px 14px; text-decoration: none; white-space: nowrap;
}
.call-number::after {                  /* fine gold rule under the number, fading at both ends */
  content: ""; position: absolute; left: -12%; right: -12%; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 25%, var(--gold) 75%, transparent);
}
.call-ring {
  position: relative; flex: none; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; color: var(--gold); border: 1px solid rgba(212,175,98,.5);
}
.call-ring .ico { width: 20px; height: 20px; animation: ring 4.5s ease-in-out infinite; transform-origin: 50% 60%; }
.call-ring::before, .call-ring::after {  /* two little "sound" arcs beside the handset */
  content: ""; position: absolute; top: 50%; width: 10px; height: 18px; margin-top: -9px;
  border: 1.5px solid var(--gold); border-left: 0; border-bottom-color: transparent; border-top-color: transparent;
  border-radius: 0 50% 50% 0; right: -12px; opacity: 0; animation: wave 4.5s ease-out infinite;
}
.call-ring::after { right: -19px; width: 14px; height: 26px; margin-top: -13px; animation-delay: .15s; }
@keyframes ring {
  0%, 76%, 100% { transform: rotate(0); }
  79% { transform: rotate(-14deg); } 82% { transform: rotate(13deg); }
  85% { transform: rotate(-10deg); } 88% { transform: rotate(8deg); } 91% { transform: rotate(0); }
}
@keyframes wave { 0%, 76% { opacity: 0; } 82% { opacity: .9; } 94%, 100% { opacity: 0; } }
/* Playfair for tall, even digits (Cormorant's numbers bob up and down) */
.call-digits {
  font-family: "Playfair Display", serif; font-variant-numeric: lining-nums; font-weight: 500;
  font-size: clamp(2.1rem, 9vw, 2.9rem); letter-spacing: .05em; line-height: 1.1;
  background: linear-gradient(180deg, #fbefcf 0%, var(--gold-soft) 45%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(212,175,98,.3));
}
.call-number:hover .call-ring { background: rgba(212,175,98,.12); }
.call .actions { margin-top: 26px; }

.timeline { list-style: none; max-width: 460px; margin: 28px auto 0; border-left: 1px solid var(--line); padding-left: 24px; }
.timeline li { position: relative; padding-bottom: 22px; }
.timeline li::before { content: ""; position: absolute; left: -30px; top: 8px; width: 11px; height: 11px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--bg); }
.timeline time { font-weight: 600; color: var(--gold-soft); font-size: .9rem; }
.timeline p { color: #d8d2c4; }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; font: 500 .95rem "Inter", sans-serif;
  text-decoration: none; cursor: pointer; transition: transform .2s ease, background .2s ease;
  border: 1px solid var(--gold); color: var(--gold-soft); background: transparent;
}
.btn:hover { transform: translateY(-2px); background: rgba(212,175,98,.12); }
.btn.primary { background: linear-gradient(180deg, #e3c27a, #c49a45); color: #1d1606; border-color: transparent; font-weight: 600; }
.btn.primary:hover { background: linear-gradient(180deg, #ecd08f, #cfa652); }

.map { margin-top: 24px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16/9; }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.3) contrast(1.05); }

.note { text-align: center; color: var(--muted); max-width: 520px; margin: 12px auto 0; }

/* ---------- Recipient ---------- */
.recipient {
  position: relative; text-align: center; max-width: 520px; margin: 0 auto 44px;
  padding: 36px 24px 32px; border-radius: 20px;
  background: linear-gradient(180deg, rgba(212,175,98,.10), rgba(212,175,98,.03));
  border: 1px solid var(--line);
}
.recipient::before {
  content: ""; position: absolute; inset: 8px; border-radius: 14px;
  border: 1px dashed rgba(212,175,98,.25); pointer-events: none;
}
.recipient .label { text-transform: uppercase; letter-spacing: .3em; font-size: .72rem; color: var(--gold); }
.recipient .guest-name {
  font-family: "Great Vibes", cursive; font-size: clamp(2.6rem, 10vw, 3.8rem); line-height: 1.2;
  color: var(--gold-soft); margin: 8px 0 6px; overflow-wrap: anywhere;
}
.recipient .sub { font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 1.15rem; color: var(--muted); }

/* ---------- Parking ---------- */
.parking { list-style: none; display: grid; gap: 12px; max-width: 560px; margin: 28px auto 0; counter-reset: lot; }
.parking li {
  display: flex; align-items: center; gap: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px;
}
.parking .num {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 600; font-size: .9rem;
  background: rgba(212,175,98,.15); color: var(--gold-soft); border: 1px solid var(--line);
}
.parking .info { flex: 1; min-width: 0; }
.parking .info strong { display: block; font-weight: 500; }
.parking .info span { color: var(--muted); font-size: .85rem; }
.parking a { flex: none; color: var(--gold); font-size: .85rem; text-decoration: none; white-space: nowrap; }
.parking a:hover { text-decoration: underline; }

footer { text-align: center; padding: 8px 16px 48px; color: var(--muted); font-size: .85rem; }
footer .sig { font-family: "Great Vibes", cursive; font-size: 2.2rem; color: var(--gold-soft); display: block; }
footer .footer-note { font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 1.15rem; color: var(--muted); letter-spacing: .01em; }

@media (max-width: 480px) {
  .countdown { column-gap: 5px; }
  .cd-card { border-radius: 11px; }
  .cd-sep { font-size: 1.3rem; }
  .cd-card::before { display: none; }   /* no room for the hinge pins on phones */
  .cd-label { font-size: .62rem; letter-spacing: .14em; }
  main { padding-top: 40px; }
  .when-row { gap: 10px; }
  .when-side { min-height: 84px; }
  .when-side b { font-size: 1.12rem; letter-spacing: .04em; }
  .when-side small { letter-spacing: .15em; }
  #whenTime { font-size: 1.2rem; }
  .venue-tiles { gap: 10px; }
  .venue-tile { flex-direction: column; text-align: center; gap: 8px; padding: 16px 10px; }
  .vt-go { display: none; }
  .call-number { gap: 12px; }
  .call-ring { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .seal, .book { animation: none; }
  .cd-card b.flip, .cd-sep { animation: none; }
  .venue-pin::before, .venue-pin::after { animation: none; opacity: 0; }
  .call-ring .ico, .call-ring::before, .call-ring::after { animation: none; }
}
/* ---------- Line icons ---------- */
.ico {
  width: 1em; height: 1em; flex: none; vertical-align: -0.125em;
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.seal .ico { width: 46%; height: 46%; color: #3b2a0a; stroke-width: 1.6; }
.hero .cap { color: var(--gold); }
.hero .cap .ico { width: 56px; height: 56px; stroke-width: 1.2; }
.btn .ico { width: 18px; height: 18px; }
.parking a { display: inline-flex; align-items: center; gap: 4px; }
.parking a .ico { width: 14px; height: 14px; }

/* ---------- Portrait (arch frame) ---------- */
.portrait { --w: min(240px, 62vw); --arch-top: 18%; position: relative; width: var(--w); margin: 0 auto 44px; }
.portrait::before {          /* thin outer gold arch */
  content: ""; position: absolute; inset: -10px; border-radius: 999px 999px 18px 18px;
  border: 1px solid var(--line); pointer-events: none;
}
.portrait img {
  display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: 999px 999px 14px 14px; border: 2px solid var(--gold);
  box-shadow: 0 18px 50px rgba(0,0,0,.45), 0 0 40px rgba(212,175,98,.15);
  background: var(--bg-2);
}
.portrait-badge {
  position: absolute; left: 50%; bottom: -22px; transform: translateX(-50%);
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #e9c97f, #a9822f); color: #3b2a0a;
  box-shadow: 0 6px 18px rgba(0,0,0,.4);
}
.portrait-badge .ico { width: 24px; height: 24px; }
.portrait-badge { z-index: 3; }

/* Pop-out style: a background-removed PNG whose head rises above the arch.
   Two copies of the photo: one clipped to the arch, one showing only the top band (the head). */
.portrait:not(.popout) .portrait-arch, .portrait:not(.popout) .portrait-pop { display: none; }
/* the arch is wider than the photo so the arms have breathing room */
.portrait.popout { --w: min(300px, 80vw); --inner-n: 0.82; --inner: calc(var(--inner-n) * 100%); }
.portrait.popout::before {
  top: calc(var(--arch-top) - 10px);
  border-radius: calc(var(--w) / 2 + 10px) calc(var(--w) / 2 + 10px) 18px 18px;
}
.portrait.popout .portrait-arch {
  display: block; position: absolute; left: 0; right: 0; bottom: 0; top: var(--arch-top);
  border-radius: calc(var(--w) / 2) calc(var(--w) / 2) 14px 14px;
  border: 2px solid var(--gold);
  background:
    radial-gradient(120% 85% at 50% 18%, #fbf2da 0%, #ecd59c 40%, #c9a258 75%, #a47d35 100%);
  box-shadow: 0 18px 50px rgba(0,0,0,.45), 0 0 40px rgba(212,175,98,.15);
}
.portrait.popout img {
  position: relative; z-index: 1; aspect-ratio: auto; height: auto; object-fit: fill;
  width: var(--inner); margin: 0 auto;
  border: 0; border-radius: 0; box-shadow: none; background: none;
  /* clip box reaches out sideways to the arch edges (negative inset = the gap beside the photo) */
  --side: calc(2px - (1 / var(--inner-n) - 1) / 2 * 100%);
  clip-path: inset(var(--arch-top) var(--side) 2px var(--side) round calc(var(--w) / 2 - 2px) calc(var(--w) / 2 - 2px) 12px 12px);
}
.portrait.popout .portrait-pop {
  display: block; position: absolute; top: 0; left: calc((100% - var(--inner)) / 2); z-index: 2;
  /* only the part above the arch (+ a little, for the chin/neck) spills over it */
  clip-path: inset(0 0 calc(100% - var(--arch-top) - 6%) 0);
}
.portrait + .cap { display: none; }
.portrait[hidden] + .cap { display: block; }

/* ---------- Parking popup (centered on desktop, bottom sheet on phones) ---------- */
.sheet {
  width: min(560px, calc(100% - 32px)); max-height: 85vh; margin: auto;
  padding: 28px 24px 24px; border-radius: 22px;
  background: linear-gradient(180deg, #1a2744, #111b2f);
  color: var(--text); border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.sheet::backdrop { background: rgba(5,9,18,.7); backdrop-filter: blur(4px); }
.sheet[open] { animation: sheetIn .35s cubic-bezier(.2,.8,.2,1); }
.sheet[open]::backdrop { animation: fadeIn .35s ease; }
@keyframes sheetIn { from { opacity: 0; transform: translateY(24px) scale(.98); } }
@keyframes fadeIn { from { opacity: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-head h2 { margin: 0; font-size: 1.8rem; }
.sheet-close {
  flex: none; width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; font-size: 18px;
  background: transparent; color: var(--gold-soft); border: 1px solid var(--line);
}
.sheet-close:hover { background: rgba(212,175,98,.12); }
.sheet .note { text-align: left; margin: 8px 0 0; max-width: none; }
.sheet .parking { margin-top: 18px; max-width: none; }
.sheet .map { margin-top: 16px; aspect-ratio: 4 / 3; }
.sheet .note strong { color: var(--text); font-weight: 500; }
@media (max-width: 600px) {
  .sheet {
    width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 22px 22px 0 0;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
  .sheet[open] { animation-name: sheetUp; }
  @keyframes sheetUp { from { transform: translateY(100%); } }
}
@media (prefers-reduced-motion: reduce) { .sheet[open], .sheet[open]::backdrop { animation: none; } }

/* ---------- Music button (bottom-right) ---------- */
.music-btn {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 35;
  width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center;
  background: rgba(14,23,38,.75); border: 1px solid var(--line); backdrop-filter: blur(6px);
  color: var(--gold-soft); box-shadow: 0 8px 24px rgba(0,0,0,.35);
  transition: transform .2s ease, border-color .2s ease;
}
.music-btn[hidden] { display: none; }
.music-btn:hover { transform: scale(1.06); border-color: var(--gold); }
.music-btn .ico { width: 20px; height: 20px; }
.music-btn .eq { display: none; align-items: flex-end; gap: 3px; height: 18px; }
.music-btn .eq i { width: 3px; border-radius: 2px; background: var(--gold); animation: eq 1s ease-in-out infinite; }
.music-btn .eq i:nth-child(1) { animation-delay: -.2s; }
.music-btn .eq i:nth-child(2) { animation-delay: -.6s; }
.music-btn .eq i:nth-child(3) { animation-delay: -.4s; }
.music-btn .eq i:nth-child(4) { animation-delay: -.8s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 18px; } }
.music-btn.playing .eq { display: flex; }
.music-btn.playing .ico { display: none; }
@media (prefers-reduced-motion: reduce) { .music-btn .eq i { animation: none; height: 10px; } }

/* ---------- Language switch ---------- */
.lang-switch {
  position: fixed; top: 16px; right: 16px; z-index: 45;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(14,23,38,.7); border: 1px solid var(--line); backdrop-filter: blur(6px);
  font-size: .78rem; letter-spacing: .12em; color: var(--muted);
}
.lang-switch a { color: var(--muted); text-decoration: none; padding: 2px 2px; }
.lang-switch a:hover { color: var(--gold-soft); }
.lang-switch a[aria-current] { color: var(--gold-soft); font-weight: 600; }
