@import url("../fonts/fonts.css");

/* ==========================================================================
   Embark Bible — marketing site
   Light appearance only. The app has no dark mode, so neither does this.
   ========================================================================== */

:root {
  /* Palette — mirrors the app */
  --cream:    #FBF3E9;
  --blush:    #F7DED2;
  --lavender: #E4DEF5;
  --sage:     #DCEBDC;
  --sky:      #D6E6F2;
  --butter:   #FAEBC8;
  --rose:     #F6D7DE;
  --navy:     #25344F;
  --wave:     #5B8DB8;
  --ink:      #3B3B52;

  /* Two of the app's tones need a nudge to clear WCAG AA as *text*. Both are
     within a hair of the originals; the palette above is otherwise verbatim.
       inkSoft #6E6E88 measures 4.49:1 on cream — 0.01 short of the 4.5:1
       minimum, and 3.7:1 on the rose and lavender panels.
       wave    #5B8DB8 is 3.2:1 on cream, well below AA for body text.
     These are used wherever a colour is *read* rather than just seen; --wave
     itself is kept for decoration (rules, markers, outlines). */
  --ink-soft:  #5F5F77;  /* ≥ 4.6:1 on cream and on every tint */
  --wave-deep: #365F84;  /* ≥ 5.0:1 on cream and on every tint */

  --white: #FFFFFF;

  --serif: "Source Serif 4", ui-serif, "New York", Georgia, "Times New Roman", serif;
  --sans: "Nunito", ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont,
          "Segoe UI", system-ui, sans-serif;

  --r-sm: 14px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;

  --shadow-sm: 0 1px 2px rgba(37, 52, 79, .04), 0 4px 14px rgba(37, 52, 79, .05);
  --shadow-md: 0 2px 4px rgba(37, 52, 79, .04), 0 12px 32px rgba(37, 52, 79, .08);
  --shadow-lg: 0 4px 10px rgba(37, 52, 79, .05), 0 26px 60px rgba(37, 52, 79, .12);

  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --section-y: clamp(3.75rem, 9vw, 6.5rem);
  --measure: 34rem;
}

/* --------------------------------------------------------------- reset -- */

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--navy);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.16;
  margin: 0;
  text-wrap: balance;
}

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

a { color: var(--wave-deep); }

ul, ol { margin: 0; padding: 0; }

:focus-visible {
  outline: 3px solid var(--wave-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ------------------------------------------------------------- helpers -- */

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

.wrap--narrow { max-width: 46rem; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -120%);
  z-index: 100;
  background: var(--navy);
  color: var(--white);
  padding: .75rem 1.25rem;
  border-radius: 0 0 var(--r-md) var(--r-md);
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
}
.skip-link:focus { transform: translate(-50%, 0); }

.eyebrow {
  font-family: var(--sans);
  font-size: .8125rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--wave-deep);
  margin: 0 0 .875rem;
}

.lede {
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: var(--measure);
}

.stack > * + * { margin-top: 1.125rem; }

/* -------------------------------------------------------------- header -- */

.site-header {
  position: relative;
  z-index: 10;
  padding-block: 1.25rem;
}

/* On a phone the logo sits centred with the nav beneath it. From 40em the
   header settles into the usual single row, brand left and nav right. */
.site-header__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8125rem;
}

@media (min-width: 40em) {
  .site-header__inner {
    flex-direction: row;
    justify-content: space-between;
    gap: 1rem;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6875rem;
  text-decoration: none;
  color: var(--navy);
}

.brand picture { display: block; flex: 0 0 auto; }

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  box-shadow: var(--shadow-sm);
}

.brand span {
  font-family: var(--serif);
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

@media (min-width: 30em) {
  .brand span { font-size: 1.1875rem; }
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 1.875rem);
  list-style: none;
}

.site-nav ul { flex-wrap: nowrap; }

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  font-size: .9375rem;
  font-weight: 600;
  padding-block: .25rem;
  border-bottom: 2px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}

.site-nav a:hover {
  color: var(--navy);
  border-bottom-color: var(--blush);
}

/* On a narrow phone the header only has room for the brand plus two links.
   The rest of the nav comes back as soon as there is space. */
.site-nav .is-hideable { display: none; }

@media (min-width: 30em) {
  .site-nav a { font-size: .9688rem; }
}

@media (min-width: 46em) {
  .site-nav .is-hideable { display: list-item; }
}

/* ---------------------------------------------------------------- hero -- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -30% -20% auto -20%;
  height: 130%;
  background:
    radial-gradient(58% 46% at 22% 8%,  rgba(250, 235, 200, .85) 0%, rgba(250, 235, 200, 0) 62%),
    radial-gradient(52% 44% at 88% 22%, rgba(214, 230, 242, .9)  0%, rgba(214, 230, 242, 0) 66%),
    radial-gradient(66% 52% at 52% 96%, rgba(247, 222, 210, .75) 0%, rgba(247, 222, 210, 0) 68%);
  pointer-events: none;
}

/* minmax(0, …) everywhere a grid holds a phone frame or a screenshot: the
   default `1fr` carries an automatic min-content floor, which lets a fixed-
   width frame push the track — and the page — wider than the viewport. */
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 4rem);
  align-items: center;
  justify-items: center;
  text-align: center;
}

.hero__media {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* Centred with the rest of the hero copy on a phone; flush left once the
   hero splits into two columns. A block-level image ignores text-align. */
.hero__icon {
  display: block;
  width: 92px;
  height: 92px;
  margin: 0 auto 1.5rem;
}

.hero__icon img {
  width: 92px;
  height: 92px;
  border-radius: 21px;
  box-shadow: var(--shadow-md);
}

.hero h1 {
  font-size: clamp(2.75rem, 8vw, 4.25rem);
  margin-bottom: .5rem;
}

.hero__tagline {
  font-family: var(--serif);
  font-size: clamp(1.375rem, 3.4vw, 1.875rem);
  line-height: 1.35;
  color: var(--wave-deep);
  margin-bottom: 1.25rem;
}

.hero__sub {
  font-size: 1.0625rem;
  color: var(--ink-soft);
  max-width: 30rem;
  margin-inline: auto;
  margin-bottom: 2rem;
}

.hero__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .875rem;
}

.hero__free {
  font-size: .9375rem;
  color: var(--ink-soft);
}

@media (min-width: 62em) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    text-align: left;
    justify-items: start;
  }
  .hero__inner .hero__copy { max-width: 32rem; }
  .hero__inner .hero__media { justify-self: stretch; }
  .hero__icon { margin-left: 0; }
  .hero__sub { margin-inline: 0; }
  .hero__cta { align-items: flex-start; }
}

/* App Store badge -------------------------------------------------------- */

.badge-appstore {
  display: inline-block;
  border-radius: 9px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.badge-appstore img { width: 168px; height: auto; }
.badge-appstore:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* Phone frame ------------------------------------------------------------ */

/* The frames live inside grid items that are explicitly stretched to a
   minmax(0, …) track, so this percentage always has a definite containing
   block to resolve against. That matters twice over: a shrink-to-fit parent
   would make the width circular, collapsing the frame to nothing — and since
   the screenshots are lazily loaded, a collapsed frame never scrolls into
   view, so the image would never load at all. */
.phone {
  position: relative;
  width: min(19rem, 100%);
  padding: 9px;
  background: linear-gradient(160deg, #2E3C55 0%, #1B2637 55%, #38465F 100%);
  border-radius: 42px;
  box-shadow: var(--shadow-lg);
}

.phone::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 38px;
  border: 1px solid rgba(255, 255, 255, .16);
  pointer-events: none;
}

.phone img {
  width: 100%;
  border-radius: 34px;
  display: block;
}

.phone--lg { width: min(20.5rem, 100%); }

.tablet {
  width: min(46rem, 100%);
  padding: 12px;
  background: linear-gradient(160deg, #2E3C55 0%, #1B2637 55%, #38465F 100%);
  border-radius: 30px;
  box-shadow: var(--shadow-lg);
  margin-inline: auto;
}
.tablet img { width: 100%; border-radius: 20px; }

/* ------------------------------------------------------------- sections -- */

.section { padding-block: var(--section-y); }

.section--tint-blush    { background: var(--blush); }
.section--tint-sage     { background: var(--sage); }
.section--tint-sky      { background: var(--sky); }
.section--tint-lavender { background: var(--lavender); }
.section--tint-rose     { background: var(--rose); }
.section--tint-butter   { background: var(--butter); }

.section__head {
  max-width: 40rem;
  margin-inline: auto;
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.section__head h2 { font-size: clamp(1.875rem, 4.4vw, 2.625rem); }
.section__head .lede { margin-inline: auto; margin-top: 1rem; }

/* Alternating feature rows ----------------------------------------------- */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.25rem, 6vw, 4.5rem);
  align-items: center;
  justify-items: center;
}

.feature__copy { max-width: var(--measure); }

.feature__media {
  width: 100%;
  display: flex;
  justify-content: center;
}

.feature__copy h2 {
  font-size: clamp(1.75rem, 4.2vw, 2.5rem);
  margin-bottom: 1rem;
}

.feature__copy p { color: var(--ink-soft); font-size: 1.0625rem; }
.feature__copy p + p { margin-top: 1rem; }

@media (min-width: 56em) {
  .feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); justify-items: start; }
  .feature__media { justify-self: stretch; }
  .feature--reverse .feature__copy { order: 2; }
  .feature--reverse .feature__media { order: 1; }
}

/* A pull quote in the app's own voice ------------------------------------ */

.quote {
  text-align: center;
  max-width: 34rem;
  margin-inline: auto;
}

.quote p {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4vw, 2.125rem);
  line-height: 1.32;
  color: var(--navy);
}

.quote cite {
  display: block;
  margin-top: 1.25rem;
  font-family: var(--sans);
  font-style: normal;
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--wave-deep);
}

/* Card grids ------------------------------------------------------------- */

.cards {
  display: grid;
  gap: clamp(1.125rem, 2.5vw, 1.75rem);
  list-style: none;
}

@media (min-width: 40em) { .cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 40em) { .cards--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 58em) { .cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 40em) { .cards--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 62em) { .cards--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3vw, 2.125rem);
  box-shadow: var(--shadow-sm);
}

.card h3 {
  font-size: 1.3125rem;
  margin-bottom: .625rem;
}

.card p { color: var(--ink-soft); font-size: 1rem; }

.card__mark {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  margin-bottom: 1.125rem;
  color: var(--navy);
}

.card__mark svg { width: 22px; height: 22px; }

.card__mark--butter   { background: var(--butter); }
.card__mark--sky      { background: var(--sky); }
.card__mark--sage     { background: var(--sage); }
.card__mark--lavender { background: var(--lavender); }
.card__mark--rose     { background: var(--rose); }
.card__mark--blush    { background: var(--blush); }

/* Worlds strip ----------------------------------------------------------- */

.worlds {
  display: flex;
  flex-wrap: wrap;
  gap: .625rem;
  list-style: none;
  margin-top: 1.75rem;
}

.worlds li {
  background: var(--white);
  border-radius: 999px;
  padding: .5rem 1.0625rem;
  font-size: .9375rem;
  font-weight: 700;
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}

/* -------------------------------------------------------------- pricing -- */

.plans {
  display: grid;
  gap: clamp(1.125rem, 2.5vw, 1.5rem);
  list-style: none;
  align-items: stretch;
}

@media (min-width: 44em) { .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.plan {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 1.75rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: .3125rem;
}

.plan--best { outline: 2px solid var(--wave); outline-offset: -2px; }

.plan__term {
  font-size: .8125rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--wave-deep);
}

.plan__price {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--navy);
  line-height: 1.2;
}

.plan__note { font-size: .9375rem; color: var(--ink-soft); }

.plan__tag {
  align-self: center;
  margin-top: .5rem;
  background: var(--butter);
  color: var(--navy);
  border-radius: 999px;
  padding: .25rem .75rem;
  font-size: .8125rem;
  font-weight: 700;
}

.free-note {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--shadow-sm);
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
  text-align: center;
}

.free-note h3 { font-size: 1.5rem; margin-bottom: .625rem; }
.free-note p { color: var(--ink-soft); max-width: 38rem; margin-inline: auto; }

.pricing-fineprint {
  margin-top: 1.5rem;
  text-align: center;
  font-size: .9375rem;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------- footer -- */

.site-footer {
  background: var(--navy);
  color: #C9D2E0;
  padding-block: clamp(3rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem);
  font-size: .9688rem;
}

.site-footer h2 {
  color: var(--white);
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  margin-bottom: .75rem;
}

.site-footer__top {
  display: grid;
  gap: 2rem;
  align-items: center;
  justify-items: center;
  text-align: center;
  padding-bottom: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.site-footer__top p { color: #C9D2E0; max-width: 30rem; }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: clamp(1.5rem, 3vw, 2rem);
}

.site-footer a { color: var(--white); text-decoration-color: rgba(255, 255, 255, .45); }
.site-footer a:hover { text-decoration-color: var(--white); }
.site-footer small { color: #A9B4C6; }

/* ----------------------------------------------------------- doc pages -- */

.doc-hero {
  padding-block: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
}

.doc-hero h1 { font-size: clamp(2.25rem, 6vw, 3.25rem); }

.doc-hero p {
  margin-top: .875rem;
  color: var(--ink-soft);
  font-size: 1rem;
}

.doc {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: clamp(1.75rem, 5vw, 3.5rem);
  box-shadow: var(--shadow-sm);
  margin-bottom: clamp(3rem, 7vw, 5rem);
}

.doc > * + * { margin-top: 1.125rem; }

.doc h2 {
  font-size: clamp(1.375rem, 3.2vw, 1.75rem);
  margin-top: 2.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--blush);
}

.doc > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.doc h3 {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 1.0625rem;
  color: var(--navy);
  margin-top: 1.75rem;
}

.doc p, .doc li { color: var(--ink); }

.doc ul { padding-left: 1.25rem; }
.doc li { margin-top: .5rem; }
.doc li::marker { color: var(--wave); }

.doc strong { font-weight: 800; color: var(--navy); }

.doc .doc__lede {
  font-size: 1.125rem;
  color: var(--ink-soft);
}

.doc .doc__stamp {
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--wave-deep);
}

.callout {
  background: var(--sky);
  border-radius: var(--r-md);
  padding: 1.25rem 1.375rem;
}

.callout--butter { background: var(--butter); }

.faq { border-top: 1px solid var(--blush); padding-top: 1.5rem; margin-top: 1.5rem; }
.faq:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }

.faq h2 {
  font-family: var(--serif);
  font-size: 1.375rem;
  margin: 0 0 .625rem;
  padding: 0;
  border: 0;
}

.doc-contact {
  text-align: center;
  margin-bottom: clamp(3rem, 7vw, 5rem);
}

.doc-contact p { color: var(--ink-soft); }

.back-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-weight: 700;
  color: var(--wave-deep);
}
