/* Rejoice Bible website. The app's design language ("The Well-Kept Bible", DESIGN.md): a warm page, one coral accent,
   a serif for the headings (as scripture is set in the app) and Montserrat for everything else. White text sits on the
   deep coral, never the plain accent; coral as small text is the ink colour. No JavaScript, nothing from other sites. */

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/montserrat-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/montserrat-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;

  --brand: #e73155;
  --coral: #f54e5e;
  --coral-deep: #c63f4c;
  --coral-ink: #c63f4c;
  --gold: #f6d331;

  --page: #faf6f0;
  --page-alt: #f3ece2;
  --card: #ffffff;
  --text: #1f1c1a;
  --text-soft: #5c544e;
  --line: rgba(31, 28, 26, 0.12);
  --shadow: 0 1px 2px rgba(40, 24, 16, 0.06), 0 12px 32px -8px rgba(40, 24, 16, 0.18);
  --poster-shadow: 0 2px 6px rgba(40, 24, 16, 0.08), 0 30px 60px -20px rgba(40, 24, 16, 0.35);

  --serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Times New Roman', serif;
  --sans: 'Montserrat', Roboto, 'Segoe UI', Helvetica, Arial, sans-serif;
  --gutter: 16px;
  --max: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --coral: #f57e8c;
    --coral-ink: #f57e8c;
    --page: #141416;
    --page-alt: #1b1b1f;
    --card: #23232a;
    --text: rgba(255, 255, 255, 0.9);
    --text-soft: rgba(255, 255, 255, 0.64);
    --line: rgba(255, 255, 255, 0.12);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -8px rgba(0, 0, 0, 0.6);
    --poster-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), 0 30px 60px -20px rgba(0, 0, 0, 0.8);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

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

a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.sprite {
  display: none;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (min-width: 600px) {
  :root {
    --gutter: 32px;
  }
}

.skip {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 10;
  padding: 8px 14px;
  border-radius: 6px;
  background: var(--coral-deep);
  color: #fff;
  font-weight: 600;
}

.skip:focus {
  top: 8px;
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--coral-ink);
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Buttons: white on the deep coral (4.5:1), never on the plain accent. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--coral-deep);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(20, 12, 8, 0.18), 0 6px 16px -8px rgba(20, 12, 8, 0.35);
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.btn:hover {
  background: color-mix(in srgb, var(--coral-deep) 88%, #000);
  transform: translateY(-1px);
  box-shadow: 0 1px 2px rgba(20, 12, 8, 0.18), 0 10px 22px -10px rgba(20, 12, 8, 0.45);
}

.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.btn-small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.875rem;
  box-shadow: none;
}

.btn-small svg {
  width: 18px;
  height: 18px;
}

/* On the painting: a frosted outline button. */
.btn-ghost {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

/* On the page: an outlined button in ink. */
.btn-quiet {
  border-color: var(--line);
  background: var(--card);
  color: var(--text);
  box-shadow: none;
}

.btn-quiet:hover {
  background: var(--card);
  border-color: var(--coral);
  box-shadow: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Header: over the painting at first, a frosted bar as the page scrolls under it. */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--page) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
}

.brand img {
  border-radius: 8px;
}

.top nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.top nav a:not(.btn) {
  color: var(--text-soft);
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
}

.top nav a:not(.btn):hover {
  color: var(--text);
}

@media (max-width: 599.98px) {
  .hide-narrow {
    display: none;
  }

  /* On a phone the calls to action stack at full width, so they line up. */
  .actions .btn:not(.btn-small) {
    flex: 1 1 100%;
  }
}

/* Hero: the painting edge to edge, darkened toward the copy so white text reads at 4.5:1 or better. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #1b1612;
  color: #fff;
}

.hero-art {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(14, 10, 8, 0.86) 0%, rgba(14, 10, 8, 0.7) 42%, rgba(14, 10, 8, 0.2) 75%, rgba(14, 10, 8, 0.1) 100%),
    linear-gradient(0deg, rgba(14, 10, 8, 0.7) 0%, rgba(14, 10, 8, 0) 40%);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding-block: 72px 96px;
}

.hero .eyebrow {
  color: var(--gold);
}

.hero h1 {
  max-width: 13ch;
  font-size: clamp(2.6rem, 7vw, 4.75rem);
  line-height: 1.02;
}

.hero .lede {
  max-width: 36ch;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
}

.hero .actions {
  margin-top: 32px;
}

/* Four calls to action: an even two by two, so the buttons line up whatever their labels' lengths. */
@media (min-width: 600px) {
  .hero .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 36rem;
  }
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 500;
  font-size: 0.9375rem;
}

.facts li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.facts svg {
  width: 18px;
  height: 18px;
  color: var(--gold);
}

.hero-phone {
  justify-self: center;
  width: min(300px, 78vw);
  margin: 0;
}

.hero-phone img {
  border-radius: 8px;
  box-shadow: 0 40px 80px -24px rgba(0, 0, 0, 0.75);
}

/* The painting's title, as the app captions its paintings: a pill on a dark scrim. */
.caption {
  position: absolute;
  right: var(--gutter);
  bottom: 16px;
  margin: 0;
}

.caption span {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
}

@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    min-height: min(760px, calc(100svh - 64px));
    padding-block: 64px;
  }

  .hero-phone {
    width: 340px;
    transform: rotate(2deg);
  }
}

/* A verse between the hero and the features, set as the app sets scripture. */
.verse {
  padding-block: 72px;
  text-align: center;
}

.verse blockquote {
  margin: 0 auto;
}

.verse p {
  max-width: 24ch;
  margin-inline: auto;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.3;
}

.verse cite {
  display: block;
  margin-top: 16px;
  color: var(--coral-ink);
  font-style: normal;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
}

/* Features: copy beside the poster, swapping sides down the page; alternate bands get the deeper page colour. */
.feature {
  padding-block: 72px;
}

.feature:nth-child(odd) {
  background: var(--page-alt);
}

.feature-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.copy {
  max-width: 34rem;
}

.copy h2 {
  font-size: clamp(2rem, 4.5vw, 3rem);
}

.copy > p:not(.eyebrow) {
  margin-top: 16px;
  color: var(--text-soft);
  font-size: 1.0625rem;
}

.copy ul {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.copy li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.copy li svg {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  padding: 3px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--coral) 16%, transparent);
  color: var(--coral-ink);
}

.poster {
  justify-self: center;
  width: min(320px, 82vw);
  margin: 0;
}

.poster img {
  border-radius: 8px;
  box-shadow: var(--poster-shadow);
}

@media (min-width: 900px) {
  .feature {
    padding-block: 104px;
  }

  .feature-inner {
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 80px;
  }

  .feature.flip .feature-inner {
    grid-template-columns: 380px minmax(0, 1fr);
  }

  .feature.flip .poster {
    order: -1;
  }

  .poster {
    width: 380px;
  }

  .feature.flip .copy {
    justify-self: end;
  }
}

/* The promises: four quiet cards. */
.promises {
  padding-block: 88px;
}

.promises h2 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  text-align: center;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.cards li {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.cards svg {
  width: 28px;
  height: 28px;
  color: var(--coral-ink);
}

.cards h3 {
  margin-top: 16px;
  font-size: 1.375rem;
}

.cards p {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 0.9375rem;
}

.more {
  margin-top: 28px;
  text-align: center;
  font-weight: 600;
}

/* The close: the app's brand coral, edge to edge. */
.close {
  padding-block: 88px;
  background:
    radial-gradient(120% 140% at 85% 0%, rgba(246, 211, 49, 0.18) 0%, transparent 55%),
    linear-gradient(160deg, #c63f4c 0%, #9e2a3c 100%);
  color: #fff;
  text-align: center;
}

.close h2 {
  font-size: clamp(2.2rem, 5.5vw, 3.5rem);
}

.close .lede {
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
}

.close .actions {
  justify-content: center;
  margin-top: 32px;
}

.close .btn {
  background: #fff;
  color: #9e2a3c;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.5);
}

.close .btn:hover {
  background: #fff4f2;
}

.close .btn-quiet {
  border-color: rgba(255, 255, 255, 0.55);
  background: transparent;
  color: #fff;
  box-shadow: none;
}

.close .btn-quiet:hover {
  background: rgba(255, 255, 255, 0.12);
}

.close .also {
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.close .also a {
  color: #fff;
  font-weight: 600;
}

.close a:focus-visible {
  outline-color: #fff;
}

/* Footer. */
.foot {
  padding-block: 32px 40px;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 0.875rem;
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.foot nav {
  display: flex;
  gap: 20px;
}

.foot a {
  color: var(--text-soft);
  font-weight: 500;
}

.foot a:hover {
  color: var(--coral-ink);
}

.credit {
  flex-basis: 100%;
  font-size: 0.8125rem;
}

/* The privacy policy and the not-found page: one readable column. */
.doc {
  max-width: 46rem;
  padding-block: 56px 88px;
}

.doc h1 {
  font-size: clamp(2.4rem, 6vw, 3.5rem);
}

.doc .updated {
  margin-top: 12px;
  color: var(--text-soft);
  font-size: 0.9375rem;
}

.doc h2 {
  margin-top: 48px;
  font-size: 1.75rem;
}

.doc p,
.doc ul {
  margin-top: 14px;
}

.doc ul {
  padding-left: 1.25rem;
}

.doc li + li {
  margin-top: 8px;
}

.doc .short {
  margin-top: 32px;
  padding: 24px 28px;
  border: 1px solid color-mix(in srgb, var(--coral) 28%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--coral) 6%, var(--card));
}

.doc .short h2 {
  margin-top: 0;
  font-size: 1.375rem;
}

.doc table {
  width: 100%;
  margin-top: 16px;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.doc th,
.doc td {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.doc th {
  font-weight: 600;
}

/* The download page: a card per device, each ending in its button, then how to install on a computer. */
.get {
  padding-block: 56px 88px;
}

.get h1 {
  font-size: clamp(2.4rem, 6vw, 3.5rem);
}

.get > .lede {
  max-width: 40ch;
  margin-top: 16px;
  color: var(--text-soft);
  font-size: 1.125rem;
}

.platforms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.platforms li {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.platforms li > svg {
  width: 28px;
  height: 28px;
  color: var(--coral-ink);
}

.platforms h2 {
  margin-top: 16px;
  font-size: 1.5rem;
}

.platforms p {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 0.9375rem;
}

/* The requirements line takes the spare height, so every card's button sits on the same line. */
.platforms .needs {
  flex: 1;
  font-size: 0.8125rem;
}

.platforms .btn {
  margin-top: 20px;
}

.install {
  margin-top: 72px;
}

.install h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
}

.install-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px 48px;
  margin-top: 8px;
}

.install h3 {
  margin-top: 24px;
  font-size: 1.375rem;
}

.install ol {
  margin: 12px 0 0;
  padding-left: 1.25rem;
}

.install li + li {
  margin-top: 8px;
}

.install-steps p {
  margin-top: 14px;
  color: var(--text-soft);
  font-size: 0.9375rem;
}

/* Sections rise into place as they scroll in, where the browser can drive it from the scroll alone. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .feature .copy,
    .feature .poster,
    .cards li {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
  }

  .hero-copy {
    animation: rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .hero-phone {
    animation: rise 900ms 120ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 28px;
  }

  to {
    opacity: 1;
    translate: 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn {
    transition: none;
  }
}
