:root {
  --jade: #00c868;
  --jade-dark: #00a957;
  --vblue: #355fa8;
  --ink: #0a1018;
  --muted: #5a6876;
  --paper: #f5f8f6;
  --white: #fff;
  --line: rgba(10, 16, 24, 0.1);
  --radius-lg: 34px;
  --radius-md: 22px;
  --shadow: 0 24px 70px rgba(10, 16, 24, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

body::selection {
  color: #fff;
  background: var(--jade);
}

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

a {
  color: inherit;
}

button {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 10000;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.section {
  position: relative;
  padding: 112px 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--vblue);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 26px;
  height: 2px;
  background: currentColor;
  content: "";
}

.projects-hero .eyebrow::before {
  display: none;
}

.eyebrow-light {
  color: rgba(255, 255, 255, 0.72);
}

.marker {
  position: relative;
  z-index: 0;
  display: inline-block;
  color: var(--jade);
}

.marker::after {
  position: absolute;
  z-index: -1;
  right: -0.03em;
  bottom: 0.06em;
  left: -0.03em;
  height: 0.22em;
  background: currentColor;
  border-radius: 3px;
  opacity: 0.17;
  content: "";
  transform: skewX(-12deg);
}

.primary-cta,
.nav-menu-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 58px;
  padding: 16px 28px;
  color: #fff;
  background: var(--jade);
  border: 1px solid transparent;
  border-radius: 999px;
  box-shadow: 0 16px 36px rgba(0, 200, 104, 0.23);
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.primary-cta span {
  transition: transform 0.25s ease;
}

.primary-cta:hover,
.primary-cta:focus-visible {
  color: #fff;
  background: var(--vblue);
  box-shadow: 0 18px 40px rgba(53, 95, 168, 0.25);
  transform: translateY(-2px);
}

.primary-cta:hover span,
.primary-cta:focus-visible span {
  transform: translateX(4px);
}

.menu-symbol {
  color: inherit;
  font-size: 18px !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  line-height: 1 !important;
}

.menu-close {
  width: 44px;
  height: 44px;
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
}

.nav-menu-cta {
  width: 100%;
  min-height: auto;
  padding: 17px 22px;
  border-radius: 8px;
}

/* Hero */
.projects-hero {
  display: grid;
  min-height: 460px;
  align-items: center;
  padding: 116px 0 40px;
  overflow: hidden;
  background: linear-gradient(135deg, #fff 0%, #f7f9f6 100%);
}

.hero-grid {
  display: block;
}

.hero-copy-wrap h1 {
  max-width: 1000px;
  margin: 0;
  font-size: clamp(3.5rem, 5.6vw, 5.5rem);
  line-height: 0.9;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.hero-copy-wrap h1 span {
  display: block;
  color: var(--jade);
}

.hero-copy-wrap > p:not(.eyebrow) {
  max-width: 680px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(1.04rem, 2vw, 1.2rem);
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.hero-pills span {
  padding: 7px 13px;
  color: var(--vblue);
  background: rgba(53, 95, 168, 0.07);
  border: 1px solid rgba(53, 95, 168, 0.14);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.jump-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  color: var(--vblue);
  font-weight: 800;
  text-decoration-color: rgba(53, 95, 168, 0.35);
  text-underline-offset: 6px;
}

.jump-link:hover,
.jump-link:focus-visible {
  color: var(--jade-dark);
}

.hero-project-image {
  position: relative;
  margin: 0;
}

.hero-project-image::before {
  position: absolute;
  z-index: 0;
  top: -24px;
  right: -24px;
  width: 54%;
  height: 58%;
  background: var(--jade);
  border-radius: 28px;
  content: "";
}

.hero-project-image img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1.2 / 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero-project-image figcaption {
  position: absolute;
  z-index: 2;
  right: -20px;
  bottom: 30px;
  max-width: 280px;
  padding: 18px 22px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 42px rgba(10, 16, 24, 0.16);
}

.hero-project-image figcaption span,
.hero-project-image figcaption strong {
  display: block;
}

.hero-project-image figcaption span {
  margin-bottom: 4px;
  color: var(--jade-dark);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero-project-image figcaption strong {
  line-height: 1.3;
}

/* Projects */
.project-section {
  padding-top: 40px;
  background: var(--paper);
}

.project-intro {
  max-width: 760px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.12rem);
}

.section-heading {
  margin-bottom: 56px;
}

.split-heading {
  display: grid;
  grid-template-columns: 1.1fr 0.78fr;
  gap: 80px;
  align-items: end;
}

.section-heading h2,
.surface-section h2,
.final-card h2 {
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.split-heading > p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.17rem);
}

.project-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, 0.78fr);
  gap: 18px;
  align-items: stretch;
}

.project-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 42px rgba(10, 16, 24, 0.055);
}

.project-card-featured {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1.28fr) minmax(340px, 0.72fr);
}

.project-card-featured .project-card-media img {
  height: 100%;
  aspect-ratio: auto;
}

.project-card-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #dbe3df;
}

.project-card-media img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card-media-square img {
  aspect-ratio: 1 / 1;
}

.project-card-media-portrait img,
.modal-main-image-portrait img {
  object-position: center 58%;
}

.project-card:hover .project-card-media img {
  transform: scale(1.025);
}

.project-index {
  position: absolute;
  top: 20px;
  left: 20px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  background: rgba(10, 16, 24, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.project-card-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: clamp(22px, 3vw, 32px);
}

.project-location {
  margin: 0 0 14px;
  color: var(--jade-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.project-card h3 {
  margin: 0 0 15px;
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.project-card:not(.project-card-featured) h3 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
}

.project-card-copy > p:not(.project-location) {
  margin: 0;
  color: var(--muted);
}

.project-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 20px 0 18px;
  padding: 0;
  list-style: none;
}

.project-card li {
  padding: 7px 11px;
  color: var(--vblue);
  background: rgba(53, 95, 168, 0.07);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  margin-top: auto;
  color: var(--vblue);
  font-weight: 800;
  text-decoration-color: rgba(53, 95, 168, 0.35);
  text-underline-offset: 6px;
}

.project-link span {
  transition: transform 0.25s ease;
}

.project-link:hover,
.project-link:focus-visible {
  color: var(--jade-dark);
}

.project-link:hover span,
.project-link:focus-visible span {
  transform: translateX(4px);
}

/* Surfaces */
.surface-section {
  padding: 70px 0;
  color: #fff;
  background: var(--vblue);
}

.surface-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 80px;
  align-items: center;
}

.surface-section h2 {
  font-size: clamp(2.1rem, 4vw, 3.6rem);
}

.surface-grid > div p {
  margin: 0 0 10px;
  color: var(--jade);
  font-weight: 800;
  letter-spacing: 0.05em;
}

.surface-grid > div span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 1.08rem;
}

/* Final */
.final-section {
  background: var(--paper);
}

.final-card {
  position: relative;
  padding: clamp(46px, 8vw, 88px);
  overflow: hidden;
  color: #fff;
  background: var(--jade);
  border-radius: clamp(28px, 5vw, 48px);
  box-shadow: 0 28px 70px rgba(0, 200, 104, 0.23);
  text-align: center;
}

.final-card::before,
.final-card::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  content: "";
}

.final-card::before {
  top: -190px;
  right: -110px;
  width: 430px;
  height: 430px;
}

.final-card::after {
  bottom: -240px;
  left: -130px;
  width: 510px;
  height: 510px;
}

.final-card > * {
  position: relative;
  z-index: 1;
}

.final-card .eyebrow {
  justify-content: center;
}

.final-card h2 {
  max-width: 820px;
  margin-right: auto;
  margin-left: auto;
}

.final-card > p:not(.eyebrow) {
  max-width: 680px;
  margin: 22px auto 32px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.12rem;
}

.primary-cta-inverted {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 16px 38px rgba(0, 69, 36, 0.16);
}

.final-card small {
  display: block;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 700;
}

/* Footer */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 42px max(24px, calc((100% - 1180px) / 2));
  color: var(--muted);
  background: #edf2ef;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
}

.footer-logo img {
  width: 140px;
  height: auto;
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  gap: 18px;
}

.site-footer a {
  text-decoration: none;
}

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

/* Modal */
.project-modal {
  position: fixed;
  z-index: 12000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 34px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 16, 0.72);
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.project-dialog {
  position: relative;
  z-index: 1;
  width: min(1260px, 91vw);
  max-height: calc(100dvh - 68px);
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  box-shadow: 0 36px 110px rgba(0, 0, 0, 0.32);
  overscroll-behavior: contain;
}

.project-dialog:focus {
  outline: none;
}

.modal-close {
  position: sticky;
  z-index: 8;
  top: 18px;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin: 18px 18px -66px auto;
  padding: 0 0 4px;
  color: #fff;
  background: rgba(10, 16, 24, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.modal-close:hover,
.modal-close:focus-visible {
  background: var(--jade-dark);
  outline: 3px solid rgba(0, 200, 104, 0.3);
  outline-offset: 3px;
}

.modal-header {
  padding: 72px clamp(28px, 6vw, 78px) 42px;
}

.modal-header p,
.case-label {
  margin: 0 0 12px;
  color: var(--jade-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.modal-header h2 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.25rem, 5.2vw, 5.1rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.modal-gallery {
  padding: 0 clamp(22px, 4vw, 52px);
}

.modal-main-image {
  overflow: hidden;
  background: #e1e7e4;
  border-radius: 22px;
}

.modal-main-image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.modal-main-image-square img {
  max-height: 690px;
  aspect-ratio: 16 / 10;
}

.modal-thumbnails {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.gallery-thumb {
  width: 104px;
  height: 72px;
  padding: 0;
  overflow: hidden;
  background: #e1e7e4;
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  opacity: 0.62;
}

.gallery-thumb.is-active {
  border-color: var(--jade);
  opacity: 1;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-study {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 62px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.case-study section {
  padding: clamp(32px, 5vw, 62px);
  background: #fff;
}

.case-study .case-wide {
  grid-column: 1 / -1;
  background: var(--paper);
}

.case-study h3,
.modal-detail-grid h3 {
  margin: 0 0 14px;
  font-size: clamp(1.45rem, 2.6vw, 2.15rem);
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.case-study section > p:last-child,
.modal-detail-grid section > p:last-child {
  margin: 0;
  color: var(--muted);
}

.project-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  color: #fff;
  background: var(--vblue);
}

.project-facts > div {
  min-height: 170px;
  padding: 36px;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.project-facts > div:last-child {
  border-right: 0;
}

.project-facts strong,
.project-facts span {
  display: block;
}

.project-facts strong {
  margin-bottom: 8px;
  font-size: clamp(1.75rem, 3.3vw, 3rem);
  letter-spacing: -0.05em;
  line-height: 1;
}

.project-facts span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
  font-weight: 700;
}

.modal-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding: clamp(38px, 6vw, 76px);
}

.modal-detail-grid section {
  padding: 36px;
  border-radius: 22px;
}

.service-list {
  background: var(--paper);
  border: 1px solid var(--line);
}

.service-list ul {
  display: grid;
  gap: 11px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.service-list li {
  position: relative;
  padding-left: 25px;
}

.service-list li::before {
  position: absolute;
  left: 0;
  color: var(--jade);
  font-weight: 800;
  content: "✓";
}

.result-box {
  color: #fff;
  background: #101922;
}

.result-box .case-label {
  color: var(--jade);
}

.result-box > p:last-child {
  color: rgba(255, 255, 255, 0.62) !important;
}

.modal-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  padding: clamp(34px, 5vw, 58px) clamp(28px, 6vw, 76px);
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.modal-cta p {
  margin: 0 0 3px;
  font-size: 1.32rem;
  font-weight: 800;
}

.modal-cta div > span {
  color: var(--muted);
}

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

  .hero-copy-wrap {
    max-width: 760px;
  }

  .hero-project-image {
    max-width: 820px;
  }

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

  .project-card-featured {
    display: flex;
    grid-column: auto;
  }

  .project-card-featured .project-card-media img {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .project-card-media-square img {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 780px) {
  html {
    scroll-padding-top: 82px;
  }

  .shell {
    width: min(100% - 32px, 680px);
  }

  .section {
    padding: 76px 0;
  }

  .header-cta {
    display: inline-flex;
  }

  .projects-hero {
    min-height: auto;
    padding: 112px 0 40px;
  }

  .hero-copy-wrap h1 {
    font-size: clamp(3.4rem, 15vw, 5.3rem);
  }

  .project-section {
    padding-top: 28px;
  }

  .hero-project-image figcaption {
    right: 12px;
    bottom: 12px;
    max-width: calc(100% - 24px);
  }

  .split-heading,
  .surface-grid,
  .case-study,
  .modal-detail-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    margin-bottom: 38px;
  }

  .split-heading {
    gap: 22px;
  }

  .section-heading h2,
  .surface-section h2,
  .final-card h2 {
    font-size: clamp(2.1rem, 10vw, 3.25rem);
  }

  .project-card-media img,
  .project-card-media-square img {
    aspect-ratio: 4 / 3;
  }

  .surface-grid {
    gap: 24px;
  }

  .primary-cta {
    width: 100%;
  }

  .final-card {
    padding: 48px 22px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 36px 24px;
  }

  .project-modal {
    padding: 0;
  }

  .project-dialog {
    width: 100%;
    max-height: 100dvh;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .modal-close {
    top: 12px;
    margin: 12px 12px -60px auto;
  }

  .modal-header {
    padding: 72px 20px 30px;
  }

  .modal-header h2 {
    font-size: clamp(2.05rem, 11vw, 3.2rem);
  }

  .modal-gallery {
    padding: 0 12px;
  }

  .modal-main-image,
  .modal-main-image-square {
    border-radius: 15px;
  }

  .modal-main-image img,
  .modal-main-image-square img {
    aspect-ratio: 4 / 3;
  }

  .case-study {
    margin-top: 42px;
  }

  .case-study .case-wide {
    grid-column: auto;
  }

  .case-study section {
    padding: 34px 22px;
  }

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

  .project-facts > div {
    min-height: 130px;
    padding: 24px;
    border-right: 1px solid rgba(255, 255, 255, 0.14);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .modal-detail-grid {
    padding: 34px 14px;
  }

  .modal-detail-grid section {
    padding: 28px 22px;
  }

  .modal-cta {
    flex-direction: column;
    align-items: stretch;
    padding: 34px 22px;
  }
}

@media (max-width: 480px) {
  .eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
  }

  .header-cta {
    display: inline-flex !important;
    padding: 9px 12px !important;
    font-size: 11px !important;
  }

  .header-actions {
    gap: 6px !important;
  }

  .menu-toggle {
    padding: 8px !important;
  }

  .hero-copy-wrap h1 {
    font-size: clamp(3rem, 14.4vw, 4.1rem);
  }

  .project-card-copy {
    padding: 26px 22px;
  }

  .project-facts strong {
    font-size: 1.75rem;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
