:root {
  --saffron: #F28C28;
  --marigold: #F6B93B;
  --sindoor: #B3261E;
  --cream: #FFF8EE;
  --sand: #F8E9D2;
  --ink: #3B2416;
  --muted: #7A5C44;
  --radius: 16px;
}

* { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; position: relative;
  font: 17px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: #FCEBCB;
  overflow-x: clip;
}
/* Sunrise scene behind the top of the page, fading into cream (references/images.png) */
body::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; aspect-ratio: 2 / 3; pointer-events: none; z-index: 0;
  background: url("/images/bg-sunrise.webp") center top / cover no-repeat;
  -webkit-mask-image: linear-gradient(#000 62%, transparent); mask-image: linear-gradient(#000 62%, transparent);
}
body.screens::before, body.choose::before { display: none; }
img { max-width: 100%; display: block; }
a { color: var(--sindoor); }
[hidden] { display: none !important; }

.wrap { max-width: 480px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }
.deva { font-family: "Tiro Devanagari Hindi", Georgia, serif; }
.serif { font-family: "Cormorant Garamond", Georgia, serif; }
.center { text-align: center; }

/* Sunrise temple scene along the bottom of every page (from references/Golden Sunrise Temple Footer) */
.temple {
  position: absolute; left: 0; right: 0; bottom: 0; height: 190px; pointer-events: none; z-index: 0;
  background: url("/images/bg-footer.webp") center bottom / cover no-repeat;
  -webkit-mask-image: linear-gradient(transparent, #000 55%); mask-image: linear-gradient(transparent, #000 55%);
}
/* Softer waves backdrop for the tap, play and choose screens */
body.screens, body.choose { background: #FBEACB url("/images/bg-waves.webp") center / cover no-repeat fixed; }
body.screens .temple, body.choose .temple { display: none; }

/* Buttons */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 54px; padding: 14px 20px;
  border-radius: 999px; border: 0; cursor: pointer; text-decoration: none;
  font: inherit; font-weight: 600; font-size: 1.05rem; line-height: 1.2;
}
.btn-primary { background: var(--sindoor); color: #fff; box-shadow: 0 10px 22px -12px var(--sindoor); }
.btn-primary.big { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.5rem; font-weight: 700; }
.btn-secondary { background: #fff; color: var(--ink); border: 2px solid var(--marigold); }
.btn + .btn { margin-top: 12px; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 26px; height: 26px; flex: none; }

/* ---------- Home ---------- */
.mantra { text-align: center; color: var(--sindoor); font-size: .95rem; padding: 14px 0 4px; margin: 0; }
.hero { text-align: center; padding-bottom: 26px; }
.hero-img {
  position: relative; margin: 14px auto 10px; width: min(100%, 460px); aspect-ratio: 16 / 8; margin-top: 28px;
  display: grid; place-items: center;
}
.hero-img::before {
  content: ""; position: absolute; inset: -6% -4%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,250,236,.98) 0%, rgba(255,236,190,.8) 45%, rgba(255,214,140,0) 100%);
  animation: glow 7s ease-in-out infinite;
}
.hero-img img { position: relative; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 18px 18px rgba(179,38,30,.28)); }
.hero-img .ph { position: relative; font-size: 4.5rem; }
@keyframes glow { 0%, 100% { opacity: .8; transform: scale(1); } 50% { opacity: 1; transform: scale(1.05); } }
.hero h1 { font-family: "Tiro Devanagari Hindi", Georgia, serif; font-weight: 400; color: var(--sindoor); font-size: clamp(2.6rem, 12vw, 3.4rem); line-height: 1.1; margin: 0; }
.hero .en { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 700; font-size: 1.75rem; margin: 2px 0 0; }
.hero .tagline { font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-size: 1.25rem; margin: 2px 0 8px; }
.diya { display: flex; align-items: center; gap: 12px; justify-content: center; margin: 0 auto 18px; color: var(--saffron); }
.diya::before, .diya::after { content: ""; width: 64px; height: 1px; background: var(--marigold); }
.features { list-style: none; padding: 0; margin: 0 0 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.features li { display: grid; justify-items: center; gap: 6px; font-size: .88rem; line-height: 1.25; }
.features .ic { width: 58px; height: 58px; border-radius: 50%; background: radial-gradient(circle, #FFE6BF, #F9D59B); display: grid; place-items: center; color: var(--saffron); }
.features svg { width: 30px; height: 30px; }
.scroll-hint { display: block; margin: 10px auto 0; width: 28px; color: var(--muted); }

section { padding: 28px 0; border-top: 1px solid rgba(242,140,40,.2); }
#order {
  margin: 0 -20px; padding: 36px 20px 32px; border-top: 0; color: #FFF3DF; text-align: center;
  background: linear-gradient(rgba(120,20,10,.35), rgba(120,20,10,.5)), url("/images/bg-arch.webp") center / cover no-repeat;
}
#order h2, #order a:not(.btn) { color: #FFE2A8; }
#order .chosen { background: rgba(255,248,238,.14); color: #FFF3DF; }
#order .note { color: #FFD9A0; }
#order .btn-primary { background: #FFF3DF; color: var(--sindoor); box-shadow: 0 10px 24px -10px rgba(0,0,0,.5); }
#order .btn-secondary { background: transparent; color: #FFF3DF; border-color: var(--marigold); }
section h2 { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.6rem; margin: 0 0 12px; color: var(--sindoor); }

.versions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.version {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  background: #fff; border: 2px solid var(--sand); border-radius: var(--radius); padding: 10px 10px 14px;
  font: inherit; color: var(--ink); cursor: pointer;
}
.version.on { border-color: var(--saffron); box-shadow: 0 0 0 3px rgba(242,140,40,.25); }
.vimg { width: 100%; aspect-ratio: 1; border-radius: 12px; margin-bottom: 6px; overflow: hidden; background: radial-gradient(circle at 50% 40%, #FFE3A8, var(--sand) 75%); display: grid; place-items: center; }
.vimg:empty::before { content: "🙏"; font-size: 2rem; }
.vimg img { width: 100%; height: 100%; object-fit: cover; }
.vdesc { font-size: .85rem; color: var(--muted); line-height: 1.3; }
.vprice { font-weight: 600; margin-top: 4px; }
.details { margin: 0 0 18px; padding-left: 1.1em; }
.details li { margin: 4px 0; }
.chosen { background: #fff; border-radius: 12px; padding: 10px 14px; font-size: .95rem; }
.chosen a { font-size: .9rem; margin-left: 4px; }
.note { font-size: .9rem; color: var(--muted); }
.seva { text-align: center; }
.seva p { margin: 0; }
footer { text-align: center; padding: 24px 0 170px; color: var(--muted); font-size: .9rem; }

.sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,248,238,.95); backdrop-filter: blur(8px); border-top: 1px solid rgba(242,140,40,.25);
  transform: translateY(110%); transition: transform .25s;
}
.sticky.show { transform: none; }
.sticky .btn { max-width: 440px; margin: 0 auto; }

/* ---------- Shared screen bits (tap, play, choose) ---------- */
.screen { padding-top: 14px; padding-bottom: 170px; }
.bar { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; }
.bar h1 { text-align: center; margin: 0; font-family: "Cormorant Garamond", Georgia, serif; color: var(--sindoor); font-size: 1.75rem; }
.back, .close { width: 44px; height: 44px; display: grid; place-items: center; text-decoration: none; color: var(--ink); font-size: 1.6rem; }
.divider { height: 14px; margin: 4px auto 18px; width: 180px; background: linear-gradient(var(--marigold), var(--marigold)) center / 100% 1px no-repeat; position: relative; }
.divider::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; transform: rotate(45deg); border: 1.5px solid var(--saffron); background: var(--cream); }
.sub { color: var(--muted); text-align: center; margin: 6px 0; }
.small { font-size: .88rem; }
h2.center { font-family: "Cormorant Garamond", Georgia, serif; color: var(--sindoor); font-size: 1.45rem; margin: 22px 0 12px; }

/* Tap screen */
.tapscreen { text-align: center; display: grid; justify-items: center; }
.tapscreen .close { justify-self: end; }
.halo { width: min(92vw, 420px); aspect-ratio: 16 / 9; display: grid; place-items: center; position: relative; margin-top: -6px; }
.halo::before { content: ""; position: absolute; inset: -8% -4%; border-radius: 50%; background: radial-gradient(circle, rgba(255,220,150,.95), rgba(246,185,59,.35) 55%, transparent 72%); }
.halo img { position: relative; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 16px 16px rgba(179,38,30,.28)); }
.halo-ph { position: relative; font-size: 4.5rem; }
.yt-badge { width: 74px; height: 74px; border-radius: 50%; background: #FFF1E0; border: 3px solid rgba(242,140,40,.35); display: grid; place-items: center; margin: 10px 0 6px; }
.yt-badge span { width: 40px; height: 28px; border-radius: 8px; background: var(--sindoor); position: relative; }
.yt-badge span::after { content: ""; position: absolute; left: 16px; top: 8px; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent #fff; }
.tapscreen h1 { font-family: "Cormorant Garamond", Georgia, serif; font-size: 2.2rem; line-height: 1.1; margin: 4px 0 0; text-wrap: balance; }
.tapscreen .sub { font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-size: 1.25rem; color: var(--ink); }
.progress { width: 72%; height: 6px; border-radius: 6px; background: var(--sand); overflow: hidden; margin-top: 10px; }
.progress span { display: block; height: 100%; width: 0; background: var(--saffron); border-radius: 6px; transition: width linear; }

/* Player */
.player { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #2a160c; box-shadow: 0 18px 40px -18px rgba(179,38,30,.6); }
.player iframe { width: 100%; height: 100%; border: 0; display: block; }
.player-ph { display: grid; place-items: center; font-size: 3rem; background: radial-gradient(circle, #FFE3A8, var(--sand)); margin-bottom: 14px; }
.openyt { display: block; text-align: center; font-size: .9rem; margin-top: 10px; }
.rows { display: grid; gap: 10px; }
.row {
  display: grid; grid-template-columns: 40px 1fr 20px; align-items: center; gap: 12px;
  min-height: 60px; padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,.75);
  border: 1px solid rgba(242,140,40,.18); color: var(--ink); text-decoration: none; font-weight: 600;
}
.chev { color: var(--muted); font-size: 1.5rem; line-height: 1; }
.ico { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--sindoor); position: relative; }
.play-ico::after { content: ""; position: absolute; left: 12px; top: 8px; border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent var(--sindoor); }
.edit-ico { border-radius: 8px; }
.edit-ico::after { content: ""; position: absolute; left: 13px; top: 4px; width: 5px; height: 20px; background: var(--sindoor); transform: rotate(40deg); border-radius: 2px; }

/* Choose page */
.choose .intro { text-align: center; margin: 4px 0 18px; }
.field { position: relative; }
.field svg { position: absolute; left: 14px; top: 50%; width: 22px; height: 22px; margin-top: -11px; color: var(--saffron); }
input[type=url] {
  width: 100%; min-height: 54px; padding: 12px 14px 12px 46px; font: inherit; font-size: 16px; /* 16px stops iOS zoom */
  border: 1.5px solid #E8D4B8; border-radius: 14px; background: #fff; color: var(--ink);
}
input[type=url]:focus { outline: none; border-color: var(--saffron); box-shadow: 0 0 0 3px rgba(242,140,40,.2); }
.choose form .btn { margin-top: 14px; }
.flash { border-radius: 14px; padding: 12px 14px; margin-top: 14px; background: #E9F6E6; color: #24502A; display: flex; gap: 10px; align-items: center; justify-content: center; }
.flash::before { content: "✓"; width: 22px; height: 22px; flex: none; border-radius: 50%; background: #2E8B3A; color: #fff; display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.flash.bad { background: #FDE4DC; color: var(--sindoor); }
.flash.bad::before { content: "!"; background: var(--sindoor); }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 22px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: #E8D4B8; }
.current { word-break: break-all; text-align: center; font-size: .85rem; color: var(--muted); margin-top: 14px; }
.yt-mini { width: 30px; height: 21px; border-radius: 6px; background: var(--sindoor); position: relative; flex: none; }
.yt-mini::after { content: ""; position: absolute; left: 12px; top: 6px; border-style: solid; border-width: 4.5px 0 4.5px 8px; border-color: transparent transparent transparent #fff; }

@media (min-width: 481px) { #order { border-radius: 22px; margin: 0; } }
@media (min-width: 760px) {
  .sticky { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-img::before { animation: none; }
  .progress span { transition: none; }
}
