/* sanatanvichar.com
 *
 * The app's design system, transposed to a page. Same palette, same three
 * faces, same rule that gold and kumkum are accents and sandalwood is the
 * ground — a visitor who taps through from here to the App Store should not
 * feel handed to a different product.
 *
 * No framework and no build step: this file is small enough to read top to
 * bottom, and a stylesheet you can read is one you can change six months from
 * now without running anything. */

:root {
  /* Ground */
  --chandan: #FBF6EE;       /* sandalwood — the page */
  --paper: #FFFDF9;         /* cards, raised surfaces */
  --sunk: #F3EBDD;          /* recessed fills */
  --line: #E8DECC;          /* hairlines */

  /* Ink */
  --ink: #241A12;
  --ink-mid: #5C4A3B;
  --ink-low: #8C7965;

  /* Brand — accents, never grounds */
  --kumkum: #C4562A;
  --kumkum-deep: #9E3F1C;
  --ember: #C67B2C;
  --haldi: #E0A73C;

  /* The one dark surface, as in the app: the verse. */
  --nishaa: #171310;
  --nishaa-card: #2E241B;
  --glow: #F6EEE2;
  --glow-mid: #C9BAA8;

  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --deva: 'Tiro Devanagari Sanskrit', 'Noto Sans Devanagari', serif;

  --gutter: clamp(20px, 5vw, 40px);
  --measure: 68ch;
  --radius: 20px;
}

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

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

body {
  margin: 0;
  background: var(--chandan);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--kumkum); }

/* Keyboard users land here first; it stays out of the way until focused. */
.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--chandan);
  padding: 12px 18px; border-radius: 0 0 12px 0; z-index: 10;
}
.skip:focus { left: 0; top: 0; }

:focus-visible {
  outline: 2px solid var(--kumkum);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Nav ─────────────────────────────────────────────────────────────────── */

.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 22px var(--gutter);
  max-width: 1120px; margin: 0 auto;
}

.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display);
  font-size: 20px; font-weight: 500;
  color: var(--ink); text-decoration: none;
  letter-spacing: -0.01em;
}
.wordmark .bell { width: 26px; height: 26px; color: var(--haldi); flex: none; }

.nav nav { display: flex; gap: 26px; }
.nav nav a {
  color: var(--ink-mid); text-decoration: none;
  font-size: 15px; font-weight: 500;
}
.nav nav a:hover { color: var(--ink); }

@media (max-width: 640px) {
  .nav nav { gap: 18px; }
  .nav nav a:first-child { display: none; }
}

/* ── Layout ──────────────────────────────────────────────────────────────── */

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); }

section { padding: clamp(56px, 9vw, 104px) 0; }

.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--haldi);
  margin: 0 0 14px;
}
.eyebrow::before {
  content: ''; width: 16px; height: 1px;
  background: currentColor; opacity: 0.6; flex: none;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin: 0 0 16px;
}

h1 { font-size: clamp(38px, 7vw, 62px); line-height: 1.08; }
h2 { font-size: clamp(27px, 4vw, 38px); line-height: 1.2; }
h3 { font-size: 20px; line-height: 1.3; font-weight: 500; }

p { margin: 0 0 18px; max-width: var(--measure); }
.lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--ink-mid); line-height: 1.6; }
.muted { color: var(--ink-mid); }

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero { padding-top: clamp(28px, 5vw, 56px); position: relative; overflow: hidden; }

/* Dawn, behind the words. Atmosphere only — the copy is the screen, which is
   the same call Home makes in the app. */
.hero::before {
  content: '';
  position: absolute; top: -140px; right: -120px;
  width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(224,167,60,0.28), rgba(224,167,60,0) 68%);
  pointer-events: none;
}

.hero-inner { position: relative; }
.hero h1 { max-width: 15ch; }
.hero .lede { max-width: 52ch; margin-bottom: 30px; }

/* ── Store buttons ───────────────────────────────────────────────────────── */

.stores { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 14px; }

.store {
  display: inline-flex; flex-direction: column; justify-content: center;
  min-width: 190px; padding: 11px 22px;
  border-radius: 14px;
  background: var(--ink); color: var(--chandan);
  text-decoration: none;
  transition: transform 0.16s ease, opacity 0.16s ease;
}
.store:hover { transform: translateY(-1px); }
.store-sub { font-size: 11px; opacity: 0.72; line-height: 1.3; }
.store-name { font-size: 17px; font-weight: 600; line-height: 1.25; }

/* Visibly not a link. The point is that nobody clicks and lands on a 404. */
.store-soon {
  background: transparent;
  color: var(--ink-mid);
  border: 1px dashed var(--line);
  cursor: default;
}
.store-soon:hover { transform: none; }

.store-note { font-size: 14px; color: var(--ink-low); margin: 0; }

/* ── Verse block ─────────────────────────────────────────────────────────── */

/* The one dark surface on a cream page, exactly as in the app: an epigraph set
   apart from the page it sits on. One reads as emphasis; two would read as a
   theme. */
.verse {
  background: linear-gradient(135deg, var(--nishaa-card), var(--nishaa));
  color: var(--glow);
  border-radius: var(--radius);
  padding: clamp(26px, 4vw, 40px);
  box-shadow: 0 12px 34px rgba(107, 74, 47, 0.16);
}

.verse .eyebrow { color: #EFC978; }

.verse-sanskrit {
  font-family: var(--deva);
  font-size: clamp(19px, 2.6vw, 23px);
  line-height: 2;
  color: var(--glow);
  margin: 0 0 14px;
  max-width: none;
}

.verse-translit {
  font-size: 14px; font-style: italic; line-height: 1.65;
  color: var(--glow-mid); margin: 0 0 18px; max-width: none;
}

.verse-cite {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 500; letter-spacing: 0.02em;
  color: var(--haldi); margin: 0;
}
.verse-cite::before {
  content: ''; width: 22px; height: 1.5px; background: currentColor; flex: none;
}

.verse-rule { height: 1px; background: #302823; margin: 22px 0; border: 0; }

.verse-translation {
  font-size: 15.5px; line-height: 1.7; color: var(--glow-mid);
  margin: 0; max-width: none;
}

/* ── Feature grid ────────────────────────────────────────────────────────── */

/* Three-up, for a set of three. `auto-fit` is fine when the count matches the
 * columns it lands on and leaves an orphan when it does not — see .grid-2. */
.grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
}

/* Two-up, for a set of FOUR.
 *
 * Four cards in the three columns `auto-fit` chose is three and a spare, which
 * reads as a card that failed to load rather than as a set of four. Counts
 * that do not divide by three get their own rule. */
.grid-2 { grid-template-columns: 1fr; }
@media (min-width: 620px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.card h3 { margin-bottom: 8px; }
.card p { font-size: 15.5px; color: var(--ink-mid); margin: 0; }

.card-mark {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  margin-bottom: 16px;
  font-family: var(--deva); font-size: 18px; line-height: 1;
}

/* ── Guides ──────────────────────────────────────────────────────────────── */

/* Explicit column counts, not auto-fit.
 *
 * There are exactly six guides, and six divides by three and by two. Left to
 * `auto-fit` the grid settled on five at desktop width and stranded Shri Ram
 * alone on a second row — which reads as a missing card rather than as a set. */
.guides {
  display: grid; gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) {
  .guides { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .guides { grid-template-columns: repeat(3, 1fr); }
}

.guide {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  border-bottom: 3px solid var(--accent, var(--line));
}
.guide h3 { font-size: 18px; margin-bottom: 4px; }
.guide p { font-size: 14px; color: var(--ink-mid); margin: 0; }

/* ── Long-form pages ─────────────────────────────────────────────────────── */

.doc { padding-top: clamp(32px, 5vw, 56px); }
.doc h2 { margin-top: 44px; font-size: clamp(22px, 3vw, 28px); }
.doc h2:first-of-type { margin-top: 28px; }
.doc ul { padding-left: 20px; max-width: var(--measure); }
.doc li { margin-bottom: 10px; color: var(--ink-mid); }
.doc p { color: var(--ink-mid); }
.doc strong { color: var(--ink); font-weight: 600; }
.doc-updated { font-size: 14px; color: var(--ink-low); }

/* ── Share pages ─────────────────────────────────────────────────────────── */

.share { padding-top: clamp(28px, 5vw, 48px); }

.share-art {
  width: 100%; max-height: 62vh; object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 28px;
  background: var(--sunk);
}

.share-thought {
  font-family: var(--display);
  font-size: clamp(22px, 3.4vw, 30px);
  line-height: 1.45;
  color: var(--ink);
  margin: 0 0 28px;
}

.share-cta {
  margin-top: 36px; padding-top: 30px;
  border-top: 1px solid var(--line);
}
.share-cta h2 { font-size: clamp(22px, 3vw, 28px); }

.share-kind {
  display: inline-block;
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--kumkum);
  margin-bottom: 12px;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

.foot {
  border-top: 1px solid var(--line);
  padding: 44px var(--gutter) 36px;
  margin-top: clamp(40px, 7vw, 80px);
}
.foot-inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 26px;
  justify-content: space-between; align-items: flex-start;
}
.foot-mark { font-family: var(--display); font-size: 18px; margin: 0 0 4px; }
.foot-line { font-size: 14.5px; color: var(--ink-mid); margin: 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 22px; }
.foot-links a { color: var(--ink-mid); text-decoration: none; font-size: 14.5px; }
.foot-links a:hover { color: var(--ink); }
.foot-legal {
  max-width: 1120px; margin: 30px auto 0;
  font-size: 13px; line-height: 1.6; color: var(--ink-low);
}

/* ── Motion ──────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
