/* Hudr's landing page. The tokens are the web app's (web/src/platform/theme/tokens.ts, design
   concept B): zinc neutrals, one indigo accent, Inter, 8px corners, borders instead of shadows.
   No inline styles anywhere: the Content-Security-Policy only allows this file. */

@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/static/inter-latin-wght-normal.3100e775e8.woff2') format('woff2-variations');
}

:root {
  --zinc-50: #fafafa;
  --zinc-100: #f4f4f5;
  --zinc-200: #e4e4e7;
  --zinc-300: #d4d4d8;
  --zinc-400: #a1a1aa;
  --zinc-500: #71717a;
  --zinc-600: #52525b;
  --zinc-700: #3f3f46;
  --zinc-800: #27272a;
  --zinc-900: #18181b;
  --zinc-950: #09090b;
  --indigo-50: #eef2ff;
  --indigo-100: #e0e7ff;
  --indigo-200: #c7d2fe;
  --indigo-300: #a5b4fc;
  --indigo-400: #818cf8;
  --indigo-500: #6366f1;
  --indigo-600: #4f46e5;
  --indigo-700: #4338ca;
  --indigo-800: #3730a3;
  --indigo-900: #312e81;
  --indigo-950: #1e1b4b;

  --bg: #ffffff;
  --bg-subtle: var(--zinc-50);
  --surface: #ffffff;
  --border: var(--zinc-200);
  --border-strong: var(--zinc-300);
  --text: var(--zinc-900);
  --text-2: var(--zinc-600);
  --text-3: var(--zinc-500);
  --accent: var(--indigo-600);
  --accent-hover: var(--indigo-700);
  --accent-soft: var(--indigo-50);
  --accent-border: var(--indigo-100);
  --accent-text: var(--indigo-700);
  --success: #15803d;
  --warning: #b45309;
  --glow: rgb(99 102 241 / 0.16);
  --header-bg: rgb(255 255 255 / 0.82);
  --mock-shadow: 0 24px 60px -24px rgb(49 46 129 / 0.28);

  --radius: 8px;
  --radius-lg: 14px;
  --container: 1120px;
  --gutter: 20px;
  --header-height: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--zinc-950);
    --bg-subtle: #0f0f12;
    --surface: var(--zinc-900);
    --border: var(--zinc-800);
    --border-strong: var(--zinc-700);
    --text: var(--zinc-50);
    --text-2: var(--zinc-400);
    --text-3: var(--zinc-500);
    --accent: var(--indigo-600);
    --accent-hover: var(--indigo-500);
    --accent-soft: rgb(99 102 241 / 0.14);
    --accent-border: rgb(99 102 241 / 0.3);
    --accent-text: var(--indigo-300);
    --success: #4ade80;
    --warning: #fbbf24;
    --glow: rgb(99 102 241 / 0.22);
    --header-bg: rgb(9 9 11 / 0.78);
    --mock-shadow: 0 24px 60px -24px rgb(0 0 0 / 0.7);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    'Inter Variable',
    Inter,
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.narrow {
  max-width: calc(760px + 2 * var(--gutter));
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 20;
  padding: 8px 14px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}

.button .icon {
  width: 18px;
  height: 18px;
  transition: transform 0.15s ease;
}

.button:hover .icon {
  transform: translateX(3px);
}

.button:active {
  transform: translateY(1px);
}

.button-small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 0.9375rem;
}

.button-primary {
  background: var(--accent);
  color: #ffffff;
}

.button-primary:hover {
  background: var(--accent-hover);
}

.button-ghost {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

.button-ghost:hover {
  border-color: var(--text-3);
}

.button-inverse {
  background: #ffffff;
  color: var(--indigo-800);
}

.button-inverse:hover {
  background: var(--indigo-50);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: block;
}

.brand-name {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-nav {
  display: none;
  gap: 4px;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: 0.9375rem;
  font-weight: 500;
  transition:
    color 0.15s ease,
    background-color 0.15s ease;
}

.site-nav a:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 16px;
}

.hero-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 55% at 50% 0%, var(--glow), transparent 70%),
    linear-gradient(var(--border) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--border) 1px, transparent 1px) 0 0 / 56px 56px;
  -webkit-mask-image: radial-gradient(75% 60% at 50% 0%, #000 30%, transparent 100%);
  mask-image: radial-gradient(75% 60% at 50% 0%, #000 30%, transparent 100%);
  opacity: 0.9;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--indigo-500);
}

h1 {
  max-width: 16ch;
  margin-top: 24px;
  font-size: clamp(2.375rem, 7.2vw, 4.25rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.accent {
  color: var(--accent-text);
}

.lead {
  max-width: 62ch;
  margin-top: 22px;
  color: var(--text-2);
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.hero-note {
  margin-top: 16px;
  color: var(--text-3);
  font-size: 0.875rem;
}

/* The product illustration */
.mock {
  position: relative;
  margin-top: 56px;
}

.mock-window {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--mock-shadow);
  font-size: 0.8125rem;
  line-height: 1.4;
  text-align: left;
  user-select: none;
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}

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

.mock-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}

.mock-url {
  flex: 1;
  max-width: 320px;
  margin-inline: auto;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-3);
  font-size: 0.75rem;
  text-align: center;
}

.mock-body {
  display: grid;
  grid-template-columns: 1fr;
}

.mock-side {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 16px 12px;
  border-right: 1px solid var(--border);
  background: var(--bg-subtle);
}

.mock-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 0 8px;
  font-size: 0.9375rem;
  letter-spacing: -0.02em;
}

.mock-group {
  margin-top: 12px;
  padding: 0 8px 4px;
  color: var(--text-3);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mock-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 6px;
  color: var(--text-2);
  font-weight: 500;
}

.mock-nav .icon {
  width: 16px;
  height: 16px;
}

.mock-nav.is-active {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.mock-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 18px;
}

.mock-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
}

.mock-chip {
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-2);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0;
}

.mock-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mock-kpi,
.mock-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.mock-kpi span,
.mock-card-title {
  color: var(--text-3);
  font-size: 0.75rem;
  font-weight: 500;
}

.mock-kpi b {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.mock-kpi em {
  color: var(--text-3);
  font-size: 0.6875rem;
  font-style: normal;
}

.mock-kpi em.up {
  color: var(--success);
  font-weight: 600;
}

.mock-panels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.mock-card {
  gap: 10px;
}

.mock-bars {
  display: flex;
  flex: 1;
  align-items: flex-end;
  gap: 8px;
  min-height: 96px;
}

.bar {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: var(--accent-border);
}

.bar.is-current {
  background: var(--indigo-500);
}

.bar-4 {
  height: 40%;
}

.bar-5 {
  height: 52%;
}

.bar-6 {
  height: 63%;
}

.bar-7 {
  height: 74%;
}

.bar-8 {
  height: 85%;
}

.bar-9 {
  height: 100%;
}

.mock-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  color: var(--text-2);
}

.dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
}

.dot-warn {
  background: var(--warning);
}

.dot-accent {
  background: var(--indigo-500);
}

.dot-ok {
  background: var(--success);
}

.mock figcaption {
  margin-top: 14px;
  color: var(--text-3);
  font-size: 0.8125rem;
  text-align: center;
}

/* Sections */
.section {
  padding: 72px 0;
}

.section-subtle {
  border-block: 1px solid var(--border);
  background: var(--bg-subtle);
}

.section-head {
  max-width: 720px;
  margin-bottom: 40px;
}

.kicker {
  margin-bottom: 12px;
  color: var(--accent-text);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.section-lead {
  margin-top: 16px;
  color: var(--text-2);
  font-size: 1.0625rem;
  text-wrap: pretty;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.card,
.feature {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color 0.2s ease;
}

.card:hover,
.feature:hover {
  border-color: var(--border-strong);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent-text);
}

.card h3 {
  margin-top: 18px;
}

.card p {
  margin-top: 8px;
  color: var(--text-2);
  font-size: 0.9688rem;
}

.feature header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.feature h3 {
  font-size: 1.1875rem;
}

.checks {
  display: grid;
  gap: 10px;
}

.checks li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-2);
  font-size: 0.9688rem;
}

.checks .icon {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  color: var(--accent-text);
  stroke-width: 2.25;
}

/* The chain */
.chain {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  counter-reset: step;
}

.chain-step {
  position: relative;
  padding: 0 0 28px 60px;
}

.chain-step:last-child {
  padding-bottom: 0;
}

/* The line that links one step to the next. */
.chain-step::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 44px;
  bottom: 4px;
  width: 2px;
  border-radius: 2px;
  background: var(--accent-border);
}

.chain-step:last-child::before {
  display: none;
}

.chain-icon {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--accent-border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent-text);
}

.chain-step h3 {
  padding-top: 8px;
}

.chain-step p {
  margin-top: 4px;
  color: var(--text-2);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* Origin */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

.facts {
  display: grid;
  gap: 12px;
}

.facts li {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.facts .icon {
  margin-top: 2px;
  color: var(--accent-text);
}

.facts b {
  display: block;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.facts span {
  display: block;
  margin-top: 2px;
  color: var(--text-2);
  font-size: 0.9375rem;
}

/* FAQ */
.faq {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.faq details + details {
  border-top: 1px solid var(--border);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary .icon {
  color: var(--text-3);
  transition: transform 0.2s ease;
}

.faq details[open] summary .icon {
  transform: rotate(180deg);
}

.faq details p {
  padding: 0 20px 20px;
  color: var(--text-2);
  text-wrap: pretty;
}

/* Closing call to action */
.cta {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  padding: 56px 24px;
  border-radius: 20px;
  background:
    radial-gradient(80% 120% at 50% 0%, rgb(129 140 248 / 0.45), transparent 60%),
    linear-gradient(135deg, var(--indigo-600), var(--indigo-900));
  color: #ffffff;
  text-align: center;
}

.cta-mark {
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.25);
}

.cta h2 {
  max-width: 18ch;
  margin-top: 24px;
}

.cta p {
  max-width: 46ch;
  margin-top: 14px;
  color: var(--indigo-100);
  font-size: 1.0625rem;
}

.cta .button {
  margin-top: 28px;
}

/* Footer */
.site-footer {
  padding: 40px 0 32px;
  border-top: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.9375rem;
}

.footer-row {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer-brand p {
  margin-top: 10px;
}

.footer-brand .brand {
  color: var(--text);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer-nav a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 0.8125rem;
}

/* The 404 page */
.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  padding: 64px 0;
  text-align: center;
}

.not-found .code {
  color: var(--accent-text);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.not-found h1 {
  max-width: none;
  margin-top: 12px;
  font-size: clamp(2rem, 5vw, 3rem);
}

.not-found p {
  margin-top: 14px;
  color: var(--text-2);
}

.not-found .button {
  margin-top: 28px;
}

/* Wider screens */
@media (min-width: 640px) {
  :root {
    --gutter: 32px;
  }

  .hero {
    padding-top: 80px;
  }

  .mock-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .mock-panels {
    grid-template-columns: 1.3fr 1fr;
  }

  .cards-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card,
  .feature {
    padding: 28px;
  }

  .chain {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 32px;
  }

  .footer-row {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }

  .cta {
    padding: 72px 40px;
  }
}

@media (min-width: 860px) {
  .site-nav {
    display: flex;
  }

  .section {
    padding: 104px 0;
  }

  .section-head {
    margin-bottom: 56px;
  }

  .hero {
    padding: 96px 0 32px;
  }

  .mock {
    margin-top: 72px;
  }

  .mock-body {
    grid-template-columns: 208px 1fr;
  }

  .mock-side {
    display: flex;
  }

  .mock-main {
    padding: 24px;
  }

  .cards-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .split {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }

  /* The chain turns into one horizontal line of six steps. */
  .chain {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    column-gap: 20px;
  }

  .chain-step {
    padding: 56px 0 0;
  }

  .chain-step::before {
    left: 48px;
    right: -12px;
    top: 19px;
    bottom: auto;
    width: auto;
    height: 2px;
  }

  .chain-step h3 {
    padding-top: 0;
  }
}

/* Motion: a short entrance for the hero, and sections that rise as they scroll into view where the
   browser supports scroll-driven animations. Nothing moves for people who ask for less motion. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(16px);
    }

    to {
      opacity: 1;
      transform: none;
    }
  }

  .hero-inner > * {
    animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .hero-inner > :nth-child(2) {
    animation-delay: 0.06s;
  }

  .hero-inner > :nth-child(3) {
    animation-delay: 0.12s;
  }

  .hero-inner > :nth-child(4) {
    animation-delay: 0.18s;
  }

  .hero-inner > :nth-child(5) {
    animation-delay: 0.24s;
  }

  .mock {
    animation: rise 0.8s 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button,
  .button .icon {
    transition: none;
  }
}
