/* ============================================================================
   ANJALY & SIRAJ — WEDDING INVITATION
   Stylesheet. Mobile-first: the base rules style phones, and the
   @media (min-width: …) blocks at the end of each section scale it up to
   tablets and desktops. Colours and spacing live in :root — change them once
   and the whole site follows.
   ========================================================================== */

/* ---------------------------------------------------------------- 1. Tokens */
:root {
  --maroon-900: #3f0a12;
  --maroon-800: #4e0d17;
  --maroon: #6d1420;
  --maroon-600: #8c1c2b;
  --maroon-100: #f3dde1;

  --gold: #c9a227;
  --gold-light: #e3c777;
  --gold-deep: #a8861c;
  --gold-line: rgba(201, 162, 39, 0.38);

  --ivory: #fdf8ef;
  --cream: #f7ecda;
  --cream-2: #f1e2c9;
  --paper: #fffdf8;

  --ink: #3b2a22;
  --ink-soft: #6f5b4c;
  --leaf: #2f5d3a;

  --shadow-sm: 0 8px 20px -14px rgba(77, 13, 23, 0.55);
  --shadow: 0 22px 46px -26px rgba(77, 13, 23, 0.45);
  --radius: 18px;
  --radius-lg: 24px;

  --wrap: 1120px;
  --wrap-narrow: 760px;
  --header-h: 64px;
  --gutter: clamp(18px, 5vw, 34px);
  --section-y: clamp(58px, 10vw, 112px);

  --font-script: "Great Vibes", "Segoe Script", cursive;
  --font-serif: "Cormorant Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-sans: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mal: "Noto Serif Malayalam", "Cormorant Garamond", Georgia, serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 14px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--ivory);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(201, 162, 39, 0.07), transparent 42%),
    radial-gradient(circle at 88% 92%, rgba(109, 20, 32, 0.05), transparent 45%);
  overflow-x: hidden;
}

body.is-loading { overflow: hidden; height: 100%; }

img, svg, iframe { max-width: 100%; display: block; }
h1, h2, h3, p, ul, ol, figure, blockquote, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--maroon); }

/* The [hidden] attribute must always win. Several components below set
   display: flex/grid, and an author rule like that would otherwise keep a
   "hidden" element on screen. */
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 18px;
  background: var(--maroon);
  color: var(--ivory);
  border-radius: 0 0 12px 0;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------- 3. Layout */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.wrap--narrow { max-width: var(--wrap-narrow); }

.section { position: relative; padding: var(--section-y) 0; }

.section--tinted {
  background: linear-gradient(180deg, var(--ivory) 0%, var(--cream) 22%, var(--cream) 78%, var(--ivory) 100%);
}
.section--tinted::before,
.section--tinted::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-line) 20%, var(--gold-line) 80%, transparent);
}
.section--tinted::before { top: 0; }
.section--tinted::after { bottom: 0; }

/* ---------------------------------------------------- 4. Section headings */
.section__header { text-align: center; margin-bottom: clamp(28px, 6vw, 52px); }

.section__malayalam {
  font-family: var(--font-mal);
  font-size: clamp(1rem, 3.6vw, 1.2rem);
  letter-spacing: 0.06em;
  color: var(--gold-deep);
  margin-bottom: 6px;
}

.section__heading {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2rem, 7.5vw, 3.2rem);
  line-height: 1.14;
  color: var(--maroon);
  letter-spacing: 0.01em;
  text-wrap: balance;
}
.section__heading--sm { font-size: clamp(1.25rem, 4.6vw, 1.8rem); }

.section__sub {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: clamp(0.95rem, 3.4vw, 1.06rem);
  text-wrap: pretty;
}

.section__divider {
  width: min(320px, 72%);
  height: auto;
  margin: 18px auto 0;
  opacity: 0.9;
}

/* --------------------------------------------------------- 5. Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 50px;
  padding: 14px 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.86rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
              background-color 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease);
}

.btn--gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, var(--gold-deep));
  color: var(--maroon-800);
  box-shadow: 0 14px 28px -16px rgba(201, 162, 39, 0.95);
}
.btn--gold:hover { transform: translateY(-2px); box-shadow: 0 20px 34px -18px rgba(201, 162, 39, 1); }

.btn--outline {
  background: transparent;
  border-color: var(--gold);
  color: var(--maroon);
}
.btn--outline:hover { background: rgba(201, 162, 39, 0.12); transform: translateY(-2px); }

.btn--sm { min-height: 44px; padding: 11px 20px; font-size: 0.78rem; }
.btn--block { width: 100%; }

/* -------------------------------------------------------- 6. Intro curtain */
.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  /* minmax(0, 1fr) matters: an "auto" grid track is sized to max-content and
     would push long lines wider than the screen. */
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: calc(28px + env(safe-area-inset-top)) 22px calc(28px + env(safe-area-inset-bottom));
  text-align: center;
  color: var(--ivory);
  background:
    radial-gradient(circle at 50% 30%, rgba(201, 162, 39, 0.16), transparent 55%),
    linear-gradient(165deg, #7d1a27, #5b0f1a 55%, var(--maroon-900));
  transition: opacity 0.85s var(--ease), visibility 0.85s;
}
.intro.is-open { opacity: 0; visibility: hidden; pointer-events: none; }

.intro__mandala,
.hero__mandala {
  position: absolute;
  inset: -14%;
  background: url("../assets/mandala.svg") center / contain no-repeat;
  animation: spin 150s linear infinite;
  pointer-events: none;
}
.intro__mandala { opacity: 0.14; }
.hero__mandala { opacity: 0.13; }

.intro__inner { position: relative; z-index: 2; width: 100%; max-width: 560px; }

.intro__malayalam {
  font-family: var(--font-mal);
  font-size: clamp(1.5rem, 6.5vw, 2.2rem);
  color: var(--gold-light);
}

.intro__rule {
  display: block;
  width: 96px;
  height: 1px;
  margin: 16px auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.intro__label {
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(253, 248, 239, 0.7);
}

.intro__names {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(2.1rem, 10.5vw, 4.6rem);
  line-height: 1.12;
  margin: 14px 0 4px;
  overflow-wrap: break-word;
}
.intro__amp { display: inline-block; margin: 0 0.14em; color: var(--gold); }

.intro__date {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 3.8vw, 1.35rem);
  color: rgba(253, 248, 239, 0.88);
  letter-spacing: 0.04em;
}

/* The call to action. It is deliberately chunky and pressable: a thick gold
   face, a darker lip underneath, and a slow shine that sweeps across it so a
   guest can see at a glance that this is the thing to tap. */
.intro__button {
  position: relative;
  margin-top: clamp(20px, 5.5vw, 30px);
  min-height: 54px;
  padding: 15px 32px;
  font-size: 0.88rem;
  overflow: hidden;
  box-shadow: 0 5px 0 0 var(--gold-deep), 0 20px 32px -18px rgba(0, 0, 0, 0.8);
}
.intro__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 0 var(--gold-deep), 0 24px 36px -18px rgba(0, 0, 0, 0.85);
}
.intro__button:active,
.intro__button.is-busy {
  transform: translateY(3px);
  box-shadow: 0 2px 0 0 var(--gold-deep), 0 10px 20px -14px rgba(0, 0, 0, 0.8);
}
.intro__button[aria-disabled="true"] { cursor: default; }
.intro__button-icon { display: inline-flex; }
.intro__button-icon svg { display: block; }
.intro__button-label { display: inline-block; }

/* The shine sweep. Kept faint so it invites a tap without sparkling. */
.intro__button::after {
  content: "";
  position: absolute;
  top: -60%;
  bottom: -60%;
  left: -35%;
  width: 32%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.62), transparent);
  transform: rotate(14deg);
  animation: btn-sheen 3.6s var(--ease) 1.4s infinite;
  pointer-events: none;
}
.intro__button.is-busy::after,
.intro__button[aria-disabled="true"]::after { animation: none; opacity: 0; }

@keyframes btn-sheen {
  0%   { left: -35%; opacity: 0; }
  12%  { opacity: 0.9; }
  42%  { left: 118%; opacity: 0; }
  100% { left: 118%; opacity: 0; }
}

/* --------------------------------------------- 6b. The gift box (intro) */
/* Everything below draws the present that opens when a guest taps: wrapped
   box, ribbon, bow, lid, light beam, a card that rises out, and gold sparks.
   It is plain CSS — no image file to load. Sizes come from one clamp() so the
   whole present scales down on small phones. */

.gift {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gift__scene {
  position: relative;
  display: block;
  width: clamp(118px, 30vw, 152px);
  height: clamp(104px, 27vw, 136px);
  margin: clamp(16px, 4.5vw, 26px) auto 0;
  perspective: 760px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  animation: gift-bob 5s ease-in-out infinite;
}

@keyframes gift-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

/* Soft light behind the box, and the beam that spills out of it. */
.gift__glow {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 190%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%) scale(0.55);
  background: radial-gradient(circle, rgba(255, 233, 168, 0.5), transparent 62%);
  opacity: 0.32;
  z-index: 0;
}

.gift__beam {
  position: absolute;
  left: 50%;
  bottom: 26%;
  width: 150%;
  height: 130%;
  transform: translate(-50%, 0) scaleY(0.08);
  transform-origin: 50% 100%;
  background: radial-gradient(ellipse at 50% 100%,
              rgba(255, 243, 205, 0.95), rgba(227, 199, 119, 0.32) 45%, transparent 72%);
  filter: blur(2px);
  opacity: 0;
  z-index: 0;
}

/* The card that rises out of the open box. It sits behind the box walls
   (z-index 1 against 2 and 3), so it reads as coming out of the present. */
.gift__card {
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 12%;
  z-index: 1;
  padding: 9px 7px 10px;
  border-radius: 9px;
  background: linear-gradient(170deg, #fffdf8, var(--cream-2));
  box-shadow: 0 16px 26px -16px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(201, 162, 39, 0.45);
  text-align: center;
  opacity: 0;
  transform: translateY(18%) scale(0.7);
}
.gift__card-names {
  display: block;
  font-family: var(--font-script);
  font-size: clamp(1.05rem, 4vw, 1.35rem);
  line-height: 1.2;
  color: var(--maroon);
}
.gift__card-date {
  display: block;
  margin-top: 2px;
  font-family: var(--font-serif);
  font-size: clamp(0.58rem, 2vw, 0.68rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

/* Gold sparks thrown out of the box (spans are added by js/main.js). */
.gift__sparks { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.gift__spark {
  position: absolute;
  left: 50%;
  top: 34%;
  width: var(--s, 6px);
  height: var(--s, 6px);
  margin: calc(var(--s, 6px) / -2) 0 0 calc(var(--s, 6px) / -2);
  border-radius: 50%;
  background: radial-gradient(circle, #fff8de, var(--gold) 72%);
  box-shadow: 0 0 9px rgba(255, 226, 150, 0.9);
  opacity: 0;
}

/* The box itself. */
.gift__body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 62%;
  z-index: 2;
  border-radius: 5px 5px 8px 8px;
  background: linear-gradient(160deg, #e9d38f, var(--gold) 48%, #8d6d14);
  box-shadow: 0 20px 32px -18px rgba(0, 0, 0, 0.8), inset 0 -10px 18px -12px rgba(0, 0, 0, 0.55);
  transform-origin: 50% 100%;
}
.gift__body::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(112deg, rgba(255, 255, 255, 0.4) 0 16%, transparent 44%);
  pointer-events: none;
}

/* Ribbon down the front of the box (deep maroon against the gold paper). */
.gift__ribbon {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 17%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, var(--maroon-600), var(--maroon-900));
}
.gift__ribbon::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 1px;
  background: rgba(255, 255, 255, 0.22);
}

/* Lid, with its own piece of ribbon and the bow on top. */
.gift__lid {
  position: absolute;
  left: -5%;
  right: -5%;
  top: 29%;
  height: 23%;
  z-index: 3;
  border-radius: 5px;
  background: linear-gradient(160deg, #f2e0a4, var(--gold-light) 45%, var(--gold-deep));
  box-shadow: 0 12px 20px -12px rgba(0, 0, 0, 0.85), inset 0 -6px 12px -8px rgba(0, 0, 0, 0.4);
  transform-origin: 50% 100%;
  backface-visibility: hidden;
}
.gift__lid-ribbon {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 16%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, var(--maroon-600), var(--maroon-900));
}

.gift__bow {
  position: absolute;
  left: 50%;
  bottom: 82%;
  width: clamp(58px, 15vw, 76px);
  height: clamp(30px, 8vw, 40px);
  transform: translateX(-50%);
}
.gift__bow-loop {
  position: absolute;
  bottom: 20%;
  width: 47%;
  height: 92%;
  background: radial-gradient(circle at 32% 28%, var(--maroon-600), var(--maroon-900));
  box-shadow: inset 0 0 0 1px rgba(227, 199, 119, 0.35);
  border-radius: 62% 62% 42% 42% / 74% 74% 34% 34%;
}
.gift__bow-loop--left  { left: 0;  transform-origin: 100% 100%; transform: rotate(-14deg); }
.gift__bow-loop--right { right: 0; transform-origin: 0% 100%;   transform: rotate(14deg); }
.gift__bow-knot {
  position: absolute;
  left: 50%;
  bottom: 6%;
  width: 27%;
  aspect-ratio: 1 / 1;
  transform: translateX(-50%);
  border-radius: 50%;
  z-index: 2;
  background: radial-gradient(circle at 34% 30%, #fdf3d2, var(--gold-deep));
}
.gift__bow-tail {
  position: absolute;
  top: 76%;
  width: 12%;
  height: 64%;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--maroon-600), var(--maroon-900));
}
.gift__bow-tail--left  { left: 33%; transform-origin: top center; transform: rotate(18deg); }
.gift__bow-tail--right { right: 33%; transform-origin: top center; transform: rotate(-18deg); }

/* ------------------------------------------------ 6c. Opening the gift */
/* js/main.js adds .is-opening, then .is-open once the present is open. */

.intro.is-opening .gift__scene { animation: gift-shake 0.55s var(--ease); }

@keyframes gift-shake {
  0%, 100% { transform: rotate(0); }
  20%      { transform: rotate(-2.4deg); }
  45%      { transform: rotate(2.2deg); }
  70%      { transform: rotate(-1.2deg); }
}

.intro.is-opening .gift__glow { animation: gift-glow 1.6s var(--ease) 0.3s forwards; }

@keyframes gift-glow {
  0%   { opacity: 0.32; transform: translate(-50%, -50%) scale(0.55); }
  45%  { opacity: 0.95; transform: translate(-50%, -50%) scale(1.15); }
  100% { opacity: 0.5;  transform: translate(-50%, -50%) scale(1.35); }
}

.intro.is-opening .gift__beam { animation: gift-beam 1.4s var(--ease) 0.55s forwards; }

@keyframes gift-beam {
  0%   { opacity: 0;   transform: translate(-50%, 0) scaleY(0.08); }
  30%  { opacity: 0.9; }
  100% { opacity: 0;   transform: translate(-50%, 0) scaleY(1.1); }
}

/* The bow comes undone and the two loops slip off the box. */
.intro.is-opening .gift__bow-knot { animation: gift-knot-off 0.45s var(--ease) 0.26s forwards; }
@keyframes gift-knot-off {
  0%   { opacity: 1; transform: translateX(-50%) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) scale(0.2); }
}

.intro.is-opening .gift__bow-loop--left {
  animation: gift-loop-left 0.62s var(--ease) 0.26s forwards;
}
@keyframes gift-loop-left {
  0%   { opacity: 1; transform: rotate(-14deg); }
  100% { opacity: 0; transform: translate(-118%, -128%) rotate(-66deg) scale(0.7); }
}

.intro.is-opening .gift__bow-loop--right {
  animation: gift-loop-right 0.62s var(--ease) 0.26s forwards;
}
@keyframes gift-loop-right {
  0%   { opacity: 1; transform: rotate(14deg); }
  100% { opacity: 0; transform: translate(118%, -128%) rotate(66deg) scale(0.7); }
}

.intro.is-opening .gift__bow-tail--left {
  animation: gift-tail-left 0.6s var(--ease) 0.3s forwards;
}
@keyframes gift-tail-left {
  0%   { opacity: 1; transform: rotate(18deg) translateY(0); }
  100% { opacity: 0; transform: rotate(52deg) translateY(60%); }
}

.intro.is-opening .gift__bow-tail--right {
  animation: gift-tail-right 0.6s var(--ease) 0.3s forwards;
}
@keyframes gift-tail-right {
  0%   { opacity: 1; transform: rotate(-18deg) translateY(0); }
  100% { opacity: 0; transform: rotate(-52deg) translateY(60%); }
}

/* The ribbon unwraps the box and slips away upwards. */
.intro.is-opening .gift__ribbon { animation: gift-ribbon-off 0.6s var(--ease) 0.3s forwards; }
@keyframes gift-ribbon-off {
  0%   { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -140%); }
}

/* The lid lifts, tilts and floats away. */
.intro.is-opening .gift__lid { animation: gift-lid-off 1.05s cubic-bezier(0.3, 0.9, 0.35, 1) 0.5s forwards; }
@keyframes gift-lid-off {
  0%   { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
  20%  { transform: translateY(-14%) rotate(-3deg) scale(1); }
  100% { opacity: 0; transform: translateY(-320%) rotate(-17deg) scale(0.9); }
}

/* ...and the card rises out of the open box. */
.intro.is-opening .gift__card { animation: gift-card-rise 1.15s cubic-bezier(0.2, 0.9, 0.3, 1) 0.7s forwards; }
@keyframes gift-card-rise {
  0%   { opacity: 0; transform: translateY(18%) scale(0.7); }
  35%  { opacity: 1; }
  100% { opacity: 1; transform: translateY(-128%) scale(1); }
}

.intro.is-opening .gift__spark {
  animation: gift-spark 1.1s var(--ease) forwards;
  animation-delay: var(--d, 0.55s);
}
@keyframes gift-spark {
  0%   { opacity: 0; transform: translate(0, 0) scale(0.4); }
  18%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--tx, 0px), var(--ty, -48px)) scale(1); }
}

/* While the present opens, the wording above it steps back so the gift is
   the only thing in the spotlight. */
.intro.is-opening .intro__malayalam,
.intro.is-opening .intro__rule,
.intro.is-opening .intro__label,
.intro.is-opening .intro__names,
.intro.is-opening .intro__date,
.intro.is-opening .intro__button,
.intro.is-opening .intro__hint {
  animation: intro-hush 0.5s var(--ease) 0.3s forwards;
}
@keyframes intro-hush {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

.intro__hint {
  margin-top: 16px;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(253, 248, 239, 0.55);
}

/* ------------------------------------------------------ 7. Preview notice */
.preview-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 70;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--gold-line);
  border-radius: 16px;
  background: rgba(63, 10, 18, 0.95);
  color: var(--cream);
  font-size: 0.78rem;
  line-height: 1.45;
  box-shadow: var(--shadow);
}
.preview-bar code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.72rem;
  color: var(--gold-light);
}
.preview-bar__close {
  margin-left: auto;
  flex: none;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 1px solid var(--gold-line);
  border-radius: 50%;
  background: transparent;
  color: var(--gold-light);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

/* ---------------------------------------------------------- 8. Header/nav */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  color: var(--ivory);
  transition: background-color 0.35s var(--ease), box-shadow 0.35s var(--ease),
              color 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
}
.site-header.is-stuck {
  color: var(--maroon);
  background: rgba(253, 248, 239, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--gold-line), 0 16px 34px -30px rgba(77, 13, 23, 0.8);
}

.site-header__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}
.brand__mark {
  flex: none;
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--font-serif);
  font-size: 0.82rem;
  line-height: 1;
  opacity: 0.95;
}
.brand__mark small { font-size: 0.72em; margin: 0 1px; color: var(--gold); }
.brand__names {
  font-family: var(--font-script);
  font-size: 1.3rem;
  line-height: 1;
  white-space: nowrap;
}

.menu-toggle {
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(227, 199, 119, 0.5);
  border-radius: 13px;
  background: rgba(63, 10, 18, 0.25);
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.site-header.is-stuck .menu-toggle { border-color: var(--gold-line); background: transparent; }
.menu-toggle__bars { display: block; width: 20px; }
.menu-toggle__bars i {
  display: block;
  height: 2px;
  margin: 4px 0;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.menu-toggle[aria-expanded="true"] i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile: nav slides in as a full-height panel under the header */
.nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 55;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 5vh, 30px);
  padding: 30px var(--gutter) calc(40px + env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% 20%, rgba(201, 162, 39, 0.14), transparent 60%),
    linear-gradient(170deg, #7d1a27, #4e0d17);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s;
}
.nav.is-open { opacity: 1; visibility: visible; transform: none; }
.nav a {
  color: var(--ivory);
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 6vw, 1.8rem);
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: color 0.25s var(--ease), transform 0.25s var(--ease);
}
.nav a:hover { color: var(--gold-light); transform: translateY(-2px); }
.nav__cta {
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 10px 30px;
  color: var(--gold-light) !important;
  font-size: clamp(1.1rem, 4.6vw, 1.35rem) !important;
}

/* ------------------------------------------------------------- 9. Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  overflow: hidden;
  padding: calc(var(--header-h) + 30px) var(--gutter) calc(88px + env(safe-area-inset-bottom));
  text-align: center;
  color: var(--ivory);
  background:
    radial-gradient(circle at 50% 18%, rgba(201, 162, 39, 0.18), transparent 52%),
    linear-gradient(165deg, #7d1a27, #5b0f1a 58%, var(--maroon-900));
}
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 8px;
  background:
    linear-gradient(90deg, transparent, var(--gold-line), transparent),
    repeating-linear-gradient(90deg, var(--gold) 0 6px, transparent 6px 16px);
  background-size: 100% 1px, auto 5px;
  background-position: center top, center bottom;
  background-repeat: no-repeat, repeat-x;
  opacity: 0.75;
}

.hero__content { position: relative; z-index: 3; width: 100%; max-width: 760px; }

.hero__label {
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(253, 248, 239, 0.72);
}

.hero__divider {
  width: min(300px, 74%);
  height: auto;
  margin: 18px auto;
  opacity: 0.85;
}

.hero__names {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "bride" "bmal" "amp" "groom" "gmal";
  justify-items: center;
  gap: 2px 0;
  font-weight: 400;
}
.hero__name {
  grid-area: auto;
  font-family: var(--font-script);
  font-size: clamp(2.6rem, 15vw, 5.6rem);
  line-height: 1.04;
  text-shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
  overflow-wrap: break-word;
}
.hero__name:nth-of-type(1) { grid-area: bride; }
.hero__malayalam {
  font-family: var(--font-mal);
  font-size: clamp(0.95rem, 3.6vw, 1.2rem);
  color: var(--gold-light);
  letter-spacing: 0.04em;
}
.hero__malayalam:nth-of-type(2) { grid-area: bmal; }
.hero__malayalam:nth-of-type(5) { grid-area: gmal; }
.hero__amp {
  grid-area: amp;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.8rem, 7vw, 2.6rem);
  line-height: 1;
  margin: 6px 0;
  color: var(--gold);
}

.hero__welcome {
  font-family: var(--font-mal);
  font-size: clamp(1.05rem, 4vw, 1.4rem);
  color: rgba(253, 248, 239, 0.92);
}

/* The formal full names, printed small under the big script names */
.hero__fullnames {
  margin-top: 12px;
  font-family: var(--font-serif);
  font-size: clamp(0.78rem, 2.8vw, 0.98rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(253, 248, 239, 0.75);
}

.hero__meta {
  margin-top: clamp(20px, 5vw, 30px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.hero__date {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 4.4vw, 1.6rem);
  letter-spacing: 0.06em;
}
.hero__dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.hero__time {
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(253, 248, 239, 0.75);
}
.hero__venue {
  margin-top: 14px;
  font-family: var(--font-serif);
  font-size: clamp(1rem, 3.8vw, 1.2rem);
  color: var(--gold-light);
  letter-spacing: 0.04em;
}

.hero__actions {
  margin-top: clamp(24px, 6vw, 34px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.hero .btn--outline { color: var(--gold-light); border-color: rgba(227, 199, 119, 0.6); }
.hero .btn--outline:hover { background: rgba(227, 199, 119, 0.14); }

/* drifting jasmine petals */
.petals { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 2; }
.petal {
  position: absolute;
  top: -8vh;
  width: 14px; height: 14px;
  background: url("../assets/jasmine.svg") center / contain no-repeat;
  opacity: 0.7;
  animation: fall linear infinite;
  will-change: transform;
}
@keyframes fall {
  0%   { transform: translate3d(0, -10vh, 0) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.7; }
  90%  { opacity: 0.55; }
  100% { transform: translate3d(var(--drift, 30px), 112vh, 0) rotate(300deg); opacity: 0; }
}
@keyframes spin { to { transform: rotate(360deg); } }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  color: rgba(253, 248, 239, 0.65);
  font-size: 0.62rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  text-decoration: none;
}
.scroll-cue__line {
  width: 1px; height: 38px;
  background: linear-gradient(180deg, transparent, var(--gold));
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.35; transform: scaleY(0.7); }
  50%      { opacity: 1;    transform: scaleY(1); }
}

/* -------------------------------------------------------- 10. Countdown */
.section--countdown {
  padding: clamp(44px, 8vw, 76px) 0;
  color: var(--ivory);
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(201, 162, 39, 0.15), transparent 60%),
    linear-gradient(180deg, var(--maroon-800), var(--maroon-900));
}
.section--countdown .section__heading--sm { color: var(--cream); font-weight: 400; }

.countdown {
  margin: clamp(20px, 5vw, 32px) auto 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(7px, 2.4vw, 14px);
  max-width: 660px;
}
.countdown__unit {
  padding: clamp(12px, 3.4vw, 20px) 4px;
  border: 1px solid rgba(201, 162, 39, 0.42);
  border-radius: 14px;
  background: rgba(253, 248, 239, 0.07);
}
.countdown__value {
  display: block;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.5rem, 8vw, 2.9rem);
  line-height: 1.05;
  color: var(--gold-light);
  font-variant-numeric: tabular-nums;
}
.countdown__label {
  display: block;
  margin-top: 6px;
  font-size: clamp(0.55rem, 2.4vw, 0.68rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(253, 248, 239, 0.7);
}
.countdown__message {
  margin-top: 22px;
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 4.4vw, 1.5rem);
  color: var(--gold-light);
}
.countdown__actions { margin-top: clamp(20px, 5vw, 28px); }
.section--countdown .btn--outline { color: var(--gold-light); border-color: rgba(227, 199, 119, 0.6); }
.section--countdown .btn--outline:hover { background: rgba(227, 199, 119, 0.14); }

/* ------------------------------------------------------------ 11. Story */
.story { font-size: clamp(1rem, 3.6vw, 1.09rem); color: var(--ink-soft); }
.story p + p { margin-top: 1.15em; }
.story p:first-of-type::first-letter {
  float: left;
  font-family: var(--font-serif);
  font-size: 3.3em;
  line-height: 0.82;
  padding: 0.06em 0.14em 0 0;
  color: var(--maroon);
}

.blessing {
  margin-top: clamp(28px, 6vw, 44px);
  padding: clamp(20px, 5vw, 30px);
  text-align: center;
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--paper), var(--cream));
  box-shadow: var(--shadow-sm);
}
.blessing__text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.1rem, 4.2vw, 1.4rem);
  color: var(--maroon);
  text-wrap: balance;
}
.blessing__malayalam {
  margin-top: 10px;
  font-family: var(--font-mal);
  color: var(--gold-deep);
  letter-spacing: 0.05em;
}

/* ----------------------------------------------------------- 12. Events */
.events { display: grid; gap: clamp(18px, 4vw, 26px); }

.event-card {
  position: relative;
  padding: clamp(24px, 5.4vw, 36px);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: center;
}
.event-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.event-card__malayalam {
  font-family: var(--font-mal);
  color: var(--gold-deep);
  letter-spacing: 0.05em;
}
.event-card__title {
  margin-top: 4px;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.6rem, 6vw, 2.1rem);
  color: var(--maroon);
  line-height: 1.15;
}
.event-card__divider { width: min(220px, 66%); height: auto; margin: 14px auto 18px; opacity: 0.85; }

.event-card__rows { display: grid; gap: 14px; }
.event-card__row {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  align-items: start;
  text-align: left;
}
.event-card__row svg { width: 20px; height: 20px; margin-top: 3px; color: var(--gold-deep); }
.event-card__row dt {
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.event-card__row dd { margin: 2px 0 0; color: var(--ink); line-height: 1.6; }

.event-card__note {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--gold-line);
  font-size: 0.94rem;
  font-style: italic;
  color: var(--ink-soft);
}
.event-card__actions { margin-top: 22px; }

/* ---------------------------------------------------------- 13. Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 2.6vw, 16px);
}
.gallery__item {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--gold-line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--cream-2);
  cursor: zoom-in;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.gallery__item:hover, .gallery__item:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow); }
.gallery__item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.gallery__item:hover img { transform: scale(1.05); }
.gallery__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 26px 12px 11px;
  background: linear-gradient(180deg, transparent, rgba(63, 10, 18, 0.82));
  color: var(--cream);
  font-family: var(--font-serif);
  font-size: clamp(0.82rem, 3vw, 0.98rem);
  letter-spacing: 0.02em;
  text-align: center;
}

/* ----------------------------------------------------------- 14. Venue */
.venue { display: grid; gap: clamp(18px, 4vw, 28px); }

.venue__card {
  padding: clamp(24px, 5.4vw, 36px);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow);
  text-align: center;
}
.venue__name {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.5rem, 5.6vw, 2rem);
  color: var(--maroon);
  line-height: 1.2;
}
.venue__address { margin-top: 10px; color: var(--ink-soft); }
.venue__note {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(201, 162, 39, 0.12);
  color: var(--maroon);
  font-size: 0.92rem;
}
.venue__actions { margin-top: 22px; }
.venue__contacts {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--gold-line);
  display: grid;
  gap: 10px;
}
.venue__contacts li { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.venue__contacts span { font-size: 0.92rem; color: var(--ink-soft); }
.venue__contacts a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 7px 16px;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--maroon);
  transition: background-color 0.25s var(--ease);
}
.venue__contacts a:hover { background: rgba(201, 162, 39, 0.14); }

.venue__map {
  position: relative;
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--cream-2);
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow);
}
.venue__map iframe { width: 100%; height: 100%; border: 0; }

/* ------------------------------------------------------------ 15. RSVP */
.section--rsvp {
  background:
    radial-gradient(circle at 85% 10%, rgba(201, 162, 39, 0.1), transparent 45%),
    linear-gradient(180deg, var(--ivory), var(--cream));
}

.rsvp {
  padding: clamp(22px, 5.4vw, 40px);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.rsvp .field + .field, .rsvp .field + .field--choice { margin-top: 20px; }
.rsvp .field--choice + .field { margin-top: 20px; }

.field { display: block; }
.field label, .field legend {
  display: block;
  margin-bottom: 8px;
  padding: 0;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--maroon);
}
.field__optional { color: var(--ink-soft); letter-spacing: 0.06em; text-transform: none; }
.field--choice { border: 0; padding: 0; margin: 20px 0 0; }

.field input[type="text"],
.field select,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid #e2d5be;
  border-radius: 12px;
  background: #fffefb;
  font-size: 1rem; /* keeps iOS from zooming on focus */
  font-weight: 300;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.field textarea { resize: vertical; min-height: 108px; }
.field input[type="text"]:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.16);
  outline: none;
}
.field input::placeholder, .field textarea::placeholder { color: #b3a191; }

.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--maroon) 50%),
    linear-gradient(135deg, var(--maroon) 50%, transparent 50%);
  background-position: right 20px center, right 14px center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 42px;
}

.field__error { margin-top: 7px; font-size: 0.82rem; color: #a3202f; }

.choice { display: grid; gap: 10px; }
.choice__option { position: relative; display: block; cursor: pointer; }
.choice__option input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
}
.choice__option span {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 18px;
  border: 1px solid #e2d5be;
  border-radius: 12px;
  background: #fffefb;
  font-size: 0.98rem;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease),
              color 0.25s var(--ease);
}
.choice__option span::before {
  content: "";
  flex: none;
  width: 17px; height: 17px;
  border: 1px solid #cdbba2;
  border-radius: 50%;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.choice__option input:checked + span {
  border-color: var(--gold);
  background: rgba(201, 162, 39, 0.1);
  color: var(--maroon);
}
.choice__option input:checked + span::before {
  border-color: var(--gold-deep);
  box-shadow: inset 0 0 0 4px var(--gold);
}
.choice__option input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }

.rsvp .btn--block { margin-top: 26px; }
.rsvp__note { margin-top: 14px; font-size: 0.8rem; color: var(--ink-soft); text-align: center; }
/* RSVP confirmation toast — slides up from the bottom of the screen.
   It sits above the floating music button and the preview bar. */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 80;
  width: min(420px, calc(100vw - 28px));
  transform: translate(-50%, calc(100% + 24px));
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
}
.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}
body.has-preview .toast { bottom: calc(78px + env(safe-area-inset-bottom)); }
.toast__card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(201, 162, 39, 0.55);
  border-radius: 16px;
  background: linear-gradient(135deg, #7d1a27, #5b0f1a);
  color: #fdf6ea;
  box-shadow: 0 18px 40px -18px rgba(48, 8, 18, 0.9);
}
.toast__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  border-radius: 50%;
  background: rgba(227, 199, 119, 0.18);
  color: var(--gold-light);
  font-size: 0.85rem;
  font-weight: 700;
}
.toast__body { flex: 1 1 auto; min-width: 0; }
.toast__title { font-size: 0.95rem; font-weight: 600; letter-spacing: 0.01em; }
.toast__detail { margin-top: 3px; font-size: 0.82rem; color: rgba(253, 246, 234, 0.82); }
.toast__quote {
  margin-top: 6px;
  font-size: 0.82rem;
  font-style: italic;
  color: rgba(253, 246, 234, 0.7);
  overflow-wrap: anywhere;
}
.toast__close {
  flex: 0 0 auto;
  margin-left: 2px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: rgba(253, 246, 234, 0.7);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.toast__close:hover { color: #fdf6ea; }

/* ---------------------------------------------------------- 16. Footer */
.site-footer {
  position: relative;
  padding: clamp(44px, 9vw, 76px) 0 calc(clamp(44px, 9vw, 76px) + env(safe-area-inset-bottom));
  text-align: center;
  color: var(--cream);
  background:
    radial-gradient(circle at 50% 0%, rgba(201, 162, 39, 0.14), transparent 55%),
    linear-gradient(180deg, #5b0f1a, var(--maroon-900));
}
.site-footer__divider { width: min(280px, 70%); height: auto; margin: 0 auto 22px; opacity: 0.85; }
.site-footer__message { font-size: 0.98rem; color: rgba(253, 248, 239, 0.82); }
.site-footer__malayalam {
  margin-top: 18px;
  font-family: var(--font-mal);
  color: var(--gold-light);
  letter-spacing: 0.06em;
}
.site-footer__signature {
  margin-top: 4px;
  font-family: var(--font-script);
  font-size: clamp(1.9rem, 8vw, 2.6rem);
  line-height: 1.2;
}
.site-footer__credit { margin-top: 26px; font-size: 0.76rem; color: rgba(253, 248, 239, 0.5); }
.site-footer__credit a { color: var(--gold-light); text-decoration: none; border-bottom: 1px solid rgba(227, 199, 119, 0.4); }

/* ------------------------------------------------- 17. Music + lightbox */
.music-toggle {
  position: fixed;
  right: clamp(12px, 3vw, 22px);
  bottom: calc(clamp(12px, 3vw, 22px) + env(safe-area-inset-bottom));
  z-index: 65;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 11px 16px;
  border: 1px solid rgba(201, 162, 39, 0.55);
  border-radius: 999px;
  background: linear-gradient(135deg, #7d1a27, #5b0f1a);
  color: var(--gold-light);
  box-shadow: 0 16px 30px -18px rgba(63, 10, 18, 0.95);
  cursor: pointer;
  transition: transform 0.25s var(--ease), color 0.25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.music-toggle:hover { transform: translateY(-2px); }
.music-toggle[hidden] { display: none; }
.music-toggle__icon { display: grid; place-items: center; }
.music-toggle__label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
body.has-preview .music-toggle { bottom: calc(78px + env(safe-area-inset-bottom)); }

.music-toggle__bars { display: none; align-items: flex-end; gap: 2px; height: 14px; }
.music-toggle.is-playing .music-toggle__bars { display: flex; }
.music-toggle__bars i {
  width: 2px;
  height: 6px;
  background: currentColor;
  border-radius: 2px;
  animation: eq 0.9s ease-in-out infinite;
}
.music-toggle__bars i:nth-child(2) { animation-delay: 0.15s; }
.music-toggle__bars i:nth-child(3) { animation-delay: 0.3s; }
.music-toggle__bars i:nth-child(4) { animation-delay: 0.45s; }
@keyframes eq {
  0%, 100% { height: 5px; }
  50%      { height: 14px; }
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 4vw, 44px) clamp(12px, 4vw, 60px);
  background: rgba(35, 7, 12, 0.95);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.lightbox[hidden] { display: none; }
.lightbox__figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lightbox__figure img {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border: 1px solid var(--gold-line);
  border-radius: 14px;
  background: #2a0810;
}
.lightbox__figure figcaption {
  max-width: 44ch;
  text-align: center;
  font-family: var(--font-serif);
  font-size: clamp(1rem, 3.6vw, 1.2rem);
  color: var(--cream);
}
.lightbox__close,
.lightbox__nav {
  position: fixed;
  z-index: 121;
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border: 1px solid rgba(201, 162, 39, 0.5);
  border-radius: 50%;
  background: rgba(63, 10, 18, 0.85);
  color: var(--gold-light);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.25s var(--ease);
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(109, 20, 32, 1); }
.lightbox__close { top: calc(16px + env(safe-area-inset-top)); right: 16px; }
.lightbox__nav--prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 12px; top: 50%; transform: translateY(-50%); }

/* ------------------------------------------------------- 18. Reveal anim */
/* Scoped to .js so that a browser without scripting still shows everything. */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

#main:focus { outline: none; }

/* ------------------------------------------------- 19. Larger screens */
@media (min-width: 600px) {
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .choice { grid-template-columns: 1fr 1fr; }
  .hero__meta { flex-direction: row; justify-content: center; gap: 14px; }
}

@media (min-width: 760px) {
  .hero__names {
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas:
      "bride amp groom"
      "bmal  amp gmal";
    align-items: center;
    column-gap: clamp(10px, 3vw, 26px);
  }
  .hero__amp { margin: 0; align-self: center; }
  .hero__name { justify-self: end; }
  .hero__name:nth-of-type(4) { justify-self: start; }
  .hero__malayalam:nth-of-type(2) { justify-self: end; }
  .hero__malayalam:nth-of-type(5) { justify-self: start; }
  .events { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
}

@media (min-width: 860px) {
  :root { --header-h: 74px; }

  .menu-toggle { display: none; }
  .nav {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: clamp(18px, 2.4vw, 34px);
    padding: 0;
    background: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav a {
    color: inherit;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }
  .nav a:hover { color: var(--gold); transform: none; }
  .nav__cta {
    padding: 9px 22px;
    font-size: 0.78rem !important;
    border-color: currentColor;
    color: inherit !important;
  }
  .nav__cta:hover { border-color: var(--gold); }
  .brand__names { font-size: 1.45rem; }

  .venue { grid-template-columns: 0.85fr 1.15fr; align-items: stretch; }
  .venue__map { aspect-ratio: auto; min-height: 440px; }

  .event-card { text-align: left; }
  .event-card__divider { margin-left: 0; }
  .event-card__actions { text-align: left; }
}

@media (min-width: 1000px) {
  /* Three columns keeps a tidy grid: six photos become two even rows. */
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .section__header { margin-bottom: 60px; }
}

/* Short phones (e.g. 320x568 and 360x640): tighten the hero so the names,
   the date and both buttons are reachable without hunting for them. */
@media (max-height: 700px) and (orientation: portrait) {
  .hero {
    padding-top: calc(var(--header-h) + 14px);
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }
  .hero__label { font-size: 0.62rem; letter-spacing: 0.22em; }
  .hero__divider { margin: 10px auto; }
  .hero__name { font-size: clamp(2.1rem, 12vw, 3.4rem); }
  .hero__amp { font-size: clamp(1.3rem, 5vw, 1.9rem); margin: 2px 0; }
  .hero__malayalam { font-size: 0.9rem; }
  .hero__meta { margin-top: 14px; }
  .hero__venue { margin-top: 10px; }
  .hero__actions { margin-top: 16px; }
  .scroll-cue__line { height: 26px; }

  /* Keep the present — and the button under it — within reach on a short phone. */
  .gift__scene { width: clamp(90px, 24vw, 116px); height: clamp(80px, 21vw, 104px); margin-top: 10px; }
  .intro__button { min-height: 48px; padding: 12px 26px; }
  .intro__hint { margin-top: 10px; }
}

/* Short landscape phones: the curtain stacks tall, so trim it right down. */
@media (max-height: 560px) and (orientation: landscape) {
  .intro__malayalam { font-size: 1.15rem; }
  .intro__rule { margin: 8px auto; }
  .intro__label { font-size: 0.62rem; letter-spacing: 0.24em; }
  .intro__names { font-size: clamp(1.5rem, 5.2vw, 2.4rem); }
  .gift__scene { width: 84px; height: 74px; margin-top: 8px; }
  .gift__bow { width: 54px; height: 28px; }
  .intro__button { min-height: 44px; padding: 10px 24px; margin-top: 10px; }
  .intro__hint { margin-top: 6px; }
}

/* Landscape phones: keep the hero from feeling cramped */
@media (max-height: 560px) and (orientation: landscape) {
  .scroll-cue { display: none; }
  .hero { min-height: auto; padding-top: calc(var(--header-h) + 28px); padding-bottom: 56px; }
}

/* ------------------------------------------------- 20. Motion & print */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .petal { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .music-toggle, .intro, .preview-bar, .scroll-cue,
  .hero__actions, .venue__map, .lightbox, .petals { display: none !important; }
  body { background: #fff; color: #000; }
  .hero, .section--countdown, .site-footer, .section--tinted {
    background: #fff !important;
    color: #000 !important;
  }
  .hero__name, .hero__date, .section__heading, .countdown__value { color: #000 !important; }
  .section { padding: 18px 0; }
}
