/* Shlokly's site: the app's Warm theme by day and Dark theme by night (src/lib/theme.ts in the app). */
@font-face { font-family: 'Source Serif'; src: url(fonts/serif.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Source Serif'; font-style: italic; src: url(fonts/serif-italic.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Tiro Devanagari'; src: url(fonts/deva.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Script Beng'; src: url(fonts/beng.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Script Gujr'; src: url(fonts/gujr.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Script Knda'; src: url(fonts/knda.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Script Mlym'; src: url(fonts/mlym.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Script Orya'; src: url(fonts/orya.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Script Guru'; src: url(fonts/guru.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Script Olck'; src: url(fonts/olck.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Script Taml'; src: url(fonts/taml.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Script Telu'; src: url(fonts/telu.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Script Arab'; src: url(fonts/arab.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Script Urdu'; src: url(fonts/urdu.woff2) format('woff2'); font-display: swap; }

:root {
  color-scheme: light;
  --bg: #f6f2ea;
  --card: #ffffff;
  --pill: #ece6db;
  --line: rgba(0, 0, 0, 0.08);
  --fg: #0c0c0e;
  --verse: #2a2a2f;
  --prose2: #4a4a52;
  --fg2: #6a6a72;
  --fg3: #c2c2c8;
  --btn: #0c0c0e;
  --btn-fg: #ffffff;
  /* the art's Rangoli colours at the app's strength, 1.35x (artBoost) */
  --ink: #7c7c84;
  --art-water: #3e9ad6;
  --art-gold: #f0b429;
  --art-rose: #e45d8f;
  --art-grass: #3fae6e;
  --art-wood: #c47a4a;
  --serif: 'Source Serif', Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --gutter: 28px;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #121214;
  --card: #1d1d21;
  --pill: #2b2b31;
  --line: rgba(255, 255, 255, 0.08);
  --fg: #f4f4f6;
  --verse: #dcdce1;
  --prose2: #bdbdc4;
  --fg2: #9a9aa2;
  --fg3: #4a4a50;
  --btn: #f4f4f6;
  --btn-fg: #0c0c0e;
  /* Jewel, not boosted */
  --ink: #9a9288;
  --art-water: #2f7fc0;
  --art-gold: #d99a1a;
  --art-rose: #c4386f;
  --art-grass: #2f9a5e;
  --art-wood: #b8693c;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }

a:focus-visible,
summary:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 4px; }

.lbl {
  color: var(--fg2);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1160px;
  margin: 0 auto;
  padding: 22px var(--gutter);
}
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--serif); font-size: 22px; text-decoration: none; }
.brand img { width: auto; height: 30px; }
/* the theme, beside the links */
.top nav { display: flex; align-items: center; gap: 22px; }
.theme { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -10px -12px -10px -10px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--fg2); cursor: pointer; }
.theme:hover { color: var(--fg); }
.theme:focus-visible { outline: 2px solid var(--fg); outline-offset: -4px; }
.theme svg { fill: currentColor; }
.theme .sun path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.theme .sun { display: none; }
:root[data-theme='dark'] .theme .sun { display: block; }
:root[data-theme='dark'] .theme .moon { display: none; }
.top nav a { color: var(--fg2); font-size: 15px; text-decoration: none; }
.top nav a:hover,
.top nav a[aria-current] { color: var(--fg); }

/* the verse rail, as on the Read screen: thin and quiet down the left */
.rail {
  position: fixed;
  top: 50%;
  left: 10px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 26px;
  transform: translateY(-50%);
}
.rail i { display: block; width: 3px; height: 3px; border-radius: 2px; background: var(--fg3); transition: height 0.25s, background 0.25s; }
.rail i.on { height: 20px; background: var(--fg); }

/* the opening */
.opening { padding: clamp(36px, 8vh, 88px) var(--gutter) 0; text-align: center; }
.opening h1 { font-family: var(--serif); font-size: clamp(38px, 7vw, 76px); font-weight: 400; letter-spacing: -0.02em; line-height: 1.06; }
.status { margin-top: 14px; color: var(--fg2); font-size: 16px; }
.get { margin-top: 26px; }
.store { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; border-radius: 26px; background: var(--btn); color: var(--btn-fg); font-size: 17px; font-weight: 600; text-decoration: none; }
.store:hover { opacity: 0.86; }
.store:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.hero-shot { display: block; width: min(340px, 78vw); margin: clamp(36px, 6vh, 56px) auto 0; }
.hero-shot img { width: 100%; border-radius: 34px; box-shadow: 0 0 0 1px var(--line); }



/* sections */
.band { max-width: 1160px; margin: 0 auto; padding: clamp(64px, 11vw, 128px) var(--gutter) 0; }
.band h2 { max-width: 19em; text-wrap: balance; font-family: var(--serif); font-size: clamp(30px, 4.6vw, 48px); font-weight: 400; letter-spacing: -0.015em; line-height: 1.14; }
.band .sub { max-width: 34em; margin-top: 16px; color: var(--prose2); font-family: var(--serif); font-size: clamp(17px, 2vw, 20px); }

/* the screens: real ones, no phone drawn around them */
.screens {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin: 44px 0 0;
  padding: 0;
  list-style: none;
}
.screens img { width: 100%; border-radius: 26px; box-shadow: 0 0 0 1px var(--line); }
.screens h3 { margin-top: 16px; font-size: 16px; font-weight: 600; }
.screens p { margin-top: 3px; color: var(--fg2); font-size: 15px; line-height: 1.45; }

/* the shelf, by kind of text */
.kind { margin-top: 48px; }
.kind > h3 { font-family: var(--serif); font-size: clamp(22px, 2.6vw, 28px); font-weight: 400; line-height: 1.25; }
.kind > p { margin-top: 4px; color: var(--fg2); font-size: 15.5px; }
.shelf {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 34px 22px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.shelf img { width: 100%; aspect-ratio: 3 / 2; border-radius: 20px; object-fit: cover; }
.shelf h4 { margin: 13px 0 0; font-size: 17px; font-weight: 600; line-height: 1.3; }
.shelf p { margin-top: 2px; color: var(--fg2); font-size: 15px; }

/* one verse in every script */
.stage { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: var(--stage-height, 400px); margin: 40px 0 0; padding: 28px 18px; border-radius: 24px; background: var(--card); text-align: center; }
.stage-verse { width: 100%; margin: 0; color: var(--verse); font-size: var(--verse-size, clamp(24px, 3.6vw, 42px)); line-height: 1.75; }
.stage-verse .line { display: block; white-space: nowrap; }
/* the sample, as on Read in the app: words still to come are faint, and each fills with a sweep over the time it's said.
   The sweep crosses the whole word, as splitting it into letters would break conjuncts and vowel signs */
.stage-verse.saying .w { padding-block: 0.4em; background: linear-gradient(to right, var(--verse) calc(var(--p, 0%) - 6%), var(--fg3) var(--p, 0%)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stage-verse.saying[dir='rtl'] .w { background-image: linear-gradient(to left, var(--verse) calc(var(--p, 0%) - 6%), var(--fg3) var(--p, 0%)); }
.stage-verse .w { font-style: normal; }
.hear { position: absolute; top: 14px; right: 14px; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--pill); color: var(--fg); cursor: pointer; }
.hear[hidden] { display: none; }
.hear svg { fill: currentColor; }
.hear .pause { display: none; }
.hear[aria-pressed='true'] .play { display: none; }
.hear[aria-pressed='true'] .pause { display: block; }
.hear:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.layers { display: flex; justify-content: center; gap: 4px; margin-top: 18px; padding: 4px; border-radius: 24px; background: var(--pill); }
.layers[hidden] { display: none; }
.layers button { min-height: 40px; padding: 0 15px; border: 0; border-radius: 20px; background: none; color: var(--fg2); cursor: pointer; font: inherit; font-size: 15px; line-height: 1.2; }
.layers button[aria-pressed='true'] { background: var(--card); color: var(--fg); }
.layers button:focus-visible { outline: 2px solid var(--fg); outline-offset: 1px; }
.panel { width: 100%; max-width: 36em; min-height: 190px; margin-top: 18px; line-height: 1.8; }
.panel p { font-size: 18px; }
.panel-meaning { color: var(--verse); }
.panel-story { color: var(--prose2); }
.panel.s-en { line-height: 1.55; }
.panel.s-ur { line-height: 2.5; }
.panel.s-ar { line-height: 2.1; }
.words { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 12px; margin: 0; padding: 0; list-style: none; }
.words li { display: flex; flex-direction: column; align-items: center; min-width: 0; max-width: 100%; }
.words b { max-width: 100%; padding: 0 9px; border-radius: 12px; color: var(--verse); font-size: 20px; font-weight: 400; line-height: 1.7; overflow-wrap: anywhere; }
.words li:nth-child(5n + 1) b { background: color-mix(in srgb, var(--art-gold) 42%, transparent); }
.words li:nth-child(5n + 2) b { background: color-mix(in srgb, var(--art-rose) 38%, transparent); }
.words li:nth-child(5n + 3) b { background: color-mix(in srgb, var(--art-water) 38%, transparent); }
.words li:nth-child(5n + 4) b { background: color-mix(in srgb, var(--art-grass) 38%, transparent); }
.words li:nth-child(5n) b { background: color-mix(in srgb, var(--art-wood) 38%, transparent); }
.words span { max-width: 180px; margin-top: 4px; color: var(--fg2); font-size: 14px; line-height: 1.5; }
.words.s-ur b { line-height: 2.2; }
.words.s-ur span { line-height: 2.1; }
.stage .lbl { margin-top: 16px; }
/* two choices, as in the app: the verse's script and the language that explains it */
.choose { display: flex; justify-content: center; gap: 4px; max-width: 460px; margin: 24px auto 0; padding: 4px; border-radius: 28px; background: var(--pill); }
.choose[hidden] { display: none; }
.choose button { flex: 1 1 0; min-width: 0; min-height: 56px; padding: 6px 12px; border: 0; border-radius: 24px; background: none; color: var(--verse); cursor: pointer; font: inherit; line-height: 1.3; }
.choose button[aria-pressed='true'] { background: var(--card); }
.choose button:focus-visible { outline: 2px solid var(--fg); outline-offset: 1px; }
.choose small { display: block; color: var(--fg2); font-size: 12.5px; }
.choose b { display: block; overflow: hidden; font-size: 16.5px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.scripts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.scripts button[hidden] { display: none; }
.scripts button { min-height: 44px; padding: 0 15px; border: 0; border-radius: 22px; background: var(--pill); color: var(--verse); cursor: pointer; font-size: 17px; line-height: 1.2; }
.scripts button[aria-pressed='true'] { background: var(--btn); color: var(--btn-fg); }
.scripts button:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.scripts .s-ur { line-height: 1.7; }
.s-en { font-family: var(--serif); }
.s-de { font-family: 'Tiro Devanagari', 'Source Serif', serif; }
.s-bn { font-family: 'Script Beng', 'Source Serif', serif; }
.s-gu { font-family: 'Script Gujr', 'Source Serif', serif; }
.s-kn { font-family: 'Script Knda', 'Source Serif', serif; }
.s-ml { font-family: 'Script Mlym', 'Source Serif', serif; }
.s-or { font-family: 'Script Orya', 'Source Serif', sans-serif; }
.s-pa { font-family: 'Script Guru', 'Source Serif', sans-serif; }
.s-ol { font-family: 'Script Olck', 'Source Serif', sans-serif; }
.s-ta { font-family: 'Script Taml', 'Source Serif', serif; }
.s-te { font-family: 'Script Telu', 'Source Serif', serif; }
.s-ar { font-family: 'Script Arab', 'Source Serif', serif; }
.s-ur { font-family: 'Script Urdu', 'Source Serif', serif; }
.stage-verse.s-ur,
.stage-verse.s-ar { line-height: 2.2; }

/* the promise */
.promise { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 40px; margin-top: 44px; }
.promise h3 { padding-top: 16px; border-top: 1px solid var(--line); font-family: var(--serif); font-size: 22px; font-weight: 400; line-height: 1.25; }
.promise p { margin-top: 8px; color: var(--fg2); font-size: 15.5px; }
.promise a { text-underline-offset: 3px; }

/* footer */
.foot {
  max-width: 1160px;
  margin: clamp(72px, 11vw, 128px) auto 0;
  padding: 26px var(--gutter) 34px;
  border-top: 1px solid var(--line);
  color: var(--fg2);
  font-size: 14px;
}
.foot .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.foot nav { display: flex; gap: 20px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--fg); }
.foot .fine { max-width: 46em; margin-top: 10px; color: var(--fg2); font-size: 13px; }

/* privacy and support: laid out like the app's About sheet */
.page { max-width: 660px; margin: 0 auto; padding: clamp(28px, 7vw, 64px) var(--gutter) 0; }
.page h1 { font-family: var(--serif); font-size: clamp(36px, 6vw, 50px); font-weight: 400; letter-spacing: -0.015em; line-height: 1.1; }
.page .lede { margin-top: 16px; color: var(--verse); font-family: var(--serif); font-size: clamp(19px, 2.6vw, 22px); line-height: 1.45; }
.page .date { margin-top: 14px; color: var(--fg2); font-size: 14px; }
.page section { margin-top: 38px; }
.page h2 { margin-bottom: 8px; color: var(--fg2); font-size: 12.5px; font-weight: 600; letter-spacing: 0.14em; line-height: 1.5; text-transform: uppercase; }
.page section p,
.page section li { color: var(--prose2); font-size: 16.5px; }
.page section p + p { margin-top: 12px; }
.page ul { margin: 10px 0 0; padding-left: 20px; }
.page ul + p { margin-top: 12px; }
.page li + li { margin-top: 6px; }
.page a { text-underline-offset: 3px; }

.contact { margin-top: 30px; padding: 26px; border-radius: 24px; background: var(--card); }
.contact p { color: var(--prose2); font-size: 16px; }
.contact .address { margin-top: 2px; color: var(--fg2); font-size: 15px; overflow-wrap: anywhere; }
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin-top: 18px;
  padding: 0 24px;
  border-radius: 26px;
  background: var(--btn);
  color: var(--btn-fg);
  font-weight: 600;
  text-decoration: none;
}
.btn:hover { opacity: 0.86; }

.faq { margin-top: 38px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; color: var(--fg); cursor: pointer; font-weight: 500; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { flex: none; color: var(--fg2); content: '+'; font-weight: 400; }
.faq details[open] summary::after { content: '–'; }
.faq details p { padding: 0 0 18px; color: var(--prose2); font-size: 16px; }

.lost { min-height: 62svh; display: flex; flex-direction: column; justify-content: center; }

@media (max-width: 860px) {
  .screens {
    grid-template-columns: repeat(3, minmax(232px, 1fr));
    margin-right: calc(var(--gutter) * -1);
    margin-left: calc(var(--gutter) * -1);
    padding: 0 var(--gutter) 6px;
    overflow-x: auto;
    scroll-padding: 0 var(--gutter);
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .screens::-webkit-scrollbar { display: none; }
  .screens li { scroll-snap-align: start; }
  .shelf { grid-template-columns: repeat(2, 1fr); gap: 26px 16px; }
  .promise { grid-template-columns: 1fr; }
}

/* phones: each half-line breaks at its middle, four short lines at most */
@media (max-width: 640px) {
  .stage { min-height: var(--stage-height, 500px); padding-top: 62px; }
  .panel { min-height: 240px; }
  .layers { align-self: stretch; }
  .layers button { flex: 1 1 auto; min-width: 0; padding: 0 6px; font-size: 14px; }
  .words b { font-size: 18px; }
  .words span { max-width: 150px; font-size: 13.5px; }
  .panel p { font-size: 17px; }
  .stage-verse { font-size: var(--verse-size, 26px); }
  .stage-verse .line span { display: block; }
}

@media (max-width: 520px) {
  :root { --gutter: 22px; }
  .top { padding-top: 16px; padding-bottom: 16px; }
  .rail { left: 7px; }
}

@media (max-width: 360px) {
  .layers button { padding: 0 4px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rail i { transition: none; }
}
