/* BibleNotes support site */

:root {
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --line: #d2d2d7;
  --accent: #b4532a;
  --accent-dark: #8f3f1e;
  --ph: #dcdce0;
  --ph-text: #86868b;
  --radius: 22px;
  --max: 1040px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

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

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.1; letter-spacing: -0.015em; }
h1 { font-size: clamp(40px, 7vw, 72px); font-weight: 700; }
h2 { font-size: clamp(30px, 5vw, 48px); font-weight: 700; }
h3 { font-size: clamp(22px, 3vw, 28px); font-weight: 600; }
h4 { font-size: 19px; font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 720px; }
.center { text-align: center; }
.muted { color: var(--text-2); }
.eyebrow { font-size: 19px; font-weight: 600; color: var(--accent); margin-bottom: .5em; }
.lead { font-size: clamp(19px, 2.4vw, 24px); color: var(--text-2); line-height: 1.35; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 251, 253, .9);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  flex-wrap: wrap;
}
.brand { font-weight: 600; font-size: 19px; color: var(--text); }
.brand:hover { text-decoration: none; }
.site-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-nav a { color: var(--text); font-size: 14px; opacity: .8; }
.site-nav a:hover, .site-nav a[aria-current="page"] { opacity: 1; text-decoration: none; }
.site-nav a[aria-current="page"] { font-weight: 600; }

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

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 980px;
  background: var(--accent);
  color: #fff;
  font-size: 17px;
  font-weight: 500;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; }
.btn-store { background: #000; }
.btn-store:hover { background: #333; }
.link-arrow::after { content: " \203A"; }
.actions { display: flex; gap: 20px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

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

.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 760px; margin: 0 auto 56px; text-align: center; }

.hero { padding: 80px 0 0; text-align: center; overflow: hidden; }
.hero h1 { margin-bottom: .2em; }
.hero .lead { max-width: 640px; margin: 0 auto; }
.hero .ph { margin-top: 56px; }

.page-hero { padding: 80px 0 40px; text-align: center; }

/* ---------- Placeholders (swap for <img>) ---------- */

.ph {
  background: var(--ph);
  border-radius: var(--radius);
  color: var(--ph-text);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 14px;
  padding: 16px;
  width: 100%;
  aspect-ratio: 16 / 10;
}
.ph-wide   { aspect-ratio: 16 / 9; }
.ph-mac    { aspect-ratio: 16 / 10; }
.ph-ipad   { aspect-ratio: 4 / 3; }
.ph-phone  { aspect-ratio: 9 / 19.5; max-width: 300px; margin-left: auto; margin-right: auto; border-radius: 36px; }
.ph-square { aspect-ratio: 1 / 1; }
.ph-hero   { aspect-ratio: 21 / 10; border-radius: var(--radius) var(--radius) 0 0; }

/* ---------- Tile grid (Apple Books style) ---------- */

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.tile {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 40px 36px 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.section .tile { background: var(--bg-alt); }
.section-alt .tile { background: var(--bg); }
.tile p { color: var(--text-2); }
.tile .ph { margin-top: auto; border-radius: 16px 16px 0 0; }
.tile-full { grid-column: 1 / -1; }
.tile .tag-new {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  margin-bottom: 10px;
}

/* ---------- Split rows (text + image) ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 60px 0;
}
.split + .split { border-top: 1px solid var(--line); }
.split.reverse .split-media { order: -1; }
.split ul { padding-left: 1.2em; color: var(--text-2); margin: 0 0 1em; }
.split li { margin-bottom: .35em; }
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 980px;
  background: var(--bg-alt);
  color: var(--text-2);
  margin-bottom: 12px;
}
.badge-paid { background: #fbeee6; color: var(--accent-dark); }

/* ---------- Platform strip ---------- */

.platforms { display: grid; grid-template-columns: 1.4fr 1fr .6fr; gap: 20px; align-items: end; margin-top: 48px; }

/* ---------- Cards (tutorial index) ---------- */

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-alt);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
}
.card:hover { text-decoration: none; transform: translateY(-2px); }
.card .ph { border-radius: 0; aspect-ratio: 16 / 10; }
.card-body { padding: 22px 24px 26px; }
.card-body p { color: var(--text-2); font-size: 15px; margin: 0; }
.card-num { font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 4px; }

/* ---------- Tutorial steps ---------- */

.breadcrumb { font-size: 14px; color: var(--text-2); padding-top: 24px; }
.breadcrumb a { color: var(--text-2); }

.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0;
  border-top: 1px solid var(--line);
  counter-increment: step;
}
.step h3::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-right: 12px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  vertical-align: 3px;
}
.step p, .step li { color: var(--text-2); }
.step ul { padding-left: 1.2em; }

.callout {
  background: var(--bg-alt);
  border-radius: 16px;
  padding: 20px 24px;
  margin: 24px 0;
}
.callout p:last-child { margin-bottom: 0; }

.kbd {
  display: inline-block;
  font-size: .85em;
  font-weight: 600;
  padding: 1px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  white-space: nowrap;
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 40px 0 100px;
  border-top: 1px solid var(--line);
}
.pager a { display: block; font-size: 15px; }
.pager span { display: block; font-size: 13px; color: var(--text-2); }
.pager .next { text-align: right; margin-left: auto; }

/* ---------- Prose (legal, support) ---------- */

.prose { padding-bottom: 100px; }
.prose h2 { font-size: 28px; margin-top: 2em; }
.prose h3 { font-size: 20px; margin-top: 1.6em; }
.prose p, .prose li { color: #424245; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.draft-note {
  background: #fff6e5;
  border: 1px solid #f0d9a8;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 15px;
  margin-bottom: 32px;
}

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

.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 19px; list-style: none; position: relative; padding-right: 32px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: -2px; font-size: 24px; font-weight: 300; color: var(--accent); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--text-2); margin: 12px 0 0; }

.contact-box {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 48px 32px;
  text-align: center;
  margin-top: 72px;
}

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

.cta { text-align: center; padding: 100px 0; }

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

.site-footer {
  background: var(--bg-alt);
  color: var(--text-2);
  font-size: 12px;
  padding: 32px 0 40px;
  border-top: 1px solid var(--line);
}
.site-footer .wrap { display: flex; flex-direction: column; gap: 12px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--text); }
.footer-legal p { margin: 0 0 6px; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .platforms { grid-template-columns: 1fr 1fr; }
  .platforms .ph-phone { display: none; }
}

@media (max-width: 734px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .section { padding: 64px 0; }
  .hero { padding-top: 48px; }
  .page-hero { padding: 56px 0 24px; }
  .tiles, .cards, .split, .step, .platforms { grid-template-columns: 1fr; }
  .tile { padding: 32px 24px 0; }
  .split { gap: 28px; padding: 40px 0; }
  .split.reverse .split-media { order: 0; }
  .step { gap: 24px; padding: 36px 0; }
  .ph-hero { aspect-ratio: 4 / 3; }
  .site-nav { gap: 16px; }
  .site-header .wrap { padding-top: 8px; padding-bottom: 8px; }
}

/* ---------- Additions for generated pages ---------- */

.section-tight { padding-top: 40px; }
.center .lead { max-width: 720px; margin-left: auto; margin-right: auto; }
.cards + h3 { margin-top: 72px; }

/* A real screenshot in place of a grey box (Shot with a file) */
.shot { width: 100%; height: auto; border-radius: var(--radius); }
.shot.ph-phone { max-width: 300px; margin-left: auto; margin-right: auto; border-radius: 36px; }
.tile .shot { margin-top: auto; border-radius: 16px 16px 0 0; }
.card .shot { border-radius: 0; aspect-ratio: 16 / 10; object-fit: cover; }
.section-alt .badge:not(.badge-paid) { background: var(--bg); }

/* ---------- Platform switch (Versions / Version) ---------- */

:root {
  --switch-on-bg: #fff;
  --switch-on-text: var(--text);
  --switch-on-shadow: 0 1px 3px rgba(0, 0, 0, .15);
  --switch-focus: var(--accent);
}

/* The radio inputs stay focusable for the keyboard but aren't seen. */
.versions > .pick {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.version { display: none; }

.version-switch {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 8px;
  padding: 3px;
  border-radius: 980px;
  background: var(--bg-alt);
}
.version-switch label {
  padding: 8px 22px;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  white-space: nowrap;
}
.version-switch label:hover { color: var(--text); }

/* Language switch, at the right of the header */
.site-nav { margin-left: auto; }
.language-switch {
  font-size: 13px;
  color: var(--text);
  opacity: .8;
  border: 1px solid rgba(0, 0, 0, .18);
  border-radius: 980px;
  padding: 2px 10px;
}
.language-switch:hover { opacity: 1; text-decoration: none; }
@media (max-width: 734px) {
  /* Language switch on the BibleNotes row; the nav gets its own row below. */
  .language-switch { order: 1; margin-left: auto; }
  .site-nav { order: 2; width: 100%; margin-left: 0; }
}

/* Sign-in page (/signin/) */
.signin { max-width: 560px; padding-bottom: 100px; text-align: center; }
.signin code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; padding: 2px 6px; border-radius: 5px; background: rgba(0, 0, 0, .06); word-break: break-all; }
.signin-link { appearance: none; border: 0; background: none; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }
.signin-link:hover { text-decoration: underline; }
