:root {
  color-scheme: light;
  --paper: #f8f5ee;
  --ink: #161616;
  --muted: #5e625b;
  --line: #d8d0c0;
  --panel: rgba(255, 252, 245, 0.78);
  --panel-strong: rgba(255, 252, 245, 0.94);
  --blue: #0b6f87;
  --green: #2f7a4d;
  --red: #9f3328;
  --shadow: 0 24px 80px rgba(26, 24, 20, 0.12);
  font-family: "Avenir Next", "DIN Alternate", "Gill Sans", ui-sans-serif, system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(22, 22, 22, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(22, 22, 22, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 42px 42px;
}

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

.edge-scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 64px);
  border-bottom: 1px solid rgba(22, 22, 22, 0.08);
  background: rgba(248, 245, 238, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  font-family: "Menlo", "IBM Plex Mono", ui-monospace, monospace;
  font-size: 14px;
  letter-spacing: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 28px);
  color: var(--muted);
  font-size: 14px;
}

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

.nav a:hover,
.nav a:focus-visible {
  border-color: currentColor;
  outline: none;
}

main {
  overflow: hidden;
}

.hero {
  min-height: 78svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  align-items: end;
  gap: clamp(32px, 7vw, 96px);
  padding: clamp(58px, 10vw, 132px) clamp(20px, 5vw, 64px) clamp(48px, 7vw, 86px);
}

.hero-copy {
  max-width: 860px;
}

.eyebrow {
  margin: 0 0 18px;
  font-family: "Menlo", "IBM Plex Mono", ui-monospace, monospace;
  color: var(--blue);
  font-size: 12px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(62px, 12vw, 176px);
  line-height: 0.86;
  letter-spacing: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.lede {
  max-width: 650px;
  color: #2f302d;
  font-size: clamp(19px, 2.4vw, 30px);
  line-height: 1.22;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.button.primary {
  background: var(--ink);
  color: var(--paper);
}

.button.secondary {
  background: rgba(248, 245, 238, 0.5);
}

.signal-panel {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
  box-shadow: var(--shadow);
}

.signal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 58px;
  padding: 16px;
  background: var(--panel-strong);
}

.signal-row span {
  color: var(--muted);
  font-family: "Menlo", "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
}

.signal-row strong {
  text-align: right;
  font-size: 15px;
}

.band,
.surface {
  padding: clamp(52px, 8vw, 96px) clamp(20px, 5vw, 64px);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(34px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: 0;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
  box-shadow: var(--shadow);
}

.tool-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  background: var(--panel);
  transition: background 160ms ease, transform 160ms ease;
}

.tool-card + .tool-card {
  border-left: 1px solid var(--line);
}

.tool-card:hover,
.tool-card:focus-visible {
  background: #fffaf0;
  transform: translateY(-3px);
  outline: none;
}

.tool-index {
  color: var(--red);
  font-family: "Menlo", "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
}

.tool-card h3 {
  margin-bottom: 10px;
  font-size: 24px;
}

.tool-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.surface {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.8fr);
  gap: clamp(28px, 6vw, 86px);
  align-items: start;
}

.facts {
  margin: 0;
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
}

.facts div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  background: var(--panel-strong);
}

.facts dt {
  color: var(--muted);
  font-family: "Menlo", "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
}

.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(20px, 5vw, 64px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: "Menlo", "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
}

@media (max-width: 860px) {
  .hero,
  .section-heading,
  .surface {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 74px;
  }

  .signal-panel {
    max-width: 460px;
  }

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

  .tool-card + .tool-card {
    border-left: 0;
  }

  .tool-card:nth-child(2n) {
    border-left: 1px solid var(--line);
  }

  .tool-card:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 560px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  h1 {
    font-size: clamp(54px, 18vw, 86px);
  }

  .button {
    width: 100%;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .tool-card,
  .tool-card:nth-child(2n),
  .tool-card:nth-child(n + 3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .tool-card:first-child {
    border-top: 0;
  }

  .facts div {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

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

  .button,
  .tool-card {
    transition: none;
  }
}
