/* Bhakti Library site — palette and type mirror the app (app/lib/styles.dart
   + scripts/generate-app-icons.sh): sepia ink on warm paper, Bhakti Serif for
   Latin/IAST, espresso + cream from the icon. Keep tokens in sync with the
   app when its style guide changes. The app sets the same text in Gentium
   Plus itself; only the web build is subset and renamed. */

/* "Bhakti Serif" is Gentium Plus subset to Latin + IAST and renamed, which the
   OFL requires of a modified version — see fonts/OFL.txt and rebuild with
   scripts/build-web-fonts.py rather than editing these files by hand. The
   three full TTFs were 2.4 MB; these are 125 KB. */
@font-face {
  font-family: "Bhakti Serif";
  src: url("fonts/BhaktiSerif-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bhakti Serif";
  src: url("fonts/BhaktiSerif-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bhakti Serif";
  src: url("fonts/BhaktiSerif-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #fbf4e8;        /* warm paper (app light scaffold) */
  --ink: #1a1a1a;          /* body ink */
  --espresso: #3b2c20;     /* icon mark; headings */
  --accent: #6d4c41;       /* links (brown 600) */
  --accent-soft: #8d6e63;  /* lead-ins, soft labels (brown 400) */
  --chrome: #f2e8d5;       /* icon ground; card / band fill */
  --chrome-line: #d7ccc8;  /* hairlines (brown 100) */
  --muted: #757575;        /* secondary prose */
  /* Brand stripe band (icon bottom, scripts/generate-app-icons.sh) */
  --stripe-1: #e2af45;     /* pitambara gold */
  --stripe-2: #c95a22;     /* saffron */
  --stripe-3: #b96a76;     /* lotus rose */
  --stripe-4: #3f6d86;     /* peacock blue */
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17120e;      /* app dark scaffold */
    --ink: #e6e1d8;
    --espresso: #f0ebe2;
    --accent: #bcaaa4;     /* brown 200 */
    --accent-soft: #a1887f;
    --chrome: #261d17;     /* dark chrome fill */
    --chrome-line: #3a2e25;
    --muted: #9e9e9e;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Bhakti Serif", Georgia, serif;
  font-size: 18px;
  line-height: 1.55;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

header.site {
  text-align: center;
  padding: 3rem 0 0.5rem;
}

/* Śrīla Prabhupāda — first and above everything on the home page. */
figure.prabhupada {
  margin: 0 0 2.25rem;
}
figure.prabhupada img {
  width: 230px;
  max-width: 70%;
  border-radius: 6px;
  border: 1px solid var(--chrome-line);
  box-shadow: 0 2px 12px rgba(59, 44, 32, 0.18);
}
figure.prabhupada figcaption span { display: block; }
figure.prabhupada .honorific {
  margin-top: 0.9rem;
  font-style: italic;
  color: var(--accent-soft);
  font-size: 0.95rem;
}
figure.prabhupada .name {
  color: var(--espresso);
  font-weight: 700;
  font-size: 1.15rem;
  margin: 0.1rem 0;
}
figure.prabhupada .title {
  color: var(--accent-soft);
  font-size: 0.95rem;
  max-width: 30rem;
  margin: 0 auto;
}
header.site img.logo {
  width: 110px;
  height: 110px;
}
header.site h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--espresso);
  margin: 0.75rem 0 0.25rem;
  letter-spacing: 0.01em;
}
header.site p.tagline {
  color: var(--accent-soft);
  font-style: italic;
  margin: 0 0 1rem;
}

/* Brand stripe band, echoing the app icon's base. */
.stripe {
  height: 8px;
  background: linear-gradient(
    to bottom,
    var(--stripe-1) 0 25%,
    var(--stripe-2) 25% 50%,
    var(--stripe-3) 50% 75%,
    var(--stripe-4) 75% 100%
  );
  border: 0;
  margin: 1.5rem 0;
}

main { padding-bottom: 2rem; }

h2 {
  color: var(--espresso);
  font-size: 1.35rem;
  margin: 2rem 0 0.5rem;
}

a { color: var(--accent); }
a:hover { color: var(--espresso); }

ul.features {
  padding-left: 1.2rem;
}
ul.features li { margin: 0.4rem 0; }

/* App screenshots — three phones side by side, stacking on small screens. */
.screens {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 2rem 0;
}
.screens a.shot {
  display: block;
  line-height: 0;
  border-radius: 12px;
}
.screens a.shot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.screens img {
  width: 186px;
  max-width: 85%;
  border: 1px solid var(--chrome-line);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(59, 44, 32, 0.15);
  cursor: zoom-in;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.screens a.shot:hover img {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 44, 32, 0.25);
}
@media (prefers-reduced-motion: reduce) {
  .screens img { transition: none; }
  .screens a.shot:hover img { transform: none; }
}

/* Lightbox. The screenshots are phone-shaped, so the constraint that matters
   is height, not width — cap on both and let the aspect ratio settle it. */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  background: rgba(23, 18, 14, 0.88);
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: min(92vw, 460px);
  max-height: 92vh;
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: 0;
  color: #fbf4e8;
  font: inherit;
  font-size: 2.25rem;
  line-height: 1;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  border-radius: 8px;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.12); }
.lightbox-close:focus-visible { outline: 2px solid #fbf4e8; }

.card {
  background: var(--chrome);
  border: 1px solid var(--chrome-line);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

/* CTA variant: centered content so the button doesn't hug the left edge. */
.card.cta { text-align: center; }

/* Caveat variant — mirrors the notice at the top of the app's Sanskrit primer
   (app/lib/sanskrit_primer_screen.dart). Keep the wording of the two in step:
   a reader who meets the concordance here and a reader who meets it in the app
   must be told the same thing about what has and hasn't been checked. */
.card.notice {
  border-color: var(--accent-soft);
  font-size: 0.97rem;
}
.card.notice strong { color: var(--espresso); }

.btn {
  display: inline-block;
  background: var(--espresso);
  color: var(--paper);
  padding: 0.7rem 1.6rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
}
.btn:hover { color: var(--paper); opacity: 0.9; }

.muted { color: var(--muted); font-size: 0.95rem; }

footer.site {
  border-top: 1px solid var(--chrome-line);
  margin-top: 2rem;
  padding: 1.25rem 0 2.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
footer.site a { color: var(--accent-soft); }
/* The nav row is a list of separate links and wants breathing room; the
   colophon's links sit inside a sentence, where that margin would push
   gaps in front of the following comma and full stop. */
footer.site nav a { margin: 0 0.5rem; }
footer.site .colophon { font-size: 0.85rem; }
