/* ============================================================
   Nileena & Abhishek — Kerala heritage wedding invitation
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root{
  --ivory:#FAF7F2;
  --gold:#B38B59;
  --blush:#EBC9CF;
  --teak:#6B4C3B;
  --sage:#879883;
  --charcoal:#3C342F;

  --gold-light:#D9BC8E;
  --gold-dark:#8C6A42;
  --teak-dark:#4A342A;
  --card:#FDFBF7;
  --ivory-deep:#F4EDE3;
  --rule:rgba(179,139,89,.34);

  --ff-head:"Cormorant Garamond", Georgia, "Times New Roman", serif;
  --ff-label:"Cinzel", Georgia, serif;
  --ff-script:"Parisienne", "Snell Roundhand", cursive;
  --ff-body:"Lora", Georgia, serif;
  --ff-om:"Noto Serif Devanagari", "Cormorant Garamond", serif;

  --fs-names:clamp(1.7rem, 7.4vw, 2.6rem);
  --fs-h2:clamp(1.65rem, 5.2vw, 2.7rem);
  --fs-body:clamp(.95rem, 2.7vw, 1.06rem);
  --fs-label:clamp(.66rem, 2.1vw, .78rem);

  --pad-section:clamp(4rem, 11vw, 8.5rem);
  --wrap:min(92vw, 680px);
}

/* ---------- 2. Base ---------- */
*,*::before,*::after{ box-sizing:border-box; }

html{
  -webkit-text-size-adjust:100%;
  scroll-behavior:smooth;
}

body{
  margin:0;
  background:var(--ivory);
  color:var(--charcoal);
  font-family:var(--ff-body);
  font-size:var(--fs-body);
  line-height:1.85;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

/* Paper grain — a single static noise tile, kept faint. */
body::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:90;
  pointer-events:none;
  opacity:.05;
  mix-blend-mode:multiply;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23n)'/%3E%3C/svg%3E");
}

img,svg,iframe{ max-width:100%; }
p{ margin:0; }
h1,h2{ margin:0; font-weight:400; }

.svg-sprite{ position:absolute; width:0; height:0; overflow:hidden; }

.skip-link{
  position:absolute;
  left:50%;
  top:-100px;
  transform:translateX(-50%);
  z-index:200;
  background:var(--card);
  color:var(--teak);
  border:1px solid var(--gold);
  padding:.75rem 1.4rem;
  font-family:var(--ff-label);
  font-size:.75rem;
  letter-spacing:.14em;
  text-transform:uppercase;
  text-decoration:none;
  transition:top .2s ease;
}
.skip-link:focus-visible{ top:14px; }

:focus-visible{
  outline:2px solid var(--gold-dark);
  outline-offset:3px;
}

/* ---------- 3. Shared type ---------- */
.om{
  display:block;
  font-family:var(--ff-om);
  color:var(--gold);
  line-height:1;
  font-size:clamp(1.8rem, 6vw, 2.5rem);
}
.om--sm{ font-size:clamp(1.5rem, 5vw, 2rem); margin-bottom:.5em; }
.om--lg{ font-size:clamp(2.6rem, 9vw, 4rem); margin-bottom:.35em; }

.eyebrow{
  font-family:var(--ff-label);
  font-size:var(--fs-label);
  letter-spacing:.34em;
  text-transform:uppercase;
  color:var(--gold-dark);
  margin-bottom:1.1rem;
}

.section__title{
  font-family:var(--ff-head);
  font-size:var(--fs-h2);
  font-weight:400;
  font-style:italic;
  color:var(--teak);
  line-height:1.25;
  margin-bottom:clamp(2rem, 6vw, 3.4rem);
}
.section__title--quiet{
  font-family:var(--ff-label);
  font-style:normal;
  font-size:clamp(.8rem, 2.6vw, .95rem);
  letter-spacing:.4em;
  text-transform:uppercase;
  color:var(--gold-dark);
}

.names{
  font-family:var(--ff-script);
  font-size:var(--fs-names);
  color:var(--teak);
  line-height:1.15;
  padding:.08em 0;
  text-wrap:balance;
}
.names__amp{ color:var(--gold); font-size:.72em; padding:0 .06em; }

.rule{
  display:block;
  width:min(78%, 240px);
  height:auto;
  margin:clamp(1.1rem,3.4vw,1.9rem) auto;
  color:var(--gold);
}

.ornament{
  display:block;
  width:clamp(74px, 17vw, 108px);
  height:auto;
  margin:0 auto clamp(1.6rem,4vw,2.4rem);
  color:var(--gold);
}
.ornament--lg{ width:clamp(96px, 22vw, 140px); margin-top:clamp(1.6rem,4vw,2.4rem); }

.swastik{
  display:block;
  width:clamp(30px, 7vw, 40px);
  height:auto;
  margin:0 auto;
  color:var(--gold);
  opacity:.55;
}

/* ---------- 4. Sections & seams ---------- */
.section{
  position:relative;
  padding:var(--pad-section) 0;
  text-align:center;
}
.section--venue{ background:var(--ivory-deep); }
.section--blessings{
  background:
    radial-gradient(ellipse 80% 60% at 50% 12%, rgba(217,188,142,.24), transparent 70%),
    var(--ivory);
  padding-bottom:calc(var(--pad-section) * 1.15);
}

.wrap{ width:var(--wrap); margin-inline:auto; }
.wrap--narrow{ width:min(90vw, 560px); }

.seam{
  display:flex;
  justify-content:center;
  padding:clamp(1.6rem, 5vw, 2.8rem) 0;
  background:var(--ivory);
}
.seam svg{
  width:min(62vw, 200px);
  height:auto;
  color:var(--gold);
  opacity:.55;
}

/* ---------- 5. Hero ---------- */
.hero{
  position:relative;
  min-height:100svh;
  overflow:hidden;
  background:var(--ivory);
}
@supports (min-height:100dvh){
  .hero{ min-height:100dvh; }
}

/* The plate keeps the artwork's aspect ratio so the inscription always lands inside the arch.
   Transform centring is used because grid alignment clamps an oversized item to the start edge. */
.hero__plate{
  position:absolute;
  top:0;
  left:50%;
  transform:translateX(-50%);
  height:100%;
  aspect-ratio:735 / 1041;
  container-type:size;
  container-name:plate;
}

.hero__art{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transform:translate3d(0, var(--py, 0px), 0);
}

/* Arch opening measured from the artwork: 33%-77% vertically, inside the gold rules. */
.inscription{
  position:absolute;
  left:19%;
  right:19%;
  top:33.5%;
  bottom:23.5%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  z-index:2;
}

.inscription__eyebrow{
  font-family:var(--ff-script);
  color:var(--gold-dark);
  line-height:1.1;
  font-size:clamp(1.25rem, 5vw, 1.8rem);
  font-size:4.7cqw;
}
.inscription__date{
  font-family:var(--ff-label);
  letter-spacing:.28em;
  text-transform:uppercase;
  color:var(--charcoal);
  margin-top:.7em;
  font-size:clamp(.62rem, 2.2vw, .78rem);
  font-size:2.1cqw;
}
.inscription .names{
  margin-top:.5em;
  font-size:clamp(1.5rem, 6.8vw, 2.4rem);
  font-size:6.3cqw;
}
.inscription__welcome{
  font-style:italic;
  color:var(--charcoal);
  line-height:1.85;
  max-width:30ch;
  margin-top:1em;
  font-size:clamp(.74rem, 2.6vw, .92rem);
  font-size:2.45cqw;
}

/* Fixed to the viewport so petals keep falling through every section. */
.petals{ position:fixed; inset:0; overflow:hidden; z-index:5; pointer-events:none; }

/* The petal box spans the full height, so translateY percentages give a true top-to-bottom fall. */
.petal{
  position:absolute;
  top:0;
  left:var(--x);
  width:var(--size, 16px);
  height:100%;
  opacity:0;
}
.petal i{
  display:block;
  width:100%;
  aspect-ratio:1;
  background-repeat:no-repeat;
  background-size:contain;
  filter:drop-shadow(0 1px 2px rgba(60,52,47,.3));
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%23FFFDF8' stroke='%23C6A472' stroke-width='.55'%3E%3Cellipse cx='12' cy='6.2' rx='3.5' ry='5.7'/%3E%3Cellipse cx='12' cy='6.2' rx='3.5' ry='5.7' transform='rotate(72 12 12)'/%3E%3Cellipse cx='12' cy='6.2' rx='3.5' ry='5.7' transform='rotate(144 12 12)'/%3E%3Cellipse cx='12' cy='6.2' rx='3.5' ry='5.7' transform='rotate(216 12 12)'/%3E%3Cellipse cx='12' cy='6.2' rx='3.5' ry='5.7' transform='rotate(288 12 12)'/%3E%3C/g%3E%3Ccircle cx='12' cy='12' r='2.3' fill='%23E3BE93'/%3E%3C/svg%3E");
}

.petal--1 { --x:6%;  --size:17px; --dur:11s;   --delay:-1s;  --drift:26px;  }
.petal--2 { --x:14%; --size:12px; --dur:14s;   --delay:-6s;  --drift:-20px; }
.petal--3 { --x:24%; --size:20px; --dur:9.5s;  --delay:-3s;  --drift:34px;  }
.petal--4 { --x:33%; --size:14px; --dur:13s;   --delay:-8s;  --drift:-28px; }
.petal--5 { --x:42%; --size:18px; --dur:10.5s; --delay:-2s;  --drift:22px;  }
.petal--6 { --x:50%; --size:11px; --dur:15s;   --delay:-11s; --drift:-16px; }
.petal--7 { --x:58%; --size:19px; --dur:9s;    --delay:-5s;  --drift:30px;  }
.petal--8 { --x:67%; --size:13px; --dur:12.5s; --delay:-9s;  --drift:-24px; }
.petal--9 { --x:76%; --size:16px; --dur:11.5s; --delay:-4s;  --drift:28px;  }
.petal--10{ --x:84%; --size:21px; --dur:10s;   --delay:-7s;  --drift:-32px; }
.petal--11{ --x:91%; --size:12px; --dur:13.5s; --delay:-12s; --drift:18px;  }
.petal--12{ --x:97%; --size:15px; --dur:11s;   --delay:-10s; --drift:-22px; }

/* ---------- 6. Scroll cue ---------- */
.scroll-cue{
  position:absolute;
  left:50%;
  bottom:clamp(12px, 2.6vh, 32px);
  transform:translateX(-50%);
  z-index:4;
  display:inline-flex;
  flex-direction:column;
  align-items:center;
  gap:.35rem;
  font-family:var(--ff-label);
  font-size:.6rem;
  letter-spacing:.26em;
  text-transform:uppercase;
  color:var(--gold-dark);
  text-decoration:none;
  padding:.6rem 1.15rem .5rem;
  border-radius:999px;
  background:rgba(253,251,247,.93);
  border:1px solid var(--rule);
  box-shadow:0 4px 14px rgba(40,52,32,.22);
}
.scroll-cue svg{ width:14px; height:auto; }
.scroll-cue:hover{ color:var(--teak); background:#FDFBF7; }

/* ---------- 7. Invitation card ---------- */
.card,
.venue{
  position:relative;
  background:var(--card);
  border:1px solid var(--rule);
  padding:clamp(2.4rem, 8vw, 4.2rem) clamp(1.4rem, 6vw, 3.6rem);
  box-shadow:0 20px 46px rgba(60,52,47,.07);
}
.card::before,
.venue::before{
  content:"";
  position:absolute;
  inset:7px;
  border:1px solid var(--rule);
  pointer-events:none;
}

.card__corner{
  position:absolute;
  width:clamp(28px, 6vw, 40px);
  height:auto;
  color:var(--gold);
  opacity:.6;
}
.card__corner--tl{ top:15px; left:15px; }
.card__corner--tr{ top:15px; right:15px; transform:scaleX(-1); }
.card__corner--bl{ bottom:15px; left:15px; transform:scaleY(-1); }
.card__corner--br{ bottom:15px; right:15px; transform:scale(-1); }

.host{
  font-family:var(--ff-head);
  font-size:clamp(1.05rem, 3.4vw, 1.3rem);
  font-weight:500;
  color:var(--teak);
  line-height:1.5;
}
.host__address{
  font-size:clamp(.82rem, 2.4vw, .92rem);
  line-height:1.85;
  color:var(--charcoal);
  opacity:.82;
  margin-top:.45rem;
}

.invite-line{
  font-style:italic;
  font-size:clamp(.88rem, 2.6vw, 1rem);
  line-height:2;
  max-width:38ch;
  margin:clamp(1.8rem, 5vw, 2.6rem) auto;
  color:var(--charcoal);
}

.couple{
  font-family:var(--ff-script);
  font-size:clamp(2.2rem, 10.4vw, 3.8rem);
  color:var(--teak);
  line-height:1.25;
  padding:.06em 0;
}
.couple__joiner{
  font-family:var(--ff-head);
  font-style:italic;
  font-size:clamp(1rem, 3.2vw, 1.2rem);
  color:var(--gold-dark);
  margin:.25rem 0;
}

.card .host:nth-of-type(2){ margin-top:clamp(1.6rem, 4.5vw, 2.4rem); }

.details{
  display:grid;
  gap:clamp(1.8rem, 5vw, 2.2rem);
  margin:0;
}
.detail{ display:flex; flex-direction:column; align-items:center; }
.detail__icon{
  width:clamp(26px, 6vw, 34px);
  height:auto;
  color:var(--gold);
  margin-bottom:.7rem;
  opacity:.85;
}
.detail__label{
  font-family:var(--ff-label);
  font-size:.64rem;
  letter-spacing:.26em;
  text-transform:uppercase;
  color:var(--gold-dark);
  margin-bottom:.5rem;
}
.detail__value{
  font-family:var(--ff-head);
  font-size:clamp(1rem, 3.1vw, 1.18rem);
  font-weight:500;
  color:var(--teak);
  margin:0;
  line-height:1.4;
}
.detail__meta{
  font-size:.78rem;
  line-height:1.7;
  color:var(--charcoal);
  opacity:.72;
  margin:.3rem 0 0;
}

.sharing{
  font-family:var(--ff-head);
  font-style:italic;
  font-size:clamp(.92rem, 2.8vw, 1.05rem);
  color:var(--charcoal);
  line-height:2;
}
.sharing span{
  font-family:var(--ff-label);
  font-style:normal;
  font-size:.72rem;
  letter-spacing:.24em;
  text-transform:uppercase;
  color:var(--gold-dark);
}

/* ---------- 8. Venue ---------- */
.venue__name{
  font-family:var(--ff-head);
  font-size:clamp(1.4rem, 5vw, 2rem);
  font-weight:500;
  color:var(--teak);
  line-height:1.3;
}
.venue__address{
  font-size:clamp(.86rem, 2.5vw, .95rem);
  line-height:1.85;
  opacity:.82;
  margin-top:.6rem;
}
.venue__when{
  font-family:var(--ff-label);
  font-size:var(--fs-label);
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--gold-dark);
  margin-top:1rem;
}

.venue__map{
  position:relative;
  margin:clamp(1.8rem, 5vw, 2.6rem) 0 .9rem;
  aspect-ratio:4/3;
  border:1px solid var(--rule);
  background:var(--ivory-deep);
  overflow:hidden;
}
.venue__map iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
  filter:sepia(.16) saturate(.86);
}
.venue__fallback{
  font-size:.76rem;
  line-height:1.7;
  opacity:.6;
  max-width:44ch;
  margin-inline:auto;
}

.venue__actions{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:clamp(1.6rem, 5vw, 2.2rem);
  margin-top:clamp(1.8rem, 5vw, 2.4rem);
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.6rem;
  min-height:48px;
  padding:.85rem 2.2rem;
  border:1px solid var(--gold);
  background:transparent;
  color:var(--teak);
  font-family:var(--ff-label);
  font-size:.74rem;
  letter-spacing:.22em;
  text-transform:uppercase;
  text-decoration:none;
  transition:background-color .35s ease, color .35s ease;
}
.btn svg{ width:17px; height:17px; }
.btn:hover{ background:var(--gold); color:#FFFDF9; }

.qr{ margin:0; display:flex; flex-direction:column; align-items:center; gap:.7rem; }
.qr img{
  width:clamp(112px, 30vw, 150px);
  height:auto;
  padding:10px;
  background:#fff;
  border:1px solid var(--rule);
}
.qr figcaption{
  font-family:var(--ff-label);
  font-size:.62rem;
  letter-spacing:.22em;
  text-transform:uppercase;
  color:var(--gold-dark);
}

/* ---------- 9. Blessings ---------- */
.blessing{
  font-family:var(--ff-head);
  font-style:italic;
  font-size:clamp(1.15rem, 4.4vw, 1.7rem);
  line-height:1.85;
  color:var(--teak);
  max-width:26ch;
  margin-inline:auto;
}

/* ---------- 10. Credit ---------- */
.credit{
  text-align:center;
  padding:0 1.5rem clamp(2.2rem, 6vw, 3.2rem);
  background:var(--ivory);
}
.credit p{
  font-family:var(--ff-label);
  font-size:.64rem;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--gold-dark);
  line-height:1.9;
}
.credit__heart{
  font-size:.9em;
  letter-spacing:0;
  vertical-align:baseline;
}

/* ---------- 11. Audio toggle ---------- */
.audio-toggle{
  position:fixed;
  right:clamp(12px, 3vw, 26px);
  bottom:clamp(12px, 3vw, 26px);
  z-index:80;
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  min-height:48px;
  min-width:48px;
  padding:0 1rem;
  border:1px solid var(--gold);
  border-radius:999px;
  background:#FDFBF7;
  color:var(--teak);
  font-family:var(--ff-label);
  font-size:.6rem;
  letter-spacing:.16em;
  text-transform:uppercase;
  cursor:pointer;
  box-shadow:0 6px 20px rgba(40,52,32,.28);
  transition:transform .3s ease, opacity .3s ease;
}
/* Slides aside while scrolling so it never covers the invitation text. */
.audio-toggle.is-tucked{
  transform:translateX(calc(100% + 28px));
  opacity:0;
}
.audio-toggle[hidden]{ display:none; }
.audio-toggle svg{
  width:20px;
  height:20px;
  flex:none;
  fill:none;
  stroke:currentColor;
  stroke-width:1.3;
  stroke-linecap:round;
}
.audio-toggle__speaker{ fill:currentColor; stroke-linejoin:round; }
.audio-toggle__waves{ opacity:0; }
.audio-toggle__slash{ opacity:1; }
.audio-toggle.is-playing{ background:var(--gold); color:#FFFDF7; border-color:var(--gold-dark); }
.audio-toggle.is-playing .audio-toggle__waves{ opacity:1; }
.audio-toggle.is-playing .audio-toggle__slash{ opacity:0; }
.audio-toggle__label{ white-space:nowrap; }

/* A brief ring on arrival so guests notice the music is available. */
.audio-toggle.is-inviting::after{
  content:"";
  position:absolute;
  inset:-4px;
  border-radius:inherit;
  border:1px solid var(--gold);
  animation:audio-ring 2.4s ease-out 3;
  pointer-events:none;
}
@keyframes audio-ring{
  0%   { transform:scale(1);    opacity:.75; }
  70%  { transform:scale(1.18); opacity:0; }
  100% { transform:scale(1.18); opacity:0; }
}

/* Narrow screens keep the icon only so the control never crowds the scroll cue. */
@media (max-width:520px){
  .audio-toggle{ padding:0; width:48px; justify-content:center; }
  .audio-toggle__label{
    position:absolute;
    width:1px; height:1px;
    overflow:hidden;
    clip-path:inset(50%);
  }
}

/* ---------- 12. Motion ---------- */
.js-reveal .reveal{
  opacity:0;
  transform:translateY(20px);
  transition:opacity .95s ease, transform .95s cubic-bezier(.22,.7,.3,1);
}
.js-reveal .reveal.is-in{ opacity:1; transform:none; }

/* The artwork is never animated so it can paint immediately as the largest element. */
.inscription{ animation:rise 1.1s cubic-bezier(.22,.7,.3,1) .15s both; }
.scroll-cue{ animation:rise-cue 1.1s ease .7s both; }
@keyframes rise{
  from{ opacity:0; transform:translateY(16px); }
  to{ opacity:1; transform:none; }
}
@keyframes rise-cue{
  from{ opacity:0; transform:translate(-50%, 16px); }
  to{ opacity:1; transform:translate(-50%, 0); }
}

.petal{ animation:petal-fall var(--dur, 12s) linear var(--delay, 0s) infinite; }
.petal i{ animation:petal-drift var(--dur, 12s) ease-in-out var(--delay, 0s) infinite; }
@keyframes petal-fall{
  0%   { transform:translateY(-14%); opacity:0; }
  8%   { opacity:.95; }
  90%  { opacity:.8; }
  100% { transform:translateY(112%); opacity:0; }
}
@keyframes petal-drift{
  0%   { transform:translateX(0) rotate(0deg); }
  50%  { transform:translateX(var(--drift, 20px)) rotate(190deg); }
  100% { transform:translateX(0) rotate(380deg); }
}

.is-paused .petal,
.is-paused .petal i{ animation-play-state:paused; }

/* ---------- 13. Breakpoints ---------- */
/* Short landscape screens fit the artwork to width instead of height. */
@media (max-height:520px){
  .hero{ min-height:0; }
  .hero__plate{ position:relative; left:auto; transform:none; margin-inline:auto; width:100vw; height:auto; }
}

@media (min-width:600px){
  .details{ grid-template-columns:repeat(3, 1fr); gap:1.6rem; }
  .venue__actions{ flex-direction:row; justify-content:center; gap:clamp(2rem,6vw,3.4rem); }
  .venue__map{ aspect-ratio:16/10; }
}

@media (min-width:900px){
  .card,.venue{ padding:clamp(3.4rem,5vw,4.6rem) clamp(3rem,5vw,4.4rem); }
}

/* ---------- 14. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }

  .petals{ display:none; }

  .inscription,
  .scroll-cue,
  .audio-toggle,
  .audio-toggle.is-inviting::after{ animation:none; transition:none; }

  .js-reveal .reveal{
    opacity:1;
    transform:none;
    transition:none;
  }

  *,*::before,*::after{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
  }
}
