/* Clapcake landing page.
   Tokens and component rules are taken from falcon.com (home.css, graphics.css).
   The page ships dark only, using falcon's dark-theme values. Clapcake inherits
   falcon's neutrals and its one accent (red); to give Clapcake its own accent later,
   change only the --red-* values below. */

/* Instrument Sans 400/500/600, latin. SIL OFL: fonts/OFL.txt. */
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-sans-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/instrument-sans-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/instrument-sans-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;

  /* Neutrals */
  --surface: #0f0f12;
  --surface-low: #121215;
  --surface-band: #141417;
  --surface-high: #1c1c21;
  --line: #2a2a30;
  --line-strong: #3a3a40;
  --text: #fafafa;
  --text-muted: #a1a1aa;

  /* Accent scale */
  --red-900: #ff8278;
  --red-700: #b42328;
  --red-600: #f4615a;
  --red-500: #c32f34;
  --red-400: #e5534b;
  --red-200: #5c2a2d;
  --red-100: #2e1517;
  --red-50: #241113;
  --warm-600: #a89896;
  --warm-300: #4a3d3c;

  /* Roles */
  --primary: var(--red-600);
  --primary-strong: var(--red-900);
  --fill: var(--red-500);
  --fill-strong: #d23a3f;
  --on-primary: #ffffff;
  --primary-container: var(--red-50);
  --on-primary-container: var(--red-900);
  --primary-line: var(--red-200);
  --accent-line: var(--red-400);
  --av-1: var(--red-700);

  /* "Coming next" marker */
  --next-bg: #2a2408;
  --next-text: #fde047;
  --next-line: #5c4f0c;

  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.35);
  --shadow-lift: 0 2px 4px rgb(0 0 0 / 0.3), 0 16px 40px rgb(0 0 0 / 0.45);
  --radius: 14px;
  --font: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --wrap: 72rem;
}

/* ---------- Base ---------- */
*, ::before, ::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-strong); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
p { text-wrap: pretty; }
section[id] { scroll-margin-top: 1rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .wrap { padding: 0 2rem; } }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  padding: 0.5rem 1rem; border-radius: 8px;
  background: var(--fill); color: var(--on-primary); text-decoration: none;
}
.skip:focus { top: 1rem; color: var(--on-primary); }

/* ---------- Header ---------- */
.top { border-bottom: 1px solid var(--line); background: var(--surface); }
.top-row { display: flex; align-items: center; gap: 0.75rem; min-height: 4rem; }
@media (min-width: 480px) { .top-row { gap: 1.5rem; } }
.top-row a { white-space: nowrap; }
.logo {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--text); text-decoration: none;
  font-weight: 600; font-size: 1.1875rem; letter-spacing: -0.01em;
}
.logo:hover { color: var(--text); }
.logo span { line-height: 1; }
.logo img { display: block; width: auto; height: 32px; }
.logo-small { font-size: 1.0625rem; }
.logo-small img { height: 24px; }
.top-nav { display: none; gap: 1.75rem; margin-left: auto; font-size: 0.9375rem; }
.top-nav a { color: var(--text-muted); text-decoration: none; }
.top-nav a:hover { color: var(--text); }
.top-cta { margin-left: auto; }
@media (min-width: 880px) {
  .top-nav { display: flex; }
  .top-cta { margin-left: 0.5rem; }
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0 1.375rem; border-radius: 999px;
  background: var(--fill); color: var(--on-primary);
  font-weight: 600; text-decoration: none;
  transition: background-color 0.15s;
}
.btn:hover { background: var(--fill-strong); color: var(--on-primary); }
.btn-small { min-height: 2.5rem; padding: 0 1rem; font-size: 0.9375rem; }
.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow::after { content: " →"; }
.link-arrow:hover { text-decoration: underline; }

/* ---------- Type ---------- */
.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--on-primary-container);
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}
h1 { margin: 0 0 1.25rem; font-size: clamp(2.25rem, 5.5vw, 3.25rem); line-height: 1.05; letter-spacing: -0.035em; }
h2 { margin: 0 0 1rem; font-size: clamp(1.875rem, 4vw, 2.625rem); line-height: 1.12; }
h3 { margin: 0 0 0.5rem; font-size: 1.125rem; line-height: 1.3; letter-spacing: -0.01em; }
.lede {
  margin: 0 0 2rem; max-width: 34rem;
  color: var(--text-muted); font-size: clamp(1.125rem, 2vw, 1.3125rem); line-height: 1.55;
}
.section-lede { margin: 0 0 2.75rem; max-width: 44rem; color: var(--text-muted); font-size: 1.125rem; }
.note { margin: 1.5rem 0 0; color: var(--text-muted); font-size: 0.9375rem; }

/* ---------- Sections ---------- */
section { padding: 4.5rem 0; }
@media (min-width: 960px) { section { padding: 6rem 0; } }
.band { background: var(--surface-band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.hero { padding: 3.5rem 0 4rem; }
.hero-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 960px) {
  .hero { padding: 5.5rem 0 6rem; }
  .hero-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
}
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; }

.split { display: grid; gap: 2.5rem; }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 4rem; align-items: start; }
}
.split .section-lede { margin-bottom: 2rem; }

/* ---------- Figures & animated SVG ---------- */
.fig, .hero-graphic { margin: 0; }
.fig h3 { margin-bottom: 1.25rem; font-size: 1.25rem; }
.fig figcaption { margin-top: 1.25rem; color: var(--text-muted); font-size: 0.9875rem; }
.graphic { display: block; width: 100%; max-width: 30rem; height: auto; margin: 0 auto; overflow: visible; }
.hero-graphic .graphic { max-width: 22rem; }
.hero-graphic figcaption {
  max-width: 22rem; margin: 1rem auto 0;
  color: var(--text-muted); font-size: 0.9375rem; text-align: center;
}

/* Pause control (WCAG 2.2.2). Pausing shows the final frame, same as reduced motion. */
.motion-toggle {
  display: block; min-height: 2rem; margin: 0.75rem auto 0; padding: 0 0.875rem;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); color: var(--text-muted);
  font: 500 0.8125rem/1 var(--font); cursor: pointer;
}
.fig .motion-toggle { margin-left: 0; }
.motion-toggle:hover { color: var(--text); }
@media (prefers-reduced-motion: reduce) { .motion-toggle { display: none; } }
.anim.is-still .graphic * { animation: none !important; }
.anim.is-offscreen .graphic * { animation-play-state: paused !important; }

/* ---------- Lists ---------- */
.points { margin: 0; padding: 0; list-style: none; }
.points li {
  position: relative; padding: 0.625rem 0 0.625rem 1.25rem;
  border-top: 1px solid var(--line); color: var(--text-muted); font-size: 0.9875rem;
}
.points li::before {
  content: ""; position: absolute; left: 0; top: 1.2rem;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent-line);
}
.points strong { color: var(--text); font-weight: 600; }

/* Numbered steps (falcon .bridges, one column) */
.steps { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li {
  counter-increment: step; position: relative;
  padding: 1.25rem 1.5rem 1.25rem 4.25rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.steps li::before {
  content: counter(step); position: absolute; left: 1.5rem; top: 1.25rem;
  display: grid; place-items: center; width: 1.875rem; height: 1.875rem; border-radius: 50%;
  background: var(--primary-container); color: var(--on-primary-container);
  font-size: 0.875rem; font-weight: 600;
}
.steps h3 { margin: 0.125rem 0 0.25rem; }
.steps p { margin: 0; color: var(--text-muted); font-size: 0.9875rem; }
.steps .result { border-color: var(--fill); }
.steps .result::before { background: var(--fill); color: var(--on-primary); }

/* ---------- Cards ---------- */
.cards { display: grid; gap: 1rem; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } }
h2 + .cards { margin-top: 2.25rem; }
.card {
  display: flex; flex-direction: column; padding: 1.5rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.card h3::before {
  content: ""; display: block; width: 1.75rem; height: 3px; margin-bottom: 1rem;
  border-radius: 2px; background: var(--accent-line);
}
.card p { margin: 0; color: var(--text-muted); font-size: 0.9875rem; }

.tag {
  display: inline-block; padding: 0.125rem 0.625rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface-high);
  color: var(--text-muted); font-size: 0.8125rem; font-weight: 500; line-height: 1.5; white-space: nowrap;
}
.tag-next { border-color: var(--next-line); background: var(--next-bg); color: var(--next-text); }

/* Pilot proof row */
.proof {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem;
  margin: 2.5rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--line);
  color: var(--text-muted); font-size: 0.9875rem;
}
.proof strong { color: var(--text); font-weight: 600; }

/* ---------- Site widget preview ---------- */
/* The stage stands in for a customer's page (Aftermarket runs on Paces), so it uses Paces colours. */
.widget-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.widget-head h3 { margin: 0; font-size: 1.25rem; }
.theme-switch { display: inline-flex; padding: 3px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); }
.theme-switch button {
  min-height: 2rem; padding: 0 0.875rem; border: 0; border-radius: 999px; background: none;
  color: var(--text-muted); font: 500 0.8125rem/1 var(--font); cursor: pointer;
}
.theme-switch button[aria-pressed="true"] { background: var(--surface-high); color: var(--text); }
.widget-stage {
  --host-bg: #17181e; --host-card: #1e1f27; --host-line: #293036; --host-text: #aab8c5; /* Paces dark */
  position: relative; height: 620px; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--host-bg); box-shadow: var(--shadow);
}
.widget-stage[data-theme="light"] { --host-bg: #f6f7fb; --host-card: #ffffff; --host-line: #e7e9eb; --host-text: #4c4c5c; } /* Paces light */
.host { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 14px; font-family: "Nunito", sans-serif; }
.host-bar {
  display: flex; align-items: center; gap: 24px; height: 48px; padding: 0 16px;
  background: var(--host-card); border-bottom: 1px solid var(--host-line); color: var(--host-text); font-size: 13px;
}
.host-brand { font-weight: 700; }
.host-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0 16px; }
.host-cards span, .host-table span { display: block; background: var(--host-card); }
.host-cards span { height: 72px; border-radius: 4px; }
.host-table { display: flex; flex-direction: column; gap: 1px; margin: 0 16px; border-radius: 4px; overflow: hidden; background: var(--host-line); }
.host-table span { height: 40px; }

/* ---------- Closing & footer ---------- */
.closing { border-top: 1px solid var(--line); background: var(--primary-container); }
.closing-inner { text-align: center; }
.closing h2 { color: var(--text); }
.closing p { margin: 0 auto 2rem; max-width: 34rem; color: var(--text-muted); font-size: 1.125rem; }

.foot { border-top: 1px solid var(--line); padding: 2rem 0 2.5rem; color: var(--text-muted); font-size: 0.9375rem; }
.foot-row {
  display: grid; grid-template-columns: auto auto; grid-template-areas: "logo copy" "nav nav";
  justify-content: space-between; align-items: center; gap: 0.75rem 2rem;
}
.foot-row .logo { grid-area: logo; justify-self: start; }
.foot-nav { grid-area: nav; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.foot-nav a { color: var(--text-muted); }
.foot-nav a:hover { color: var(--primary); }
.copy { grid-area: copy; justify-self: end; margin: 0; white-space: nowrap; font-size: 0.8125rem; }
@media (min-width: 961px) {
  .foot-row { grid-template-columns: auto 1fr auto; grid-template-areas: "logo nav copy"; }
  .foot-nav { justify-content: flex-end; margin-left: auto; }
}
@media (max-width: 720px) {
  .foot-row { grid-template-columns: 1fr; grid-template-areas: "logo" "nav" "copy"; justify-content: stretch; align-items: start; }
  .foot-nav { gap: 0 0.75rem; }
  .foot-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; }
  .copy { justify-self: start; white-space: normal; }
}
