:root {
  --blue: #6592e6;
  --blue-deep: #2f63bd;
  --teal: #40b0bf;
  --teal-deep: #237985;
  --ink: #17324d;
  --ink-soft: #496278;
  --sky: #eef5ff;
  --mint: #edfafa;
  --white: #ffffff;
  --lime: #9bd414;
  --sun: #ffc700;
  --line: rgba(23, 50, 77, 0.12);
  --shadow: 0 24px 70px rgba(39, 76, 117, 0.14);
  --radius-sm: 14px;
  --radius-md: 24px;
  --radius-lg: 36px;
  --page: min(1180px, calc(100% - 40px));
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ink);
  background: #fbfdff;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: white;
  transform: translateY(-150%);
}

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

.container {
  width: var(--page);
  margin-inline: auto;
}

.top-strip {
  position: relative;
  z-index: 20;
  background: var(--ink);
  color: white;
  font-size: 0.875rem;
}

.top-strip-inner {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
}

.top-strip a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  opacity: 0.92;
  transition: opacity 180ms ease;
}

.top-strip a:hover {
  opacity: 1;
}

.top-strip svg,
.icon-link svg,
.contact-link svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(101, 146, 230, 0.15);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  min-height: 84px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 260px;
}

.brand-logo {
  width: 58px;
  height: 50px;
  object-fit: contain;
}

.brand-copy {
  line-height: 1.2;
}

.brand-copy strong {
  display: block;
  font-size: 0.98rem;
  letter-spacing: -0.015em;
}

.brand-copy span {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.desktop-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 26px;
}

.desktop-nav > a {
  position: relative;
  padding-block: 12px;
  font-size: 0.95rem;
  font-weight: 650;
}

.desktop-nav > a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 4px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  transform: scaleX(0);
  transition: transform 180ms ease;
}

.desktop-nav > a:hover::after,
.desktop-nav > a:focus-visible::after {
  transform: scaleX(1);
}

.language-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
}

.language-switcher a,
.language-switcher span {
  min-width: 36px;
  padding: 5px 8px;
  border-radius: 999px;
  text-align: center;
  font-size: 0.76rem;
  font-weight: 800;
}

.language-switcher .active {
  background: var(--ink);
  color: white;
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: var(--ink);
  cursor: pointer;
}

.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
  content: "";
  display: block;
  width: 19px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.menu-toggle[aria-expanded="true"] span {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"]::before {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"]::after {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu {
  display: none;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 88px;
  background:
    radial-gradient(circle at 4% 0%, rgba(101, 146, 230, 0.2), transparent 32%),
    radial-gradient(circle at 96% 100%, rgba(64, 176, 191, 0.16), transparent 33%),
    linear-gradient(135deg, #f9fbff 0%, #eef7ff 52%, #f0fbfa 100%);
}

.hero::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 10px;
  right: 4vw;
  top: 54px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lime) 0 58%, var(--sun) 58%);
  transform: rotate(-7deg);
  opacity: 0.72;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: clamp(42px, 7vw, 94px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  color: var(--blue-deep);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 31px;
  height: 3px;
  border-radius: 999px;
  background: var(--teal);
}

.hero h1 {
  max-width: 700px;
  margin: 0;
  font-size: clamp(2.55rem, 5vw, 5.35rem);
  line-height: 0.99;
  letter-spacing: -0.058em;
}

.hero h1 span {
  display: block;
  margin-top: 10px;
  color: var(--blue-deep);
}

.hero-copy > p:not(.eyebrow) {
  max-width: 570px;
  margin: 26px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.03rem, 1.5vw, 1.18rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 21px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--blue-deep);
  color: white;
  box-shadow: 0 12px 30px rgba(47, 99, 189, 0.24);
}

.button-primary:hover {
  box-shadow: 0 16px 38px rgba(47, 99, 189, 0.32);
}

.button-secondary {
  border-color: rgba(47, 99, 189, 0.24);
  background: rgba(255, 255, 255, 0.66);
  color: var(--blue-deep);
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 40px;
}

.hero-fact {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 650;
}

.hero-fact i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 5px rgba(155, 212, 20, 0.14);
}

.hero-visual {
  position: relative;
  padding: 0 0 36px 32px;
}

.hero-image-wrap {
  position: relative;
  overflow: hidden;
  min-height: 590px;
  border: 9px solid rgba(255, 255, 255, 0.76);
  border-radius: 46% 46% 28px 28px;
  background: #dce9f7;
  box-shadow: var(--shadow);
}

.hero-image-wrap img {
  width: 100%;
  height: 100%;
  min-height: 590px;
  object-fit: cover;
  object-position: 55% center;
}

.hero-location {
  position: absolute;
  left: 0;
  bottom: 0;
  max-width: 310px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 21px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.91);
  box-shadow: 0 16px 40px rgba(23, 50, 77, 0.16);
  backdrop-filter: blur(14px);
}

.hero-location svg {
  width: 26px;
  height: 26px;
  color: var(--teal-deep);
}

.hero-location strong,
.hero-location span {
  display: block;
  line-height: 1.35;
}

.hero-location strong {
  font-size: 0.91rem;
}

.hero-location span {
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.section {
  padding: 108px 0;
}

.section-soft {
  background: var(--sky);
}

.section-mint {
  background: var(--mint);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.65fr);
  gap: 70px;
  align-items: end;
  margin-bottom: 50px;
}

.section-heading.centered {
  display: block;
  max-width: 770px;
  margin: 0 auto 52px;
  text-align: center;
}

.section-heading.centered .eyebrow {
  justify-content: center;
}

.section-heading.centered .eyebrow::after {
  content: "";
  width: 31px;
  height: 3px;
  border-radius: 999px;
  background: var(--teal);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 4.25rem);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.section-heading p:not(.eyebrow) {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.04rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.service-card {
  grid-column: span 4;
  position: relative;
  overflow: hidden;
  min-height: 260px;
  padding: 30px;
  border: 1px solid rgba(101, 146, 230, 0.16);
  border-radius: var(--radius-md);
  background: white;
  box-shadow: 0 10px 30px rgba(39, 76, 117, 0.06);
}

.service-card:nth-child(4),
.service-card:nth-child(5) {
  grid-column: span 6;
}

.service-number {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 29px;
  border-radius: 14px;
  background: var(--sky);
  color: var(--blue-deep);
  font-size: 0.8rem;
  font-weight: 900;
}

.service-card:nth-child(even) .service-number {
  background: var(--mint);
  color: var(--teal-deep);
}

.service-card h3 {
  margin: 0 0 12px;
  font-size: 1.28rem;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.service-card p,
.service-card ul {
  margin: 0;
  color: var(--ink-soft);
}

.service-card ul {
  padding-left: 20px;
}

.service-card li + li {
  margin-top: 7px;
}

.team-stack {
  display: grid;
  gap: 28px;
}

.team-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  overflow: hidden;
  border: 1px solid rgba(101, 146, 230, 0.16);
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: 0 20px 60px rgba(39, 76, 117, 0.08);
}

.team-card:nth-child(even) {
  grid-template-columns: minmax(0, 1.28fr) minmax(280px, 0.72fr);
}

.team-card:nth-child(even) .team-photo {
  order: 2;
}

.team-photo {
  min-height: 500px;
  background: var(--sky);
}

.team-photo img {
  width: 100%;
  height: 100%;
  min-height: 500px;
  object-fit: cover;
  object-position: center 28%;
}

.team-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(36px, 6vw, 76px);
}

.team-role {
  margin: 0 0 12px;
  color: var(--teal-deep);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.team-copy h3 {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.team-copy > p:not(.team-role) {
  margin: 22px 0 0;
  color: var(--ink-soft);
}

.profile-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue-deep);
  font-size: 0.82rem;
  font-weight: 750;
}

.social-pill svg {
  width: 16px;
  height: 16px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 180px;
  gap: 14px;
}

.gallery-item {
  grid-column: span 3;
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: #dbe8f5;
  cursor: zoom-in;
}

.gallery-item.wide {
  grid-column: span 6;
}

.gallery-item.tall {
  grid-row: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms cubic-bezier(0.2, 0.75, 0.2, 1), filter 180ms ease;
}

.gallery-item::after {
  content: "+";
  position: absolute;
  right: 13px;
  bottom: 13px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 300;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
  filter: saturate(1.05);
}

.gallery-item:hover::after,
.gallery-item:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.location-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.location-gallery .gallery-item {
  min-height: 118px;
}

.contact-shell {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 20px;
}

.contact-panel,
.map-panel {
  overflow: hidden;
  border: 1px solid rgba(101, 146, 230, 0.16);
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: 0 18px 50px rgba(39, 76, 117, 0.08);
}

.contact-panel {
  display: flex;
  flex-direction: column;
  padding: clamp(30px, 5vw, 54px);
}

.contact-panel h3 {
  margin: 0 0 28px;
  font-size: 1.65rem;
  letter-spacing: -0.035em;
}

.contact-links {
  display: grid;
  gap: 20px;
}

.contact-link {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: start;
  gap: 13px;
}

.contact-link .icon-circle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--sky);
  color: var(--blue-deep);
}

.contact-link small,
.contact-link strong {
  display: block;
}

.contact-link small {
  color: var(--ink-soft);
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.contact-link strong {
  margin-top: 2px;
  font-size: 0.98rem;
}

.contact-socials {
  margin-top: auto;
  padding-top: 36px;
}

.contact-socials p {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.icon-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  font-size: 0.81rem;
  font-weight: 750;
  transition: border-color 180ms ease, color 180ms ease;
}

.icon-link:hover {
  border-color: var(--blue);
  color: var(--blue-deep);
}

.map-panel iframe {
  width: 100%;
  height: 100%;
  min-height: 575px;
  display: block;
  border: 0;
}

.lightbox {
  width: min(1050px, calc(100% - 32px));
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: transparent;
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(11, 28, 44, 0.86);
  backdrop-filter: blur(8px);
}

.lightbox img {
  width: 100%;
  max-height: 82vh;
  border-radius: 20px;
  object-fit: contain;
  background: #0e1d2b;
}

.lightbox-close {
  position: absolute;
  top: -17px;
  right: -17px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: white;
  color: var(--ink);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.lightbox-caption {
  margin: 10px 0 0;
  color: white;
  text-align: center;
  font-size: 0.9rem;
}

.site-footer {
  padding: 46px 0 30px;
  background: var(--ink);
  color: white;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-brand img {
  width: 58px;
}

.footer-brand strong,
.footer-brand span {
  display: block;
}

.footer-brand span {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.83rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 24px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  font-weight: 650;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 28px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.82rem;
}

.footer-bottom a:hover {
  color: white;
}

@media (max-width: 1040px) {
  .desktop-nav {
    gap: 17px;
  }

  .desktop-nav > a {
    font-size: 0.88rem;
  }

  .brand-copy span {
    display: none;
  }

  .hero-grid {
    gap: 40px;
  }

  .hero-image-wrap,
  .hero-image-wrap img {
    min-height: 500px;
  }

  .service-card {
    grid-column: span 6;
  }

  .service-card:last-child {
    grid-column: span 12;
  }
}

@media (max-width: 860px) {
  :root {
    --page: min(100% - 30px, 720px);
  }

  .top-strip-inner {
    justify-content: space-between;
  }

  .top-strip a:last-child {
    display: inline-flex;
  }

  .desktop-nav,
  .nav-wrap > .language-switcher {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .mobile-menu {
    position: absolute;
    inset: 100% 0 auto;
    z-index: 60;
    width: 100%;
    max-height: calc(100dvh - 84px);
    overflow-y: auto;
    padding: 30px;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--line);
    box-shadow: 0 20px 42px rgba(25, 57, 79, 0.18);
    backdrop-filter: blur(16px);
  }

  .mobile-menu.open {
    display: block;
  }

  .mobile-menu nav {
    display: grid;
    gap: 4px;
  }

  .mobile-menu nav a {
    padding: 14px 6px;
    border-bottom: 1px solid var(--line);
    font-size: 1.25rem;
    font-weight: 750;
  }

  .mobile-menu .language-switcher {
    width: fit-content;
    margin-top: 28px;
  }

  .hero {
    padding: 54px 0 70px;
  }

  .hero::after {
    display: none;
  }

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

  .hero-copy {
    max-width: 660px;
  }

  .hero-visual {
    max-width: 620px;
    padding-left: 20px;
  }

  .hero-image-wrap,
  .hero-image-wrap img {
    min-height: 480px;
  }

  .section {
    padding: 82px 0;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 22px;
    margin-bottom: 38px;
  }

  .team-card,
  .team-card:nth-child(even) {
    grid-template-columns: 0.78fr 1.22fr;
  }

  .team-card:nth-child(even) .team-photo {
    order: 0;
  }

  .team-copy {
    padding: 35px;
  }

  .gallery-grid {
    grid-auto-rows: 150px;
  }

  .gallery-item {
    grid-column: span 4;
  }

  .gallery-item.wide {
    grid-column: span 8;
  }

  .contact-shell {
    grid-template-columns: 1fr;
  }

  .contact-socials {
    margin-top: 0;
  }

  .map-panel iframe {
    min-height: 480px;
  }
}

@media (max-width: 640px) {
  :root {
    --page: calc(100% - 24px);
  }

  html {
    scroll-padding-top: 94px;
  }

  .top-strip {
    font-size: 0.78rem;
  }

  .top-strip-inner {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    gap: 3px;
    padding-block: 6px 7px;
  }

  .top-strip a {
    width: 100%;
    justify-content: flex-start;
    line-height: 1.35;
  }

  .top-strip svg {
    width: 16px;
    height: 16px;
  }

  .nav-wrap {
    min-height: 74px;
    gap: 10px;
  }

  .brand {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    gap: 10px;
  }

  .brand-logo {
    width: 47px;
    height: 42px;
  }

  .brand-copy strong {
    max-width: none;
    font-size: 0.84rem;
    overflow-wrap: anywhere;
  }

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

  .menu-toggle {
    flex: 0 0 46px;
    margin-left: 0;
  }

  .mobile-menu {
    inset: 100% 0 auto;
    max-height: calc(100dvh - 74px);
    padding: 18px 12px 24px;
  }

  .mobile-menu nav a {
    padding: 13px 4px;
    font-size: 1.08rem;
  }

  .mobile-menu .language-switcher {
    margin-top: 18px;
  }

  .hero h1 {
    font-size: clamp(2.65rem, 14vw, 4.2rem);
  }

  .hero-actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .hero-facts {
    display: grid;
    gap: 11px;
  }

  .hero-visual {
    padding: 0 0 31px 0;
  }

  .hero-image-wrap {
    border-width: 6px;
    border-radius: 42% 42% 24px 24px;
  }

  .hero-image-wrap,
  .hero-image-wrap img {
    min-height: 400px;
  }

  .hero-location {
    left: 12px;
    right: 12px;
    max-width: none;
  }

  .section {
    padding: 68px 0;
  }

  .section-heading h2 {
    font-size: clamp(2.2rem, 12vw, 3.5rem);
  }

  .services-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .service-card,
  .service-card:nth-child(4),
  .service-card:nth-child(5),
  .service-card:last-child {
    grid-column: auto;
  }

  .service-card {
    min-height: 0;
    padding: 26px;
  }

  .team-card,
  .team-card:nth-child(even) {
    grid-template-columns: 1fr;
    border-radius: 26px;
  }

  .team-photo,
  .team-photo img {
    min-height: 390px;
  }

  .team-card:nth-child(even) .team-photo {
    order: 0;
  }

  .team-copy {
    padding: 31px 25px 35px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 142px;
    gap: 9px;
  }

  .gallery-item,
  .gallery-item.wide {
    grid-column: span 1;
    border-radius: 15px;
  }

  .gallery-item:nth-child(1),
  .gallery-item:nth-child(6) {
    grid-column: span 2;
  }

  .location-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-panel,
  .map-panel {
    border-radius: 26px;
  }

  .contact-panel {
    padding: 30px 24px;
  }

  .map-panel iframe {
    min-height: 430px;
  }

  .footer-top,
  .footer-bottom {
    display: grid;
  }

  .site-footer {
    padding: 38px 0 24px;
  }

  .footer-top {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 24px;
    padding-bottom: 24px;
  }

  .footer-brand {
    min-width: 0;
    align-items: flex-start;
    gap: 12px;
  }

  .footer-brand img {
    width: 48px;
    flex: 0 0 auto;
  }

  .footer-brand > span {
    min-width: 0;
  }

  .footer-brand strong {
    font-size: 0.9rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .footer-brand span {
    line-height: 1.45;
  }

  .footer-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    justify-content: stretch;
    gap: 10px 16px;
  }

  .footer-nav a {
    padding: 4px 0;
  }

  .footer-bottom {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding-top: 22px;
    line-height: 1.5;
  }

  .footer-bottom a {
    overflow-wrap: anywhere;
  }

  .lightbox-close {
    top: -12px;
    right: -6px;
  }
}

@media (max-width: 360px) {
  .footer-nav {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Refined image layouts */
.hero-image-wrap {
  min-height: 0;
  aspect-ratio: 4 / 3;
  border-radius: 28px;
}

.hero-image-wrap img {
  height: 100%;
  min-height: 0;
  object-position: center;
}

.gallery-grid {
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(3, 180px);
  grid-auto-rows: 180px;
  grid-auto-flow: dense;
}

.gallery-grid .gallery-item {
  grid-column: auto;
  grid-row: auto;
}

.gallery-grid .lego-main {
  grid-column: 1 / 7;
  grid-row: 1 / 3;
}

.gallery-grid .lego-top-a {
  grid-column: 7 / 10;
  grid-row: 1;
}

.gallery-grid .lego-top-b {
  grid-column: 10 / 13;
  grid-row: 1;
}

.gallery-grid .lego-mid-a {
  grid-column: 7 / 10;
  grid-row: 2;
}

.gallery-grid .lego-mid-b {
  grid-column: 10 / 13;
  grid-row: 2;
}

.gallery-grid .lego-bottom-a {
  grid-column: 1 / 5;
  grid-row: 3;
}

.gallery-grid .lego-bottom-b {
  grid-column: 5 / 9;
  grid-row: 3;
}

.gallery-grid .lego-bottom-c {
  grid-column: 9 / 13;
  grid-row: 3;
}

.location-gallery .gallery-item {
  grid-column: auto;
  grid-row: auto;
  min-height: 0;
  aspect-ratio: 3 / 2;
}

@media (max-width: 860px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: 180px;
  }

  .gallery-grid .gallery-item {
    grid-column: auto;
    grid-row: auto;
  }

  .gallery-grid .lego-main {
    grid-column: 1 / -1;
    grid-row: span 2;
  }
}

@media (max-width: 640px) {
  .hero-image-wrap {
    border-radius: 20px;
  }

  .gallery-grid {
    grid-auto-rows: 145px;
  }

  .gallery-grid .lego-main {
    grid-column: 1 / -1;
    grid-row: span 2;
  }
}
