:root {
  --ink: #050505;
  --muted: #59645e;
  --paper: #f5f7f4;
  --surface: #ffffff;
  --line: #d8dfd8;
  --steel: #101010;
  --green: #13723f;
  --red: #c91f26;
  --deep-red: #8f151b;
  --shadow: 0 20px 45px rgba(5, 5, 5, 0.16);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
}

body.nav-open {
  overflow: hidden;
}

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

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 76px;
  padding: 14px 28px;
  color: #ffffff;
  transition:
    background 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease;
}

.site-header.is-scrolled,
.site-header.nav-active {
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: 0 12px 32px rgba(5, 5, 5, 0.11);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 800;
}

.brand-logo {
  flex: 0 0 auto;
  width: 84px;
  height: auto;
  aspect-ratio: 37 / 31;
  border-radius: 4px;
  background: #ffffff;
  object-fit: contain;
}

.brand > span {
  min-width: 0;
}

.brand strong,
.brand small {
  display: block;
  letter-spacing: 0;
}

.brand strong {
  font-size: 1rem;
}

.brand small {
  margin-top: 2px;
  color: currentColor;
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0.82;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.95rem;
  font-weight: 700;
}

.site-nav a {
  position: relative;
  padding: 8px 0;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 8px;
  background: var(--red);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  background: rgba(24, 33, 42, 0.18);
  color: currentColor;
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: 86svh;
  overflow: hidden;
  color: #ffffff;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(7, 42, 25, 0.56) 52%, rgba(0, 0, 0, 0.12)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(143, 21, 27, 0.1) 40%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 170px 0 86px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 680px;
  margin-bottom: 18px;
  font-size: 4.7rem;
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: 2.35rem;
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.2rem;
  line-height: 1.18;
  letter-spacing: 0;
}

p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.hero-copy {
  max-width: 650px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
}

.license-line {
  max-width: 690px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 20px;
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--red);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(201, 31, 38, 0.28);
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.78);
  color: #ffffff;
}

.section-band {
  background: #ffffff;
}

.intro,
.services,
.work,
.testing,
.projects,
.contact {
  padding: 88px 0;
}

.intro-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 52px;
  align-items: center;
}

.intro p:last-child {
  margin-bottom: 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.service-card {
  display: flex;
  min-height: 295px;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 28px rgba(5, 5, 5, 0.07);
}

.service-card:nth-child(2) {
  border-top: 5px solid var(--green);
}

.service-card:nth-child(3) {
  border-top: 5px solid var(--ink);
}

.service-card:nth-child(4) {
  border-top: 5px solid var(--deep-red);
}

.service-number {
  margin-bottom: 28px;
  color: var(--green);
  font-size: 0.88rem;
  font-weight: 900;
}

.service-card:first-child {
  border-top: 5px solid var(--red);
}

.service-card p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.work-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
}

.work-layout > div p {
  margin-bottom: 0;
}

.process-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: process;
}

.process-list li {
  position: relative;
  min-height: 96px;
  padding: 21px 22px 21px 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9faf8;
  counter-increment: process;
}

.process-list li::before {
  position: absolute;
  top: 22px;
  left: 20px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--steel);
  color: #ffffff;
  content: counter(process);
  font-size: 0.86rem;
  font-weight: 900;
}

.process-list strong,
.process-list span {
  display: block;
}

.process-list strong {
  margin-bottom: 5px;
}

.process-list span {
  color: var(--muted);
  line-height: 1.55;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: center;
}

.split-copy p:last-child {
  margin-bottom: 0;
}

.capability-panel {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--steel);
  box-shadow: var(--shadow);
}

.capability-panel div {
  padding: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.capability-panel div:last-child {
  border-bottom: 0;
}

.capability-panel span,
.capability-panel strong {
  display: block;
}

.capability-panel span {
  margin-bottom: 8px;
  color: var(--red);
  font-size: 0.84rem;
  font-weight: 900;
  text-transform: uppercase;
}

.capability-panel strong {
  color: #ffffff;
  font-size: 1.1rem;
  line-height: 1.35;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 28px rgba(5, 5, 5, 0.07);
}

.project-title {
  display: flex;
  align-items: center;
  min-height: 74px;
  margin: 0;
  padding: 16px;
  border-top: 4px solid var(--green);
  font-size: 1.1rem;
  line-height: 1.35;
}

.project-card:nth-child(2n) .project-title {
  border-top-color: var(--red);
}

.project-card:nth-child(3n) .project-title {
  border-top-color: var(--ink);
}

.carousel-viewport {
  touch-action: pan-y pinch-zoom;
}

.project-slide {
  margin: 0;
}

.project-slide[hidden],
.carousel-controls[hidden] {
  display: none;
}

.project-slide img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  user-select: none;
}

.project-slide figcaption {
  min-height: 80px;
  padding: 15px 16px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.35;
}

.carousel-controls {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.carousel-arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  cursor: pointer;
}

.carousel-arrow img {
  width: 24px;
  height: 24px;
}

.carousel-arrow:hover {
  border-color: var(--green);
  background: #edf5ef;
}

.carousel-arrow:focus-visible,
.project-card:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

.carousel-position {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 48px;
  align-items: start;
}

.contact-links {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.contact-method {
  display: grid;
  gap: 4px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 248, 247, 0.75);
  transition:
    border-color 180ms ease,
    transform 180ms ease;
}

.contact-method:hover,
.contact-method:focus-visible {
  border-color: var(--green);
  transform: translateY(-2px);
}

.contact-method span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-method strong {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.35;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 35px rgba(5, 5, 5, 0.09);
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: var(--steel);
  font-size: 0.9rem;
  font-weight: 900;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid #c8d0cc;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.contact-form input,
.contact-form select {
  min-height: 46px;
  padding: 10px 12px;
}

.contact-form textarea {
  resize: vertical;
  min-height: 136px;
  padding: 12px;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--green);
  outline: 3px solid rgba(20, 108, 67, 0.14);
}

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

.site-footer {
  padding: 26px 0;
  background: var(--ink);
  color: #ffffff;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-content p,
.footer-content a,
.footer-content address {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.94rem;
}

.footer-content a {
  font-weight: 800;
}

.footer-identity {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.footer-logo {
  flex: 0 0 auto;
  width: 110px;
  height: auto;
  aspect-ratio: 37 / 31;
  border-radius: 4px;
  background: #ffffff;
  object-fit: contain;
}

.footer-legal {
  display: grid;
  gap: 6px;
}

.footer-content address {
  font-style: normal;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px 18px;
  text-align: right;
}

@media (max-width: 920px) {
  .site-header {
    min-height: 68px;
    padding: 12px 20px;
  }

  .brand-logo {
    width: 64px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: 78px;
    right: 16px;
    left: 16px;
    display: grid;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    box-shadow: var(--shadow);
    transform: translateY(-18px);
    visibility: hidden;
    opacity: 0;
    transition:
      transform 180ms ease,
      visibility 180ms ease,
      opacity 180ms ease;
  }

  .site-nav.is-open {
    transform: translateY(0);
    visibility: visible;
    opacity: 1;
  }

  .site-nav a {
    padding: 14px;
  }

  h1 {
    font-size: 3.2rem;
  }

  h2 {
    font-size: 2rem;
  }

  .hero {
    min-height: 82svh;
  }

  .hero-content {
    padding-top: 148px;
  }

  .intro-grid,
  .work-layout,
  .split,
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 34px;
  }

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

  .project-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .container,
  .hero-content {
    width: min(100% - 28px, 1120px);
  }

  .brand small {
    display: none;
  }

  .brand {
    gap: 8px;
  }

  .brand-logo {
    width: 56px;
  }

  .brand strong {
    font-size: 0.88rem;
    line-height: 1.25;
  }

  h1 {
    font-size: 2.55rem;
  }

  h2 {
    font-size: 1.78rem;
  }

  .hero {
    min-height: 80svh;
  }

  .hero-content {
    padding: 128px 0 60px;
  }

  .hero-copy {
    font-size: 1.05rem;
  }

  .license-line {
    font-size: 0.86rem;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .intro,
  .services,
  .work,
  .testing,
  .projects,
  .contact {
    padding: 64px 0;
  }

  .service-grid,
  .project-gallery,
  .contact-form {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: 230px;
  }

  .process-list li {
    padding-right: 18px;
    padding-left: 64px;
  }

  .contact-form {
    padding: 18px;
  }

  .footer-content {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-identity {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    align-items: flex-start;
    flex-direction: column;
    text-align: left;
  }
}
