/* Automations — design language matched to Linear marketing
   Near-black canvas · lavender accent · hairline surfaces · Inter */

:root {
  color-scheme: dark;

  --primary: #5e6ad2;
  --primary-hover: #828fff;
  --primary-focus: #5e69d1;
  --on-primary: #ffffff;

  --ink: #f7f8f8;
  --ink-muted: #d0d6e0;
  --ink-subtle: #8a8f98;
  --ink-tertiary: #62666d;

  --canvas: #010102;
  --surface-1: #0f1011;
  --surface-2: #141516;
  --surface-3: #18191a;
  --surface-4: #191a1b;

  --hairline: #23252a;
  --hairline-strong: #34343a;
  --hairline-tertiary: #3e3e44;

  --success: #27a644;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;

  --max: 1120px;
  --narrow: 680px;
  --header-h: 56px;
  --section: clamp(4.5rem, 10vw, 6rem);
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.05px;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--primary-hover);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

a:hover {
  color: #a4adff;
}

:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary-focus) 50%, transparent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 1000;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--canvas);
  border-radius: var(--r-md);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

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

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.container.narrow {
  width: min(100% - 2rem, var(--narrow));
}

/* Header — Linear top-nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: auto;
  background: rgba(1, 1, 2, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--hairline);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.logo:hover {
  color: var(--ink);
}

.logo-mark {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--primary);
  position: relative;
  flex-shrink: 0;
}

.logo-mark::after {
  content: "";
  position: absolute;
  inset: 5px 4px 5px 7px;
  border-radius: 1.5px;
  background: rgba(255, 255, 255, 0.92);
}

.nav {
  display: none;
  align-items: center;
  gap: 4px;
}

.nav > a:not(.btn) {
  color: var(--ink-subtle);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--r-md);
  transition: color 0.15s ease, background 0.15s ease;
}

.nav > a:not(.btn):hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.nav .btn {
  margin-left: 8px;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--surface-1);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 14px;
  height: 1.5px;
  margin-inline: auto;
  background: var(--ink);
  transition: transform 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.25px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 16px 16px;
  border-bottom: 1px solid var(--hairline);
  background: var(--canvas);
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav a {
  padding: 10px 10px;
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--r-md);
}

.mobile-nav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

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

  .nav-toggle,
  .mobile-nav {
    display: none !important;
  }
}

/* Buttons — Linear compact 8px radius */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  min-height: 36px;
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-sm {
  min-height: 32px;
  padding: 6px 12px;
  font-size: 13px;
}

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

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

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

.btn-secondary {
  background: var(--surface-1);
  color: var(--ink);
  border-color: var(--hairline);
}

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

/* Hero */
.hero {
  padding: clamp(4rem, 12vw, 7rem) 0 clamp(3.5rem, 9vw, 5.5rem);
}

.hero-inner {
  max-width: 44rem;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2.5rem, 7.5vw, 4.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.hero-lede {
  margin: 0 0 28px;
  max-width: 34rem;
  font-size: clamp(1.05rem, 2vw, 1.125rem);
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--ink-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Sections */
.section {
  padding: var(--section) 0;
}

.section-intro {
  max-width: 38rem;
  margin-bottom: 32px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.4px;
  color: var(--ink-subtle);
}

.section-intro h2,
.cta-copy h2,
.legal-page h1 {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.section-lede {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-muted);
}

/* Pillars — Linear "Fig 0.n" feature cards */
.pillar-grid {
  display: grid;
  gap: 12px;
}

@media (min-width: 800px) {
  .pillar-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
}

.pillar {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.pillar:hover {
  background: var(--surface-2);
  border-color: var(--hairline-strong);
}

.fig {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-tertiary);
  letter-spacing: 0;
}

.pillar h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
}

.pillar p:last-child {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-subtle);
}

/* Products — stacked charcoal panels */
.product-stack {
  display: grid;
  gap: 12px;
}

@media (min-width: 800px) {
  .product-stack {
    grid-template-columns: repeat(3, 1fr);
  }
}

.product-panel {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.product-panel:hover {
  background: var(--surface-2);
  border-color: var(--hairline-strong);
}

.product-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.mono-id {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-tertiary);
  letter-spacing: 0.02em;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 9999px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

.badge-progress {
  color: #b8c0ff;
  border-color: color-mix(in srgb, var(--primary) 35%, var(--hairline));
  background: color-mix(in srgb, var(--primary) 12%, var(--surface-2));
}

.product-panel h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
}

.product-panel > p:not(.product-area) {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-subtle);
  flex: 1;
}

.product-area {
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
  font-size: 12px;
  color: var(--ink-tertiary);
  font-weight: 500;
}

/* Approach */
.approach-panel {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  overflow: hidden;
}

.approach-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.approach-list li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  padding: 24px;
  border-bottom: 1px solid var(--hairline);
  transition: background 0.15s ease;
}

.approach-list li:last-child {
  border-bottom: none;
}

.approach-list li:hover {
  background: var(--surface-2);
}

.approach-list .step {
  padding-top: 2px;
  color: var(--primary);
}

.approach-list h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.approach-list p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-subtle);
}

@media (min-width: 860px) {
  .approach-list {
    grid-template-columns: 1fr 1fr;
  }

  .approach-list li:nth-child(odd) {
    border-right: 1px solid var(--hairline);
  }

  .approach-list li:nth-child(-n + 2) {
    border-bottom: 1px solid var(--hairline);
  }

  .approach-list li:nth-child(n + 3) {
    border-bottom: none;
  }
}

/* CTA banner */
.cta-banner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: 40px 32px;
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
}

.cta-copy {
  max-width: 36rem;
}

.cta-copy p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-muted);
  line-height: 1.55;
}

.cta-copy .mailto {
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.cta-copy .mailto:hover {
  color: var(--primary-hover);
}

@media (min-width: 720px) {
  .cta-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 48px;
  }
}

/* Footer */
.site-footer {
  padding: 64px 0 48px;
  border-top: 1px solid var(--hairline);
}

.footer-inner {
  display: grid;
  gap: 24px;
}

.footer-brand p {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--ink-tertiary);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.footer-links a {
  color: var(--ink-subtle);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-copy {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--ink-tertiary);
}

@media (min-width: 720px) {
  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .footer-copy {
    grid-column: 1 / -1;
  }
}

/* Legal */
.legal-page {
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(4rem, 8vw, 6rem);
}

.legal-updated {
  margin: 0 0 32px;
  font-size: 13px;
  color: var(--ink-tertiary);
}

.legal-page h2 {
  margin: 32px 0 10px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.legal-page p {
  color: var(--ink-muted);
  font-size: 15px;
  line-height: 1.6;
}

.legal-page a {
  font-weight: 500;
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
