/* -------------------------------------------------------------
   Next Chapter Education: site stylesheet

   Company chrome keeps the original "contemporary crisp" system:
   warm off-white, near-black type, deep teal brand, red square
   marks, hairline rules, Outfit (display) + DM Sans (body).

   Product sections (.bb, .rr, .app-card--bb/--rr, .brand-card--bb/--rr)
   carry each app's own brand and mirror bookbright.app and
   realready.app.

   All fonts are self-hosted from /fonts. The privacy policy says the
   site makes no third-party requests, so keep it that way.
   ------------------------------------------------------------- */

@font-face {
  font-family: "Outfit";
  src: url("/fonts/outfit.woff2") format("woff2-variations"),
       url("/fonts/outfit.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans.woff2") format("woff2-variations"),
       url("/fonts/dm-sans.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}
/* BookBright brand fonts */
@font-face {
  font-family: "Bangers";
  src: url("/fonts/bangers.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("/fonts/fredoka.woff2") format("woff2-variations"),
       url("/fonts/fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Company */
  --bg: #f5f5f0;
  --bg-sunk: #ecebe4;
  --fg: #0a0a0a;
  --fg-soft: #2c2c2c;
  --muted: #6b6b6b;
  --rule: #d4d2c8;
  --rule-strong: #b6b3a7;
  --brand: #0d7377;
  --brand-deep: #085558;
  --accent: #d84f41;
  --accent-deep: #b63d31;

  --display: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --wrap: 70rem;
  --gutter: clamp(1rem, 5vw, 2.5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* BookBright (mirrors apps/web/tailwind.config.ts in the BookBright repo) */
  --bb-cream: #fff8e7;
  --bb-ink: #1a1a2e;
  --bb-ink-soft: #3b3b52;
  --bb-muted: #6b7280;
  --bb-pink: #ff6584;
  --bb-purple: #7c3aed;
  --bb-purple-dark: #5b21b6;
  --bb-gold: #fbbf24;
  --bb-green: #34d399;
  --bb-coral: #fb923c;
  --bb-shadow: 3px 3px 0 rgba(26, 26, 46, 0.9), 0 10px 18px rgba(26, 26, 46, 0.1);
  --bb-font: "Fredoka", ui-rounded, system-ui, sans-serif;
  --bb-display: "Bangers", "Impact", system-ui, sans-serif;

  /* RealReady (mirrors the realready-web palette) */
  --rr-navy: #023047;
  --rr-navy-deep: #01202f;
  --rr-teal: #219ebc;
  --rr-teal-light: #8ecae6;
  --rr-orange: #ffb703;
  --rr-orange-deep: #fb8500;
  --rr-font: "DM Sans", system-ui, sans-serif;
  --rr-display: "Outfit", system-ui, sans-serif;
}

/* -------------------------------------------------------------
   Base
   ------------------------------------------------------------- */

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

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

main {
  flex: 1 0 auto;
}

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

img {
  height: auto;
}

a {
  color: inherit;
}

p {
  margin: 0 0 1em;
}

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

.nowrap {
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.75rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--fg);
  color: var(--bg);
  font-size: 0.9rem;
}
.skip-link:focus {
  left: 0.75rem;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Small uppercase label with the red square mark. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0 0 1.5rem;
  font-family: var(--body);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  width: 0.625rem;
  height: 0.625rem;
  flex: none;
  background: var(--accent);
}

/* Section divider: hairline with a red square at the left end. */
.rule {
  position: relative;
  height: 1px;
  background: var(--rule);
}
.rule::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--accent);
  transform: translateY(-50%);
}

/* -------------------------------------------------------------
   Masthead
   ------------------------------------------------------------- */

.masthead {
  border-bottom: 1px solid var(--rule);
}

.masthead__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  padding-block: 1.25rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--fg);
  text-decoration: none;
}
.wordmark::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  margin-right: 0.3rem;
  background: var(--accent);
  transition: transform 0.35s var(--ease);
}
.wordmark em {
  font-style: normal;
  font-weight: 700;
  color: var(--brand);
}
.wordmark:hover::before {
  transform: rotate(45deg);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
}

.nav a {
  padding-block: 0.5rem 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav a:hover {
  color: var(--fg);
  border-bottom-color: var(--accent);
}
.nav a[aria-current="page"] {
  color: var(--fg);
  border-bottom-color: var(--fg);
}

/* -------------------------------------------------------------
   Home: hero
   ------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-block: clamp(3.5rem, 9vw, 7rem) clamp(3rem, 7vw, 5.5rem);
}

.hero__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.hero__title em {
  font-style: normal;
  color: var(--brand);
}

.hero__dek {
  max-width: 33rem;
  margin: 1.75rem 0 0;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--fg-soft);
}

/* The two app icons on a faint grid. Decorative. */
.hero__art {
  position: relative;
  width: 100%;
  max-width: 25rem;
  aspect-ratio: 1;
  justify-self: end;
}
.hero__art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 2.5rem 2.5rem;
  background-position: center;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 25%, transparent 70%);
  mask-image: radial-gradient(circle at 50% 50%, #000 25%, transparent 70%);
}

.hero__tile {
  position: absolute;
  width: 44%;
  aspect-ratio: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: 24%;
}
.hero__tile img {
  width: 100%;
  height: 100%;
}

.hero__tile--bb {
  left: 11%;
  top: 13%;
  border: 2px solid var(--bb-ink);
  box-shadow: 5px 5px 0 rgba(26, 26, 46, 0.9), 0 20px 34px rgba(76, 29, 149, 0.25);
  transform: rotate(-7deg);
  animation: tile-in-bb 1s 0.25s var(--ease) both;
}

.hero__tile--rr {
  right: 9%;
  bottom: 11%;
  overflow: hidden;
  box-shadow: 0 24px 44px -12px rgba(2, 48, 71, 0.5);
  transform: rotate(6deg);
  animation: tile-in-rr 1s 0.4s var(--ease) both;
}

.hero__sq {
  position: absolute;
}
.hero__sq--red {
  top: 16%;
  right: 20%;
  width: 0.9rem;
  height: 0.9rem;
  background: var(--accent);
}
.hero__sq--teal {
  left: 20%;
  bottom: 17%;
  width: 0.6rem;
  height: 0.6rem;
  background: var(--brand);
}

/* -------------------------------------------------------------
   Home: our apps
   ------------------------------------------------------------- */

.apps {
  padding-block: clamp(3rem, 7vw, 4.5rem) clamp(3.5rem, 8vw, 5.5rem);
  scroll-margin-top: 1rem;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
}

.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 25rem;
  padding: clamp(1.5rem, 3.5vw, 2.4rem);
  border-radius: 20px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.app-card:hover {
  transform: translateY(-4px);
}

.app-card__icon {
  width: 4.5rem;
  height: 4.5rem;
  margin-bottom: 1.75rem;
}

.app-card__name {
  margin: 0;
  line-height: 1;
}

.app-card__tag {
  max-width: 25rem;
  margin: 0.9rem 0 0;
  font-size: 1.08rem;
  line-height: 1.5;
}

.app-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}
.app-card__meta li {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
}

.app-card__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: auto;
  padding-top: 2rem;
}

.app-card__more,
.app-card__site {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
}
.app-card__more .icon {
  width: 1.05em;
  height: 1.05em;
  stroke-width: 2.5;
  transition: transform 0.3s var(--ease);
}
.app-card:hover .app-card__more .icon {
  transform: translateX(4px);
}

/* The whole card opens the app's page here; the domain link sits above that. */
.app-card__more::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.app-card__site {
  position: relative;
  z-index: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.app-card__site .icon {
  width: 0.85em;
  height: 0.85em;
}

.app-card--bb {
  background-color: var(--bb-cream);
  background-image:
    radial-gradient(ellipse 80% 60% at 90% 0%, rgba(255, 101, 132, 0.14), rgba(255, 248, 231, 0) 70%),
    radial-gradient(rgba(26, 26, 46, 0.05) 1px, rgba(26, 26, 46, 0) 1.3px);
  background-size: auto, 13px 13px;
  border: 2px solid var(--bb-ink);
  box-shadow: 4px 4px 0 rgba(26, 26, 46, 0.9), 0 14px 24px rgba(26, 26, 46, 0.1);
  color: var(--bb-ink);
  font-family: var(--bb-font);
}
.app-card--bb:hover {
  box-shadow: 6px 6px 0 rgba(26, 26, 46, 0.9), 0 20px 30px rgba(26, 26, 46, 0.12);
}
.app-card--bb .app-card__icon {
  border: 2px solid var(--bb-ink);
  border-radius: 22%;
  box-shadow: 3px 3px 0 rgba(26, 26, 46, 0.9);
}
.app-card--bb .app-card__name {
  font-family: var(--bb-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 4.6vw, 3.1rem);
  letter-spacing: 0.04em;
}
.app-card--bb .app-card__tag {
  font-weight: 500;
  color: var(--bb-ink-soft);
}
.app-card--bb .app-card__meta li {
  background: #fff;
  border: 2px solid var(--bb-ink);
  box-shadow: 2px 2px 0 rgba(26, 26, 46, 0.9);
}
.app-card--bb .app-card__more {
  font-family: var(--bb-display);
  font-size: 1.35rem;
  letter-spacing: 0.05em;
  color: var(--bb-purple-dark);
}
.app-card--bb .app-card__site {
  font-weight: 500;
  color: var(--bb-ink-soft);
}

.app-card--rr {
  background:
    radial-gradient(ellipse 70% 60% at 92% 8%, rgba(33, 158, 188, 0.38), rgba(33, 158, 188, 0) 70%),
    linear-gradient(160deg, var(--rr-navy), var(--rr-navy-deep));
  box-shadow: 0 20px 40px -18px rgba(2, 48, 71, 0.65);
  color: #fff;
  font-family: var(--rr-font);
}
.app-card--rr:hover {
  box-shadow: 0 28px 50px -18px rgba(2, 48, 71, 0.75);
}
.app-card--rr .app-card__icon {
  border-radius: 22%;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}
.app-card--rr .app-card__name {
  font-family: var(--rr-display);
  font-weight: 700;
  font-size: clamp(2.3rem, 4.4vw, 2.9rem);
  letter-spacing: -0.03em;
}
.app-card--rr .app-card__name em {
  font-style: normal;
  color: var(--rr-orange);
}
.app-card--rr .app-card__tag {
  color: #cbd8e3;
}
.app-card--rr .app-card__meta li {
  background: rgba(142, 202, 230, 0.12);
  border: 1px solid rgba(142, 202, 230, 0.28);
  color: var(--rr-teal-light);
}
.app-card--rr .app-card__more {
  font-family: var(--rr-display);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--rr-orange);
}
.app-card--rr .app-card__site {
  color: #a9bccb;
}

/* Compact, horizontal card for "Also from" on the app pages. */
.app-card--compact {
  min-height: 0;
  flex-direction: row;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 1.75rem;
}
.app-card--compact .app-card__icon {
  width: 4rem;
  height: 4rem;
  margin: 0;
}
.app-card--compact .app-card__text {
  flex: 1;
  min-width: 0;
}
.app-card--compact .app-card__tag {
  margin-top: 0.4rem;
  font-size: 1rem;
  max-width: none;
}
.app-card--compact .app-card__links {
  margin: 0;
  padding: 0;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}
.app-card--compact.app-card--bb .app-card__name {
  font-size: 2.1rem;
}
.app-card--compact.app-card--rr .app-card__name {
  font-size: 2rem;
}

/* -------------------------------------------------------------
   Home: how we build them
   ------------------------------------------------------------- */

.beliefs {
  padding-block: clamp(3rem, 7vw, 4.5rem) clamp(4rem, 9vw, 7rem);
}

.belief-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.belief {
  padding-top: 1rem;
  border-top: 1px solid var(--rule-strong);
}

.belief__num {
  display: block;
  margin-bottom: 0.6rem;
  font-family: var(--display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.belief h3 {
  margin: 0 0 0.45rem;
  font-family: var(--display);
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.belief p {
  margin: 0;
  line-height: 1.6;
  color: var(--fg-soft);
}

/* -------------------------------------------------------------
   Footer
   ------------------------------------------------------------- */

.site-footer {
  padding-block: 3rem 1.75rem;
  background: var(--bg-sunk);
  border-top: 1px solid var(--rule);
  font-size: 0.95rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
}

.site-footer__about p {
  max-width: 22rem;
  margin: 0.9rem 0 0;
  color: var(--muted);
}

.site-footer__label {
  margin: 0 0 0.8rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-footer ul {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer ul a,
.site-footer__base a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-footer ul a:hover,
.site-footer__base a:hover {
  border-bottom-color: var(--accent);
}

.site-footer__base {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--muted);
}
.site-footer__base p {
  margin: 0;
}

/* -------------------------------------------------------------
   App pages: breadcrumb, policies, also-from
   ------------------------------------------------------------- */

.crumbs {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-block: 1.1rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.crumbs::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  background: var(--accent);
}
.crumbs a {
  color: var(--muted);
  text-decoration: none;
}
.crumbs a:hover {
  color: var(--fg);
}
.crumbs__sep {
  color: var(--rule-strong);
}
.crumbs [aria-current] {
  color: var(--fg);
}

.policies {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  padding-block: clamp(3rem, 7vw, 5rem);
}

.policies h2 {
  margin: 0 0 0.9rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.75rem, 3.2vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.policies__intro {
  max-width: 28rem;
  color: var(--fg-soft);
}
.policies__intro a {
  font-weight: 600;
  color: var(--fg);
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

.policy-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--rule);
}

.policy-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 1rem;
  padding-block: 1.1rem;
  border-top: 1px solid var(--rule);
  text-decoration: none;
  color: var(--fg);
}
.policy-list li:first-child a {
  border-top-color: var(--fg);
}

.policy-list__label {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color 0.2s;
}

.policy-list__url {
  font-size: 0.85rem;
  color: var(--muted);
}

.policy-list .icon {
  width: 1rem;
  height: 1rem;
  color: var(--accent);
  transition: transform 0.3s var(--ease);
}

.policy-list a:hover .policy-list__label {
  color: var(--accent);
}
.policy-list a:hover .icon {
  transform: translate(2px, -2px);
}

.also {
  padding-block: clamp(2.5rem, 6vw, 4rem);
  background: var(--bg-sunk);
  border-top: 1px solid var(--rule);
}

/* -------------------------------------------------------------
   BookBright section (comic-soft)
   ------------------------------------------------------------- */

.bb {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 7vw, 5.5rem);
  background-color: var(--bb-cream);
  background-image:
    radial-gradient(ellipse 70% 380px at 75% 0%, rgba(255, 101, 132, 0.14), rgba(255, 248, 231, 0)),
    radial-gradient(rgba(26, 26, 46, 0.05) 1px, rgba(26, 26, 46, 0) 1.3px);
  background-size: auto, 13px 13px;
  border-block: 2px solid var(--bb-ink);
  color: var(--bb-ink);
  font-family: var(--bb-font);
}

.bb__grid,
.rr__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.bb__title {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.1rem);
  margin: 0;
  font-family: var(--bb-display);
  font-weight: 400;
  font-size: clamp(3.2rem, 8vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: 0.04em;
}

.bb__title img {
  width: clamp(3.4rem, 8vw, 5rem);
  border: 2px solid var(--bb-ink);
  border-radius: 22%;
  box-shadow: 3px 3px 0 rgba(26, 26, 46, 0.9);
}

.bb__title-text {
  position: relative;
}
.bb__title-text::after {
  content: "";
  position: absolute;
  left: 0.04em;
  bottom: -0.14em;
  width: 2.1em;
  height: 0.1em;
  border-radius: 999px;
  background: var(--bb-pink);
  transform: rotate(-1.5deg);
}

.bb__tagline {
  margin: 1.6rem 0 1rem;
  font-weight: 600;
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  line-height: 1.3;
  color: var(--bb-purple-dark);
}

.bb__body {
  max-width: 36rem;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--bb-ink-soft);
}

.bb__facts,
.rr__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.75rem 0 2rem;
  padding: 0;
  list-style: none;
}

.bb-card {
  position: relative;
  overflow: hidden;
  padding: 1.1rem 1rem 1rem;
  background: #fff;
  border: 2px solid var(--bb-ink);
  border-radius: 1rem;
  box-shadow: var(--bb-shadow);
}
.bb-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: var(--accent-bar, var(--bb-purple));
}

.bb-card h3 {
  margin: 0.2rem 0 0.35rem;
  font-family: var(--bb-display);
  font-weight: 400;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.bb-card p {
  margin: 0;
  font-size: 0.97rem;
  line-height: 1.45;
  color: var(--bb-ink-soft);
}

.bb__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.5rem 0.65rem;
  font-family: var(--bb-display);
  font-size: 1.55rem;
  letter-spacing: 0.06em;
  line-height: 1;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(180deg, #8b5cf6 0%, #7c3aed 55%, #6d28d9 100%);
  border: 2px solid var(--bb-ink);
  border-radius: 1rem;
  box-shadow: 3px 3px 0 rgba(26, 26, 46, 0.9), 0 10px 18px rgba(124, 58, 237, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.bb__btn .icon {
  width: 1.2rem;
  height: 1.2rem;
  stroke-width: 2.75;
}
.bb__btn:hover {
  transform: translate(-1px, -2px);
  box-shadow: 5px 5px 0 rgba(26, 26, 46, 0.9), 0 14px 22px rgba(124, 58, 237, 0.32);
}
.bb__btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 rgba(26, 26, 46, 0.9);
}
.bb__btn:focus-visible {
  outline-color: var(--bb-purple);
  border-radius: 1rem;
}

.bb__platforms {
  margin: 0.9rem 0 0;
  font-size: 0.97rem;
  color: var(--bb-muted);
}

.bb__shot {
  position: relative;
  justify-self: center;
  width: min(100%, 19rem);
  margin: 0;
  transform: rotate(2.5deg);
  animation: tilt-in 1s 0.2s var(--ease) both;
}

.bb__shot img {
  width: 100%;
  background: #fff;
  border: 2px solid var(--bb-ink);
  border-radius: 1.75rem;
  box-shadow: 6px 6px 0 rgba(26, 26, 46, 0.9), 0 26px 44px rgba(26, 26, 46, 0.18);
}

.bb__sticker {
  position: absolute;
  bottom: 24%;
  left: -1.6rem;
  z-index: 1;
  padding: 0.4rem 0.8rem 0.3rem;
  font-family: var(--bb-display);
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  color: var(--bb-ink);
  background: var(--bb-gold);
  border: 2px solid var(--bb-ink);
  border-radius: 0.8rem;
  box-shadow: 2px 2px 0 rgba(26, 26, 46, 0.9);
  transform: rotate(-9deg);
}

/* -------------------------------------------------------------
   RealReady section
   ------------------------------------------------------------- */

.rr {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 7vw, 5.5rem);
  background:
    radial-gradient(ellipse 55% 75% at 82% 45%, rgba(33, 158, 188, 0.3), rgba(33, 158, 188, 0) 70%),
    linear-gradient(180deg, var(--rr-navy) 0%, var(--rr-navy-deep) 100%);
  color: #fff;
  font-family: var(--rr-font);
}

.rr__title {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.1rem);
  margin: 0;
  font-family: var(--rr-display);
  font-weight: 700;
  font-size: clamp(3rem, 7.5vw, 5.2rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.rr__title img {
  width: clamp(3.4rem, 7vw, 4.6rem);
  border-radius: 22%;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
}

.rr__title em {
  font-style: normal;
  color: var(--rr-orange);
}

.rr__tagline {
  margin: 1.6rem 0 1rem;
  font-family: var(--rr-display);
  font-weight: 500;
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  line-height: 1.3;
  color: var(--rr-teal-light);
}

.rr__body {
  max-width: 36rem;
  font-size: 1.1rem;
  line-height: 1.65;
  color: #cbd8e3;
}

.rr-card {
  padding: 1.1rem 1rem 1.05rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(142, 202, 230, 0.22);
  border-radius: 12px;
}

.rr-card__icon {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 8px;
  background: rgba(33, 158, 188, 0.2);
  color: var(--rr-teal-light);
}
.rr-card__icon .icon {
  width: 1.15rem;
  height: 1.15rem;
}

.rr-card h3 {
  margin: 0.75rem 0 0.3rem;
  font-family: var(--rr-display);
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.25;
  color: #fff;
}

.rr-card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #a9bccb;
}

.rr__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.6rem;
  font-family: var(--rr-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--rr-navy);
  text-decoration: none;
  background: var(--rr-orange);
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(255, 183, 3, 0.3);
  transition: background 0.2s, transform 0.2s var(--ease);
}
.rr__btn .icon {
  width: 1.15rem;
  height: 1.15rem;
  stroke-width: 2.5;
}
.rr__btn:hover {
  background: var(--rr-orange-deep);
  transform: translateY(-1px);
}
.rr__btn:focus-visible {
  outline-color: var(--rr-orange);
  border-radius: 8px;
}

.rr__platforms {
  margin: 0.9rem 0 0;
  font-size: 0.97rem;
  color: #94a3b8;
}

.rr__shot {
  position: relative;
  isolation: isolate;
  justify-self: center;
  width: min(100%, 18rem);
  margin: 0;
  animation: rise 1s 0.2s var(--ease) both;
}

.rr__shot img {
  width: 100%;
  border-radius: 2rem;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.06), 0 34px 60px rgba(0, 0, 0, 0.4);
}

/* A progress ring behind the phone, like the one on the app's home screen. */
.rr__ring {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: -1;
  width: 165%;
  max-width: none;
  transform: translate(-50%, -50%) rotate(-90deg);
}
.rr__ring-track {
  fill: none;
  stroke: rgba(142, 202, 230, 0.13);
  stroke-width: 1.2;
}
.rr__ring-fill {
  fill: none;
  stroke: var(--rr-teal);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-dasharray: 282.7;
  stroke-dashoffset: 104.6;
  animation: ring-draw 1.8s 0.4s var(--ease) both;
}

/* -------------------------------------------------------------
   Documents (privacy, terms, support)
   ------------------------------------------------------------- */

.doc {
  padding-block: clamp(3rem, 7vw, 5rem) clamp(4rem, 9vw, 7rem);
}

.doc__inner {
  max-width: 44rem;
  margin-inline: auto;
}

.doc__header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.doc__title {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.4rem, 5vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.doc__meta {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.doc__intro {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.6;
}

.doc__body h2 {
  position: relative;
  margin: 2.75rem 0 0.75rem;
  padding-left: 1.125rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.375rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.doc__body h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.48em;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--accent);
}

.doc__body p,
.doc__body li {
  line-height: 1.7;
  color: var(--fg-soft);
}

.doc__body ul {
  margin: 0 0 1em;
  padding: 0;
  list-style: none;
}
.doc__body ul li {
  position: relative;
  margin-bottom: 0.6rem;
  padding-left: 1.5rem;
}
.doc__body ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 0.625rem;
  height: 1px;
  background: var(--brand);
}

.doc__body a,
.doc__intro a {
  font-weight: 500;
  color: var(--fg);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.doc__body a:hover {
  color: var(--accent);
}

.callout {
  margin: 1.25rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--bg-sunk);
  border-left: 3px solid var(--accent);
}
.callout p:last-child {
  margin-bottom: 0;
}

/* Product policy cards on the legal and support pages. */
.brand-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 2rem 0 0.5rem;
}

.brand-card {
  padding: 1.25rem 1.35rem 1.2rem;
}

.brand-card__head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 0.85rem;
}

.brand-card__head img {
  width: 2.5rem;
  height: 2.5rem;
}

.brand-card__name {
  margin: 0;
  line-height: 1;
}

.brand-card p {
  margin: 0 0 0.75rem;
  font-size: 0.97rem;
  line-height: 1.5;
}

.brand-card ul {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.brand-card li a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-underline-offset: 3px;
}
.brand-card li .icon {
  width: 0.8em;
  height: 0.8em;
}

.brand-card--bb {
  background-color: var(--bb-cream);
  background-image: radial-gradient(rgba(26, 26, 46, 0.05) 1px, transparent 1.3px);
  background-size: 13px 13px;
  border: 2px solid var(--bb-ink);
  border-radius: 1rem;
  box-shadow: var(--bb-shadow);
  color: var(--bb-ink);
  font-family: var(--bb-font);
}
.brand-card--bb .brand-card__head img {
  border: 2px solid var(--bb-ink);
  border-radius: 22%;
}
.brand-card--bb .brand-card__name {
  font-family: var(--bb-display);
  font-weight: 400;
  font-size: 1.85rem;
  letter-spacing: 0.04em;
}
.brand-card--bb p {
  color: var(--bb-ink-soft);
}
.brand-card--bb li a {
  font-weight: 600;
  color: var(--bb-purple-dark);
}

.brand-card--rr {
  background: linear-gradient(160deg, var(--rr-navy), var(--rr-navy-deep));
  border-radius: 12px;
  box-shadow: 0 14px 30px -14px rgba(2, 48, 71, 0.6);
  color: #fff;
  font-family: var(--rr-font);
}
.brand-card--rr .brand-card__head img {
  border-radius: 22%;
}
.brand-card--rr .brand-card__name {
  font-family: var(--rr-display);
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: -0.025em;
}
.brand-card--rr .brand-card__name em {
  font-style: normal;
  color: var(--rr-orange);
}
.brand-card--rr p {
  color: #cbd8e3;
}
.brand-card--rr li a {
  font-weight: 500;
  color: var(--rr-teal-light);
}

/* -------------------------------------------------------------
   404 + redirect stubs
   ------------------------------------------------------------- */

.notfound {
  padding-block: clamp(4.5rem, 13vw, 8.5rem);
}
.notfound__code {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(4.5rem, 14vw, 8rem);
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--brand);
}
.notfound h1 {
  margin: 1rem 0 0.75rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.notfound p {
  max-width: 32rem;
  color: var(--fg-soft);
}
.notfound a {
  font-weight: 600;
  color: var(--fg);
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

/* -------------------------------------------------------------
   Motion
   ------------------------------------------------------------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes tile-in-bb {
  from {
    opacity: 0;
    transform: translateY(24px) rotate(-1deg);
  }
  to {
    opacity: 1;
    transform: rotate(-7deg);
  }
}

@keyframes tile-in-rr {
  from {
    opacity: 0;
    transform: translateY(24px) rotate(0deg);
  }
  to {
    opacity: 1;
    transform: rotate(6deg);
  }
}

@keyframes tilt-in {
  from {
    opacity: 0;
    transform: translateY(18px) rotate(-2deg);
  }
  to {
    opacity: 1;
    transform: rotate(2.5deg);
  }
}

@keyframes ring-draw {
  from {
    stroke-dashoffset: 282.7;
  }
  to {
    stroke-dashoffset: 104.6;
  }
}

.rise {
  animation: rise 0.8s var(--ease) both;
}
.d1 { animation-delay: 0.05s; }
.d2 { animation-delay: 0.15s; }
.d3 { animation-delay: 0.25s; }
.d4 { animation-delay: 0.35s; }
.d5 { animation-delay: 0.45s; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* -------------------------------------------------------------
   Responsive
   ------------------------------------------------------------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero__art {
    display: none;
  }

  .bb__grid,
  .rr__grid,
  .policies {
    grid-template-columns: 1fr;
  }
  .bb__shot,
  .rr__shot {
    width: min(72%, 17rem);
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
  .site-footer__about {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .masthead__row {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav {
    gap: 0 1.1rem;
  }

  .app-grid,
  .belief-list,
  .bb__facts,
  .rr__facts,
  .brand-links {
    grid-template-columns: 1fr;
  }

  .app-card {
    min-height: 0;
  }

  .app-card--compact {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .app-card--compact .app-card__links {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem 1.5rem;
  }

  .bb__sticker {
    left: -0.6rem;
  }

  .policy-list__url {
    display: none;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}
