:root {
  --bg: #eef1f7;
  --ink: #1f2937;
  --muted: #697586;
  --quiet: #8a96a6;
  --line: #d4dae6;
  --grid: rgba(31, 41, 55, 0.045);
  --accent: #e8521f;
  --accent-soft: #ff7a2e;
  --paper: rgba(255, 255, 255, 0.66);
  --paper-strong: rgba(255, 255, 255, 0.88);
  --shadow: 0 14px 40px -26px rgba(31, 41, 55, 0.55);
  --pa: #7c3aed;
  --re: #2563eb;
  --em: #0e7490;
  --dp: #c2410c;
  --foundry: #2e7d32;
  --max: 1120px;
  --prose-width: 42rem;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

.bg-grid,
.bg-framework,
.bg-network,
.bg-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.bg-grid {
  z-index: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 26px 26px;
}

.bg-framework {
  z-index: 1;
  background-image: url("/assets/framework-bg.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: min(1600px, 130%) auto;
  filter: grayscale(1) blur(3px) contrast(0.9) brightness(1.08);
  opacity: 0.1;
  animation: drift 60s ease-in-out infinite alternate;
}

.bg-network {
  z-index: 2;
  width: 100%;
  height: 100%;
  opacity: 0.75;
}

.bg-vignette {
  z-index: 3;
  background:
    radial-gradient(ellipse at center,
      rgba(238, 241, 247, 0) 0%,
      rgba(238, 241, 247, 0.55) 55%,
      rgba(238, 241, 247, 0.92) 100%);
}

.home-hero,
.subpage-main,
.site-header,
.site-footer,
.not-found-main {
  position: relative;
  z-index: 4;
}

.home-hero {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 24px 18px;
  text-align: center;
}

.home-inner {
  width: min(100%, var(--max));
  margin: 0 auto;
  animation: fade-in 1.2s ease both;
}

.hero {
  position: relative;
  z-index: 4;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 24px 24px;
  text-align: center;
  animation: fade-in 1.2s ease both;
  gap: 0;
}

.hero::before {
  content: "";
  flex: 1 0 0;
  min-height: 0;
}

.hero::after {
  content: "";
  flex: 3 0 0;
  min-height: 0;
}

.sign {
  --sign-red: #b91c1c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 34px;
  padding: 9px 18px;
  background: rgba(255, 252, 248, 0.92);
  border: 2px solid var(--sign-red);
  border-radius: 4px;
  box-shadow:
    0 1px 0 rgba(185, 28, 28, 0.15) inset,
    0 6px 14px -8px rgba(31, 41, 55, 0.35);
  animation: sign-in 0.7s ease both;
}

.sign-text {
  color: var(--sign-red);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
  white-space: nowrap;
}

.sign-sep {
  margin: 0 6px;
  opacity: 0.7;
}

.logo-plate {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

.home-logo {
  width: min(340px, 72vw);
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.sub-logo {
  width: min(288px, 58vw);
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.logo {
  width: min(288px, 56vw);
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.consulting-logo,
.foundry-logo {
  width: min(430px, 78vw);
}

.eyebrow,
.section-kicker {
  margin: 24px 0 0;
  color: var(--accent);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
}

.accent-rule {
  width: 56px;
  height: 3px;
  margin: 26px auto 22px;
  border: 0;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(232, 82, 31, 0.15);
}

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

h1 {
  max-width: 800px;
  margin: 0 auto;
  color: var(--ink);
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0;
}

.tagline {
  max-width: var(--prose-width);
  margin: 0;
  color: var(--ink);
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
}

.hero-kicker {
  max-width: var(--prose-width);
  margin: 22px auto 0;
  color: var(--ink);
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 600;
  line-height: 1.35;
}

.hero-copy,
.brand-lede {
  max-width: var(--prose-width);
  margin: 14px auto 0;
  color: var(--muted);
  font-size: clamp(14px, 1.6vw, 16px);
  font-weight: 400;
  line-height: 1.6;
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 38px;
}

.brand-card {
  position: relative;
  min-height: 312px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  backdrop-filter: blur(4px);
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.card-accent {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--brand-accent);
  opacity: 0.95;
}

.card-logo-wrap {
  width: 100%;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.card-logo-wrap img {
  max-width: 100%;
  max-height: 60px;
  object-fit: contain;
}

.labs-card .card-logo-wrap img {
  max-height: 54px;
}

.card-title {
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
}

.card-descriptor {
  display: block;
  margin-top: 8px;
  color: var(--brand-accent);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.card-copy {
  display: block;
  margin-top: 16px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 24px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 0.25s ease, gap 0.25s ease;
}

.brand-card:hover,
.brand-card:focus-visible {
  border-color: var(--brand-accent);
  box-shadow: 0 18px 42px -24px rgba(31, 41, 55, 0.62);
  outline: none;
  transform: translateY(-3px);
}

.brand-card:hover .card-cta,
.brand-card:focus-visible .card-cta {
  color: var(--brand-accent);
  gap: 11px;
}

.site-header {
  width: min(100% - 48px, var(--max));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto;
  padding: 28px 0 0;
}

.home-mark,
.back-link,
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease, gap 0.25s ease;
}

.home-mark {
  color: var(--ink);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.back-link:hover,
.back-link:focus-visible,
.text-link:hover,
.text-link:focus-visible,
.home-mark:hover,
.home-mark:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
  outline: none;
  gap: 10px;
}

.subpage-main {
  width: min(100% - 48px, var(--max));
  margin: 0 auto;
  padding: 48px 0 28px;
}

.brand-hero {
  text-align: center;
  animation: fade-in 1.2s ease both;
}

.brand-hero .sign {
  margin-bottom: 34px;
}

.brand-hero h1 {
  max-width: var(--prose-width);
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 600;
  line-height: 1.35;
}

.pathway {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  margin: 32px auto 0;
  padding: 0;
  color: var(--ink);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.pathway li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 31px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(4px);
  white-space: nowrap;
}

.dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  display: inline-block;
  border-radius: 50%;
  background: var(--ink);
}

.dot.product { background: var(--pa); }
.dot.reasoning { background: var(--re); }
.dot.execution { background: var(--em); }
.dot.deployment { background: var(--dp); }
.dot.consulting { background: var(--accent); }
.dot.foundry { background: var(--foundry); }

.lifecycle-tease {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  margin: 32px 0 28px;
  padding: 0;
  color: var(--ink);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.lifecycle-tease .tease {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(4px);
  white-space: nowrap;
}

.lifecycle-tease .dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
  background: var(--ink);
}

.tease-pa .dot { background: var(--pa); }
.tease-re .dot { background: var(--re); }
.tease-em .dot { background: var(--em); }
.tease-dp .dot { background: var(--dp); }

.lifecycle-tease .sep {
  color: var(--muted);
  font-weight: 400;
  user-select: none;
}

.blurb {
  max-width: var(--prose-width);
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(14px, 1.6vw, 16px);
  font-weight: 400;
  line-height: 1.6;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 36px;
  margin-top: 32px;
}

.peek-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 0.25s ease, border-color 0.25s ease, gap 0.25s ease;
}

.peek-link span {
  display: inline-block;
  transition: transform 0.25s ease;
}

.peek-link:hover,
.peek-link:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
  outline: none;
  gap: 10px;
}

.peek-link:hover span,
.peek-link:focus-visible span {
  transform: translateX(2px);
}

.content-grid {
  display: grid;
  gap: 16px;
  margin-top: 40px;
}

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

.four-up {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.info-card,
.cta-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
}

.info-card {
  min-height: 222px;
  padding: 24px;
}

.info-card .section-kicker,
.cta-panel .section-kicker {
  margin-top: 0;
}

.info-card h2,
.cta-panel h2 {
  margin: 14px 0 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.16;
  letter-spacing: 0;
}

.info-card p:not(.section-kicker),
.cta-panel p:not(.section-kicker) {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.58;
}

.cta-panel {
  margin-top: 16px;
  padding: 28px;
  text-align: center;
}

.cta-panel .text-link {
  margin-top: 20px;
}

.site-footer {
  width: min(100% - 48px, var(--max));
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto;
  padding: 20px 0 28px;
  color: var(--quiet);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--accent);
  outline: none;
}

.not-found-main {
  width: min(100% - 48px, 760px);
  min-height: 100vh;
  display: grid;
  align-content: center;
  justify-items: center;
  margin: 0 auto;
  padding: 48px 0;
  text-align: center;
}

.not-found-main h1 {
  font-size: clamp(26px, 4vw, 44px);
}

@keyframes drift {
  from { transform: translate(-1.5%, -1%) scale(1.02); }
  to { transform: translate(1.5%, 1%) scale(1.04); }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@keyframes sign-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 980px) {
  .brand-grid,
  .three-up,
  .four-up {
    grid-template-columns: 1fr;
  }

  .brand-card {
    min-height: 0;
  }

  .content-grid {
    max-width: 680px;
    margin-right: auto;
    margin-left: auto;
  }
}

@media (max-width: 640px) {
  .home-hero {
    padding: 40px 18px 18px;
  }

  .site-header,
  .site-footer,
  .subpage-main,
  .not-found-main {
    width: min(100% - 36px, var(--max));
  }

  .site-header {
    padding-top: 22px;
  }

  .brand-grid {
    gap: 14px;
    margin-top: 32px;
  }

  .card-logo-wrap {
    height: 88px;
  }

  .info-card,
  .cta-panel,
  .brand-card {
    padding: 20px;
  }

  .site-footer {
    flex-direction: column;
  }

  .pathway {
    gap: 6px 8px;
    font-size: 11.5px;
  }

  .pathway li {
    padding: 4px 9px;
  }

  .hero {
    padding: 40px 18px 20px;
  }

  .lifecycle-tease {
    gap: 6px 8px;
    font-size: 11.5px;
  }

  .lifecycle-tease .tease {
    padding: 4px 9px;
  }
}

@media (max-width: 420px) {
  .sign {
    margin-bottom: 28px;
    padding: 8px 14px;
  }

  .sign-text {
    font-size: 10.5px;
    letter-spacing: 0.14em;
  }

  .home-logo {
    width: min(300px, 78vw);
  }

  .sub-logo {
    width: min(288px, 76vw);
  }

  .consulting-logo,
  .foundry-logo {
    width: min(330px, 80vw);
  }

  .eyebrow,
  .section-kicker {
    font-size: 11px;
    letter-spacing: 0.1em;
  }

  .card-title {
    font-size: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
