/* --- css/tokens.css --- */
:root {
  --bg-base: #f7f2e8;
  --surface: #fffdfa;
  --text-primary: #1f1b16;
  --text-secondary: #5f564b;
  --accent: #7d4a2b;
  --border: #d8cdbf;
  --max-width: 980px;
}

/* --- css/base.css --- */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
}

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

a:hover,
a:focus {
  text-decoration: underline;
}

h1,
h2,
h3 {
  margin: 0 0 10px;
  line-height: 1.3;
}

h1 {
  font-size: clamp(28px, 5vw, 40px);
}

h2 {
  margin-top: 24px;
  font-size: clamp(22px, 4vw, 30px);
}

p {
  margin: 0 0 12px;
}

.muted {
  color: var(--text-secondary);
}

.list {
  margin: 0;
  padding-left: 18px;
}

/* --- css/layout.css --- */
.container {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
}

.hero {
  padding: 36px 0 16px;
}

.hero-media {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
}

.hero-media img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  color: var(--text-secondary);
}

.hero-badge img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.hero-badge--text-only {
  max-width: 100%;
}

.hero-badge--text-only span {
  line-height: 1.35;
}

.section {
  padding: 14px 0;
}

.content-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.policy {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}

.toc {
  font-size: 14px;
  margin-bottom: 16px;
}

@media (max-width: 640px) {
  .release-btn {
    width: 100%;
    max-width: 239px;
  }
}

/* --- css/components/header.css --- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.header-row {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.site-menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.site-menu-toggle-icon,
.site-menu-toggle-icon::before,
.site-menu-toggle-icon::after {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 160ms ease, opacity 160ms ease;
}

.site-menu-toggle-icon {
  position: relative;
}

.site-menu-toggle-icon::before,
.site-menu-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.site-menu-toggle-icon::before {
  top: -5px;
}

.site-menu-toggle-icon::after {
  top: 5px;
}

.site-menu-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 14px;
}

.nav-primary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(71, 50, 34, 0.12);
}

.nav-primary-cta:hover,
.nav-primary-cta:focus {
  color: #fff;
  text-decoration: none;
  opacity: 0.96;
}

@media (max-width: 640px) {
  .header-row {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 10px 0;
  }

  .brand {
    font-size: 17px;
  }

  .site-menu-toggle {
    display: inline-flex;
  }

  .header-row.js-site-menu .site-menu-panel {
    display: none;
  }

  .header-row.js-site-menu.is-menu-open .site-menu-panel {
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 12px 24px rgba(31, 27, 22, 0.08);
  }

  .header-row.js-site-menu.is-menu-open .site-menu-toggle-icon {
    background: transparent;
  }

  .header-row.js-site-menu.is-menu-open .site-menu-toggle-icon::before {
    transform: translateY(5px) rotate(45deg);
  }

  .header-row.js-site-menu.is-menu-open .site-menu-toggle-icon::after {
    transform: translateY(-5px) rotate(-45deg);
  }

  .site-menu-panel {
    width: 100%;
  }

  .nav {
    display: grid;
    gap: 10px;
    font-size: 15px;
  }

  .nav-primary-cta {
    order: -1;
    width: 100%;
    min-height: 46px;
  }

  .header-row:not(.js-site-menu) .nav {
    gap: 10px 12px;
    font-size: 13px;
  }

  .header-row:not(.js-site-menu) .lang-switch {
    font-size: 13px;
  }
}

/* --- css/components/language-switcher.css --- */
.lang-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35em;
  font-size: 14px;
  color: var(--text-secondary);
}

.lang-current {
  font-weight: 600;
  color: var(--text-primary);
}

.lang-switch-more {
  display: inline-block;
}

.lang-switch-more summary {
  display: inline-block;
  list-style: none;
  cursor: pointer;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lang-switch-more summary::-webkit-details-marker {
  display: none;
}

.lang-switch-more[open] summary {
  margin-bottom: 2px;
}

.lang-switch-more a {
  display: block;
  padding: 4px 0 0;
  font-weight: 500;
}

@media (max-width: 640px) {
  .header-row.js-site-menu .lang-switch {
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 13px;
  }

  .header-row.js-site-menu .lang-switch-more summary {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
  }
}

/* --- css/components/buttons.css --- */
.store-badge-link {
  display: inline-block;
  margin: 0;
}

.store-badge {
  display: block;
  width: 100%;
  height: 100%;
}

.store-badge-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 10px;
}

.download-btn {
  display: inline-block;
  margin: 10px 0 8px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.release-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 8px;
}

.release-btn {
  width: 239px;
  height: 71px;
  margin: 0;
}

.download-btn.release-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 12px;
}

.download-btn:hover,
.download-btn:focus {
  color: #fff;
  text-decoration: none;
  opacity: 0.95;
}

.download-btn--secondary {
  background: var(--surface);
  color: var(--accent);
  border: 2px solid var(--accent);
}

.download-btn--secondary:hover,
.download-btn--secondary:focus {
  color: var(--accent);
  text-decoration: none;
  opacity: 1;
  background: rgba(125, 74, 43, 0.06);
}

.play-cta-wrap {
  margin: 14px 0 8px;
}

/* --- css/components/cards.css --- */
.card-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.release-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 16px;
}

.release-meta {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.release-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

/* --- css/components/footer.css --- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 30px;
  padding: 18px 0 28px;
  color: var(--text-secondary);
  font-size: 14px;
}

/* --- css/pages/verse.css --- */
.verse-quote {
  margin: 1.25em 0;
  padding: 1em 1.25em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
}

.verse-quote p {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.75;
}

.verse-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(125, 74, 43, 0.08);
  color: var(--text-primary);
}

.verse-page > nav.muted {
  padding-top: 20px;
}

.verse-page .verse-reading {
  margin: 0.35em 0 1.35em;
}

.verse-page h1.verse-heading {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.15em;
  color: var(--text-primary);
}

.verse-reading--focus {
  padding: 18px 18px 16px;
}

.verse-page .verse-quote {
  margin: 0.75em 0 0;
  padding: 0.95em 0 0;
  border: none;
  background: transparent;
  border-radius: 0;
  border-top: 1px solid var(--border);
  border-left: none;
}

.verse-page .verse-reading--focus > .verse-heading + .verse-quote {
  margin-top: 0.5em;
  padding-top: 0.85em;
}

.verse-page .verse-reading--focus .verse-quote p {
  font-size: clamp(1.32rem, 3.2vw, 1.72rem);
  line-height: 1.78;
  color: var(--text-primary);
}

.verse-lead {
  margin: 0;
  padding: 0.95em 0 0;
  margin-top: 0.85em;
  border-top: 1px solid var(--border);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.verse-reflection__title {
  font-size: clamp(20px, 3.4vw, 26px);
  margin: 0 0 12px;
  line-height: 1.25;
}

.verse-reflection__stack .content-panel--sub {
  background: transparent;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.verse-reflection__stack .content-panel--sub:last-child {
  border-bottom: none;
  padding-bottom: 4px;
}

.verse-reflection__stack h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.35;
  color: var(--text-primary);
}

.verse-reflection__stack p {
  margin: 0;
  font-size: 15px;
  line-height: 1.62;
  color: var(--text-primary);
}

.section--related-wrap {
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.section--related-wrap .related-heading {
  margin: 0 0 10px;
  font-size: clamp(18px, 3vw, 22px);
}

.section--related-wrap h2 {
  margin-top: 0;
}

.verse-cta__title {
  margin: 0 0 10px;
}

.verse-lookup-answer {
  margin: 0 0 12px;
  font-size: 1.02rem;
  line-height: 1.62;
  color: var(--text-primary);
}

.verse-lookup-nav {
  margin: 0 0 14px;
  font-size: 0.92rem;
  line-height: 1.45;
}

.verse-lookup-nav__a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.verse-lookup-subhead {
  font-size: clamp(18px, 3vw, 22px);
  margin: 0 0 10px;
  line-height: 1.25;
}

.verse-lookup-queries__list {
  margin: 0;
  padding-left: 1.25rem;
}

.verse-lookup-correction {
  margin: 0 0 1rem;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(125, 74, 43, 0.06);
  font-size: 0.98rem;
  line-height: 1.55;
}

.verse-lookup-correction p {
  margin: 0;
}

.verse-context-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.verse-context-preview__ref {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.verse-context-preview__quote {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 6px;
}

.verse-context-preview__quote p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
}

.verse-lookup-variant-quote {
  margin: 0.5em 0 0;
}

.verse-lookup-faq__item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 8px;
  background: var(--surface);
}

.verse-lookup-faq__item summary {
  cursor: pointer;
  font-weight: 600;
  line-height: 1.4;
}

.verse-lookup-faq__answer {
  margin-top: 8px;
  font-size: 0.98rem;
  line-height: 1.6;
}

.verse-lookup-faq__answer p {
  margin: 0;
}

.verse-lookup-next__ask-wrap {
  margin: 0 0 14px;
}

.verse-lookup-next__ask {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  line-height: 1.3;
}

.verse-lookup-next__ask:hover,
.verse-lookup-next__ask:focus {
  color: #fff;
  text-decoration: none;
  opacity: 0.95;
}

.verse-lookup-next__install-wrap {
  margin: 0 0 14px;
}

/* Secondary CTA: outline, subordinate to the filled ask-pastor button above. */
.verse-lookup-next__install {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  line-height: 1.3;
}

.verse-lookup-next__install:hover,
.verse-lookup-next__install:focus {
  text-decoration: none;
  opacity: 0.85;
}

/* === SEO enrichment blocks === */

.verse-key-phrase-list,
.verse-theme-list,
.verse-cross-ref-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.verse-key-phrase,
.verse-theme,
.verse-cross-ref {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.verse-key-phrase__label,
.verse-theme__label {
  margin: 0 0 6px;
  font-size: 1.02rem;
  line-height: 1.35;
  font-weight: 600;
}

.verse-key-phrase p,
.verse-theme p,
.verse-cross-ref p {
  margin: 0;
  line-height: 1.6;
}

.verse-cross-ref__head {
  margin-bottom: 6px;
}

.verse-cross-ref__ref {
  font-weight: 600;
  font-size: 0.95rem;
}

.verse-cross-ref__quote {
  margin: 0 0 8px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: var(--bg);
  border-radius: 6px;
}

.verse-cross-ref__quote p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}

.verse-cross-ref__note {
  font-size: 0.95rem;
  color: var(--muted, inherit);
}

.verse-application-list,
.verse-reflection-question-list {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.6;
}

.verse-application-list li,
.verse-reflection-question-list li {
  margin-bottom: 6px;
}

/* --- css/pages/reader.css --- */
/* Crawlable Bible reader: chapter pages, book hub, and book index. */

.reader-text {
  font-size: 1.05rem;
  line-height: 1.75;
}

.reader-verse {
  margin: 0 0 0.5rem;
}

.reader-verse__num {
  font-size: 0.7em;
  font-weight: 700;
  color: var(--accent);
  margin-right: 0.2rem;
  vertical-align: super;
  line-height: 0;
}

.reader-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  justify-content: space-between;
  align-items: center;
  margin: 1.75rem 0 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-weight: 600;
}

.reader-chapter-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
  gap: 0.5rem;
}

.reader-chapter-list li {
  margin: 0;
}

.reader-chapter-list a {
  display: block;
  text-align: center;
  padding: 0.55rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}

.reader-chapter-list a:hover {
  border-color: var(--accent);
}

/* --- css/pages/article.css --- */
/* Article-specific rules will be introduced during family migration. */

/* --- css/pages/topic.css --- */
/* Topic-specific rules will be introduced during family migration. */

/* --- css/pages/home.css --- */
.hub-verses-page .hero {
  padding-top: 28px;
}

/* --- screens-gallery.css --- */
/* App screenshots: narrow cards, centered (avoid full-width tall phone mockups) */
.screens {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 260px));
  justify-content: center;
  justify-items: center;
}

.screen {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f1e7d9;
  min-height: 140px;
  padding: 12px;
  font-size: 14px;
  color: #4d4134;
}

.shot {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  width: 100%;
  max-width: 260px;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

.shot figcaption {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Hero row of compact screenshots (e.g. Features & FAQ) */
.hero-screens {
  margin-top: 16px;
}

.hero-screens .screens {
  margin: 0;
}
