/* ==========================================================================
 DESIGN SYSTEM & TOKENS (Bedrock Strata Foundation)
 ========================================================================== */
:root {
  --paper: #F4F5F0;
  --paper-deep: #E7EAE0;
  --paper-card: #FAFBF8;
  --paper-border: rgba(17, 20, 23, 0.12);
  --ink: #111417;
  --ink-soft: #1B2126;
  --ink-card: #181E23;
  --charcoal: #181C20;
  --slate: #545F6A;
  --slate-light: #5F6A74;
  --slate-on-ink: #A3ACA0;
  --line: rgba(17, 20, 23, 0.12);
  --line-subtle: rgba(17, 20, 23, 0.06);
  --line-on-ink: rgba(244, 245, 240, 0.14);
  --line-on-ink-subtle: rgba(244, 245, 240, 0.08);
  --teal: #0D6E68;
  --teal-deep: #084A46;
  --teal-bright: #14968E;
  --teal-subtle: rgba(13, 110, 104, 0.08);
  --teal-border: rgba(13, 110, 104, 0.28);
  --rust: #B4471E;
  --rust-deep: #8E3412;
  --rust-subtle: rgba(180, 71, 30, 0.08);
  --rust-border: rgba(180, 71, 30, 0.25);
  --paper-on-ink: #EDEFE8;

  --font-display: 'Newsreader', Georgia, serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;
  --transition: 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  background-color: var(--paper);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: clip;
  width: 100%;
}

.wrap {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 36px;
  width: 100%;
}

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

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

/* Typography */
h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--charcoal);
  line-height: 1.15;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.09em;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-weight: 600;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--teal);
  display: inline-block;
  flex-shrink: 0;
}

.eyebrow.eyebrow-light {
  color: #49B6AF;
}

.eyebrow.eyebrow-light::before {
  background: #49B6AF;
}

.lede {
  color: var(--slate);
  font-size: 1.1rem;
  max-width: 64ch;
  line-height: 1.65;
}

/* ==========================================================================
 BUTTONS & TAP TARGETS
 ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 13px 26px;
  min-height: 48px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-solid {
  background: var(--teal);
  color: #FFFFFF;
  border-color: var(--teal);
}

.btn-solid:hover {
  background: var(--teal-deep);
  border-color: var(--teal-deep);
}

.btn-ghost {
  background: transparent;
  color: var(--charcoal);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  border-color: var(--charcoal);
  background: rgba(0, 0, 0, 0.03);
}

.btn-ghost-on-ink {
  background: transparent;
  color: var(--paper-on-ink);
  border: 1px solid var(--line-on-ink);
}

.btn-ghost-on-ink:hover {
  border-color: var(--paper-on-ink);
  background: rgba(255, 255, 255, 0.06);
}

/* ==========================================================================
 HEADER & NAVIGATION (Accessible, Sticky, Mobile Drawer)
 ========================================================================== */
header.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 245, 240, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
  color: var(--charcoal);
  flex-shrink: 0;
}

.logo-svg {
  display: block;
  height: 17px;
  width: auto;
}

.logo-footer {
  color: var(--paper-on-ink);
  margin-bottom: 16px;
}

.logo-footer .logo-svg {
  height: 22px;
}

nav.links {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.81rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 1;
}

nav.links a {
  color: var(--slate);
  transition: color 0.15s ease;
  padding: 6px 3px;
  position: relative;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

nav.links a:hover {
  color: var(--teal);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-cta .btn {
  padding: 8px 16px;
  font-size: 0.82rem;
  min-height: 38px;
  font-weight: 600;
  white-space: nowrap;
}

.menu-toggle {
  display: none;
  background: #FFFFFF;
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--charcoal);
  min-height: 38px;
  white-space: nowrap;
  align-items: center;
  gap: 7px;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.menu-toggle:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.menu-toggle.is-active {
  background: var(--ink);
  color: #FFFFFF;
  border-color: var(--ink);
}

/* Mobile Drawer Overlay */
.mobile-drawer-overlay {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(18, 22, 20, 0.48);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.mobile-drawer-overlay.open {
  display: block;
  opacity: 1;
}

/* Mobile Drawer Menu (Outside header container to prevent backdrop-filter containing-block trap) */
.mobile-drawer {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(100vh - 68px);
  height: calc(100dvh - 68px);
  background: #FAFBF7;
  z-index: 9999;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-top: 1px solid var(--line);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.14);
  transform: translateY(-8px);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.mobile-drawer.open {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.mobile-drawer-inner {
  padding: 20px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 540px;
  margin: 0 auto;
}

.mobile-drawer-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--slate);
  padding: 6px 12px 10px;
  border-bottom: 1px solid var(--line-subtle);
  margin-bottom: 6px;
}

.mobile-drawer a.drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
  font-family: var(--font-display);
  font-weight: 500;
  padding: 12px 12px;
  border-radius: var(--radius-sm);
  color: var(--charcoal);
  transition: background 0.15s ease, color 0.15s ease;
  text-decoration: none;
  border-bottom: 1px solid rgba(220, 222, 214, 0.5);
}

.mobile-drawer a.drawer-link:hover,
.mobile-drawer a.drawer-link:active {
  background: var(--paper-deep);
  color: var(--teal);
}

.mobile-drawer-cta {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

body.nav-locked {
  overflow: hidden;
}

/* ==========================================================================
 HERO SECTION (Preserved Identity + Topographic Canvas)
 ========================================================================== */
.hero {
  background: var(--ink);
  color: var(--paper-on-ink);
  padding: 96px 0 68px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line-on-ink);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 60px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.8rem, 5.2vw, 4.4rem);
  color: var(--paper-on-ink);
  line-height: 1.05;
  margin-bottom: 24px;
  letter-spacing: -0.015em;
}

.hero h1 em {
  font-style: italic;
  color: #49B6AF;
  font-weight: 400;
}

.hero .lede {
  color: #B2B8AE;
  margin-bottom: 38px;
  font-size: 1.14rem;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-art-box {
  position: relative;
  background: radial-gradient(circle at 60% 40%, rgba(13, 110, 104, 0.18), transparent 70%);
  border: 1px solid var(--line-on-ink);
  padding: 24px;
  border-radius: var(--radius-md);
}

.topo-canvas {
  width: 100%;
  height: 380px;
  display: block;
  border-radius: var(--radius-sm);
}

.topo-badge {
  position: absolute;
  bottom: 16px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #A3ACA0;
  background: rgba(17, 20, 23, 0.85);
  padding: 4px 10px;
  border: 1px solid var(--line-on-ink);
  letter-spacing: 0.05em;
}

/* Stat Strip */

/* ==========================================================================
 SECTION SCAFFOLDING
 ========================================================================== */
.section {
  padding: 110px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.section.alt {
  background-color: var(--paper-deep);
}

.section.dark {
  background-color: var(--ink);
  color: var(--paper-on-ink);
  border-bottom: 1px solid var(--line-on-ink);
}

.section.dark h2,
.section.dark h3,
.section.dark h4 {
  color: var(--paper-on-ink);
}

.section.dark .lede {
  color: #B2B8AE;
}

.section-head {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  margin-bottom: 64px;
  align-items: baseline;
}

.section-head h2 {
  font-size: clamp(2rem, 3.4vw, 2.7rem);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.section-head.stacked {
  grid-template-columns: 1fr;
  max-width: 780px;
  gap: 16px;
  margin-bottom: 56px;
}

/* ==========================================================================
 02 — DATA + AI FOUNDATION (The 4 Connected Strata)
 ========================================================================== */
.foundation-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.foundation-card {
  background: var(--paper-card);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 320px;
  transition: background var(--transition);
}

.foundation-card:hover {
  background: #FFFFFF;
}

.foundation-card .card-index {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--teal);
  font-weight: 600;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.foundation-card h3 {
  font-size: 1.35rem;
  margin-bottom: 14px;
  line-height: 1.25;
}

.foundation-card p {
  color: var(--slate);
  font-size: 0.94rem;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.foundation-specs {
  border-top: 1px solid var(--line-subtle);
  padding-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--slate-light);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.services-browser {
  border: 1px solid var(--line);
  background: #FFFFFF;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.service-item {
  border-bottom: 1px solid var(--line);
  transition: background var(--transition);
}

.service-item:last-child {
  border-bottom: none;
}

.service-item-trigger {
  width: 100%;
  padding: 28px 32px;
  background: transparent;
  border: none;
  text-align: left;
  display: grid;
  grid-template-columns: 280px 1fr auto;
  gap: 24px;
  align-items: center;
  cursor: pointer;
  color: inherit;
  font: inherit;
  transition: background var(--transition);
}

.service-item-trigger:hover,
.service-item.open .service-item-trigger {
  background: rgba(13, 110, 104, 0.04);
}

.service-item-trigger:focus-visible,
.menu-toggle:focus-visible,
.btn:focus-visible,
.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.service-item-title-group h3 {
  font-size: 1.35rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.service-item-trigger:hover h3,
.service-item.open h3 {
  color: var(--teal);
}

.service-item-summary {
  color: var(--slate);
  font-size: 0.96rem;
  line-height: 1.55;
}

.service-item-toggle-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--slate);
  transition: transform var(--transition), background var(--transition), color var(--transition);
  flex-shrink: 0;
}

.service-item.open .service-item-toggle-icon {
  transform: rotate(45deg);
  background: var(--teal);
  color: #FFFFFF;
  border-color: var(--teal);
}

/* Deep Structure Drawer (Problem -> Deliverable -> Capability -> Outcome) */
.service-item-drawer {
  display: none;
  padding: 0 32px 32px;
  background: rgba(13, 110, 104, 0.02);
  border-top: 1px dashed var(--line);
}

.service-item.open .service-item-drawer {
  display: block;
  animation: fadeIn 0.25s ease-out;
}

.service-matrix-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-top: 24px;
}

.service-matrix-box {
  background: #FFFFFF;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.service-matrix-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--teal);
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.service-matrix-box p {
  font-size: 0.9rem;
  color: var(--charcoal);
  line-height: 1.55;
}

.service-matrix-box.outcome-box {
  background: rgba(13, 110, 104, 0.05);
  border-color: var(--teal-border);
}

.service-matrix-box.outcome-box .service-matrix-label {
  color: var(--teal-deep);
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--slate);
  border: 1px solid var(--line);
  padding: 4px 8px;
  background: var(--paper);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

/* ==========================================================================
 09 — TECHNOLOGY STACK (Geological Strata)
 ========================================================================== */
.strata-container {
  border: 1px solid var(--line);
  background: var(--paper-card);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.stratum {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 36px;
  padding: 32px 36px;
  border-top: 1px solid var(--line);
  align-items: center;
  position: relative;
  transition: background 0.2s ease;
}

.strata-container .stratum:first-child {
  border-top: none;
}

.stratum:hover {
  background: rgba(13, 110, 104, 0.04);
}

.stratum-label small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--teal);
  margin-bottom: 4px;
  font-weight: 600;
}

.stratum-label strong {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
}

.stratum-items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stratum-tag {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.stratum:hover .stratum-tag {
  background: #FFFFFF;
  border-color: rgba(13, 110, 104, 0.3);
}

/* ==========================================================================
 11 — ABOUT (Engineering Philosophy & Delivery Mindset)
 ========================================================================== */
.about-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
}

.about-text h3 {
  font-size: 1.9rem;
  margin-bottom: 20px;
  line-height: 1.25;
}

.about-text p {
  color: var(--slate);
  font-size: 1.02rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.about-values-box {
  background: var(--paper-card);
  border: 1px solid var(--line);
  padding: 36px;
  border-radius: var(--radius-sm);
}

.about-value-item {
  margin-bottom: 24px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 20px;
}

.about-value-item:last-child {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.about-value-item h4 {
  font-size: 1.15rem;
  color: var(--teal-deep);
  margin-bottom: 6px;
  font-family: var(--font-mono);
}

.about-value-item p {
  color: var(--slate);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* ==========================================================================
 14 — CONTACT & FOOTER
 ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 72px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.field label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--slate);
}

.field input,
.field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: #FFFFFF;
  color: var(--charcoal);
  border-radius: var(--radius-sm);
  transition: border 0.15s ease, box-shadow 0.15s ease;
  min-height: 48px;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13, 110, 104, 0.12);
}

.contact-info-block {
  margin-bottom: 32px;
}

.contact-info-block h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.contact-info-block p a {
  color: var(--teal);
  font-weight: 600;
}

footer {
  background: var(--ink);
  color: var(--paper-on-ink);
  padding: 84px 0 36px;
  border-top: 1px solid var(--line-on-ink);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(2, 1fr);
  gap: 40px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line-on-ink);
}

.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #8C968A;
  margin-bottom: 18px;
  letter-spacing: 0.06em;
}

.footer-col ul li {
  margin-bottom: 12px;
  list-style: none;
}

.footer-col ul a {
  color: #CCD2C8;
  font-size: 0.94rem;
  transition: color 0.15s ease;
}

.footer-col ul a:hover {
  color: #FFFFFF;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-size: 0.85rem;
  color: #7E877C;
  flex-wrap: wrap;
  gap: 16px;
}

/* ==========================================================================
 ANIMATIONS & KEYFRAMES
 ========================================================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

section[id],
header[id],
footer[id] {
  scroll-margin-top: 72px;
}

/* ==========================================================================
 RESPONSIVE BREAKPOINTS (Mobile & Android Optimization)
 ========================================================================== */
@media (max-width: 1140px) {

  nav.links,
  .nav-cta .btn {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 1080px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

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

}

@media (max-width: 860px) {
  .wrap {
    padding: 0 24px;
  }

  .section {
    padding: 80px 0;
  }

  .section-head {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 40px;
  }

  .service-item-trigger {
    grid-template-columns: 1fr auto;
    gap: 16px;
    padding: 22px 20px;
  }

  .service-item-trigger .service-item-summary {
    display: none;
  }

  .service-matrix-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .service-item-drawer {
    padding: 0 20px 24px;
  }

  .stratum {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 24px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

}

@media (max-width: 640px) {
  .wrap {
    padding: 0 18px;
  }

  .nav-inner {
    height: 60px;
  }

  .logo-svg {
    height: 15px;
  }

  .mobile-drawer-overlay,
  .mobile-drawer {
    top: 60px;
    height: calc(100vh - 60px);
    height: calc(100dvh - 60px);
  }

  .hero {
    padding: 60px 0 48px;
  }

  .hero-art-box {
    padding: 12px;
  }

  .topo-canvas {
    height: 260px;
  }

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

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

  .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-ctas .btn {
    width: 100%;
  }

}

.hp-field {
  position: absolute;
  left: -9999px;
}

.form-status {
  display: none;
  color: var(--teal);
  font-size: 0.9rem;
  margin-top: 14px;
  font-weight: 500;
}

.form-status.is-error {
  color: var(--rust);
}

/* Selected work (home) */
.work-list {
  border-top: 1px solid var(--line);
}

.work-row {
  position: relative;
  display: grid;
  grid-template-columns: 200px 1fr 260px;
  gap: 40px;
  align-items: start;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
  transition: background var(--transition);
}

.work-row:hover {
  background: rgba(13, 110, 104, 0.04);
}

.work-sector {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--teal);
  padding-top: 8px;
}

.work-main h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.work-main h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.work-main h3 a:focus-visible::after {
  outline: 2px solid var(--teal);
  outline-offset: -2px;
}

.work-main p {
  color: var(--slate);
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.work-more {
  display: inline-block;
  margin-top: 16px;
  color: var(--teal);
  font-weight: 600;
  font-size: 0.92rem;
}

.work-metric .num,
.study-metric .num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--rust);
}

.work-metric .cap,
.study-metric .cap {
  display: block;
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--slate);
}

/* Case study page */
.study-hero {
  padding: 72px 0 64px;
  border-bottom: 1px solid var(--line);
}

.study-back {
  display: block;
  width: fit-content;
  margin-bottom: 28px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--slate);
}

.study-back:hover {
  color: var(--teal);
}

.study-hero h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  max-width: 24ch;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.study-facts {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 40px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.study-facts dt {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--slate-light);
  margin-bottom: 10px;
}

.study-facts dd {
  color: var(--charcoal);
}

.study-facts .work-tags {
  margin-top: 0;
}

.study-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  align-items: start;
}

.study-label {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  letter-spacing: -0.01em;
}

.study-body p {
  color: var(--slate);
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 68ch;
  margin-bottom: 18px;
}

.study-body .btn {
  margin-top: 8px;
}

.study-block {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.study-block:first-child {
  padding-top: 0;
  border-top: none;
}

.study-block h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.study-points {
  list-style: none;
  max-width: 68ch;
}

.study-points li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
  color: var(--charcoal);
  line-height: 1.6;
}

.study-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  background: var(--teal);
}

.study-outcomes li {
  font-size: 1.05rem;
  padding: 14px 0 14px 20px;
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.study-outcomes li::before {
  top: 1.35em;
}

.study-flow {
  list-style: none;
  counter-reset: step;
  max-width: 68ch;
}

.study-flow li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 48px 160px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.study-flow li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal);
  padding-top: 3px;
}

.study-flow strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
}

.study-flow span {
  color: var(--slate);
}

@media (max-width: 1080px) {
  .work-row {
    grid-template-columns: 1fr 240px;
  }

  .work-sector {
    grid-column: 1 / -1;
    padding-top: 0;
  }
}

@media (max-width: 860px) {
  .work-row,
  .study-grid,
  .study-facts {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .study-hero {
    padding: 48px 0 44px;
  }

  .study-flow li {
    grid-template-columns: 40px 1fr;
  }

  .study-flow li span {
    grid-column: 2;
  }
}

/* Case study figures and diagrams */
.study-figures {
  border-bottom: 1px solid var(--line);
  background: var(--paper-card);
}

.figure-strip {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.figure-strip li {
  padding: 32px 28px 32px 0;
  border-left: 1px solid var(--line);
  padding-left: 28px;
}

.figure-strip li:first-child {
  border-left: none;
  padding-left: 0;
}

.figure-strip .num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  line-height: 1;
  color: var(--rust);
}

.figure-strip .cap {
  display: block;
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--slate);
}

.study-label-wide {
  margin-bottom: 36px;
}

.study-figure {
  margin: 0 0 48px;
}

.study-figure:last-child {
  margin-bottom: 0;
}

.study-fig-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 14px;
  color: var(--charcoal);
}

.study-figure-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--paper-card);
  padding: 20px;
}

.study-figure-scroll:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.study-fig-caption {
  margin-top: 12px;
  font-size: 0.92rem;
  color: var(--slate);
  max-width: 78ch;
}

.dg {
  display: block;
  width: 100%;
  min-width: 720px;
  height: auto;
}

.dg-box {
  fill: var(--paper);
  stroke: #A9AFA3;
  stroke-width: 1;
}

.dg-back {
  fill: var(--paper-card);
  stroke: #C3C8BC;
}

.dg-box.accent {
  fill: rgba(13, 110, 104, 0.07);
  stroke: var(--teal);
}

.dg-box.rust {
  fill: rgba(180, 71, 30, 0.06);
  stroke: var(--rust);
}

.dg-box.muted {
  fill: transparent;
  stroke-dasharray: 5 4;
}

.dg-title {
  font: 600 12px var(--font-mono);
  fill: var(--charcoal);
}

.dg-text {
  font: 400 11px var(--font-mono);
  fill: var(--slate);
}

.dg-note {
  font: 400 11px var(--font-mono);
  fill: var(--slate);
}

.dg-head {
  font: 600 11px var(--font-mono);
  fill: var(--teal);
}

.dg-rule {
  stroke: var(--line);
  stroke-width: 1;
}

.dg-arrow {
  stroke: var(--slate);
  stroke-width: 1.3;
  fill: none;
}

.dg-arrow.dash {
  stroke-dasharray: 5 4;
}

.dg-head-fill {
  fill: var(--slate);
}

.dg-bar.rust {
  fill: var(--rust);
}

.dg-bar.teal {
  fill: var(--teal);
}

.dg-num-label {
  font: 600 14px var(--font-mono);
  fill: var(--charcoal);
}

@media (max-width: 860px) {
  .figure-strip li {
    border-left: none;
    padding-left: 0;
    border-bottom: 1px solid var(--line);
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .study-figure-scroll {
    padding: 12px;
  }
}
