@font-face { font-family: "Fraunces"; src: url("fonts/fraunces.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
/* Kathā v2 — Lantern Night */
:root {
  --night: #141A3A; --night-2: #1E2550; --night-3: #2A3468; --deep: #0A0D22;
  --moon: #FFF6E8; --mist: #BFC5E4;
  --vermilion: #C93A22; --vermilion-pressed: #A42E1A; --ember: #E8573A;
  --sakura: #F4B6C2; --sakura-deep: #E68FA3;
  --matcha: #6E9A4E; --matcha-deep: #2E5A3A; --tea: #2F5240;
  --gold: #F2C14E; --gold-deep: #C9922A;
  --paper: #FBEFE0; --paper-2: #F4E2CB; --ink: #1B1F3B; --ink-muted: #5A5F80;
  --display: "Fraunces", "Noto Serif Tamil", "Noto Serif Sinhala", "Noto Serif JP", Georgia, serif;
  --body: "Figtree", "Noto Sans Tamil", "Noto Sans Sinhala", "Noto Sans Devanagari", "Noto Sans JP", system-ui, sans-serif;
  --story: "Fraunces", "Noto Serif Tamil", "Noto Serif Sinhala", "Noto Serif Devanagari", "Noto Serif JP", Georgia, serif;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .15 0 0 0 .2 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --fibre: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .5' numOctaves='2' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .97 0 0 0 0 .9 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  --lift-1: 0 1px 0 rgba(255,246,232,.06) inset, 0 2px 0 rgba(5,7,26,.35), 0 10px 18px -10px rgba(5,7,26,.7);
  --lift-3: 0 2px 0 rgba(5,7,26,.3), 0 18px 28px -14px rgba(5,7,26,.75), 0 40px 60px -30px rgba(5,7,26,.6);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--night); color: var(--moon); font-family: var(--body); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50; background: var(--grain); opacity: .16; mix-blend-mode: overlay; }
svg { display: block; }
.sparrow { width: 100%; height: auto; overflow: visible; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; font-weight: 620; letter-spacing: -.02em; line-height: 1.12; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
:lang(ta) { font-family: "Noto Sans Tamil", var(--body); }
:lang(si) { font-family: "Noto Sans Sinhala", var(--body); }
:lang(hi) { font-family: "Noto Sans Devanagari", var(--body); }
:lang(ja) { font-family: "Noto Sans JP", var(--body); }
.wrap { max-width: 480px; margin: 0 auto; position: relative; }

/* header */
.top { position: absolute; top: 0; left: 0; right: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; padding: 14px 18px 0; }
.brand { display: flex; align-items: center; gap: 6px; font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; font-weight: 650; font-size: 26px; letter-spacing: -.02em; color: var(--moon); }
.brand svg { width: 40px; height: 40px; }
.pill { min-height: 44px; min-width: 52px; display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; border-radius: 999px; background: rgba(255,246,232,.1); border: 1px solid rgba(255,246,232,.28); color: var(--moon); font-weight: 700; font-size: 14px; letter-spacing: .06em; backdrop-filter: blur(6px); }

/* hero stage */
.stage { position: relative; width: 100%; aspect-ratio: 390 / 470; overflow: hidden; background: var(--night); }
.stage > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.caption { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 5; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 14px 8px 8px; border-radius: 18px; background: rgba(20,26,58,.78); border: 1px solid rgba(242,193,78,.35); backdrop-filter: blur(8px); box-shadow: var(--lift-1); }
.caption .n { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--night); font-family: var(--display); font-weight: 700; font-size: 18px; }
.caption .t { flex: 1; font-size: 15.5px; font-weight: 650; line-height: 1.25; color: var(--moon); }
.caption .dots { display: flex; gap: 5px; }
.caption .dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,246,232,.3); transition: all .3s; }
.caption .dots i.on { width: 18px; border-radius: 4px; background: var(--gold); }

/* hero copy */
.hero-copy { position: relative; padding: 18px 22px 8px; background: linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%); }
.hero-copy h1 { font-size: 31px; color: var(--moon); }
.hero-copy .sub { margin-top: 10px; font-family: var(--display); font-variation-settings: "SOFT" 100; font-weight: 450; font-size: 21px; line-height: 1.3; color: var(--mist); }
.hero-copy .sub em { font-style: italic; color: var(--gold); position: relative; white-space: nowrap; }
.hero-copy .sub em svg { position: absolute; left: -2px; right: -2px; bottom: -7px; width: calc(100% + 4px); height: 10px; }
.langs { display: flex; gap: 7px; margin: 16px 0 6px; flex-wrap: nowrap; }
.lang { display: inline-flex; align-items: center; min-height: 36px; padding: 0 11px; border-radius: 10px 12px 9px 11px; font-size: 14.5px; font-weight: 650; color: var(--ink); background: var(--grain), var(--c, var(--paper)); box-shadow: var(--lift-1); transform: rotate(var(--r, 0deg)); white-space: nowrap; }

/* buttons */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 26px; border: 0; border-radius: 999px; background: var(--vermilion); color: #fff; font-family: var(--body); font-size: 18px; font-weight: 750; letter-spacing: .01em; cursor: pointer; box-shadow: 0 4px 0 var(--vermilion-pressed), 0 14px 24px -12px rgba(201,58,34,.8); transition: transform .12s var(--spring), box-shadow .12s; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: translateY(3px) scale(.97, .94); box-shadow: 0 1px 0 var(--vermilion-pressed), 0 6px 12px -8px rgba(201,58,34,.8); }
.btn.squish { animation: squish .42s var(--spring); }
@keyframes squish { 0% { transform: scale(1); } 30% { transform: scale(1.08, .86); } 60% { transform: scale(.96, 1.06); } 100% { transform: scale(1); } }
.btn-wide { width: 100%; }
.btn-ghost { background: rgba(255,246,232,.08); color: var(--moon); border: 1.5px solid rgba(255,246,232,.3); box-shadow: var(--lift-1); }
.btn-ghost:active { box-shadow: none; }
.petal-burst { position: fixed; width: 14px; height: 12px; pointer-events: none; z-index: 60; background: var(--sakura); border-radius: 80% 10% 80% 30%; animation: burst .9s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes burst { to { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; } }

/* sections */
.sec { position: relative; padding: 34px 22px 30px; }
.sec h2 { font-size: 27px; color: var(--moon); }
.sec .lede { margin: 6px 0 18px; font-size: 16px; color: var(--mist); }
.sec-night2 { background: var(--night-2); }
.sec-tea { background: linear-gradient(180deg, var(--tea), #24412F); }
.edge { position: absolute; left: 0; right: 0; height: 26px; top: -25px; }

/* paper sheets: layered, grained, deep shadows */
.sheet { position: relative; color: var(--ink); background: var(--grain), linear-gradient(170deg, #FFF8EC, var(--paper) 55%, var(--paper-2)); border-radius: 6px 9px 7px 8px; box-shadow: var(--lift-3); }
.sheet::before { content: ""; position: absolute; inset: 6px -6px -8px 8px; z-index: -1; border-radius: 8px; background: var(--grain), var(--under, var(--sakura)); transform: rotate(2.2deg); box-shadow: var(--lift-1); }
.tape { position: absolute; width: 84px; height: 26px; top: -12px; z-index: 3; background: repeating-linear-gradient(-30deg, rgba(255,255,255,.28) 0 5px, transparent 5px 10px), var(--tape, var(--gold)); opacity: .92; transform: rotate(var(--tr, -6deg)); clip-path: polygon(3% 8%, 97% 0, 100% 90%, 94% 100%, 0 94%); box-shadow: 0 2px 4px rgba(10,13,34,.25); }

/* sample chapter */
.chapter-card { padding: 0 0 18px; margin-top: 6px; }
.chapter-card .art { height: 150px; border-radius: 6px 9px 0 0; overflow: hidden; }
.chapter-card .art svg { width: 100%; height: 100%; }
.chapter-card .in { padding: 14px 18px 0; }
.meta { display: flex; justify-content: space-between; font-size: 12px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); }
.ta-title { margin-top: 8px; font-family: "Noto Serif Tamil", serif; font-weight: 650; font-size: 20px; line-height: 1.45; color: var(--ink); }
.en-title { margin-top: 2px; font-family: var(--display); font-style: italic; font-size: 18px; color: var(--vermilion-pressed); }
.player { display: flex; align-items: center; gap: 12px; margin: 14px 0 12px; padding: 8px 14px 8px 8px; border-radius: 999px; background: var(--night); color: var(--moon); box-shadow: var(--lift-1); }
.play { width: 56px; height: 56px; flex: none; border: 0; border-radius: 50%; background: var(--vermilion); display: grid; place-items: center; cursor: pointer; box-shadow: 0 3px 0 var(--vermilion-pressed); transition: transform .12s var(--spring); }
.play:active { transform: scale(.9); }
.wave { flex: 1; height: 36px; }
.wave rect { transition: fill .2s; }
.player time { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--mist); white-space: nowrap; }
.quote { font-family: var(--display); font-variation-settings: "SOFT" 100; font-size: 17px; line-height: 1.55; color: var(--ink); }
.cap { margin-top: 8px; font-size: 14px; color: var(--ink-muted); }
.peek { position: absolute; right: -8px; top: -58px; width: 78px; z-index: 4; }

/* book flip */
.book-scene { position: relative; height: 290px; margin: 0 -22px; perspective: 1300px; }
.book { position: absolute; left: 50%; top: 28px; width: 340px; height: 222px; margin-left: -170px; transform-style: preserve-3d; transform: rotateX(14deg); }
.book .base, .leaf { position: absolute; top: 0; width: 170px; height: 222px; }
.book .base.l { left: 0; } .book .base.r { left: 170px; }
.leaf { left: 170px; transform-origin: 0 50%; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.55,.05,.25,1); }
.leaf.turned { transform: rotateY(-180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; overflow: hidden; }
.face.back { transform: rotateY(180deg); }
.pg { padding: 16px 14px; color: var(--ink); background: var(--grain), linear-gradient(90deg, #EEDCC2, #FFF8EC 14%, #FFF8EC); box-shadow: inset 8px 0 14px -10px rgba(27,31,59,.5); }
.pg.lp { background: var(--grain), linear-gradient(270deg, #EEDCC2, #FFF8EC 14%, #FFF8EC); box-shadow: inset -8px 0 14px -10px rgba(27,31,59,.5); }
.cover { background: var(--grain), repeating-linear-gradient(45deg, rgba(0,0,0,.05) 0 2px, transparent 2px 4px), linear-gradient(160deg, #D8492F, var(--vermilion) 50%, #A42E1A); color: var(--gold); display: grid; place-items: center; text-align: center; border-radius: 2px 8px 8px 2px; box-shadow: inset 10px 0 0 rgba(0,0,0,.18); }
.book-shadow { position: absolute; left: 50%; top: 246px; width: 360px; height: 30px; margin-left: -180px; border-radius: 50%; background: radial-gradient(closest-side, rgba(5,7,26,.6), transparent); }
.pg .ch { font-size: 9.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--vermilion); }
.pg .tt { margin-top: 5px; font-family: "Noto Serif Tamil", serif; font-weight: 650; font-size: 13px; line-height: 1.45; }
.pg .tx { margin-top: 6px; font-family: "Noto Serif Tamil", serif; font-size: 9.8px; line-height: 1.7; color: #3A3550; }
.pg .et { margin-top: 5px; font-family: var(--display); font-style: italic; font-size: 14.5px; line-height: 1.2; }
.pg .ex { margin-top: 6px; font-family: var(--display); font-size: 10.6px; line-height: 1.5; color: #3A3550; }
.pg .folio { position: absolute; bottom: 9px; left: 0; right: 0; text-align: center; font-family: var(--display); font-size: 10px; color: var(--ink-muted); }
.qr { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 9.5px; line-height: 1.3; color: var(--ink-muted); }
.book-nav { display: flex; align-items: center; justify-content: center; gap: 18px; }
.round { width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid rgba(255,246,232,.35); background: rgba(255,246,232,.08); display: grid; place-items: center; cursor: pointer; color: var(--moon); }
.round:active { transform: scale(.92); }
.ndots { display: flex; gap: 7px; } .ndots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,246,232,.35); } .ndots i.on { width: 22px; border-radius: 4px; background: var(--gold); }

/* trust */
.trust { display: grid; gap: 14px; margin-top: 4px; }
.trust div { display: flex; align-items: center; gap: 14px; font-size: 16.5px; color: var(--moon); }
.trust svg { width: 34px; height: 44px; flex: none; }

footer { padding: 18px 22px 140px; color: var(--mist); font-size: 14px; }

/* sticky gift bar */
.gift-bar { position: fixed; left: 50%; bottom: 14px; z-index: 40; width: min(366px, calc(100% - 24px)); transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 9px 9px 9px 18px; border-radius: 26px; background: rgba(14,18,44,.9); border: 1px solid rgba(242,193,78,.45); box-shadow: 0 20px 40px -14px rgba(0,0,0,.7); backdrop-filter: blur(10px); }
.gift-bar .p { flex: 1; line-height: 1.15; }
.gift-bar b { display: block; font-family: var(--display); font-size: 24px; font-weight: 650; color: var(--moon); }
.gift-bar span { font-size: 13px; color: var(--mist); }
.gift-bar s { color: var(--mist); }

/* reveal + reduced motion */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s, transform .7s var(--spring); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---- screens ---- */
.screen { position: relative; width: 390px; margin: 0 auto; overflow: hidden; background: var(--night); }
.band { position: relative; height: 210px; }
.band > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.kicker { font-family: var(--display); font-style: italic; font-size: 16px; color: var(--gold); }
.pad { padding: 0 22px; }
.form { margin: 18px 0 0; padding: 22px 18px 20px; }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 7px; font-size: 15px; font-weight: 750; color: var(--ink); }
.input { display: flex; align-items: center; min-height: 56px; padding: 0 16px; border-radius: 14px; background: #FFFDF8; border: 2px solid #D9C6AC; font-size: 17px; color: var(--ink); box-shadow: inset 0 2px 0 rgba(27,31,59,.05); }
.hint { margin-top: 6px; font-size: 14px; color: var(--ink-muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px; border-radius: 14px; background: #FFFDF8; border: 2px solid #D9C6AC; font-size: 16.5px; font-weight: 700; color: var(--ink); box-shadow: 0 2px 0 #D9C6AC; }
.chip.on { background: var(--night); color: var(--moon); border-color: var(--gold); box-shadow: 0 2px 0 var(--gold-deep), 0 0 0 3px rgba(242,193,78,.3); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ticket { position: relative; margin: 6px 0 20px; padding: 18px 18px 16px; border-radius: 10px; color: var(--moon); background: var(--grain), repeating-linear-gradient(45deg, rgba(255,255,255,.035) 0 2px, transparent 2px 4px), linear-gradient(160deg, #2A3468, var(--night)); box-shadow: var(--lift-3); }
.ticket::after { content: ""; position: absolute; inset: 6px; border: 1.5px solid rgba(242,193,78,.55); border-radius: 6px; pointer-events: none; }
.ticket h3 { font-size: 21px; color: var(--gold); }
.ticket ul { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.ticket li { position: relative; padding-left: 22px; font-size: 15px; line-height: 1.4; color: var(--moon); }
.ticket li::before { content: ""; position: absolute; left: 2px; top: .35em; width: 10px; height: 10px; border-radius: 50% 0 50% 50%; background: var(--sakura); transform: rotate(45deg); }
.total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; padding-top: 12px; border-top: 1.5px dashed rgba(242,193,78,.5); }
.total .l { font-size: 16px; font-weight: 750; } .total .l small { display: block; font-size: 13px; font-weight: 500; color: var(--mist); }
.total .a { font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; font-weight: 650; font-size: 44px; line-height: 1; color: var(--gold); }
.assure { display: flex; gap: 10px; align-items: center; margin-top: 14px; font-size: 14px; color: var(--ink-muted); line-height: 1.4; }
.avatars { display: flex; } .av { width: 44px; height: 44px; margin-left: -10px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--ink); border: 2.5px solid var(--night); background: var(--grain), var(--c); box-shadow: var(--lift-1); } .av:first-child { margin-left: 0; }
.card-n { position: relative; padding: 16px; margin-bottom: 14px; }
.lbl { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); }
.big-date { margin-top: 2px; font-family: var(--display); font-variation-settings: "SOFT" 100; font-size: 23px; white-space: nowrap; font-weight: 620; color: var(--ink); letter-spacing: -.02em; }
.stitch { display: flex; gap: 2px; margin-top: 12px; padding: 7px 8px; border-radius: 6px; background: var(--grain), linear-gradient(180deg, #2A3468, var(--night)); }
.stitch i { flex: 1; height: 16px; border-radius: 2px; background: rgba(255,246,232,.14); }
.stitch i.on { background: var(--gold); box-shadow: 0 0 6px rgba(242,193,78,.7); }
.tile { position: relative; display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: center; padding: 10px 14px 10px 10px; margin-bottom: 12px; }
.tile svg.v { width: 84px; height: 62px; border-radius: 6px; box-shadow: var(--lift-1); }
.tile h3 { font-size: 17px; color: var(--ink); line-height: 1.25; }
.tile .ta { font-family: "Noto Serif Tamil", serif; font-size: 13px; color: var(--ink-muted); line-height: 1.45; margin-top: 2px; }
.clip { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; min-height: 30px; padding: 0 10px 0 4px; border-radius: 999px; background: var(--night); color: var(--moon); font-size: 12.5px; font-weight: 700; }
.clip b { width: 24px; height: 24px; border-radius: 50%; background: var(--vermilion); display: grid; place-items: center; }
@keyframes breathe { 0%, 100% { transform: scale(1, 1) translateY(0); } 50% { transform: scale(1.035, .975) translateY(2px); } }
@keyframes glow { 0%, 100% { opacity: .85; } 50% { opacity: 1; } }
.breathe .bob { transform-origin: 60px 110px; animation: breathe 4s ease-in-out infinite; }
.call { height: 844px; display: flex; flex-direction: column; align-items: center; text-align: center; background: radial-gradient(ellipse 90% 55% at 50% 22%, rgba(242,166,78,.32), transparent 60%), linear-gradient(180deg, #0E1330, var(--night-2) 60%, #2A3468); }
.call .glow { animation: glow 3.2s ease-in-out infinite; }
.btn-huge { min-height: 92px; font-size: 26px; border-radius: 30px; gap: 14px; }
