/* ═══════════════════════════════════════════
   WEDDING INVITATION — Aditya & Richa
   Palette: parchment, sunset gold, deep maroon
   ═══════════════════════════════════════════ */

:root {
  --cream: #f6efe2;
  --paper: #efe4cf;
  --gold: #b8893a;
  --gold-soft: #d9b86c;
  --maroon: #6e1f1f;
  --ink: #3a2a1c;
  --ink-soft: #6b5842;
  --white: #fffaf0;

  --serif: "Cormorant Garamond", Georgia, serif;
  --display: "Cinzel", "Times New Roman", serif;
  --script: "Great Vibes", cursive;

  /* One easing curve for everything = the "silky" feel */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --slow: 1.4s;
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; height: 100vh; }

img { max-width: 100%; display: block; }

.container { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.container.narrow { max-width: 720px; }

/* ─── Shared type ─── */
.eyebrow {
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
}

/* Even out line lengths so short headings never leave one word alone on a line */
.eyebrow, .title, .hero__date, .hero__tag, .verse p, .person h3, .venue__addr { text-wrap: balance; }

.title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  letter-spacing: 0.08em;
  line-height: 1.15;
  margin-top: 0.6rem;
}

.script {
  font-family: var(--script);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.4rem auto;
  color: var(--gold);
  font-size: 0.8rem;
}
.divider::before,
.divider::after {
  content: "";
  width: 70px;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
}

.paper {
  background:
    radial-gradient(ellipse at top, rgba(255, 255, 255, 0.6), transparent 60%),
    radial-gradient(ellipse at bottom, rgba(184, 137, 58, 0.08), transparent 60%),
    var(--paper);
}

.btn {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.9rem 2.4rem;
  font-family: var(--display);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  transition: background 0.6s var(--ease), color 0.6s var(--ease);
}
.btn:hover { background: var(--gold-soft); color: var(--ink); }

/* ═══════════ SMOOTH REVEAL TRANSITION ═══════════
   Elements start soft (blurred, lowered, transparent) and
   "develop" into focus. Only opacity/transform/filter are
   animated so the GPU handles it — no layout jank.
   --i staggers siblings.                                   */
.reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  filter: blur(10px);
  transition:
    opacity var(--slow) var(--ease),
    transform var(--slow) var(--ease),
    filter var(--slow) var(--ease);
  transition-delay: calc(var(--i, 0) * 0.15s);
  will-change: opacity, transform, filter;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

/* ═══════════ ENTRY GATE ═══════════ */
.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.5rem;
  background: #f3e8d2 url("assets/Images/Entry Image.png") center / cover no-repeat;
  transition:
    opacity 1.6s var(--ease),
    transform 1.8s var(--ease),
    filter 1.6s var(--ease),
    visibility 0s linear 1.8s;
}
.gate.is-open {
  opacity: 0;
  transform: scale(1.12);
  filter: blur(14px);
  visibility: hidden;
  pointer-events: none;
}

.gate__inner > * { animation: rise 1.6s var(--ease) both; }
.gate__inner > *:nth-child(2) { animation-delay: 0.2s; }
.gate__inner > *:nth-child(3) { animation-delay: 0.4s; }
.gate__inner > *:nth-child(4) { animation-delay: 0.6s; }
.gate__inner > *:nth-child(5) { animation-delay: 0.8s; }

.gate__blessing { color: var(--maroon); font-size: 1rem; letter-spacing: 0.1em; }

.monogram {
  font-family: var(--display);
  font-size: clamp(4rem, 14vw, 7rem);
  color: var(--gold);
  line-height: 1;
  margin: 1.5rem 0 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3em;
}
.monogram em {
  font-family: var(--script);
  font-style: normal;
  font-size: 0.55em;
  color: var(--ink-soft);
}

.gate__sub {
  font-style: italic;
  font-size: 1.3rem;
  color: var(--ink-soft);
}

.gate__btn {
  margin-top: 2.2rem;
  padding: 1rem 2.8rem;
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--maroon);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(110, 31, 31, 0.3);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
  animation: rise 1.6s var(--ease) 0.6s both, pulse 2.6s ease-in-out 2.2s infinite;
}
.gate__btn:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(110, 31, 31, 0.4); }

.gate__hint { margin-top: 1rem; font-size: 0.85rem; color: var(--ink-soft); opacity: 0.7; }

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); filter: blur(8px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 10px 30px rgba(110, 31, 31, 0.3), 0 0 0 0 rgba(184, 137, 58, 0.5); }
  50%      { box-shadow: 0 10px 30px rgba(110, 31, 31, 0.3), 0 0 0 14px rgba(184, 137, 58, 0); }
}

/* ═══════════ MUSIC TOGGLE ═══════════ */
.music-toggle {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 50;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--gold-soft);
  background: rgba(255, 250, 240, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 1s var(--ease) 1s, transform 1s var(--ease) 1s;
}
body:not(.is-locked) .music-toggle { opacity: 1; transform: none; }

.bars { display: flex; align-items: flex-end; gap: 3px; height: 18px; }
.bars i {
  width: 3px;
  height: 30%;
  background: var(--gold);
  border-radius: 2px;
  transition: height 0.4s var(--ease);
}
.music-toggle.is-playing .bars i { animation: eq 1s ease-in-out infinite; }
.music-toggle.is-playing .bars i:nth-child(2) { animation-delay: 0.2s; }
.music-toggle.is-playing .bars i:nth-child(3) { animation-delay: 0.4s; }
.music-toggle.is-playing .bars i:nth-child(4) { animation-delay: 0.1s; }

@keyframes eq {
  0%, 100% { height: 25%; }
  50%      { height: 100%; }
}

/* ═══════════ HERO ═══════════ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--white);
  overflow: hidden;
}

.hero__bg,
.venue__bg {
  position: absolute;
  inset: -10% 0;
  /* Replace the gradient with your photo:
     background-image: url("assets/hero.jpg"); */
  background:
    radial-gradient(circle at 50% 75%, rgba(255, 196, 102, 0.9), transparent 35%),
    linear-gradient(180deg, #2c1b3a 0%, #8c3b3b 40%, #e08a3c 70%, #f4c26b 85%, #6b3a1f 100%);
  background-size: cover;
  background-position: center;
  will-change: transform;
}

.hero__bg {
  background: #2c1b3a url("assets/Images/Landing Page Image.png") center / cover no-repeat;
}

.hero__veil {
  position: absolute;
  inset: 0;
  /* Darker in the middle so the names stay readable over the busy door carvings */
  background:
    radial-gradient(ellipse at center, rgba(20, 10, 5, 0.45), rgba(20, 10, 5, 0.15) 70%),
    linear-gradient(180deg, rgba(20, 10, 5, 0.4), rgba(20, 10, 5, 0.1) 40%, rgba(20, 10, 5, 0.6));
}

/* Fade the bottom of the photo into the dark top of the story section below */
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 28%;
  pointer-events: none;
  /* Same deep brown the story section starts with, so the two scenes flow together */
  background: #1e0e06;
  -webkit-mask-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.35) 45%, #000);
          mask-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.35) 45%, #000);
}

.hero__content { position: relative; z-index: 1; padding: 2rem 1.25rem; }
.hero__content .eyebrow { color: var(--gold-soft); font-weight: 600; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6); }
.nowrap { white-space: nowrap; }

.hero__names {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3rem, 11vw, 7.5rem);
  letter-spacing: 0.12em;
  line-height: 1;
  margin: 1.2rem 0;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}
.hero__names .script {
  display: block;
  font-size: 0.45em;
  color: var(--gold-soft);
  margin: 0.2em 0;
}

.hero__tag { font-style: italic; font-size: 1.35rem; opacity: 0.9; }
.hero .divider { color: var(--gold-soft); }
.hero__date { font-family: var(--display); letter-spacing: 0.2em; font-size: clamp(1.05rem, 3.2vw, 1.4rem); }

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  translate: -50% 0;
  width: 26px;
  height: 42px;
  border: 1px solid var(--gold);
  border-radius: 20px;
  z-index: 1;
}
.scroll-cue span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 3px;
  height: 8px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--gold);
  animation: scrollDot 2.2s var(--ease) infinite;
}
@keyframes scrollDot {
  0%   { opacity: 0; transform: translateY(0); }
  30%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(16px); }
}

/* ═══════════ STORY ═══════════ */
.story {
  --fade: 260px;
  padding: 8rem 0 calc(var(--fade) + 2rem);
  text-align: center;
  color: var(--white);
  /* Gathbandhan (tied cloth knot) photo under a dark veil. Top: rises out of the deep brown the
     landing photo fades into. Bottom: eases into the cream of the Celebrations section. */
  background:
    linear-gradient(to bottom, #1e0e06, rgba(30, 14, 6, 0) var(--fade)),
    linear-gradient(to top, #f6efe2, rgba(246, 239, 226, 0) var(--fade)),
    linear-gradient(rgba(30, 14, 6, 0.45), rgba(30, 14, 6, 0.45)),
    #3a2a1c url("assets/Images/BG2.jpg") center / cover no-repeat;
}
.story .eyebrow,
.story .divider { color: var(--gold-soft); }
.story .title   { color: var(--white); text-shadow: 0 4px 24px rgba(0, 0, 0, 0.35); }
.verse p { font-size: 1.35rem; font-style: italic; color: rgba(255, 250, 240, 0.9); margin-bottom: 1.6rem; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4); }
.verse .highlight { font-family: var(--script); font-style: normal; font-size: 2.4rem; color: var(--gold-soft); }

/* Text flanked by two framed photos */
.story__layout {
  width: min(1440px, 100% - 2.5rem);
  display: grid;
  /* Fixed-size photo columns, centred, so the photos sit close to the text */
  grid-template-columns: minmax(0, 360px) minmax(0, 540px) minmax(0, 360px);
  justify-content: center;
  gap: clamp(1.5rem, 2.5vw, 2.5rem);
  align-items: center;
}
/* Box behind the centre text: 40% dark brown with a thin gold edge */
.story__text {
  padding: clamp(2rem, 4vw, 3.5rem) clamp(1.25rem, 3vw, 2.75rem);
  background: rgba(30, 14, 6, 0.4);
  border: 1px solid rgba(217, 184, 108, 0.35);
  border-radius: 16px;
}

.story__photo { margin: 0; }
.story__photo img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 6px solid var(--white);
  outline: 1px solid var(--gold-soft);
  outline-offset: 6px;
  box-shadow: 0 20px 50px rgba(58, 42, 28, 0.2);
}
.story__photo--left  { rotate: -2deg; }
.story__photo--right { rotate: 2deg; }

/* Gentle floating; the right photo runs out of step with the left.
   The frame floats (so the hover glow moves with it); the shadow breathes on the photo. */
.story__photo { position: relative; animation: float 6s ease-in-out infinite; }
.story__photo img { position: relative; animation: floatShadow 6s ease-in-out infinite; }
.story__photo--right,
.story__photo--right img { animation-delay: -3s; }

@keyframes float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -14px; }
}
@keyframes floatShadow {
  0%, 100% { box-shadow: 0 20px 50px rgba(58, 42, 28, 0.2); }
  50%      { box-shadow: 0 34px 60px rgba(58, 42, 28, 0.14); }
}

/* Maroon glow behind the photo on hover */
.story__photo::before {
  content: "";
  position: absolute;
  inset: -6%;
  border-radius: 24px;
  background: radial-gradient(ellipse at center, rgba(110, 31, 31, 0.75), rgba(110, 31, 31, 0.35) 55%, transparent 75%);
  filter: blur(28px);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  pointer-events: none;
}
@media (hover: hover) {
  .story__photo:hover::before { opacity: 1; transform: scale(1.05); }
}

/* ═══════════ EVENTS ═══════════ */
.events { padding: 8rem 0; text-align: center; background: var(--cream); }

.events__grid {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);  /* all four celebrations in one row */
  gap: 1.5rem;
}

.event {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  min-height: 440px;
  display: flex;
  align-items: flex-end;
  box-shadow: 0 20px 50px rgba(58, 42, 28, 0.15);
}

.event__media {
  position: absolute;
  inset: 0;
  /* Swap for a photo: style="--img: url('assets/Images/x.jpg'); --pos: center 30%"
     --size (e.g. auto 130%) zooms the photo so --pos can also move it up or down */
  background: #6b5842 var(--img) var(--pos, center) / var(--size, cover) no-repeat;
  scale: var(--flip, 1) 1;  /* --flip: -1 mirrors the photo; works alongside the hover zoom */
  transform: scale(1.08);
  transition: transform 1.8s var(--ease);
}
.event:hover .event__media { transform: scale(1.15); }

/* Text panel melts into the photo: cream fades up from the bottom, no box edges */
.event__card {
  position: relative;
  width: 100%;
  padding: 5.5rem 1.6rem 1.6rem;
  background: linear-gradient(
    to bottom,
    rgba(255, 250, 240, 0) 0%,
    rgba(255, 250, 240, 0.75) 35%,
    rgba(255, 250, 240, 0.95) 60%,
    rgba(255, 250, 240, 0.97) 100%
  );
  text-align: left;
}

.event__date {
  position: absolute;
  top: 0.6rem;
  right: 1.4rem;
  width: 68px;
  padding: 0.5rem 0;
  text-align: center;
  font-family: var(--display);
  color: var(--white);
  background: var(--maroon);
  border-radius: 8px;
  line-height: 1.1;
}
.event__date b     { display: block; font-size: 1.6rem; font-weight: 500; }
.event__date span  { display: block; font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; }
.event__date small { display: block; font-size: 0.6rem; opacity: 0.8; }

.event h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.4rem;
  letter-spacing: 0.1em;
  color: var(--maroon);
}
.event__time  { font-weight: 500; }
.event__place { color: var(--ink-soft); font-size: 1rem; }
.event__dress { margin-top: 0.5rem; font-style: italic; font-size: 0.95rem; color: var(--gold); }

/* ═══════════ COUPLE ═══════════ */
.couple { padding: 8rem 0; text-align: center; }

.couple__grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;  /* headings and photos line up even when one name wraps longer */
  gap: 2rem;
}

.person__heading {
  font-family: var(--script);
  font-size: clamp(2rem, 4vw, 2.6rem);
  color: var(--maroon);
  line-height: 1.2;
  margin-bottom: 1.2rem;
}

.person__photo {
  width: min(280px, 70vw);
  aspect-ratio: 3 / 4;
  margin: 0 auto 1.5rem;
  border-radius: 999px 999px 16px 16px; /* temple-arch frame */
  background: #6b5842 var(--img) var(--pos, center) / var(--size, cover) no-repeat;
  border: 6px solid var(--white);
  outline: 1px solid var(--gold-soft);
  outline-offset: 6px;
  box-shadow: 0 20px 50px rgba(58, 42, 28, 0.2);
}

.person h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  letter-spacing: 0.06em;
  line-height: 1.4;
  margin: 0.4rem 0;
}
.person__family { font-style: italic; color: var(--ink-soft); }

.couple__and { font-family: var(--script); font-size: 5rem; color: var(--gold); align-self: center; }

/* ═══════════ VENUE ═══════════ */
.venue {
  position: relative;
  padding: 9rem 0;
  text-align: center;
  color: var(--white);
  overflow: hidden;
}
.venue__bg {
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 210, 140, 0.35), transparent 40%),
    linear-gradient(180deg, #14213d 0%, #2c2c54 45%, #7a3b4a 80%, #d98c4a 100%);
}
.venue__veil { position: absolute; inset: 0; background: rgba(15, 10, 20, 0.35); }
.venue__content { position: relative; z-index: 1; }
.venue .eyebrow { color: var(--gold-soft); }

.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(0.8rem, 3vw, 2rem);
  margin: 2.5rem 0;
}
.countdown div {
  width: clamp(70px, 18vw, 110px);
  padding: 1rem 0;
  border: 1px solid rgba(217, 184, 108, 0.5);
  border-radius: 12px;
  background: rgba(255, 250, 240, 0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.countdown b {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  line-height: 1.1;
}
.countdown span { font-size: 0.7rem; letter-spacing: 0.25em; text-transform: uppercase; opacity: 0.8; }

.venue__addr { font-style: italic; font-size: 1.2rem; }

/* ═══════════ FOOTER ═══════════ */
.footer { padding: 6rem 1.25rem; text-align: center; }
.footer .script { font-size: 3rem; color: var(--maroon); }
.footer__families { font-family: var(--display); letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.9rem; margin-top: 0.5rem; }
.footer__note { font-style: italic; color: var(--ink-soft); margin-top: 0.4rem; }

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 1100px) and (min-width: 761px) {
  /* Tablets: text on top, the two photos side by side below */
  .story__layout { grid-template-columns: 1fr 1fr; gap: 3.5rem 2.5rem; }
  .story__text { grid-column: 1 / -1; order: -1; }
  /* Four cards across is too tight here: two by two */
  .events__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  body { font-size: 1.05rem; }
  .events, .couple { padding: 5.5rem 0; }
  .story { --fade: 180px; }
  .couple__grid { grid-template-columns: 1fr; }
  /* Stacked: left photo, text, right photo — each photo full width */
  .story__layout { grid-template-columns: 1fr; gap: 3rem; }
  .story__photo { width: min(100%, 440px); margin-inline: auto; }
  .couple__and { font-size: 3.5rem; }
  .events__grid { grid-template-columns: 1fr; }
  .event { min-height: 400px; }
  /* Date on one line, city on the next */
  .hero__sep  { display: none; }
  .hero__city { display: block; margin-top: 0.3em; }
  .verse .highlight { font-size: 2rem; }
  .countdown span { font-size: 0.6rem; letter-spacing: 0.12em; }
}

/* Respect users who turn animations off */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .reveal { opacity: 1; transform: none; filter: none; }
  .story__photo,
  .story__photo img { animation: none; }
}
