:root {
  --bg: #f3f1e8;
  --bg-2: #fcfaf7;
  --ink: #191919;
  --muted: #5a5a5a;
  --rule: rgba(25, 25, 25, 0.14);
  --accent: #cc5a38;
  --maxw: 1120px;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, white 8%);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(8px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

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

.brand-mark {
  font-family: "Crimson Pro", ui-serif, Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 20px;
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  color: var(--muted);
}

.nav-links a {
  padding: 8px 10px;
  border-radius: 10px;
}

.nav-links a[aria-current="page"] {
  color: var(--ink);
  background: rgba(25, 25, 25, 0.06);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--rule);
  background: var(--bg-2);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  text-decoration: none;
  border-color: rgba(25, 25, 25, 0.28);
}

.button-primary {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--rule) 45%);
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-2) 94%);
}

.section {
  padding: 72px 0;
}

.section-tight {
  padding: 48px 0;
}

.h-eyebrow {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 14px;
}

.h1 {
  font-family: "Crimson Pro", ui-serif, Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-size: 52px;
  line-height: 1.06;
  margin: 0 0 16px;
}

.lede {
  font-size: 17px;
  line-height: 1.6;
  color: #2b2b2b;
  margin: 0 0 26px;
  max-width: 62ch;
}

.rule {
  height: 1px;
  background: var(--rule);
}

/* Grid container allows us to detect when *any* card is hovered */
.grid {
  display: grid;
  gap: 18px;
  position: relative; /* Context for z-index */
}

/* Base Card Style - Cleaner, less "boxy" until interaction */
.card {
  background: rgba(252, 250, 247, 0.6); /* More transparent */
  backdrop-filter: blur(4px);
  border: 1px solid rgba(25, 25, 25, 0.08); /* Fainter border */
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); /* Smooth elegant ease */
  cursor: default;
}

/* THE FOCUS EFFECT */

/* When hovering the GRID (container), dim ALL cards */
.grid:hover .card {
  filter: blur(3px) grayscale(100%);
  opacity: 0.4;
  transform: scale(0.98);
}

/* But keep the SPECIFIC hovered card sharp and focused */
.grid .card:hover {
  filter: none;
  opacity: 1;
  transform: scale(1.02);
  background: #fcfaf7; /* Solid paper color */
  border-color: var(--ink); /* Sharp border */
  box-shadow: 0 10px 40px -10px rgba(0,0,0,0.1); /* Lift it up */
  z-index: 10;
}

/* Typography inside cards */
.card h3 {
  font-family: "Crimson Pro", ui-serif, Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  font-size: 20px;
  color: var(--ink);
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  transition: color 0.3s;
}

/* When focused, make the text darker/sharper */
.grid .card:hover p {
  color: #222;
}

/* Layout variants */
.grid-2 {
  grid-template-columns: 1fr 1fr;
}

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

#signal-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none; /* Let clicks pass through */
  opacity: 0.6; /* Subtle blend */
}

.hero {
  padding: 120px 0 100px;
  position: relative;
}

.hero-content {
  max-width: 720px;
}

/* Ensure content sits above canvas */
.section, .section-tight, .footer, .nav, .rule {
  position: relative;
  z-index: 1;
}

.card {
  background: rgba(252, 250, 247, 0.85); /* Slightly transparent to see movement behind */
  backdrop-filter: blur(8px);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 22px;
}

.footer {
  padding: 34px 0 46px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 13px;
}

.footer a {
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
}

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

.page {
  padding: 58px 0 72px;
}

.page h1 {
  font-family: "Crimson Pro", ui-serif, Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-size: 40px;
  margin: 0 0 12px;
}

.page p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
  max-width: 76ch;
}

.page h2 {
  font-family: "Crimson Pro", ui-serif, Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 22px;
  margin: 34px 0 10px;
}

.page ul {
  margin: 8px 0 14px 18px;
  color: var(--muted);
}

.page li {
  margin: 6px 0;
}

.small {
  font-size: 12px;
  color: rgba(25, 25, 25, 0.55);
}

@media (max-width: 980px) {
  .hero-layout {
    grid-template-columns: 1fr;
  }

  .h1 {
    font-size: 44px;
  }

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

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

  .nav-links {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: left;
  }

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