/* Katha website. The same palette and type as the app: lamplight on an indigo night sky,
   with a turmeric-paper day mode for anyone whose device prefers light. */

@font-face { font-family: 'Yatra One'; src: url(fonts/yatra-one.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Literata'; src: url(fonts/literata.woff2) format('woff2'); font-weight: 400 600; font-display: swap; }
@font-face { font-family: 'Literata'; src: url(fonts/literata-italic.woff2) format('woff2'); font-style: italic; font-display: swap; }
@font-face { font-family: 'Noto Serif Devanagari'; src: url(fonts/noto-serif-devanagari.woff2) format('woff2'); font-weight: 400 600; font-display: swap; }

:root {
  --night: #15183a;
  --night-raised: #1f2350;
  --night-line: #343a75;
  --moon: #f5e9d0;
  --moon-muted: #b9b3cf;
  --marigold: #f2ae2e;
  --flame: #ffd36b;
  --peacock: #13827b;
  --clay: #c9702e;

  --bg: var(--night);
  --raised: var(--night-raised);
  --line: var(--night-line);
  --ink: var(--moon);
  --muted: var(--moon-muted);
  --accent: var(--marigold);
  --on-accent: #211c47;

  --display: 'Yatra One', 'Noto Serif Devanagari', Georgia, serif;
  --body: 'Literata', 'Noto Serif Devanagari', Georgia, serif;
  --measure: 66ch;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #faedc4;
    --raised: #fff7df;
    --line: #e5d29a;
    --ink: #211c47;
    --muted: #5d5679;
    --accent: #9a5600;
    --on-accent: #fff;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--body);
  text-rendering: optimizeLegibility;
}
:lang(hi), .hi { font-family: 'Noto Serif Devanagari', var(--body); line-height: 1.8; }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.15; margin: 0; }
h2 { font-size: clamp(1.9rem, 4.5vw, 2.75rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-size: 1.5rem; }
.brand svg { width: 32px; height: 32px; }
.site-header nav { margin-left: auto; display: flex; gap: 22px; }
.site-header nav a { color: var(--ink); text-decoration: none; font-size: 0.98rem; }
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--accent); }
@media (max-width: 560px) { .site-header nav { gap: 14px; } .site-header nav .hide-sm { display: none; } }

/* ---------- Lamp (the one moving thing on the page) ---------- */
.lamp .flame { transform-origin: 50px 64px; animation: flicker 2.4s ease-in-out infinite; }
.lamp .glow { animation: glow 2.4s ease-in-out infinite; }
@keyframes flicker { 0%, 100% { transform: rotate(-2deg) scaleY(1); } 35% { transform: rotate(2.5deg) scaleY(1.06); } 70% { transform: rotate(-1deg) scaleY(0.97); } }
@keyframes glow { 0%, 100% { opacity: 0.85; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lamp .flame, .lamp .glow { animation: none; } }

/* ---------- Hero: always the night sky ---------- */
.hero { background: var(--night); color: var(--moon); position: relative; overflow: hidden; }
.hero::before {
  /* A scatter of faint stars. */
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.55;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 72%, #fff6 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 46% 12%, #fff7 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 40%, #fff5 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 82% 22%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 91% 64%, #fff6 50%, transparent 51%),
    radial-gradient(1px 1px at 7% 88%, #fff5 50%, transparent 51%);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; padding: 72px 0 88px; }
.hero .word { font-family: var(--display); font-size: clamp(5.5rem, 17vw, 11rem); line-height: 0.95; color: var(--marigold); margin: 0 0 4px; letter-spacing: -0.01em; }
.hero h1 { font-size: clamp(1.9rem, 4.6vw, 3.1rem); color: var(--moon); max-width: 16ch; }
.hero .lede { font-size: 1.2rem; color: var(--moon-muted); max-width: 46ch; margin: 22px 0 30px; }
.hero .lamp { width: 112px; height: 112px; margin-bottom: 8px; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex; flex-direction: column; justify-content: center; min-width: 200px; min-height: 58px;
  padding: 8px 20px; border-radius: 14px; text-decoration: none;
  background: var(--marigold); color: #211c47; line-height: 1.2;
}
.store small { font-size: 0.78rem; opacity: 0.8; }
.store strong { font-size: 1.12rem; font-weight: 600; }
.store[aria-disabled="true"] { background: transparent; color: var(--moon); border: 1.5px solid var(--night-line); cursor: default; }
.store[aria-disabled="true"] small { color: var(--moon-muted); opacity: 1; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; padding: 48px 0 64px; gap: 40px; }
  .hero .phone { max-width: 300px; margin-inline: auto; }
}

/* ---------- Phone screenshots ---------- */
.phone { border-radius: 38px; padding: 10px; background: #0b0d22; box-shadow: 0 0 0 1.5px #3a3f78, 0 30px 80px -20px #000a; }
.phone img { border-radius: 29px; width: 100%; height: auto; }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
section + section { border-top: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head p { color: var(--muted); font-size: 1.12rem; margin-top: 14px; }

/* Collections, drawn like the app's covers. */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
/* Seven collections: one row on wide screens, so none is left on its own. */
@media (min-width: 1000px) { .shelf { grid-template-columns: repeat(7, 1fr); gap: 16px; } }
.cover {
  --c: #e8832a;
  position: relative; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden;
  background: radial-gradient(circle at 62% 38%, #ffffff17 0 34%, transparent 35%), var(--c);
  color: var(--moon);
  box-shadow: inset 0 0 0 7px color-mix(in srgb, var(--c) 70%, #000), inset 0 0 0 9.5px #f5e9d0bb;
}
.cover::after { content: ''; position: absolute; inset: 16px; border: 2px dotted #f5e9d08c; border-radius: 3px; }
.cover svg { position: absolute; left: 22%; right: 22%; top: 14%; width: 56%; height: 50%; }
.cover .native { position: absolute; left: 0; right: 0; bottom: 13%; text-align: center; font-family: var(--display); font-size: clamp(1rem, 2.4vw, 1.3rem); }
.collection h3 { font-size: 1.15rem; margin-top: 12px; font-family: var(--body); font-weight: 600; }
.collection p { color: var(--muted); font-size: 0.92rem; margin: 2px 0 0; }

/* Feature rows: screenshot and words side by side. */
.feature { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: center; }
.feature.flip { grid-template-columns: 1.2fr 0.8fr; }
.feature.flip .phone { order: 2; }
.feature .phone { max-width: 320px; justify-self: center; }
@media (max-width: 860px) {
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 40px; }
  .feature.flip .phone { order: 0; }
  .feature .phone { max-width: 280px; }
}
.points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
.points li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.points svg { width: 24px; height: 24px; color: var(--accent); margin-top: 3px; }
.points strong { display: block; font-weight: 600; }
.points span { color: var(--muted); }

/* Free and Plus. */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 8px; }
@media (max-width: 720px) { .plans { grid-template-columns: 1fr; } }
.plan { border: 1px solid var(--line); border-radius: 20px; padding: 28px; background: var(--raised); }
.plan.plus { border: 2px solid var(--accent); }
.plan h3 { font-size: 1.6rem; }
.plan .sub { color: var(--muted); margin: 6px 0 18px; }
.plan ul { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
.note { color: var(--muted); font-size: 0.95rem; margin-top: 18px; }

/* Promise strip. */
.promise { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
@media (max-width: 760px) { .promise { grid-template-columns: 1fr; } }
.promise h3 { font-family: var(--body); font-weight: 600; font-size: 1.15rem; margin-bottom: 8px; }
.promise p { color: var(--muted); margin: 0; }

/* ---------- Legal and support pages ---------- */
.doc { padding: 56px 0 96px; }
.doc .wrap { max-width: calc(var(--measure) + 32px); }
.doc h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); margin-bottom: 10px; }
.doc .meta { color: var(--muted); margin-bottom: 36px; }
.doc h2 { font-size: 1.6rem; margin: 44px 0 12px; }
.doc h3 { font-family: var(--body); font-weight: 600; font-size: 1.1rem; margin: 26px 0 8px; }
.doc ul { padding-left: 1.3em; }
.doc li { margin-bottom: 6px; }
.doc .summary { background: var(--raised); border: 1px solid var(--line); border-radius: 16px; padding: 20px 24px; margin-bottom: 8px; }
.doc .summary p:last-child, .doc .summary ul:last-child { margin-bottom: 0; }
.doc table { border-collapse: collapse; width: 100%; margin: 12px 0 20px; font-size: 0.97rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 600; }
@media (max-width: 600px) { .doc table, .doc tbody, .doc tr, .doc td, .doc th { display: block; } .doc thead { display: none; } .doc td { border: 0; padding: 4px 0; } .doc tr { border-bottom: 1px solid var(--line); padding: 10px 0; } .doc td:first-child { font-weight: 600; } }
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
details summary { cursor: pointer; font-weight: 600; font-size: 1.08rem; list-style-position: outside; }
details[open] summary { margin-bottom: 10px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--muted); font-size: 0.95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: baseline; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer a { color: var(--ink); }
.site-footer .credits { flex-basis: 100%; font-size: 0.85rem; }

/* Keep headings clear of the sticky header when jumping to a section. */
section[id], #download { scroll-margin-top: 80px; }
