@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Oswald:wght@500;600;700&display=swap");

:root {
  --bg: #0c0f0f;
  --bg-2: #121715;
  --ink: #f4f6f1;
  --muted: #b9c0b6;
  --paper: #f5f6f1;
  --paper-2: #e7ebe1;
  --text: #101312;
  --subtle: #4e564c;
  --line: #2b342f;
  --line-light: #b7c0b0;
  --accent: #91a36b;
  --accent-strong: #b0c681;
  --danger: #d35f5f;
  --max: 1500px;
  --gutter: clamp(1rem, 4vw, 3rem);
  --heading: "Arial Narrow", "Roboto Condensed", "Oswald", "Impact", sans-serif;
  --body: "Inter", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
}

body.modal-open {
  overflow: hidden;
}

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

a,
button,
input,
textarea,
select {
  font: inherit;
}

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

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 4px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(11rem, 1fr) auto;
  align-items: stretch;
  min-height: 5.25rem;
  border-bottom: 1px solid var(--line);
  background: rgba(12, 15, 15, 0.94);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 1.15rem var(--gutter);
}

.brand img {
  width: min(15rem, 62vw);
  height: auto;
}

.site-nav {
  display: flex;
  align-items: stretch;
  border-left: 1px solid var(--line);
}

.site-nav a,
.site-footer nav a {
  display: grid;
  place-items: center;
  padding: 0 2rem;
  border-right: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.site-nav a:hover,
.site-footer nav a:hover {
  background: var(--accent);
  color: #07100a;
}

.nav-toggle {
  display: none;
  width: 5.25rem;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}

.nav-toggle span {
  display: block;
  width: 1.55rem;
  height: 2px;
  margin: 0.32rem auto;
  background: currentColor;
}

.section-grid,
.light-band,
.dark-band {
  max-width: var(--max);
  margin: 0 auto;
  padding-right: var(--gutter);
  padding-left: var(--gutter);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(24rem, 1.08fr);
  min-height: calc(100svh - 5.25rem);
  padding-top: clamp(4rem, 7vw, 7rem);
  padding-bottom: clamp(3rem, 6vw, 6rem);
  overflow: hidden;
}

.hero::before,
.hero::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.hero::before {
  right: var(--gutter);
  bottom: 3rem;
  left: var(--gutter);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.6;
}

.hero::after {
  right: 44%;
  bottom: 4rem;
  width: 12rem;
  height: 10rem;
  border-right: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
  opacity: 0.5;
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 48rem;
  padding-right: clamp(1.5rem, 4vw, 4rem);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--heading);
  font-weight: 900;
  line-height: 0.94;
  letter-spacing: -0.02em;
  text-transform: none;
}

h1 {
  max-width: 13.5ch;
  font-size: clamp(4rem, 6.8vw, 7.5rem);
}

h2 {
  font-size: clamp(2.7rem, 5vw, 5.4rem);
}

h3 {
  font-size: clamp(1.2rem, 1.8vw, 1.75rem);
  line-height: 1;
}

.hero-copy p {
  max-width: 38rem;
  margin: 2rem 0 0;
  color: var(--ink);
  font-size: clamp(1.05rem, 1.55vw, 1.45rem);
  line-height: 1.35;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 3rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-width: 12.5rem;
  min-height: 3.6rem;
  padding: 0.95rem 1.25rem;
  border: 1px solid var(--accent);
  font-size: 0.95rem;
  font-weight: 800;
  color: inherit;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.button::after,
.portfolio-card button::after {
  content: "";
  width: 1rem;
  height: 1rem;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: translate(-0.2rem, 0.2rem);
}

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

.button-primary {
  background: var(--accent);
  color: #081006;
}

.button-secondary {
  background: transparent;
  color: var(--ink);
}

.hero-media {
  align-self: stretch;
  min-height: 36rem;
}

.technical-frame {
  position: relative;
  margin: 0;
  border: 1px solid var(--accent);
  background: #181d1b;
  clip-path: polygon(7% 0, 100% 0, 100% 100%, 0 100%, 0 8%);
}

.technical-frame::before {
  position: absolute;
  inset: 1rem;
  z-index: 2;
  content: "";
  border-top: 1px solid rgba(176, 198, 129, 0.34);
  border-right: 1px solid rgba(176, 198, 129, 0.34);
  pointer-events: none;
}

.hero-media img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

.hero-media figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid rgba(176, 198, 129, 0.42);
  background: rgba(8, 11, 10, 0.78);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.light-band {
  background: var(--paper);
  color: var(--text);
}

.dark-band {
  background: radial-gradient(circle at top left, rgba(145, 163, 107, 0.1), transparent 36%), var(--bg-2);
  color: var(--ink);
}

.capabilities,
.portfolio,
.process,
.contact {
  padding-top: clamp(4.5rem, 7vw, 7rem);
  padding-bottom: clamp(4.5rem, 7vw, 7rem);
}

.section-heading {
  margin-bottom: clamp(2.4rem, 5vw, 4rem);
}

.section-heading p {
  max-width: 43rem;
  margin: 1rem 0 0;
  color: var(--subtle);
  font-size: 1.05rem;
}

.dark-band .section-heading p {
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid var(--line-light);
  border-bottom: 1px solid var(--line-light);
}

.capability-grid article {
  min-height: 18rem;
  padding: 2rem 1.4rem;
  border-right: 1px solid var(--line-light);
}

.capability-grid article:first-child {
  border-left: 1px solid var(--line-light);
}

.line-icon {
  display: block;
  width: 3.8rem;
  height: 3.8rem;
  margin-bottom: 2rem;
  color: #58644b;
}

.line-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linejoin: miter;
  stroke-width: 1.4;
}

.capability-grid h3,
.process-grid h3 {
  font-family: var(--body);
  font-size: 0.84rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.capability-grid p,
.process-grid p {
  margin: 1.4rem 0 0;
  color: var(--subtle);
  font-size: 0.92rem;
  line-height: 1.6;
}

.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.portfolio-filters button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 0.7rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.portfolio-filters button:hover,
.portfolio-filters button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #081006;
}

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

.portfolio-card {
  border: 1px solid var(--line);
  background: #0d1110;
}

.portfolio-card[hidden] {
  display: none;
}

.portfolio-card button {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 24rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.portfolio-card button::after {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  width: 0.9rem;
  height: 0.9rem;
  color: var(--ink);
}

.portfolio-card img {
  width: 100%;
  height: 15rem;
  border-bottom: 1px solid var(--line);
  object-fit: cover;
  filter: saturate(0.86) contrast(1.08);
  transition: filter 180ms ease, transform 180ms ease;
}

.portfolio-card:hover img {
  filter: saturate(1) contrast(1.12);
  transform: scale(1.015);
}

.portfolio-copy {
  display: grid;
  align-content: start;
  min-height: 9rem;
  padding: 1.1rem;
}

.portfolio-copy span {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portfolio-copy strong {
  margin-top: 0.35rem;
  font-family: var(--heading);
  font-size: 1.55rem;
  line-height: 1;
}

.portfolio-copy small {
  max-width: 23rem;
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid var(--line-light);
}

.process-grid article {
  position: relative;
  min-height: 13rem;
  padding: 2.25rem 1.3rem 0;
  border-right: 1px solid var(--line-light);
}

.process-grid article:first-child {
  border-left: 1px solid var(--line-light);
}

.process-grid article::before {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  left: 3.6rem;
  height: 1px;
  background: var(--line-light);
  content: "";
}

.process-grid span {
  display: inline-block;
  margin-bottom: 2rem;
  color: #647551;
  font-family: var(--heading);
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(24rem, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
  border-top: 1px solid var(--line);
}

.contact-copy {
  position: sticky;
  top: 7rem;
}

.contact-copy p {
  max-width: 35rem;
  margin: 1.3rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  border: 1px solid var(--line);
  padding: clamp(1.25rem, 3vw, 2rem);
  background: rgba(255, 255, 255, 0.03);
}

.contact-form label {
  display: grid;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-form label:nth-child(4) {
  grid-column: 1 / -1;
}

.honeypot {
  position: absolute;
  left: -9999px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #080b0a;
  color: var(--ink);
  padding: 0.95rem 1rem;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form.was-validated input:invalid,
.contact-form.was-validated textarea:invalid,
.contact-form.was-validated select:invalid {
  border-color: var(--danger);
}

.contact-form .button {
  justify-self: start;
}

.form-status {
  align-self: center;
  min-height: 1.5rem;
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.92rem;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(13rem, 1fr) auto minmax(13rem, 1fr);
  align-items: stretch;
  max-width: var(--max);
  min-height: 7rem;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.site-footer nav {
  display: flex;
  border-left: 1px solid var(--line);
}

.site-footer p {
  display: grid;
  place-items: center end;
  margin: 0;
  padding: 1rem var(--gutter);
  color: var(--muted);
  font-size: 0.86rem;
}

.image-modal {
  width: min(92vw, 72rem);
  max-height: 88vh;
  border: 1px solid var(--accent);
  padding: 0;
  background: #050706;
  color: var(--ink);
}

.image-modal::backdrop {
  background: rgba(0, 0, 0, 0.78);
}

.image-modal img {
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
  background: #080b0a;
}

.image-modal p {
  margin: 0;
  padding: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line-light);
  background: rgba(5, 7, 6, 0.86);
  color: var(--ink);
}

.modal-close::before,
.modal-close::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.35rem;
  height: 2px;
  background: currentColor;
  content: "";
}

.modal-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.modal-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

@media (max-width: 1180px) {
  .hero,
  .contact {
    grid-template-columns: 1fr;
  }

  .hero-media {
    min-height: 28rem;
  }

  .capability-grid,
  .process-grid,
  .portfolio-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .contact-copy {
    position: static;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer nav {
    display: grid;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .site-footer nav a {
    justify-content: start;
    min-height: 3.5rem;
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }

  .site-footer p {
    place-items: center start;
  }
}

@media (max-width: 820px) {
  .site-header {
    min-height: 4.5rem;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: 4.5rem;
    right: 0;
    left: 0;
    display: none;
    border-top: 1px solid var(--line);
    border-left: 0;
    background: var(--bg);
  }

  .site-header.is-open .site-nav {
    display: grid;
  }

  .site-nav a {
    justify-content: start;
    min-height: 4rem;
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }

  .hero {
    min-height: auto;
    padding-top: 3rem;
  }

  h1 {
    font-size: clamp(3.4rem, 16vw, 5.4rem);
  }

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

  .portfolio-filters {
    justify-content: flex-start;
  }

  .capability-grid,
  .process-grid,
  .portfolio-grid,
  .contact-form,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .capability-grid article,
  .process-grid article,
  .capability-grid article:first-child,
  .process-grid article:first-child {
    min-height: auto;
    border-right: 1px solid var(--line-light);
    border-left: 1px solid var(--line-light);
  }

  .process-grid article::before {
    left: 3.5rem;
  }

  .site-footer nav {
    display: grid;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .site-footer nav a {
    justify-content: start;
    min-height: 3.5rem;
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }

  .site-footer p {
    place-items: center start;
  }
}

@media (max-width: 520px) {
  .brand {
    padding-right: 1rem;
    padding-left: 1rem;
  }

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

  .hero-media {
    min-height: 22rem;
  }

  .hero-media figcaption {
    display: none;
  }

  .portfolio-card button {
    min-height: 20rem;
  }

  .portfolio-card img {
    height: 12.5rem;
  }
}

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