/* =====================================================================================================================
   Typography. Manrope for the interface, Noto Sans Devanagari for Devanagari labels, Fraunces and Tiro Devanagari Hindi for display type (desk.css), Noto Serif Devanagari for Devanagari reading text, Source Serif 4 for English reading text,
   Tiro Devanagari Sanskrit for mantras and verses. All SIL Open Font Licence (see vendor/fonts).
   One scale, applied the same everywhere; numbers are tabular so columns of times and degrees line up.
   ===================================================================================================================== */
@font-face { font-family: "Source Serif 4"; src: url("vendor/fonts/source-serif-4-latin-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: block; }
@font-face { font-family: "Source Serif 4"; src: url("vendor/fonts/source-serif-4-latin-wght-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: block; }
@font-face { font-family: "Tiro"; src: url("vendor/fonts/tiro_devanagari_sanskrit.ttf") format("truetype"); font-weight: 400; font-display: block; }

:root {
  --serif: "Source Serif 4", "NotoDeva", Georgia, serif;
  --verse: "Tiro", "NotoDeva", serif;
  /* scale (size / line height): Devanagari gets one pixel more than Latin at the same step, it sets smaller */
  --t-hero: 56px; --t-large: 30px; --t-title: 22.5px; --t-head: 17px; --t-body: 16px; --t-small: 13.5px; --t-micro: 11.5px;
}
/* KNSwami/VAG ("Classic") sit smaller in the em-box than Manrope/Noto Sans Devanagari at the same nominal size -
   compensate with its own, slightly larger scale rather than one flat body-text bump */
html[data-font="classic"] {
  --t-hero: 59px; --t-large: 32px; --t-title: 24px; --t-head: 18px; --t-body: 17px; --t-small: 14.5px; --t-micro: 12.5px;
}
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-optical-sizing: auto; }
body { font-feature-settings: "kern", "liga", "calt", "ccmp"; font-size: var(--t-body); line-height: 1.55; }
.deva, .rail .lbl, .mac-lbl .lbl, td, th, .mrow, .fact b, .seg button, .tabs button, .chip { font-feature-settings: "kern", "liga", "ccmp", "locl", "akhn", "rphf", "blwf", "half", "pstf", "vatu", "cjct"; }
h1, h2, h3, .top h1, .hero .big { text-wrap: balance; }
p, .prose, .faint { text-wrap: pretty; }

/* page titles: a large title with a quiet subtitle, as a document window has */
.top h1 { font: 700 var(--t-large)/1.18 var(--deva); letter-spacing: -.012em; }
.top h1 small { display: block; margin-top: 4px; font: 500 var(--t-small)/1.4 var(--ui); letter-spacing: .005em; color: var(--label2); }
.card h2, .sec-head h2 { font: 700 var(--t-title)/1.25 var(--deva); letter-spacing: -.008em; }
.sec { font: 700 var(--t-micro)/1.3 var(--ui); letter-spacing: .09em; text-transform: uppercase; color: var(--label3); margin: 26px 4px 9px; }

/* the hero: big Devanagari numerals set in the serif Devanagari with a hairline of tracking */
.hero .big { font: 700 var(--t-hero)/1.08 var(--deva); letter-spacing: -.022em; }
.hero .big small { font: 500 21px var(--deva); letter-spacing: 0; }
.hero .yr { font: 600 17px var(--deva); letter-spacing: .02em; }
.hero .en { font: 400 15.5px var(--ui); letter-spacing: .005em; }
.hero .lunar { font: 700 20px/1.3 var(--deva); }

/* columns of figures: tabular lining numerals */
td, th, .num, .dig, .fact b, .mrow .tv, .glass b, .sb, .row .v small, .cell b, .sun2 span, .tbtn.date, .mac-date { font-variant-numeric: tabular-nums lining-nums; }
th { font-weight: 650; }
.fact span, .hub-stat span, .kvr span { font: 600 var(--t-micro)/1.3 var(--ui); letter-spacing: .06em; text-transform: uppercase; color: var(--label3); }
.fact b { font: 700 16.5px/1.35 var(--deva); }

/* reading text in English: a serif with a comfortable measure */
.prose { font: 400 16px/1.74 var(--serif); color: var(--label2); max-width: 68ch; }
.prose p + p { margin-top: .95em; }
.prose b { font-family: var(--serif); font-weight: 650; color: var(--label); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose em { font-style: italic; }
.prose .drop::first-letter { float: left; font: 700 3.1em/.9 var(--serif); padding: .06em .1em 0 0; color: var(--gold); }

/* mantras and shlokas */
.verse { font: 400 20px/1.95 var(--verse); text-align: center; color: var(--label); letter-spacing: .01em; }
.verse small { display: block; font: 500 12.5px var(--ui); color: var(--label3); letter-spacing: .05em; margin-top: 4px; }

/* Devanagari in running text needs air; capitals and digits in the UI font stay tight */
.deva { line-height: 1.62; letter-spacing: 0; }
.mrow { line-height: 1.5; }
.row .v { font: 700 18px/1.35 var(--deva); }
.row .k { font: 600 15.5px var(--deva); }
.wordmark, .win-title { font-family: var(--display); }
.win-title { font-weight: 600; letter-spacing: -.005em; }
.mac-lbl .lbl { font: 600 15.5px/1.2 var(--deva); }
.mac-lbl .sub { font: 500 10.5px var(--ui); letter-spacing: .02em; }
kbd, .kbd { font-family: var(--ui); }
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }
