/* ==========================================================================
   PageSpeedHost — design system
   System fonts only, no webfonts, no animation libraries. The site is meant
   to demonstrate the product, so every byte here should earn its place.
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* Palette — warm off-white ground, ink text, deep teal accent */
  --bg: #fbfaf8;
  --surface: #ffffff;
  --surface-2: #f4f2ee;
  --ink: #10161f;
  --ink-muted: #4d5a6a;
  --line: #e4e0d8;
  --line-strong: #d2cdc2;
  --accent: #0d7a63;
  --accent-hover: #0a5f4d;
  --accent-soft: #e9f2ef;
  --accent-contrast: #ffffff;
  --warn-bg: #fdf6e6;
  --warn-line: #e8d5a3;
  --warn-ink: #6b4f13;

  /* Type */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
  --step--1: 0.9375rem;
  --step-0: 1.125rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.35rem, 1.22rem + 0.55vw, 1.6rem);
  --step-3: clamp(1.6rem, 1.38rem + 1vw, 2.1rem);
  --step-4: clamp(2rem, 1.6rem + 1.9vw, 3rem);

  /* Space */
  --space-xs: 0.5rem;
  --space-sm: 0.875rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  --wrap: 74rem;
  --measure: 48rem;
  --radius: 10px;
  --radius-lg: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1418;
    --surface: #151d23;
    --surface-2: #1b242b;
    --ink: #e9eef2;
    --ink-muted: #a2b2be;
    --line: #26313a;
    --line-strong: #35434e;
    --accent: #45c2a3;
    --accent-hover: #6bd3b8;
    --accent-soft: #12241f;
    --accent-contrast: #05201a;
    --warn-bg: #241f12;
    --warn-line: #4a3d1d;
    --warn-ink: #e0c88a;
  }
}

/* --- Reset ------------------------------------------------------------- */

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

body,
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }

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

body {
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); }

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

/* --- Typography -------------------------------------------------------- */

h1, h2, h3, h4 {
  line-height: 1.2;
  letter-spacing: -0.018em;
  font-weight: 650;
  text-wrap: balance;
}

h1 { font-size: var(--step-4); letter-spacing: -0.028em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); letter-spacing: -0.012em; }
h4 { font-size: var(--step-1); }

p, li { text-wrap: pretty; }

.eyebrow {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.lede {
  font-size: var(--step-1);
  color: var(--ink-muted);
  max-width: var(--measure);
}

.muted { color: var(--ink-muted); }
.small { font-size: var(--step--1); }

/* --- Layout ------------------------------------------------------------ */

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

/* Prose sections span the full page width like every other section. The heading
   moves into a left column so the body text can fill the remaining space without
   the line length running long. Collapses to a single column on smaller screens. */
.wrap--narrow { max-width: var(--wrap); }

@media (min-width: 64rem) {
  .wrap--narrow {
    display: grid;
    grid-template-columns: minmax(15rem, 24rem) minmax(0, 1fr);
    column-gap: var(--space-xl);
    align-items: start;
  }
  /* Span every row so a tall heading never stretches the first body row.
     Spanning also gives the heading a full-height grid area to stick within,
     so it tracks alongside the body text while its section is on screen. */
  .wrap--narrow > h2:first-of-type {
    grid-column: 1;
    grid-row: 1 / span 100;
    align-self: start;
    position: sticky;
    top: var(--space-lg);
  }
  /* Only the first h2 takes the left column; any later heading flows in the body. */
  .wrap--narrow > :not(h2:first-of-type) { grid-column: 2; }
  /* First item in the right column aligns with the heading, not below it. */
  .stack.wrap--narrow > :nth-child(2) { margin-top: 0; }
}

.section { padding-block: var(--space-xl); }
.section + .section { padding-top: 0; }
.section--tint {
  background: var(--surface-2);
  border-block: 1px solid var(--line);
  margin-block: var(--space-xl);
  padding-block: var(--space-xl);
}
.section + .section--tint { padding-top: var(--space-xl); }
/* A tinted band directly under the hero uses the hero's own rule as its divider,
   rather than stacking a second border a gap below it. */
.hero + .section--tint { margin-top: 0; border-top: 0; }

.stack > * + * { margin-top: var(--space-md); }
.stack-sm > * + * { margin-top: var(--space-xs); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: var(--space-xs) var(--space-md);
  z-index: 10;
}
.skip-link:focus { left: 0; }

/* --- Header / nav ------------------------------------------------------ */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-lg);
  padding-block: var(--space-md);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 680;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.brand:hover { color: var(--ink); }
.brand__mark { color: var(--accent); flex: none; }

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs) var(--space-md);
  list-style: none;
  padding: 0;
}

.nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: var(--step--1);
  font-weight: 550;
  padding-block: 0.25rem;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* --- Buttons ----------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: inherit;
  font-size: var(--step--1);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

/* A disabled button must look disabled. The onboarding form's submit is
   disabled while no endpoint is wired, and a full-strength button that
   silently does nothing is worse than an obviously unavailable one. */
.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-contrast);
}
.btn--primary:hover { background: var(--accent-hover); color: var(--accent-contrast); }
.btn--primary:disabled:hover { background: var(--accent); }

.btn--secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--secondary:hover { border-color: var(--ink-muted); color: var(--ink); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

/* --- Hero -------------------------------------------------------------- */

.hero {
  padding-block: var(--space-xl) var(--space-lg);
  border-bottom: 1px solid var(--line);
}
.hero__inner { max-width: 54rem; }
.hero h1 { margin-bottom: var(--space-md); }
.hero .lede { font-size: 1.32rem; max-width: 50rem; }
.hero .btn-row { margin-top: var(--space-lg); }

.page-header {
  padding-block: var(--space-lg);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

/* --- Grid / cards ------------------------------------------------------ */

.grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}
.card h3 { margin-bottom: var(--space-xs); }
.card p { color: var(--ink-muted); }

/* --- Lists ------------------------------------------------------------- */

.list-check,
.list-x {
  list-style: none;
  padding: 0;
}
.list-check li,
.list-x li {
  position: relative;
  padding-left: 1.7rem;
  margin-bottom: 0.6rem;
}
.list-check li::before,
.list-x li::before {
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
}
.list-check li::before { content: "\2713"; color: var(--accent); }
.list-x li::before { content: "\2013"; color: var(--ink-muted); }

.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
}
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 3.25rem;
  padding-bottom: var(--space-lg);
  border-left: 1px solid var(--line);
  margin-left: 1rem;
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: -1rem;
  top: -0.15rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--line);
  font-size: var(--step--1);
  font-weight: 700;
}
.steps h3 { margin-bottom: 0.25rem; }
/* Steps run the full page width, so cap the text itself for readability. */
.steps h3, .steps p { max-width: 46rem; }
.steps p { color: var(--ink-muted); }

/* --- Plans ------------------------------------------------------------- */

.plan-grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  max-width: 38rem; /* one plan sits centred; widens automatically as plans are added */
  margin-inline: auto;
}
.plan-grid:has(> :nth-child(2)) { max-width: none; }

.plan {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md) var(--space-md);
}
.plan__price {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-block: var(--space-sm) 0.25rem;
}
.plan__amount {
  font-size: 3rem;
  font-weight: 680;
  letter-spacing: -0.04em;
  line-height: 1;
}
.plan__interval { color: var(--ink-muted); font-size: var(--step--1); }
.plan .btn { width: 100%; margin-block: var(--space-md); }
.plan__divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin-block: var(--space-md);
}

/* --- FAQ (details/summary, no JS) -------------------------------------- */

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  padding-block: var(--space-sm);
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--accent);
  font-weight: 700;
  flex: none;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details > *:not(summary) { color: var(--ink-muted); }
.faq details > *:not(summary) + *:not(summary) { margin-top: var(--space-sm); }
.faq details > *:last-child { padding-bottom: var(--space-md); }

/* --- Callouts ---------------------------------------------------------- */

.note {
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: var(--space-sm) var(--space-md);
}

.placeholder-note {
  background: var(--warn-bg);
  border: 1px dashed var(--warn-line);
  color: var(--warn-ink);
  border-radius: var(--radius);
  padding: var(--space-sm) var(--space-md);
  font-size: var(--step--1);
}
.placeholder-note strong { font-weight: 700; }

.pending {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--warn-bg);
  border: 1px dashed var(--warn-line);
  color: var(--warn-ink);
  border-radius: 4px;
  padding: 0.05em 0.4em;
}

/* --- Forms ------------------------------------------------------------- */

.form { max-width: 38rem; }
.field { margin-bottom: var(--space-md); }
.field label {
  display: block;
  font-weight: 600;
  font-size: var(--step--1);
  margin-bottom: 0.35rem;
}
.field .hint {
  display: block;
  font-weight: 400;
  color: var(--ink-muted);
  font-size: var(--step--1);
  margin-top: -0.2rem;
  margin-bottom: 0.35rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: var(--step-0);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.6rem 0.7rem;
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { border-color: var(--accent); }

.choice {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: var(--step-0);
  font-weight: 400;
  margin-bottom: 0.4rem;
}
.choice input { width: auto; margin-top: 0.4rem; flex: none; }
fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 var(--space-md);
}
legend {
  font-weight: 600;
  font-size: var(--step--1);
  padding: 0;
  margin-bottom: 0.35rem;
}

/* --- Form status (contact) --------------------------------------------- */

.form-status {
  margin-block: var(--space-md) 0;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink-muted);
  font-size: var(--step--1);
  background: var(--surface-2);
  color: var(--ink);
}
.form-status--success { border-left-color: var(--accent); background: var(--accent-soft); }
.form-status--error { border-left-color: var(--warn-line); background: var(--warn-bg); color: var(--warn-ink); }
.form-status--pending { color: var(--ink-muted); }

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

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  margin-top: var(--space-2xl);
  padding-block: var(--space-lg);
  font-size: var(--step--1);
}
.site-footer__cols {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  margin-bottom: var(--space-lg);
}
.site-footer h2 {
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--space-xs);
}
.site-footer ul { list-style: none; padding: 0; }
.site-footer li { margin-bottom: 0.3rem; }
.site-footer a { color: var(--ink-muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.site-footer__bottom {
  border-top: 1px solid var(--line);
  padding-top: var(--space-md);
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
  justify-content: space-between;
}
.site-footer__disclosure { max-width: 42rem; }

/* --- Utilities --------------------------------------------------------- */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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