/* Self-hosted Afacad. Dark is the fallback; system preference and explicit choices both work. */
@font-face {
  font-family: 'Afacad';
  src: url('/fonts/afacad.woff2') format('woff2-variations');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0e0e0d;
  --panel: #161615;
  --ink: #f2f1ec;
  --ink-2: #b1afa7;
  --ink-3: #929087;
  --rule: #30302c;
  --accent: #69a7f2;
  --s0: #929087;
  --s1: #5298ed;
  --s2: #eb8a60;
  --s3: #56b895;
  --s4: #cfa448;
  --control-rule: #74746c;
  --hover: #22221f;
  --error: #f69a7d;
  --sans: 'Afacad', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --section-space: clamp(56px, 7.5vw, 96px);
  color-scheme: dark;
}

/* Keep these values identical to the explicit light palette below. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) {
    --bg: #fcfcfb;
    --panel: #ffffff;
    --ink: #171715;
    --ink-2: #56564f;
    --ink-3: #68685f;
    --rule: #deded7;
    --accent: #2366b5;
    --s0: #77766b;
    --s1: #2872c9;
    --s2: #bc542c;
    --s3: #227d5c;
    --s4: #936b12;
    --control-rule: #85857a;
    --hover: #f1f1ec;
    --error: #ae3b23;
    color-scheme: light;
  }
}

:root[data-theme='light'] {
  --bg: #fcfcfb;
  --panel: #ffffff;
  --ink: #171715;
  --ink-2: #56564f;
  --ink-3: #68685f;
  --rule: #deded7;
  --accent: #2366b5;
  --s0: #77766b;
  --s1: #2872c9;
  --s2: #bc542c;
  --s3: #227d5c;
  --s4: #936b12;
  --control-rule: #85857a;
  --hover: #f1f1ec;
  --error: #ae3b23;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.wrap {
  max-width: 1104px;
  margin-inline: auto;
  padding-inline: 32px;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
.skip-link {
  position: absolute;
  z-index: 2;
  left: 16px;
  top: 8px;
  padding: 10px 16px;
  color: var(--bg);
  background: var(--ink);
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: none;
}
.skip-link:hover {
  background: var(--ink-2);
}
.skip-link:active {
  background: var(--ink-3);
}

/* Header and shared links */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 96px;
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.035em;
  text-decoration: none;
}
.brand-icon {
  width: 23px;
  height: 23px;
  fill: var(--accent);
}
.header-nav,
.footer-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 16px;
  color: var(--ink-2);
  text-decoration: none;
  text-underline-offset: 5px;
}
.nav-link:hover {
  color: var(--ink);
  text-decoration: underline;
}
.wordmark:hover {
  color: var(--accent);
}
.nav-link:active,
.wordmark:active {
  color: var(--accent);
}
.toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 86px;
  min-height: 44px;
  padding: 8px 12px;
  font: inherit;
  font-size: 15px;
  color: var(--ink-2);
  background: var(--panel);
  border: 1px solid var(--control-rule);
  border-radius: 999px;
  cursor: pointer;
}
.toggle:hover {
  color: var(--ink);
  background: var(--hover);
}
.toggle:active {
  background: var(--rule);
  transform: translateY(1px);
}
.toggle > svg {
  width: 16px;
  height: 16px;
}

/* Hero. Signup reserves the same space for guidance, validation and confirmation. */
.hero {
  padding-block: clamp(56px, 7vw, 88px) clamp(48px, 6vw, 72px);
}
.eyebrow {
  margin: 0 0 16px;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.hero-title {
  margin: 0 0 24px;
  max-width: 18ch;
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.hero-emphasis {
  color: var(--ink-3);
}
.hero-copy {
  max-width: 44ch;
  margin: 0 0 32px;
  font-size: clamp(20px, 2.2vw, 24px);
  line-height: 1.45;
  color: var(--ink-2);
}
.signup {
  position: relative;
  max-width: 456px;
  min-height: 132px;
}
.waitlist,
.joined-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 58px;
  padding: 6px;
  border: 1px solid var(--control-rule);
  background: var(--panel);
  border-radius: 999px;
}
.waitlist {
  padding-left: 20px;
}
.waitlist:hover {
  border-color: var(--ink-2);
}
.waitlist:focus-within {
  border-color: var(--accent);
}
.email-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  padding: 8px 0;
  border: 0;
  border-radius: 4px;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  background: transparent;
}
.email-input::placeholder {
  color: var(--ink-3);
  opacity: 1;
}
.email-input:focus-visible {
  outline-offset: 2px;
}
.join {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 21px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  color: var(--bg);
  background: var(--ink);
  cursor: pointer;
}
.join:hover:not(:disabled) {
  background: var(--ink-2);
}
.join:active:not(:disabled) {
  background: var(--ink-3);
  transform: scale(0.98);
}
.join:disabled {
  color: var(--bg);
  background: var(--ink-3);
  cursor: progress;
}
.form-note,
.joined-sub {
  margin: 12px 0 0 4px;
  color: var(--ink-3);
  font-size: 15px;
  line-height: 1.4;
}
.form-msg {
  margin: 10px 0 0 4px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.4;
}
.form-msg:empty {
  margin: 0;
}
.form-msg[data-state='error'] {
  color: var(--error);
}
.waitlist[hidden],
.joined[hidden],
.form-note[hidden] {
  display: none;
}
.joined-pill {
  gap: 12px;
  animation: joined-in 0.3s ease-out;
}
.joined-badge {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--s3);
  background: var(--hover);
  border-radius: 50%;
}
.joined-tick {
  width: 20px;
  height: 20px;
  stroke-dasharray: 24;
  stroke-dashoffset: 0;
  animation: tick 0.4s ease-out;
}
.joined-title {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
}
@keyframes joined-in {
  from {
    opacity: 0;
  }
}
@keyframes tick {
  from {
    stroke-dashoffset: 24;
  }
}
/* Accessible label and bot field are visually hidden; only the bot field is aria-hidden. */
.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Sample analytics */
.chart-stack {
  display: grid;
  gap: 16px;
  padding-bottom: var(--section-space);
}
.preview-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 8px;
}
.preview-head .eyebrow {
  margin-bottom: 8px;
}
.preview-title {
  margin: 0;
  font-size: 30px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.sample-tag {
  flex: 0 0 auto;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 5px 11px;
  color: var(--ink-3);
  font-size: 13px;
}
.panel {
  min-width: 0;
  padding: 26px;
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--panel);
}
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.panel-title {
  margin: 0;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.meta {
  margin: 4px 0 0;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.4;
}
.panel-stat {
  text-align: right;
  flex-shrink: 0;
}
.headline-figure {
  font-size: 32px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}
.delta {
  margin-top: 4px;
  color: var(--s3);
  font-size: 14px;
}
.trend-frame {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: 180px auto;
  gap: 12px;
  margin-top: 30px;
}
.trend-y {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1;
  transform: translateY(-6px);
}
.trend {
  display: block;
  width: 100%;
  height: 180px;
  overflow: visible;
}
.chart-grid {
  fill: none;
  stroke: var(--rule);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.trend-area {
  fill: var(--s1);
  opacity: 0.08;
}
.trend-line {
  fill: none;
  stroke: var(--s1);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.trend-axis {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  color: var(--ink-3);
  font-size: 13px;
}
.charts {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
}
.chart-label {
  padding-top: 3px;
  color: var(--ink-3);
  font-size: 13px;
}
.model-note {
  margin: 12px 0 24px;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.4;
}
.bars {
  display: grid;
  gap: 18px;
}
.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: baseline;
}
.bar-label {
  color: var(--ink-2);
  font-size: 16px;
}
.bar-value {
  color: var(--ink);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.bar-track {
  display: block;
  grid-column: 1 / -1;
  width: 100%;
  height: 10px;
}
.bar-ground {
  fill: var(--rule);
}
.bar-fill {
  fill: currentColor;
}
.bar-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  color: var(--ink-3);
  font-size: 13px;
}
.series-0 {
  color: var(--s0);
}
.series-1 {
  color: var(--s1);
}
.series-2 {
  color: var(--s2);
}
.series-3 {
  color: var(--s3);
}
.series-4 {
  color: var(--s4);
}
.donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.donut {
  position: relative;
  width: 160px;
  height: 160px;
}
.donut-chart {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.donut-segment {
  fill: none;
  stroke: currentColor;
  stroke-width: 16px;
}
.donut-centre {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.donut-total {
  font-size: 29px;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.donut-caption {
  color: var(--ink-3);
  font-size: 13px;
}
.legend {
  display: grid;
  gap: 7px;
  width: 100%;
}
.legend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--ink-2);
}
.swatch {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: currentColor;
}
.pct {
  margin-left: auto;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.preview-note {
  margin: 6px 0 0;
  text-align: center;
  color: var(--ink-3);
  font-size: 15px;
  line-height: 1.5;
}

/* A quieter editorial layout separates explanation from the product preview. */
.below {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 56px;
  padding-block: var(--section-space);
  border-top: 1px solid var(--rule);
}
.section-title {
  margin: 0 0 16px;
  font-size: clamp(30px, 3vw, 38px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.section-copy {
  margin: 0;
  max-width: 34ch;
  color: var(--ink-3);
  font-size: 18px;
  line-height: 1.5;
}
.points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px 32px;
}
.point-icon {
  display: block;
  width: 25px;
  height: 25px;
  margin-bottom: 16px;
  color: var(--accent);
}
.point-title {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.body-copy {
  margin: 0;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.5;
}
.faq-item {
  border-bottom: 1px solid var(--rule);
}
.faq-item:first-child {
  border-top: 1px solid var(--rule);
}
.faq-question {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 21px 8px;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
  border-radius: 4px;
}
.faq-question::-webkit-details-marker {
  display: none;
}
.faq-question::after {
  content: '+';
  flex-shrink: 0;
  font-size: 22px;
  font-weight: 400;
  color: var(--ink-3);
  line-height: 1;
}
.faq-item[open] > .faq-question::after {
  content: '\2212';
}
.faq-question:hover {
  color: var(--accent);
  background: var(--hover);
}
.faq-question:active {
  background: var(--rule);
}
.faq-item > .body-copy {
  padding: 0 32px 22px 8px;
}

.footer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
  padding-block: 36px 28px;
  border-top: 1px solid var(--rule);
}
.footer-copy {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: 16px;
}
.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink-3);
  font-size: 14px;
}

@media (max-width: 800px) {
  .below {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .section-copy {
    max-width: 46ch;
  }
  .footer {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .charts {
    grid-template-columns: 1fr 1fr;
  }
  .panel {
    padding: 22px;
  }
}
@media (max-width: 640px) {
  .wrap {
    padding-inline: 20px;
  }
  .top {
    min-height: 80px;
    gap: 12px;
  }
  .header-nav {
    gap: 16px;
  }
  .header-nav > .nav-link {
    display: none;
  }
  .hero {
    padding-top: 52px;
  }
  .hero-title {
    font-size: clamp(44px, 9.2vw, 58px);
    max-width: 15ch;
  }
  .hero-eyebrow {
    font-size: 11px;
    letter-spacing: 0.08em;
  }
  .preview-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .preview-title {
    font-size: 28px;
  }
  .charts {
    grid-template-columns: minmax(0, 1fr);
  }
  .panel {
    padding: 20px;
  }
  .headline-figure {
    font-size: 28px;
  }
  .trend-frame {
    grid-template-rows: 160px auto;
    gap: 10px;
    margin-top: 28px;
  }
  .trend {
    height: 160px;
  }
  .points {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .point {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px 16px;
  }
  .point-icon {
    grid-row: 1 / 3;
    margin: 0;
  }
  .point-title {
    margin: 0;
  }
  .point > .body-copy {
    grid-column: 2;
  }
  .faq-question {
    padding-block: 20px;
    font-size: 18px;
  }
  .footer-nav {
    flex-wrap: wrap;
    column-gap: 22px;
    row-gap: 0;
  }
  .footer-bottom {
    font-size: 13px;
  }
  .desktop-break {
    display: none;
  }
}
@media (max-width: 360px) {
  .wrap {
    padding-inline: 16px;
  }
  .join {
    padding-inline: 14px;
    font-size: 15px;
  }
  .waitlist {
    padding-left: 14px;
  }
  .email-input {
    font-size: 16px;
  }
  .panel {
    padding: 16px;
  }
  .panel-title {
    font-size: 18px;
  }
  .delta {
    font-size: 12px;
  }
  .chart-label {
    font-size: 12px;
  }
  .footer-bottom {
    flex-wrap: wrap;
    gap: 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
