/* Manthan & Kajal — Save the Date
   Ivory paper, antique gold and deep teal, over the venue at dusk. */

:root {
  --ivory: #F8F2E8;
  --paper: rgba(251, 247, 240, .58);
  --gold: #B48A4E;
  --gold-soft: #D6B47E;
  --teal: #234B4A;
  --teal-2: #3B5F5D;
  --ink-soft: rgba(35, 75, 74, .78);
  --caps: "Cinzel", "Cormorant Garamond", serif;
  --serif: "Cormorant Garamond", Georgia, serif;
  --script: "Pinyon Script", "Great Vibes", cursive;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; }
body {
  margin: 0;
  min-height: 100svh;
  background: var(--ivory);
  color: var(--teal);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}
body.locked { overflow: hidden; height: 100svh; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }

/* ---------- intro ---------- */
#intro {
  position: fixed; inset: 0; z-index: 20;
  overflow: hidden; background: var(--ivory);
}
.intro-art { position: absolute; inset: 0; will-change: transform; }
.intro-art img { width: 100%; height: 100%; object-fit: cover; }

.seal-glow {
  position: absolute; width: 34vmin; height: 34vmin; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 236, 190, .65) 0%, rgba(255, 226, 170, .25) 40%, transparent 70%);
  pointer-events: none;
  animation: breathe 2.6s ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { opacity: .35; transform: translate(-50%, -50%) scale(.92); } 50% { opacity: .9; transform: translate(-50%, -50%) scale(1.08); } }

.flash {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at var(--fx, 50%) var(--fy, 80%), #fffaf0 0%, #fbf3e4 40%, #f6ecdc 100%);
}

.tap {
  position: absolute; left: 50%; bottom: max(28px, calc(env(safe-area-inset-bottom) + 18px));
  transform: translateX(-50%);
  padding: 13px 30px; border-radius: 999px;
  border: 1px solid rgba(180, 138, 78, .7);
  background: rgba(251, 247, 240, .88);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  font-family: var(--caps); font-size: 12px; font-weight: 500; letter-spacing: .32em; text-transform: uppercase;
  color: var(--teal);
  box-shadow: 0 10px 26px -12px rgba(120, 80, 30, .55);
}
.tap .ring {
  position: absolute; inset: 0; border-radius: inherit; border: 1px solid rgba(180, 138, 78, .55);
  animation: ping 2.4s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes ping { 75%, 100% { transform: scale(1.35); opacity: 0; } }
.tap:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

/* ---------- save the date ---------- */
#hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: clamp(28px, 6vh, 64px) 16px clamp(56px, 9vh, 80px);
  overflow: hidden; isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; will-change: transform; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(10, 24, 40, .1), rgba(10, 24, 40, .42) 100%),
    linear-gradient(rgba(10, 24, 40, .08), rgba(10, 24, 40, .3));
}

/* frosted ivory arch, like the printed card */
.card {
  position: relative;
  width: min(370px, 84vw);
  padding: clamp(40px, 11vw, 60px) clamp(18px, 5.5vw, 34px) clamp(24px, 6.5vw, 36px);
  text-align: center;
  background: var(--paper);
  backdrop-filter: blur(6px) saturate(1.1); -webkit-backdrop-filter: blur(6px) saturate(1.1);
  border-radius: 50% 50% 18px 18px / 150px 150px 18px 18px;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .6);
}
.card-line {
  position: absolute; inset: 10px; pointer-events: none;
  border: 1px solid rgba(180, 138, 78, .75);
  border-radius: 50% 50% 12px 12px / 142px 142px 12px 12px;
}

.monogram { width: clamp(120px, 36vw, 160px); margin: 0 auto; }

.std { margin: clamp(8px, 2vw, 14px) 0 0; font-weight: 400; line-height: 1; }
.caps-xl {
  display: block;
  font-family: var(--caps); font-weight: 400;
  font-size: clamp(30px, 8.6vw, 44px);
  letter-spacing: .32em; padding-left: .32em; /* keep spaced letters centred */
  color: var(--teal);
}
.the {
  display: block; position: relative;
  font-family: var(--script); font-size: clamp(34px, 10vw, 48px);
  color: var(--teal-2); line-height: .9; margin: -2px 0 2px;
}
.the::before, .the::after {
  content: ""; position: absolute; top: 55%; width: 26%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(35, 75, 74, .55));
}
.the::before { left: 4%; }
.the::after { right: 4%; transform: scaleX(-1); }

.kicker {
  margin: clamp(12px, 3.6vw, 20px) 0 0;
  font-family: var(--caps); font-size: clamp(11px, 3vw, 13px); font-weight: 500;
  letter-spacing: .28em; text-transform: uppercase; color: var(--ink-soft);
}

.names { margin-top: clamp(10px, 3vw, 16px); }
.name {
  margin: 0;
  font-family: var(--caps); font-weight: 500;
  font-size: clamp(21px, 6.2vw, 30px); letter-spacing: .1em;
  color: var(--teal);
}
.and {
  margin: 0; display: flex; align-items: center; gap: 12px;
  font-family: var(--script); font-size: clamp(30px, 9vw, 42px); color: var(--gold); line-height: 1.1;
}
.and::before, .and::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(180, 138, 78, .8)); }
.and::after { transform: scaleX(-1); }

.spark { margin: 12px 0 0; color: var(--gold); font-size: 13px; }

.date { margin: 10px 0 0; display: flex; align-items: center; justify-content: center; gap: .55em; }
.date .day {
  font-family: var(--serif); font-weight: 500; font-size: clamp(38px, 11vw, 52px); line-height: 1;
  font-variant-numeric: lining-nums;
  color: var(--gold);
}
.date .month {
  font-family: var(--caps); font-weight: 500; font-size: clamp(17px, 5vw, 22px); letter-spacing: .24em;
  color: var(--teal);
}
.city {
  margin: 2px 0 0;
  font-family: var(--caps); font-size: clamp(13px, 3.6vw, 15px); font-weight: 600; letter-spacing: .34em; padding-left: .34em;
  color: var(--teal-2);
}

.rule { margin: 16px auto 0; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--gold); }
.rule::before, .rule::after { content: ""; width: 56px; height: 1px; background: linear-gradient(90deg, transparent, currentColor); }
.rule::after { transform: scaleX(-1); }
.rule i { width: 5px; height: 5px; background: currentColor; transform: rotate(45deg); }

.follow { margin: 12px 0 0; font-style: italic; font-size: clamp(17px, 4.8vw, 20px); letter-spacing: .04em; color: var(--ink-soft); }

.credit {
  position: absolute; left: 0; right: 0; bottom: max(14px, env(safe-area-inset-bottom));
  text-align: center; font-family: var(--serif); font-size: 13px; letter-spacing: .08em; color: rgba(255, 250, 240, .82);
}
.credit a { color: #F1D9A8; text-decoration: none; }
.credit a:hover { text-decoration: underline; }

.noscript { padding: 40px 20px; text-align: center; font-size: 18px; }

/* the card stays hidden until the intro has fully gone */
.js .card, .js .credit { opacity: 0; }

/* wide screens: the card keeps its portrait proportion */
/* music toggle */
.music {
  position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 10;
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(214, 180, 126, .8); background: rgba(251, 247, 240, .82);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); color: var(--gold);
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .5);
}
.music[hidden] { display: none; }
.music .bars { display: flex; align-items: flex-end; gap: 3px; height: 16px; }
.music .bars i { width: 3px; border-radius: 2px; background: currentColor; animation: eq 1s ease-in-out infinite; }
.music .bars i:nth-child(2) { animation-delay: .15s; }
.music .bars i:nth-child(3) { animation-delay: .3s; }
.music .bars i:nth-child(4) { animation-delay: .45s; }
.music .off { width: 18px; height: 18px; display: none; }
.music[aria-pressed="false"] .bars { display: none; }
.music[aria-pressed="false"] .off { display: block; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 16px; } }

@media (min-aspect-ratio: 1/1) {
  #hero { padding-top: 4vh; padding-bottom: 6vh; }
  .card { width: min(400px, 46vh); padding: 6vh 2.4vh 3.2vh; border-radius: 50% 50% 16px 16px / 19vh 19vh 16px 16px; }
  .card-line { border-radius: 50% 50% 10px 10px / 18vh 18vh 10px 10px; }
  .monogram { width: min(180px, 15vh); }
  .std { margin-top: .6vh; }
  .caps-xl { font-size: min(48px, 4.6vh); }
  .the { font-size: min(54px, 5.2vh); }
  .kicker { margin-top: 1.8vh; font-size: min(13px, 1.4vh); }
  .names { margin-top: 1vh; }
  .name { font-size: min(34px, 3.3vh); }
  .and { font-size: min(40px, 3.8vh); }
  .spark { margin-top: .8vh; }
  .date { margin-top: .6vh; }
  .date .day { font-size: min(58px, 5.4vh); }
  .date .month { font-size: min(22px, 2.2vh); }
  .city { font-size: min(15px, 1.5vh); }
  .rule { margin-top: 1.4vh; }
  .follow { margin-top: 1vh; font-size: min(20px, 2vh); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
