@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/space-grotesk-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/space-grotesk-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

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

:root {
  color-scheme: dark;
  --canvas: #0d1117;
  --surface: #141a22;
  --raised: #20252d;
  --border: #2a3745;
  --ink: #e7ecef;
  --muted: #98a7b5;
  --thought: #5e6d7b;
  --signal: #4f8ef7;
  --glacier: #79d7ff;
  --brass: #c48b3a;
  --success: #61d6a3;
  --danger: #f07178;
  --display: "Space Grotesk", "Inter", sans-serif;
  --body: "Inter", sans-serif;
  --mono: "JetBrains Mono", monospace;
  --shell: min(1240px, calc(100vw - 64px));
}

* { box-sizing: border-box; }

html { background: var(--canvas); scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 84% 6%, rgb(79 142 247 / 8%), transparent 24rem),
    var(--canvas);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgb(255 255 255 / 1.5%) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 1.5%) 1px, transparent 1px);
  background-size: 72px 72px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 38%);
  pointer-events: none;
}

.site-backdrop {
  position: fixed;
  inset: 72px 0 0;
  z-index: 0;
  overflow: hidden;
  opacity: .16;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent, black 12%, black 82%, transparent);
}

.site-backdrop svg {
  width: 100%;
  height: 100%;
  transform: scale(1.35) rotate(-4deg);
}

main, .site-footer { position: relative; z-index: 1; }

a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--display); }

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

.skip-link:focus { opacity: 1; transform: translateY(0); }
.section-shell { width: var(--shell); margin-inline: auto; }

.eyebrow {
  margin-bottom: 20px;
  color: var(--glacier);
  font: 600 11px/1.4 var(--mono);
  letter-spacing: .14em;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgb(42 55 69 / 80%);
  background: rgb(13 17 23 / 86%);
  backdrop-filter: blur(18px);
}

.nav-shell {
  display: flex;
  width: var(--shell);
  min-height: 72px;
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
}

.brand { display: inline-flex; align-items: center; }
.brand svg { display: block; width: 162px; height: auto; }
.brand text { font: 300 36px var(--display); letter-spacing: 3px; }

.site-nav { display: flex; align-items: center; gap: 34px; }
.site-nav a { color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; transition: color 140ms ease; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }

.site-nav .nav-code {
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--ink);
}

.site-nav .nav-code:hover { border-color: var(--signal); }
.menu-toggle { display: none; }

.hero {
  position: relative;
  display: grid;
  min-height: 670px;
  grid-template-columns: 1fr;
  align-items: center;
  overflow: hidden;
}

.hero-copy { position: relative; z-index: 2; padding: 110px 0 100px; }

.hero h1 {
  max-width: 760px;
  margin-bottom: 30px;
  font-size: clamp(58px, 6.4vw, 94px);
  font-weight: 400;
  letter-spacing: -.055em;
  line-height: .95;
}

.hero h1 .hero-line { display: block; color: inherit; white-space: nowrap; }
.hero h1 .accent { color: var(--glacier); }

.hero-lead {
  max-width: 680px;
  margin-bottom: 38px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.65;
}

.hero-actions { display: flex; gap: 12px; }

.button {
  display: inline-flex;
  min-height: 44px;
  padding: 0 18px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--signal); color: white; }
.button.primary:hover { background: #639cf8; }
.button.secondary { border-color: var(--border); background: rgb(20 26 34 / 72%); color: var(--ink); }
.button.secondary:hover { border-color: #506174; }

.hero-facts {
  display: flex;
  margin-top: 60px;
  gap: 0;
  color: var(--muted);
  font: 11px var(--mono);
}

.hero-facts span { padding-right: 22px; }
.hero-facts span + span { padding-left: 22px; border-left: 1px solid var(--border); }
.hero-facts b { margin-right: 7px; color: var(--ink); font-weight: 500; }

.tui-section, .server-grade, .principles, .stack { padding: 116px 0; border-top: 1px solid var(--border); }

.section-heading { margin-bottom: 54px; }
.section-heading h2, .home-cta h2 { margin-bottom: 0; font-size: clamp(40px, 5vw, 66px); font-weight: 450; letter-spacing: -.045em; line-height: 1.04; }
.split-heading { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: end; }
.split-heading > p { max-width: 540px; margin: 0; color: var(--muted); font-size: 17px; }

.dashboard-gallery { display: grid; gap: 28px; }
.dashboard-shot { margin: 0; overflow: hidden; border: 1px solid #344657; border-radius: 10px; background: #0a0e13; box-shadow: 0 35px 100px rgb(0 0 0 / 30%); }
.dashboard-shot img { display: block; width: 100%; height: auto; }
.dashboard-shot figcaption { display: grid; padding: 20px 22px 22px; grid-template-columns: auto 1fr; gap: 3px 16px; border-top: 1px solid var(--border); }
.dashboard-shot figcaption span { grid-row: 1 / 3; color: var(--glacier); font: 600 10px var(--mono); letter-spacing: .12em; }
.dashboard-shot figcaption strong { font-size: 14px; font-weight: 600; }
.dashboard-shot figcaption small { color: var(--muted); font-size: 11px; }

.install-section { display: grid; padding: 100px 0; grid-template-columns: 1fr 1fr; gap: 54px 80px; border-top: 1px solid var(--border); }
.install-copy h2 { margin-bottom: 24px; font-size: clamp(40px, 5vw, 66px); font-weight: 450; letter-spacing: -.045em; line-height: 1.04; }
.install-copy > p:last-child { max-width: 560px; margin: 0; color: var(--muted); font-size: 17px; }
.install-command { display: flex; min-height: 118px; padding: 30px 34px; align-items: center; gap: 18px; align-self: end; border: 1px solid #426da7; border-radius: 10px; background: linear-gradient(135deg, rgb(79 142 247 / 14%), var(--surface)); }
.install-command span { color: var(--success); font: 18px var(--mono); }
.install-command code { min-width: 0; overflow-x: auto; flex: 1; color: var(--ink); font: 500 clamp(16px, 2vw, 23px) var(--mono); white-space: nowrap; }
.copy-command { display: inline-flex; min-width: 104px; min-height: 42px; padding: 0 14px; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--raised); color: var(--muted); cursor: pointer; font: 600 11px var(--mono); transition: border-color 140ms ease, color 140ms ease, background 140ms ease; }
.copy-command:hover { border-color: var(--glacier); color: var(--ink); }
.copy-command:focus-visible { outline: 2px solid var(--glacier); outline-offset: 3px; }
.copy-command span { color: inherit; font: inherit; }
.copy-command.copied { border-color: var(--success); background: rgb(97 214 163 / 10%); color: var(--success); }
.install-modes { display: grid; grid-column: 1 / -1; grid-template-columns: 1fr 1fr; border: 1px solid var(--border); }
.install-modes article { display: grid; min-height: 140px; padding: 28px 30px; grid-template-columns: 42px 1fr; gap: 7px 16px; }
.install-modes article + article { border-left: 1px solid var(--border); }
.install-modes span { grid-row: 1 / 3; color: var(--brass); font: 600 10px var(--mono); }
.install-modes strong { font: 500 17px var(--mono); }
.install-modes p { margin: 0; color: var(--muted); font-size: 13px; }

.server-intro { display: grid; margin-bottom: 58px; grid-template-columns: 1.25fr .75fr; gap: 80px; align-items: end; }
.server-intro h2 { max-width: 760px; margin: 0; font-size: clamp(44px, 5.4vw, 72px); font-weight: 450; letter-spacing: -.05em; line-height: 1; }
.server-intro > p { margin: 0; color: var(--muted); font-size: 17px; }
.server-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); background: rgb(13 17 23 / 54%); }
.server-grid article { min-height: 300px; padding: 34px; }
.server-grid article + article { border-left: 1px solid var(--border); }
.server-grid span { color: var(--glacier); font: 10px var(--mono); letter-spacing: .12em; }
.server-grid h3 { margin: 84px 0 18px; font-size: 28px; font-weight: 500; }
.server-grid p { margin: 0; color: var(--muted); font-size: 14px; }

.principle-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.principle-grid article { min-height: 280px; padding: 34px 26px; }
.principle-grid article + article { border-left: 1px solid var(--border); }
.principle-grid span, .module-index, .module-layer, .model-section-head > span, .contact-card > span, .boundary-note > span {
  color: var(--brass);
  font: 600 10px var(--mono);
  letter-spacing: .1em;
}
.principle-grid h3 { margin: 62px 0 16px; font-size: 22px; font-weight: 500; }
.principle-grid p { margin: 0; color: var(--muted); font-size: 14px; }

.stack-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 30px; }
.stack-flow article { position: relative; min-height: 250px; padding: 26px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.stack-flow article::after { position: absolute; top: 50%; right: -13px; z-index: 2; color: var(--glacier); content: "→"; }
.stack-flow article:last-child::after { display: none; }
.stack-flow span { color: var(--glacier); font: 10px var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.stack-flow h3 { margin: 72px 0 14px; font: 400 30px var(--mono); letter-spacing: -.04em; }
.stack-flow p { margin: 0; color: var(--muted); font-size: 13px; }
.text-link { color: var(--glacier); font-size: 13px; font-weight: 600; text-decoration: none; }
.text-link:hover { color: white; }

.home-cta { padding: 125px 0 140px; border-top: 1px solid var(--border); text-align: center; }
.home-cta h2 { font-size: clamp(54px, 8vw, 100px); }
.home-cta > p:not(.eyebrow) { max-width: 620px; margin: 28px auto 36px; color: var(--muted); font-size: 17px; }
.home-cta > div { display: flex; justify-content: center; gap: 12px; }

.page-intro { max-width: 1000px; margin-left: max(32px, calc((100vw - 1240px) / 2)); padding: 150px 0 110px; }
.page-intro h1 { max-width: 920px; margin-bottom: 32px; font-size: clamp(58px, 7.2vw, 104px); font-weight: 400; letter-spacing: -.06em; line-height: .96; }
.page-intro > p:last-child { max-width: 760px; margin: 0; color: var(--muted); font-size: 18px; }

.module-list { border-top: 1px solid var(--border); }
.module-card { display: grid; grid-template-columns: 70px 1.3fr 1fr 190px; gap: 34px; padding: 54px 0; align-items: start; border-bottom: 1px solid var(--border); }
.module-copy h2 { margin: 10px 0 16px; font: 400 42px var(--mono); letter-spacing: -.05em; }
.module-copy p { max-width: 500px; margin: 0; color: var(--muted); }
.module-card ul { margin: 25px 0 0; padding: 0; list-style: none; }
.module-card li { position: relative; margin-bottom: 10px; padding-left: 17px; color: var(--muted); font-size: 13px; }
.module-card li::before { position: absolute; left: 0; color: var(--signal); content: "—"; }
.module-links { display: flex; flex-direction: column; gap: 10px; }
.module-links a { padding: 10px 12px; border: 1px solid var(--border); border-radius: 5px; font: 11px var(--mono); text-align: center; text-decoration: none; }
.module-links a:hover { border-color: var(--signal); }

.boundary-note { margin-top: 90px; margin-bottom: 130px; padding: 46px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.dependency-line { display: flex; margin: 30px 0 20px; align-items: center; gap: 22px; color: var(--ink); font: 400 clamp(21px, 3vw, 38px) var(--mono); }
.dependency-line i { color: var(--signal); font-style: normal; }
.boundary-note p { max-width: 760px; margin: 0; color: var(--muted); }

.model-section { padding: 72px 0; border-top: 1px solid var(--border); }
.model-section-head { display: flex; margin-bottom: 32px; justify-content: space-between; align-items: baseline; }
.model-section-head > span { color: var(--glacier); }
.model-section-head p { margin: 0; color: var(--muted); font-size: 13px; }
.model-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.model-card { min-height: 340px; padding: 30px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.recognized .model-card { background: transparent; }
.model-glyph { display: flex; width: 54px; height: 54px; margin-bottom: 70px; align-items: end; gap: 4px; }
.model-glyph i { width: 11px; border: 1px solid var(--signal); background: rgb(79 142 247 / 10%); }
.model-glyph i:nth-child(1) { height: 28px; }
.model-glyph i:nth-child(2) { height: 44px; }
.model-glyph i:nth-child(3) { height: 35px; border-color: var(--glacier); }
.model-card h2 { margin-bottom: 14px; font-size: 26px; font-weight: 500; }
.model-card p { min-height: 72px; color: var(--muted); font-size: 13px; }
.model-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.model-tags span { padding: 5px 8px; border: 1px solid var(--border); border-radius: 999px; color: var(--glacier); font: 9px var(--mono); text-transform: uppercase; }

.compatibility { display: grid; margin-top: 70px; margin-bottom: 130px; padding: 70px 0 0; grid-template-columns: 1fr 1fr; gap: 80px; border-top: 1px solid var(--border); }
.compatibility h2 { margin: 0; font-size: 54px; font-weight: 450; letter-spacing: -.05em; }
.compatibility > div:last-child p { color: var(--muted); font-size: 17px; }

.contact-intro { padding-bottom: 90px; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.contact-card { display: flex; min-height: 360px; padding: 30px; flex-direction: column; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.contact-card.primary-contact { border-color: #426da7; background: linear-gradient(150deg, rgb(79 142 247 / 14%), var(--surface) 55%); }
.contact-card h2 { margin: 72px 0 16px; font-size: 34px; font-weight: 450; }
.contact-card p { color: var(--muted); font-size: 14px; }
.contact-card a { margin-top: auto; color: var(--glacier); font: 12px var(--mono); text-decoration: none; }
.contact-card a:hover { color: white; }
.contact-note { margin-top: 50px; margin-bottom: 130px; padding-top: 30px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }

.not-found { min-height: 670px; padding: 150px 0; }
.not-found h1 { max-width: 900px; margin-bottom: 28px; font-size: clamp(54px, 8vw, 100px); font-weight: 400; letter-spacing: -.06em; line-height: .96; }
.not-found > p:not(.eyebrow) { color: var(--muted); font-size: 18px; }
.not-found > div { display: flex; margin-top: 34px; gap: 12px; }

.site-footer { border-top: 1px solid var(--border); background: #0a0e13; }
.footer-shell { display: grid; width: var(--shell); min-height: 230px; margin-inline: auto; padding: 58px 0; grid-template-columns: 1fr auto; align-content: space-between; }
.footer-signature { display: flex; align-items: center; gap: 14px; }
.footer-signature .brand-mark { width: 38px; height: 38px; }
.footer-signature strong, .footer-signature span { display: block; }
.footer-signature strong { font: 400 18px var(--mono); }
.footer-signature span { color: var(--muted); font: 10px var(--mono); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--muted); font-size: 12px; text-decoration: none; }
.footer-links a:hover { color: var(--ink); }
.footer-meta { grid-column: 1 / -1; margin: 50px 0 0; color: var(--thought); font: 9px var(--mono); letter-spacing: .08em; }

@media (max-width: 980px) {
  :root { --shell: min(100% - 40px, 760px); }
  .menu-toggle { display: grid; width: 40px; height: 40px; padding: 11px 8px; border: 1px solid var(--border); border-radius: 6px; background: transparent; }
  .menu-toggle span { display: block; height: 1px; background: var(--ink); }
  .site-nav { position: absolute; top: 72px; left: 0; display: none; width: 100%; padding: 22px 20px 28px; flex-direction: column; align-items: stretch; gap: 8px; border-bottom: 1px solid var(--border); background: var(--canvas); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 0; font-size: 15px; }
  .site-nav .nav-code { margin-top: 8px; text-align: center; }
  .hero { min-height: 760px; grid-template-columns: 1fr; }
  .hero-copy { padding: 110px 0; }
  .split-heading { grid-template-columns: 1fr; gap: 25px; }
  .server-intro { grid-template-columns: 1fr; gap: 25px; }
  .server-grid { grid-template-columns: 1fr; }
  .server-grid article { min-height: auto; }
  .server-grid article + article { border-top: 1px solid var(--border); border-left: 0; }
  .server-grid h3 { margin-top: 42px; }
  .principle-grid, .stack-flow { grid-template-columns: 1fr 1fr; }
  .principle-grid article:nth-child(3) { border-left: 0; border-top: 1px solid var(--border); }
  .principle-grid article:nth-child(4) { border-top: 1px solid var(--border); }
  .stack-flow article:nth-child(2)::after { display: none; }
  .install-section { grid-template-columns: 1fr; }
  .install-command { align-self: auto; }
  .module-card { grid-template-columns: 50px 1fr; }
  .module-card ul, .module-card .module-links { grid-column: 2; }
  .module-links { flex-direction: row; }
  .model-grid, .contact-grid { grid-template-columns: 1fr; }
  .model-card { min-height: auto; }
  .model-glyph { margin-bottom: 35px; }
  .model-card p { min-height: 0; }
  .page-intro { width: var(--shell); margin-inline: auto; }
}

@media (max-width: 640px) {
  :root { --shell: calc(100% - 32px); }
  .brand svg { width: 138px; }
  .hero { min-height: 680px; }
  .hero-copy { padding: 78px 0 90px; }
  .hero h1 { font-size: clamp(38px, 12vw, 58px); }
  .hero-lead { font-size: 16px; }
  .hero-actions, .home-cta > div { flex-direction: column; }
  .hero-facts { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 44px; }
  .hero-facts span, .hero-facts span + span { padding: 0; border: 0; }
  .site-backdrop { opacity: .12; }
  .tui-section, .server-grade, .principles, .stack { padding: 82px 0; }
  .install-command { padding: 24px; flex-wrap: wrap; }
  .copy-command { margin-left: 36px; flex-basis: 100%; }
  .section-heading { margin-bottom: 38px; }
  .principle-grid, .stack-flow { grid-template-columns: 1fr; }
  .principle-grid article + article { border-top: 1px solid var(--border); border-left: 0; }
  .stack-flow article::after { display: none; }
  .dashboard-shot figcaption { grid-template-columns: 1fr; }
  .dashboard-shot figcaption span { grid-row: auto; }
  .install-modes { grid-template-columns: 1fr; }
  .install-modes article + article { border-top: 1px solid var(--border); border-left: 0; }
  .page-intro { padding: 100px 0 70px; }
  .page-intro h1 { font-size: clamp(50px, 15vw, 74px); }
  .module-card { grid-template-columns: 1fr; gap: 18px; padding: 42px 0; }
  .module-card ul, .module-card .module-links { grid-column: 1; }
  .module-links { flex-direction: column; }
  .boundary-note { padding: 28px; }
  .dependency-line { flex-wrap: wrap; gap: 12px; }
  .model-section-head { display: block; }
  .model-section-head p { margin-top: 10px; }
  .compatibility { grid-template-columns: 1fr; gap: 28px; }
  .footer-shell { grid-template-columns: 1fr; }
  .footer-links { margin-top: 34px; flex-wrap: wrap; }
  .footer-meta { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
