/* ════════════════════════════════════════════════════
   NishKiNishaani · Full-Screen Card Deck
   7 cards · Distinct palettes · Cinematic reveals
   ════════════════════════════════════════════════════ */

/* ── Tokens ───────────────────────────────────────── */
:root {
  --gold:        #c9a84c;
  --gold-lt:     #e0c878;
  --gold-dk:     #9a7232;
  --gold-pale:   rgba(201,168,76,0.22);

  --ff-serif:    'Cormorant Garamond', Georgia, serif;
  --ff-script:   'Pinyon Script', cursive;
  --ff-sans:     'DM Sans', 'Helvetica Neue', sans-serif;

  /* Nav dot accent follows card theme — updated via JS */
  --dot-active:  #c9a84c;
}

/* ── Reset ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  background: #1a0c10; /* shows in gaps when rounded cards peek/slide */
  /* Reduce pinch / double-tap zoom on mobile (not 100% enforceable) */
  touch-action: pan-x pan-y;
  -ms-touch-action: pan-x pan-y;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font: inherit; padding: 0; }
[hidden] { display: none !important; }


/* ════════════════════════════════════════════════════
   CARD BASE  —  full-screen fixed panels
   ════════════════════════════════════════════════════ */
.card {
  position: fixed;
  inset: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;

  /* Transform only — no border-radius transition on the stack
     (rounding is animation-only on the departing card) */
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.card[data-pos="0"] {
  z-index: 10;
  transform: none;
  opacity: 1;
  pointer-events: all;
  border-radius: 0;
}
.card[data-pos="1"] {
  z-index: 9;
  /* Full-size under the front card — no shrink, no round */
  transform: none;
  opacity: 1;
  pointer-events: none;
  border-radius: 0 !important;
}
.card[data-pos="2"] {
  z-index: 8;
  transform: none;
  opacity: 1;
  pointer-events: none;
  border-radius: 0 !important;
}
.card:not([data-pos="0"]):not([data-pos="1"]):not([data-pos="2"]) {
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transition: none;
  border-radius: 0 !important;
}

/* Scrubbing: instant transform follow, no CSS transition fighting the gesture */
.card.is-scrubbing {
  transition: none !important;
  will-change: transform, border-radius, opacity;
}

/* Departing card only (legacy keyframes unused by scrub — kept as fallback) */
.card.is-flying-out {
  z-index: 11 !important;
  pointer-events: none;
  animation: flyOut 0.58s cubic-bezier(0.4, 0, 0.7, 0.2) forwards;
}
@keyframes flyOut {
  0% {
    transform: translateX(0) rotate(0deg);
    border-radius: 0;
  }
  100% {
    transform: translateX(105%) rotate(14deg);
    border-radius: 28px;
  }
}
.card.no-transition { transition: none !important; }


/* ── Shared body container ───────────────────────── */
.c-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  height: 100%;
  padding: clamp(48px, 8vh, 96px) clamp(28px, 6vw, 80px);
}

/* Shared label (eyebrow caps) */
.c-label-shared {
  font-family: var(--ff-sans);
  font-size: clamp(0.5rem, 1.1vw, 0.62rem);
  font-weight: 300;
  letter-spacing: 0.55em;
  text-transform: uppercase;
}

/* Gold shimmer — shared by script text on dark cards */
.gold-shimmer {
  background: linear-gradient(
    130deg,
    #8a6218 0%, #c9a84c 25%,
    #f0d870 47%, #fffacc 52%, #f0d870 57%,
    #c9a84c 73%, #8a6218 100%
  );
  background-size: 240% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: goldFlow 8s linear infinite;
}
@keyframes goldFlow {
  from { background-position: 0% center; }
  to   { background-position: 240% center; }
}


/* ════════════════════════════════════════════════════
   CARD 1 — YOU ARE INVITED
   Warm parchment with subtle dot texture.
   Decorative frame corners + gold rule + hashtag.
   ════════════════════════════════════════════════════ */
[data-theme="invite"] {
  /* Very subtle gold dot grid — like fine stationery paper */
  background:
    radial-gradient(circle, rgba(155,110,50,0.09) 1px, transparent 1px) 0 0 / 22px 22px,
    #f4e8d4;
}

/* ── Inset decorative frame with corner L-brackets ── */
.ci-frame {
  position: absolute;
  inset: clamp(16px, 4vmin, 32px);
  pointer-events: none;
  z-index: 1;
  /* 8 gradients = 4 corners × 2 lines (horizontal + vertical) each */
  background:
    /* top-left */
    linear-gradient(to right,  rgba(155,110,50,0.55) 100%, transparent) top    left  / 28px 1px  no-repeat,
    linear-gradient(to bottom, rgba(155,110,50,0.55) 100%, transparent) top    left  / 1px  28px no-repeat,
    /* top-right */
    linear-gradient(to left,   rgba(155,110,50,0.55) 100%, transparent) top    right / 28px 1px  no-repeat,
    linear-gradient(to bottom, rgba(155,110,50,0.55) 100%, transparent) top    right / 1px  28px no-repeat,
    /* bottom-left */
    linear-gradient(to right,  rgba(155,110,50,0.55) 100%, transparent) bottom left  / 28px 1px  no-repeat,
    linear-gradient(to top,    rgba(155,110,50,0.55) 100%, transparent) bottom left  / 1px  28px no-repeat,
    /* bottom-right */
    linear-gradient(to left,   rgba(155,110,50,0.55) 100%, transparent) bottom right / 28px 1px  no-repeat,
    linear-gradient(to top,    rgba(155,110,50,0.55) 100%, transparent) bottom right / 1px  28px no-repeat;
}

.ci-body {
  gap: clamp(8px, 2vh, 20px);
}
.ci-monogram {
  width: min(270px, 58vmin);
  height: min(270px, 58vmin);
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 22px rgba(90, 40, 10, 0.18));
}
[data-r="sc"].ci-monogram {
  transition-duration: 1.3s;
  transition-timing-function: cubic-bezier(0.15, 0.85, 0.35, 1);
}

/* ── Gold rule divider ── */
.ci-rule {
  width: clamp(48px, 14vw, 100px);
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(155,110,50,0.7) 25%, rgba(155,110,50,0.7) 75%, transparent);
  margin: 0 auto;
  /* wipe reveal uses clip-path in the [data-r="wipe"] rule */
}

.ci-hero {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: clamp(1.5rem, 4.5vw, 2.8rem);
  font-weight: 300;
  color: #2c1508;
  letter-spacing: 0.04em;
}

/* ── Hashtag pinned to bottom of invite card ── */
.ci-tag {
  position: absolute;
  bottom: clamp(28px, 5.5vh, 52px);
  left: 0;
  right: 0;
  text-align: center;
  z-index: 3;
  font-family: var(--ff-script);
  font-size: clamp(1.25rem, 4vw, 1.85rem);
  color: rgba(120, 78, 22, 0.88);
  letter-spacing: 0.01em;
  text-shadow: 0 0 18px rgba(244,232,212,0.9), 0 1px 0 rgba(244,232,212,0.6);
  white-space: nowrap;
}

/* Swipe hint removed */


/* ════════════════════════════════════════════════════
   CARD 2 — NAMES  ·  Floral corners + falling petals
   ════════════════════════════════════════════════════ */
[data-theme="names"] {
  background:
    radial-gradient(ellipse 75% 60% at 50% 42%,
      rgba(160, 48, 72, 0.55) 0%,
      rgba(90, 22, 42, 0.35) 55%,
      transparent 75%),
    linear-gradient(160deg, #5c1a2e 0%, #4a1526 45%, #3d1220 100%);
}

/* Floral corner ornaments — opposite corners */
.cn-corner {
  position: absolute;
  width: min(280px, 48vw);
  height: auto;
  pointer-events: none;
  z-index: 1;
  opacity: 0.92;
}
.cn-corner--tl {
  top: 0;
  left: 0;
}
.cn-corner--br {
  bottom: 0;
  right: 0;
  transform: rotate(180deg);
}

.cn-body {
  gap: clamp(8px, 1.5vh, 16px);
  position: relative;
  z-index: 2;
  padding-inline: clamp(36px, 10vw, 88px);
  padding-block: clamp(56px, 10vh, 100px);
}

/* Clean vintage half-rules — longer, double hairline, mid ticks, end diamonds.
   Anchored to floral corners. Simple geometry, more designed. */
.cn-flourishes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.cn-fl {
  position: absolute;
  display: block;
  pointer-events: none;
}

/* ── Horizontal arms ── */
.cn-fl--tl-h,
.cn-fl--br-h {
  height: 18px;
  width: min(300px, 52vw);
  background:
    /* centre gem */
    radial-gradient(circle at 50% 50%, rgba(255,245,210,0.95) 0 1.5px, transparent 2.2px),
    /* centre diamond ring */
    linear-gradient(45deg, transparent 40%, rgba(212,180,90,0.85) 40%, rgba(212,180,90,0.85) 60%, transparent 60%)
      center / 9px 9px no-repeat,
    /* main tapered spine */
    linear-gradient(90deg,
      transparent 0%,
      rgba(201,168,76,0.18) 8%,
      rgba(201,168,76,0.55) 26%,
      rgba(232,210,150,0.95) 48%,
      rgba(232,210,150,0.95) 52%,
      rgba(201,168,76,0.55) 74%,
      rgba(201,168,76,0.18) 92%,
      transparent 100%) center / 100% 1.4px no-repeat,
    /* secondary parallel hairline */
    linear-gradient(90deg,
      transparent 0%,
      rgba(201,168,76,0.22) 14%,
      rgba(201,168,76,0.38) 50%,
      rgba(201,168,76,0.22) 86%,
      transparent 100%) center 62% / 100% 1px no-repeat;
}
/* End diamonds */
.cn-fl--tl-h::before,
.cn-fl--tl-h::after,
.cn-fl--br-h::before,
.cn-fl--br-h::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  border: 1px solid rgba(212,180,90,0.85);
  background: rgba(74,21,38,0.95);
  transform: translateY(-50%) rotate(45deg);
}
.cn-fl--tl-h::before,
.cn-fl--br-h::before { left: 3%; }
.cn-fl--tl-h::after,
.cn-fl--br-h::after  { right: 3%; }

/* Mid ticks on horizontal */
.cn-fl--tl-h .cn-fl__tick,
.cn-fl--br-h .cn-fl__tick {
  position: absolute;
  top: 50%;
  width: 1px;
  height: 9px;
  background: rgba(212,180,90,0.65);
  transform: translateY(-50%);
  font-style: normal;
}
.cn-fl--tl-h .cn-fl__tick::after,
.cn-fl--br-h .cn-fl__tick::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3.5px;
  height: 3.5px;
  border: 1px solid rgba(212,180,90,0.7);
  background: rgba(74,21,38,0.9);
  transform: translate(-50%, -50%) rotate(45deg);
}
.cn-fl--tl-h .cn-fl__tick--a,
.cn-fl--br-h .cn-fl__tick--a { left: 28%; }
.cn-fl--tl-h .cn-fl__tick--b,
.cn-fl--br-h .cn-fl__tick--b { left: 72%; }

/* ── Vertical arms ── */
.cn-fl--tl-v,
.cn-fl--br-v {
  width: 18px;
  height: min(260px, 42vh);
  background:
    radial-gradient(circle at 50% 50%, rgba(255,245,210,0.95) 0 1.5px, transparent 2.2px),
    linear-gradient(45deg, transparent 40%, rgba(212,180,90,0.85) 40%, rgba(212,180,90,0.85) 60%, transparent 60%)
      center / 9px 9px no-repeat,
    linear-gradient(180deg,
      transparent 0%,
      rgba(201,168,76,0.18) 8%,
      rgba(201,168,76,0.55) 26%,
      rgba(232,210,150,0.95) 48%,
      rgba(232,210,150,0.95) 52%,
      rgba(201,168,76,0.55) 74%,
      rgba(201,168,76,0.18) 92%,
      transparent 100%) center / 1.4px 100% no-repeat,
    linear-gradient(180deg,
      transparent 0%,
      rgba(201,168,76,0.22) 14%,
      rgba(201,168,76,0.38) 50%,
      rgba(201,168,76,0.22) 86%,
      transparent 100%) 62% center / 1px 100% no-repeat;
}
.cn-fl--tl-v::before,
.cn-fl--tl-v::after,
.cn-fl--br-v::before,
.cn-fl--br-v::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 5px;
  height: 5px;
  border: 1px solid rgba(212,180,90,0.85);
  background: rgba(74,21,38,0.95);
  transform: translateX(-50%) rotate(45deg);
}
.cn-fl--tl-v::before,
.cn-fl--br-v::before { top: 3%; }
.cn-fl--tl-v::after,
.cn-fl--br-v::after  { bottom: 3%; }

.cn-fl--tl-v .cn-fl__tick,
.cn-fl--br-v .cn-fl__tick {
  position: absolute;
  left: 50%;
  width: 9px;
  height: 1px;
  background: rgba(212,180,90,0.65);
  transform: translateX(-50%);
  font-style: normal;
}
.cn-fl--tl-v .cn-fl__tick::after,
.cn-fl--br-v .cn-fl__tick::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3.5px;
  height: 3.5px;
  border: 1px solid rgba(212,180,90,0.7);
  background: rgba(74,21,38,0.9);
  transform: translate(-50%, -50%) rotate(45deg);
}
.cn-fl--tl-v .cn-fl__tick--a,
.cn-fl--br-v .cn-fl__tick--a { top: 28%; }
.cn-fl--tl-v .cn-fl__tick--b,
.cn-fl--br-v .cn-fl__tick--b { top: 72%; }

/* Placement — sit against floral corners */
.cn-fl--tl-h {
  top: clamp(42px, 7.5vmin, 64px);
  left: clamp(68px, 14vw, 140px);
}
.cn-fl--tl-v {
  top: clamp(68px, 14vmin, 140px);
  left: clamp(30px, 5.5vmin, 50px);
}
.cn-fl--br-h {
  bottom: clamp(42px, 7.5vmin, 64px);
  right: clamp(68px, 14vw, 140px);
}
.cn-fl--br-v {
  bottom: clamp(68px, 14vmin, 140px);
  right: clamp(30px, 5.5vmin, 50px);
}

/* Names row: baseline keeps “and” locked to first names;
   each name is a column so surname sits underneath in normal flow */
.cn-names {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: center;
  gap: clamp(8px, 2vw, 18px);
  white-space: nowrap;
  position: relative;
  z-index: 2;
  overflow: visible;
}
.cn-name {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  overflow: visible;
  padding: 0.15em 0.15em 0.2em;
  line-height: 1;
  gap: 0;
}
.cn-name__txt {
  display: block;
  font-family: var(--ff-script);
  font-size: clamp(2.2rem, 8.5vw, 5.4rem);
  line-height: normal;
  padding: 0.4em 0.1em 0;
  margin: 0 0 -0.06em;
  overflow: visible;
  color: #e8d090;
  -webkit-text-fill-color: #e8d090;
  background: none;
  text-shadow:
    0 0 18px rgba(201, 168, 76, 0.35),
    0 1px 0 rgba(90, 50, 10, 0.25);
  animation: nameGleam 5s ease-in-out infinite;
}
.cn-surname {
  display: block;
  position: relative;
  width: auto;
  margin: -0.22em 0 0;
  padding: 0 0 0.2em;
  font-family: var(--ff-serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.05rem, 2.8vw, 1.45rem);
  line-height: 1.3;
  color: rgba(240, 210, 160, 0.85);
  -webkit-text-fill-color: rgba(240, 210, 160, 0.85);
  background: none;
  text-shadow: none;
  white-space: nowrap;
  text-align: center;
  pointer-events: none;
  letter-spacing: 0;
  overflow: visible;
}
@keyframes nameGleam {
  0%, 100% { text-shadow: 0 0 14px rgba(201,168,76,0.28), 0 1px 0 rgba(90,50,10,0.25); }
  50%      { text-shadow: 0 0 26px rgba(232,210,150,0.55), 0 1px 0 rgba(90,50,10,0.25); }
}
.cn-and {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: clamp(0.95rem, 2.4vw, 1.35rem);
  font-weight: 300;
  color: rgba(240, 210, 160, 0.7);
  letter-spacing: 0.04em;
  flex-shrink: 0;
  padding-bottom: 0.15em;
}

/* Subtitle — tight under names; elegant serif italic */
.cn-post {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 1.4vh, 12px);
  margin-top: 0;
  position: relative;
  z-index: 1;
}
/* Separator — tapered arms + centre gem */
.cn-post__rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: clamp(168px, 38vw, 260px);
}
.cn-post__arm {
  flex: 1;
  height: 1.25px;
  font-style: normal;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(201,168,76,0.28) 20%,
    rgba(232,210,150,0.95) 100%);
  position: relative;
}
.cn-post__arm:last-child {
  background: linear-gradient(90deg,
    rgba(232,210,150,0.95) 0%,
    rgba(201,168,76,0.28) 80%,
    transparent 100%);
}
.cn-post__arm::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 4px;
  height: 4px;
  border: 1px solid rgba(212,180,90,0.8);
  background: rgba(74,21,38,0.95);
  transform: translateY(-50%) rotate(45deg);
}
.cn-post__arm:first-child::after { left: 0; }
.cn-post__arm:last-child::after  { right: 0; }
.cn-post__gem {
  position: relative;
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  font-style: normal;
}
.cn-post__gem::before {
  content: '';
  position: absolute;
  inset: 1px;
  border: 1px solid rgba(232,210,150,0.95);
  transform: rotate(45deg);
  background: rgba(74,21,38,0.95);
  box-shadow: 0 0 7px rgba(201,168,76,0.35);
}
.cn-post__gem::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(255,245,210,0.95);
  transform: translate(-50%, -50%);
}
.cn-post__txt {
  margin: 0;
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2.8vw, 1.45rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: none;
  color: rgba(240, 220, 175, 0.92);
  text-decoration: none;
}

/* Tiny sparkles on the names */
.cn-dot {
  position: absolute;
  left: var(--dx, 50%);
  top:  var(--dy, 40%);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff8d0;
  box-shadow: 0 0 5px 1px rgba(255, 230, 150, 0.85);
  -webkit-text-fill-color: initial;
  background-clip: border-box;
  font-style: normal;
  pointer-events: none;
  opacity: 0;
  animation: nameSpark 2.8s ease-in-out infinite;
}
.cn-name:first-of-type .cn-dot:nth-of-type(1) { animation-delay: 0.4s; }
.cn-name:first-of-type .cn-dot:nth-of-type(2) { animation-delay: 1.2s; }
.cn-name:first-of-type .cn-dot:nth-of-type(3) { animation-delay: 2.0s; }
.cn-name:last-of-type  .cn-dot:nth-of-type(1) { animation-delay: 0.2s; }
.cn-name:last-of-type  .cn-dot:nth-of-type(2) { animation-delay: 1.0s; }
.cn-name:last-of-type  .cn-dot:nth-of-type(3) { animation-delay: 1.8s; }
@keyframes nameSpark {
  0%, 100% { opacity: 0;   transform: scale(0.3); }
  40%, 55% { opacity: 1;   transform: scale(1.35); }
}

/* Falling flower petals */
.cn-petals {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.cn-petal {
  position: absolute;
  top: -40px;
  width:  var(--ps, 14px);
  height: calc(var(--ps, 14px) * 1.45);
  border-radius: 50% 0 50% 50%;
  background: linear-gradient(145deg,
    rgba(255,180,170,0.95) 0%,
    rgba(220,90,110,0.85) 55%,
    rgba(160,50,70,0.7) 100%);
  box-shadow: 0 0 6px rgba(255,140,130,0.35);
  opacity: 0;
  animation: petalFall var(--pd, 9s) linear var(--pdelay, 0s) infinite;
  will-change: transform, opacity;
}
.cn-petal:nth-child(3n) {
  background: linear-gradient(145deg,
    rgba(255,220,170,0.9) 0%,
    rgba(210,150,90,0.75) 60%,
    rgba(160,90,50,0.6) 100%);
}
.cn-petal:nth-child(5n) {
  background: linear-gradient(145deg,
    rgba(255,200,210,0.9) 0%,
    rgba(200,100,130,0.8) 55%,
    rgba(140,50,80,0.65) 100%);
}
@keyframes petalFall {
  0%   {
    opacity: 0;
    transform: translateY(0) translateX(0) rotate(0deg) scale(0.7);
  }
  8%   { opacity: 0.85; }
  50%  {
    opacity: 0.75;
    transform: translateY(55vh) translateX(var(--px, 40px)) rotate(180deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(110vh) translateX(calc(var(--px, 40px) * -0.6)) rotate(360deg) scale(0.6);
  }
}

/* Shared soft petals — countdown / events / venue (same fall, lighter density) */
.fx-petals {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 20; /* above front card (z-index 10) */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s;
}
.fx-petals.is-on {
  opacity: 1;
  visibility: visible;
}
.fx-petals .cn-petal {
  width:  var(--ps, 12px);
  height: calc(var(--ps, 12px) * 1.45);
  box-shadow: 0 0 5px rgba(255,140,130,0.28);
}


/* ════════════════════════════════════════════════════
   CARD 3 — SAVE THE DATE  ·  Dark wine + gold reveal
   ════════════════════════════════════════════════════ */
[data-theme="date"] {
  background:
    radial-gradient(ellipse 75% 55% at 50% 45%, rgba(110, 38, 55, 0.42) 0%, transparent 68%),
    radial-gradient(ellipse 50% 40% at 50% 80%, rgba(201, 168, 76, 0.05) 0%, transparent 70%),
    linear-gradient(165deg, #2a1218 0%, #1e0c12 45%, #180910 100%);
}
.cs-body {
  justify-content: flex-start;
  padding-top: clamp(52px, 12vh, 110px);
}
.cs-label {
  font-family: var(--ff-sans);
  font-size: clamp(0.58rem, 1.25vw, 0.72rem);
  font-weight: 300;
  letter-spacing: 0.55em;
  text-transform: uppercase;
  color: rgba(232, 210, 150, 0.82);
  margin-bottom: clamp(10px, 2vh, 18px);
  text-shadow: 0 0 18px rgba(201, 168, 76, 0.18);
}

/* Quiet hairline between label and date — fills the gap without stealing focus */
.cs-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: clamp(72px, 16vw, 120px);
  margin: 0 auto clamp(14px, 3.2vh, 28px);
  transform-origin: center;
}
.cs-rule__arm {
  flex: 1;
  height: 1px;
  font-style: normal;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(201, 168, 76, 0.18) 40%,
    rgba(201, 168, 76, 0.32) 100%);
}
.cs-rule__arm:last-child {
  background: linear-gradient(90deg,
    rgba(201, 168, 76, 0.32) 0%,
    rgba(201, 168, 76, 0.18) 60%,
    transparent 100%);
}
.cs-rule__dot {
  width: 3px;
  height: 3px;
  flex-shrink: 0;
  font-style: normal;
  border: 1px solid rgba(201, 168, 76, 0.35);
  transform: rotate(45deg);
  background: transparent;
}

.cs-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0px, 0.8vh, 8px);
}
/* The enormous "20" — outline with soft traveling glow */
.cs-day {
  position: relative;
  display: block;
  font-family: var(--ff-serif);
  font-weight: 300;
  /* vmin (not vw): on wide desktops width-based vw made "20" spill sideways */
  font-size: clamp(10rem, 48vmin, 22rem);
  line-height: 0.82;
  letter-spacing: -0.04em;
  /* Stroke + glow paint outside the glyph box; card overflow:hidden
     was clipping the right edge of the 0. Pad the box (same font size)
     and cancel trailing letter-spacing so the outline stays on-screen. */
  padding: 0.06em 0.1em;
  margin-inline-end: -0.04em;
  box-sizing: content-box;
  max-width: 92vw;
  color: transparent;
  -webkit-text-stroke: 1.15px rgba(201, 168, 76, 0.62);
  filter: drop-shadow(0 0 10px rgba(201, 168, 76, 0.22));
  animation: dayStrokePulse 4.5s ease-in-out infinite;
}
.cs-day::after {
  content: attr(data-text);
  position: absolute;
  /* Match .cs-day padding so the shine tracks the glyphs */
  inset: 0.06em 0.1em;
  width: auto;
  height: auto;
  color: transparent;
  -webkit-text-stroke: 1.6px rgba(255, 236, 190, 0.95);
  pointer-events: none;
  /* Moving highlight along the outline */
  -webkit-mask-image: linear-gradient(
    105deg,
    transparent 0%,
    transparent 38%,
    #000 48%,
    #000 52%,
    transparent 62%,
    transparent 100%
  );
  mask-image: linear-gradient(
    105deg,
    transparent 0%,
    transparent 38%,
    #000 48%,
    #000 52%,
    transparent 62%,
    transparent 100%
  );
  -webkit-mask-size: 220% 100%;
  mask-size: 220% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  animation: dayStrokeShine 5s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(255, 230, 170, 0.55));
}
@keyframes dayStrokePulse {
  0%, 100% {
    filter: drop-shadow(0 0 6px rgba(201, 168, 76, 0.16));
    -webkit-text-stroke-color: rgba(201, 168, 76, 0.55);
  }
  50% {
    filter: drop-shadow(0 0 16px rgba(232, 210, 150, 0.38));
    -webkit-text-stroke-color: rgba(232, 210, 150, 0.78);
  }
}
@keyframes dayStrokeShine {
  0%, 100% {
    -webkit-mask-position: 120% 0;
    mask-position: 120% 0;
    opacity: 0.35;
  }
  45%, 55% {
    opacity: 0.95;
  }
  50% {
    -webkit-mask-position: -20% 0;
    mask-position: -20% 0;
  }
}
.cs-month {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: clamp(2rem, 8vw, 5.5rem);
  font-weight: 300;
  color: var(--gold-lt);
  letter-spacing: 0.06em;
  display: inline-block;
}
.cs-year {
  font-family: var(--ff-sans);
  font-size: clamp(0.68rem, 1.5vw, 0.88rem);
  font-weight: 300;
  letter-spacing: 0.55em;
  color: rgba(232, 210, 150, 0.78);
  display: inline-block;
  text-shadow: 0 0 14px rgba(201, 168, 76, 0.2);
}


/* ════════════════════════════════════════════════════
   CARD 4 — COUNTDOWN  ·  Same parchment as events + soft light ripples
   ════════════════════════════════════════════════════ */
[data-theme="count"] {
  /* Exact match to [data-theme="events"] */
  background:
    radial-gradient(ellipse 80% 60% at 20% 15%, rgba(220,185,110,0.25) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 80% 85%, rgba(195,135,100,0.12) 0%, transparent 55%),
    #f5e8d2;
}

/* Soft 3D ripple — thin luminous crest, not thick band / not hairline */
.cc-pulse {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.cc-pulse__ring {
  position: absolute;
  width: min(44vw, 330px);
  height: min(44vw, 330px);
  border-radius: 50%;
  border: none;
  /* Narrow crest — softer near birth so center stays quiet */
  background: radial-gradient(
    circle,
    transparent 66%,
    rgba(232, 210, 150, 0.14) 69%,
    rgba(245, 228, 180, 0.55) 71%,
    rgba(232, 210, 150, 0.2) 73.5%,
    transparent 77%
  );
  box-shadow: 0 0 10px rgba(232, 210, 150, 0.22);
  filter: blur(0.8px);
  opacity: 0;
  animation: ccPulseWave 12s cubic-bezier(0.15, 0.55, 0.25, 1) infinite both;
  will-change: transform, opacity;
}

.cc-pulse__ring:nth-child(1) { animation-delay: 0s; }
.cc-pulse__ring:nth-child(2) { animation-delay: 2s; }
.cc-pulse__ring:nth-child(3) { animation-delay: 4s; }
.cc-pulse__ring:nth-child(4) { animation-delay: 6s; }
.cc-pulse__ring:nth-child(5) { animation-delay: 8s; }
.cc-pulse__ring:nth-child(6) { animation-delay: 10s; }

@keyframes ccPulseWave {
  0% {
    transform: scale(0.42);
    opacity: 0;
  }
  10% {
    opacity: 0.28; /* light while still near center */
  }
  35% {
    opacity: 0.52;
  }
  100% {
    transform: scale(2.7);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc-pulse__ring { animation: none; opacity: 0; }
}

.cc-body {
  position: relative;
  z-index: 1;
  gap: clamp(32px, 6vh, 56px);
}
.cc-pre {
  font-family: var(--ff-sans); /* DM Sans — same as “Save the Date” */
  font-size: clamp(0.72rem, 1.6vw, 0.88rem);
  font-weight: 400;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: #5a3018;
  margin: 0;
}
.cc-clock {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(12px, 3vw, 28px);
}
.flip-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 2vh, 18px);
}
.cc-uname {
  font-family: var(--ff-sans); /* DM Sans — same as page 3 labels */
  font-size: clamp(0.62rem, 1.3vw, 0.75rem);
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #6b3d22;
}
.cc-colon {
  font-family: var(--ff-serif); /* Cormorant — already used on pages 1–3 */
  font-size: clamp(1.6rem, 4.5vw, 2.6rem);
  font-weight: 400;
  color: #5c1a2e;
  line-height: 1;
  margin-top: 0;
  /* Match flip card height so “:” sits mid-card, not mid-(card+label) */
  height: clamp(88px, 23vw, 148px);
  display: flex;
  align-items: center;
  align-self: flex-start;
  background: none;
  -webkit-text-fill-color: #5c1a2e;
  animation: none;
  opacity: 0.55;
}

/* Clean split-flap — flat panels, no decorative chrome */
.flip {
  --flip-w: clamp(76px, 20vw, 128px);
  --flip-h: clamp(88px, 23vw, 148px);
  --flip-r: 8px;
  position: relative;
  width: var(--flip-w);
  height: var(--flip-h);
  /* Digits: same family as labels, but bolder */
  font-family: var(--ff-sans);
  font-weight: 700;
  font-size: calc(var(--flip-h) * 0.52);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: #f3e6c4;
  perspective: 800px;
  border-radius: var(--flip-r);
  background: #4a1526;
  border: 1px solid rgba(74, 21, 38, 0.9);
  overflow: hidden;
}
.flip__digit {
  position: absolute;
  left: 0;
  width: 100%;
  height: var(--flip-h);
  line-height: var(--flip-h);
  text-align: center;
  top: 0;
}
.flip__upper,
.flip__lower {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50%;
  overflow: hidden;
  background: #4a1526;
}
.flip__upper {
  top: 0;
  z-index: 1;
  border-radius: var(--flip-r) var(--flip-r) 0 0;
}
.flip__lower {
  bottom: 0;
  z-index: 1;
  border-radius: 0 0 var(--flip-r) var(--flip-r);
  border-top: 1px solid rgba(20, 8, 12, 0.35);
}
.flip__lower .flip__digit {
  top: calc(var(--flip-h) / -2);
}

/* Flap — only visible while flipping */
.flip__flap {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 50%;
  transform-origin: bottom center;
  transform-style: preserve-3d;
  z-index: 3;
  pointer-events: none;
}
.flip__flap-top,
.flip__flap-bot {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #4a1526;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.flip__flap-top {
  border-radius: var(--flip-r) var(--flip-r) 0 0;
  border-bottom: 1px solid rgba(20, 8, 12, 0.35);
}
.flip__flap-bot {
  border-radius: 0 0 var(--flip-r) var(--flip-r);
  transform: rotateX(180deg);
  border-top: 1px solid rgba(20, 8, 12, 0.35);
}
.flip__flap-bot .flip__digit {
  top: calc(var(--flip-h) / -2);
}
.flip.is-flipping .flip__flap {
  display: block;
  animation: flipDown 0.48s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}
/* Flap must never linger over static halves after the flip */
.flip:not(.is-flipping) > .flip__flap {
  display: none;
}
@keyframes flipDown {
  from { transform: rotateX(0deg); }
  to   { transform: rotateX(-180deg); }
}
@media (prefers-reduced-motion: reduce) {
  .flip.is-flipping .flip__flap { animation: none; }
}


/* ════════════════════════════════════════════════════
   CARD 5 — EVENTS  ·  Warm blush (same family as message page) + timeline
   ════════════════════════════════════════════════════ */
[data-theme="events"] {
  --ce-blush: #faf0ec;
  --ce-ink: #2a1015;
  --ce-muted: #7a555c;
  --ce-gold: rgba(154, 114, 50, 0.9);
  background:
    radial-gradient(ellipse 80% 55% at 22% 20%, rgba(220,180,170,0.22) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 78% 80%, rgba(190,140,150,0.10) 0%, transparent 55%),
    var(--ce-blush);
}

.ce-body {
  gap: clamp(4px, 0.8vh, 10px);
  align-items: center;
  justify-content: flex-start;
  padding-top: clamp(60px, 13vh, 112px);
  padding-bottom: calc(13% + 3.25rem);
}

.ce-title {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: clamp(1.25rem, 4vw, 2.2rem);
  font-weight: 300;
  color: var(--ce-ink);
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-align: center;
  margin: clamp(6px, 1.2vh, 14px) 0 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.ce-rule {
  width: min(160px, 42vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ce-gold), transparent);
  margin: 0 0 clamp(4px, 1vh, 10px);
  flex-shrink: 0;
}

.ce-timeline {
  --ce-gap: 14px;
  --ce-dot: 12px;
  list-style: none;
  margin: 0 auto;
  padding: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  flex: 1 1 auto;
  gap: clamp(40px, 8.5vh, 72px);
  width: min(520px, 92vw);
  margin-top: clamp(-36px, -5.5vh, -20px);
}

.ce-timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 25%;
  bottom: 25%;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(
    180deg,
    rgba(120, 70, 80, 0.08),
    rgba(120, 70, 80, 0.32) 18%,
    rgba(120, 70, 80, 0.32) 82%,
    rgba(120, 70, 80, 0.08)
  );
  pointer-events: none;
}

.ce-tl {
  display: grid;
  grid-template-columns: 1fr var(--ce-dot) 1fr;
  align-items: center;
  column-gap: var(--ce-gap);
  position: relative;
  width: 100%;
}

/* Inset ring so the 12px box center == line center */
.ce-tl__dot {
  display: block;
  box-sizing: border-box;
  width: var(--ce-dot);
  height: var(--ce-dot);
  border: none;
  border-radius: 50%;
  background: var(--ce-blush);
  box-shadow:
    inset 0 0 0 1.5px var(--ce-gold),
    0 0 0 3px var(--ce-blush);
  position: relative;
  z-index: 1;
  justify-self: center;
  margin: 0;
  padding: 0;
}

.ce-time {
  font-family: var(--ff-sans);
  font-size: clamp(0.68rem, 1.5vw, 0.8rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ce-muted);
  white-space: nowrap;
  justify-self: end;
  text-align: right;
  margin: 0;
}

.ce-time em {
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: rgba(140, 90, 100, 0.55);
}

.ce-evt {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: clamp(0.95rem, 2.4vw, 1.3rem);
  font-weight: 300;
  color: var(--ce-ink);
  line-height: 1.25;
  text-align: left;
  justify-self: start;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}


.ce-date {
  position: absolute;
  bottom: 13%;
  left: 0;
  right: 0;
  margin: 0;
  translate: 0 -50%;
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: clamp(1.2rem, 3.4vw, 1.75rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  color: rgba(154, 114, 50, 0.95);
  text-align: center;
  z-index: 2;
  pointer-events: none;
}

/* Shimmer lines tuned for blush pink */
[data-theme="events"] .cv-shimmer::before,
[data-theme="events"] .cv-shimmer::after {
  background: linear-gradient(90deg,
    transparent 5%, rgba(160, 90, 105, 0.28) 50%, transparent 95%);
}


/* ════════════════════════════════════════════════════
   CARD 6 — VENUE  ·  Lake-focused palace art + glass card
   ════════════════════════════════════════════════════ */
[data-theme="venue"] {
  background-color: #e8d5c8;
  background-image: url("assets/venue-palace.png");
  /* Show lake + architecture; glass card keeps text readable */
  background-size: cover;
  background-position: 52% 42%;
  background-repeat: no-repeat;
}

/* Portrait phones (incl. >420px wide): pull image up so horizon sits mid-frame */
@media (max-width: 768px) and (orientation: portrait) {
  [data-theme="venue"] {
    background-position: 64% 50%;
  }
}

.cv-body {
  background: none;
  justify-content: center;
  align-items: center;
}

.cv-glass {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: min(420px, 88vw);
  padding: clamp(28px, 5vh, 44px) clamp(24px, 5vw, 40px);
  border-radius: 18px;
  background: rgba(255, 248, 242, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    0 12px 40px rgba(60, 30, 40, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
}

.cv-label {
  font-family: var(--ff-sans);
  font-size: clamp(0.55rem, 1.2vw, 0.68rem);
  font-weight: 500;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: rgba(90, 45, 55, 0.55);
  margin: 0 0 clamp(12px, 2vh, 20px);
}

.cv-name {
  font-family: var(--ff-script);
  font-size: clamp(2.6rem, 9vw, 4.8rem);
  line-height: 1.15;
  color: #4a2030;
  background: none;
  -webkit-text-fill-color: #4a2030;
  animation: none;
  margin: 0 0 clamp(6px, 1.2vh, 12px);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.cv-sub {
  font-family: var(--ff-sans);
  font-size: clamp(0.58rem, 1.2vw, 0.72rem);
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(90, 45, 55, 0.62);
  margin: 0 0 clamp(18px, 3.5vh, 32px);
}

.cv-rule {
  width: min(140px, 40vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(154, 90, 70, 0.45), transparent);
  margin: 0 0 clamp(18px, 3.5vh, 32px);
}

.cv-map {
  display: inline-block;
  font-family: var(--ff-sans);
  font-size: clamp(0.55rem, 1.2vw, 0.68rem);
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #5a2838;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(90, 45, 55, 0.28);
  padding: 12px 28px;
  border-radius: 999px;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.cv-map:hover {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(90, 45, 55, 0.45);
  color: #3a1520;
}

/* Animated horizontal shimmer (lake reflection) — events page */
.cv-shimmer {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.cv-shimmer::before,
.cv-shimmer::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 5%, rgba(80,180,130,0.12) 50%, transparent 95%);
  animation: lakeShimmer 5s ease-in-out infinite;
}
.cv-shimmer::before { bottom: 55%; animation-delay: 0s; }
.cv-shimmer::after  { bottom: 30%; animation-delay: 2.2s; }
@keyframes lakeShimmer {
  0%, 100% { opacity: 0; transform: translateX(-4%); }
  50%       { opacity: 1; transform: translateX(4%); }
}


/* ════════════════════════════════════════════════════
   CARD 7 — SEND A MESSAGE  ·  Warm blush + invite frame
   ════════════════════════════════════════════════════ */
[data-theme="msg"] {
  background:
    radial-gradient(ellipse 80% 55% at 22% 20%, rgba(220,180,170,0.22) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 78% 80%, rgba(190,140,150,0.10) 0%, transparent 55%),
    #faf0ec;
}

.cmsg-body {
  justify-content: center;
  padding-top: clamp(28px, 5vh, 48px);
  padding-bottom: clamp(72px, 12vh, 110px);
  gap: clamp(10px, 1.8vh, 18px);
}

.cmsg-monogram {
  width: min(140px, 32vmin);
  height: min(140px, 32vmin);
  margin-bottom: clamp(2px, 0.6vh, 8px);
}

.cmsg-title {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: clamp(1.45rem, 4.2vw, 2.4rem);
  font-weight: 300;
  color: #2a1015;
  margin: 0 0 clamp(8px, 1.5vh, 16px);
}

/* Hashtag reuses .ci-tag from page 1 — warm it slightly for blush bg */
[data-theme="msg"] .ci-tag {
  color: rgba(120, 78, 22, 0.88);
  text-shadow: 0 0 18px rgba(250, 240, 236, 0.95), 0 1px 0 rgba(250, 240, 236, 0.7);
}

/* ── RSVP form ────────────────────────────────────── */
#rsvp-form {
  width: min(420px, 90vw);
  text-align: left;
}
.rf-field { margin-bottom: clamp(8px, 1.5vh, 14px); }
.rf-field input,
.rf-field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(80,40,50,0.18);
  padding: 9px 0;
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: clamp(0.9rem, 2.2vw, 1.05rem);
  color: #2a1015;
  outline: none;
  transition: border-color 0.3s;
  resize: none;
}
.rf-field input:focus,
.rf-field textarea:focus { border-bottom-color: #9a5030; }
.rf-field input.invalid,
.rf-field textarea.invalid { border-bottom-color: #b04040; }
.rf-field input::placeholder,
.rf-field textarea::placeholder { color: rgba(80,40,50,0.28); }
.rf-field input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }
.rf-hint {
  margin: 6px 0 0;
  font-family: var(--ff-sans);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: #b04040;
}

.rf-radios {
  display: flex;
  gap: clamp(16px, 4vw, 32px);
  flex-wrap: wrap;
  margin-bottom: clamp(10px, 2vh, 18px);
}
.rf-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: clamp(0.85rem, 2.1vw, 1rem);
  color: rgba(60,25,30,0.7);
  cursor: pointer;
  user-select: none;
}
.rf-opt input[type="radio"] { display: none; }
.rfr-pip {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(154,80,48,0.35);
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}
.rf-opt input:checked + .rfr-pip { border-color: #9a5030; background: #9a5030; }
.rf-opt input:checked + .rfr-pip::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #faf0ec;
}

.rf-btn {
  width: 100%;
  margin-top: clamp(10px, 2vh, 18px);
  padding: 12px 0;
  font-family: var(--ff-sans);
  font-size: clamp(0.5rem, 1.1vw, 0.62rem);
  font-weight: 300;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: #faf0ec;
  background: #2a1015;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
}
.rf-btn:hover    { background: #451a22; }
.rf-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.rf-ok, .rf-err {
  margin-top: 12px;
  text-align: center;
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 0.92rem;
}
.rf-ok  { color: #9a5030; }
.rf-err { color: #b04040; }


/* ════════════════════════════════════════════════════
   REVEAL SYSTEM  (data-r + data-d attributes)
   fd  = fade + slide down
   fu  = fade + slide up
   sr  = slide from right
   sl  = slide from left
   sc  = scale pop
   dh  = draw horizontal line
   stamp = scale + blur snap (date drama)
   wipe  = clip-path left→right wipe
   ════════════════════════════════════════════════════ */
[data-r] {
  opacity: 0;
  transition-property: opacity, transform, filter, clip-path;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 0.9s;
}
[data-r="fd"] { transform: translateY(-20px); }
[data-r="fu"] { transform: translateY(20px);  }
[data-r="sr"] { transform: translateX(40px);  }
[data-r="sl"] { transform: translateX(-40px); }
[data-r="sc"] {
  transform: scale(0.3);
  transition-timing-function: cubic-bezier(0.2, 1.5, 0.5, 1);
  transition-duration: 0.6s;
}
[data-r="dh"] {
  transform: scaleX(0);
  transform-origin: center;
  transition-duration: 0.8s;
}
[data-r="stamp"] {
  transform: scale(0.72) rotate(-2deg);
  filter: blur(16px);
  transition-duration: 1.1s;
  transition-timing-function: cubic-bezier(0.15, 0.85, 0.3, 1);
}
[data-r="wipe"] {
  clip-path: inset(0 100% 0 0);
  opacity: 1 !important; /* wipe is always opaque, just hidden by clip */
  transition-duration: 0.9s;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
[data-r].revealed {
  opacity: 1;
  transform: none;
  filter: none;
  clip-path: inset(0 0% 0 0); /* for wipe */
}




/* ════════════════════════════════════════════════════
   ACCESSIBILITY
   ════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay:    0ms   !important;
    transition-duration: 0.01ms !important;
  }
  [data-r]         { opacity: 1 !important; transform: none !important; filter: none !important; clip-path: none !important; }
  .card.is-flying-out { animation: none !important; }
}


/* ════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════ */
@media (max-width: 420px) {
  .cn-name__txt  { font-size: clamp(1.75rem, 10vw, 2.6rem); }
  .cn-and   { font-size: 0.85rem; }
  .cn-post__txt  { font-size: clamp(0.95rem, 4vw, 1.2rem); letter-spacing: 0.06em; }
  .cn-surname    { font-size: clamp(0.95rem, 4vw, 1.2rem); }
  .cn-corner { width: min(180px, 52vw); }
  .cn-fl--tl-h, .cn-fl--br-h { width: min(210px, 58vw); }
  .cn-fl--tl-v, .cn-fl--br-v { height: min(190px, 32vh); }
  .cs-day   { font-size: clamp(52vw, 56vw, 360px); }
  .cc-clock { gap: clamp(10px, 2.5vw, 18px); }
  .flip {
    --flip-w: clamp(64px, 18vw, 96px);
    --flip-h: clamp(76px, 21vw, 112px);
  }
  .cc-colon { height: clamp(76px, 21vw, 112px); }
  .cc-pre { font-size: clamp(0.65rem, 3.2vw, 0.8rem); }
  .cc-uname { font-size: clamp(0.55rem, 2.8vw, 0.68rem); }
  .rf-radios { flex-direction: column; gap: 12px; }
  .ce-title { font-size: clamp(1.05rem, 5.2vw, 1.55rem); }
  .ce-evt   { font-size: clamp(0.95rem, 4vw, 1.15rem); }
  .ce-timeline { --ce-gap: 10px; }

  /* Location — horizon nearer vertical center on narrow phones */
  [data-theme="venue"] {
    background-position: 68% 52%;
    background-size: cover;
  }
  .cv-glass {
    width: min(420px, 92vw);
    min-height: 0;
    padding: clamp(32px, 5.5vh, 48px) clamp(22px, 5vw, 32px);
    gap: 4px;
  }
  .cv-label { margin-bottom: clamp(12px, 2vh, 18px); }
  .cv-name  { margin-bottom: clamp(6px, 1.2vh, 12px); }
  .cv-sub   { margin-bottom: clamp(18px, 3vh, 28px); }
  .cv-rule  { margin-bottom: clamp(18px, 3vh, 28px); }
}
@media (max-height: 640px) {
  .c-body   { padding: 20px 24px; }
  .cc-pre { font-size: 0.5rem; letter-spacing: 0.4em; }
  .cn-post  { margin-top: 0; }
  .cn-corner { width: min(160px, 40vw); }
}
