:root {
  color-scheme: light;
  --canvas: #f4f6f3;
  --surface: #ffffff;
  --surface-2: #eaf0ed;
  --ink: #101a1d;
  --ink-2: #455357;
  --ink-3: #637175;
  --line: #cbd5d2;
  --line-strong: #9caaa7;
  --brand: #1737c5;
  --brand-strong: #10289b;
  --brand-soft: #dfe5ff;
  --signal: #d94a35;
  --success: #087653;
  --warning: #8b5a00;
  --shadow: 0 24px 70px rgba(20, 39, 42, 0.12);
  --header: rgba(244, 246, 243, 0.88);
  --font-display: "Familjen Grotesk", "Arial Narrow", sans-serif;
  --font-body: "Public Sans", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #0a1214;
  --surface: #101b1e;
  --surface-2: #172528;
  --ink: #f2f6f4;
  --ink-2: #bec9c6;
  --ink-3: #91a09c;
  --line: #2c3d3f;
  --line-strong: #506164;
  --brand: #8fa5ff;
  --brand-strong: #b4c1ff;
  --brand-soft: rgba(116, 143, 255, 0.14);
  --signal: #ff7a5d;
  --success: #62d5aa;
  --warning: #f1c56d;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
  --header: rgba(10, 18, 20, 0.88);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  transition: background-color 180ms ease, color 180ms ease;
}

body,
button,
input,
textarea,
select {
  font-family: var(--font-body);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

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

::selection {
  background: var(--brand);
  color: var(--canvas);
}

:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--canvas);
  font-weight: 800;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: min(1220px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: var(--header);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 26px;
}

.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.brand img {
  width: 36px;
  height: 36px;
}

.primary-nav {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.5vw, 32px);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 650;
}

.primary-nav a {
  border-bottom: 1px solid transparent;
}

.primary-nav a:hover {
  border-color: currentColor;
  color: var(--ink);
}

.header-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
}

.theme-toggle,
.icon-button {
  display: inline-grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}

.theme-toggle:hover,
.icon-button:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.theme-toggle svg {
  width: 19px;
  height: 19px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  padding: 10px 17px;
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  font-weight: 780;
  line-height: 1.2;
  transition: transform 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

.button:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
}

.button-primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

:root[data-theme="dark"] .button-primary {
  color: #0a1214;
}

.button-primary:hover {
  border-color: var(--brand-strong);
  background: var(--brand-strong);
}

.button-text {
  border-color: transparent;
  background: transparent;
}

.button svg {
  width: 17px;
  height: 17px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--brand-strong);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
}

:root[data-theme="dark"] .eyebrow {
  color: var(--brand);
}

.eyebrow::before {
  width: 24px;
  height: 2px;
  background: var(--signal);
  content: "";
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.55fr);
  gap: clamp(30px, 7vw, 100px);
  align-items: end;
}

.section-heading h2 {
  max-width: 760px;
  margin: 16px 0 0;
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 66px);
  font-weight: 680;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.section-heading > p {
  margin: 0;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.65;
}

.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 650ms ease, transform 650ms cubic-bezier(0.2, 0.72, 0.25, 1);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0;
  color: var(--ink-2);
  font-size: 14px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 750;
}

.footer-brand img {
  width: 30px;
  height: 30px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 24px;
}

.footer-links a:hover {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

@media (max-width: 820px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 10px 16px;
    padding-block: 10px;
  }

  .primary-nav {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    justify-content: space-between;
    overflow: visible;
    padding: 2px 0 4px;
    white-space: normal;
  }

  .header-actions {
    margin-left: auto;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 28px, 1220px);
  }

  .header-inner {
    min-height: 64px;
  }

  .brand {
    font-size: 18px;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .header-actions .button {
    min-width: 44px;
    padding-inline: 12px;
  }

  .header-actions .button span {
    display: none;
  }

  .header-actions .button span[aria-hidden="true"] {
    display: inline;
  }

  .primary-nav {
    gap: 10px;
    font-size: 13px;
  }

  .section-heading h2 {
    font-size: clamp(36px, 12vw, 52px);
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
