:root {
  --accent: #2d7d9a;
  --accent-light: #e8f4f8;
  --accent-dark: #1e5f77;
  --accent-glow: rgba(45, 125, 154, 0.18);

  --bg: #fafaf8;
  --bg-alt: #f1f0ed;
  --surface: #ffffff;
  --surface-2: #f7f6f3;
  --border: #e4e3df;
  --text: #1a1a18;
  --text-muted: #6b6b66;
  --text-subtle: #9a9a94;
  --nav-bg: rgba(250, 250, 248, 0.92);

  --success-bg: #edf6f1;
  --success-text: #3f7259;
  --warm-bg: #fff5e8;
  --warm-text: #9b6724;

  --shadow: 0 2px 16px rgba(0,0,0,0.07);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.10);

  --font-display: "DM Serif Display", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;

  --nav-h: 68px;
  --section-gap: 100px;
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.22s ease;
}

[data-theme="dark"] {
  --bg: #0f0f0e;
  --bg-alt: #171715;
  --surface: #1c1c1a;
  --surface-2: #222220;
  --border: #2e2e2b;
  --text: #f0efea;
  --text-muted: #aaa9a2;
  --text-subtle: #6b6b66;
  --nav-bg: rgba(15, 15, 14, 0.93);
  --shadow: 0 2px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.45);
  --accent-light: #1a3a45;
  --accent-glow: rgba(45, 125, 154, 0.25);
  --success-bg: #1d3026;
  --success-text: #8ec4a3;
  --warm-bg: #332718;
  --warm-text: #d3a25f;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
}

body.menu-open,
body.lightbox-open {
  overflow: hidden;
}

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

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

button {
  font: inherit;
}

ul {
  list-style: none;
}

::selection {
  background: var(--accent);
  color: #fff;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: .75rem 1.15rem;
  border-radius: 0 0 8px 0;
  background: var(--accent);
  color: #fff;
  font-size: .85rem;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

.nav {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  height: var(--nav-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 2.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background var(--transition), border-color var(--transition), box-shadow .3s ease, transform .35s cubic-bezier(.22,1,.36,1);
}

.nav.scrolled {
  box-shadow: 0 4px 32px rgba(0,0,0,.10);
}

.nav.nav--hidden {
  transform: translateY(-100%);
}

.nav__logo {
  justify-self: start;
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: .02em;
}

.nav__logo span {
  color: var(--accent);
}

.nav__links {
  display: flex;
  gap: 2rem;
  justify-self: center;
}

.nav__links a {
  position: relative;
  color: var(--text-muted);
  font-size: .88rem;
  transition: color var(--transition);
}

.nav__links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--accent);
}

.nav__links a:hover::after,
.nav__links a.active::after {
  width: 100%;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  justify-self: end;
}

.theme-toggle {
  position: relative;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
}

.theme-toggle:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.theme-icon {
  position: absolute;
  width: 17px;
  height: 17px;
  transition: opacity .2s, transform .25s;
}

.theme-icon.sun {
  opacity: 1;
  transform: rotate(0);
}

.theme-icon.moon {
  opacity: 0;
  transform: rotate(90deg);
}

[data-theme="dark"] .theme-icon.sun {
  opacity: 0;
  transform: rotate(-90deg);
}

[data-theme="dark"] .theme-icon.moon {
  opacity: 1;
  transform: rotate(0);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .72rem 1.45rem;
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .01em;
  cursor: pointer;
  transition: all var(--transition);
}

.btn--primary,
.btn--nav {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover,
.btn--nav:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.btn--nav {
  padding: .5rem 1.1rem;
  font-size: .85rem;
}

.btn--ghost {
  border-color: var(--border);
  background: transparent;
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  border: 0;
  background: none;
  cursor: pointer;
}

.nav__burger span {
  width: 24px;
  height: 2px;
  display: block;
  border-radius: 2px;
  background: var(--text);
  transition: all var(--transition);
}

.mobile-menu {
  position: fixed;
  z-index: 99;
  top: var(--nav-h);
  right: 0;
  left: 0;
  display: none;
  padding: 1.25rem 2rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.mobile-menu.open {
  display: grid;
  gap: 1rem;
}

.mobile-menu a {
  color: var(--text-muted);
  font-weight: 500;
}

.mobile-menu a:hover {
  color: var(--accent);
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 4rem) 0 5rem;
  overflow: hidden;
}

.hero__wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 80% 30%, var(--accent-glow), transparent 26%),
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: auto, 52px 52px, 52px 52px;
  opacity: .18;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), transparent 80%);
}

.hero__grid {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(370px, .82fr);
  gap: 4.5rem;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: 1.25rem;
  color: var(--accent);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.availability-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-glow);
}

.hero__heading {
  max-width: 660px;
  margin-bottom: 1.35rem;
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 5vw, 4.25rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.025em;
}

.hero__heading em,
.section-heading h2 em,
.about-heading em,
.contact-grid h2 em {
  color: var(--accent);
  font-weight: 400;
}

.hero__sub {
  max-width: 610px;
  margin-bottom: 2rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2.4rem;
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
}

.hero__meta div {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.hero__meta span {
  color: var(--text-subtle);
  font-size: .75rem;
}

.hero__meta strong {
  font-size: .88rem;
  font-weight: 500;
}

.featured-system {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.featured-system__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-subtle);
  font-size: .76rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: .32rem .72rem;
  border: 1px solid color-mix(in srgb, var(--success-text) 22%, transparent);
  border-radius: 100px;
  background: var(--success-bg);
  color: var(--success-text);
  font-size: .74rem;
  font-weight: 600;
}

.featured-system__body {
  padding: 1.8rem;
}

.system-index,
.mini-label,
.project-kind,
.section-label {
  color: var(--accent);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.featured-system h2 {
  margin: .75rem 0 .8rem;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.2;
}

.featured-system__body > p {
  color: var(--text-muted);
  font-size: .92rem;
}

.system-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .55rem;
  margin-top: 1.6rem;
}

.system-flow div {
  min-width: 0;
  padding: .75rem .55rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  text-align: center;
}

.system-flow span {
  display: block;
  margin-bottom: .25rem;
  color: var(--accent);
  font-size: .68rem;
}

.system-flow strong {
  font-size: .78rem;
  font-weight: 500;
}

.system-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .65rem;
  margin-top: 1rem;
}

.system-metrics div {
  padding: .9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.system-metrics strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 400;
  line-height: 1;
}

.system-metrics span {
  display: block;
  margin-top: .35rem;
  color: var(--text-subtle);
  font-size: .72rem;
}

.featured-system__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  padding: 1rem 1.15rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.featured-system__tags span,
.tag-row span {
  padding: .3rem .7rem;
  border: 1px solid rgba(45,125,154,.20);
  border-radius: 100px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: .75rem;
  font-weight: 500;
}

.proof-band {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.proof-band__inner {
  min-height: 66px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: stretch;
}

.proof-band__inner span {
  display: grid;
  place-items: center;
  padding: .8rem 1rem;
  border-right: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .78rem;
  text-align: center;
}

.proof-band__inner span:last-child {
  border-right: 0;
}

.section {
  padding: var(--section-gap) 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .55fr);
  gap: 4rem;
  align-items: end;
  margin-bottom: 3rem;
}

.section-heading h2,
.about-heading,
.contact-grid h2 {
  max-width: 720px;
  margin-top: .7rem;
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 4vw, 3.35rem);
  font-weight: 400;
  line-height: 1.13;
  letter-spacing: -.018em;
}

.section-heading > p {
  color: var(--text-muted);
  font-size: .98rem;
}

.case-study {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.case-study--featured {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
}

.case-study__copy {
  padding: 2.5rem;
  border-right: 1px solid var(--border);
}

.case-study__eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  color: var(--text-subtle);
  font-size: .78rem;
}

.case-study__copy h3 {
  margin-top: 1.2rem;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 3.7vw, 3.25rem);
  font-weight: 400;
  line-height: 1.08;
}

.case-study__lead {
  margin-top: 1.2rem;
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

.case-study__columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
  margin-top: 1.7rem;
}

.case-study__columns p {
  margin-top: .4rem;
  color: var(--text-muted);
  font-size: .88rem;
}

.case-list {
  display: grid;
  gap: .55rem;
  margin-top: 1.6rem;
  padding-top: 1.45rem;
  border-top: 1px solid var(--border);
}

.case-list li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: .88rem;
}

.case-list li::before {
  content: "";
  position: absolute;
  top: .67em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.case-study__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin-top: 1.7rem;
}

.inline-link {
  padding-bottom: .1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: .86rem;
  font-weight: 600;
  transition: color var(--transition), border-color var(--transition);
}

.inline-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.link-button {
  border-top: 0;
  border-right: 0;
  border-left: 0;
  background: transparent;
  cursor: pointer;
}

.case-study__visual {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.35rem;
  background: var(--surface-2);
}

.screenshot-card {
  width: 100%;
  flex: 1;
  display: block;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: zoom-in;
}

.screenshot-card img {
  width: 100%;
  height: 100%;
  min-height: 500px;
  object-fit: contain;
  transition: transform .28s ease;
}

.screenshot-card:hover img {
  transform: scale(1.01);
}

.screenshot-caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem .15rem 0;
  color: var(--text-subtle);
  font-size: .76rem;
}

.evidence-gallery {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  border-top: 1px solid var(--border);
  background: var(--border);
}

.evidence-gallery[hidden] {
  display: none;
}

.evidence-gallery figure {
  padding: 1.1rem;
  background: var(--surface-2);
}

.evidence-gallery figure.wide {
  grid-column: 1 / -1;
}

.evidence-gallery .screenshot-card {
  height: 360px;
}

.evidence-gallery .screenshot-card img {
  min-height: 0;
  height: 100%;
}

.evidence-gallery figcaption {
  margin-top: .65rem;
  color: var(--text-subtle);
  font-size: .76rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.project-card,
.capability-card,
.process-grid article {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.project-card {
  min-height: 330px;
  padding: 1.8rem;
}

.project-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.project-number {
  color: var(--text-subtle);
  font-family: var(--font-display);
  font-size: 1.4rem;
}

.project-card h3 {
  max-width: 500px;
  margin-top: 3rem;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.15;
}

.project-card > p {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: .92rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: 1.5rem;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.capability-card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  padding: 1.8rem;
}

.capability-number {
  color: var(--accent);
  font-size: .8rem;
  font-weight: 600;
}

.capability-card h3 {
  margin-top: 2.4rem;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 400;
}

.capability-card p {
  margin-top: .75rem;
  color: var(--text-muted);
  font-size: .9rem;
}

.capability-card code {
  margin-top: auto;
  padding-top: 1.3rem;
  color: var(--accent);
  font-size: .77rem;
}

.stack-table {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stack-row {
  display: grid;
  grid-template-columns: .8fr 1.7fr .55fr;
  border-bottom: 1px solid var(--border);
}

.stack-row:last-child {
  border-bottom: 0;
}

.stack-row > * {
  padding: 1rem 1.2rem;
  border-right: 1px solid var(--border);
}

.stack-row > *:last-child {
  border-right: 0;
}

.stack-row strong {
  font-size: .92rem;
  font-weight: 600;
}

.stack-row span {
  color: var(--text-muted);
  font-size: .88rem;
}

.stack-row--head {
  background: var(--surface-2);
}

.stack-row--head span {
  color: var(--text-subtle);
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.stack-status {
  color: var(--warm-text) !important;
  font-size: .76rem !important;
  font-weight: 600;
  text-transform: uppercase;
}

.stack-status--core {
  color: var(--success-text) !important;
}

.about-grid {
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: 5rem;
}

.about-copy {
  max-width: 680px;
}

.about-lead {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.5vw, 2.15rem);
  line-height: 1.4;
}

.about-copy > p:not(.about-lead) {
  margin-top: 1.5rem;
  color: var(--text-muted);
  font-size: 1rem;
}

.principles {
  margin-top: 2.2rem;
  border-top: 1px solid var(--border);
}

.principles div {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.principles span {
  color: var(--accent);
  font-size: .76rem;
  font-weight: 600;
}

.principles strong {
  font-weight: 500;
}

.process-section {
  border-bottom: 1px solid var(--border);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.process-grid article {
  min-height: 245px;
  padding: 1.55rem;
}

.process-grid article > span {
  color: var(--accent);
  font-size: .78rem;
  font-weight: 600;
}

.process-grid h3 {
  margin-top: 2.2rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.2;
}

.process-grid p {
  margin-top: .7rem;
  color: var(--text-muted);
  font-size: .88rem;
}

.contact-section {
  padding: 100px 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 5rem;
}

.contact-copy > p {
  color: var(--text-muted);
  font-size: 1.02rem;
}

.contact-links {
  margin-top: 2rem;
  border-top: 1px solid var(--border);
}

.contact-links a {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 1rem;
  align-items: center;
  min-height: 74px;
  border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}

.contact-links a > span:first-child {
  color: var(--text-subtle);
  font-size: .78rem;
}

.contact-links strong {
  font-weight: 500;
}

.contact-links a:hover {
  color: var(--accent);
}

.footer {
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.footer .container {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  color: var(--text-subtle);
  font-size: .78rem;
}

.footer a {
  color: var(--accent);
  font-weight: 600;
}

.lightbox {
  position: fixed;
  z-index: 300;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(10,10,10,.88);
  backdrop-filter: blur(10px);
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: min(1400px, 94vw);
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
}

.lightbox__close {
  position: fixed;
  top: 1.25rem;
  right: 1.4rem;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  background: rgba(0,0,0,.35);
  color: #fff;
  cursor: pointer;
  font-size: 1.4rem;
}

@media (max-width: 980px) {
  .hero__grid,
  .section-heading,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .featured-system {
    max-width: 680px;
  }

  .case-study--featured {
    grid-template-columns: 1fr;
  }

  .case-study__copy {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

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

  .proof-band__inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .proof-band__inner span:nth-child(2) {
    border-right: 0;
  }

  .proof-band__inner span:nth-child(-n+2) {
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 820px) {
  .nav {
    grid-template-columns: 1fr auto auto;
    padding: 0 1.5rem;
  }

  .nav__links {
    display: none;
  }

  .nav__burger {
    display: flex;
    margin-left: .25rem;
  }

  .nav__actions .btn--nav {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--nav-h) + 4rem);
  }

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

  .hero__heading {
    font-size: clamp(2.55rem, 8vw, 3.5rem);
  }

  .project-grid,
  .capability-grid,
  .evidence-gallery {
    grid-template-columns: 1fr;
  }

  .evidence-gallery figure.wide {
    grid-column: auto;
  }

  .stack-row {
    grid-template-columns: .8fr 1.3fr;
  }

  .stack-row > *:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--border);
  }

  .stack-row--head > *:last-child {
    display: none;
  }
}

@media (max-width: 620px) {
  :root {
    --section-gap: 78px;
  }

  .container {
    padding: 0 1.1rem;
  }

  .nav {
    padding: 0 1rem;
  }

  .hero {
    padding-bottom: 4rem;
  }

  .hero__heading {
    font-size: clamp(2.35rem, 11vw, 3.15rem);
  }

  .hero__sub {
    font-size: 1rem;
  }

  .hero__meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .system-flow,
  .system-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .proof-band__inner {
    grid-template-columns: 1fr;
  }

  .proof-band__inner span,
  .proof-band__inner span:nth-child(2) {
    min-height: 58px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .proof-band__inner span:last-child {
    border-bottom: 0;
  }

  .section-heading h2,
  .about-heading,
  .contact-grid h2 {
    font-size: clamp(2.1rem, 10vw, 2.75rem);
  }

  .case-study__copy {
    padding: 1.5rem;
  }

  .case-study__columns {
    grid-template-columns: 1fr;
  }

  .screenshot-card img {
    min-height: 330px;
  }

  .evidence-gallery .screenshot-card {
    height: 280px;
  }

  .project-card,
  .capability-card {
    padding: 1.45rem;
  }

  .stack-row,
  .stack-row--head {
    grid-template-columns: 1fr;
  }

  .stack-row--head {
    display: none;
  }

  .stack-row {
    padding: .8rem 0;
  }

  .stack-row > * {
    padding: .3rem 1rem;
    border-right: 0;
  }

  .stack-row > *:last-child {
    grid-column: auto;
    border-top: 0;
  }

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

  .contact-links a {
    grid-template-columns: 1fr auto;
    padding: .8rem 0;
  }

  .contact-links a > span:first-child {
    grid-column: 1 / -1;
  }

  .contact-links strong {
    overflow-wrap: anywhere;
  }

  .footer .container {
    min-height: 110px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: .3rem;
  }
}

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

  *, *::before, *::after {
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* ============================================================
   CONTACT FORM
   ============================================================ */
.inquiry-shell {
  display: grid;
  grid-template-columns: .72fr 1.28fr;
  gap: 0;
  margin-top: 4.5rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.inquiry-intro {
  padding: 2.25rem;
  border-right: 1px solid var(--border);
  background: var(--surface-2);
}

.inquiry-intro h3 {
  margin-top: .7rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 2.7rem);
  font-weight: 400;
  line-height: 1.15;
}

.inquiry-intro > p {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: .95rem;
}

.inquiry-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  margin-top: 2rem;
  color: var(--text-subtle);
  font-size: .78rem;
}

.inquiry-flow span:nth-child(odd) {
  padding: .38rem .65rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 500;
}

.contact-form {
  position: relative;
  padding: 2.25rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-field {
  min-width: 0;
}

.form-field--full {
  grid-column: 1 / -1;
}

.form-field label {
  display: block;
  margin-bottom: .5rem;
  color: var(--text);
  font-size: .86rem;
  font-weight: 600;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: .95rem;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    background var(--transition);
}

.form-field input,
.form-field select {
  height: 50px;
  padding: 0 .95rem;
}

.form-field textarea {
  min-height: 170px;
  padding: .9rem .95rem;
  resize: vertical;
  line-height: 1.65;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--text-subtle);
}

.form-field select {
  cursor: pointer;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
  background: var(--surface);
}

.form-field.is-invalid input,
.form-field.is-invalid select,
.form-field.is-invalid textarea {
  border-color: #b44f4f;
  box-shadow: 0 0 0 3px rgba(180,79,79,.10);
}

.field-error {
  display: block;
  min-height: 1.15rem;
  margin-top: .35rem;
  color: #a84444;
  font-size: .75rem;
}

.field-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.field-meta > small:last-child {
  margin-top: .35rem;
  color: var(--text-subtle);
  font-size: .75rem;
}

.form-honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 1.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
}

.form-note {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  max-width: 520px;
  color: var(--text-subtle);
  font-size: .78rem;
  line-height: 1.55;
}

.form-note__dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  margin-top: .4rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.submit-button {
  min-width: 142px;
  position: relative;
}

.submit-button:disabled {
  cursor: wait;
  opacity: .72;
  transform: none;
}

.submit-button__spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: form-spin .75s linear infinite;
}

.submit-button.is-loading .submit-button__label {
  display: none;
}

.submit-button.is-loading .submit-button__spinner {
  display: inline-block;
}

.form-status {
  margin-top: 1rem;
  padding: .9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: .86rem;
}

.form-status.is-info {
  border-color: rgba(45,125,154,.25);
  background: var(--accent-light);
  color: var(--accent-dark);
}

[data-theme="dark"] .form-status.is-info {
  color: #a3d4e4;
}

.form-status.is-success {
  border-color: color-mix(in srgb, var(--success-text) 30%, transparent);
  background: var(--success-bg);
  color: var(--success-text);
}

.form-status.is-error {
  border-color: rgba(180,79,79,.28);
  background: rgba(180,79,79,.08);
  color: #a84444;
}

[data-theme="dark"] .field-error,
[data-theme="dark"] .form-status.is-error {
  color: #e19a9a;
}

@keyframes form-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
  .inquiry-shell {
    grid-template-columns: 1fr;
  }

  .inquiry-intro {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 620px) {
  .inquiry-shell {
    margin-top: 3.25rem;
  }

  .inquiry-intro,
  .contact-form {
    padding: 1.4rem;
  }

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

  .form-field--full {
    grid-column: auto;
  }

  .form-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .submit-button {
    width: 100%;
  }
}


/* ============================================================
   INTERACTION LAYER — MOVING IONS + STRONGER PROJECT UX
   ============================================================ */
html { background: var(--bg); }
body { position: relative; background: transparent; }

.ion-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.nav, main, .footer, .mobile-menu { position: relative; z-index: 2; }

/* Semi-transparent surfaces preserve readability while revealing motion. */
.hero,
.section,
.contact-section {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
}

.section--alt {
  background: color-mix(in srgb, var(--bg-alt) 90%, transparent);
}

.proof-band,
.footer {
  background: color-mix(in srgb, var(--surface-2) 91%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav {
  background: color-mix(in srgb, var(--bg) 91%, transparent);
}

[data-theme="dark"] .nav {
  background: color-mix(in srgb, var(--bg) 90%, transparent);
}

.hero__wash {
  background: radial-gradient(circle at 80% 28%, var(--accent-glow), transparent 30%);
  opacity: .42;
  mask-image: none;
}

.case-study,
.project-card,
.capability-card,
.process-grid article,
.stack-table,
.featured-system,
.inquiry-shell {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Make the project actions impossible to miss. */
.case-study__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.9rem;
}

.case-cta {
  min-width: 230px;
  min-height: 68px;
  display: inline-grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: .8rem;
  padding: .8rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}

.case-cta:hover { transform: translateY(-2px); }

.case-cta--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 24px var(--accent-glow);
}

.case-cta--primary:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  box-shadow: 0 12px 30px var(--accent-glow);
}

.case-cta--secondary { background: var(--surface-2); color: var(--text); }
.case-cta--secondary:hover { border-color: var(--accent); background: var(--accent-light); }

.case-cta__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255,255,255,.13);
  font-size: 1.05rem;
}

.case-cta--secondary .case-cta__icon { background: var(--surface); color: var(--accent); }
.case-cta small, .case-cta strong { display: block; }
.case-cta small { margin-bottom: .12rem; opacity: .72; font-size: .68rem; font-weight: 400; }
.case-cta strong { font-size: .9rem; font-weight: 600; }

/* Visible zoom affordance on every screenshot. */
.screenshot-card { position: relative; isolation: isolate; }

.screenshot-card::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.42), transparent 34%);
  opacity: .38;
  pointer-events: none;
  transition: opacity var(--transition);
}

.screenshot-card:hover::after { opacity: .7; }

.zoom-hint {
  position: absolute;
  z-index: 2;
  right: .75rem;
  bottom: .75rem;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .75rem;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 8px;
  background: rgba(15,15,15,.78);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,.20);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: .75rem;
  font-weight: 600;
  transition: transform var(--transition), background var(--transition);
}

.screenshot-card:hover .zoom-hint { transform: translateY(-2px); background: rgba(15,15,15,.92); }

/* Sticky back-to-top arrow. */
.back-to-top {
  position: fixed;
  z-index: 80;
  right: max(1.15rem, calc((100vw - 1100px) / 2 - 3.6rem));
  bottom: 1.4rem;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--accent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 8px 24px var(--accent-glow); }
.back-to-top span { font-size: 1.2rem; line-height: 1; }

/* Gentle, restrained scroll reveals. */
.reveal,
.reveal-group > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s cubic-bezier(.22,1,.36,1), transform .6s cubic-bezier(.22,1,.36,1);
}
.reveal.is-visible,
.reveal-group > *.is-visible { opacity: 1; transform: translateY(0); }
.reveal-group > *:nth-child(2) { transition-delay: .06s; }
.reveal-group > *:nth-child(3) { transition-delay: .12s; }
.reveal-group > *:nth-child(4) { transition-delay: .18s; }

@media (max-width: 820px) {
  .back-to-top { right: 1rem; bottom: 1rem; }
}

@media (max-width: 620px) {
  .case-study__actions { display: grid; grid-template-columns: 1fr; }
  .case-cta { width: 100%; min-width: 0; }
  .zoom-hint { right: .55rem; bottom: .55rem; font-size: .7rem; }
  .hero, .section, .contact-section { background: color-mix(in srgb, var(--bg) 92%, transparent); }
  .section--alt { background: color-mix(in srgb, var(--bg-alt) 93%, transparent); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-group > * { opacity: 1 !important; transform: none !important; }
}


/* ============================================================
   FULL ION BACKDROP — NO FULL-WIDTH SECTION BACKGROUND COLORS
   ============================================================ */

html,
body {
  background: transparent !important;
}

.ion-canvas {
  opacity: 1;
}

/* The ion canvas is the only full-page backdrop. */
.hero,
.section,
.section--alt,
.contact-section,
.proof-band,
.footer {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.hero__wash {
  display: none !important;
}

/* Functional surfaces remain readable while the page around them is clear. */
.nav {
  background: color-mix(in srgb, var(--bg) 82%, transparent) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

[data-theme="dark"] .nav {
  background: color-mix(in srgb, var(--bg) 80%, transparent) !important;
}

.featured-system,
.case-study,
.project-card,
.capability-card,
.process-grid article,
.stack-table,
.inquiry-shell {
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.case-study__visual,
.featured-system__tags,
.inquiry-intro,
.stack-row--head {
  background: color-mix(in srgb, var(--surface-2) 86%, transparent);
}

.proof-band {
  border-top: 1px solid color-mix(in srgb, var(--border) 76%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 76%, transparent);
}

.footer {
  border-top-color: color-mix(in srgb, var(--border) 76%, transparent);
}

@media (max-width: 620px) {
  .hero,
  .section,
  .section--alt,
  .contact-section {
    background: transparent !important;
  }
}


/* Ion visibility revision: deliberately more visible in light mode. */
.ion-canvas {
  filter: saturate(1.12) contrast(1.04);
}

[data-theme="light"] .ion-canvas {
  filter: saturate(1.20) contrast(1.08);
}

[data-theme="dark"] .ion-canvas {
  filter: saturate(1.08) contrast(1.03);
}
