/* Rootio — the public site.
 *
 * Every colour here is transcribed from `../Rootly app/src/theme/colors.ts`,
 * which is itself transcribed from the design handoff. If a value looks wrong,
 * that file is the arbiter, not this one.
 *
 * There is no JavaScript on any of the *public* pages, deliberately: helmet's
 * default CSP allows inline styles but not inline scripts, so a page that
 * needed script would need a CSP exception, and none of them does. The theme
 * follows the OS.
 *
 * `/admin` is the one exception, and it needed no exception to be made. It
 * loads its script from `admin-assets/` — external and same-origin, which
 * `script-src 'self'` already allows — and binds every handler with
 * addEventListener, because `script-src-attr 'none'` forbids an inline
 * `onclick`. The CSP is therefore untouched, which matters: loosening it here
 * would loosen it for the two pages a store reviewer reads. `admin.css`
 * extends this file and defines no colour of its own.
 */

:root {
  color-scheme: light dark;

  /* Accents. These are the brand and do not follow the theme. */
  --pink: #f7b6d6;
  --blue: #a9c6f0;
  --yellow: #f2d45c;
  --green: #9cb55f;
  --lavender: #d9c4f5;
  --red: #e4574b;
  /* The logo tile's red — android.adaptiveIcon.backgroundColor. */
  --brand-red: #f01b20;

  /* Light theme — the handoff's own values. */
  --screen: #fbf3e7;
  --surface: #ffffff;
  --sand: #ede6d8;
  --chip: #f6efe1;
  --ink: #111111;
  --muted: #6b6660;
  --faint: #9a938a;
  --hairline: rgba(0, 0, 0, 0.06);
  --border: rgba(0, 0, 0, 0.1);
  --border-strong: rgba(0, 0, 0, 0.14);
  --primary: #111111;
  --on-primary: #ffffff;
  --brand-strong: #d2497f;
  --brand-surface: #f7b6d6;
  --on-brand-surface: #111111;
  --header-bg: rgba(251, 243, 231, 0.85);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 14px 34px -14px rgba(0, 0, 0, 0.16);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.04), 0 32px 64px -24px rgba(0, 0, 0, 0.28);

  --font-display: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "General Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Warm neutrals rather than grey, so both themes read as one product. */
    --screen: #14120e;
    --surface: #201d17;
    --sand: #2c2820;
    --chip: #26221b;
    --ink: #f7f1e5;
    --muted: #a69f93;
    --faint: #767065;
    --hairline: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.12);
    --border-strong: rgba(255, 255, 255, 0.18);
    --primary: #f7f1e5;
    --on-primary: #14120e;
    --brand-strong: #f7b6d6;
    --brand-surface: #5a3444;
    --on-brand-surface: #f7f1e5;
    --header-bg: rgba(20, 18, 14, 0.85);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 14px 34px -14px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 32px 64px -24px rgba(0, 0, 0, 0.7);
  }
}

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

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

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

body {
  margin: 0;
  background: var(--screen);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.62;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  letter-spacing: -0.035em;
  line-height: 1.06;
  margin: 0;
  font-weight: 700;
}

p {
  margin: 0;
}

::selection {
  background: var(--pink);
  color: #111111;
}

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

.wrap {
  width: min(1140px, 100% - 44px);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 50;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--screen);
  border-radius: 999px;
}

/* ── Header ───────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--hairline);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.04em;
  flex: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  box-shadow: 0 2px 8px -2px rgba(240, 27, 32, 0.5);
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.16s ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
}

@media (max-width: 860px) {
  .nav .hide-sm {
    display: none;
  }
}

@media (max-width: 560px) {
  .nav {
    gap: 16px;
  }
  .nav .btn {
    padding: 9px 15px;
    font-size: 14px;
  }
}

/* ── Buttons ──────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.16s ease, background 0.16s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}

.btn-primary:hover {
  opacity: 0.88;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--chip);
}

.btn-brand {
  background: var(--pink);
  color: #111111;
}

.btn-brand:hover {
  opacity: 0.9;
}

.btn-onink {
  background: var(--screen);
  color: var(--ink);
}

.btn-onink:hover {
  opacity: 0.9;
}

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

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero {
  padding: clamp(52px, 9vw, 104px) 0 clamp(48px, 7vw, 88px);
  position: relative;
  overflow: hidden;
}

/* A soft pink bloom behind the headline. Decorative only. */
.hero::before {
  content: "";
  position: absolute;
  inset: -30% 40% 40% -20%;
  background: radial-gradient(closest-side, var(--pink), transparent);
  opacity: 0.35;
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

@media (max-width: 900px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px 7px 11px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  box-shadow: var(--shadow);
}

.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 22%, transparent);
}

h1 {
  font-size: clamp(44px, 7.4vw, 82px);
  font-weight: 800;
  margin: 22px 0 0;
}

h1 .accent {
  color: var(--brand-strong);
}

.lede {
  margin-top: 22px;
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--muted);
  max-width: 36ch;
}

@media (max-width: 900px) {
  .lede {
    max-width: 52ch;
  }
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

@media (max-width: 900px) {
  .cta-row {
    justify-content: center;
  }
}

.cta-note {
  margin-top: 18px;
  font-size: 14px;
  color: var(--faint);
}

/* The brand ring — the splash screen's five arcs, which are a conic gradient
   in the design and five SVG arcs in the app because RN has no such thing.
   Here it gets to be the gradient it was drawn as. */

/* Both axes are stated outright rather than left to `aspect-ratio`. The mark is
   a 512px image, and an auto height would take its intrinsic size as the row's
   minimum — which stretches the ring into an ellipse and the logo into a
   letterbox. A definite height also gives `.mark`'s own percentages something
   to resolve against. */
.ring-stage {
  --stage: min(430px, 82vw);
  position: relative;
  width: var(--stage);
  height: var(--stage);
  display: grid;
  place-items: center;
}

.ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from -8deg,
    var(--pink) 0 64deg,
    transparent 64deg 72deg,
    var(--blue) 72deg 136deg,
    transparent 136deg 144deg,
    var(--yellow) 144deg 208deg,
    transparent 208deg 216deg,
    var(--green) 216deg 280deg,
    transparent 280deg 288deg,
    var(--lavender) 288deg 352deg,
    transparent 352deg 360deg
  );
  -webkit-mask: radial-gradient(closest-side, transparent 79%, #000 80%);
  mask: radial-gradient(closest-side, transparent 79%, #000 80%);
  animation: spin 48s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.mark {
  width: 58%;
  height: 58%;
  object-fit: contain;
  align-self: center;
  justify-self: center;
  border-radius: 24%;
  box-shadow: 0 18px 48px -18px rgba(240, 27, 32, 0.7), var(--shadow-lg);
  animation: float 7s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

/* Orbiting chips — the Root / Shelf / Link vocabulary, said once up front. */
.orbit {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.orbit i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  display: inline-block;
}

.orbit-1 {
  top: 5%;
  left: -5%;
}

.orbit-2 {
  top: 45%;
  right: -9%;
}

.orbit-3 {
  bottom: 5%;
  left: 5%;
}

@media (max-width: 480px) {
  .orbit {
    font-size: 12.5px;
    padding: 7px 12px;
  }
  .orbit-1 {
    left: -1%;
  }
  .orbit-2 {
    right: -1%;
  }
}

/* ── Sections ─────────────────────────────────────────────────────────── */

section {
  padding: clamp(56px, 8vw, 104px) 0;
}

.section-head {
  max-width: 58ch;
  margin-bottom: clamp(32px, 4vw, 54px);
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.kicker {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-strong);
  margin-bottom: 14px;
}

h2 {
  font-size: clamp(30px, 4.2vw, 46px);
  font-weight: 800;
}

.section-head p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 18px;
}

/* ── The hierarchy strip ──────────────────────────────────────────────── */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 820px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 28px 26px 30px;
  box-shadow: var(--shadow);
}

.step .num {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--faint);
  letter-spacing: 0.1em;
}

.step h3 {
  font-size: 24px;
  margin: 14px 0 10px;
}

.step p {
  color: var(--muted);
  font-size: 15.5px;
}

.step .swatch {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  color: #111111;
}

.step .swatch svg {
  width: 22px;
  height: 22px;
}

/* ── Feature grid ─────────────────────────────────────────────────────── */

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 1000px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 660px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 28px 26px 30px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card .bubble {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  color: #111111;
}

.card .bubble svg {
  width: 23px;
  height: 23px;
}

.card h3 {
  font-size: 21px;
  margin-bottom: 10px;
}

.card p {
  color: var(--muted);
  font-size: 15.5px;
}

.bg-pink {
  background: var(--pink);
}

.bg-blue {
  background: var(--blue);
}

.bg-yellow {
  background: var(--yellow);
}

.bg-green {
  background: var(--green);
  color: #ffffff;
}

.bg-lavender {
  background: var(--lavender);
}

.bg-red {
  background: var(--red);
  color: #ffffff;
}

/* ── The assistant band ───────────────────────────────────────────────── */

.ask {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(30px, 5vw, 68px);
  align-items: center;
}

@media (max-width: 900px) {
  .ask {
    grid-template-columns: 1fr;
  }
}

.ask-card {
  background: var(--brand-surface);
  color: var(--on-brand-surface);
  border-radius: var(--r-xl);
  padding: 30px;
  box-shadow: var(--shadow-lg);
}

.ask-card .label {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 12px;
}

.ask-card .q {
  font-family: var(--font-display);
  font-size: clamp(21px, 2.4vw, 27px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.22;
}

.answer {
  margin-top: 24px;
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: center;
  color: var(--ink);
}

.answer .fav {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--blue);
  display: grid;
  place-items: center;
  flex: none;
  color: #111111;
}

.answer .fav svg {
  width: 20px;
  height: 20px;
}

.answer .t {
  font-weight: 600;
  font-size: 15.5px;
  line-height: 1.35;
}

.answer .m {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}

.tick {
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
  display: grid;
  gap: 15px;
}

.tick li {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.5;
}

.tick svg {
  width: 21px;
  height: 21px;
  flex: none;
  margin-top: 3px;
  color: var(--green);
}

.tick b {
  color: var(--ink);
  font-weight: 600;
}

/* ── Closing call to action ───────────────────────────────────────────── */

.closer {
  background: var(--ink);
  color: var(--screen);
  border-radius: var(--r-xl);
  padding: clamp(40px, 6vw, 76px) clamp(28px, 5vw, 68px);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.closer h2,
.closer p,
.closer .cta-row {
  position: relative;
}

.closer h2 {
  font-size: clamp(30px, 4.6vw, 52px);
}

.closer p {
  margin: 18px auto 0;
  max-width: 46ch;
  color: color-mix(in srgb, var(--screen) 62%, transparent);
  font-size: 18px;
}

.closer .cta-row {
  justify-content: center;
}

.closer::after {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  right: -90px;
  top: -140px;
  border-radius: 50%;
  background: var(--pink);
  opacity: 0.16;
}

/* ── Footer ───────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: clamp(44px, 6vw, 72px) 0 40px;
  margin-top: clamp(56px, 8vw, 100px);
}

.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 36px;
}

@media (max-width: 820px) {
  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .foot-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.foot-grid p {
  color: var(--muted);
  font-size: 15px;
  margin-top: 14px;
  max-width: 34ch;
}

.foot-col h4 {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 700;
  margin-bottom: 16px;
}

.foot-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 11px;
}

.foot-col a {
  text-decoration: none;
  color: var(--muted);
  font-size: 15px;
  transition: color 0.16s ease;
}

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

.colophon {
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: center;
  justify-content: space-between;
  color: var(--faint);
  font-size: 14px;
}

.colophon .dots {
  display: inline-flex;
  gap: 6px;
}

.colophon .dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

/* ── Legal pages ──────────────────────────────────────────────────────── */

.legal-hero {
  padding: clamp(48px, 7vw, 84px) 0 clamp(24px, 3vw, 40px);
}

.legal-hero h1 {
  font-size: clamp(38px, 5.6vw, 62px);
  margin: 14px 0 0;
}

.legal-hero .meta {
  margin-top: 18px;
  color: var(--muted);
  font-size: 16px;
}

.legal-layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 66px);
  align-items: start;
  padding-bottom: clamp(40px, 6vw, 80px);
}

@media (max-width: 940px) {
  .legal-layout {
    grid-template-columns: 1fr;
  }
}

.toc {
  position: sticky;
  top: 96px;
  border-left: 2px solid var(--hairline);
  padding-left: 18px;
}

@media (max-width: 940px) {
  .toc {
    position: static;
    border-left: 0;
    border-top: 1px solid var(--hairline);
    padding: 22px 0 0;
  }
}

.toc h4 {
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 700;
  margin-bottom: 14px;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.toc a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.4;
  display: block;
  transition: color 0.16s ease;
}

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

.prose {
  max-width: 72ch;
}

.prose h2 {
  font-size: clamp(23px, 2.6vw, 29px);
  margin: 52px 0 16px;
  scroll-margin-top: 96px;
}

.prose h2:first-of-type {
  margin-top: 0;
}

.prose h3 {
  font-size: 19px;
  margin: 30px 0 10px;
}

.prose p,
.prose li {
  color: var(--muted);
  font-size: 16.5px;
}

.prose p {
  margin: 14px 0;
}

.prose ul,
.prose ol {
  margin: 14px 0;
  padding-left: 22px;
  display: grid;
  gap: 9px;
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

.prose a {
  color: var(--brand-strong);
  text-underline-offset: 3px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 15.5px;
}

.prose th,
.prose td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline);
  color: var(--muted);
  vertical-align: top;
}

.prose th {
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.callout {
  background: var(--chip);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 20px 22px;
  margin: 26px 0;
}

.callout p {
  margin: 0;
}

.callout p + p {
  margin-top: 10px;
}

.callout.pink {
  background: color-mix(in srgb, var(--pink) 30%, var(--surface));
  border-color: color-mix(in srgb, var(--pink) 50%, transparent);
}

/* A value that is not the code's to know — a legal entity, an address, a
   jurisdiction. Marked rather than invented, so it cannot ship unnoticed. */
.fill {
  background: color-mix(in srgb, var(--yellow) 46%, transparent);
  color: var(--ink);
  padding: 1px 7px;
  border-radius: 5px;
  font-weight: 600;
  font-style: normal;
}
