/* =========================================================
   SHAGNA INVITES — "GOLDEN HOUR" DEMO
   Aarav & Meera — Interactive Wedding Invitation
   ========================================================= */

:root {
  --ivory: #FFF0E6;
  --peach: #F3B39D;
  --peach-deep: #E08B73;
  --terracotta: #D98270;
  --gold: #C99A5B;
  --plum: #4A2735;
  --blush: #F3E0DA;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Manrope', sans-serif;
  color: var(--plum);
  background: var(--ivory);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

body.unlocked {
  overflow-y: auto;
  overflow-x: hidden;
}

main {
  width: 100%;
}

/* subtle film-grain, CSS/SVG only — no image assets */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 41;
  pointer-events: none;
  opacity: 0.025;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* =========================================================
   FRAME
   ========================================================= */

.frame-border {
  position: fixed;
  inset: 14px;
  border-radius: 16px;
  border: 1px solid rgba(201, 154, 91, 0.55);
  outline: 1px solid rgba(201, 154, 91, 0.22);
  outline-offset: 6px;
  pointer-events: none;
  z-index: 40;
}

/* =========================================================
   PAGE 1 — WELCOME
   ========================================================= */

.page-welcome {
  position: relative;
  height: 100vh;
  height: 100svh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 46px 24px 32px;
  background:
    radial-gradient(
      ellipse 640px 260px at 84% 94%,
      rgba(255, 240, 210, 0.85) 0%,
      rgba(255, 240, 210, 0) 70%
    ),
    radial-gradient(
      ellipse 900px 380px at 50% -8%,
      rgba(255, 255, 255, 0.6) 0%,
      rgba(255, 255, 255, 0) 72%
    ),
    linear-gradient(
      180deg,
      var(--ivory) 0%,
      var(--peach) 55%,
      var(--peach-deep) 100%
    );
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.page-welcome.closing {
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
}

/* soft cloud haze near the base of the hero */
.page-welcome::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 55% 16% at 18% 92%,
      rgba(255, 255, 255, 0.4),
      transparent 70%
    ),
    radial-gradient(
      ellipse 48% 14% at 76% 96%,
      rgba(255, 255, 255, 0.32),
      transparent 70%
    ),
    radial-gradient(
      ellipse 70% 20% at 50% 102%,
      rgba(247, 216, 204, 0.55),
      transparent 70%
    );
}

/* ============ CORNER BLOSSOM ACCENTS ============ */

.corner-blossom {
  position: absolute;
  width: 100px;
  height: 100px;
  z-index: 2;
  pointer-events: none;
}

.corner-blossom.corner-tl {
  top: -6px;
  left: -6px;
}

.corner-blossom.corner-tr {
  top: -6px;
  right: -6px;
  transform: scaleX(-1);
}

.corner-blossom.corner-bl {
  bottom: -6px;
  left: -6px;
  transform: scaleY(-1);
}

.corner-blossom.corner-br {
  bottom: -6px;
  right: -6px;
  transform: scale(-1, -1);
}

.corner-blossom span {
  position: absolute;
  border-radius: 60% 0 60% 0;
}

.corner-blossom span:nth-child(1) {
  width: 20px;
  height: 14px;
  top: 10px;
  left: 14px;
  background: var(--terracotta);
  opacity: 0.55;
  transform: rotate(30deg);
}

.corner-blossom span:nth-child(2) {
  width: 14px;
  height: 10px;
  top: 28px;
  left: 4px;
  background: var(--peach);
  opacity: 0.6;
  transform: rotate(55deg);
}

.corner-blossom span:nth-child(3) {
  width: 10px;
  height: 7px;
  top: 44px;
  left: 22px;
  background: var(--gold);
  opacity: 0.5;
  transform: rotate(10deg);
}

.corner-blossom span:nth-child(4) {
  width: 9px;
  height: 6px;
  top: 6px;
  left: 38px;
  background: var(--terracotta);
  opacity: 0.4;
  transform: rotate(-15deg);
}

.corner-blossom span:nth-child(5) {
  width: 7px;
  height: 5px;
  top: 52px;
  left: 2px;
  background: var(--peach);
  opacity: 0.45;
  transform: rotate(75deg);
}

/* radial glow behind the couple's names */
.couple {
  position: relative;
}

.couple::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 520px;
  height: 420px;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(201, 154, 91, 0.35) 0%,
    transparent 70%
  );
  filter: blur(30px);
  z-index: -1;
  pointer-events: none;
}

/* ============ BRAND ============ */

.brand {
  position: relative;
  z-index: 3;
  text-align: center;
}

.brand-mark {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.brand-sub {
  margin: 8px 0 0;
  font-family: 'Manrope', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--plum);
  opacity: 0.55;
}

/* ============ HERO CONTENT ============ */

.hero-content {
  position: relative;
  z-index: 3;
  flex: 1;
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
}

/* ============ COUPLE ============ */

.couple-names {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  line-height: 1;
}

.couple-names .name {
  font-size: clamp(2.8rem, 8.5vw, 5.4rem);
}

.couple-names .amp {
  font-family: 'Allura', cursive;
  color: var(--terracotta);
  font-size: clamp(2rem, 5.6vw, 3.4rem);
  line-height: 1;
  margin: -4px 0;
}

.tagline {
  margin: 12px 0 0;
  font-family: 'Allura', cursive;
  color: var(--terracotta);
  font-size: clamp(1.5rem, 4vw, 2rem);
}

/* ============ DATE ============ */

.date-row {
  margin-top: 24px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: clamp(6px, 1.6vw, 12px);
  white-space: nowrap;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: clamp(0.64rem, 2.1vw, 0.9rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.date-dash {
  color: var(--gold);
  font-weight: 400;
}

/* ============ MESSAGE ============ */

.message {
  margin: 20px 0 0;
  max-width: 460px;
  font-family: 'Manrope', sans-serif;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--plum);
  opacity: 0.78;
}

/* ============ INVITATION CONTROL ============ */

.invite-control {
  margin-top: 28px;
  background: none;
  border: none;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font: inherit;
}

.invite-control:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 6px;
  border-radius: 4px;
}

.seal-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* small gold twig-and-leaf flourish flanking the seal */
.flourish {
  position: relative;
  width: 30px;
  height: 1px;
  opacity: 0.75;
}

.flourish-left {
  background: linear-gradient(to left, var(--gold), transparent);
}

.flourish-right {
  background: linear-gradient(to right, var(--gold), transparent);
}

.flourish-leaf {
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 6px;
  background: var(--gold);
  opacity: 0.65;
  border-radius: 60% 0 60% 0;
  transform: translateX(-50%) rotate(20deg);
}

.seal {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(201, 154, 91, 0.25);
  animation: sealPulse 2.6s ease-in-out infinite;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.seal-inner {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(201, 154, 91, 0.5);
  background: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
}

.seal-heart {
  color: var(--terracotta);
  font-size: 1.05rem;
  line-height: 1;
}

.invite-control:hover .seal,
.invite-control:focus-visible .seal {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(201, 154, 91, 0.42);
}

.invite-text {
  margin-top: 2px;
}

.invite-title {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--plum);
  transition: color 0.3s ease;
}

.invite-sub {
  display: block;
  margin-top: 4px;
  font-family: 'Manrope', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}

.invite-control:hover .invite-title,
.invite-control:focus-visible .invite-title {
  color: var(--terracotta);
}

/* small down chevron beneath the invitation control */
.chevron-down {
  display: block;
  position: relative;
  width: 10px;
  height: 8px;
  margin: 14px auto 0;
  animation: chevronBob 2.4s ease-in-out infinite;
}

.chevron-down::before,
.chevron-down::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 1px;
  background: var(--gold);
  top: 3px;
}

.chevron-down::before {
  left: 0;
  transform: rotate(45deg);
}

.chevron-down::after {
  right: 0;
  transform: rotate(-45deg);
}

/* ============ FOOTER ============ */

.welcome-footer {
  position: relative;
  z-index: 3;
  margin: 0;
  font-family: 'Manrope', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--plum);
  opacity: 0.5;
  white-space: nowrap;
  text-align: center;
}

/* =========================================================
   PARTICLES
   ========================================================= */

.particles {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  opacity: 0.6;
  animation-name: floatParticle;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}

.particle.p-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.particle.p-star {
  width: 10px;
  height: 10px;
  clip-path: polygon(
    50% 0%,
    61% 39%,
    100% 50%,
    61% 61%,
    50% 100%,
    39% 61%,
    0% 50%,
    39% 39%
  );
}

.particle.p-petal {
  width: 9px;
  height: 6px;
  opacity: 0.4;
  border-radius: 60% 0 60% 0;
  transform: rotate(30deg);
}

/* =========================================================
   REVEAL OVERLAY
   ========================================================= */

.reveal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.2);
  background:
    radial-gradient(
      circle at 50% 46%,
      var(--ivory) 0%,
      var(--peach) 55%,
      transparent 78%
    );
  transition:
    opacity 0.5s ease,
    transform 0.9s cubic-bezier(0.19, 1, 0.22, 1);
}

.reveal-overlay.expand {
  opacity: 1;
  transform: scale(2.6);
}

.reveal-overlay.fade-out {
  opacity: 0;
}

/* =========================================================
   PAGE 2 — OUR STORY
   ========================================================= */

/* =========================================================
   PAGE 2 — OUR STORY
   Clean editorial layout
   ========================================================= */

.page-story {
  position: relative;
  width: 100%;

  height: auto !important;
  min-height: 0 !important;

  padding: 70px 24px 80px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;

  gap: 0;

  background:
    radial-gradient(
      ellipse 70% 50% at 50% 20%,
      rgba(255, 255, 255, 0.55) 0%,
      rgba(255, 255, 255, 0) 70%
    ),
    linear-gradient(
      180deg,
      var(--ivory) 0%,
      var(--blush) 100%
    );

  opacity: 1;
transition: none;

  overflow: visible;
}

/* Safety fallback: once the invitation is opened,
   the story page must always become visible. */

body.unlocked .page-story {
  opacity: 1;
  visibility: visible;
}

.section-eyebrow {
  margin: 0 0 10px;
  font-family: 'Manrope', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
}

/* ============ NAVIGATION ============ */

.floaty-nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 10px 22px;
  border-radius: 999px;
  background: rgba(255, 248, 241, 0.82);
  border: 1px solid rgba(201, 154, 91, 0.3);
  box-shadow: 0 8px 24px rgba(74, 39, 53, 0.08);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease 0.2s;
}

body.unlocked .floaty-nav {
  opacity: 1;
  pointer-events: auto;
}

.nav-mark {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--terracotta);
  padding-right: 14px;
  border-right: 1px solid rgba(201, 154, 91, 0.35);
}

.nav-link {
  font-family: 'Manrope', sans-serif;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--plum);
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.25s ease, color 0.25s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  opacity: 1;
  color: var(--terracotta);
}

/* ============ STORY ============ */
/* =========================================================
   STORY CONTENT
   ========================================================= */

.story-inner {
  width: 100%;
  max-width: 620px;

  display: flex;
  flex-direction: column;
  align-items: center;

  text-align: center;

  scroll-margin-top: 100px;
}

.story-inner .section-eyebrow {
  margin-bottom: 8px;
}

.story-names {
  margin: 0 0 28px;

  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;

  font-size: clamp(2.2rem, 5vw, 3rem);
  line-height: 1.05;

  color: var(--plum);
}

.photo-placeholder {
  width: min(100%, 300px);
  height: 400px;

  margin: 0 auto;

  border-radius: 8px;
  overflow: hidden;

  background:
    linear-gradient(
      145deg,
      var(--peach) 0%,
      var(--terracotta) 100%
    );

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--ivory);

  font-family: 'Manrope', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;

  box-shadow:
    0 20px 45px rgba(74, 39, 53, 0.12);
}

.photo-placeholder img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.story-text {
  margin: 26px 0 0;

  max-width: 430px;

  font-family: 'Cormorant Garamond', serif;
  font-style: italic;

  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  line-height: 1.55;

  color: var(--plum);
  opacity: 0.82;
}

/* ============ EVENTS ============ */

.celebration-inner {
  width: 100%;
  max-width: 820px;
  display: flex;
  flex-direction: column;
  align-items: center;
  scroll-margin-top: 100px;
}
.celebration-title {
  margin: 8px 0 0;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.08;
  text-align: center;
  color: var(--plum);
}

.event-symbol {
  width: 34px;
  height: 34px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  color: var(--gold);
  border: 1px solid rgba(201, 154, 91, 0.4);
  border-radius: 50%;
}
.events-grid {
  width: 100%;
  margin-top: 42px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.event-card {
  background: var(--ivory);
  border: 1px solid rgba(201, 154, 91, 0.32);
  border-radius: 6px;
  padding: 30px 18px;
  text-align: center;
  box-shadow: 0 12px 26px rgba(74, 39, 53, 0.06);
}

.event-name {
  margin: 0 0 10px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  color: var(--plum);
}

.event-date {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta);
}

.event-time {
  margin: 4px 0 0;
  font-family: 'Manrope', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--plum);
  opacity: 0.6;
}

/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes sealPulse {
  0%, 100% {
    box-shadow: 0 6px 18px rgba(201, 154, 91, 0.25);
  }

  50% {
    box-shadow: 0 6px 28px rgba(201, 154, 91, 0.48);
  }
}

@keyframes chevronBob {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(4px);
  }
}

@keyframes floatParticle {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0.5;
  }

  50% {
    transform: translateY(-18px) translateX(6px);
    opacity: 0.85;
  }

  100% {
    transform: translateY(0) translateX(0);
    opacity: 0.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  .seal,
  .particle,
  .chevron-down {
    animation: none !important;
  }

  .page-welcome,
  .page-story,
  .reveal-overlay,
  .invite-control .seal {
    transition: none !important;
  }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 640px) {
  .frame-border {
    inset: 10px;
    outline-offset: 4px;
  }

  .page-welcome {
    padding: 34px 18px 26px;
  }

  .events-grid {
    grid-template-columns: 1fr;
    max-width: 340px;
  }

  .page-story {
    /* REDUCED MOBILE TOP SPACE */
    padding: 30px 18px 60px;

    /* REDUCED MOBILE GAP */
    gap: 45px;
  }

  .nav-mark {
    padding-right: 10px;
    margin-right: 2px;
  }

  .floaty-nav {
    gap: 14px;
    padding: 9px 16px;
  }

  .corner-blossom {
    width: 70px;
    height: 70px;
  }
}

@media (max-height: 700px) {
  .brand-sub {
    margin-top: 4px;
  }

  .hero-content {
    gap: 4px;
  }

  .invite-control {
    margin-top: 18px;
  }

  .seal {
    width: 62px;
    height: 62px;
  }

  .seal-inner {
    width: 42px;
    height: 42px;
  }
}

@media (max-height: 620px) {
  .corner-blossom {
    display: none;
  }

  .couple-names .name {
    font-size: clamp(2.1rem, 7.5vw, 3.2rem);
  }

  .tagline {
    margin-top: 6px;
  }

  .message {
    margin-top: 12px;
  }

  .chevron-down {
    display: none;
  }
}