/* Bible Project — site styles.
   Palette lifted from the app's AppColors
   (shared/src/commonMain/kotlin/com/municornio/biblereader/ui/theme/Theme.kt).
   The app is light-only by design; the site preserves that rather than
   inventing a dark theme the product never had. */

:root {
  --bg: #FBFBFB;          /* AppColors.Background */
  --surface: #FFFFFF;     /* AppColors.Surface */
  --ink: #000000;         /* AppColors.OnSurface */
  --muted: #8E8E93;       /* AppColors.SecondaryText */
  --divider: rgba(0, 0, 0, 0.12);
  --shadow: rgba(128, 128, 128, 0.20);
  --ai-1: #FF8550;        /* AppColors.Ai1 */
  --ai-2: #FF7DEA;        /* AppColors.Ai2 */
  --ai-3: #3BDCFF;        /* AppColors.Ai3 */
  --highlight: #FF9500;   /* AppColors.KeywordHighlight */
  --ai-gradient: linear-gradient(100deg, var(--ai-1), var(--ai-2), var(--ai-3));

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;

  --wrap: 1080px;
  --radius: 16px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

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

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

a { color: var(--ink); text-decoration-color: var(--muted); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }

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

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* Anchor targets must clear the sticky header when jumped to. */
[id] { scroll-margin-top: 88px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--surface); color: var(--ink);
  padding: 12px 20px; z-index: 100; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 251, 251, 0.86);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--divider);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 20px;
  min-height: 64px; flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 650; letter-spacing: -0.015em; font-size: 17px;
  text-decoration: none; margin-right: auto;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.site-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-nav a {
  color: var(--muted); text-decoration: none;
  font-size: 15px; font-weight: 500;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }

/* ---------- Type ---------- */

h1, h2, h3, h4 { letter-spacing: -0.025em; line-height: 1.15; margin: 0 0 0.5em; font-weight: 680; }
h1 { font-size: clamp(2.1rem, 5.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.15rem); margin-top: 0; }
h3 { font-size: 1.2rem; letter-spacing: -0.015em; }
p { margin: 0 0 1.1em; }
.lead { font-size: clamp(1.08rem, 2.1vw, 1.3rem); color: #3a3a3c; line-height: 1.55; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 14px;
}

/* Gradient text uses the app's AI gradient; a solid colour is painted first so
   the text stays readable if background-clip is unsupported. */
.ai-text {
  color: var(--ai-1);
  background: var(--ai-gradient);
  -webkit-background-clip: text;
  background-clip: text;
}
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .ai-text { -webkit-text-fill-color: transparent; color: transparent; }
}

/* ---------- Sections ---------- */

section { padding: 72px 0; }
section + section { padding-top: 0; }
.section-head { max-width: 680px; margin-bottom: 40px; }

/* ---------- Hero ---------- */

.hero { padding: 80px 0 64px; }
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 56px; align-items: center;
}
.hero p.lead { max-width: 34em; }
.hero-art {
  position: relative; aspect-ratio: 1; border-radius: 28px; overflow: hidden;
  background: var(--surface); box-shadow: 0 24px 60px -20px var(--shadow);
  padding: 3px; background-image: var(--ai-gradient);
}
.hero-art img { border-radius: 25px; width: 100%; }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-art { max-width: 320px; margin: 0 auto; }
}

/* ---------- Buttons ---------- */

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 14px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px;
  font-size: 16px; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--surface); box-shadow: 0 8px 24px -10px rgba(0,0,0,0.6); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--divider); }

/* ---------- Cards ---------- */

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--divider);
  border-radius: var(--radius); padding: 26px;
}
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.card .muted { font-size: 15px; }

/* Card rows are grid tracks of equal height; making the card a column flex box
   lets the "Read more" line sit on the baseline of the row rather than wherever
   its own body text happens to end. */
a.card {
  text-decoration: none; display: flex; flex-direction: column;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
a.card:hover { box-shadow: 0 14px 34px -16px var(--shadow); transform: translateY(-2px); }
a.card .more { color: var(--muted); font-size: 15px; font-weight: 600; margin: auto 0 0; padding-top: 14px; }
a.card:hover .more { color: var(--ink); }

/* AI-accented card: the gradient marks Father AI, exactly as it outlines the
   AI search field in the app. */
.card-ai { border-color: transparent; background: var(--surface); position: relative; }
.card-ai::before {
  content: ""; position: absolute; inset: 0;
  border-radius: var(--radius); padding: 2px; background: var(--ai-gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}

/* ---------- Verses ---------- */

.verse-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.verse {
  background: var(--surface); border: 1px solid var(--divider);
  border-radius: var(--radius); padding: 24px 26px;
}
.verse blockquote {
  margin: 0 0 10px; font-family: var(--serif);
  font-size: 1.22rem; line-height: 1.5;
}
.verse cite {
  font-style: normal; font-weight: 650; font-size: 14px;
  letter-spacing: 0.02em; color: var(--muted);
}
.verse .prayer { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--divider); font-size: 15px; color: #3a3a3c; }
.verse .prayer strong { color: var(--ink); }

/* ---------- Feature list ---------- */

.ticks { list-style: none; padding: 0; margin: 0 0 1.2em; display: grid; gap: 10px; }
.ticks li { padding-left: 30px; position: relative; }
.ticks li::before {
  content: ""; position: absolute; left: 4px; top: 0.55em;
  width: 12px; height: 7px; border-left: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink);
  transform: rotate(-45deg);
}
.ticks.crosses li::before {
  border: 0; background: var(--muted); transform: none;
  height: 2.5px; width: 12px; top: 0.75em;
}

/* ---------- Comparison table ---------- */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table {
  border-collapse: collapse; width: 100%; min-width: 520px;
  background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius);
  overflow: hidden; font-size: 16px;
}
caption { text-align: left; color: var(--muted); font-size: 14px; padding-bottom: 10px; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--divider); vertical-align: top; }
thead th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 600; }

/* ---------- FAQ ---------- */

.faq { display: grid; gap: 12px; }
details.faq-item {
  background: var(--surface); border: 1px solid var(--divider);
  border-radius: var(--radius); padding: 4px 24px;
}
details.faq-item summary {
  cursor: pointer; font-weight: 620; padding: 18px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after {
  content: "+"; color: var(--muted); font-size: 22px; font-weight: 400; line-height: 1;
}
details.faq-item[open] summary::after { content: "\2013"; }
details.faq-item > *:not(summary) { margin-bottom: 18px; }

/* ---------- CTA band ---------- */

.band {
  background: var(--surface); border: 1px solid var(--divider);
  border-radius: 24px; padding: 52px 40px; text-align: center;
}
.band .cta-row { justify-content: center; }
.band h2 { margin-bottom: 12px; }
.band p { max-width: 46em; margin-left: auto; margin-right: auto; }

/* ---------- Breadcrumb ---------- */

.crumbs { font-size: 14px; color: var(--muted); padding: 24px 0 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.crumbs li::after { content: "/"; margin-left: 8px; color: var(--divider); }
.crumbs li:last-child::after { content: ""; }
.crumbs a { color: var(--muted); }

/* ---------- Prose ---------- */

.prose { max-width: 720px; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 8px; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--divider); margin-top: 80px;
  padding: 48px 0 60px; color: var(--muted); font-size: 15px;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink); margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.colophon { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--divider); font-size: 13px; }
