/* Crest — web
 *
 * The palette is lifted verbatim from the app's asset catalogue, including the
 * designed dark variants. A marketing site whose blue is one shade off the
 * product's blue reads as a template someone dropped a logo into.
 *
 * The rule the app follows applies here too: the interface stays neutral and
 * saturated colour is reserved for the readiness figure, so the one number the
 * product exists to give you is the only thing competing for attention.
 */

:root {
  --surface: #FBFBFA;
  --surface-elevated: #FFFFFF;
  --ink: #14151A;
  --ink-secondary: #5F6169;
  --ink-tertiary: #9A9CA3;
  --accent: #4C5FD5;
  --accent-soft: #EAECFB;
  --on-accent: #FFFFFF;
  --readiness-high: #1F8A5B;
  --readiness-mid: #C08421;
  --readiness-low: #C6483F;
  --separator: #E4E4DF;

  --measure: 34rem;
  --radius-m: 16px;
  --radius-l: 20px;
  --radius-xl: 28px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #0D0E12;
    --surface-elevated: #181A21;
    --ink: #F4F5F7;
    --ink-secondary: #9CA0AA;
    --ink-tertiary: #6B6F79;
    --accent: #8B96F2;
    --accent-soft: #232742;
    --on-accent: #0D0E12;
    --readiness-high: #45BE8A;
    --readiness-mid: #E0A63C;
    --readiness-low: #E8776C;
    --separator: #2A2D35;
  }
}

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

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* Wide content scrolls inside its own container; the page never does. */
  overflow-x: hidden;
}

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

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

/* ---------- layout ---------- */

.wrap {
  width: 100%;
  max-width: 68rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}

section { padding-block: clamp(3.5rem, 9vw, 6.5rem); }

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

/* ---------- type ---------- */

h1, h2, h3 {
  line-height: 1.15;
  letter-spacing: -0.021em;
  margin: 0 0 0.6em;
  font-weight: 600;
  text-wrap: balance;
}

h1 { font-size: clamp(2.3rem, 6.5vw, 3.9rem); }
h2 { font-size: clamp(1.65rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.13rem; }

p { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: clamp(1.1rem, 2.1vw, 1.32rem);
  color: var(--ink-secondary);
  line-height: 1.5;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  margin-bottom: 1rem;
}

.muted { color: var(--ink-secondary); }
.small { font-size: 0.92rem; }

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 1.06rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: 1.4rem;
  font-size: 0.95rem;
}

.site-header nav a {
  color: var(--ink-secondary);
  text-decoration: none;
}

.site-header nav a:hover { color: var(--ink); }

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

.hero {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: center;
  padding-block: clamp(2.5rem, 7vw, 5rem) clamp(3.5rem, 9vw, 6rem);
}

@media (min-width: 62rem) {
  .hero { grid-template-columns: 1.05fr 0.95fr; }
}

.hero-figure { display: flex; justify-content: center; }

/* ---------- the ring ---------- */

.ring { width: min(19rem, 74vw); height: auto; }

.ring__track {
  fill: none;
  stroke: var(--separator);
  stroke-width: 12;
}

.ring__value {
  fill: none;
  stroke: var(--readiness-high);
  stroke-width: 12;
  stroke-linecap: round;
  /* 2πr for r=88 ≈ 552.9. Offset animates from empty to 91%. */
  stroke-dasharray: 552.9;
  stroke-dashoffset: 552.9;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  animation: fill 1.6s cubic-bezier(0.22, 0.8, 0.3, 1) 0.25s forwards;
}

@keyframes fill { to { stroke-dashoffset: 49.8; } }

.ring__figure {
  fill: var(--ink);
  font-size: 2.9rem;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", system-ui, sans-serif;
  text-anchor: middle;
}

.ring__caption {
  fill: var(--ink-tertiary);
  font-size: 0.82rem;
  text-anchor: middle;
}

@media (prefers-reduced-motion: reduce) {
  .ring__value { animation: none; stroke-dashoffset: 49.8; }
}

/* ---------- buttons ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 52px;
  padding-inline: 1.5rem;
  border-radius: var(--radius-m);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

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

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

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

.btn--quiet {
  color: var(--ink);
  border-color: var(--separator);
  background: var(--surface-elevated);
}

.btn--quiet:hover { border-color: var(--ink-tertiary); }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:active { transform: none; }
}

/* ---------- cards & steps ---------- */

.grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  margin-top: 2.6rem;
}

.card {
  background: var(--surface-elevated);
  border: 1px solid var(--separator);
  border-radius: var(--radius-l);
  padding: 1.6rem;
}

.card h3 { margin-bottom: 0.45rem; }
.card p { color: var(--ink-secondary); font-size: 0.97rem; margin: 0; }

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.9rem;
}

.band {
  background: var(--surface-elevated);
  border-block: 1px solid var(--separator);
}

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

.plans {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  margin-top: 2.6rem;
  align-items: start;
}

.plan {
  background: var(--surface-elevated);
  border: 1px solid var(--separator);
  border-radius: var(--radius-xl);
  padding: 1.9rem;
}

.plan--featured { border-color: var(--accent); border-width: 2px; }

.plan__price {
  font-size: 2.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0.2rem 0 0.15rem;
}

.plan__period { color: var(--ink-tertiary); font-size: 0.93rem; }

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ticks {
  list-style: none;
  margin: 1.3rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
  font-size: 0.97rem;
  color: var(--ink-secondary);
}

.ticks li {
  display: grid;
  grid-template-columns: 1.35rem 1fr;
  align-items: start;
}

.ticks li::before {
  content: "";
  width: 0.85rem;
  height: 0.5rem;
  margin-top: 0.42rem;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

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

.site-footer {
  border-top: 1px solid var(--separator);
  padding-block: 2.5rem 3.5rem;
  color: var(--ink-tertiary);
  font-size: 0.92rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.3rem;
  margin-bottom: 1.1rem;
}

.site-footer a { color: var(--ink-secondary); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ---------- legal pages ---------- */

.legal { padding-block: 3rem 1rem; }
.legal h2 { font-size: 1.28rem; margin-top: 2.6rem; }
.legal h2:first-of-type { margin-top: 2rem; }
.legal ul { padding-left: 1.15rem; color: var(--ink-secondary); }
.legal li { margin-bottom: 0.5rem; }
.legal .updated { color: var(--ink-tertiary); font-size: 0.92rem; }

.callout {
  background: var(--accent-soft);
  border-radius: var(--radius-l);
  padding: 1.4rem 1.6rem;
  margin: 1.8rem 0;
}

.callout p { color: var(--ink); }
