/* ==========================================================
   Rx × Hxx · Forever Together
   Visual DNA:
     - deep navy ink (夜空般的深夜蓝)
     - champagne → rose gold gradient (香槟金渐变)
     - wine-red heart accent (酒红心)
   Typography:
     - monogram & decorative: Great Vibes
     - serif body: Cormorant Garamond / EB Garamond / Noto Serif SC
   ========================================================== */

/* ============================================================
   Self-hosted fonts (no Google Fonts CDN - blocked in mainland CN)
   generated by poster-work/build_fonts.py - do not hand-edit
   ============================================================ */

@font-face {
  font-family: "Great Vibes";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/greatvibes-400.woff2?v=cc168b68") format("woff2");
}

@font-face {
  font-family: "Pinyon Script";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/pinionscript-400.woff2?v=cc168b68") format("woff2");
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/cormorant-400.woff2?v=cc168b68") format("woff2");
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/cormorant-400i.woff2?v=cc168b68") format("woff2");
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/cormorant-500.woff2?v=cc168b68") format("woff2");
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/cormorant-500i.woff2?v=cc168b68") format("woff2");
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/cormorant-600.woff2?v=cc168b68") format("woff2");
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/cormorant-700.woff2?v=cc168b68") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/inter-400.woff2?v=cc168b68") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/inter-500.woff2?v=cc168b68") format("woff2");
}

@font-face {
  font-family: "Noto Serif SC";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("assets/fonts/notoserifsc.woff2?v=cc168b68") format("woff2");
}

:root {
  /* color tokens */
  --ink:        #0a1632;
  --ink-deep:   #050b1c;
  --ink-2:      #11203f;
  --ink-3:      #1a2d54;
  --ink-soft:   #23385f;

  --gold-1:     #f7e3bd;
  --gold-2:     #e6be8a;
  --gold-3:     #c99466;
  --gold-4:     #a1643f;

  --rose:       #b0304a;
  --rose-soft:  #c8485e;

  --cream:      #f4e9d6;
  --cream-2:    #efe0c4;

  /* layout */
  --max:        72rem;
  --gutter:     clamp(1.2rem, 4vw, 3rem);

  /* motion */
  --ease:       cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

body {
  margin: 0;
  font-family: "Cormorant Garamond", "Noto Serif SC", "Georgia", serif;
  font-weight: 400;
  font-size: clamp(1.05rem, 1.1vw + 0.6rem, 1.25rem);
  line-height: 1.7;
  letter-spacing: 0.01em;
  color: var(--cream);
  background: var(--ink-deep);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a   { color: var(--gold-2); text-decoration: none; }
a:hover { color: var(--gold-1); }

/* =====================  REVEAL ANIMATIONS  ===================== */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* =====================  HERO  ===================== */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 35%, rgba(35, 56, 95, 0.55) 0%, transparent 65%),
    linear-gradient(180deg, #0c1838 0%, #050b1c 80%);
}

.hero-glow {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(circle at 50% 35%, rgba(230, 190, 138, 0.10) 0%, transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(176, 48, 74, 0.10) 0%, transparent 50%);
  pointer-events: none;
}

.hero-frame {
  position: relative;
  padding: 4rem 1.5rem 2rem;
  animation: heroRise 1.4s var(--ease) both;
}

@keyframes heroRise {
  0%   { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: none; }
}

.hero-eyebrow {
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin: 0 0 1.5rem;
  opacity: 0.85;
}

/* =====================  HERO MARK  =====================
   The R × H monogram is now a single hand-drawn-style SVG canvas
   with all six glyphs positioned in one viewBox: R · × · my · ♥ · × · H.
   The path order makes the heart visually "thread" through R and H,
   keeping the "RX x HXX" signature energy of the reference design.
   ========================================================== */

.hero-mark {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  margin: 1.4rem auto 0;
  width: min(1240px, 92vw);
  user-select: none;
}

.hero-monogram-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 56vh;
  overflow: visible;
  filter: drop-shadow(0 14px 50px rgba(232, 180, 120, 0.20));
  opacity: 0;
  animation: heroSvgIn 1.6s var(--ease) 0.1s both;
}
@keyframes heroSvgIn {
  0%   { opacity: 0; filter: blur(8px) drop-shadow(0 0 0 transparent); }
  100% { opacity: 1; filter: blur(0) drop-shadow(0 14px 50px rgba(232, 180, 120, 0.20)); }
}

/* ---- entrance per group ----
   Direct-child selector only: the connector mark nests a helper <g>, and a
   bare `g` would hand it opacity:0 and hide it. */
.hero-monogram-svg > g {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}
.ml-rx    { animation: mlRxIn   1.4s var(--ease) 0.20s both, mlBreath 4.4s ease-in-out 1.7s infinite; }
.ml-times { animation: mlXIn    1.0s cubic-bezier(.34,1.56,.64,1) 0.95s both,
                       mlTimesSpin 14s ease-in-out 2.0s infinite; }
.ml-hxx   { animation: mlHxxIn  1.4s var(--ease) 0.45s both, mlBreath 4.4s ease-in-out 1.95s infinite; }

/* ---- connection mark ----
   Positioned in absolute viewBox coordinates (no SVG positioning transform)
   because the CSS entrance animation writes `transform` here and would
   otherwise clobber it. */
.ml-times-mark {
  transform-box: fill-box;
  transform-origin: center;
}
/* ---- connection mark: four-leaf clover seated on the × ----
   Two slim gold arms run behind the leaves. Their half-width (16) is well under
   the leaves' (27) and their tips reach ~130 units out against the leaves' ~82,
   so gold stays visible on all four diagonals and the × never reads as stray
   nubs. A/B alternate gradient direction on both the strokes and the leaves so
   neither layer reads as one flat shape. */
.ml-times-stroke,
.ml-leaf {
  stroke-width: 1.2;
  stroke-linejoin: round;
}
.ml-times-stroke--gold  { fill: url(#connector-gold);   stroke: url(#connector-gold); }
.ml-times-stroke--gold2 { fill: url(#connector-gold-2); stroke: url(#connector-gold-2); }
/* A/B alternate gradient direction so neither pair of leaves reads as one flat
   shape. The stroke is a flat champagne tone rather than the fill gradient: on a
   pearl fill a gradient outline let the edge wash into the navy behind it. */
.ml-leaf--a { fill: url(#connector-leaf);   stroke: #c9b48d; }
.ml-leaf--b { fill: url(#connector-leaf-2); stroke: #c9b48d; }
.ml-times-jewel { fill: url(#connector-pearl); stroke: #8a5a33; stroke-width: 1.2; }

/* ---- the clover turns, the × does not ----
   Only .ml-clover carries the rotation, and it turns about the mark's true
   centre in user units (668 172) rather than a fill-box guess. `linear` is
   required: an eased 360° loop visibly stalls at the seam. The gold arms and
   the pearl stay put on purpose — spinning the pearl would sweep its highlight
   around and undo the fixed top-left light, and a turning × reads as a loading
   spinner rather than a wedding monogram. Hovering the monogram parks it. */
.ml-clover {
  transform-box: view-box;
  transform-origin: 668px 172px;
  animation: mlCloverSpin 22s linear infinite;
}
.hero-mark:hover .ml-clover { animation-play-state: paused; }

@keyframes mlCloverSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes mlRxIn {
  0%   { opacity: 0; transform: translateX(-30px) scale(0.9)  rotate(-2deg); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
@keyframes mlHxxIn {
  0%   { opacity: 0; transform: translateX(30px)  scale(0.9)  rotate(2deg); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
/* Scale-only now that the rotation lives on .ml-clover — a tilt here on top of
   the turning clover read as two competing rotations. */
@keyframes mlTimesSpin {
  0%, 100% { transform: scale(1);    }
  50%      { transform: scale(1.05); }
}

@keyframes mlRIn {
  0%   { opacity: 0; transform: translateX(-26px) scale(0.9)  rotate(-2deg); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
@keyframes mlHIn {
  0%   { opacity: 0; transform: translateX(26px)  scale(0.9)  rotate(2deg); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
@keyframes mlXIn {
  0%   { opacity: 0; transform: scale(0)         rotate(-180deg); }
  60%  { opacity: 0.85; transform: scale(1.18)   rotate(10deg); }
  100% { opacity: 0.85; transform: scale(1)      rotate(0); }
}
@keyframes mlMyIn {
  0%   { opacity: 0; transform: translateY(-14px) scale(0.6); }
  60%  { opacity: 1; transform: translateY(2px)   scale(1.06); }
  100% { opacity: 1; transform: none; }
}
@keyframes mlHeartIn {
  0%   { opacity: 0; transform: scale(0)    rotate(-30deg); }
  60%  { opacity: 1; transform: scale(1.18) rotate(8deg); }
  100% { opacity: 1; transform: scale(1)    rotate(0); }
}
@keyframes mlHeartBeat {
  0%, 60%, 100% { transform: scale(1);    }
  10%           { transform: scale(1.20); }
  20%           { transform: scale(0.95); }
  30%           { transform: scale(1.12); }
  40%           { transform: scale(1);    }
}
@keyframes mlBreath {
  0%, 100% { transform: scale(1)    translateY(0);    }
  50%      { transform: scale(1.018) translateY(-2px); }
}

/* ---- sparkles ✦ floating up ---- */
.hero-mark-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-sparkle {
  position: absolute;
  font-size: clamp(0.9rem, 1.6vw, 1.4rem);
  color: var(--gold-2);
  opacity: 0;
  filter: drop-shadow(0 0 6px rgba(230, 190, 138, 0.6));
  animation: heroSparkle 6s ease-in-out infinite;
  will-change: transform, opacity;
}
.hero-sparkle--1 { top: 12%; left: 12%;  animation-delay: 2.0s; }
.hero-sparkle--2 { top: 22%; right: 10%; animation-delay: 3.4s; }
.hero-sparkle--3 { top: 70%; left: 22%;  animation-delay: 4.6s; }
.hero-sparkle--4 { top: 78%; right: 18%; animation-delay: 5.6s; }
@keyframes heroSparkle {
  0%   { opacity: 0;    transform: translateY(0)     rotate(0)    scale(0.7); }
  20%  { opacity: 0.95; }
  40%  { opacity: 0.85; transform: translateY(-18px) rotate(45deg) scale(1.1); }
  70%  { opacity: 0.55; transform: translateY(-32px) rotate(90deg) scale(0.95); }
  100% { opacity: 0;    transform: translateY(-44px) rotate(140deg) scale(0.7); }
}

/* ---- bottom hairline ---- */
.hero-mark-line {
  display: block;
  width: min(620px, 80%);
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(230, 190, 138, 0.55) 50%,
    transparent 100%);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: center;
  animation: hmLineGrow 1.2s var(--ease) 0.55s forwards;
}
@keyframes hmLineGrow {
  0%   { opacity: 0; transform: scaleX(0); }
  100% { opacity: 0.7; transform: scaleX(1); }
}

/* Re-used pulse keyframes — kept in one place so any red heart
   (env-wax, footer heart, vd-heart, env-hint-dot) beats the same. */
@keyframes heartbeat {
  0%, 60%, 100% { transform: scale(1); }
  10%           { transform: scale(1.18); }
  20%           { transform: scale(0.95); }
  30%           { transform: scale(1.12); }
  40%           { transform: scale(1); }
}

.hero-tagline {
  margin: 1.8rem 0 0.6rem;
  font-size: clamp(1.1rem, 1.4vw + 0.4rem, 1.4rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--cream-2);
  opacity: 0.92;
}

.amp-mark {
  font-family: "Great Vibes", cursive;
  font-style: italic;
  font-size: 1.4em;
  color: var(--gold-2);
  text-transform: none;
  letter-spacing: 0;
  margin: 0 0.15em;
  vertical-align: -0.05em;
}

.hero-date {
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin: 0;
  opacity: 0.7;
}
.hero-date span { color: var(--cream); }

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 1px solid rgba(230, 190, 138, 0.45);
  border-radius: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  opacity: 0.6;
  transition: opacity 0.3s var(--ease);
}
.hero-scroll:hover { opacity: 1; }

.hero-scroll .bar {
  display: block;
  width: 2px;
  height: 7px;
  background: var(--gold-2);
  border-radius: 1px;
  animation: scrollDot 1.6s ease-in-out infinite;
}
.hero-scroll .bar:nth-child(2) { animation-delay: 0.15s; }

@keyframes scrollDot {
  0%        { opacity: 0.2; transform: translateY(-3px); }
  40%       { opacity: 1;   transform: translateY(0); }
  80%, 100% { opacity: 0;   transform: translateY(3px); }
}

/* =====================  NAV  ===================== */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem var(--gutter);
  background: rgba(5, 11, 28, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(230, 190, 138, 0.08);
}

.nav-brand {
  font-family: "Great Vibes", cursive;
  font-size: 1.65rem;
  color: var(--gold-2);
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  letter-spacing: 0;
}
.nav-brand .nb-times {
  font-size: 0.62em;
  color: var(--rose);
  transform: translateY(-0.04em);
}
.nav-brand .nb-name { color: var(--gold-2); }

.nav-list {
  list-style: none;
  display: flex;
  gap: 1.8rem;
  margin: 0;
  padding: 0;
}

.nav-list a {
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: 0.75;
  position: relative;
  padding: 0.4rem 0;
  transition: color 0.3s var(--ease);
}
.nav-list a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-2), var(--rose-soft));
  transition: width 0.4s var(--ease);
}
.nav-list a:hover { opacity: 1; color: var(--gold-1); }
.nav-list a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 1px;
  background: var(--gold-2);
  transition: transform 0.3s var(--ease);
}

/* =====================  SECTION SHELL  ===================== */

.section {
  position: relative;
  padding: clamp(5rem, 12vw, 9rem) var(--gutter);
}

.container {
  max-width: var(--max);
  margin: 0 auto;
}

.section-eyebrow {
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin: 0 0 1.2rem;
  opacity: 0.85;
}

.section-title {
  font-family: "Cormorant Garamond", "Noto Serif SC", serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 4.5vw, 4.2rem);
  line-height: 1.15;
  margin: 0 0 1.4rem;
  color: var(--cream);
  letter-spacing: 0.005em;
}

.section-sub,
.section-lede {
  max-width: 36rem;
  margin: 0 auto;
  font-size: clamp(1.05rem, 0.6vw + 0.9rem, 1.2rem);
  color: var(--cream-2);
  opacity: 0.78;
}

/* =====================  STORY  ===================== */

.story {
  background: linear-gradient(180deg, var(--ink-deep) 0%, var(--ink) 100%);
  text-align: center;
}

.section-lede {
  margin-bottom: 3.2rem;
  font-style: italic;
  font-size: clamp(1.25rem, 1.4vw + 0.5rem, 1.55rem);
  line-height: 1.55;
}

.story-body {
  max-width: 36rem;
  margin: 0 auto;
  font-size: clamp(1.1rem, 0.7vw + 0.9rem, 1.3rem);
  line-height: 2;
  color: var(--cream);
  opacity: 0.92;
}
.story-body p {
  margin: 0.4rem 0;
}

.story-cta {
  margin-top: 2.6rem !important;
  font-family: "Great Vibes", cursive;
  font-size: clamp(1.6rem, 2vw + 0.5rem, 2.2rem) !important;
  color: var(--gold-2) !important;
  opacity: 1 !important;
  line-height: 1.5 !important;
}

/* =====================  TIMELINE  ===================== */

.timeline {
  background: var(--ink);
  text-align: center;
}

.timeline-list {
  list-style: none;
  margin: 5rem auto 0;
  padding: 0;
  position: relative;
  max-width: 56rem;
}

.timeline-list::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(230, 190, 138, 0.45) 8%,
    rgba(230, 190, 138, 0.45) 92%,
    transparent 100%);
  transform: translateX(-50%);
}

.t-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0;
  margin: 2.6rem 0;
}

.t-dot {
  grid-column: 2;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold-2);
  box-shadow: 0 0 0 4px var(--ink), 0 0 0 5px rgba(230, 190, 138, 0.5), 0 0 24px rgba(230, 190, 138, 0.5);
  justify-self: center;
}

.t-dot--heart {
  background: var(--rose);
  width: 22px;
  height: 22px;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 5px var(--ink), 0 0 0 6px rgba(176, 48, 74, 0.4), 0 0 30px rgba(176, 48, 74, 0.6);
  animation: heartbeat 2s ease-in-out infinite;
}
.t-dot--heart svg { width: 12px; height: 12px; fill: currentColor; }

.t-card {
  grid-column: 1;
  text-align: right;
  padding: 0 2.5rem 0 0;
}

.t-item:nth-child(even) .t-card {
  grid-column: 3;
  text-align: left;
  padding: 0 0 0 2.5rem;
}

.t-card--last {
  background: linear-gradient(135deg, rgba(176, 48, 74, 0.08), rgba(230, 190, 138, 0.06));
  border: 1px solid rgba(230, 190, 138, 0.18);
  border-radius: 6px;
  padding: 1.2rem 1.8rem;
  text-align: left;
}

.t-date {
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin: 0 0 0.35rem;
  opacity: 0.85;
}

.t-title {
  font-family: "Cormorant Garamond", "Noto Serif SC", serif;
  font-weight: 500;
  font-size: 1.45rem;
  margin: 0 0 0.4rem;
  color: var(--cream);
  letter-spacing: 0.01em;
}

.t-text {
  margin: 0;
  color: var(--cream);
  opacity: 0.78;
  font-size: 1rem;
  line-height: 1.65;
}

/* =====================  VOWS  ===================== */

.vows {
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-deep) 100%);
  text-align: center;
}

.vows-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2.5rem;
  align-items: stretch;
  margin-top: 4rem;
}

.vow-card {
  background: linear-gradient(155deg, rgba(35, 56, 95, 0.4), rgba(11, 22, 50, 0.7));
  border: 1px solid rgba(230, 190, 138, 0.18);
  border-radius: 8px;
  padding: 2.4rem 1.8rem;
  text-align: left;
  position: relative;
}

.vow-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(230, 190, 138, 0.08);
  border-radius: 4px;
  pointer-events: none;
}

.vow-by {
  font-family: "Great Vibes", cursive;
  font-size: 1.5rem;
  color: var(--gold-2);
  margin: 0 0 1.2rem;
}

.vow-card blockquote {
  margin: 0 0 1.4rem;
  padding: 0;
  font-style: italic;
  line-height: 1.85;
  color: var(--cream);
  font-size: 1.05rem;
}
.vow-card blockquote p { margin: 0.4rem 0; }

.vow-sign {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: var(--gold-2);
  margin: 0;
  text-align: right;
}

.vow-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}
.vd-line {
  width: 1px;
  flex: 1;
  background: linear-gradient(180deg,
    transparent,
    rgba(230, 190, 138, 0.5),
    transparent);
}
.vd-heart {
  display: inline-block;
  width: 1.2rem;
  height: 1.2rem;
  color: var(--rose);
  vertical-align: -0.18em;
  animation: heartbeat 2.4s ease-in-out infinite;
}

/* =====================  GALLERY  ===================== */

.gallery {
  background: var(--ink-deep);
  text-align: center;
}

.gallery-grid {
  margin: 4rem auto 2rem;
  max-width: 64rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.g-cell {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 6px;
  background: var(--ink-2);
  aspect-ratio: 1 / 1;
  cursor: pointer;
}
.g-cell .ph {
  position: absolute;
  inset: 0;
  transition: transform 1.2s var(--ease);
}
.g-cell:hover .ph { transform: scale(1.06); }

.g-cell figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.4rem 1rem 0.9rem;
  font-family: "Cormorant Garamond", "Noto Serif SC", serif;
  font-style: italic;
  font-size: 0.95rem;
  text-align: left;
  color: var(--cream);
  background: linear-gradient(180deg, transparent, rgba(5, 11, 28, 0.85));
  z-index: 2;
}

.g-cell::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  transition: border-color 0.5s var(--ease);
  z-index: 3;
}
.g-cell:hover::after { border-color: rgba(230, 190, 138, 0.35); }

/* placeholder gradients simulating warm photo tones */
.ph-1 { background: linear-gradient(135deg, #d2a679 0%, #8a5a3b 60%, #4a2c1a 100%); }
.ph-2 { background: linear-gradient(160deg, #e8b481 0%, #c87650 50%, #4d2a3e 100%); }
.ph-3 { background: linear-gradient(135deg, #c7956d 0%, #8e5a3f 50%, #2a1f3a 100%); }
.ph-4 { background: linear-gradient(135deg, #eec99a 0%, #b87a5b 55%, #6b3a4c 100%); }
.ph-5 { background: linear-gradient(135deg, #f0d5a3 0%, #b08560 60%, #2e2237 100%); }
.ph-6 { background: linear-gradient(135deg, #d8a373 0%, #9c6347 50%, #3b2a3a 100%); }

.gallery-hint {
  max-width: 36rem;
  margin: 2rem auto 0;
  font-size: 0.85rem;
  color: var(--cream);
  opacity: 0.5;
}
.gallery-hint code {
  font-family: "Inter", monospace;
  background: rgba(230, 190, 138, 0.08);
  padding: 0.1em 0.4em;
  border-radius: 3px;
  color: var(--gold-2);
  font-size: 0.85em;
}

/* =====================  WISHES  ===================== */

.wishes {
  background: linear-gradient(180deg, var(--ink-deep) 0%, var(--ink) 100%);
  text-align: center;
}

.wishes-form {
  max-width: 36rem;
  margin: 4rem auto 0;
  text-align: left;
  display: grid;
  gap: 1.4rem;
}

.wishes-form label {
  display: block;
}

.wishes-form span {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin-bottom: 0.6rem;
  opacity: 0.85;
}

.wishes-form input,
.wishes-form textarea {
  width: 100%;
  font-family: "Cormorant Garamond", "Noto Serif SC", serif;
  font-size: 1.1rem;
  background: rgba(35, 56, 95, 0.2);
  border: 1px solid rgba(230, 190, 138, 0.18);
  border-radius: 4px;
  padding: 0.85rem 1rem;
  color: var(--cream);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.wishes-form input:focus,
.wishes-form textarea:focus {
  outline: none;
  border-color: var(--gold-2);
  background: rgba(35, 56, 95, 0.4);
}
.wishes-form textarea { resize: vertical; min-height: 7rem; line-height: 1.6; }

.wishes-form button {
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  padding: 0.95rem 1.6rem;
  background: linear-gradient(135deg, var(--gold-2), var(--gold-4));
  color: var(--ink-deep);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.wishes-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -8px rgba(230, 190, 138, 0.55);
}
/* NB: `.wishes-form span` (0,1,1) out-specifies `.btn-heart` (0,1,0) and
   would repaint the heart gold + block it, so this selector is deliberately
   scoped to `.wishes-form button` and resets the inherited label styles. */
.wishes-form button .btn-heart {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--rose);
  vertical-align: -0.12em;
}
.wishes-form button .btn-heart svg { width: 100%; height: 100%; fill: currentColor; }
.wishes-status {
  margin: 0;
  text-align: center;
  font-family: "Great Vibes", cursive;
  font-size: 1.3rem;
  color: var(--gold-2);
  min-height: 1.5rem;
}

/* Error / offline notices are longer than a greeting, and Great Vibes has no
   Chinese coverage — they get a legible face instead. */
.wishes-status.is-note {
  font-family: "Inter", "Noto Serif SC", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  line-height: 1.6;
  color: var(--gold-3);
}

/* ---------- the wall: every wish the couple has received ---------- */
.wishes-wall {
  margin-top: 3.5rem;
}
.wishes-wall-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.8rem;
}
.wishes-count {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-2);
  opacity: 0.82;
}
.wishes-count[data-state="offline"] {
  color: var(--gold-3);
  opacity: 0.7;
}
.wishes-refresh {
  font-family: "Inter", sans-serif;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-2);
  background: transparent;
  border: 1px solid rgba(230, 190, 138, 0.32);
  border-radius: 999px;
  padding: 0.34rem 0.95rem;
  cursor: pointer;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease),
              background 0.3s var(--ease);
}
.wishes-refresh:hover {
  color: var(--gold-1);
  border-color: rgba(230, 190, 138, 0.7);
  background: rgba(230, 190, 138, 0.06);
}
.wishes-refresh:disabled {
  opacity: 0.4;
  cursor: default;
}
.wishes-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1rem;
  text-align: left;
  /* each card keeps its own height instead of stretching to the tallest in
     the row — a one-line wish should not inherit a paragraph's height */
  align-items: start;
}
.wish-card {
  position: relative;
  padding: 1.15rem 1.25rem 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(230, 190, 138, 0.16);
  border-radius: 2px;
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease),
              box-shadow 0.35s var(--ease);
}
.wish-card:hover {
  border-color: rgba(230, 190, 138, 0.42);
  transform: translateY(-3px);
  box-shadow: 0 14px 34px -18px rgba(0, 0, 0, 0.9);
}
.wish-card__msg {
  margin: 0 0 0.85rem;
  font-family: "Cormorant Garamond", "Noto Serif SC", serif;
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--cream);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.wish-card__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  font-family: "Inter", sans-serif;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-3);
}
.wish-card__name {
  color: var(--gold-2);
}
.wish-card__name::before {
  content: "— ";
}
.wishes-empty {
  margin: 0;
  text-align: center;
  font-family: "Great Vibes", cursive;
  font-size: 1.25rem;
  color: var(--gold-3);
  opacity: 0.75;
}
.wishes-empty[hidden] {
  display: none;
}

/* =====================  FOOTER  ===================== */

.site-footer {
  background: var(--ink-deep);
  padding: 4.5rem var(--gutter) 3rem;
  text-align: center;
  border-top: 1px solid rgba(230, 190, 138, 0.1);
}

.footer-mono {
  font-family: "Great Vibes", cursive;
  font-size: clamp(3rem, 7vw, 5.5rem);
  margin: 0 0 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.15em;
  background: linear-gradient(180deg, var(--gold-1), var(--gold-3));
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}
.fh-times {
  font-size: 0.6em;
  -webkit-text-fill-color: var(--rose) !important;
  background: none !important;
  animation: heartbeat 2.4s ease-in-out infinite;
  padding-bottom: 0.3em;
}

.vd-heart svg { width: 100%; height: 100%; fill: currentColor; }

.footer-line {
  margin: 0 0 0.7rem;
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: 0.65;
}

.footer-meta {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-2);
  opacity: 0.55;
}
.footer-meta a { color: inherit; }

/* =====================  RESPONSIVE  ===================== */

@media (max-width: 880px) {
  .nav-list {
    position: absolute;
    inset: 100% 0 auto 0;
    background: rgba(5, 11, 28, 0.96);
    backdrop-filter: blur(14px);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem var(--gutter) 1rem;
    max-height: 0;
    overflow: hidden;
    border-bottom: 1px solid transparent;
    transition: max-height 0.4s var(--ease), border-color 0.4s var(--ease);
  }
  .site-nav.nav-open .nav-list {
    max-height: 22rem;
    border-bottom-color: rgba(230, 190, 138, 0.18);
  }
  .nav-list li {
    border-top: 1px solid rgba(230, 190, 138, 0.08);
  }
  .nav-list a {
    display: block;
    padding: 0.85rem 0;
  }
  .nav-toggle {
    display: flex;
  }
  .site-nav.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  .site-nav.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }
  .site-nav.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .vows-grid {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }
  .vow-divider {
    flex-direction: row;
    width: 60%;
    margin: 0 auto;
  }
  .vd-line {
    width: auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-2), transparent);
  }
}

@media (max-width: 640px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline-list::before { left: 22px; }
  .t-item { grid-template-columns: 36px 1fr; }
  .t-item .t-dot { grid-column: 1; }
  .t-card {
    grid-column: 2 !important;
    text-align: left !important;
    padding: 0 0 0 1.2rem !important;
  }
  .t-card--last { padding: 1rem 1.1rem !important; }
}

@media (max-width: 480px) {
  .hero-frame { padding-top: 2rem; }
  .hero-monogram-svg { max-height: 40vh; }
  .hero-mark-line { width: 80%; }
}

/* =====================  SIGN / 印记  ===================== */

.sign {
  position: relative;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 50% at 50% 50%, rgba(35, 56, 95, 0.45) 0%, transparent 70%),
    linear-gradient(180deg, var(--ink) 0%, var(--ink) 100%);
  overflow: hidden;
}

.sign::before,
.sign::after {
  content: "";
  display: block;
  width: 60%;
  max-width: 22rem;
  height: 1px;
  margin: 0 auto;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(230, 190, 138, 0.55) 50%,
    transparent 100%);
}
.sign::before { margin-bottom: 4rem; }
.sign::after  { margin-top: 4rem; }

/* 整节贯通的微噪点纹理 */
.sign::after { position: relative; }
.sign > .container { position: relative; z-index: 1; }

.sign-stage {
  position: relative;
  margin: 3.5rem auto 0;
  width: min(720px, 88vw);
  aspect-ratio: 3 / 1;
  display: grid;
  place-items: center;
  perspective: 1000px;
}

.sign-glow {
  position: absolute;
  inset: -25%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(230, 190, 138, 0.22) 0%, transparent 55%),
    radial-gradient(circle at 30% 70%, rgba(176, 48, 74, 0.14) 0%, transparent 50%);
  filter: blur(40px);
  z-index: 0;
  pointer-events: none;
  animation: signGlow 7s ease-in-out infinite alternate;
}

.sign-glow--alt {
  inset: -35%;
  background:
    radial-gradient(circle at 65% 35%, rgba(176, 48, 74, 0.16) 0%, transparent 60%),
    radial-gradient(circle at 20% 80%, rgba(230, 190, 138, 0.12) 0%, transparent 55%);
  filter: blur(60px);
  animation: signGlowAlt 9s ease-in-out infinite alternate;
  opacity: 0.85;
  mix-blend-mode: screen;
}

@keyframes signGlow {
  0%   { transform: scale(1)    rotate(0deg);  opacity: 0.85; }
  100% { transform: scale(1.10) rotate(8deg);  opacity: 1;    }
}
@keyframes signGlowAlt {
  0%   { transform: scale(1.05) rotate(-6deg); opacity: 0.65; }
  100% { transform: scale(0.95) rotate(10deg); opacity: 1;    }
}

/* ---------- envelope card ---------- */

.sign-card--envelope {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 3.6rem 1.8rem 1.2rem;
  width: min(640px, 92vw);
  border-radius: 6px;
  background:
    linear-gradient(165deg, rgba(14, 24, 54, 0.96), rgba(7, 12, 32, 0.96));
  box-shadow:
    0 32px 80px -25px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(230, 190, 138, 0.22),
    inset 0 0 0 1px rgba(176, 48, 74, 0.08);
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
  animation: signBreath 5.5s ease-in-out infinite;
  overflow: visible;
  cursor: pointer;
}

.sign-card--envelope:focus-visible {
  outline: 2px solid var(--gold-2);
  outline-offset: 6px;
}

.sign-card--envelope:hover {
  box-shadow:
    0 50px 110px -20px rgba(230, 190, 138, 0.32),
    0 0 0 1px rgba(230, 190, 138, 0.4),
    inset 0 0 0 1px rgba(176, 48, 74, 0.16);
}

/* 顶部翻盖：高度锁在 padding-top 区域内，不压 PNG */
.env-flap {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3.6rem;
  background:
    linear-gradient(180deg,
      rgba(176, 48, 74, 0.62) 0%,
      rgba(138, 33, 53, 0.38) 55%,
      rgba(176, 48, 74, 0.0) 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

/* 翻盖的对角折痕（强化信封感）*/
.env-flap::before,
.env-flap::after {
  content: "";
  position: absolute;
  top: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, rgba(247, 227, 189, 0.45), transparent 80%);
  opacity: 0.65;
}
.env-flap::before { left: 0; transform: skewX(28deg); transform-origin: top left; }
.env-flap::after  { right: 0; transform: skewX(-28deg); transform-origin: top right; }

/* 翻盖打开：hover 时角度变化（轻微抬升）*/
.sign-card--envelope:hover .env-flap {
  transform: translateY(-4px) rotateX(-3deg);
  transform-origin: top center;
  transition: transform 0.8s var(--ease);
}

/* 封蜡红心：缩到 56px，控制在翻盖 padding-top 区域内，不压 PNG */
.env-wax {
  position: absolute;
  top: 1.4rem;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #e85c7a 0%, var(--rose) 45%, #5d1422 100%);
  display: grid;
  place-items: center;
  color: #ffe9c4;
  font-size: 1.4rem;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.55),
    inset 0 -3px 8px rgba(0, 0, 0, 0.45),
    inset 0 2px 4px rgba(255, 220, 180, 0.45);
  z-index: 5;
  animation: heartbeat 2.6s ease-in-out infinite;
}

.env-wax::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 70%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  opacity: 0.85;
}

/* 邮戳：右上角，紧贴在卡片最上沿，不再悬空 */
.env-stamp {
  position: absolute;
  top: 0.6rem;
  right: 0.8rem;
  width: 78px;
  height: 78px;
  border: 1.5px dashed rgba(230, 190, 138, 0.55);
  border-radius: 50%;
  z-index: 6;
  transform: rotate(-14deg);
  color: var(--gold-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: "Inter", sans-serif;
  font-size: 0.5rem;
  letter-spacing: 0.22em;
  opacity: 0.85;
  background: rgba(5, 11, 28, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  text-align: center;
  line-height: 1.2;
  padding: 0.3rem;
}
.env-stamp .stamp-ring {
  display: block;
  font-weight: 500;
  text-transform: uppercase;
}
.env-stamp .stamp-heart {
  display: block;
  font-family: "Great Vibes", cursive;
  font-size: 1.1rem;
  margin: 0.05rem 0;
  color: var(--rose);
}
.env-stamp .stamp-date {
  display: block;
  font-size: 0.42rem;
  letter-spacing: 0.18em;
  opacity: 0.9;
}

/* 信纸（PNG 容器）：横向矩形 + PNG 顶端对齐 inner 顶 + 透明底色让 PNG 透明区透出信封 */
.sign-card--envelope .sign-card-inner {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(230, 190, 138, 0.10);
  aspect-ratio: 16 / 8;
  display: grid;
  place-items: center;
}

.sign-card--envelope .sign-card-inner > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;   /* PNG 顶到 inner 顶部 */
  border-radius: 4px;
  user-select: none;
  -webkit-user-drag: none;
}

/* ---------- envelope hint: 提示可拆开 ---------- */
.env-hint {
  position: absolute;
  bottom: 6%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.45rem 0.95rem;
  background: rgba(5, 11, 28, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(230, 190, 138, 0.35);
  border-radius: 100px;
  font-family: "Inter", sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-2);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  pointer-events: none;
  white-space: nowrap;
  animation: envHintPulse 2.4s ease-in-out infinite;
}

.env-hint-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 8px rgba(176, 48, 74, 0.7);
  animation: heartbeat 1.6s ease-in-out infinite;
}

.env-hint-arrow {
  display: inline-block;
  animation: envHintArrow 1.6s ease-in-out infinite;
}

@keyframes envHintPulse {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1;   }
}
@keyframes envHintArrow {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(2px, -2px); }
}

.sign-card--envelope:hover .env-hint {
  background: rgba(176, 48, 74, 0.85);
  color: var(--cream);
  border-color: rgba(247, 227, 189, 0.5);
  transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
}

/* ---------- letter modal ---------- */
.letter-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.5s var(--ease), visibility 0s linear 0.5s;
}
.letter-modal.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.5s var(--ease), visibility 0s linear 0s;
}

.lm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 11, 28, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  cursor: zoom-out;
}

.lm-card {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: min(880px, 90vw);
  max-height: 90vh;
  padding: 1.4rem 1.4rem 1.6rem;
  background:
    linear-gradient(155deg, rgba(14, 24, 54, 0.96), rgba(7, 12, 32, 0.96));
  border: 1px solid rgba(230, 190, 138, 0.32);
  border-radius: 10px;
  box-shadow:
    0 60px 140px rgba(0, 0, 0, 0.65),
    inset 0 0 0 1px rgba(176, 48, 74, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  transform: translateY(24px) scale(0.96);
  transition: transform 0.55s var(--ease);
}
.letter-modal.is-open .lm-card {
  transform: none;
}

.lm-image {
  display: block;
  max-width: min(820px, 84vw);
  max-height: 68vh;
  width: auto;
  height: auto;
  border-radius: 4px;
  object-fit: contain;
  background: #0a1430;
  box-shadow: inset 0 0 0 1px rgba(230, 190, 138, 0.12);
}

.lm-caption {
  margin: 0;
  font-family: "Great Vibes", cursive;
  font-size: clamp(1.4rem, 2vw + 0.4rem, 1.9rem);
  color: var(--gold-2);
  text-align: center;
  line-height: 1.4;
  max-width: 40rem;
}

.lm-close {
  position: absolute;
  top: -2rem;
  right: -0.5rem;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(230, 190, 138, 0.5);
  background: rgba(5, 11, 28, 0.85);
  color: var(--gold-2);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background 0.3s var(--ease), transform 0.4s var(--ease), color 0.3s var(--ease);
}
.lm-close:hover,
.lm-close:focus-visible {
  background: rgba(176, 48, 74, 0.6);
  color: var(--cream);
  transform: rotate(90deg);
  outline: none;
}

.sign-cap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 0.85rem;
  padding: 0 0.5rem;
}

.cap-line {
  flex: 1;
  max-width: 5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(230, 190, 138, 0.6), transparent);
}

.cap-text {
  font-family: "Cormorant Garamond", "Noto Serif SC", serif;
  font-style: italic;
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-2);
  opacity: 0.7;
  white-space: nowrap;
}

@keyframes signBreath {
  0%, 100% { transform: scale(1)      translateY(0); }
  50%      { transform: scale(1.012)  translateY(-4px); }
}

/* sparkle drift */
.sign-sparkle {
  position: absolute;
  font-size: 0.85rem;
  color: var(--gold-2);
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(230, 190, 138, 0.6));
}
.sign-sparkle--1 { top: 8%; left: 6%;   animation: sparkle 4.5s ease-in-out infinite; }
.sign-sparkle--2 { top: 18%; right: 10%; animation: sparkle 5.5s ease-in-out 1.2s infinite; }
.sign-sparkle--3 { bottom: 14%; left: 14%; animation: sparkle 6.5s ease-in-out 0.6s infinite; }

@keyframes sparkle {
  0%, 100% { opacity: 0; transform: translateY(0)    scale(0.8); }
  50%      { opacity: 0.85; transform: translateY(-12px) scale(1.1); }
}

.sign-quote {
  margin: 2.5rem auto 0;
  max-width: 32rem;
  font-family: "Great Vibes", cursive;
  font-size: clamp(1.4rem, 2vw + 0.4rem, 2rem);
  color: var(--gold-2);
  line-height: 1.55;
  opacity: 0.92;
}

@media (max-width: 640px) {
  .sign-stage {
    aspect-ratio: 5 / 2;
  }
  .sign-card--envelope { padding: 3.2rem 1.2rem 1.2rem; }
  .sign-card--envelope .sign-card-inner { aspect-ratio: 16 / 9; }
  .env-flap { height: 3.2rem; }
  .env-stamp { width: 64px; height: 64px; top: 0.5rem; right: 0.6rem; }
  .env-wax { width: 48px; height: 48px; font-size: 1.2rem; top: 1.2rem; }
  .env-hint { font-size: 0.55rem; padding: 0.4rem 0.8rem; }
  .sign::before { margin-bottom: 3rem; }
  .sign::after  { margin-top: 3rem; }
  .cap-line { max-width: 2.5rem; }
}

/* =====================  STATIC MODE  =====================
   ?static=1 pins the finished state and drops all entrance motion.

   Why this exists: every entrance animation in this file starts at opacity 0,
   and an animation whose clock never advances is indistinguishable from one
   stuck on its first frame. A renderer that stops advancing the animation
   clock — an embedded preview panel, an occluded or frozen tab, some
   embedded webviews — therefore shows a permanently blank hero, even though
   the markup and the CSS are perfectly fine.

   Static mode is the floor: the page is always readable, with or without
   motion. script.js also switches to it automatically when it detects that
   the clock never ran, so a real browser never needs the query parameter. */
html.static .hero-monogram-svg {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
  filter: drop-shadow(0 14px 50px rgba(232, 180, 120, 0.20)) !important;
}
html.static .hero-monogram-svg > g {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}
html.static .ml-clover { animation: none !important; }
html.static .hero-frame {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}
html.static .hero-mark-line {
  animation: none !important;
  opacity: 0.7 !important;
  transform: scaleX(1) !important;
}
html.static .reveal {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}
html.static .hero-sparkle {
  animation: none !important;
  opacity: 0.55 !important;
}
html.static .sign-sparkle {
  animation: none !important;
  opacity: 0.55 !important;
}
html.static .hero-scroll .bar {
  animation: none !important;
  opacity: 0.8 !important;
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
  .reveal { opacity: 1; transform: none; }
  .sign-card,
  .sign-glow,
  .sign-glow--alt,
  .sign-sparkle { animation: none !important; }
}




/* ---------- gallery: real photos + lightbox ---------- */
.g-cell > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.2s var(--ease), opacity 0.6s var(--ease);
}
.g-cell:hover > img { transform: scale(1.06); }
.g-cell--photo .ph { opacity: 0; }
.g-cell--photo { cursor: zoom-in; }
.g-cell--photo:focus-visible {
  outline: 1px solid rgba(230, 190, 138, 0.55);
  outline-offset: 3px;
}

.gl-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.5s var(--ease), visibility 0s linear 0.5s;
}
.gl-modal.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.5s var(--ease), visibility 0s linear 0s;
}
.gl-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 11, 28, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  cursor: zoom-out;
}
.gl-card {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: min(920px, 92vw);
  max-height: 92vh;
  padding: 1.2rem 1.2rem 1.4rem;
  background: linear-gradient(155deg, rgba(14, 24, 54, 0.97), rgba(7, 12, 32, 0.97));
  border: 1px solid rgba(230, 190, 138, 0.3);
  border-radius: 10px;
  box-shadow: 0 60px 140px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.5s var(--ease);
}
.gl-modal.is-open .gl-card { transform: none; }
.gl-image {
  display: block;
  max-width: min(860px, 86vw);
  max-height: 72vh;
  width: auto;
  height: auto;
  border-radius: 4px;
  object-fit: contain;
  box-shadow: inset 0 0 0 1px rgba(230, 190, 138, 0.12);
}
.gl-caption {
  margin: 0;
  font-family: "Cormorant Garamond", "Noto Serif SC", serif;
  font-style: italic;
  font-size: clamp(1rem, 1.2vw + 0.6rem, 1.25rem);
  color: var(--gold-2);
  text-align: center;
}
.gl-close {
  position: absolute;
  top: 0.5rem;
  right: 0.7rem;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--cream);
  background: rgba(230, 190, 138, 0.1);
  border: 1px solid rgba(230, 190, 138, 0.32);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
}
.gl-close:hover,
.gl-close:focus-visible {
  background: rgba(230, 190, 138, 0.22);
  border-color: rgba(230, 190, 138, 0.6);
}
