/* Public landing page (index.html #landing), shown to visitors who are not signed in (boot.js hides it for everyone else).
   One idea: the page keeps a khata while you read it. A receipt strip prints a line for everything you do.
   Eczar (Latin + Devanagari serif) for the big lines, Palanquin for text. Oat paper, ledger-ink indigo, one brick red. */

#landing { display: none; }
html:not(.app-mode) #landing { display: block; }
html:not(.app-mode) #app, html:not(.app-mode) .tabbar { display: none !important; }
html:not(.app-mode) body { background: #f1ebdd; }

.lp {
  --oat: #f1ebdd; --oat-2: #e9e1cf; --slip: #fbf8f0; --ink: #1c1a2b; --ink-2: #4f4b63; --ink-3: #5f5a72;
  --brick: #a9372d; --gold: #ebb74a; --night: #15121f; --green: #2e6f4f; --line: #d9d0ba;
  --wrap: 1200px; --pad: clamp(20px, 5vw, 48px);
  font-family: var(--font); font-size: 1.0625rem; line-height: 1.6; color: var(--ink); background: var(--oat);
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
.lp *, .lp *::before, .lp *::after { box-sizing: border-box; }
.lp a { color: inherit; }
.lp { --font: "Palanquin Lite", "Palanquin", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif; --serif: "Eczar Lite", "Eczar", "Iowan Old Style", Georgia, "Noto Serif Devanagari", serif; }
.lp :where(h1, h2, h3, p, ol) { margin: 0; padding: 0; }
.lp :where(h1, h2, h3) { font-family: var(--serif); font-weight: 400; color: var(--ink); text-wrap: balance; }
.hi { font-family: var(--serif); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lp-small { font-size: .85rem; }

/* nav */
.lp-nav { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 28px; padding: 14px var(--pad); background: rgba(241,235,221,.92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.lp-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 1.35rem; letter-spacing: -.01em; }
.lp-brand img { border-radius: 8px; }
.lp-nav nav { display: flex; gap: 26px; margin-left: auto; }
.lp-nav nav a { text-decoration: none; color: var(--ink-2); font-weight: 500; }
.lp-nav nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; }
.lp-signin { padding: 8px 18px; border-radius: 10px; box-shadow: inset 0 0 0 1.5px var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.lp-signin:hover { background: var(--ink); color: var(--oat); }
.lp-signin { white-space: nowrap; }
.lp-lang { display: inline-flex; margin-left: 4px; border-radius: 10px; box-shadow: inset 0 0 0 1.5px var(--line); overflow: hidden; flex: none; }
.lp-lang button { font: inherit; font-size: .88rem; font-weight: 600; min-height: 36px; min-width: 40px; padding: 0 10px; border: 0; border-radius: 0; background: none !important; box-shadow: none !important; color: var(--ink-2); cursor: pointer; }
.lp-lang button[aria-pressed="true"] { background: var(--ink) !important; color: var(--oat); }
html.lang-pending #landing { visibility: hidden; }
@media (max-width: 640px) { .lp-nav nav { display: none; } .lp-lang { margin-left: auto; } .lp-nav { gap: 10px; } }
@media (max-width: 360px) { .lp-brand span { font-size: .95rem; } .lp-signin { padding: 8px 10px; font-size: .9rem; } .lp-lang button { min-width: 36px; padding: 0 8px; } }

.lp-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 28px; border-radius: 10px; background: var(--ink); color: var(--oat) !important; font-weight: 650; font-size: 1.02rem; text-decoration: none; transition: transform .15s, background .2s; }
.lp-btn:hover { background: #2c2942; }
.lp-btn:active { transform: translateY(1px); }
.lp-btn-light { background: var(--oat); color: var(--night) !important; }
.lp-btn-light:hover { background: #fff; }
.lp-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 26px; }
.lp-link { color: inherit; font-weight: 500; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: rgba(241,235,221,.4); }
.lp-link:hover { text-decoration-color: currentColor; }

/* hero */
.lp-hero { max-width: var(--wrap); margin: 0 auto; padding: clamp(36px, 7vw, 84px) var(--pad) clamp(60px, 9vw, 120px); }
.lp-hero h1 { font-size: clamp(3rem, 1rem + 8.2vw, 8.4rem); line-height: .98; letter-spacing: -.025em; }
.lp-hero h1 span { display: block; }
.lp-hero h1 .hi { color: var(--brick); line-height: 1.12; letter-spacing: 0; margin-top: .04em; }
.lp-hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(32px, 6vw, 88px); align-items: start; margin-top: clamp(36px, 6vw, 72px); }
.lp-lead { font-size: 1.22rem; color: var(--ink-2); max-width: 31em; margin-bottom: 24px; }
.lp-note { display: block; width: 100%; min-height: 200px; resize: none; padding: 22px 26px; border: 1px solid var(--line); border-radius: 6px; background: var(--slip); color: var(--ink); caret-color: var(--brick);
  font-family: var(--serif); font-size: clamp(1.45rem, 1.1rem + 1vw, 1.9rem); line-height: 1.5; outline: 0; overflow: hidden;
  box-shadow: 0 1px 0 rgba(28,26,43,.05), 0 24px 40px -28px rgba(28,26,43,.4); transition: box-shadow .2s, border-color .2s; }
.lp-note:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(235,183,74,.35), 0 24px 40px -28px rgba(28,26,43,.4); }
.lp-note::placeholder { color: #a9a2b3; }
.lp-try { margin-top: 16px; color: var(--ink-3); font-size: .98rem; }
.lp-try button { font: inherit; color: var(--ink); background: none !important; box-shadow: none !important; border: 0; border-radius: 0; min-height: 0; height: auto; padding: 0; margin: 0 2px 0 6px; cursor: pointer; border-bottom: 1.5px solid var(--ink-3); }
.lp-try button:hover { border-bottom-color: var(--brick); color: var(--brick); }
@media (max-width: 900px) { .lp-hero-grid { grid-template-columns: 1fr; } }

/* the receipt strip */
.lp-tapewrap { filter: drop-shadow(0 22px 22px rgba(28,26,43,.2)); max-width: 380px; width: 100%; }
@media (max-width: 900px) { .lp-tapewrap { margin: 0 auto; } }
.lp-tape { background: var(--slip); padding: 22px 22px 38px; min-height: 340px;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%; mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%; }
.lp-tape-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-bottom: 12px; border-bottom: 1.5px dashed var(--line); font-size: .78rem; color: var(--ink-3); }
.lp-tape-top b { letter-spacing: .12em; color: var(--ink); font-weight: 700; }
.lp-lines { list-style: none; min-height: 150px; padding: 10px 0 6px; }
.lp-lines li { display: flex; align-items: baseline; gap: 8px; padding: 6px 0; font-size: 1rem; animation: lpline .55s cubic-bezier(.2,.7,.2,1) both; }
@keyframes lpline { from { opacity: 0; transform: translateY(8px); } }
.lp-lines .n { min-width: 0; overflow-wrap: anywhere; }
.lp-lines .d { flex: 1; min-width: 14px; border-bottom: 2px dotted #cdc4ae; transform: translateY(-4px); }
.lp-lines b { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums lining-nums; }
.lp-lines .in b { color: var(--green); }
.lp-lines .ud .n, .lp-lines .quiet .n { color: var(--ink-3); font-style: italic; }
.lp-lines .ud b, .lp-lines .quiet b { color: var(--ink-3); }
.lp-lines .rule { display: block; border-top: 1.5px dashed var(--line); padding: 0; margin: 8px 0 2px; animation: none; }
.lp-lines .total .n, .lp-lines .total b { font-weight: 700; }
.lp-lines .ok { color: var(--green); font-weight: 700; padding-top: 10px; }
.lp-lines .empty { color: var(--ink-3); font-style: italic; }
.lp-tape-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding-top: 12px; border-top: 1.5px dashed var(--line); }
.lp-tape-sum span { display: block; font-size: .78rem; color: var(--ink-3); }
.lp-tape-sum b { font-family: var(--serif); font-weight: 700; font-size: 1.7rem; line-height: 1.1; font-variant-numeric: tabular-nums lining-nums; }
.lp-tape-foot { margin-top: 12px; text-align: center; font-size: .8rem; color: var(--ink-3); }

/* one day */
.lp-day { padding: clamp(60px, 9vw, 120px) 0 0; }
.lp-day-head { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.lp-day-head h2 { font-size: clamp(2.6rem, 1rem + 5.4vw, 5.6rem); line-height: 1; letter-spacing: -.02em; }
.lp-day-head p { margin-top: 14px; font-size: 1.2rem; color: var(--ink-2); }
.lp-day-grid { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: clamp(40px, 7vw, 100px); margin-top: 20px; }
.lp-sticky { position: sticky; top: 96px; align-self: start; padding-top: 40px; filter: drop-shadow(0 22px 22px rgba(28,26,43,.2)); }
.lp-tape-day { min-height: 560px; }
.lp-tape-day .lp-lines { min-height: 330px; }
.lp-tape-drawer { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; border-top: 2px solid var(--ink); }
.lp-tape-drawer span { font-size: .9rem; color: var(--ink-2); }
.lp-tape-drawer b { font-family: var(--serif); font-weight: 700; font-size: 2.1rem; line-height: 1; font-variant-numeric: tabular-nums lining-nums; }

.lp-moments { list-style: none; }
.lp-moments li { display: grid; grid-template-columns: minmax(0, 1fr) 250px; grid-template-rows: auto auto; column-gap: 40px; align-items: center; min-height: 62vh; }
.lp-moments time, .lp-moments img { transition: opacity .7s; }
.lp-moments li:not(.on) time { opacity: .72; }
.lp-moments li:not(.on) img { opacity: .55; }
.lp-moments time { grid-column: 1; align-self: end; font-family: var(--serif); font-size: clamp(4.4rem, 1.5rem + 8vw, 9.5rem); line-height: .86; color: var(--brick); letter-spacing: -.03em; }
.lp-moments li > div { grid-column: 1; grid-row: 2; align-self: start; padding-top: 18px; }
.lp-moments h3 { font-size: clamp(1.9rem, 1.2rem + 1.6vw, 2.8rem); line-height: 1.08; }
.lp-moments p { margin-top: 12px; font-size: 1.12rem; color: var(--ink-2); max-width: 22em; }
.lp-moments img { grid-column: 2; grid-row: 1 / 3; width: 100%; height: auto; aspect-ratio: 585 / 780; object-fit: cover; object-position: top; border-radius: 22px; box-shadow: 0 34px 50px -34px rgba(28,26,43,.5), 0 0 0 1px rgba(28,26,43,.08); }
.lp-mini { display: none; }
@media (max-width: 980px) {
  .lp-day-grid { grid-template-columns: 1fr; }
  .lp-sticky { display: none; }
  .lp-moments li { min-height: 0; opacity: 1; padding: 42px 0; grid-template-columns: minmax(0, 1fr) 150px; column-gap: 20px; border-top: 1px solid var(--line); }
  .lp-moments li:first-child { border-top: 0; }
  .lp-moments img { align-self: center; }
  .lp-moments time { font-size: clamp(3.6rem, 16vw, 6rem); }
  .lp-mini { display: flex; position: sticky; bottom: 12px; z-index: 5; margin: 0 var(--pad); padding: 12px 16px; border-radius: 12px; background: var(--ink); color: var(--oat); justify-content: space-between; align-items: baseline; gap: 12px; box-shadow: 0 14px 30px -14px rgba(28,26,43,.6); font-size: .95rem; }
  .lp-mini span { color: rgba(241,235,221,.75); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lp-mini b { font-family: var(--serif); font-size: 1.5rem; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums lining-nums; }
}
@media (max-width: 520px) { .lp-moments li { grid-template-columns: 1fr; } .lp-moments img { grid-column: 1; grid-row: auto; width: 62%; margin-top: 22px; } }

/* write how you write */
.lp-words { margin-top: clamp(60px, 8vw, 110px); padding: clamp(80px, 11vw, 150px) var(--pad); background: var(--oat-2); text-align: center; }
.lp-words-in { font-family: var(--serif); font-size: clamp(3.6rem, 1rem + 11vw, 10.5rem); line-height: 1.12; letter-spacing: -.02em; min-height: 1.2em; transition: opacity .45s; overflow-wrap: anywhere; }
.lp-words-out { margin-top: 6px; color: var(--ink-3); font-size: 1.1rem; transition: opacity .45s; }
.lp-words-out b { font-family: var(--serif); font-weight: 700; font-size: 1.9rem; color: var(--brick); margin-left: 6px; }
.lp-words h2 { margin-top: clamp(50px, 7vw, 90px); font-size: clamp(1.8rem, 1rem + 2.6vw, 3.2rem); letter-spacing: -.01em; }
.lp-words-sub { margin-top: 10px; color: var(--ink-2); }
.lp-words .fade { opacity: 0; }

.lp-also { max-width: 880px; margin: clamp(70px, 9vw, 130px) auto; padding: 0 var(--pad); font-family: var(--serif); font-size: clamp(1.5rem, 1rem + 1.6vw, 2.2rem); line-height: 1.35; color: var(--ink-2); text-wrap: balance; }

/* questions */
.lp-faq { max-width: 780px; margin: 0 auto; padding: 0 var(--pad) clamp(80px, 11vw, 150px); }
.lp-faq h2 { font-size: clamp(2.2rem, 1rem + 3.4vw, 3.8rem); margin-bottom: 26px; }
.lp-faq details { border-top: 1px solid var(--line); }
.lp-faq details:last-child { border-bottom: 1px solid var(--line); }
.lp-faq summary { cursor: pointer; list-style: none; padding: 22px 0; font-family: var(--serif); font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem); line-height: 1.25; display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; font-size: 1.9rem; line-height: .6; color: var(--brick); transition: transform .3s; }
.lp-faq details[open] summary::after { transform: rotate(45deg); }
.lp-faq details p { padding: 0 0 24px; color: var(--ink-2); max-width: 34em; }

/* finale */
.lp-finale { background: var(--night); color: var(--oat); padding: clamp(100px, 15vw, 200px) var(--pad); }
.lp-finale > * { max-width: var(--wrap); margin-left: auto; margin-right: auto; }
.lp-finale h2 { color: var(--oat); font-size: clamp(3.6rem, 1rem + 11vw, 11.5rem); line-height: 1.04; letter-spacing: 0; }
.lp-finale h2 span { display: block; }
.lp-finale h2 span + span { color: var(--gold); }
.lp-finale-sub { margin-top: 18px; font-size: 1.25rem; color: rgba(241,235,221,.7); }
.lp-finale .lp-cta { margin-top: 40px; }

.lp-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 30px; padding: 26px var(--pad); background: var(--night); color: rgba(241,235,221,.72); font-size: .95rem; border-top: 1px solid rgba(241,235,221,.1); }
.lp-foot .lp-brand { color: var(--oat); font-size: 1.15rem; }
.lp-foot p:first-of-type { margin-left: auto; }
.lp-foot a:not(.lp-brand) { color: var(--oat); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.lp-foot .lp-small { color: rgba(241,235,221,.7); }
@media (max-width: 640px) { .lp-foot { flex-direction: column; align-items: flex-start; } .lp-foot p:first-of-type { margin-left: 0; } }

@media (prefers-reduced-motion: reduce) { .lp-lines li { animation: none; } .lp-moments time, .lp-moments img, .lp-words-in, .lp-words-out { transition: none; } }
html.lite .lp-lines li { animation: none; }

/* get-started button and the "say it" mic */
.lp-setup { padding: 8px 16px; border-radius: 10px; background: var(--ink); color: var(--oat) !important; text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap; }
.lp-setup:hover { background: #2c2942; }
.lp-price { margin-top: 12px; color: var(--ink-2); font-size: .98rem; }
.lp-mic-row { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.lp-mic-row[hidden], .lp-price[hidden] { display: none; }
.lp-mic { display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 48px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--ink); touch-action: manipulation; }
.lp-mic:hover { background: rgba(28,26,43,.07); }
.lp-mic.on { background: var(--brick); color: #fff; box-shadow: none; animation: lp-pulse 1.4s ease-in-out infinite; }
.lp-mic:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.lp-mic-status { margin: 0; min-width: 0; font-size: .88rem; line-height: 1.4; color: var(--ink-2); overflow-wrap: anywhere; }
@keyframes lp-pulse { 50% { box-shadow: 0 0 0 7px rgba(180,60,40,.18); } }
@media (prefers-reduced-motion: reduce) { .lp-mic.on { animation: none; } }
html.lite .lp-mic.on { animation: none; }
@media (max-width: 520px) { .lp-setup { display: none; } .lp-mic-row { flex-wrap: wrap; gap: 8px; } .lp-btn { width: 100%; } }

/* the landing page is always light: keep app dark-theme / Soft-style colours from leaking in */
.lp summary, .lp label { color: var(--ink); }
.lp .lp-mic:not(.on):not(:hover) { background: transparent !important; color: var(--ink); }
