:root {
  color-scheme: light;
  --bg: #f3f0e9;
  --paper: #fffdf8;
  --ink: #1e2322;
  --muted: #646b67;
  --line: #d8d1c5;
  --dark: #181c1b;
  --steel: #385760;
  --olive: #606a4f;
  --bronze: #99733e;
  --soft-blue: #dfe8e6;
  --soft-green: #e6e9df;
  --shadow: 0 20px 48px rgba(30, 35, 34, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 20;
  padding: 10px 12px;
  background: var(--dark);
  color: #fff;
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 48px;
  background: rgba(243, 240, 233, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.8rem;
  letter-spacing: 0;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
}

.nav a {
  text-decoration: none;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
}

.hero {
  position: relative;
  min-height: 76svh;
  display: grid;
  align-items: end;
  padding: 92px 48px 64px;
  overflow: hidden;
  background: var(--dark) url("/assets/epival-systems-map.png") center / cover no-repeat;
  color: #fffdf8;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(14, 17, 17, 0.62);
}

.hero-content {
  position: relative;
  width: min(850px, 100%);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--bronze);
  font-size: 0.77rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #d9b579;
}

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

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 620;
  line-height: 1.03;
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 22px;
  font-size: 4.45rem;
}

h2 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: 3.15rem;
}

h3 {
  margin-bottom: 9px;
  font-size: 1.08rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.lead {
  max-width: 760px;
  color: #ece7dd;
  font-size: 1.28rem;
}

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

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid var(--dark);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 800;
}

.button.primary {
  background: var(--dark);
  color: #fffdf8;
}

.hero .button.primary {
  border-color: #fffdf8;
  background: #fffdf8;
  color: var(--ink);
}

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

.button.ghost {
  border-color: rgba(255, 253, 248, 0.72);
  color: #fffdf8;
}

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

.proof-band {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.proof-grid,
.section,
.contact-section,
.site-footer {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

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

.proof-grid article {
  min-height: 132px;
  padding: 26px 22px;
  border-left: 1px solid var(--line);
}

.proof-grid article:last-child {
  border-right: 1px solid var(--line);
}

.proof-grid strong,
.proof-grid span {
  display: block;
}

.proof-grid strong {
  margin-bottom: 9px;
  font-size: 1.05rem;
}

.proof-grid span {
  color: var(--muted);
  font-size: 0.92rem;
}

.section {
  padding: 82px 0;
}

.section-head {
  margin-bottom: 30px;
}

.section-head > p:not(.eyebrow),
.intro-copy p,
.about-copy p,
.contact-section p,
.service-grid p,
.capability-list p,
.portfolio-grid p,
.insight-grid p {
  color: var(--muted);
}

.intro-section,
.about-section,
.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}

.intro-copy,
.about-copy {
  font-size: 1.08rem;
}

.section-dark {
  width: 100%;
  max-width: none;
  padding: 86px max(48px, calc((100% - 1180px) / 2)) 92px;
  background: var(--dark);
  color: #f6f1e8;
}

.section-dark .section-head,
.section-dark .service-grid {
  width: min(1180px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.section-dark .service-grid p {
  color: #c8c3ba;
}

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

.service-grid article {
  min-height: 280px;
  padding: 20px;
  border: 1px solid rgba(255, 253, 248, 0.18);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.04);
}

.service-number {
  display: block;
  margin-bottom: 34px;
  color: #d9b579;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.1rem;
}

.capability-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr);
  gap: 48px;
  align-items: center;
}

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

.capability-panel img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
}

.capability-list {
  display: grid;
  gap: 12px;
}

.capability-list article,
.portfolio-grid article,
.insight-grid article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.portfolio-section {
  border-top: 1px solid var(--line);
}

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

.portfolio-grid span {
  display: block;
  margin-bottom: 18px;
  color: var(--bronze);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
}

.industries-section {
  padding-top: 24px;
}

.industry-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.industry-list li {
  min-height: 72px;
  padding: 18px;
  border-top: 1px solid var(--line);
  background: var(--soft-blue);
  font-weight: 760;
}

.about-section {
  width: 100%;
  max-width: none;
  padding: 86px max(48px, calc((100% - 1180px) / 2));
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.about-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.about-signals span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft-green);
  color: #39413b;
  font-size: 0.84rem;
  font-weight: 760;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

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

.contact-section h2 {
  font-size: 2.6rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0 42px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin-bottom: 0;
}

.site-footer p:first-child {
  color: var(--ink);
  font-weight: 850;
}

@media (max-width: 1100px) {
  h1 {
    font-size: 3.5rem;
  }

  h2 {
    font-size: 2.55rem;
  }

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

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

@media (max-width: 820px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header {
    padding: 14px 24px;
  }

  .nav {
    justify-content: flex-start;
    gap: 13px;
  }

  .hero {
    min-height: 78svh;
    padding: 76px 24px 48px;
    background-position: center;
  }

  h1 {
    font-size: 2.7rem;
  }

  h2,
  .contact-section h2 {
    font-size: 2.05rem;
  }

  .lead {
    font-size: 1.08rem;
  }

  .proof-grid,
  .section,
  .contact-section,
  .site-footer {
    width: min(100% - 32px, 1180px);
  }

  .intro-section,
  .capability-layout,
  .about-section,
  .contact-section {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .section,
  .contact-section {
    padding: 58px 0;
  }

  .section-dark,
  .about-section {
    padding: 62px 24px;
  }

  .proof-grid,
  .service-grid,
  .portfolio-grid,
  .industry-list,
  .insight-grid {
    grid-template-columns: 1fr;
  }

  .proof-grid article,
  .proof-grid article:last-child {
    border-right: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .button {
    width: 100%;
  }
}
