@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700&family=Roboto:wght@400;700&display=swap");

@font-face {
  font-family: "Alte Haas Grotesk";
  src: url("../fonts/AlteHaasGroteskRegular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00BF;
}

@font-face {
  font-family: "Alte Haas Grotesk";
  src: url("../fonts/AlteHaasGroteskBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0000-00BF;
}

:root {
  --header-height: 150px;
  --page-side-space: 10vw;
  --text: #17334a;
  --header-ink: #161b4e;
  --accent: #0c5c90;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Roboto", "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header-inner {
  width: calc(100% - (var(--page-side-space) * 2));
  min-height: 120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: rgba(32, 52, 108, 0.3);
}

.brand-mark {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
}

.brand-mark img {
  width: 150px;
  height: auto;
  display: block;
}

.menu-toggle {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  color: var(--header-ink);
  background: transparent;
  cursor: pointer;
  display: none;
}

.menu-toggle-line {
  width: 24px;
  height: 2px;
  margin: 5px auto;
  display: block;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.main-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(16px, 2vw, 46px);
  transform: translateX(-10%);
}

.main-menu a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 4px solid transparent;
  color: var(--header-ink);
  text-decoration: none;
  font-size: clamp(1.25rem, 1.2rem + 0.4vw, 1.75rem);
  line-height: 1.1;
  font-weight: 700;
}

.main-menu a:hover,
.main-menu a.is-active {
  border-bottom-color: var(--header-ink);
}

.main-menu a.nav-contact {
  padding: 10px 16px;
  border-bottom-color: transparent;
  border-radius: 999px;
  background: rgba(12, 92, 144, 0.22);
}

.main-menu a.nav-contact:hover,
.main-menu a.nav-contact.is-active {
  border-bottom-color: transparent;
  background: rgba(12, 92, 144, 0.34);
}

.main-menu a.with-arrow::after {
  content: "";
  width: 0;
  height: 0;
  margin-top: 4px;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 9px solid var(--header-ink);
}

.home {
  background: #fff;
  overflow-x: hidden;
}

.home-stage {
  --card-width: min(655px, calc(100vw - 48px));
  --card-margin: clamp(36px, 6vw, 86px) auto 40px calc(var(--page-side-space) + 5vw);
  --card-bg: rgba(255, 255, 255, 0.7);
  --card-border: rgba(255, 255, 255, 0.82);
  --card-shadow: 0 14px 45px rgba(12, 67, 101, 0.2);
  --card-blur: 2px;
  min-height: calc(100svh - var(--header-height));
  height: calc(100svh - var(--header-height));
  padding-top: clamp(18px, 2.4vw, 34px);
  position: relative;
}

.home-stage:not(.what-we-do-stage) {
  overflow: hidden;
}

.home-stage:not(.what-we-do-stage) .home-visual {
  top: 0;
}

.home-visual {
  position: absolute;
  inset: 0 var(--page-side-space);
  z-index: 0;
  overflow: hidden;
}

.home-visual img {
  width: 100%;
  max-width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.98) contrast(1.03);
}

.home-stage:not(.what-we-do-stage) .home-visual img {
  object-fit: cover;
  mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'><path d='M0 0 L100 0 L100 75 Q50 80 0 98 Z' fill='black'/></svg>");
  mask-size: 100% 100%;
  -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'><path d='M0 0 L100 0 L100 75 Q50 80 0 98 Z' fill='black'/></svg>");
  -webkit-mask-size: 100% 100%;
  margin-bottom: -80px;
}

.home-stage:not(.what-we-do-stage) .card {
  margin-bottom: 0;
}

.home-stage .card {
  width: var(--card-width);
  margin: var(--card-margin);
  padding: 32px 28px 34px;
  position: relative;
  z-index: 1;
  text-align: left;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(var(--card-blur));
  animation: rise 0.9s ease-out;
}

.home-summary-title {
  margin: 10px auto 0;
  max-width: 48ch;
  color: #163a56;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  line-height: 1.45;
}

.home-summary {
  margin: 18px auto 0;
  max-width: 58ch;
  color: #1b3f5c;
  font-size: clamp(0.98rem, 1.6vw, 1.1rem);
  line-height: 1.65;
}

.what-we-do-stage {
  --card-width: min(1187px, calc(100vw - 48px));
  --card-margin: calc(clamp(36px, 6vw, 86px) - 50px) auto 40px;
  --card-bg: rgba(255, 255, 255, 0.5);
  --card-border: rgba(255, 255, 255, 0.75);
  --card-shadow: 0 14px 45px rgba(12, 67, 101, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  --card-blur: 3px;
}

.what-we-do-stage .card {
  padding: 26px 22px 27px;
}

.what-we-do-stage .qh-title {
  text-align: center;
  max-width: none;
  font-size: 33px;
  font-weight: 700;
}

.what-we-do-stage .qh-subtitle {
  margin: 10px 0 0;
  color: #1b3f5c;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}

.what-we-do-stage .summary-body {
  width: 100%;
  max-width: 1187px;
  height: auto;
  overflow: hidden;
  margin-top: 14px;
  padding: 1em 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.what-we-do-stage .summary-body .home-summary {
  margin: 0;
  max-width: none;
  font-size: 19px;
  font-weight: 400;
  line-height: 1.45;
}

.what-we-do-stage .home-visual {
  inset: auto;
  left: 0;
  top: clamp(110px, 14vh, 180px);
  bottom: 0;
  width: auto;
  height: auto;
  overflow: hidden;
  clip-path: none;
}

.what-we-do-stage .home-visual img {
  width: min(104.8vw, 1453px);
  max-width: min(104.8vw, 1453px);
  height: auto;
  max-height: none;
  object-fit: initial;
  object-position: left bottom;
  opacity: 0.45;
  transform: none;
  clip-path: inset(20% 20% 30% 20%);
}

.services-grid {
  width: min(1183px, calc(100% - var(--page-side-space) - 24px));
  margin: auto auto 40px calc(var(--page-side-space) + 50px);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 17px;
  position: relative;
  z-index: 1;
}

.service-box {
  grid-column: span 1;
  width: auto;
  height: auto;
  min-height: 196px;
  padding: 1em 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  border: 2px solid rgba(12, 92, 144, 0.2);
  border-radius: 26px;
  background: #252A49;
  box-shadow: 0 8px 24px rgba(12, 67, 101, 0.08);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.service-icon {
  width: 51px;
  height: 51px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
  margin-bottom: 12px;
  opacity: 1;
  border-radius: 14px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08) 60%, rgba(255, 255, 255, 0.02) 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.24), 0 6px 16px rgba(116, 206, 255, 0.25);
  filter: saturate(1.35) contrast(1.2) brightness(1.12) drop-shadow(0 2px 6px rgba(131, 216, 255, 0.55));
  order: 1;
}

.service-box:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(12, 92, 144, 0.2);
}

.service-title {
  margin: 0 0 8px 0;
  color: #fff;
  letter-spacing: 0.3px;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 700;
  flex-shrink: 0;
  order: 2;
}

.service-box-detailed {
  height: auto;
  min-height: 196px;
}

.service-copy {
  margin: 0;
  color: #fff;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 400;
  flex: 1 1 auto;
  order: 3;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

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

@media (max-width: 640px) {
  .home {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .site-header-inner {
    width: calc(100% - 24px);
    min-height: 108px;
    padding: 10px 0;
    gap: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  :root {
    --header-height: 108px;
  }

  .brand-mark img {
    width: 118px;
  }

  .menu-toggle {
    order: 2;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .main-menu {
    width: 100%;
    order: 4;
    padding-top: 6px;
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    gap: 10px;
    transform: none;
  }

  .site-header-inner.menu-open .main-menu {
    display: flex;
  }

  .main-menu a {
    padding: 6px 0;
    border-bottom-width: 3px;
    font-size: 1rem;
    line-height: 1.2;
  }

  .main-menu a.nav-contact {
    width: 100%;
    justify-content: center;
  }

  .home-stage {
    min-height: auto;
    height: auto;
    padding: 14px 12px 24px;
  }

  .home-visual {
    position: relative;
    inset: auto;
    width: 100%;
    max-height: 400px;
    aspect-ratio: 1 / 1;
  }

  .what-we-do-stage .home-visual {
    position: absolute;
    left: 0;
    right: auto;
    top: auto;
    bottom: 0;
    width: auto;
    max-height: none;
    aspect-ratio: auto;
    overflow: visible;
    clip-path: none;
  }

  .what-we-do-stage .home-visual img {
    width: min(80vw, 560px);
    max-width: min(80vw, 560px);
    height: auto;
  }

  .home-stage .card {
    width: 100%;
    margin: 16px 0 20px;
    padding: 24px 18px 26px;
  }

  .services-grid {
    width: 100%;
    margin: 0 auto 20px;
    gap: 14px;
  }

  .service-box {
    height: auto;
    min-height: 94px;
    padding: 14px 12px;
  }

  .service-icon {
    width: 37px;
    height: 37px;
  }

  .service-title {
    font-size: 0.75rem;
  }

  .service-copy {
    font-size: 0.68rem;
  }

}
