:root {
  --bg: #101310;
  --bg-deep: #0a0c0a;
  --surface: #151915;
  --surface-2: #1b211b;
  --line: #465046;
  --line-soft: #2b332b;
  --green: #5f7e62;
  --green-bright: #7f9d81;
  --green-dark: #26362a;
  --text: #d7dbd4;
  --text-strong: #f2f4ef;
  --muted: #979f96;
  --shell: 1180px;
  --pad: clamp(20px, 4vw, 54px);
  --heading: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "IBM Plex Sans", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::selection {
  background: var(--green);
  color: var(--text-strong);
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.shell {
  width: min(calc(100% - (var(--pad) * 2)), var(--shell));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 1000;
  transform: translateY(-150%);
  background: var(--text-strong);
  color: var(--bg-deep);
  padding: 10px 14px;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  background: rgba(10, 12, 10, 0.78);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(12px);
  transition: background 180ms ease, border-color 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(10, 12, 10, 0.95);
  border-bottom-color: var(--line-soft);
}

.nav-shell {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  transition: min-height 180ms ease;
}

.site-header.is-scrolled .nav-shell {
  min-height: 62px;
}

.site-name {
  color: var(--text-strong);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: clamp(18px, 3vw, 36px);
  align-items: center;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 150ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text-strong);
}

.hero {
  position: relative;
  min-height: min(92vh, 900px);
  padding-top: 82px;
  overflow: hidden;
  background: var(--bg-deep);
  display: flex;
  align-items: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 75%);
}

.hero-content {
  position: relative;
  z-index: 4;
  padding-top: clamp(28px, 5vh, 74px);
  padding-bottom: clamp(180px, 25vh, 260px);
}

.eyebrow,
.project-kicker {
  margin: 0;
  color: var(--green-bright);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 900px;
  margin: 14px 0 8px;
  color: var(--text-strong);
  font-family: var(--body);
  font-size: clamp(3.6rem, 8.5vw, 7.5rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.hero-positioning {
  margin: 0;
  color: var(--text-strong);
  font-family: var(--heading);
  font-size: clamp(1.35rem, 2.8vw, 2.25rem);
  font-weight: 600;
  letter-spacing: 0.035em;
  line-height: 1.15;
}

.hero-description {
  max-width: 650px;
  margin: 22px 0 0;
  color: var(--text);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.75;
}

.ridge-lines {
  position: absolute;
  inset: auto 0 0;
  height: clamp(190px, 28vh, 290px);
  pointer-events: none;
  z-index: 2;
}

.ridge {
  position: absolute;
  inset: auto 0 0;
  width: 100%;
  height: 100%;
}

.ridge-far {
  fill: #1b271e;
  opacity: 0.8;
}

.ridge-mid {
  fill: #26372a;
  opacity: 0.94;
}

.ridge-near {
  fill: #111711;
}

.page-flow {
  background: var(--bg);
}

.section {
  padding: clamp(84px, 10vw, 145px) 0;
}

.section-rule {
  height: 2px;
  width: 100%;
  margin-bottom: clamp(40px, 6vw, 72px);
  background: linear-gradient(90deg, var(--green) 0 90px, var(--line) 90px 100%);
}

.section h2,
.contact-intro h2 {
  margin: 0;
  color: var(--text-strong);
  font-family: var(--heading);
  font-size: clamp(3.2rem, 7vw, 6.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 0.86;
  text-transform: uppercase;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.7fr);
  gap: clamp(36px, 8vw, 110px);
  align-items: start;
}

.section-grid-narrow {
  max-width: 1050px;
}

.section-copy {
  max-width: 720px;
}

.section-copy p {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.08rem, 1.6vw, 1.3rem);
  line-height: 1.8;
}

.section-copy p + p {
  margin-top: 24px;
}

.section-heading-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 48px;
  align-items: end;
  margin-bottom: clamp(60px, 8vw, 100px);
}

.section-heading-row > p {
  margin: 0 0 4px;
  max-width: 430px;
  color: var(--muted);
  line-height: 1.7;
}

.project-list {
  display: grid;
  gap: clamp(90px, 13vw, 160px);
}

.project-row {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: clamp(42px, 7vw, 94px);
  align-items: center;
}

.project-row-reverse .project-visual {
  order: 2;
}

.project-row-reverse .project-copy {
  order: 1;
}

.project-visual {
  position: relative;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  background: #0c0f0c;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: clamp(24px, 4vw, 48px);
}

.project-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(127,157,129,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127,157,129,.04) 1px, transparent 1px);
  background-size: 32px 32px;
}

.visual-label {
  position: absolute;
  left: 14px;
  bottom: 10px;
  color: #697168;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mock-window {
  position: relative;
  z-index: 1;
  width: min(88%, 560px);
  min-height: 68%;
  border: 1px solid #536153;
  background: #141914;
  box-shadow: 14px 14px 0 rgba(0,0,0,.22);
}

.mock-topbar {
  height: 38px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #3b463b;
  color: #a8b1a6;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.dad-window {
  padding-bottom: 16px;
}

.dad-drop {
  margin: 26px auto 18px;
  width: min(68%, 300px);
  padding: 28px 12px;
  border: 1px dashed #607461;
  color: #8fa890;
  font-family: var(--heading);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-align: center;
}

.dad-flow {
  margin: 0 auto;
  width: min(82%, 390px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #b6beb4;
  font-size: .63rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.dad-flow i {
  height: 1px;
  flex: 1;
  background: #4d5b4e;
}

.mock-status {
  margin: 18px auto 0;
  color: #6f7d6f;
  font-size: .65rem;
  text-align: center;
}

.lab-columns {
  display: grid;
  grid-template-columns: 28% 1fr;
  min-height: 190px;
}

.lab-nav {
  padding: 22px 16px;
  border-right: 1px solid #344034;
  display: grid;
  align-content: start;
  gap: 12px;
}

.lab-nav span {
  height: 8px;
  background: #2d382e;
}

.lab-nav span:nth-child(2) {
  width: 76%;
}

.lab-nav span:nth-child(3) {
  width: 88%;
}

.lab-content {
  padding: 26px 24px;
}

.lab-content b {
  color: #d7ddd5;
  font-size: .95rem;
}

.lab-content p {
  max-width: 280px;
  color: #899388;
  font-size: .72rem;
  line-height: 1.5;
}

.lab-source {
  display: inline-block;
  margin-top: 8px;
  padding: 5px 8px;
  border: 1px solid #506151;
  color: #7f987f;
  font-size: .58rem;
  letter-spacing: .08em;
}

.command-grid {
  padding: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.command-grid div {
  min-height: 75px;
  padding: 12px;
  border: 1px solid #334034;
  background: #111511;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.command-grid small {
  color: #667166;
  font-size: .55rem;
  letter-spacing: .1em;
}

.command-grid strong {
  color: #8fa08f;
  font-family: var(--heading);
  font-size: 1rem;
  letter-spacing: .08em;
}

.project-copy h3 {
  margin: 12px 0 22px;
  color: var(--text-strong);
  font-family: var(--heading);
  font-size: clamp(2.3rem, 4.4vw, 4.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 0.95;
  text-transform: uppercase;
}

.project-copy > p:not(.project-kicker) {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.8;
}

.project-tags {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.project-tags li {
  position: relative;
  padding-left: 12px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.project-tags li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72em;
  width: 5px;
  height: 5px;
  background: var(--green);
  transform: translateY(-50%) rotate(45deg);
}

.capability-list {
  border-top: 1px solid var(--line-soft);
}

.capability-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: clamp(28px, 5vw, 70px);
  padding: 36px 0;
  border-bottom: 1px solid var(--line-soft);
}

.capability-number {
  color: var(--green-bright);
  font-family: var(--heading);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: .1em;
}

.capability-item h3 {
  margin: 0 0 8px;
  color: var(--text-strong);
  font-family: var(--heading);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.capability-item p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(360px, 1.15fr);
  gap: clamp(54px, 10vw, 140px);
  align-items: start;
}

.contact-intro p {
  max-width: 470px;
  margin: 30px 0 24px;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.75;
}

.text-link {
  color: var(--green-bright);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--green-dark);
}

.text-link:hover,
.text-link:focus-visible {
  border-bottom-color: var(--green-bright);
}

.contact-form {
  display: grid;
  gap: 10px;
}

.contact-form label {
  margin-top: 12px;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  background: #0d100d;
  color: var(--text-strong);
  padding: 14px 16px;
  transition: border-color 150ms ease, background 150ms ease;
}

.contact-form textarea {
  resize: vertical;
  min-height: 150px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--green-bright);
  background: #111511;
}

.contact-form button {
  justify-self: start;
  margin-top: 12px;
  border: 1px solid var(--green);
  border-radius: 0;
  background: var(--green-dark);
  color: var(--text-strong);
  padding: 13px 20px;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.contact-form button:hover,
.contact-form button:focus-visible {
  background: #314737;
}

.form-status {
  margin: 8px 0 0;
  color: #747c73;
  font-size: .72rem;
}

.site-footer {
  border-top: 1px solid var(--line-soft);
  background: var(--bg-deep);
}

.footer-inner {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  color: #6f776e;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.patch-wrap {
  position: fixed;
  right: clamp(16px, 2.5vw, 30px);
  bottom: clamp(16px, 2.5vw, 30px);
  z-index: 200;
}

.patch-trigger {
  min-width: 112px;
  height: 48px;
  padding: 0 16px 0 12px;
  border: 1px solid #536c56;
  border-radius: 0;
  background: #172119;
  color: var(--text-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0,0,0,.28);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.patch-trigger:hover,
.patch-trigger:focus-visible {
  background: #1f2e22;
}

.patch-trigger-mark,
.patch-mark {
  position: relative;
  width: 22px;
  height: 22px;
  display: inline-block;
}

.patch-trigger-mark i,
.patch-mark span {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid var(--green-bright);
  transform: rotate(45deg);
}

.patch-trigger-mark i:first-child,
.patch-mark span:first-child {
  left: 1px;
  top: 1px;
}

.patch-trigger-mark i:last-child,
.patch-mark span:last-child {
  right: 1px;
  bottom: 1px;
  border-color: #3f5743;
}

.patch-panel {
  position: absolute;
  right: 0;
  bottom: 60px;
  width: min(390px, calc(100vw - 32px));
  border: 1px solid #435345;
  background: #0d110e;
  box-shadow: 0 24px 70px rgba(0,0,0,.48);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.patch-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.patch-header {
  min-height: 64px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 28px 1fr 30px;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid #2d392f;
}

.patch-header strong {
  display: block;
  color: var(--text-strong);
  font-size: .85rem;
}

.patch-header small {
  display: block;
  margin-top: 1px;
  color: #697268;
  font-size: .62rem;
}

.patch-close {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #7b847a;
  cursor: pointer;
  font-size: 1.35rem;
}

.patch-body {
  padding: 18px;
}

.patch-intro {
  margin: 0 0 16px;
  color: #aeb5ad;
  font-size: .83rem;
  line-height: 1.6;
}

.patch-prompts {
  display: grid;
  gap: 8px;
}

.patch-prompts button {
  width: 100%;
  border: 1px solid #334135;
  border-radius: 0;
  background: #131813;
  color: #aeb7ad;
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  font-size: .74rem;
}

.patch-prompts button:hover,
.patch-prompts button:focus-visible {
  border-color: #526755;
  color: var(--text-strong);
}

.patch-response {
  margin-top: 14px;
  padding: 13px 14px;
  border-left: 2px solid var(--green);
  background: #141a15;
  color: #bec5bc;
  font-size: .78rem;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .section-grid,
  .section-heading-row,
  .project-row,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .section-grid {
    gap: 34px;
  }

  .section-heading-row {
    gap: 24px;
  }

  .section-heading-row > p {
    max-width: 610px;
  }

  .project-row,
  .project-row-reverse {
    gap: 34px;
  }

  .project-row-reverse .project-visual,
  .project-row-reverse .project-copy {
    order: initial;
  }

  .project-row .project-visual {
    order: 1;
  }

  .project-row .project-copy {
    order: 2;
  }

  .contact-form {
    max-width: 680px;
  }
}

@media (max-width: 680px) {
  :root {
    --pad: 20px;
  }

  html {
    scroll-padding-top: 68px;
  }

  .nav-shell {
    min-height: 64px;
    gap: 20px;
  }

  .site-header.is-scrolled .nav-shell {
    min-height: 56px;
  }

  .site-name {
    font-size: .82rem;
  }

  .site-nav {
    gap: 14px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav a {
    font-size: .64rem;
  }

  .site-nav a:nth-child(2),
  .site-nav a:nth-child(3) {
    display: none;
  }

  .hero {
    min-height: 88svh;
    padding-top: 64px;
  }

  .hero-content {
    padding-bottom: 190px;
  }

  .hero h1 {
    font-size: clamp(3.15rem, 15vw, 5.3rem);
  }

  .hero-positioning {
    max-width: 330px;
    font-size: 1.35rem;
  }

  .hero-description {
    max-width: 360px;
    font-size: .95rem;
  }

  .ridge-lines {
    height: 180px;
  }

  .section {
    padding: 78px 0;
  }

  .section-rule {
    margin-bottom: 36px;
    background: linear-gradient(90deg, var(--green) 0 56px, var(--line) 56px 100%);
  }

  .section h2,
  .contact-intro h2 {
    font-size: clamp(3rem, 15vw, 5rem);
  }

  .project-list {
    gap: 90px;
  }

  .project-visual {
    padding: 18px;
    aspect-ratio: 4 / 3;
  }

  .mock-window {
    width: 94%;
  }

  .visual-label {
    left: 8px;
    bottom: 6px;
    font-size: .5rem;
  }

  .project-copy h3 {
    font-size: 2.8rem;
  }

  .capability-item {
    grid-template-columns: 42px 1fr;
    gap: 18px;
    padding: 28px 0;
  }

  .capability-number {
    font-size: .95rem;
  }

  .footer-inner {
    min-height: 76px;
  }

  .patch-wrap {
    right: 14px;
    bottom: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
