/* ---------- bar: a small floating capsule, top right only ---------- */
.bar {
  --pill-bg: var(--fg);
  --pill-fg: var(--bg);
  position: fixed;
  z-index: 20;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  left: var(--gutter);
  right: var(--gutter);
  animation: drop 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.bar.inv {
  --fg: #f2f9f8;
  --line-strong: #3e545c;
  --pill-bg: #f2f9f8;
  --pill-fg: #050b0e;
}
.bar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand-capsule {
  display: grid;
  width: 58px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  box-shadow: 0 10px 28px -14px rgba(8, 23, 30, 0.35);
  animation: brand-float 5s ease-in-out infinite;
  transition:
    transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
    background 0.3s;
}
.brand-capsule:hover {
  transform: translateY(-4px) rotate(-2deg);
}
.brand-capsule img {
  height: 35px;
  object-fit: contain;
}
@keyframes brand-float {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  50% {
    transform: translateY(-3px) rotate(1deg);
  }
}
.bar-end {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  box-shadow: 0 10px 28px -14px rgba(8, 23, 30, 0.35);
  transition:
    background-color 0.4s,
    border-color 0.4s,
    box-shadow 0.4s;
}
@supports (background: color-mix(in srgb, red, blue)) {
  .bar-end {
    background: color-mix(in srgb, var(--bg) 70%, transparent);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    backdrop-filter: blur(16px) saturate(1.4);
  }
}
.bar.inv .bar-end {
  background: rgba(242, 249, 248, 0.07);
  border-color: rgba(242, 249, 248, 0.18);
  box-shadow: none;
}

.theme,
.burger {
  height: 36px;
  border: 0;
  border-radius: 10px;
  padding: 0;
  cursor: pointer;
  transition:
    background-color 0.25s,
    color 0.25s,
    opacity 0.25s;
}
.theme:focus-visible,
.burger:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}
.theme {
  width: 36px;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--fg);
}
.theme:hover {
  background: rgba(127, 150, 158, 0.18);
}
.theme svg {
  width: 18px;
  height: 18px;
  overflow: visible;
  transform: rotate(var(--ico-r));
  transition: transform 0.7s cubic-bezier(0.7, 0, 0.2, 1);
}
.theme:hover svg {
  transform: rotate(calc(var(--ico-r) + 24deg));
}
.theme .core {
  transform-origin: 12px 12px;
  transform: scale(var(--core-s));
  transition: transform 0.7s cubic-bezier(0.7, 0, 0.2, 1);
}
.theme .cut {
  transform: translateX(var(--cut-x));
  transition: transform 0.7s cubic-bezier(0.7, 0, 0.2, 1);
}
.theme .rays {
  transform-origin: 12px 12px;
  transform: rotate(var(--rays-r)) scale(var(--rays-s));
  transition: transform 0.7s cubic-bezier(0.7, 0, 0.2, 1);
}

/* menu trigger: solid pill with a 3x3 LED dot grid. The dots light up as a gradient wave on hover and resolve into an X when open. */
.burger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px 0 15px;
  background: var(--pill-bg);
  color: var(--pill-fg);
  font-weight: 600;
  font-stretch: 75%;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.blabel {
  display: block;
  height: 1.4em;
  overflow: hidden;
  line-height: 1.4em;
}
.bl-in {
  display: flex;
  flex-direction: column;
  transition: transform 0.55s cubic-bezier(0.7, 0, 0.2, 1);
}
.bar.open .bl-in {
  transform: translateY(-50%);
}
.bicon {
  display: grid;
  grid-template-columns: repeat(3, 3px);
  grid-auto-rows: 3px;
  gap: 2.5px;
}
.bicon i {
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  transition:
    transform 0.5s cubic-bezier(0.7, 0, 0.2, 1) var(--dl, 0s),
    background-color 0.4s var(--dl, 0s);
}
.bicon i:nth-child(1) {
  --dl: 0s;
  --c: var(--blue);
}
.bicon i:nth-child(2),
.bicon i:nth-child(4) {
  --dl: 0.04s;
  --c: var(--blue);
}
.bicon i:nth-child(3),
.bicon i:nth-child(5),
.bicon i:nth-child(7) {
  --dl: 0.08s;
  --c: var(--teal);
}
.bicon i:nth-child(6),
.bicon i:nth-child(8) {
  --dl: 0.12s;
  --c: var(--green);
}
.bicon i:nth-child(9) {
  --dl: 0.16s;
  --c: var(--green);
}
.burger:hover .bicon i,
.bar.open .bicon i {
  background: var(--c);
}
.bar.open .bicon i:nth-child(even) {
  transform: scale(0);
}

/* ---------- full-screen menu: dark panel, gradient dots light up under the pointer ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 15;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-inline: var(--gutter);
  background: #050b0e;
  color: #f2f9f8;
  clip-path: circle(0px at var(--ox, 100%) var(--oy, 0px));
  visibility: hidden;
  will-change: clip-path;
  transition:
    clip-path 0.85s cubic-bezier(0.65, 0, 0.35, 1) 0.1s,
    visibility 0s linear 0.96s;
}
.bar.open + .menu {
  clip-path: circle(var(--rad, 150vmax) at var(--ox, 100%) var(--oy, 0px));
  visibility: visible;
  transition:
    clip-path 0.95s cubic-bezier(0.76, 0, 0.24, 1),
    visibility 0s;
}
.menu.settled .menu-spot {
  opacity: 1;
}
.menu::before,
.menu-spot {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.menu::before {
  background: radial-gradient(
      circle,
      rgba(242, 249, 248, 0.09) 1.4px,
      transparent 1.9px
    )
    0 0 / 16px 16px;
}
.menu-spot {
  opacity: 0;
  transition: opacity 0.5s;
  background: linear-gradient(
    45deg,
    var(--blue),
    var(--teal) 55%,
    var(--green)
  );
  -webkit-mask:
    radial-gradient(circle, #000 1.7px, transparent 2.2px) 0 0 / 16px 16px,
    radial-gradient(
      circle 280px at var(--mx, 74%) var(--my, 30%),
      #000,
      transparent
    );
  -webkit-mask-composite: source-in;
  mask:
    radial-gradient(circle, #000 1.7px, transparent 2.2px) 0 0 / 16px 16px,
    radial-gradient(
      circle 280px at var(--mx, 74%) var(--my, 30%),
      #000,
      transparent
    );
  mask-composite: intersect;
}
.menu-in {
  position: relative;
  min-height: 100%;
  max-width: 1360px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: calc(env(safe-area-inset-top, 0px) + 92px);
  padding-bottom: max(28px, env(safe-area-inset-bottom, 0px));
}
.menu-main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 88px);
  align-items: center;
}
.mlabel {
  margin: 0 0 14px;
  font-weight: 600;
  font-stretch: 75%;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #6f8a92;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.3s,
    transform 0.3s;
}
.bar.open + .menu .mlabel {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.8s 0.55s,
    transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.55s;
}

/* primary links */
.menu-list {
  display: flex;
  flex-direction: column;
}
.mrow {
  position: relative;
  display: grid;
  grid-template-columns: 2.4em minmax(0, 1fr) 28px;
  grid-template-areas: "i t a" "i m a";
  align-items: center;
  column-gap: clamp(12px, 1.6vw, 22px);
  padding-block: clamp(14px, 1.8vw, 24px);
  color: inherit;
  text-decoration: none;
  outline: none;
  transition: opacity 0.45s;
}
.menu-list:hover .mrow:not(:hover) {
  opacity: 0.38;
}
.mrow::before,
.mrow::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  transform-origin: left;
}
.mrow::before {
  height: 1px;
  background: rgba(242, 249, 248, 0.14);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}
.mrow::after {
  height: 1px;
  background: linear-gradient(
    90deg,
    var(--blue),
    var(--teal) 55%,
    var(--green)
  );
  transform: scaleX(0);
  transition: transform 0.8s cubic-bezier(0.7, 0, 0.2, 1);
}
.mrow:hover::after,
.mrow:focus-visible::after {
  transform: none;
}
.bar.open + .menu .mrow::before {
  transform: none;
  transition: transform 1s cubic-bezier(0.7, 0, 0.2, 1)
    calc(0.3s + var(--i) * 0.08s);
}
.mrow:last-child {
  border-bottom: 1px solid rgba(242, 249, 248, 0.14);
}

.midx,
.mmeta,
.marr {
  opacity: 0;
  transform: translateY(12px);
}
.midx {
  grid-area: i;
  align-self: start;
  margin-top: clamp(8px, 1.1vw, 16px);
  font-weight: 600;
  font-stretch: 75%;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: #6f8a92;
  transition:
    opacity 0.3s,
    transform 0.3s,
    color 0.35s;
}
.mrow:hover .midx,
.mrow:focus-visible .midx {
  color: var(--green);
}
.mclip {
  grid-area: t;
  display: block;
  overflow: hidden;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
  min-width: 0;
}
.mtxt {
  display: block;
  width: max-content;
  max-width: 100%;
  font-size: clamp(38px, 4.8vw, 72px);
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: -0.035em;
  background:
    linear-gradient(90deg, var(--blue), var(--teal) 55%, var(--green)) 0 0 / 0%
      100% no-repeat,
    linear-gradient(#f2f9f8, #f2f9f8) 0 0 / 100% 100% no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  transform: translateY(108%);
  transition:
    transform 0.45s cubic-bezier(0.5, 0, 0.2, 1),
    translate 0.6s cubic-bezier(0.2, 0.8, 0.2, 1),
    background-size 0.7s cubic-bezier(0.7, 0, 0.2, 1);
}
.bar.open + .menu .mtxt {
  transform: none;
  transition:
    transform 1s cubic-bezier(0.2, 0.8, 0.2, 1) calc(0.4s + var(--i) * 0.08s),
    translate 0.6s cubic-bezier(0.2, 0.8, 0.2, 1),
    background-size 0.7s cubic-bezier(0.7, 0, 0.2, 1);
}
.mrow:hover .mtxt,
.mrow:focus-visible .mtxt {
  translate: 0.08em 0;
  background-size:
    100% 100%,
    100% 100%;
}
.mmeta {
  grid-area: m;
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.4;
  color: #8fa7ae;
  transition:
    opacity 0.3s,
    transform 0.3s,
    color 0.3s;
}
.mrow:hover .mmeta,
.mrow:focus-visible .mmeta {
  color: #e4f0f1;
}
.marr {
  grid-area: a;
  display: block;
  color: var(--teal);
  transition:
    opacity 0.3s,
    transform 0.3s;
}
.marr svg {
  display: block;
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateX(-14px) rotate(-45deg);
  opacity: 0;
  transition:
    transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.4s;
}
.bar.open + .menu .midx,
.bar.open + .menu .mmeta,
.bar.open + .menu .marr {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.8s calc(0.75s + var(--i) * 0.08s),
    transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) calc(0.75s + var(--i) * 0.08s),
    color 0.35s;
}
.mrow:hover .marr svg,
.mrow:focus-visible .marr svg {
  transform: none;
  opacity: 1;
}
@media (hover: none) {
  .marr svg {
    transform: none;
    opacity: 0.7;
  }
}

/* service cards: the collage photos again, in duotone, true colours on hover */
.mcards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  height: min(56vh, 520px);
}
.mcard {
  position: relative;
  display: block;
  isolation: isolate;
  overflow: hidden;
  border-radius: 14px;
  background: #07131a;
  color: #fff;
  text-decoration: none;
  outline: none;
  clip-path: inset(100% 0 0 0);
  transition:
    clip-path 0.4s,
    opacity 0.45s;
}
.bar.open + .menu .mcard {
  clip-path: inset(0);
  transition:
    clip-path 1.2s cubic-bezier(0.7, 0, 0.2, 1) calc(0.7s + var(--i) * 0.12s),
    opacity 0.45s;
}
.mcards:hover .mcard:not(:hover) {
  opacity: 0.5;
}
.mc-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: scale(1.25);
  transition: transform 0.5s;
}
.bar.open + .menu .mc-media {
  transform: none;
  transition: transform 1.8s cubic-bezier(0.2, 0.8, 0.2, 1)
    calc(0.7s + var(--i) * 0.12s);
}
.mc-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.6s;
}
.mcard:hover .mc-media img,
.mcard:focus-visible .mc-media img {
  transform: scale(1.06);
}
.mcard:hover .mc-media .duo,
.mcard:focus-visible .mc-media .duo {
  opacity: 0;
}
.mcard::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(3, 9, 11, 0.92),
    rgba(3, 9, 11, 0.35) 42%,
    rgba(3, 9, 11, 0) 70%
  );
}
.mc-top {
  position: absolute;
  z-index: 1;
  left: 16px;
  right: 14px;
  top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mc-n {
  font-weight: 600;
  font-stretch: 75%;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.85);
}
.mc-arr {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(5, 11, 14, 0.25);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition:
    background 0.4s,
    border-color 0.4s,
    color 0.4s;
}
.mc-arr svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.mcard:hover .mc-arr,
.mcard:focus-visible .mc-arr {
  background: linear-gradient(
    45deg,
    var(--blue),
    var(--teal) 55%,
    var(--green)
  );
  border-color: transparent;
  color: var(--on-brand);
}
.mcard:hover .mc-arr svg,
.mcard:focus-visible .mc-arr svg {
  transform: rotate(45deg);
}
.mc-body {
  position: absolute;
  z-index: 1;
  left: 16px;
  right: 16px;
  bottom: 16px;
}
.mc-body::before {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  margin-bottom: 12px;
  background: linear-gradient(
    90deg,
    var(--blue),
    var(--teal) 55%,
    var(--green)
  );
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.mcard:hover .mc-body::before,
.mcard:focus-visible .mc-body::before {
  width: 56px;
}
.mc-t {
  display: block;
  font-size: clamp(17px, 1.5vw, 22px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.mc-d {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.74);
}

@media (max-width: 900px) {
  .menu-in {
    padding-top: calc(env(safe-area-inset-top, 0px) + 84px);
  }
  .menu-main {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 32px;
  }
  .mcards {
    display: flex;
    height: auto;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter);
  }
  .mcards::-webkit-scrollbar {
    display: none;
  }
  .mcard {
    flex: 0 0 min(74%, 320px);
    aspect-ratio: 4 / 5;
    scroll-snap-align: start;
  }
}
.menu-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid rgba(242, 249, 248, 0.16);
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.3s,
    transform 0.3s;
}
.bar.open + .menu .menu-foot {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.8s 1s,
    transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 1s;
}
.mfoot {
  margin: 0;
  font-size: 14px;
  color: #8fa7ae;
}

/* ---------- clean menu presentation ---------- */
.menu {
  background:
    radial-gradient(
      circle at 88% 8%,
      rgba(41, 172, 180, 0.12),
      transparent 28rem
    ),
    #071014;
  clip-path: none;
  opacity: 0;
  transform: translateY(-16px);
  visibility: hidden;
  transition:
    opacity 0.35s ease,
    transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
    visibility 0s linear 0.45s;
}
.bar.open + .menu {
  clip-path: none;
  opacity: 1;
  transform: none;
  visibility: visible;
  transition:
    opacity 0.35s ease,
    transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
    visibility 0s;
}
.menu::before,
.menu-spot {
  display: none;
}
.menu-in {
  gap: 32px;
  padding-top: calc(env(safe-area-inset-top, 0px) + 112px);
}
.menu-in::before {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 38px);
  left: 0;
  color: rgba(242, 249, 248, 0.52);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
}
.menu-main {
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(48px, 8vw, 132px);
  align-items: center;
}
.mlabel {
  margin-bottom: 20px;
  color: #789097;
  font-size: 11px;
  letter-spacing: 0.16em;
}
.menu-list:hover .mrow:not(:hover) {
  opacity: 0.5;
}
.mrow {
  grid-template-columns: minmax(0, 1fr) 28px;
  grid-template-areas: "t a";
  padding-block: 20px;
}
.mrow::before {
  background: rgba(242, 249, 248, 0.18);
  transform: none;
}
.mrow::after {
  height: 2px;
}
.mtxt {
  font-size: clamp(36px, 4.2vw, 64px);
  font-weight: 450;
  background: none;
  color: #f2f9f8;
  -webkit-text-fill-color: currentColor;
}
.mrow:hover .mtxt,
.mrow:focus-visible .mtxt {
  color: var(--green);
  translate: 0.04em 0;
}
.mmeta {
  font-size: 13px;
  color: #8fa7ae;
}
.mcards {
  height: auto;
  grid-template-columns: 1fr;
  gap: 10px;
}
.mcard {
  min-height: 124px;
  border: 1px solid rgba(242, 249, 248, 0.16);
  border-radius: 12px;
  background: #0d1b20;
  clip-path: none;
  transition:
    border-color 0.3s ease,
    background-color 0.3s ease,
    transform 0.3s ease,
    opacity 0.45s;
}
.bar.open + .menu .mcard {
  clip-path: none;
  transition:
    border-color 0.3s ease,
    background-color 0.3s ease,
    transform 0.3s ease,
    opacity 0.45s;
}
.mcard::after {
  background: linear-gradient(
    90deg,
    rgba(7, 16, 20, 0.92),
    rgba(7, 16, 20, 0.38)
  );
}
.mcard:hover,
.mcard:focus-visible {
  border-color: rgba(129, 218, 82, 0.7);
  background: #10262b;
  transform: translateX(7px);
}
.mc-body {
  bottom: 18px;
}
.mc-t {
  font-size: 19px;
}
.mc-d {
  margin-top: 6px;
  font-size: 12px;
}
.menu-foot {
  padding-top: 20px;
}

@media (max-width: 900px) {
  .menu-in {
    padding-top: calc(env(safe-area-inset-top, 0px) + 84px);
  }
  .menu-in::before {
    top: calc(env(safe-area-inset-top, 0px) + 28px);
  }
  .menu-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    align-items: start;
  }
  .mrow {
    padding-block: 15px;
  }
  .mtxt {
    font-size: clamp(32px, 11vw, 52px);
  }
  .mcards {
    display: grid;
    height: auto;
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
  }
  .mcard {
    min-height: 110px;
    aspect-ratio: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .menu,
  .bar.open + .menu,
  .mcard,
  .bar.open + .menu .mcard {
    transition: none;
  }
}
