/* Biblical Labs site. One shared stylesheet, no third-party requests, no JS.
   "Biblical" = slang for epic / huge. Keep visuals free of religious motifs. */

:root {
  color-scheme: light dark;
  --bg: #fafaf7;
  --surface: #ffffff;
  --fg: #141414;
  --muted: #5c5c5c;
  --line: #e5e3dc;
  --stripe: #f2f0ea;
  --accent: #5b2ee6;
  --accent-soft: #efeaff;
  --link: var(--accent);
  --radius: 20px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px rgb(0 0 0 / 0.06);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", "Charter", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e10;
    --surface: #18181b;
    --fg: #f2f2f0;
    --muted: #a3a3a8;
    --line: #2a2a2f;
    --stripe: #151518;
    --accent: #b39dff;
    --accent-soft: #221b3d;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.35);
  }
}

/* App themes. Hero bands stay dark in both schemes; --link is the AA-safe text accent. */
.theme-hot-dice {
  --app-top: #c2411e;
  --app-bottom: #7f2510;
  --app-accent: #ffc46b;
  --link: #b33a17;
}
.theme-fairmines {
  --app-top: #143561;
  --app-bottom: #0a1a30;
  --app-accent: #ff6b5b;
  --app-teal: #2ec4b6;
  --link: #0b7a70;
}
.theme-one-eighty {
  --app-top: #263142;
  --app-bottom: #12171f;
  --app-accent: #3ddc84;
  --app-cream: #f3ebd3;
  --link: #1a7f4b;
}
@media (prefers-color-scheme: dark) {
  .theme-hot-dice { --link: #ff9a6e; }
  .theme-fairmines { --link: #5edccf; }
  .theme-one-eighty { --link: #5fe39a; }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.45rem, 3.5vw, 1.9rem); font-weight: 750; margin-top: 2.2em; }
h3 { font-size: 1.1rem; font-weight: 700; }
p, ul, ol { margin: 0 0 1em; }
.muted { color: var(--muted); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.prose { max-width: 720px; }
.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--fg); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 10;
}
.skip:focus { left: 8px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px;
}
.wordmark {
  font-weight: 850; font-size: 1.35rem; letter-spacing: -0.045em;
  color: var(--fg); text-decoration: none; white-space: nowrap;
}
.logo-mark { display: inline-block; width: 28px; height: 30px; margin: -4px 9px 0 0; vertical-align: middle; }
.wordmark span { color: var(--accent); }
.wordmark:hover { text-decoration: none; }
.site-nav { display: flex; gap: 4px 20px; flex-wrap: wrap; }
.site-nav a { color: var(--fg); text-decoration: none; font-weight: 600; font-size: 0.98rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); }
@media (max-width: 419px) {
  /* keep mark + wordmark + nav on one row on phones */
  .site-header .wrap { gap: 10px; }
  .site-header .wordmark { font-size: 1.25rem; }
  .site-header .site-nav { gap: 4px 14px; }
  .site-header .site-nav a { font-size: 0.94rem; }
  .logo-mark { width: 24px; height: 26px; margin-right: 7px; }
}

main { padding-bottom: 56px; }

/* Home hero */
.home-hero { padding: 48px 0 24px; }
.home-hero .wrap { display: grid; gap: 40px; align-items: center; }
@media (min-width: 880px) {
  .home-hero { padding: 88px 0 48px; }
  .home-hero .wrap { grid-template-columns: 1.1fr 1fr; gap: 64px; }
}
.kicker {
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.display { font-size: clamp(2.8rem, 10vw, 5rem); font-weight: 850; letter-spacing: -0.05em; line-height: 0.95; margin-bottom: 18px; }
.tagline { font-size: clamp(1.35rem, 3.6vw, 1.75rem); font-weight: 700; letter-spacing: -0.02em; margin: 0 0 8px; }
.tagline::after { content: ""; display: block; width: 48px; height: 4px; background: var(--accent); border-radius: 2px; margin-top: 14px; }
.pitch { font-size: 1.2rem; color: var(--muted); max-width: 34ch; }

/* Dictionary definition card */
.definition {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px 26px 26px; position: relative;
  font-family: var(--serif);
}
.definition::before {
  content: ""; position: absolute; left: 26px; top: 0; width: 56px; height: 4px;
  background: var(--accent); border-radius: 0 0 4px 4px;
}
.def-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 0 0 4px; }
.headword { font-size: clamp(2.6rem, 9vw, 3.8rem); font-weight: 700; letter-spacing: -0.01em; line-height: 1.05; }
.ipa { font-family: var(--sans); color: var(--muted); font-size: 1.05rem; }
.pos { font-style: italic; color: var(--accent); margin: 0 0 14px; font-size: 1.1rem; }
.senses { margin: 0; padding-left: 1.4em; font-size: 1.3rem; line-height: 1.45; }
.senses li::marker { font-weight: 700; }
.example { display: block; margin-top: 10px; font-style: italic; color: var(--muted); font-size: 1.1rem; }

/* Principles */
.principles { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 14px 32px; }
@media (min-width: 720px) { .principles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .principles { grid-template-columns: repeat(4, 1fr); } }
.principles li { border-top: 2px solid var(--accent); padding-top: 14px; }
.principles h3 { margin-bottom: 4px; }
.principles p { margin: 0; color: var(--muted); }

/* Sections */
.section { padding-top: 24px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* App cards */
.cards { display: grid; gap: 18px; grid-template-columns: 1fr; list-style: none; padding: 0; margin: 20px 0 0; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.app-card {
  display: flex; flex-direction: column; gap: 14px; height: 100%;
  padding: 24px; border-radius: var(--radius); color: #fff; text-decoration: none;
  background: linear-gradient(160deg, var(--app-top), var(--app-bottom));
  box-shadow: var(--shadow); transition: transform 0.15s ease;
}
.app-card:hover { transform: translateY(-2px); text-decoration: none; }
.app-card h3 { font-size: 1.3rem; margin: 4px 0 0; color: #fff; }
.app-card p { margin: 0; color: rgb(255 255 255 / 0.86); }
.app-card .tag { margin-top: auto; }
@media (prefers-reduced-motion: reduce) { .app-card { transition: none; } .app-card:hover { transform: none; } }

.tag {
  display: inline-block; align-self: flex-start; font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.04em; padding: 5px 12px; border-radius: 999px;
  background: rgb(255 255 255 / 0.14); color: #fff; border: 1px solid rgb(255 255 255 / 0.22);
}

/* App icons: square art, iOS-style rounded mask in CSS */
.app-icon { width: 72px; height: 72px; flex: none; display: block; }
.app-icon img {
  width: 100%; height: 100%; border-radius: 22.5%;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.18), 0 6px 18px rgb(0 0 0 / 0.26);
  outline: 1px solid rgb(255 255 255 / 0.12); outline-offset: -1px; /* edge for dark icons on dark bands */
}
.app-icon.lg { width: 96px; height: 96px; }

/* Guides list */
.guides { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px; }
@media (min-width: 720px) { .guides { grid-template-columns: repeat(3, 1fr); } }
.guides a {
  display: block; height: 100%; padding: 18px 20px; border: 1px solid var(--line);
  border-radius: 16px; background: var(--surface); color: var(--fg); text-decoration: none;
}
.guides a:hover { border-color: var(--accent); }
.guides strong { display: block; }
.guides span { color: var(--muted); font-size: 0.95rem; }

/* App page hero */
.app-hero {
  color: #fff; background: linear-gradient(165deg, var(--app-top), var(--app-bottom));
  padding: 40px 0 0; overflow: hidden;
}
.app-hero .wrap { display: grid; gap: 32px; align-items: end; }
@media (min-width: 880px) {
  .app-hero { padding-top: 64px; }
  .app-hero .wrap { grid-template-columns: 1.2fr 1fr; gap: 56px; }
  .app-hero-copy { padding-bottom: 64px; align-self: center; }
}
.app-hero h1 { color: #fff; margin-top: 20px; }
.app-hero .lede { font-size: 1.25rem; color: rgb(255 255 255 / 0.88); max-width: 32ch; }
.store-badge { margin-top: 24px; }
.store-badge .tag { font-size: 0.9rem; padding: 8px 16px; }
.app-hero .tag-accent { color: var(--app-accent); border-color: currentColor; background: rgb(0 0 0 / 0.18); }

/* Screenshot in the hero: cropped phone peeking from the bottom edge */
.shot {
  margin: 0 auto; width: min(320px, 82%); max-height: 520px; overflow: hidden;
  border-radius: 28px 28px 0 0; box-shadow: 0 -10px 40px rgb(0 0 0 / 0.3);
}
.shot img { width: 100%; }
.shot-placeholder {
  height: 280px; display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 24px; border: 2px dashed rgb(255 255 255 / 0.28); border-bottom: 0;
  background: rgb(0 0 0 / 0.18); color: rgb(255 255 255 / 0.8); font-weight: 600;
}
@media (min-width: 880px) { .shot-placeholder { height: 440px; } }

/* Features */
.features { display: grid; gap: 14px; grid-template-columns: 1fr; list-style: none; padding: 0; margin: 16px 0 0; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .features { grid-template-columns: repeat(3, 1fr); } }
.features li {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px;
}
.features h3 { margin-bottom: 6px; }
.features p { margin: 0; color: var(--muted); }

.two-col { display: grid; gap: 24px; align-items: start; }
@media (min-width: 880px) { .two-col { grid-template-columns: 1.3fr 1fr; gap: 48px; } }

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 26px; margin-top: 16px;
}
.panel > :last-child { margin-bottom: 0; }
.price { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 4px; }
.price-note { font-size: 1rem; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.intro { margin-top: 40px; font-size: 1.15rem; }

.features-wrap { display: grid; gap: 24px; align-items: start; }
@media (min-width: 960px) {
  .features-wrap.has-shot { grid-template-columns: 1fr 280px; gap: 32px; }
  .features-wrap.has-shot .features { grid-template-columns: repeat(2, 1fr); }
  .features-wrap.has-shot .figure-inline { margin-top: 16px; }
}
.figure-inline { margin: 0 auto; border-radius: 22px; overflow: hidden; width: 100%; max-width: 280px; box-shadow: var(--shadow); }

.callout {
  display: block; margin-top: 16px; padding: 18px 22px; border-radius: 16px; text-decoration: none;
  background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-left: 4px solid var(--link);
}
.callout strong { color: var(--link); }

/* Guide articles */
.article h2 { font-size: clamp(1.35rem, 3.2vw, 1.65rem); }
.article h3 { margin-top: 1.6em; }
.article li { margin-bottom: 0.4em; }
.article h1 { font-size: clamp(1.9rem, 5.5vw, 2.8rem); }
.cta-card { margin-top: 40px; }
.cta-card .app-card h2 { color: #fff; font-size: 1.35rem; margin: 4px 0 0; }
.big-numbers { font-size: 1.3rem; }

.data { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-variant-numeric: tabular-nums; }
.data caption { text-align: left; font-size: 0.9rem; color: var(--muted); padding-bottom: 6px; }
.data th, .data td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data thead th { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); border-bottom-width: 2px; }
.data tbody th { font-weight: 700; }
.data tbody tr:nth-child(even) { background: var(--stripe); }
.chart td { font-family: var(--mono); font-size: 0.95rem; }
.chart .none { font-family: var(--sans); color: var(--muted); font-style: italic; }
.chart-pair { display: grid; gap: 0 24px; }
@media (min-width: 600px) { .chart-pair { grid-template-columns: 1fr 1fr; } }
.chart-pair .data { margin: 0 0 12px; }
/* .stack tables turn into labeled rows on phones */
@media (max-width: 599px) {
  .stack thead { position: absolute; left: -9999px; }
  .stack tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .stack th, .stack td { display: block; border: 0; padding: 2px 12px; }
  .stack td::before { content: attr(data-label) ": "; font-weight: 600; color: var(--muted); }
}

/* Legal / plain pages */
.page-head { padding: 48px 0 8px; }
.legal h2 { font-size: 1.35rem; }
.legal h3 { margin-top: 1.6em; }
.legal li { margin-bottom: 0.5em; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--muted); font-size: 0.95rem; }
.site-footer .wrap { display: grid; gap: 14px; }
@media (min-width: 720px) {
  .site-footer .wrap { grid-template-columns: auto 1fr; align-items: center; }
  .site-footer .site-nav { justify-content: flex-end; }
}
.site-footer .site-nav a { color: var(--muted); font-weight: 500; }
.site-footer .site-nav a:hover { color: var(--accent); }
.site-footer p { margin: 0; }
.site-footer .wordmark { font-size: 1.1rem; }
