/* ============================================================
   Ashish & Priyanshi — Layered Invitation
   Sources:
   - Cover Slide.psd, 1080 x 3840 px.
   - Envelope Slide.psd, 1080 x 1920 px.
   - Scratch to reveal slide.psd, 1080 x 1920 px.
   - Bhaat.psd, 1080 x 1920 px.
   - Sangeet Slide.psd, 1080 x 1920 px.
   - Haldi Slide.psd, 1080 x 1920 px.
   - Wedding Slide.psd, 1080 x 1920 px.
   - Rsvp Slide.psd, 1080 x 1920 px.
   - Last Slide.psd, 1080 x 4500 px.
   Visible PSD leaf layers are positioned at their original
   coordinates, expressed as % of each PSD canvas.
   ============================================================ */

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

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  background: #d2e6ed;
  color: #1f3f48;
}

@supports (height: 100svh) {
  body {
    min-height: 100svh;
  }
}

.invite {
  --viewport-height: 100vh;
  --stage-width: min(100vw, calc(var(--viewport-height) * 1080 / 1920), 540px);
  --motion-fast: 180ms;
  --motion-medium: 480ms;
  --ease-standard: cubic-bezier(0.22, 1, 0.36, 1);
  min-height: var(--viewport-height);
}

@supports (height: 100svh) {
  .invite {
    --viewport-height: 100svh;
  }
}

.slide {
  display: flex;
  justify-content: center;
}

.stage {
  position: relative;
  width: var(--stage-width);
  overflow: hidden;
  background: #d2e6ed;
  isolation: isolate;
  contain: layout paint style;
}

.stage--cover {
  aspect-ratio: 1080 / 3840;
}

.stage--bhaat,
.stage--sangeet,
.stage--haldi,
.stage--wedding,
.stage--rsvp {
  aspect-ratio: 1080 / 1920;
}

.stage--scratch {
  aspect-ratio: 1080 / 1920;
}

.stage--last {
  aspect-ratio: 1080 / 4500;
}

.last-map-link:focus,
.last-map-link:focus-visible {
  outline: 3px solid rgba(193, 68, 108, 0.9);
  outline-offset: 4px;
  border-radius: calc(var(--stage-width) * 0.012);
}

.ly {
  position: absolute;
  display: block;
  /* left / top / width / height set inline per layer from PSD bbox */
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

.scratch-date-card {
  position: absolute;
  left: 19.8148%;
  top: 32.2396%;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60.3704%;
  height: 7.3958%;
  border-radius: calc(var(--stage-width) * 0.024);
  background: #fff;
  color: #c1446c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, calc(var(--stage-width) * 0.052), 2rem);
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.live-countdown {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.countdown-value {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c1446c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.85rem, calc(var(--stage-width) * 0.043), 1.45rem);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.countdown-value--days {
  font-size: clamp(0.85rem, calc(var(--stage-width) * 0.044), 1.5rem);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.scratch-canvas {
  position: absolute;
  z-index: 2;
  display: block;
  cursor: grab;
  touch-action: none;
  transition:
    opacity var(--motion-medium) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
  user-select: none;
  will-change: transform, opacity;
}

.scratch-canvas:active,
.scratch-canvas.is-scratching {
  cursor: grabbing;
  transform: scale(0.992);
}

.scratch-canvas:focus-visible {
  outline: 4px solid rgba(176, 70, 108, 0.9);
  outline-offset: 6px;
}

.stage--scratch.is-scratch-complete .scratch-canvas {
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .scratch-canvas {
    transition: none;
  }
}

/* ============================================================
   Send your blessings — a tap-to-bless "altar" slide.
   Static layout & appearance live here; motion is in animations.css.
   ============================================================ */
.stage--blessings {
  aspect-ratio: 1080 / 1920;
  background: radial-gradient(
    120% 80% at 50% 26%,
    #fdf7ec 0%,
    #fbefdd 42%,
    #f7e0c9 74%,
    #f3d2c2 100%
  );
}

/* Positioning context so the controls overlay sits exactly on the stage. */
.bless-frame {
  position: relative;
  width: var(--stage-width);
}

/* Soft halo behind the monogram (the blessing "target"). */
.bless-halo {
  position: absolute;
  left: 50%;
  top: 17.75%;
  width: 54%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 224, 158, 0.55) 0%,
    rgba(255, 214, 150, 0.22) 42%,
    rgba(255, 214, 150, 0) 70%
  );
  pointer-events: none;
  z-index: 0;
}

.bless-monogram {
  z-index: 1;
}

.bless-garland {
  z-index: 0;
}

/* Overlay holds the accessible controls; only the controls catch input,
   so vertical scrolling still passes through everywhere else. */
.bless-ui {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.bless-panel {
  position: absolute;
  left: 50%;
  top: 30%;
  transform: translateX(-50%);
  width: min(90%, 384px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: calc(var(--stage-width) * 0.032);
}

.bless-title {
  margin: 0;
  font-family: "AP Playfair", Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.05;
  font-size: clamp(1.5rem, calc(var(--stage-width) * 0.076), 2.3rem);
  color: #9c2f53;
}

.bless-hint {
  margin: 0;
  margin-top: calc(var(--stage-width) * -0.014);
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: clamp(0.72rem, calc(var(--stage-width) * 0.03), 0.92rem);
  color: #7a5a48;
}

.bless-tray {
  display: flex;
  align-items: flex-start;
  gap: 1.6%;
  width: 100%;
  margin-top: calc(var(--stage-width) * 0.004);
}

.bless-token {
  pointer-events: auto;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5em;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Cream double-ring frame around each token illustration. */
.bless-token__disc {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: clamp(48px, calc(var(--stage-width) * 0.168), 86px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #fffdf8 0%, #fdf4e3 68%, #f5e6cf 100%);
  border: 1px solid rgba(196, 158, 96, 0.55);
  box-shadow:
    0 5px 14px rgba(150, 95, 60, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.bless-token__disc::after {
  content: "";
  position: absolute;
  inset: 7.5%;
  border-radius: 50%;
  border: 1px solid rgba(196, 158, 96, 0.4);
  pointer-events: none;
}

.bless-token__art {
  display: block;
  width: 68%;
  height: auto;
  aspect-ratio: 1;
  pointer-events: none;
  filter: drop-shadow(0 1px 1px rgba(120, 70, 40, 0.16));
}

.bless-token__label {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.55rem, calc(var(--stage-width) * 0.0265), 0.74rem);
  letter-spacing: 0.01em;
  line-height: 1.1;
  color: #7a4b39;
  text-align: center;
}

.bless-token:focus-visible {
  outline: none;
}

.bless-token:focus-visible .bless-token__disc {
  outline: 3px solid rgba(193, 68, 108, 0.85);
  outline-offset: 3px;
}

.bless-send {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--stage-width) * 0.018);
  width: 100%;
  margin-top: calc(var(--stage-width) * 0.024);
}

/* Wish field: a feather quill marks "write a note". */
.bless-wishbox {
  display: flex;
  align-items: center;
  gap: 0.55em;
  width: 100%;
  padding: 0.12em 0.95em;
  border: 1px solid rgba(196, 158, 96, 0.55);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.94);
  box-shadow: inset 0 1px 2px rgba(150, 110, 70, 0.08);
}

.bless-wishbox:focus-within {
  border-color: rgba(193, 68, 108, 0.7);
  box-shadow: 0 0 0 2px rgba(193, 68, 108, 0.16);
}

.bless-wishbox__icon {
  flex: none;
  width: 1.2em;
  height: 1.2em;
  color: #b98a3e;
}

.bless-wish {
  pointer-events: auto;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.62em 0;
  border: 0;
  background: transparent;
  color: #5a3c2c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.84rem, calc(var(--stage-width) * 0.036), 1.05rem);
  text-align: left;
}

.bless-wish::placeholder {
  color: #7d5c46;
}

.bless-wish:focus {
  outline: none;
}

/* Share is the SECONDARY action — a quiet outline button, so the
   token row stays the hero. Only the WhatsApp glyph carries colour. */
.bless-share {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.6em 1em;
  border: 1px solid rgba(150, 112, 66, 0.45);
  border-radius: 999px;
  background: transparent;
  color: #6b4a3a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.82rem, calc(var(--stage-width) * 0.038), 1.02rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  touch-action: manipulation;
}

.bless-share__icon {
  flex: none;
  width: 1.3em;
  height: 1.3em;
}

.bless-share__label {
  white-space: nowrap;
}

.bless-share:focus-visible {
  outline: 2px solid rgba(193, 68, 108, 0.9);
  outline-offset: 3px;
}

.bless-thanks {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.74rem, calc(var(--stage-width) * 0.032), 0.95rem);
  color: #7a4b39;
}

.bless-thanks[hidden] {
  display: none;
}

.bless-thanks__icon {
  flex: none;
  width: 1.05em;
  height: 1.05em;
  color: #d98a86;
}

.bless-thanks__n {
  color: #e0645a;
  font-weight: 700;
}
