:root {
  --bg: #f5f7fb;
  --bg-layer: #ffffff;
  --panel: #ffffff;
  --text: #000000;
  --muted: #3f4f6a;
  --accent: #ef2b2d;
  --accent-2: #1a3e6e;
  --stroke: rgba(26, 62, 110, 0.18);
}

@media (min-width: 981px) {
  .services-showcase,
  .services-showcase * {
    cursor:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='9' fill='none' stroke='%23ffffff' stroke-width='2'/%3E%3C/svg%3E")
        14 14,
      auto;
  }
}

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

html,
body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 58%, #eef2f8 100%);
  font-family: "Manrope", sans-serif;
  font-size: 18px;
}

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

.page-wrap {
  min-height: 100vh;
  position: relative;
}

.page-wrap::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(12, 18, 28, 0.24);
  backdrop-filter: blur(7px) saturate(1.05);
  -webkit-backdrop-filter: blur(7px) saturate(1.05);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
  z-index: 35;
}

.site-header,
.work,
.footer-brand,
.footer-grid,
.footer-bottom {
  width: min(1180px, calc(100% - 3rem));
  margin: 0 auto;
}

.site-header {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 0.55rem 2.4rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  position: sticky;
  top: 0;
  left: 0;
  transform: none;
  z-index: 20;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid rgba(18, 23, 34, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  grid-column: 2;
  justify-self: center;
}

.site-nav a {
  padding: 0.56rem 0.95rem;
  border-radius: 0.8rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #121722;
}

.site-nav-contact {
  display: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(26, 62, 110, 0.08);
  outline: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  grid-column: 1;
  justify-self: start;
}

.brand-logo {
  width: 170px;
  height: auto;
  display: block;
}

.brand-text {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: var(--muted);
}

.menu-btn {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #2c3542;
  text-transform: uppercase;
  font-size: 0;
  letter-spacing: 0;
  display: none;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  width: 3.3rem;
  height: 3rem;
  justify-content: center;
  box-shadow: none;
  padding: 0;
  grid-column: 3;
  justify-self: end;
}

.header-cta {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.58rem 1.2rem;
  border-radius: 999px;
  background: #1a3e6e;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 12px 24px rgba(26, 62, 110, 0.18);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.header-cta:hover,
.header-cta:focus-visible {
  background: #143257;
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(26, 62, 110, 0.24);
  outline: none;
}

.menu-icon {
  width: 2.2rem;
  height: 1.45rem;
  display: inline-block;
  position: relative;
  filter: none;
}

.menu-icon::before,
.menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 0.18rem;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.2s ease, top 0.2s ease, bottom 0.2s ease;
}

.menu-icon::before {
  top: 0.04rem;
  box-shadow: 0 0.57rem 0 currentColor;
}

.menu-icon::after {
  bottom: 0.04rem;
}

.site-header.is-open .menu-icon::before {
  top: 0.56rem;
  box-shadow: none;
  transform: rotate(45deg);
}

.site-header.is-open .menu-icon::after {
  bottom: 0.6rem;
  transform: rotate(-45deg);
}

.work {
  padding: 0 0 6.2rem;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.72rem;
  color: var(--accent-2);
}

.highlight-hero {
  margin-top: 0;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background:
    linear-gradient(125deg, rgba(10, 18, 33, 0.82), rgba(10, 18, 33, 0.56)),
    url("Bex Main Header copy.jpeg") center / cover no-repeat;
  border-radius: 0;
  min-height: 78vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  padding: 5.2rem max(2rem, calc((100vw - 1180px) / 2));
  position: relative;
}

.highlight-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 15, 28, 0.6), rgba(8, 15, 28, 0.18));
  pointer-events: none;
}

.highlight-copy,
.highlight-visual {
  position: relative;
  z-index: 1;
}

.highlight-copy {
  max-width: 44rem;
  padding-top: 0;
}

.highlight-kicker {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.highlight-copy h2 {
  margin: 0.65rem 0 0;
  font-family: "Syne", sans-serif;
  font-size: clamp(2.15rem, 4.3vw, 4rem);
  line-height: 0.96;
  color: var(--accent-2);
}

.highlight-copy h1 {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: clamp(2.15rem, 4.3vw, 4rem);
  line-height: 0.96;
  color: #ffffff;
}

.highlight-copy p {
  margin: 1.05rem 0 0;
  max-width: 32ch;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.03rem;
  font-weight: 500;
}

.highlight-copy .highlight-statement {
  margin: 0;
  max-width: 26ch;
  font-family: "Manrope", sans-serif;
  font-size: clamp(2rem, 2.8vw, 3.35rem);
  line-height: 1.12;
  font-weight: 700;
  color: #ffffff;
}

.highlight-actions {
  margin-top: 1.9rem;
  display: flex;
  gap: 0.72rem;
  flex-wrap: wrap;
}

.highlight-actions a {
  padding: 0.72rem 1.1rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.highlight-actions a:first-child {
  background: #ffffff;
  border: 1px solid rgba(18, 23, 34, 0.14);
  color: #000000;
}

.highlight-actions a:last-child:not(:first-child) {
  background: #ffffff;
  border: 1px solid rgba(26, 62, 110, 0.25);
  color: var(--accent);
}

.highlight-actions a:first-child:hover,
.highlight-actions a:first-child:focus-visible {
  background: #121722;
  border-color: #121722;
  color: #ffffff;
}

.highlight-metrics {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--accent-2);
}

.metric-avatars {
  display: flex;
}

.metric-avatars span {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 2px solid #fff;
  margin-right: -0.45rem;
  background-size: cover;
  background-position: center;
  background-image: url("Bex-Logo.png");
}

.metric-block strong {
  display: block;
  font-family: "Syne", sans-serif;
  font-size: 2rem;
  line-height: 0.95;
}

.metric-block span {
  font-size: 0.82rem;
  color: rgba(0, 0, 0, 0.7);
}

.metric-divider {
  width: 1px;
  height: 2.25rem;
  background: rgba(26, 62, 110, 0.35);
}

.highlight-visual {
  position: relative;
  align-self: end;
  justify-self: center;
}

.services-label-wrap {
  margin-top: 1.5rem;
}

.services-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.1rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(18, 23, 34, 0.18);
  background: rgba(255, 255, 255, 0.96);
  color: #6a7280;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1;
}

.about-feature {
  margin-top: 1.6rem;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 4.5rem max(2rem, calc((100vw - 1280px) / 2));
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.72fr);
  gap: 4rem;
  align-items: start;
  background: #ffffff;
}

.about-feature-copy {
  max-width: 52rem;
  padding-top: 0.3rem;
  padding-right: 1rem;
}

.about-feature-eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #000000;
}

.about-feature p {
  margin: 1.2rem 0 0;
  max-width: 48ch;
  font-size: 1.12rem;
  line-height: 1.8;
  color: #111111;
}

.about-feature-media {
  height: 100%;
  max-width: 30rem;
  align-self: start;
  justify-self: end;
}

.about-feature-media img {
  width: 100%;
  height: 29rem;
  display: block;
  object-fit: cover;
  border-radius: 0;
}

.services-showcase {
  width: 100vw;
  margin: 0 0 0 calc(50% - 50vw);
  background: #f7f7f3;
  min-height: auto;
  padding-bottom: 0;
}

.services-showcase-hero {
  min-height: 30rem;
  padding: 3.9rem max(2rem, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  background:
    linear-gradient(115deg, rgba(0, 47, 35, 0.94), rgba(5, 61, 44, 0.86)),
    url("services.png") center / cover no-repeat;
  position: relative;
  overflow: hidden;
}

.services-showcase-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(145, 255, 203, 0.18), transparent 35%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.14), transparent 52%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.services-showcase-hero h2 {
  margin: 0;
  position: relative;
  z-index: 1;
  font-family: "Syne", sans-serif;
  font-size: clamp(3rem, 5.2vw, 4.9rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
  color: #ffffff;
}

.services-showcase-grid {
  width: calc(100% - 7rem);
  margin: 1.9rem auto 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  border: 1px solid rgba(18, 23, 34, 0.1);
  background: #ffffff;
}

.service-panel {
  position: relative;
  min-height: 15rem;
  padding: 2.6rem 1.9rem 2rem;
  border-right: 1px solid rgba(18, 23, 34, 0.1);
  border-bottom: 1px solid rgba(18, 23, 34, 0.1);
  background: #ffffff;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.28s ease, color 0.28s ease, box-shadow 0.28s ease;
}

.service-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(14, 14, 14, 0.78), rgba(42, 42, 42, 0.62)),
    var(--service-image, url("Bex Main Header copy.jpeg")) center / cover no-repeat;
  opacity: 0.14;
  filter: grayscale(1);
  transition: opacity 0.28s ease, transform 0.28s ease, filter 0.28s ease,
    background 0.28s ease;
  transform: scale(1.03);
  z-index: 0;
}

.service-panel > * {
  position: relative;
  z-index: 1;
}

.service-panel:hover,
.service-panel:focus-within,
.service-panel.is-active {
  transform: translateY(-4px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.service-panel:hover::before,
.service-panel:focus-within::before,
.service-panel.is-active::before {
  background:
    linear-gradient(135deg, rgba(8, 30, 24, 0.82), rgba(16, 84, 63, 0.68)),
    var(--service-image, url("Bex Main Header copy.jpeg")) center / cover no-repeat;
  opacity: 1;
  filter: grayscale(0);
  transform: scale(1);
}

.service-panel:nth-child(4n) {
  border-right: 0;
}

.service-panel-index {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: #6a7280;
}

.service-panel-index::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #2fd49f;
}

.service-panel h3 {
  margin: 1.1rem 0 0;
  font-size: 1.12rem;
  line-height: 1.28;
  font-weight: 700;
  color: #101010;
  transition: color 0.28s ease;
}

.service-panel p {
  margin: 0.85rem 0 0;
  font-size: 0.97rem;
  line-height: 1.55;
  color: #4f5868;
  transition: color 0.28s ease;
}

.service-panel:hover .service-panel-index,
.service-panel:focus-within .service-panel-index,
.service-panel.is-active .service-panel-index,
.service-panel:hover h3,
.service-panel:focus-within h3,
.service-panel.is-active h3,
.service-panel:hover p,
.service-panel:focus-within p,
.service-panel.is-active p {
  color: #ffffff;
}

.service-panel:hover .service-panel-index::before,
.service-panel:focus-within .service-panel-index::before,
.service-panel.is-active .service-panel-index::before {
  background: #9ff8de;
}

.cta {
  min-height: 26rem;
  background:
    linear-gradient(rgba(8, 15, 28, 0.64), rgba(8, 15, 28, 0.74)),
    url("handshake.jpg");
  background-size: cover;
  background-position: center 24%;
  display: grid;
  place-items: center;
  border-top: 1px solid rgba(18, 23, 34, 0.08);
  border-bottom: 1px solid rgba(18, 23, 34, 0.08);
}

.cta-overlay {
  text-align: center;
  padding: 2rem 1rem;
}

.cta-overlay .eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

.cta h3 {
  margin: 0.8rem auto 0;
  max-width: 18ch;
  font-family: "Syne", sans-serif;
  font-size: clamp(2rem, 3.5vw, 3.3rem);
  line-height: 1.08;
  color: #ffffff;
}

.cta-btn {
  margin-top: 1.55rem;
  display: inline-block;
  background: linear-gradient(130deg, #1a3e6e, #274f85);
  color: #ffffff;
  border-radius: 999px;
  padding: 0.7rem 1.35rem;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  transition: transform 0.2s ease;
}

.cta-btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.site-footer {
  background: #ffffff;
  padding: 4rem 0 1.4rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.4rem 0 1rem;
  border-bottom: 1px solid var(--stroke);
}

.footer-logo {
  width: clamp(140px, 16vw, 215px);
  height: auto;
  display: block;
}

.brand-text.big {
  font-family: "Syne", sans-serif;
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--text);
}

.footer-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.footer-grid h4 {
  margin: 0 0 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--accent);
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-grid li,
.footer-grid p {
  margin: 0 0 0.45rem;
  text-transform: uppercase;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  color: #495064;
  line-height: 1.52;
}

.footer-bottom {
  border-top: 1px solid var(--stroke);
  margin-top: 2.2rem;
  padding-top: 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #76809a;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@keyframes card-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .site-header {
    top: 0.2rem;
  }

  .highlight-hero {
    grid-template-columns: 1fr;
    padding: 4.75rem 1.4rem;
    min-height: 86vh;
  }

  .highlight-copy {
    padding-top: 0;
  }

  .highlight-copy .highlight-statement {
    max-width: 24ch;
  }

  .highlight-visual {
    margin-top: 1rem;
  }

  .highlight-metrics {
    flex-wrap: wrap;
    gap: 0.8rem;
  }

  .about-feature {
    grid-template-columns: 1fr;
    padding: 2.2rem 1.4rem;
    gap: 1.4rem;
  }

  .about-feature p {
    max-width: 100%;
  }

  .about-feature-media img {
    min-height: 21rem;
    border-radius: 0.85rem;
  }

  .services-showcase {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    min-height: auto;
  }

  .services-showcase-hero {
    min-height: 14rem;
    padding: 2.1rem 1.5rem;
  }

  .services-showcase-grid {
    width: calc(100% - 2.8rem);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-panel:nth-child(4n) {
    border-right: 1px solid rgba(18, 23, 34, 0.1);
  }

  .service-panel:nth-child(2n) {
    border-right: 0;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 1.6rem;
  }
}

@media (max-width: 640px) {
  .site-header,
  .work,
  .footer-brand,
  .footer-grid,
  .footer-bottom {
    width: min(1180px, calc(100% - 1.5rem));
  }

  .work {
    padding-top: 0;
  }

  .highlight-hero {
    min-height: calc(100vh - 4.6rem);
    align-items: center;
    padding: 3.6rem 1.3rem 3rem;
  }

  .highlight-copy {
    max-width: 100%;
  }

  .highlight-copy .highlight-statement {
    max-width: 100%;
    font-size: clamp(1.75rem, 7.2vw, 2.7rem);
    line-height: 1.12;
  }

  .highlight-actions {
    margin-top: 2rem;
  }

  .about-feature {
    padding: 1.1rem;
    border-radius: 1rem;
  }

  .about-feature p {
    font-size: 0.98rem;
    line-height: 1.6;
  }

  .about-feature-media img {
    min-height: 16rem;
    border-radius: 0.85rem;
  }

  .services-showcase {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-top: 2rem;
  }

  .services-showcase-hero {
    min-height: 11rem;
    padding: 1.6rem 1.15rem;
  }

  .services-showcase-hero h2 {
    font-size: clamp(2.15rem, 11vw, 3.2rem);
  }

  .services-showcase-grid {
    width: calc(100% - 1.5rem);
    grid-template-columns: 1fr;
  }

  .service-panel {
    min-height: auto;
    padding: 1.35rem 1.15rem;
    border-right: 0;
  }

  .service-panel:nth-child(2n) {
    border-right: 0;
  }

  .site-header {
    position: sticky;
    top: 0;
    left: 50%;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    transform: none;
    padding: 0.9rem 0.75rem 0.6rem;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    z-index: 40;
    display: flex;
    justify-content: space-between;
  }

  .header-cta {
    display: none;
  }

  body.menu-open {
    overflow: hidden;
  }

  body.menu-open .page-wrap::before {
    opacity: 1;
    pointer-events: auto;
  }

  .brand-logo {
    width: 118px;
  }

  .menu-btn {
    display: inline-flex;
    width: 3.15rem;
    height: 2.85rem;
  }

  .menu-icon {
    width: 2.1rem;
    height: 1.35rem;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0.75rem;
    min-width: min(240px, calc(100vw - 1.5rem));
    padding: 0.65rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(18, 23, 34, 0.1);
    box-shadow: 0 18px 40px rgba(18, 23, 34, 0.14);
    display: grid;
    gap: 0.35rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 45;
  }

  .site-nav-contact {
    display: inline-flex;
  }

  .site-header.is-open .site-nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .highlight-actions a {
    width: 100%;
    text-align: center;
  }

  .highlight-visual {
    display: none;
  }

  .highlight-hero::after {
    display: none;
  }

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

  .project-card,
  .span-2x2 {
    grid-column: 1;
    min-height: 18rem;
    grid-row: auto;
  }

  .card-detail {
    max-height: 220px;
    opacity: 1;
    transform: translateY(0);
  }

  .cta {
    min-height: 22rem;
  }

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

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
  }
}
