/* Nepali pagoda theme. Loaded LAST on every page: it re-tints the Classical
   design system with the palette of a Kathmandu valley temple (gilded roofs,
   brick red, marigold, vermilion) and adds the pagoda, garland and dhaka art. */

:root {
  --color-bg: #f6ecdb;
  --color-surface: #ecdcc2;
  --color-text: #2a1410;
  --color-neutral-100: #fbf5ea;
  --color-neutral-200: #f0e4d0;
  --color-neutral-300: #dccab0;
  --color-neutral-400: #c3ac8e;
  --color-neutral-500: #a38b72;
  --color-neutral-600: #84705d;
  --color-neutral-700: #695544;
  --color-neutral-800: #4a3b30;
  --color-neutral-900: #33271f;
  --crimson: #a3201d;
  --crimson-deep: #5b0f10;
  --marigold: #f2a516;
  --night: #170606;
  --night-2: #240a0a;
  --paper: #f3e6d0;
  --foil: linear-gradient(100deg, #d98a1c 0%, #f6c25a 28%, #fff1c8 46%, #f2a516 58%, #b9701a 100%);
}
:root {
  --icon-pagoda-gold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 150' fill='none' stroke='%23e1ad66' stroke-width='5' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M10 117Q39.3 119 60 100Q80.7 119 110 117Q106 122 99 122L21 122Q14 122 10 117Z' fill='%23e1ad66' fill-opacity='.18'/%3E%3Cpath d='M28 122V136M92 122V136'/%3E%3Cpath d='M20 83Q43.8 85 60 68Q76.2 85 100 83Q96 88 89 88L31 88Q24 88 20 83Z' fill='%23e1ad66' fill-opacity='.18'/%3E%3Cpath d='M40 88V100M80 88V100'/%3E%3Cpath d='M30 53Q48.3 55 60 40Q71.7 55 90 53Q86 58 79 58L41 58Q34 58 30 53Z' fill='%23e1ad66' fill-opacity='.18'/%3E%3Cpath d='M46 58V68M74 58V68'/%3E%3Cpath d='M60 36V28M55 28Q60 17 65 28ZM60 19V8'/%3E%3Ccircle cx='60' cy='6' r='2.6' fill='%23e1ad66'/%3E%3Cpath d='M14 136H106M10 141H110M6 146H114'/%3E%3C/svg%3E");
  --icon-pagoda-crimson: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 150' fill='none' stroke='%23a3201d' stroke-width='5' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M10 117Q39.3 119 60 100Q80.7 119 110 117Q106 122 99 122L21 122Q14 122 10 117Z' fill='%23a3201d' fill-opacity='.18'/%3E%3Cpath d='M28 122V136M92 122V136'/%3E%3Cpath d='M20 83Q43.8 85 60 68Q76.2 85 100 83Q96 88 89 88L31 88Q24 88 20 83Z' fill='%23a3201d' fill-opacity='.18'/%3E%3Cpath d='M40 88V100M80 88V100'/%3E%3Cpath d='M30 53Q48.3 55 60 40Q71.7 55 90 53Q86 58 79 58L41 58Q34 58 30 53Z' fill='%23a3201d' fill-opacity='.18'/%3E%3Cpath d='M46 58V68M74 58V68'/%3E%3Cpath d='M60 36V28M55 28Q60 17 65 28ZM60 19V8'/%3E%3Ccircle cx='60' cy='6' r='2.6' fill='%23a3201d'/%3E%3Cpath d='M14 136H106M10 141H110M6 146H114'/%3E%3C/svg%3E");
  --swag: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='133' height='76' viewBox='0 0 133 76' fill='none' stroke-linecap='round'%3E%3Cpath d='M0 3Q66.5 74 133 3' stroke='%235a2b12' stroke-width='1.2'/%3E%3Cpath d='M0 3Q66.5 74 133 3' stroke='%23e8920f' stroke-width='11' stroke-dasharray='0 12.2'/%3E%3Cpath d='M0 3Q66.5 74 133 3' stroke='%23ffd35e' stroke-width='5.5' stroke-dasharray='0 12.2' stroke-dashoffset='6.1'/%3E%3Cpath d='M0 3Q66.5 74 133 3' stroke='%23c8281e' stroke-width='4.4' stroke-dasharray='0 48.8' stroke-dashoffset='-4'/%3E%3Cpath d='M1 3V15' stroke='%23e1ad66' stroke-width='1.2'/%3E%3Ccircle cx='1' cy='18.5' r='3.4' fill='%23e1ad66'/%3E%3Cpath d='M-1.6 21.5L1 28L3.6 21.5' fill='%23e1ad66' stroke='none'/%3E%3C/svg%3E");
  --carve-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Crect width='16' height='16' fill='%2333100c'/%3E%3Cpath d='M8 0L16 8L8 16L0 8Z' fill='none' stroke='%23e1ad66' stroke-opacity='.5' stroke-width='.8'/%3E%3Cpath d='M8 3.2L12.8 8L8 12.8L3.2 8Z' fill='none' stroke='%23e1ad66' stroke-opacity='.28' stroke-width='.6'/%3E%3Ccircle cx='8' cy='8' r='1.1' fill='%23e1ad66' fill-opacity='.65'/%3E%3C/svg%3E");
  --roof-mini: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 26'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff0c0'/%3E%3Cstop offset='.45' stop-color='%23e9b043'/%3E%3Cstop offset='1' stop-color='%239a5f14'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M2 17Q24.7 19 40 8Q55.3 19 78 17Q74 22 67 22L13 22Q6 22 2 17Z' fill='url(%23g)' stroke='%237a4a0e' stroke-width='.9' stroke-linejoin='round'/%3E%3Cpath d='M40 9L18.9 21M40 9L30.5 21M40 9L49.5 21M40 9L61.1 21' stroke='%237a4a0e' stroke-width='.6' opacity='.5' fill='none'/%3E%3Cpath d='M40 8V2' stroke='%23e1ad66' stroke-width='1.1'/%3E%3Ccircle cx='40' cy='1.8' r='1.5' fill='%23ffe6a0' stroke='%23e1ad66' stroke-width='.5'/%3E%3C/svg%3E");
  --dhaka: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='18' viewBox='0 0 32 18'%3E%3Crect width='32' height='18' fill='%23220808'/%3E%3Crect width='32' height='1.2' fill='%23e1ad66'/%3E%3Crect y='16.8' width='32' height='1.2' fill='%23e1ad66'/%3E%3Cpolygon points='16,3.5 26,9 16,14.5 6,9' fill='%23b3201f' stroke='%23e1ad66' stroke-width='.8'/%3E%3Cpolygon points='16,6 21,9 16,12 11,9' fill='%23f2a516'/%3E%3Ccircle cx='16' cy='9' r='1' fill='%23220808'/%3E%3Cpolygon points='0,5.5 4.5,9 0,12.5' fill='%23b3201f'/%3E%3Cpolygon points='32,5.5 27.5,9 32,12.5' fill='%23b3201f'/%3E%3C/svg%3E");
}

/* ───────── light sheets: lokta paper, crimson accents ───────── */
.sheet { background: radial-gradient(110% 46% at 50% 0%, rgba(226,160,60,.16), transparent 65%), var(--color-bg); }
.sec-head h2 { color: #3d0e0d; }
.sec-head .kicker { color: var(--crimson); }
.sec-head .kicker.gold { color: var(--gold); }
.night .sec-head h2.foil { color: transparent; }
.ico { color: var(--crimson); }
.timeline time { color: var(--crimson); }
.lnk { color: var(--crimson); }
.lnk:hover { color: var(--crimson-deep); }
.over { color: var(--crimson); }
.map { border-color: var(--color-surface); outline-color: rgba(163,32,29,.35); }

.sec-head::before { content: ""; width: 28px; height: 35px; margin-bottom: 8px; background: var(--icon-pagoda-crimson) center / contain no-repeat; }
.night .sec-head::before { background-image: var(--icon-pagoda-gold); }
.js .sec-head::before { opacity: 0; transform: translateY(10px) scale(.6); transition: opacity .9s ease .1s, transform .9s cubic-bezier(.3,1.5,.5,1) .1s; }
.js .sec-head.in::before { opacity: 1; transform: none; }

.dhaka { height: 18px; background: var(--dhaka) repeat-x center / auto 18px; position: relative; z-index: 4; }

/* ───────── night: temple dusk ───────── */
.night { background: radial-gradient(80% 60% at 50% 0%, rgba(190,50,30,.22), transparent 70%), var(--night); }
.card-gold { border-color: rgba(242,165,22,.5); }
.card-gold::before { border-color: rgba(163,32,29,.5); }

/* ───────── hero ───────── */
.hero {
  padding-top: 80px;
  background:
    radial-gradient(70% 36% at 50% 40%, rgba(214,70,32,.28), transparent 70%),
    radial-gradient(90% 55% at 50% 100%, rgba(242,165,22,.15), transparent 70%),
    var(--night);
}
.arch img { filter: sepia(.5) saturate(1.2) hue-rotate(-8deg) contrast(1.05); }
.arch-wrap { border-color: rgba(242,165,22,.6); }
.name-np { color: #ffd98a; }


/* marigold garlands */
.garland { position: absolute; top: 0; left: 0; right: 0; height: 76px; z-index: 3; pointer-events: none; background: var(--swag) repeat-x 0 0 / 133px 76px; transform-origin: 50% 0; animation: sway 7s ease-in-out infinite alternate; }
.garland.g2 { top: -8px; height: 60px; z-index: 2; opacity: .6; filter: brightness(.78) saturate(.85); background-size: 100px 57px; background-position: 48px 0; animation-duration: 9s; animation-direction: alternate-reverse; }
@keyframes sway { from { transform: skewX(-1.2deg); } to { transform: skewX(1.2deg); } }

/* the pagoda crest */
.crest { display: block; width: 156px; height: auto; margin: 0 auto 2px; overflow: visible; position: relative; z-index: 2; }
.crest .halo { animation: haloPulse 5s ease-in-out infinite; }
.crest .tier { animation: tierIn 1.1s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--k) * .26s + .35s); }
.crest .bell { transform-box: fill-box; transform-origin: 50% 0; animation: swing 3.4s ease-in-out infinite; animation-delay: calc(var(--k) * -.55s); }
.crest .jewel { animation: jewel 3s ease-in-out infinite; }
@keyframes tierIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes swing { 0%, 100% { transform: rotate(-11deg); } 50% { transform: rotate(11deg); } }
@keyframes haloPulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes jewel { 0%, 100% { filter: none; } 50% { filter: drop-shadow(0 0 3px #ffe6a0); } }

/* ───────── gate: carved temple doors ───────── */
.gate-half { background: linear-gradient(180deg, #5a1112 0%, #2c0809 100%); }
.gate-half::before { content: ""; position: absolute; inset: 20px; border: 1px solid rgba(225,173,102,.6); pointer-events: none; }
.gate-half::after { content: ""; position: absolute; inset: 32px; border: 1px dashed rgba(225,173,102,.3); pointer-events: none; }
.gate-l, .gate-r { border-color: rgba(242,165,22,.7); }
.seal { background: radial-gradient(circle at 50% 38%, rgba(242,165,22,.3), rgba(242,165,22,.05) 70%); }
.seal svg { width: 40px; height: 50px; animation: breathe 4.5s ease-in-out infinite; }

/* ───────── footer: pagodas at sunset under the Himalaya ───────── */
.foot { position: relative; overflow: hidden; padding: 84px 22px 190px; border-top: 0; gap: 0; background: linear-gradient(180deg, #170606 0%, #2b0a0a 32%, #6b1e12 70%, #c0551c 100%); }
.foot::before { content: ""; position: absolute; left: 50%; bottom: -60px; width: 150%; height: 75%; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(255,200,115,.55), rgba(255,150,60,.16) 52%, transparent 76%); pointer-events: none; }
.foot-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.skyline { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: clamp(640px, 100%, 920px); height: auto; display: block; z-index: 1; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .js .sec-head::before { opacity: 1; transform: none; }
  .garland { animation: none !important; }
}

/* host dashboard accents */
.stats b, .tab b { color: var(--crimson); }
.pill.yes { color: var(--crimson); border-color: var(--crimson); background: color-mix(in srgb, var(--crimson) 8%, transparent); }
.share { border-color: var(--crimson); }

/* countdown: each unit is a small windowed pavilion under its own gilded roof */
.countdown { margin-top: 34px; gap: 12px; }
.countdown div { position: relative; border: 1px solid rgba(225,173,102,.65); border-top: 0; border-radius: 0 0 4px 4px; padding: 17px 5px 12px; background: linear-gradient(rgba(22,6,5,.78), rgba(22,6,5,.78)) content-box, var(--carve-dark) center / 16px 16px, #33100c; background-clip: content-box, border-box, border-box; box-shadow: inset 0 0 0 2px rgba(0,0,0,.35), 0 3px 0 -1px rgba(225,173,102,.5); }
.countdown div::before { content: ""; position: absolute; left: -9px; right: -9px; top: -19px; height: 24px; background: var(--roof-mini) center / 100% 100% no-repeat; pointer-events: none; }

/* ───────── party size: light a diya for every guest ───────── */
.party { display: flex; flex-direction: column; gap: 10px; }
.diyas { display: flex; justify-content: space-evenly; gap: 6px; padding: 20px 6px 14px; border: 1px solid rgba(225,173,102,.35); border-radius: var(--radius-md); touch-action: pan-y; user-select: none; -webkit-user-select: none;
  background: radial-gradient(110% 100% at 50% 100%, rgba(242,165,22,.12), transparent 72%), rgba(0,0,0,.18); transition: border-color .4s, box-shadow .4s; }
.party:has(#guests-range:focus-visible) .diyas { outline: 2px solid var(--gold); outline-offset: 3px; }
.diya { appearance: none; background: none; border: 0; padding: 2px 0 4px; cursor: pointer; display: grid; place-items: center; color: var(--gold); -webkit-tap-highlight-color: transparent; }
.diya svg { width: 48px; height: 58px; overflow: visible; transition: transform .35s cubic-bezier(.3,1.6,.5,1), filter .6s; }
.diya:hover svg { transform: translateY(-3px); }
.diya .bowl { fill: rgba(225,173,102,.05); stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; opacity: .5; transition: fill .6s, opacity .6s; }
.diya .rim { stroke: currentColor; stroke-width: 1.4; opacity: .7; }
.diya .wick { stroke: #4a2a12; stroke-width: 2.2; stroke-linecap: round; }
.diya .flame { transform-box: fill-box; transform-origin: 50% 100%; transform: scale(0); opacity: 0; transition: transform .6s cubic-bezier(.3,1.7,.5,1) var(--d, 0s), opacity .4s ease var(--d, 0s); }
.diya.lit .flame { transform: scale(1); opacity: 1; }
.diya.lit .bowl { fill: rgba(225,173,102,.38); opacity: 1; }
.diya.lit svg { filter: drop-shadow(0 0 8px rgba(255,186,70,.75)); }
.diya.lit .flame-in { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker 1.7s ease-in-out infinite; animation-delay: calc(var(--i) * -.27s); }
@keyframes flicker { 0%, 100% { transform: scale(1, 1) skewX(0); } 22% { transform: scale(.93, 1.07) skewX(2.5deg); } 50% { transform: scale(1.05, .94) skewX(-2deg); } 76% { transform: scale(.96, 1.05) skewX(1.5deg); } }

.count { display: flex; align-items: baseline; justify-content: center; gap: 10px; margin-top: 2px; }
.count output { font-family: var(--font-heading); font-size: 56px; font-weight: 500; line-height: 1; color: var(--color-accent-300); font-feature-settings: "lnum", "tnum"; text-shadow: 0 0 24px rgba(242,165,22,.35); }
.count #guests-word { font-size: 15px; letter-spacing: .05em; color: var(--paper); }
.count .deva { font-size: 15px; color: rgba(243,230,208,.6); }
.hint { margin: 0; font-size: 12.5px; line-height: 1.5; text-align: center; color: rgba(243,230,208,.5); }
.hint .deva { font-size: 12.5px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ═════════ phones: iOS and Android hardening ═════════ */
:root { color-scheme: only light; --color-divider: rgba(42, 20, 16, .16); }
html { -webkit-tap-highlight-color: transparent; }
body { overflow-x: hidden; overflow-x: clip; }
.hero { min-height: 100vh; min-height: 100svh; }
a, button, label { -webkit-tap-highlight-color: transparent; }
.diyas, .diya, .seal, .pick { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

/* iOS draws inner shadows on text fields; browsers paint autofill white */
.f-input { -webkit-appearance: none; appearance: none; border-radius: var(--radius-md); }
.f-input:-webkit-autofill, .f-input:-webkit-autofill:hover, .f-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--paper); caret-color: var(--paper);
  -webkit-box-shadow: 0 0 0 1000px #2b100e inset; box-shadow: 0 0 0 1000px #2b100e inset;
  transition: background-color 9999s ease-out 0s;
}

/* touch screens keep :hover after a tap, so undo the lift/glow there */
@media (hover: none) {
  .diya:hover svg { transform: none; }
  .seal:hover { transform: none; box-shadow: 0 0 60px rgba(182,130,53,.3), inset 0 0 0 7px var(--night), inset 0 0 0 8px rgba(225,173,102,.5); }
  .pick:hover .pick-box { border-color: rgba(225,173,102,.3); }
  .f-input:hover { border-color: rgba(225,173,102,.32); }
}

/* map: tap to explore, so the page can still be scrolled with a thumb */
.map { position: relative; }
.map iframe { pointer-events: none; }
.map.on iframe { pointer-events: auto; }
.map::after { content: "Tap to explore the map"; position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); padding: 7px 14px; white-space: nowrap; font-size: 12.5px; letter-spacing: .05em; color: var(--paper); background: rgba(23,6,6,.8); border: 1px solid rgba(225,173,102,.6); border-radius: 999px; pointer-events: none; transition: opacity .3s; }
.map.on::after { opacity: 0; }

/* older engines without aspect-ratio */
@supports not (aspect-ratio: 1) {
  .arch { position: relative; height: 0; padding-bottom: 150%; }
  .arch img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
  .map { height: 0; padding-bottom: 75%; }
  .map iframe { position: absolute; top: 0; left: 0; }
}

/* very narrow phones (iPhone SE, small Androids) */
@media (max-width: 360px) {
  .hero-inner { padding: 0 18px; }
  .countdown { gap: 8px; }
  .countdown small { letter-spacing: .1em; font-size: 8.5px; }
  .countdown div::before { left: -5px; right: -5px; }
  .countdown b { font-size: 28px; }
  .card-gold { padding: 26px 16px; }
  .wrap { padding: 0 16px; }
  .big { font-size: 25px; }
}

/* landscape phones: keep the gate on one screen */
@media (max-height: 480px) and (orientation: landscape) {
  .gate-center { gap: 6px; }
  .gate-kicker { display: none; }
  .gate-name { font-size: 34px; margin-bottom: 2px; }
  .seal { width: 80px; height: 80px; }
  .seal svg { width: 28px; height: 35px; }
  .hero { padding-top: 70px; }
}
