/* =========================================================================
   SCENIC MOUNTAIN & BEACH VARIANT STYLESHEET
   Whitish daytime backgrounds, mountains & beach views, sunset reception,
   ocean sunrise muhurtham, and dark starry sky beach closing.
   ========================================================================= */

:root {
  --kraft: #f7f9fc;
  --door: #fbfcfe;
  --ink: #14243b;
  --foil: #b8860b;
  --gold: #9e7424;
  --crimson: #681927;
  --stage-bg: #f4f7fb;
  --card-bg: rgba(255, 255, 255, 0.94);
  --card-border: rgba(184, 134, 11, 0.35);
}

body {
  background: #eef2f7;
  color: var(--ink);
}

/* Scenic Whitish Stage Background */
#stage {
  background-color: #f5f8fc;
  background-image: linear-gradient(180deg, #edf2f8 0%, #ffffff 32%, #fdfbf7 65%, #0b1122 100%);
}

/* =========================================================================
   COVER ENVELOPE: Panoramic Mountain & Beach Views on First Page
   ========================================================================= */
#cover .door {
  background-color: #f8fafc;
  background-image:
    linear-gradient(180deg,
      rgba(237, 244, 252, 0.96) 0%,
      rgba(255, 253, 249, 0.92) 48%,
      rgba(143, 203, 224, 0.72) 60%,
      rgba(72, 149, 184, 0.78) 67%,
      rgba(138, 206, 224, 0.65) 73%,
      rgba(246, 232, 208, 0.95) 76%,
      rgba(232, 206, 165, 0.98) 100%
    );
  background-size: 100% 100%;
  box-shadow: 0 0 calc(var(--u) * 16) rgba(20, 36, 59, 0.16);
  border: 1px solid rgba(184, 134, 11, 0.28);
  position: absolute;
  overflow: hidden;
}

/* Continuous panoramic mountain ridge above the coastal bay */
#cover .door::before {
  content: "";
  position: absolute;
  top: auto;
  left: 0;
  right: 0;
  bottom: 33%;
  width: auto;
  height: 44%;
  background-image: url("mountains.webp");
  background-repeat: no-repeat;
  background-size: 200% auto;
  opacity: 0.44;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 58%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 58%, transparent 100%);
}

#cover .door.l::before {
  background-position: left bottom;
}

#cover .door.r::before {
  background-position: right bottom;
}

/* Coastal shoreline waves, beach palm framing & subtle kolam watermark */
#cover .door::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    url("palm.webp"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 48' preserveAspectRatio='none'%3E%3Cpath d='M0 18 Q100 4 200 18 T400 18 L400 48 L0 48 Z' fill='%23f6e9d2'/%3E%3Cpath d='M0 17 Q100 3 200 17 T400 17' fill='none' stroke='%23ffffff' stroke-width='3.2' opacity='0.9'/%3E%3Cpath d='M0 24 Q100 12 200 24 T400 24' fill='none' stroke='%23ffffff' stroke-width='1.5' opacity='0.55'/%3E%3C/svg%3E"),
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.85) 0%,
      rgba(255, 255, 255, 0.35) 36%,
      rgba(255, 255, 255, 0.0) 56%,
      rgba(255, 255, 255, 0.0) 100%
    ),
    url("kolam.svg");
  background-repeat: no-repeat, no-repeat, no-repeat, repeat;
  background-size: 64% auto, 200% calc(var(--u) * 9), 100% 100%, calc(var(--u) * 26.4) auto;
  pointer-events: none;
  opacity: 0.92;
}

#cover .door.l::after {
  background-position: -28% 102%, left 75.5%, 0 0, 0 0;
}

#cover .door.r::after {
  background-position: 128% 102%, right 75.5%, 0 0, 0 0;
}

#cover .cover-copy .display {
  color: var(--crimson);
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9);
}

#cover .cover-copy p {
  color: var(--ink);
  letter-spacing: 0.22em;
}

.morph .cover-eyebrow {
  opacity: 0 !important;
}

/* =========================================================================
   INTERIOR SCENIC LAYERS: Mountains, Palms & Lighting
   ========================================================================= */
.assembled .mount-wrap {
  opacity: 0.95;
}

/* Subtle Coastal Palm in Background */
.plane.p-front::after {
  content: "";
  position: absolute;
  right: calc(var(--u) * -8);
  bottom: calc(var(--u) * 8);
  width: calc(var(--u) * 28);
  height: calc(var(--u) * 56);
  background: url("palm.webp") no-repeat center bottom / contain;
  opacity: 0.28;
  pointer-events: none;
}

/* Daytime Whitish Ambiance */
.tint.day {
  mix-blend-mode: normal;
  background: radial-gradient(90% 60% at 50% 40%, rgba(255, 255, 255, 0.6) 0%, rgba(240, 246, 254, 0.2) 100%);
  opacity: 0.85;
}

/* Sunset for Saturday Reception (7:00 PM) */
.tint.dusk {
  mix-blend-mode: normal;
  background: linear-gradient(180deg,
    rgba(60, 42, 84, 0.72) 0%,
    rgba(133, 62, 103, 0.65) 24%,
    rgba(214, 92, 82, 0.56) 48%,
    rgba(240, 139, 82, 0.52) 72%,
    rgba(253, 225, 162, 0.45) 100%);
}

/* Sunrise for Sunday Muhurtham (6:00 AM Upanayanam & Muhurtham) */
.tint.dawn {
  mix-blend-mode: normal;
  background: linear-gradient(180deg,
    rgba(72, 81, 130, 0.42) 0%,
    rgba(191, 108, 126, 0.45) 26%,
    rgba(246, 147, 104, 0.46) 50%,
    rgba(254, 208, 126, 0.48) 74%,
    rgba(255, 246, 219, 0.42) 100%);
}

/* Dark Starry Sky for Night Transition */
.tint.night {
  mix-blend-mode: normal;
  background: linear-gradient(180deg,
    rgba(9, 14, 28, 0.84) 0%,
    rgba(18, 28, 56, 0.78) 45%,
    rgba(24, 38, 74, 0.74) 80%,
    rgba(12, 18, 36, 0.82) 100%);
}

/* Mobile GPU smoothing: avoid blurred box-shadow overdraw & continuous plant sway on phones */
@media (max-width: 899px) {
  .bulb,
  .fly {
    box-shadow: none;
  }
  .live .sp.sway img {
    animation: none;
  }
}

/* Event Cards in Whitish Panels */
#p-title, #p-invite, #p-reception, #p-muhurtham {
  color: var(--ink);
}

.panel .display.t-name {
  color: var(--crimson);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.panel .eyebrow {
  color: var(--gold);
}

.panel .hosts {
  color: var(--sea-azure);
}

.panel .big {
  color: var(--crimson);
}

/* =========================================================================
   CLOSING SECTION: Starry Sky Beach View in Darker Tones
   ========================================================================= */
#family {
  background-color: #0b1122;
  background-image: 
    radial-gradient(ellipse 95% 65% at 50% 25%, rgba(28, 45, 84, 0.85) 0%, rgba(10, 16, 32, 0.98) 100%),
    url("kolam.svg");
  background-size: cover, calc(var(--u) * 26.4) auto;
  color: #f5f4ef;
  box-shadow: 0 0 calc(var(--u) * 18) rgba(5, 9, 20, 0.7);
  border-top: 1.5px solid rgba(212, 175, 55, 0.4);
  padding: 3.5em 1.5em 4.5em;
}

#family .eyebrow {
  color: #f3d078;
  font-weight: 700;
}

#family .rule {
  color: #d4af37;
}

#family .names {
  color: #f0f4f9;
}

#family .names li {
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

#family .hosts {
  color: #ffd875;
}

#family .small {
  color: #d5e0ec;
}

#family .residence-box {
  background: rgba(18, 28, 54, 0.8) !important;
  border-color: rgba(212, 175, 55, 0.5) !important;
}

#family .tag {
  color: #f5d688;
  text-shadow: 0 0 14px rgba(245, 214, 136, 0.45);
}

#family .credit {
  border-top-color: rgba(212, 175, 55, 0.5);
}

#family .credit-by {
  color: #c0cee0;
}

#family .credit-name {
  color: #f3d078;
}

.variant-switcher {
  display: none !important;
}

/* Remove extra top padding above all text on page 2 (#p-invite) */
#p-invite {
  padding-top: calc(var(--u) * 0.8 + env(safe-area-inset-top, 0px));
}

/* Place Action Buttons (.btns) at the exact same bottom height on pages 4 & 5 */
#p-reception,
#p-muhurtham {
  bottom: 0;
  padding-bottom: calc(var(--u) * 15.5 + env(safe-area-inset-bottom, 0px));
}
#p-reception .btns,
#p-muhurtham .btns {
  margin-top: auto;
}
#p-muhurtham .btn {
  background: rgba(251, 239, 217, 0.88);
}

/* =========================================================================
   LAPTOP FULL-SCREEN EXPANSION ON OPEN (Pages 2+ only; mobile untouched)
   ========================================================================= */
@media (min-width: 900px) and (min-height: 500px) {
  :root {
    --card-w: min(100vw, 62vh, 540px);
    --stage-w: var(--card-w);
    --u: calc(var(--card-w) / 100);
  }

  #stage {
    width: var(--card-w);
    transition: width 1.7s cubic-bezier(.45, 0, .2, 1), box-shadow 1.2s ease;
  }

  #stage.assembled {
    width: 100%;
    box-shadow: none;
  }

  #stage.assembled #cover {
    max-width: var(--card-w);
    margin: 0 auto;
    transition: opacity 0.65s ease 0.85s;
  }

  #stage.assembled #cover.opening {
    opacity: 0;
  }

  #stage.assembled .panel {
    max-width: calc(var(--u) * 116);
    margin: 0 auto;
  }

  #stage.assembled #p-invite {
    max-width: calc(var(--u) * 138);
  }

  #stage.assembled #p-reception,
  #stage.assembled #p-muhurtham {
    padding-bottom: calc(var(--u) * 5.5 + env(safe-area-inset-bottom, 0px));
  }

  #stage.assembled .fx.kal {
    max-width: calc(var(--u) * 100);
    margin: 0 auto;
  }

  html.opened #family {
    width: 100%;
  }

  html.opened #family .credit,
  html.opened #family .rule {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }

  html.opened .sound {
    left: calc(var(--u) * 5);
  }

  /* Subtle coastal shoreline shimmer along bottom edge of full-screen desktop stage */
  #stage.assembled::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(var(--u) * 10);
    background: linear-gradient(180deg,
      rgba(130, 196, 224, 0) 0%,
      rgba(116, 186, 214, 0.22) 55%,
      rgba(242, 224, 192, 0.35) 100%
    );
    pointer-events: none;
    z-index: 0;
  }
}
