:root{
  --bg: #FBF1EC;
  --card: #FFFAF6;
  --wine: #4A1420;
  --wine-soft: #7A3546;
  --gold: #B9873E;
  --gold-light: #E4C88D;
  --rose: #C15D78;
  --green: #59683F;
  --text-secondary: #93726A;
  --hairline: rgba(74,20,32,0.14);
  --radius: 4px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}
*{box-sizing:border-box;}
html{scroll-behavior:smooth; background:#E8DAD2;}
/* The site is built for phones only. On a wider screen it stays one phone-width
   column. The transform makes that column, not the window, the frame for the
   fixed pieces (monogram, side arrows, falling petals), and container-type lets
   type sizes follow the column width rather than the screen. */
body{
  margin:0 auto;
  max-width:430px; min-height:100vh; min-height:100dvh;
  position:relative; transform:translateZ(0); container-type:inline-size;
  box-shadow:0 0 70px rgba(74,20,32,0.14);
  background:var(--bg);
  color:var(--wine);
  font-family:'Jost', sans-serif;
  font-weight:300;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
h1,h2,h3{font-family:'Cormorant Garamond', serif; font-weight:500; margin:0;}
.script{font-family:'Playfair Display', serif; font-style:italic;}
.eyebrow{
  font-size:12px;
  letter-spacing:3px;
  text-transform:uppercase;
  color:var(--gold);
  font-weight:500;
}
a{color:var(--wine-soft);}
img{max-width:100%; display:block;}
.wrap{max-width:760px; margin:0 auto; padding:0 24px;}

/* -------- vine divider (signature motif, static) -------- */
.vine{ width:100%; display:block; margin:0 auto; max-width:280px; }
.vine path{ fill:none; stroke:var(--green); stroke-width:1.2; stroke-linecap:round; }
.vine .petal{ fill:var(--rose); opacity:0.85; }
.vine .petal-alt{ fill:var(--gold); opacity:0.9; }

/* -------- persistent brand mark -------- */
.booklet-mark{
  position:fixed; top:22px; left:26px;
  z-index:1;  /* behind the pages, so cards scroll over it and it shows faintly through them */
  font-family:'Playfair Display', serif; font-style:italic; font-weight:600;
  font-size:30px; color:var(--wine); opacity:0.88; pointer-events:none;
  text-shadow:0 0 3px rgba(255,250,246,0.95), 0 0 14px rgba(255,250,246,0.95);  /* stays legible over the roses */
}

/* -------- falling petals & flowers (persistent overlay, in front of cards) -------- */
.petal-drift{
  position:fixed; width:34px; height:auto; opacity:0;
  animation:driftDown 13s ease-in infinite; z-index:15; pointer-events:none;
}
.petal-drift-1{ left:8%;  top:-6%; width:30px; animation-delay:0s; }
.petal-drift-2{ left:78%; top:-6%; width:26px; animation-delay:2.6s; }
.petal-drift-3{ left:44%; top:-6%; width:22px; animation-delay:5.2s; }
.petal-drift-4{ left:63%; top:-6%; width:32px; animation-delay:7.8s; }
.petal-drift-5{ left:24%; top:-6%; width:24px; animation-delay:10.4s; }
.flower-drift-1{ left:90%; top:-6%; width:30px; animation-delay:3.8s; animation-duration:15s; }
.flower-drift-2{ left:35%; top:-6%; width:26px; animation-delay:8.6s; animation-duration:14s; }
@keyframes driftDown{
  0%{ transform:translate(0,0) rotate(0deg); opacity:0; }
  10%{ opacity:0.7; }
  90%{ opacity:0.5; }
  100%{ transform:translate(26px, 100vh) rotate(240deg); opacity:0; }
}
@media (prefers-reduced-motion: reduce){
  .petal-drift{ animation:none; opacity:0; }
}

/* -------- booklet pages -------- */
#invitation-content.active{
  /* roses and diyas in the corners; its shape is close to a phone screen,
     so filling the screen only trims a sliver from the sides */
  background:#F7ECDF url('../Images/booklet-bg.webp') center / cover no-repeat;
  display:block; position:relative; min-height:100vh; min-height:100dvh; overflow-x:hidden;
  perspective:2200px; animation:screenFade 0.8s ease;
}
/* Each page fills the stage and scrolls on its own if its content is taller than
   the screen. The card centres itself with auto margins (not justify-content:center),
   because centring an overflowing flex column pushes its top off-screen where it
   can't be scrolled back to. */
.page{
  display:none; width:100%;
  flex-direction:column; align-items:center; justify-content:flex-start;
  text-align:center; position:absolute; inset:0;
  overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain;
  scrollbar-width:thin; scrollbar-color:rgba(185,135,62,0.4) transparent;
  padding:90px 20px 110px;
  /* transparent: the background lives on the booklet behind every page, so the
     monogram can sit between that background and the cards */
  background:transparent;
  perspective:1600px;   /* the depth the leaf turns through */
}
.page.active{ display:flex; z-index:3; }
/* page turn for Reduce Motion: the outgoing page just fades away over the next one */
.page.fade-turning{ z-index:4; opacity:0; transition:opacity 0.4s ease; }
.page.flip-under{ display:flex; z-index:2; }

/* Turning a page of the booklet. The floral backdrop is the surface the booklet
   rests on, so it holds still -- only the card moves, hinged at its gutter edge
   like a leaf being lifted. The outgoing page drops its own backdrop for the
   duration so the page beneath (same backdrop, next card) shows through it. */
.page.flip-turning{
  z-index:4;
  background-color:transparent; background-image:none;
}
.page.flip-turning .page-card{
  backface-visibility:hidden;
  /* a leaf being turned is opaque paper, not frosted glass -- and this keeps a
     backdrop-filter off an element mid-rotation, which iOS handles badly */
  background:var(--card);
  -webkit-backdrop-filter:none; backdrop-filter:none;
  box-shadow:0 26px 58px rgba(74,20,32,0.32);
  transition:transform 0.72s cubic-bezier(.36,.06,.28,1), box-shadow 0.72s ease;
}
.page.flip-forward .page-card{ transform-origin:left center; transform:rotateY(-158deg); }
.page.flip-backward .page-card{ transform-origin:right center; transform:rotateY(158deg); }
/* the light falling off the paper as it lifts, away from whichever edge it is
   hinged on */
.page.flip-turning .page-card::after{ opacity:1; }
.page.flip-backward .page-card::after{
  background:linear-gradient(260deg, rgba(74,20,32,0) 32%, rgba(74,20,32,0.34));
}
@media (prefers-reduced-motion: reduce){
  .page.flip-turning .page-card{ transition:none; }
}

.page-card{
  position:relative; z-index:3; width:100%; max-width:600px; margin-block:auto;
  background:rgba(255,250,246,0.4); -webkit-backdrop-filter:blur(1.5px); backdrop-filter:blur(1.5px);
  border:0.5px solid rgba(185,135,62,0.35); border-radius:20px;
  padding:44px 34px; box-shadow:0 20px 50px rgba(74,20,32,0.14);
}
.page-card::after{
  content:''; position:absolute; inset:0; border-radius:inherit;
  background:linear-gradient(100deg, rgba(74,20,32,0) 32%, rgba(74,20,32,0.34));
  opacity:0; pointer-events:none;
  transition:opacity 0.72s ease;
}
.page-card--cover, .page-card--center{ padding:48px 34px; }

.page-daylabel{
  font-size:12px; letter-spacing:2px; text-transform:uppercase;
  color:var(--gold); font-weight:500; margin:0 0 26px; text-align:center;
}
.page-events{ display:flex; flex-direction:column; gap:20px; align-items:stretch; }
.page-subtext{
  font-family:'Cormorant Garamond', serif; font-style:italic; font-size:16px;
  color:var(--wine-soft); margin:8px 0 30px;
}
.eyebrow-title{
  font-family:'Playfair Display', serif; font-style:italic; font-weight:600;
  font-size:clamp(24px, 5vw, 34px); font-size:clamp(24px, 5cqi, 34px); color:var(--gold);
}

/* -------- cover page -------- */
.hero-logo{
  width:112px; height:112px; border-radius:50%;
  margin:0 auto 20px; display:block; object-fit:cover;
  box-shadow:0 6px 20px rgba(74,20,32,0.16);
}
.page-card .eyebrow{ margin-bottom:16px; }
h1{
  font-family:'Playfair Display', serif; font-style:italic; font-weight:600;
  font-size:clamp(32px, 7vw, 54px); font-size:clamp(32px, 7cqi, 54px); line-height:1.2; color:var(--wine); margin:0;
}
/* the couple's names stack as three lines, with the ampersand centred on its own
   line between them. Set a little smaller than the names so it reads as a join
   rather than a third name. */
.amp{
  display:block; color:var(--rose);
  font-size:0.6em; line-height:1.15; margin:0.04em 0;
}
.tagline{
  margin-top:14px; font-family:'Cormorant Garamond', serif;
  font-style:italic; font-size:18px; color:var(--wine-soft);
}
.dates{
  margin-top:20px; font-size:13px; letter-spacing:2px;
  text-transform:uppercase; color:var(--text-secondary);
}

/* -------- countdown -------- */
.countdown{
  display:flex; justify-content:center; gap:14px;
  margin:8px auto 0; flex-wrap:wrap;
}
.countdown .unit{
  background:var(--card);
  border:0.5px solid var(--hairline);
  border-radius:8px;
  width:78px; padding:16px 0 13px;
  text-align:center;
}
.countdown .num{
  font-family:'Cormorant Garamond', serif;
  font-size:32px; font-weight:600; color:var(--wine);
  display:block;
}
.countdown .label{
  font-size:10px; letter-spacing:1.5px; text-transform:uppercase;
  color:var(--text-secondary); margin-top:4px; display:block;
}
.countdown{ flex-wrap:nowrap; gap:8px; }
.countdown .unit{ flex:1 1 0; min-width:0; width:auto; padding:14px 0 11px; }
.countdown .num{ font-size:26px; }
.countdown .label{ font-size:9px; letter-spacing:1px; }

/* -------- event cards (within booklet pages) -------- */
.event-card{
  position:relative;
  background:var(--card);
  border:1px solid var(--gold-light);
  border-radius:14px;
  padding:28px 24px;
  display:grid;
  grid-template-columns:96px 1fr;
  gap:18px;
  align-items:center;
  text-align:left;
  box-shadow:0 12px 30px rgba(74,20,32,0.12);
}
.event-card::before{
  content:'';
  position:absolute; inset:6px;
  border:0.5px solid rgba(185,135,62,0.45);
  border-radius:9px;
  pointer-events:none;
}
.card-corner{ position:absolute; width:26px; height:26px; opacity:0.85; pointer-events:none; }
.card-corner--tl{ top:7px; left:7px; }
.card-corner--br{ bottom:7px; right:7px; transform:scale(-1,-1); }
.event-card.minor{ padding:13px 20px; grid-template-columns:48px 1fr; align-items:flex-start; background:transparent; border-style:dashed; box-shadow:none; }
.event-icon{
  width:96px; height:96px; border-radius:50%;
  background:var(--bg);
  display:flex; align-items:center; justify-content:center;
  color:var(--rose);
  border:1.5px solid var(--gold-light);
  box-shadow:0 0 0 4px var(--card), 0 0 0 5px rgba(185,135,62,0.4);
}
.event-icon svg{ width:58px; height:58px; }
.event-icon img{ width:100%; height:100%; object-fit:contain; border-radius:50%; }
.minor .event-icon{ width:48px; height:48px; border:none; box-shadow:none; }
.minor .event-icon svg{ width:24px; height:24px; }
.event-card{ grid-template-columns:68px 1fr; gap:12px; padding:20px 16px; }
.event-icon{ width:68px; height:68px; }
.event-icon svg{ width:42px; height:42px; }
.card-corner{ width:20px; height:20px; }
.event-time{
  font-size:11px; letter-spacing:1.5px; text-transform:uppercase;
  color:var(--gold); font-weight:500; margin-bottom:4px; display:block;
}
.event-title{
  font-size:21px; color:var(--wine); display:inline-block;
  padding-bottom:6px; border-bottom:0.5px solid var(--gold-light);
}
.event-subtitle{
  font-size:12.5px; letter-spacing:1px; text-transform:uppercase;
  color:var(--text-secondary); margin-top:6px;
}
.event-desc{ font-size:14px; line-height:1.6; color:var(--wine-soft); margin-top:8px; }
.event-venue{
  margin-top:10px; font-size:13px; color:var(--text-secondary);
  display:flex; align-items:flex-start; gap:6px;
}
.event-venue svg{ width:14px; height:14px; margin-top:2px; flex-shrink:0; color:var(--rose); }

/* -------- dress code: spans the full card beneath the icon and text -------- */
.dress-code{
  grid-column:1 / -1;
  margin-top:2px; padding:16px 0 10px;
  border-top:0.5px dashed var(--gold-light);
  text-align:center;
}
.dress-code-label{
  font-family:'Cormorant Garamond', serif; font-style:italic;
  font-size:13px; color:var(--text-secondary);
}
.dress-code-theme{
  font-family:'Cormorant Garamond', serif; font-weight:600;
  font-size:18px; color:var(--wine); margin-top:1px;
  text-wrap:balance;
}
/* four equal columns that share whatever width the card has */
.swatches{
  list-style:none; margin:12px auto 0; padding:0; max-width:280px;
  display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:8px;
}
.swatches li{ display:flex; flex-direction:column; align-items:center; gap:7px; min-width:0; }
/* each colour sits in the same gold-ringed setting as the event icon */
.swatches li::before{
  content:''; width:30px; height:30px; border-radius:50%;
  background:var(--c);
  box-shadow:0 0 0 3px var(--card), 0 0 0 4px rgba(185,135,62,0.45);
}
.swatches span{ font-size:10.5px; letter-spacing:0.3px; color:var(--text-secondary); line-height:1.2; }
/* a choice of outfits, for dress codes that are about style rather than colour */
.dress-options{
  display:flex; justify-content:center; align-items:center; gap:10px; flex-wrap:wrap;
  margin-top:12px;
}
.dress-option{
  font-size:12.5px; letter-spacing:0.3px; color:var(--wine);
  padding:7px 16px; border-radius:30px;
  background:var(--bg); border:0.5px solid var(--gold-light);
}
.dress-or{ font-family:'Cormorant Garamond', serif; font-style:italic; font-size:15px; color:var(--text-secondary); }
/* a pearl-like highlight, for dress codes that should read as shimmering */
.swatches--shimmer li::before{
  background:
    radial-gradient(circle at 30% 26%, rgba(255,255,255,0.95) 0, rgba(255,255,255,0) 42%),
    linear-gradient(140deg, rgba(255,255,255,0) 45%, rgba(255,255,255,0.55) 58%, rgba(255,255,255,0) 70%),
    var(--c);
}
.dress-code{ padding:14px 0 12px; }
.swatches{ gap:4px; }
.swatches li::before{ width:26px; height:26px; }
.swatches span{ font-size:10px; letter-spacing:0.1px; }
/* the smallest phones cannot fit four labels across, so they pair up */
@media (max-width:340px){
  .swatches{ grid-template-columns:repeat(2, minmax(0, 1fr)); max-width:150px; row-gap:10px; }
}

/* -------- ornament divider between events -------- */
.ornament-divider{ width:100%; max-width:280px; height:auto; margin:4px auto; display:block; }
.simul-note{
  text-align:center; font-size:12px; font-style:italic; color:var(--text-secondary);
  font-family:'Cormorant Garamond', serif; margin:-6px 0 -2px;
}
.event-note{
  margin-top:8px; font-size:12px; font-style:italic; color:var(--text-secondary);
  font-family:'Cormorant Garamond', serif;
}

/* -------- venue -------- */
.page-card .day-header{ margin-bottom:24px; }
.venue-section .eyebrow, .gallery-section .eyebrow, .connect-section .eyebrow{ margin-bottom:8px; }
.venue-section h2, .gallery-section h2, .connect-section h2{ font-size:28px; color:var(--wine); margin-bottom:0; }
.venue-card{
  background:var(--card); border:0.5px solid var(--hairline); border-radius:14px;
  max-width:520px; margin:0 auto 16px; overflow:hidden; text-align:left;
}
.venue-photo{ width:100%; height:170px; object-fit:cover; display:block; }
.venue-card--simple .venue-body{ padding:22px 26px; }
.venue-card--simple h3{ margin-bottom:6px; }
.venue-map{ width:100%; height:210px; border:0; display:block; filter:sepia(12%) saturate(85%); }
.venue-body{ padding:24px 26px 26px; }
.venue-body h3{ font-size:21px; margin-bottom:6px; }
.venue-body p{ font-size:14px; color:var(--text-secondary); line-height:1.6; margin:0 0 14px; }
.venue-link{
  display:inline-flex; align-items:center; gap:6px;
  font-size:12.5px; letter-spacing:1px; text-transform:uppercase;
  text-decoration:none; color:var(--rose); font-weight:500;
  border-bottom:1px solid var(--rose); padding-bottom:2px;
}
.venue-note{
  max-width:520px; margin:16px auto 0; text-align:center;
  font-size:13px; font-style:italic; color:var(--text-secondary);
  font-family:'Cormorant Garamond', serif;
}

/* -------- gallery -------- */
/* two columns: tall photos sit in pairs, wide ones span the row, and every
   photo keeps its own shape so no one gets cropped out */
.gallery-grid{
  display:grid; grid-template-columns:repeat(2, 1fr); gap:10px;
  max-width:360px; margin:22px auto 0;
}
/* each photo sits in a thin cream mount, like a printed photograph */
.gallery-photo{
  margin:0; padding:5px;
  background:var(--card); border:0.5px solid var(--gold-light); border-radius:8px;
  box-shadow:0 8px 20px rgba(74,20,32,0.12);
}
.gallery-photo img{
  width:100%; height:auto; aspect-ratio:2 / 3;  /* holds the space while the photo loads */
  object-fit:cover; border-radius:4px;
}
.gallery-photo--wide{ grid-column:1 / -1; }
.gallery-photo--wide img{ aspect-ratio:3 / 2; }

/* -------- closing -------- */
.closing p.eyebrow{ margin-bottom:16px; }
.closing h2{
  font-family:'Playfair Display', serif; font-style:italic; font-weight:600;
  font-size:clamp(26px, 5vw, 38px); font-size:clamp(26px, 5cqi, 38px); color:var(--wine);
}
.closing .sign{ margin-top:14px; font-size:14px; color:var(--text-secondary); }
.closing-footer{
  margin-top:28px; padding-top:22px; border-top:0.5px solid var(--hairline);
  font-size:11px; letter-spacing:1px; color:var(--text-secondary);
}

/* -------- booklet navigation (side arrows) -------- */
.side-arrow{
  position:fixed; top:50%; transform:translateY(-50%);
  width:44px; height:44px; border-radius:50%;
  border:0.5px solid var(--hairline); background:rgba(255,250,246,0.78);
  -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); color:var(--wine); font-size:20px; line-height:1;
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  box-shadow:0 8px 22px rgba(74,20,32,0.16); z-index:100;
  transition:border-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}
.side-arrow--left{ left:14px; }
.side-arrow--right{ right:14px; }
.side-arrow:hover:not(:disabled){ border-color:var(--gold-light); transform:translateY(-50%) translateY(-1px); }
.side-arrow:disabled{ opacity:0.25; cursor:default; }
.side-arrow{ width:36px; height:36px; font-size:16px; }
.side-arrow--left{ left:8px; }
.side-arrow--right{ right:8px; }

@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto;}
}

a:focus-visible{
  outline:2px solid var(--rose); outline-offset:2px;
}

/* -------- hashtag -------- */
.hashtag{
  margin-top:12px; font-family:'Playfair Display', serif; font-style:italic; font-weight:500;
  font-size:19px; color:var(--rose);
}

/* -------- connect section -------- */
.connect-section{ padding:58px 24px 6px; text-align:center; }
/* one column with shared edges: the pair on top, the two long pills beneath */
.connect-buttons{
  display:flex; flex-direction:column; align-items:center; gap:12px;
  width:100%; max-width:360px; margin:10px auto 0;
}
.connect-buttons > .connect-btn{ width:100%; justify-content:center; }
/* the two personal handles always sit side by side as a matched pair */
.connect-pair{ display:flex; justify-content:center; gap:10px; width:100%; }
.connect-btn{
  display:inline-flex; align-items:center; gap:9px;
  background:var(--card); border:0.5px solid var(--hairline);
  border-radius:30px; padding:13px 24px; text-decoration:none;
  color:var(--wine); font-size:13.5px; letter-spacing:0.3px;
  white-space:nowrap;
  transition:border-color .2s ease, color .2s ease, transform .2s ease;
}
.connect-btn:hover{ border-color:var(--rose); color:var(--rose); transform:translateY(-1px); }
.connect-btn svg{ width:18px; height:18px; flex-shrink:0; }
.connect-btn--person{
  flex:1 1 0; min-width:0; flex-direction:column; gap:0;
  padding:9px 14px; text-align:center;
}
.who-name{ font-family:'Cormorant Garamond', serif; font-size:16px; font-weight:600; line-height:1.25; }
.who-handle{ font-size:11px; letter-spacing:0.3px; color:var(--text-secondary); line-height:1.35; }
.connect-btn--person:hover .who-handle{ color:var(--rose); }
/* a phone card leaves only about 220px across, so the section gives back its
   side padding and the pair tightens up rather than dropping into a stack */
.connect-section{ padding-left:10px; padding-right:10px; }
.connect-btn--person{ padding:8px 8px; }
.who-name{ font-size:14px; }
.who-handle{ font-size:10px; letter-spacing:0.2px; }
/* on the smallest phones the stack reaches out into the card padding, which is
   the only room left to keep the longer handle inside its pill */
@media (max-width:380px){
  .connect-buttons{ width:calc(100% + 36px); max-width:none; margin-left:-18px; margin-right:-18px; }
  .connect-pair{ gap:8px; }
  .connect-btn--person{ padding:8px 6px; }
  .who-handle{ font-size:9.5px; letter-spacing:0.1px; }
}
.connect-hashtag{ margin-top:22px; font-size:13px; color:var(--text-secondary); }
.connect-hashtag span{ font-family:'Playfair Display', serif; font-style:italic; font-weight:500; font-size:16px; color:var(--rose); margin-left:4px; }

/* -------- scroll-down hint (shown only while a page has more below) -------- */
.scroll-hint{
  position:fixed; left:50%; bottom:max(18px, env(safe-area-inset-bottom));
  transform:translate(-50%, 8px);
  display:flex; align-items:center; justify-content:center;
  padding:8px 18px;  /* a comfortable tap target around the arrows */
  background:transparent; border:0;
  cursor:pointer; z-index:50;
  opacity:0; pointer-events:none;
  transition:opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.scroll-hint.is-visible{ opacity:1; pointer-events:auto; transform:translate(-50%, 0); }
.scroll-hint-arrow{
  width:28px; height:28px; display:block; overflow:visible;
  fill:none; stroke:var(--wine); stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round;
}
/* a wide soft cream stroke under each chevron: the glow, drawn without a CSS filter */
.scroll-hint-arrow .glow{ stroke:rgba(255,250,246,0.9); stroke-width:6; }
/* the two chevrons bob together, the lower one a beat behind, so they ripple downward */
.scroll-hint-arrow .chev{ animation:hintBob 1.6s var(--ease-in-out) infinite; }
.scroll-hint-arrow .chev-1{ opacity:0.55; }
.scroll-hint-arrow .chev-2{ animation-delay:0.15s; }
@keyframes hintBob{ 0%, 100%{ transform:translateY(-2px); } 50%{ transform:translateY(3px); } }
@media (prefers-reduced-motion: reduce){
  .scroll-hint{ transition:opacity 0.35s ease; transform:translate(-50%, 0); }
  .scroll-hint-arrow .chev{ animation:none; }
}

/* -------- intro screens: Ganesha + envelope -------- */
.intro-screen{
  display:none; min-height:100vh; flex-direction:column;
  align-items:center; justify-content:center; text-align:center;
  padding:56px 24px; position:relative;
  background-size:cover; background-position:center; background-repeat:no-repeat;
}
.intro-screen.active{ display:flex; animation:screenFade 0.7s ease; }
@keyframes screenFade{ from{opacity:0;} to{opacity:1;} }

.ganesha-illustration{ width:210px; height:auto; margin:0 auto 22px; }
.intro-screen .eyebrow-title{
  font-family:'Playfair Display', serif; font-style:italic; font-weight:600;
  font-size:clamp(28px, 6vw, 42px); font-size:clamp(28px, 6cqi, 42px); color:var(--gold); margin-bottom:16px;
}
.intro-screen .blessing{
  max-width:290px;  /* keeps the line clear of the roses at the sides */ font-size:14.5px; line-height:1.7; color:var(--text-secondary);
  margin:0 auto 36px;
}
.begin-btn{
  background:var(--card); border:0.5px solid var(--hairline);
  border-radius:30px; padding:15px 38px; font-family:'Jost', sans-serif;
  font-size:13.5px; letter-spacing:0.5px; color:var(--wine);
  cursor:pointer; box-shadow:0 8px 20px rgba(74,20,32,0.14);
  transition:transform 0.25s ease, border-color 0.25s ease;
}
.begin-btn:hover{ transform:translateY(-2px); border-color:var(--gold-light); }

.envelope-wrap{
  position:relative; width:100%; max-width:420px;
  cursor:pointer; -webkit-tap-highlight-color:transparent;
}
/* The envelope body's shadow lives here rather than on either photo, so it stays
   put across the open/close cross-fade. The wrap's box is exactly the closed
   envelope's footprint (the open photo overflows above it), which is the part
   that should look grounded. */
.envelope-wrap::before{
  content:''; position:absolute; inset:0; z-index:0;
  border-radius:6px; box-shadow:0 18px 40px rgba(74,20,32,0.16);
  transition:opacity 0.7s var(--ease-out) 0.1s;
}
/* the shadow belongs to the closed envelope; left behind it outlines a box */
.envelope-wrap.is-open::before{ opacity:0; }
/* the closed envelope, exactly as originally designed: the photo (with its own
   mat) inside a rounded, clipped box. It fades away as the open envelope takes
   over. No filters anywhere in here -- on iOS Safari a filtered layer over this
   transparent cutout rendered as a solid white block. */
.envelope-closed{
  position:relative; z-index:1; overflow:hidden; border-radius:6px;
  transition:opacity 0.7s var(--ease-out) 0.1s;
}
.envelope-wrap.is-open .envelope-closed{ opacity:0; }
.envelope-image{ width:100%; height:auto; display:block; }
.wax-seal-btn{
  position:absolute; left:50.1%; top:62%; width:19.5%; aspect-ratio:1/1;
  transform:translate(-50%,-50%); border-radius:50%; z-index:4;
  background:none; border:none; padding:0; cursor:pointer;
  animation:sealPulse 2.6s ease-in-out infinite;
}
.wax-seal-btn::after{
  content:''; position:absolute; inset:-14%; border-radius:50%;
  box-shadow:0 0 0 0 rgba(184,30,40,0.35); animation:sealGlow 2.6s ease-in-out infinite;
}
.wax-seal-btn:hover{ animation-play-state:paused; }
.wax-seal-btn:hover::after{ animation-play-state:paused; }
.wax-seal-btn.is-breaking{
  animation:none !important; pointer-events:none;
  transition:transform 0.5s var(--ease-out), opacity 0.5s var(--ease-out) 0.18s;
  transform:translate(-50%,-50%) scale(1.35) rotate(18deg); opacity:0;
}
.wax-seal-btn.is-breaking::after{ animation:none !important; box-shadow:none; }
@keyframes sealPulse{
  0%, 100%{ transform:translate(-50%,-50%) scale(1); }
  50%{ transform:translate(-50%,-50%) scale(1.05); }
}
@keyframes sealGlow{
  0%, 100%{ box-shadow:0 0 0 0 rgba(184,30,40,0.28); }
  50%{ box-shadow:0 0 0 10px rgba(184,30,40,0); }
}

/* the open envelope: a cutout (transparent background) of the opened-envelope
   photo, pre-scaled so its left, right and bottom edges land on the closed
   envelope's; the flap rises above. Because the photo's own backdrop is gone,
   the real page background shows around the flap. The file's canvas extends
   above the closed envelope's box, bottom-anchored to it. */
.envelope-image-open{
  position:absolute; left:0; bottom:0; width:100%; height:auto; z-index:2;
  display:block; opacity:0;
  transition:opacity 1.1s var(--ease-out) 0.35s;
}
.envelope-wrap.is-open .envelope-image-open{ opacity:1; }

/* the invitation card that rises out of the envelope -- a purpose-built keyframe
   arrival (not a plain transition) so it settles with a soft, alive overshoot
   rather than a mechanical ease into place; this only ever plays once per visit,
   so it doesn't need to be interruptible the way a transition would */
.envelope-card-peek{
  position:absolute; left:50%; top:44%; width:84%; z-index:3;
  transform:translate(-50%, 6%) scale(0.62); opacity:0;
  background:var(--card); border:0.5px solid rgba(185,135,62,0.4);
  border-radius:12px; padding:30px 22px 34px;
  box-shadow:0 20px 46px rgba(74,20,32,0.26);
}
.envelope-wrap.is-open .envelope-card-peek{
  animation:envelopeCardRise 1.15s var(--ease-out) 1.4s forwards;
}
@keyframes envelopeCardRise{
  0%{ transform:translate(-50%, 6%) scale(0.62); opacity:0; }
  55%{ opacity:1; }
  82%{ transform:translate(-50%, -80%) scale(1.025); }
  100%{ transform:translate(-50%, -76%) scale(1); opacity:1; }
}
.envelope-card-peek .peek-logo{
  width:56px; height:56px; border-radius:50%; object-fit:cover;
  margin:0 auto 12px; display:block; box-shadow:0 4px 12px rgba(74,20,32,0.16);
}
.envelope-card-peek .eyebrow{ margin-bottom:8px; font-size:10.5px; }
.envelope-card-peek h2{
  font-family:'Playfair Display', serif; font-style:italic; font-weight:600;
  color:var(--wine); font-size:clamp(21px, 5.5vw, 30px); font-size:clamp(21px, 5.5cqi, 30px); margin:0;
}
.envelope-card-peek .peek-dates{
  font-family:'Cormorant Garamond', serif; font-style:italic;
  color:var(--wine-soft); font-size:13.5px; margin:10px 0 0;
}
.envelope-card-peek .peek-hashtag{
  margin-top:10px; font-family:'Playfair Display', serif; font-style:italic;
  font-weight:500; font-size:15px; color:var(--rose);
}

.envelope-caption{
  margin-top:24px; font-size:11px; letter-spacing:2px; text-transform:uppercase;
  color:var(--text-secondary);
}
/* Reduce Motion means gentler, not gone: the whole reveal still plays, but as soft
   fades only -- no travel, scale, rotation or blur. (Switching it off entirely left
   people with the setting on, common on iPhones, with no visible envelope opening,
   card or page turns at all.) */
@keyframes sealGlowSoft{ 0%, 100%{ opacity:0.3; } 50%{ opacity:1; } }
@media (prefers-reduced-motion: reduce){
  .wax-seal-btn{ animation:none; }
  .wax-seal-btn::after{ animation:sealGlowSoft 3.2s ease-in-out infinite; box-shadow:0 0 0 8px rgba(184,30,40,0.22); }
  .wax-seal-btn.is-breaking{ transition:none; }
  .envelope-closed{ transition:opacity 0.6s ease; }
  .envelope-image-open{ transition:opacity 0.8s ease 0.15s; }
  .envelope-card-peek{ transform:translate(-50%, -76%) scale(1); transition:opacity 0.7s ease 0.7s; }
  .envelope-wrap.is-open .envelope-card-peek{ animation:none; opacity:1; }
}
#invitation-content{ display:none; }
