:root {
  color-scheme: light;
  --ink: #102029;
  --muted: #5f7280;
  --line: #d8e4e9;
  --wash: #f4f8fb;
  --panel: #ffffff;
  --portfolio: #009688;
  --portfolio-dark: #006d63;
  --project: #f59e0b;
  --project-dark: #9a5a00;
  --reporting: #4f46e5;
  --reporting-dark: #312e9f;
  --rose: #e11d48;
  --green: #16a34a;
  --shadow: 0 26px 70px rgba(16, 32, 41, 0.14);
  --soft-shadow: 0 12px 34px rgba(16, 32, 41, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(135deg, rgba(0, 150, 136, 0.12) 0 18%, rgba(255, 255, 255, 0) 18%),
    linear-gradient(225deg, rgba(79, 70, 229, 0.1) 0 20%, rgba(255, 255, 255, 0) 20%),
    linear-gradient(180deg, #ffffff 0, #f7fbfd 44%, #eef8f5 100%);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
  letter-spacing: 0;
}

button,
a {
  font: inherit;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 9px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(216, 228, 233, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.brand-label {
  display: block;
  font-size: 0.95rem;
  letter-spacing: 0;
  line-height: 1.2;
}

.contact-link,
.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
}

.contact-link {
  padding: 0 16px;
  border: 1px solid #cde0df;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(239, 248, 246, 0.96)),
    #eef8f6;
  box-shadow: 0 10px 24px rgba(16, 32, 41, 0.08);
}

.contact-link:hover,
.contact-link:focus-visible {
  border-color: var(--portfolio);
  outline: none;
  box-shadow: 0 0 0 4px rgba(0, 150, 136, 0.14), var(--soft-shadow);
}

main {
  width: min(1210px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 44px;
}

.view[hidden] {
  display: none;
}

.view.is-active {
  animation: lift-in 280ms ease both;
}

.intro {
  max-width: 910px;
  padding: 14px 0 16px;
}

.eyebrow,
.card-topline {
  margin: 0 0 10px;
  color: var(--portfolio-dark);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 640px;
  margin-bottom: 10px;
  font-size: clamp(1.85rem, 3vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.intro p:last-child {
  max-width: 710px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 10px;
}

.service-card {
  --accent: var(--portfolio);
  --accent-dark: var(--portfolio-dark);
  --accent-rgb: 0, 150, 136;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 452px;
  padding: 20px;
  overflow: hidden;
  text-align: left;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92) 58%, rgba(var(--accent-rgb), 0.09)),
    var(--panel);
  border: 1px solid rgba(216, 228, 233, 0.95);
  border-top: 7px solid var(--accent);
  border-radius: 16px;
  box-shadow: var(--soft-shadow);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.project-card {
  --accent: var(--project);
  --accent-dark: var(--project-dark);
  --accent-rgb: 245, 158, 11;
}

.reporting-card {
  --accent: var(--reporting);
  --accent-dark: var(--reporting-dark);
  --accent-rgb: 79, 70, 229;
}

.service-card:hover,
.service-card:focus-visible {
  transform: translateY(-5px);
  border-color: rgba(var(--accent-rgb), 0.55);
  outline: none;
  box-shadow: 0 28px 64px rgba(16, 32, 41, 0.18);
}

.service-card > span {
  display: block;
}

.card-topline {
  color: var(--accent-dark);
}

.card-title {
  margin-bottom: 10px;
  font-size: clamp(1.4rem, 2.05vw, 1.92rem);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 0;
}

.card-copy {
  color: var(--muted);
  font-size: 0.94rem;
}

.card-action {
  margin-top: 12px;
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 900;
}

.card-action span {
  display: inline-block;
  margin-left: 6px;
  transition: transform 180ms ease;
}

.service-card:hover .card-action span,
.service-card:focus-visible .card-action span {
  transform: translateX(4px);
}

.mini-screen {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.26);
  border-radius: 14px;
  background: #f7fbfa;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.mini-screen img {
  width: 100%;
  aspect-ratio: 16 / 10.4;
  object-fit: cover;
  object-position: top left;
  transition: transform 240ms ease;
}

.service-card:hover .mini-screen img,
.service-card:focus-visible .mini-screen img {
  transform: scale(1.025);
}

.back-button {
  gap: 8px;
  margin: 0 0 18px;
  padding: 0 15px;
  border: 1px solid #cde0df;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(16, 32, 41, 0.08);
}

.back-button:hover,
.back-button:focus-visible {
  border-color: var(--portfolio);
  outline: none;
  box-shadow: 0 0 0 4px rgba(0, 150, 136, 0.14), var(--soft-shadow);
}

.detail {
  --accent: var(--portfolio);
  --accent-dark: var(--portfolio-dark);
  --accent-rgb: 0, 150, 136;
}

.detail[data-service="project"] {
  --accent: var(--project);
  --accent-dark: var(--project-dark);
  --accent-rgb: 245, 158, 11;
}

.detail[data-service="reporting"] {
  --accent: var(--reporting);
  --accent-dark: var(--reporting-dark);
  --accent-rgb: 79, 70, 229;
}

.detail-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.58fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
  padding: clamp(22px, 4vw, 44px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(255, 255, 255, 0.95)) padding-box,
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.85), rgba(225, 29, 72, 0.42), rgba(79, 70, 229, 0.48)) border-box;
  border: 1px solid transparent;
  border-left: 7px solid var(--accent);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.detail .eyebrow {
  color: var(--accent-dark);
}

.detail-copy {
  min-width: 0;
}

.detail-copy h2 {
  margin-bottom: 14px;
  font-size: clamp(1.95rem, 3.55vw, 3.45rem);
  line-height: 1.05;
  letter-spacing: 0;
}

#detail-summary {
  color: var(--muted);
  font-size: 1.04rem;
}

.outcome-panel {
  margin-top: 24px;
  padding: 18px;
  background: rgba(var(--accent-rgb), 0.055);
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 14px;
}

.outcome-panel h3 {
  margin-bottom: 12px;
  font-size: 1rem;
}

.outcome-panel ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.outcome-panel li {
  position: relative;
  padding-left: 22px;
  color: #233943;
  font-weight: 690;
}

.outcome-panel li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

.gallery {
  min-width: 0;
}

.hero-shot {
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(var(--accent-rgb), 0.045)),
    #fff;
  box-shadow: 0 18px 42px rgba(16, 32, 41, 0.12);
}

.hero-shot-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.hero-shot-button:focus-visible {
  outline: 3px solid rgba(var(--accent-rgb), 0.52);
  outline-offset: 4px;
  border-radius: 14px;
}

.hero-shot img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 12px;
  background: #f7fbfa;
}

.hero-shot figcaption {
  margin-top: 11px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
}

.thumb-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.thumb {
  min-width: 0;
  padding: 9px;
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.thumb img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
  border: 1px solid #dfe9e7;
  border-radius: 10px;
}

.thumb span {
  display: block;
  margin-top: 9px;
  color: #263c46;
  font-size: 0.84rem;
  font-weight: 900;
}

.thumb.is-selected,
.thumb:hover,
.thumb:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.1), var(--soft-shadow);
}

body.viewer-open {
  overflow: hidden;
}

.image-viewer[hidden] {
  display: none;
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: clamp(12px, 2vw, 28px);
  background: rgba(6, 16, 24, 0.82);
  backdrop-filter: blur(14px);
}

.viewer-frame {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  width: min(1360px, 100%);
  max-height: calc(100vh - 36px);
  margin: 0;
  padding: clamp(8px, 1.5vw, 16px);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 251, 252, 0.98)),
    #fff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
}

.viewer-frame img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  border: 1px solid #dce8ea;
  border-radius: 12px;
  background: #f8fbfc;
}

.viewer-frame figcaption {
  padding: 10px 4px 0;
  color: #263c46;
  font-weight: 900;
}

.viewer-close,
.viewer-nav {
  position: fixed;
  z-index: 90;
  display: grid;
  place-items: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(7, 18, 28, 0.72);
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.viewer-close {
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 2rem;
  line-height: 1;
}

.viewer-nav {
  top: 50%;
  width: 52px;
  height: 64px;
  border-radius: 16px;
  font-size: 3rem;
  transform: translateY(-50%);
}

.viewer-prev {
  left: 18px;
}

.viewer-next {
  right: 18px;
}

.viewer-close:hover,
.viewer-close:focus-visible,
.viewer-nav:hover,
.viewer-nav:focus-visible {
  outline: none;
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(0, 150, 136, 0.92);
}

@keyframes lift-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .service-grid,
  .detail-shell {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: 0;
  }
}

@media (max-width: 620px) {
  .topbar {
    position: static;
    flex-direction: column;
    align-items: stretch;
    padding: 10px 12px;
  }

  .brand {
    align-self: flex-start;
  }

  .contact-link {
    width: 100%;
  }

  main {
    width: min(calc(100vw - 22px), 368px);
    margin-left: 11px;
    margin-right: auto;
    padding: 14px 0 34px;
  }

  h1 {
    font-size: 1.65rem;
    line-height: 1.08;
  }

  .intro {
    padding: 10px 0 12px;
  }

  .service-grid {
    gap: 14px;
  }

  .service-card,
  .detail-shell {
    padding: 16px;
    border-radius: 15px;
  }

  .thumb-row {
    grid-template-columns: 1fr;
  }

  .hero-shot img {
    aspect-ratio: 4 / 3;
  }

  .image-viewer {
    padding: 58px 9px 14px;
    align-items: start;
  }

  .viewer-frame {
    max-height: calc(100vh - 78px);
    border-radius: 14px;
  }

  .viewer-frame img {
    max-height: calc(100vh - 154px);
  }

  .viewer-close {
    top: 9px;
    right: 9px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .viewer-nav {
    top: clamp(164px, 24vh, 220px);
    bottom: auto;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 2.35rem;
    transform: none;
  }

  .viewer-prev {
    left: 18px;
  }

  .viewer-next {
    right: 18px;
  }
}
