/* Bible1000 — design "Mosaïque" */
:root {
  --bg: #fafaf7; --ink: #111; --mute: #6b6b66; --line: #e6e6df;
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Instrument Serif", Georgia, serif;
  --read: "Source Serif 4", "Charter", Georgia, serif;
  --arabic: "Noto Naskh Arabic", "Amiri", "Traditional Arabic", serif;
  --pad: clamp(16px, 4vw, 48px);
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
[dir="rtl"] { --sans: "Noto Naskh Arabic", system-ui, sans-serif; --display: "Noto Naskh Arabic", serif; }

/* Top bar */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px var(--pad); flex-wrap: wrap; }
.logo { font-weight: 700; letter-spacing: -.02em; direction: ltr; }
.topbar ul { display: flex; gap: 22px; list-style: none; padding: 0; font-size: .92rem; flex-wrap: wrap; }
.topbar ul a { padding: 2px 0; }
.topbar ul a:hover, .topbar ul a.active { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }

/* Home hero */
.hero { padding: 24px var(--pad) 40px; }
.big { font-size: clamp(5rem, 26vw, 22rem); font-weight: 700; line-height: .82; letter-spacing: -.06em; display: flex; align-items: flex-end; gap: .06em; direction: ltr; font-family: "Space Grotesk", system-ui, sans-serif; }
.big small { font-family: var(--display); font-style: italic; font-weight: 400; font-size: .16em; letter-spacing: 0; line-height: 1.1; padding-bottom: .25em; max-width: 7em; }
[dir="rtl"] .big small { direction: rtl; font-style: normal; }
.dots { display: grid; grid-template-columns: repeat(33, 1fr); gap: 5px; margin: 32px 0 18px; max-width: 900px; direction: ltr; }
.dots i { aspect-ratio: 1; border-radius: 50%; background: var(--ink); transition: opacity .3s; }
.dots i.off { opacity: .12; }
.cap { font-size: .88rem; color: var(--mute); }

/* Featured (detected) language */
.pick { padding: 0 var(--pad) 10px; }
.badge { display: inline-flex; gap: 8px; align-items: center; font-size: .8rem; font-weight: 500; background: var(--ink); color: #fff; border-radius: 99px; padding: 6px 14px; margin-bottom: 14px; }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; }
.feat { display: grid; grid-template-columns: 1.3fr 1fr; border-radius: 28px; background: var(--c); color: var(--fg, #111); padding: clamp(24px, 4vw, 48px); gap: 24px; align-items: end; min-height: 300px; transition: transform .25s; }
.feat:hover { transform: translateY(-4px); }
.feat .nat { font-size: clamp(2.6rem, 7vw, 5.5rem); font-weight: 700; letter-spacing: -.04em; line-height: .95; }
.feat .ti { font-family: var(--display); font-style: italic; font-size: clamp(1.3rem, 2.4vw, 2rem); margin-top: 10px; }
[dir="rtl"] .feat .ti, [dir="rtl"] .tile .ti { font-style: normal; }
.feat .go { justify-self: end; background: var(--fg, #111); color: var(--c); border-radius: 99px; padding: 16px 28px; font-weight: 700; display: inline-flex; gap: 10px; align-items: center; white-space: nowrap; }
[dir="rtl"] .feat .go { justify-self: start; }
.sec-title { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); padding: 36px var(--pad) 12px; font-weight: 500; }

/* Language tiles */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 0 var(--pad) 56px; }
.tile { border-radius: 20px; padding: 20px; min-height: 150px; display: flex; flex-direction: column; justify-content: space-between; color: var(--fg, #111); background: var(--c); transition: transform .25s, border-radius .25s; }
.tile:hover { transform: translateY(-6px) rotate(-.6deg); border-radius: 32px; }
.tile .code { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; display: flex; justify-content: space-between; direction: ltr; }
.tile .nat { font-size: clamp(1.5rem, 2.4vw, 2.1rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.tile .ti { font-family: var(--display); font-style: italic; font-size: 1.05rem; margin-top: 6px; }

/* Black strip */
.strip { background: var(--ink); color: #fff; padding: 56px var(--pad); display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.strip p:first-child { font-family: var(--display); font-size: clamp(1.8rem, 3.4vw, 2.8rem); line-height: 1.2; }
[dir="rtl"] .strip p:first-child { font-family: var(--sans); }
.strip p:last-child { color: #bbb; max-width: 440px; }

/* Inner pages */
.page-hero { background: var(--c, #ffd84d); color: var(--fg, #111); padding: clamp(40px, 8vw, 96px) var(--pad) clamp(28px, 5vw, 56px); border-radius: 0 0 36px 36px; }
.page-hero .eyebrow { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; margin-bottom: 14px; direction: ltr; }
.page-title { font-size: clamp(2.4rem, 7vw, 5.5rem); font-weight: 700; letter-spacing: -.04em; line-height: 1; max-width: 18ch; }
[dir="rtl"] .page-title { letter-spacing: 0; line-height: 1.3; }
.switch { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 22px var(--pad) 0; font-size: .85rem; }
.switch .lbl { color: var(--mute); font-weight: 500; margin-inline-end: 4px; }
.pill { padding: 5px 14px; border-radius: 99px; background: var(--c); color: var(--fg, #111); font-weight: 500; border: 2px solid transparent; transition: transform .15s; }
.pill:hover { transform: translateY(-2px); }
.pill.active { border-color: var(--ink); font-weight: 700; }
.prose { max-width: 40rem; margin: 0 auto; padding: clamp(32px, 6vw, 72px) var(--pad) 72px; font-family: var(--read); font-size: 1.2rem; line-height: 1.85; }
[dir="rtl"] .prose { font-family: var(--arabic); font-size: 1.35rem; line-height: 2.2; text-align: right; }
:lang(zh-Hans) .prose, :lang(zh-Hant) .prose { line-height: 2; letter-spacing: .02em; }
.prose p { margin-bottom: 1.35rem; }
.prose p:first-of-type { font-size: 1.12em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }
.prose a:hover { background: var(--c, #ffd84d); }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 2.2rem 0; }
.prose h2, .prose h3 { font-family: var(--sans); letter-spacing: -.02em; margin: 2rem 0 1rem; line-height: 1.2; }
.prose em { font-style: italic; }
.mini-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 2rem; font-family: var(--sans); }
.mini-tiles .tile { min-height: 110px; text-decoration: none; }

.dl { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; background: var(--fg, #111); color: var(--c); border-radius: 99px; padding: 12px 22px; font-weight: 700; font-size: .92rem; transition: transform .2s; }
.dl:hover { transform: translateY(-2px); }

/* Footer */
.site-footer { padding: 28px var(--pad); font-size: .8rem; color: var(--mute); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); }
.site-footer a { text-decoration: underline; }

@media (max-width: 900px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .strip, .feat { grid-template-columns: 1fr; }
  .feat .go { justify-self: start; }
  .dots { grid-template-columns: repeat(22, 1fr); }
}
@media (max-width: 420px) { .tiles { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
