@font-face {
  font-family: "Rajdhani";
  src: url("fonts/rajdhani-300.woff2") format("woff2");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "Rajdhani";
  src: url("fonts/rajdhani-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Rajdhani";
  src: url("fonts/rajdhani-500.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Rajdhani";
  src: url("fonts/rajdhani-600.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Rajdhani";
  src: url("fonts/rajdhani-700.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --surface: #f4f1e8;
  --surface-soft: #ebe7dc;
  --surface-card: #faf8f2;
  --ink: #171918;
  --ink-soft: #404441;
  --muted: #686e69;
  --line: #b8b9b2;
  --line-strong: #171918;
  --accent: #00745f;
  --accent-strong: #006451;
  --accent-soft: #d7e9e4;
  --shadow: none;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Rajdhani", "Arial Narrow", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --surface: #171918;
  --surface-soft: #222522;
  --surface-card: #1d201e;
  --ink: #f4f1e8;
  --ink-soft: #d0cec6;
  --muted: #a6aaa4;
  --line: #545852;
  --line-strong: #f4f1e8;
  --accent: #52e9cb;
  --accent-strong: #52e9cb;
  --accent-soft: #173b33;
}

html {
  background: var(--surface);
}

body {
  color: var(--ink);
  background: var(--surface);
  font-family: var(--sans);
  transition: color 160ms ease, background-color 160ms ease;
}

body::before,
body::after,
.ambient-field {
  display: none;
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand-title {
  font-family: var(--display);
  font-weight: 600;
}

h1 {
  max-width: 11ch;
  font-size: clamp(3.25rem, 7.4vw, 7.5rem);
  line-height: 0.84;
  letter-spacing: -0.055em;
}

h2 {
  font-size: clamp(2.2rem, 4.4vw, 4.5rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
}

h3 {
  font-size: clamp(1.25rem, 1.8vw, 1.55rem);
  line-height: 1.05;
}

p,
li {
  text-wrap: pretty;
}

a,
button,
input,
select,
textarea {
  border-radius: 8px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.scroll-progress {
  height: 2px;
  background: var(--accent);
  box-shadow: none;
}

.topbar {
  min-height: 72px;
  padding: 12px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px);
}

.brand {
  flex: 0 0 auto;
  gap: 12px;
}

.brand-mark-image {
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  object-fit: cover;
}

.brand-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.brand-subtitle {
  color: var(--muted);
  letter-spacing: 0.09em;
}

nav {
  gap: 4px;
}

nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink-soft);
  font-weight: 600;
}

nav a:hover,
nav a.is-active {
  border-color: var(--line);
  color: var(--ink);
  background: var(--surface-soft);
  transform: none;
}

nav .nav-cta {
  border-color: var(--line-strong);
  color: var(--surface);
  background: var(--ink);
}

nav .nav-cta:hover {
  border-color: var(--accent);
  color: var(--surface);
  background: var(--ink);
}

.theme-toggle {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--surface);
  background: var(--ink);
}

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

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.hero {
  width: min(1440px, 100%);
  min-height: 680px;
  margin-inline: auto;
  padding: clamp(64px, 8vw, 120px) clamp(24px, 5vw, 72px);
}

.hero-copy {
  transform: none;
}

.eyebrow {
  color: var(--accent-strong);
  font: 700 0.72rem/1.4 var(--mono);
  letter-spacing: 0.14em;
}

.lede,
.section p,
.status-heading p,
.status-card p {
  color: var(--ink-soft);
}

.hero-actions {
  gap: 10px;
  margin-top: 28px;
}

.button,
.copy-button {
  min-height: 48px;
  padding: 12px 18px;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: none;
  font: 700 0.72rem/1 var(--mono);
  letter-spacing: 0.08em;
}

.button.primary {
  border-color: var(--ink);
  color: var(--surface);
  background: var(--ink);
  box-shadow: none;
}

.button.secondary {
  color: var(--ink);
  background: transparent;
}

.button:hover,
.copy-button:hover {
  border-color: var(--accent);
}

.hero-visual,
.journey-card,
.edge-console,
.home-diagram,
.topology-diagram {
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-card);
  box-shadow: none;
}

.hero-visual img,
.journey-card img {
  filter: saturate(0.82) contrast(1.04);
}

.status-panel,
.section {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: clamp(40px, 5vw, 72px);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface-card);
  box-shadow: none;
}

.status-card,
.step,
.component-map > div,
.edge-grid > article,
.why-grid > article,
.terminal-card,
.checks-grid > article,
.hardware-grid > div,
.journey-card,
.intake,
.usecase-grid > article,
.edge-console > div,
.home-clients,
.home-edge,
.home-mesh,
.home-link,
.node {
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface-card);
  box-shadow: none;
}

.status-card:hover,
.step:hover,
.edge-grid > article:hover,
.why-grid > article:hover,
.hardware-grid > div:hover,
.checks-grid > article:hover,
.usecase-grid > article:hover,
.node:hover {
  border-color: var(--accent);
  transform: none;
}

.status-card::before,
.terminal-card::before,
.intake::before,
.edge-grid > article::before {
  display: none;
}

.status-label,
.step span,
.component-map span,
.edge-grid span,
.hardware-grid span {
  color: var(--accent-strong);
  font-family: var(--mono);
}

.status-card strong {
  color: var(--ink);
  font-family: var(--display);
  font-weight: 600;
}

.layer.dark,
.edge-console .edge-core,
.home-edge,
.node.validator {
  border-color: var(--ink);
  color: var(--surface);
  background: var(--ink);
}

.layer.dark p,
.edge-console .edge-core,
.home-edge,
.node.validator {
  color: var(--surface);
}

.terminal-card,
.setup-grid pre {
  border-color: #424641;
  color: #f4f1e8;
  background: #171918;
}

.copy-button {
  min-height: 36px;
  padding: 8px 12px;
  border-color: #f4f1e8;
  color: #f4f1e8;
  background: #171918;
}

.checks-grid code {
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: var(--surface-soft);
}

.connector,
.home-link {
  background: var(--surface-soft);
}

.connector::after {
  background: var(--accent);
}

@media (max-width: 1180px) {
  .topbar {
    align-items: center;
    flex-direction: row;
  }

  .topbar-actions {
    min-width: 0;
  }

  nav {
    flex-wrap: nowrap;
    max-width: 68vw;
    overflow-x: auto;
    scrollbar-width: none;
  }

  nav::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: stretch;
    flex-wrap: wrap;
    gap: 8px;
  }

  .brand-subtitle {
    display: none;
  }

  .topbar-actions {
    flex: 1 1 100%;
  }

  nav {
    order: 2;
    max-width: none;
    flex: 1;
  }

  .hero {
    min-height: auto;
    padding: 64px 20px;
  }

  .status-panel,
  .section {
    width: calc(100% - 24px);
    padding: 32px 20px;
  }
}

@media print {
  .theme-toggle {
    display: none;
  }
}
