/* Interaction and layout refinements added 2026-09-24. */

/* Dark neutral page canvas shared by desktop and mobile. Decorative texture,
   grid, image and gradient layers remain unchanged. */
:root {
  --bg: #070a0d;
  --container: 100%;
}

/* Match the STIMUL wordmark stack to the adjacent feedback form. */
#feedback .feedback-art {
  align-self: center;
  display: flex;
  flex-direction: column;
  height: calc(100% - 40px);
  justify-content: space-between;
}

#feedback .feedback-art > img:not(.feedback-korean) {
  margin-bottom: 0;
}

/* Montserrat is already part of the site font set and keeps direction-card
   descriptions readable without the technical monospace feel. */
.direction-card .card-bottom p {
  font-family: Montserrat, Arial, sans-serif;
  font-weight: 400;
}

@media (max-width: 1023px) {
  #feedback .feedback-art {
    display: none;
  }
}

/* Liquid glass stays optically neutral. Colour should come only from the
   content behind it, not from a green-tinted material layer. */
.site-header.is-scrolled,
.site-header.menu-open {
  border-color: rgba(232, 237, 240, 0.18);
}

.site-header .header-glass {
  --glass-saturation: 1.05 !important;
  background: rgba(8, 11, 13, var(--glass-frost, 0.12));
}

.site-header .header-glass--svg {
  backdrop-filter: var(--glass-filter) saturate(1.05) brightness(1.06);
  -webkit-backdrop-filter: blur(14px) saturate(1.05) brightness(1.08);
  box-shadow: inset 0 0 2px 1px rgba(232, 237, 240, 0.22),
    inset 0 0 12px 4px rgba(232, 237, 240, 0.045),
    0 16px 48px rgba(0, 0, 0, 0.13), 0 5px 18px rgba(0, 0, 0, 0.09),
    inset 0 8px 24px rgba(3, 6, 8, 0.09);
}

.site-header .header-glass--fallback {
  background: rgba(15, 19, 22, 0.48);
  backdrop-filter: blur(15px) saturate(1.08) brightness(1.06);
  -webkit-backdrop-filter: blur(15px) saturate(1.08) brightness(1.06);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.22),
    0 2px 14px rgba(0, 0, 0, 0.12),
    inset 0 1px rgba(242, 246, 248, 0.2),
    inset 0 -1px rgba(189, 197, 201, 0.07);
}

.site-header .header-glass::after {
  background: linear-gradient(
    116deg,
    rgba(242, 246, 248, 0.14),
    transparent 25%,
    rgba(18, 22, 25, 0.08) 58%,
    rgba(225, 231, 234, 0.065)
  );
  box-shadow: inset 14px 12px 24px rgba(246, 249, 250, 0.025),
    inset -16px -12px 26px rgba(0, 3, 5, 0.11);
}

/* Keep the desktop header geometry fixed. Scroll progress only reveals and
   shapes the liquid-glass canvas behind the unchanged navigation layout. */
@media (min-width: 1024px) {
  .site-header,
  .site-header.is-scrolled,
  .site-header.menu-open {
    --nav-progress: 0;
    top: 22px;
    width: min(calc(100% - 64px), 1384px);
    min-height: 84px;
    padding: 10px 20px;
    border-radius: calc(24px + (12px * var(--nav-progress)));
    border-color: rgb(232 237 240 / calc(var(--nav-progress) * 0.18));
    box-shadow: 0 18px 48px rgb(0 0 0 / calc(var(--nav-progress) * 0.26)),
      0 2px 7px rgb(0 0 0 / calc(var(--nav-progress) * 0.16));
    transition: none;
  }

  .site-header .header-glass {
    --glass-frost: 0.16 !important;
  }

  .site-header .header-glass,
  .site-header.is-scrolled .header-glass,
  .site-header.menu-open .header-glass {
    opacity: var(--nav-progress);
    transition: none;
  }

  .site-header .main-logo,
  .site-header.is-scrolled .main-logo,
  .site-header.menu-open .main-logo {
    width: 190px;
    gap: 5px;
    flex: 0 0 auto;
    transition: transform 180ms var(--ease), filter 180ms ease;
  }

  .site-header .desktop-nav,
  .site-header.is-scrolled .desktop-nav,
  .site-header.menu-open .desktop-nav {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    align-self: center;
    gap: 30px;
    transition: none;
  }

  .desktop-nav > a {
    flex: 0 0 auto;
  }
}

@media (min-width: 1200px) {
  .site-header,
  .site-header.is-scrolled,
  .site-header.menu-open {
    width: min(calc(100% - 100px), var(--container));
  }
}

@media (min-width: 1024px) and (max-width: 1199px) {
  .site-header .main-logo,
  .site-header.is-scrolled .main-logo,
  .site-header.menu-open .main-logo {
    width: 165px;
  }

  .site-header .desktop-nav,
  .site-header.is-scrolled .desktop-nav,
  .site-header.menu-open .desktop-nav {
    gap: 20px;
  }
}

/* Softer card surfaces. The moving highlight is clipped to the border itself,
   with no halo following the cursor inside the card. */
:where(
    .direction-card-surface,
    .service-card,
    .account-card,
    .contact-form,
    .stats,
    .office-image-slot
  ) {
  border-color: transparent !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 0 0 1px rgba(115, 168, 142, 0.1), 0 18px 44px rgba(0, 0, 0, 0.23);
}

:where(
    .direction-card-surface,
    .service-card,
    .account-card,
    .contact-form,
    .stats,
    .office-image-slot
  ).reactive-surface::before {
  z-index: 12;
  background: radial-gradient(
    190px circle at var(--px) var(--py),
    rgba(88, 221, 157, 0.92),
    rgba(173, 222, 199, 0.32) 42%,
    transparent 76%
  );
  transition: opacity 180ms ease;
}

.direction-card-surface.reactive-surface[data-lit]::before,
.service-card.reactive-surface[data-lit]::before,
.account-card.reactive-surface[data-lit]::before,
.contact-form.reactive-surface[data-lit]::before,
.stats.reactive-surface[data-lit]::before,
.office-image-slot.reactive-surface[data-lit]::before {
  opacity: 1 !important;
}

:where(
    .direction-card-surface,
    .service-card,
    .account-card,
    .contact-form,
    .stats,
    .office-image-slot
  ).reactive-surface::after {
  display: none;
}

:where(
    .direction-card-surface,
    .service-card,
    .account-card,
    .contact-form,
    .stats,
    .office-image-slot
  ).reactive-surface[data-lit] {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 0 0 1px rgba(82, 190, 137, 0.13), 0 22px 52px rgba(0, 0, 0, 0.28);
}

/* Keep the STEELUS cab in frame on the asymmetric desktop card. */
.direction-card:nth-child(5) .card-photo {
  object-position: right center;
  width: 106%;
  max-width: none;
  transform: translateX(-5.5%);
}

/* Infrastructure images become coloured only when their own tile is hovered. */
.office:has(.office-bar button:hover) .office-image,
.office:has(.office-bar button:focus-visible) .office-image {
  filter: grayscale(1) !important;
}

@media (hover: hover) {
  .office .office-image-slot:hover .office-image,
  .office .office-image-slot.is-image-hovered .office-image,
  .office .office-image-slot:focus-within .office-image {
    filter: grayscale(0) !important;
  }
}

.office-image-slot {
  border-color: transparent !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 0 0 1px rgba(115, 168, 142, 0.1), 0 18px 44px rgba(0, 0, 0, 0.23) !important;
  transition: box-shadow 240ms ease, transform 240ms var(--ease);
}

.office-image-slot.reactive-surface[data-lit] {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 0 0 1px rgba(82, 190, 137, 0.13), 0 22px 52px rgba(0, 0, 0, 0.28) !important;
}

/* One interaction language for every button-like control: the complete
   clickable surface moves, while labels and nested arrows stay locked. */
:where(
    .hero-cta,
    .primary-button,
    .outline-pill,
    .action-label,
    .action-arrow,
    .account-login-button,
    .account-modal-confirm,
    .account-modal-close,
    .office-bar button
  ) {
  transform-origin: center;
  will-change: transform;
  transition: transform 240ms var(--ease), filter 240ms ease,
    background 240ms ease, border-color 240ms ease, box-shadow 240ms ease !important;
}

.hero-cta {
  z-index: 6;
  cursor: pointer;
}

:where(
    .hero-cta,
    .primary-button,
    .outline-pill,
    .action-label,
    .account-login-button,
    .account-modal-confirm
  )
  > span:not(.circle-arrow) {
  transform: none !important;
  transition: none !important;
}

:where(
    .hero-cta,
    .primary-button,
    .outline-pill,
    .action-label,
    .account-login-button,
    .account-modal-confirm
  )
  .circle-arrow,
:where(
    .hero-cta,
    .primary-button,
    .outline-pill,
    .action-label,
    .account-login-button,
    .account-modal-confirm
  )
  img {
  transform: none !important;
  transition: none !important;
}

@media (hover: hover) {
  :where(
      .hero-cta,
      .primary-button,
      .outline-pill,
      .action-label,
      .action-arrow,
      .account-login-button,
      .account-modal-confirm,
      .account-modal-close,
      .office-bar button
    ):is(:hover, .is-control-hovered) {
    transform: translateY(-2px) scale(1.012) !important;
    filter: brightness(1.06);
  }

  :where(
      .hero-cta,
      .primary-button,
      .account-login-button,
      .account-modal-confirm
    ):is(:hover, .is-control-hovered) {
    border-color: rgba(116, 239, 179, 0.5);
    background: linear-gradient(
      115deg,
      rgba(25, 146, 99, 0.96),
      rgba(9, 104, 70, 0.96)
    );
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.34),
      0 12px 34px rgba(13, 148, 85, 0.3);
  }

  :where(.outline-pill, .action-label):is(:hover, .is-control-hovered) {
    border-color: rgba(121, 224, 171, 0.5);
    background: rgba(65, 130, 99, 0.28);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.12),
      0 10px 26px rgba(0, 0, 0, 0.2);
  }

  :where(.action-arrow, .office-bar button):is(:hover, .is-control-hovered)
    .circle-arrow,
  .account-modal-close:is(:hover, .is-control-hovered) {
    border-color: rgba(98, 222, 160, 0.62);
    background: rgba(28, 162, 105, 0.34);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
  }
}

/* Explicit state classes keep the whole-control motion stable when a moving
   parent card briefly changes the browser's native :hover target. */
.hero-cta.is-control-hovered,
.primary-button.is-control-hovered,
.outline-pill.is-control-hovered,
.action-label.is-control-hovered,
.action-arrow.is-control-hovered,
.account-login-button.is-control-hovered,
.account-modal-confirm.is-control-hovered,
.account-modal-close.is-control-hovered,
.office-bar button.is-control-hovered {
  transform: translateY(-2px) scale(1.012) !important;
  filter: brightness(1.06) !important;
}

.hero-cta.is-control-pressed,
.primary-button.is-control-pressed,
.outline-pill.is-control-pressed,
.action-label.is-control-pressed,
.action-arrow.is-control-pressed,
.account-login-button.is-control-pressed,
.account-modal-confirm.is-control-pressed,
.account-modal-close.is-control-pressed,
.office-bar button.is-control-pressed {
  transform: translateY(0) scale(0.97) !important;
  filter: brightness(0.96) !important;
  transition-duration: 110ms !important;
}

.office-bar button {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
}

.office-bar button .circle-arrow {
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.07),
    0 8px 22px rgba(0, 0, 0, 0.16);
  transform-origin: center;
  transition: transform 240ms var(--ease), background 240ms ease,
    border-color 240ms ease, box-shadow 240ms ease !important;
}

.office-bar button.is-control-hovered .circle-arrow {
  transform: translateY(-2px) scale(1.06) !important;
}

.office-bar button.is-control-pressed .circle-arrow {
  transform: translateY(0) scale(0.94) !important;
  transition-duration: 110ms !important;
}

:where(
    .hero-cta,
    .primary-button,
    .outline-pill,
    .action-label,
    .action-arrow,
    .account-login-button,
    .account-modal-confirm,
    .account-modal-close,
    .office-bar button
  ):is(:active, .is-control-pressed) {
  transform: translateY(0) scale(0.97) !important;
  filter: brightness(0.96);
  transition-duration: 110ms !important;
}

/* Footer brands use the same whole-control motion language as site buttons. */
.footer-brand-link,
.footer-mark {
  transform-origin: center;
  will-change: transform;
  transition: transform 240ms var(--ease), filter 240ms ease,
    box-shadow 240ms ease, opacity 240ms ease !important;
}

.footer-brand-link {
  box-shadow: none !important;
}

.footer-mark {
  cursor: pointer;
  border-radius: 12px;
}

.footer-mark:focus-visible {
  outline: 2px solid #60e6ae;
  outline-offset: 6px;
}

@media (hover: hover) {
  .footer-brand-link:is(:hover, .is-control-hovered),
  .footer-mark:is(:hover, .is-control-hovered) {
    opacity: 1;
    transform: translateY(-3px) scale(1.012) !important;
    filter: brightness(1.1) !important;
  }

  .footer-brand-link:is(:hover, .is-control-hovered) {
    transform: translateY(-3px) !important;
    filter: none !important;
    box-shadow: none !important;
  }
}

.footer-brand-link:is(:active, .is-control-pressed),
.footer-mark:is(:active, .is-control-pressed) {
  transform: translateY(0) scale(0.96) !important;
  filter: brightness(0.94) !important;
  transition-duration: 110ms !important;
}

/* The form no longer promises an external mail-app step in its visible copy. */
.contact-form .form-note {
  display: none;
}

.contact-form .form-honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.contact-form .form-status[data-state="success"] {
  color: #7aebb5;
}

.contact-form .form-status[data-state="error"] {
  color: #ff9b9b;
}

.contact-form button[data-submit-state="success"] {
  background: linear-gradient(
    115deg,
    rgba(34, 164, 107, 0.98),
    rgba(12, 118, 77, 0.98)
  );
  border-color: rgba(143, 244, 193, 0.58);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.35),
    0 12px 34px rgba(13, 148, 85, 0.28);
}

.contact-form button .is-submit-label-entering {
  animation: submit-label-enter 280ms var(--ease) both;
}

@keyframes submit-label-enter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.contact-form :where(input, textarea) {
  border-color: transparent !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 0 0 1px rgba(115, 168, 142, 0.13), 0 12px 30px rgba(0, 0, 0, 0.16);
  transition: box-shadow 220ms ease, background 220ms ease;
}

.contact-form :where(input, textarea):focus,
.contact-form :where(input, textarea):focus-visible {
  outline: none !important;
  border-color: transparent !important;
  background: rgba(11, 24, 19, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 0 0 1px rgba(78, 204, 141, 0.42), 0 14px 34px rgba(0, 0, 0, 0.2),
    0 0 22px rgba(36, 174, 106, 0.08);
}

.contact-form .form-field-error {
  display: block;
  min-height: 18px;
  margin: 7px 2px 0;
  color: #ff8d8d;
  font: 500 12px/1.45 Montserrat, Arial, sans-serif;
  letter-spacing: 0;
}

.contact-form label[data-invalid="true"] > span:first-child {
  color: #ff9b9b;
}

.contact-form label[data-invalid="true"] :where(input, textarea) {
  border-color: transparent !important;
  background: rgba(35, 12, 15, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 0 0 1px rgba(255, 91, 101, 0.72), 0 12px 30px rgba(0, 0, 0, 0.16),
    0 0 20px rgba(255, 72, 84, 0.08);
}

.contact-form label[data-invalid="true"]
  :where(input, textarea):is(:focus, :focus-visible) {
  background: rgba(42, 13, 17, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 0 0 2px rgba(255, 104, 113, 0.82), 0 14px 34px rgba(0, 0, 0, 0.2),
    0 0 24px rgba(255, 72, 84, 0.12);
}

.contact-form textarea {
  min-height: 120px;
  max-height: 320px;
  resize: none;
  overflow-y: hidden;
}

#contacts .contact-main address a[href^="tel:"],
#contacts .contact-main address a[href^="mailto:"],
#contacts .contact-main address br {
  display: none !important;
}

/* Keep the map on the same horizontal grid as the rest of the content. */
#contacts .map {
  width: min(calc(100% - 100px), var(--container)) !important;
  margin-inline: auto;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 0 0 1px rgba(115, 168, 142, 0.1), 0 18px 44px rgba(0, 0, 0, 0.23);
}

@media (max-width: 1023px) {
  #contacts .map {
    width: calc(100% - 64px) !important;
  }

  /* Match the dark substrate used beneath the expanded mobile menu while
     preserving the existing liquid-glass refraction and highlights. */
  .site-header.is-scrolled .header-glass,
  .site-header.menu-open .header-glass {
    --glass-frost: 0.68 !important;
    opacity: 1;
  }

  /* Keep the 44px touch target, but remove the green circular plate. */
  .menu-button,
  .site-header.is-scrolled .menu-button,
  .site-header.menu-open .menu-button {
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .menu-button:hover,
  .menu-button.is-control-hovered,
  .menu-button:focus-visible {
    background: rgba(255, 255, 255, 0.045) !important;
  }

  .menu-button {
    transform-origin: center;
    transition: transform 220ms var(--ease), filter 220ms ease !important;
  }

  .menu-button:is(:active, .is-control-pressed) {
    transform: scale(0.92) !important;
    filter: brightness(0.92);
    transition-duration: 100ms !important;
  }

  .mobile-nav {
    isolation: isolate;
    overflow: hidden;
    background: rgba(5, 8, 10, 0.68) !important;
    -webkit-backdrop-filter: blur(14px) saturate(1.08) brightness(1.08);
    backdrop-filter: blur(14px) saturate(1.08) brightness(1.08);
    border-color: rgba(224, 237, 232, 0.18) !important;
    box-shadow: inset 0 0 2px 1px rgba(224, 239, 233, 0.2),
      inset 0 0 12px 4px rgba(220, 235, 229, 0.055),
      inset 0 8px 24px rgba(7, 12, 14, 0.09),
      0 22px 56px rgba(0, 0, 0, 0.34) !important;
  }

  .site-header:has(.header-glass--svg) .mobile-nav {
    backdrop-filter: var(--mobile-glass-filter) saturate(1.05) brightness(1.06);
  }

  .mobile-nav::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(
      116deg,
      rgba(245, 250, 248, 0.14),
      transparent 25%,
      rgba(15, 20, 22, 0.08) 58%,
      rgba(229, 237, 234, 0.065)
    );
    box-shadow: inset 14px 12px 24px rgba(244, 249, 247, 0.025),
      inset -16px -12px 26px rgba(0, 4, 7, 0.12);
  }

  .mobile-nav > a {
    position: relative;
    z-index: 1;
    color: rgba(244, 247, 246, 0.96);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.72);
  }

  .mobile-nav .outline-pill {
    background: linear-gradient(
        120deg,
        rgba(48, 180, 116, 0.32),
        rgba(12, 83, 51, 0.42)
      ),
      rgba(17, 76, 48, 0.28) !important;
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    backdrop-filter: blur(14px) saturate(1.4);
    border-color: rgba(137, 231, 183, 0.28) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16),
      0 10px 28px rgba(0, 0, 0, 0.2) !important;
  }
}

@media (max-width: 639px) {
  .hero {
    height: 480px;
    min-height: 480px;
  }

  .hero-content-frame {
    padding-top: 120px;
  }

  .hero-copy {
    margin-top: 22px;
  }

  #contacts .map {
    width: calc(100% - 40px) !important;
    border-radius: 30px;
  }

  /* Preserve the desktop typeface and proportions at a legible mobile size. */
  .hero-copy h1 {
    font-family: Arial, "Helvetica Neue", sans-serif;
    font-size: clamp(38px, 10.6vw, 54px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: normal;
    font-kerning: normal;
    font-feature-settings: "kern" 1;
    font-synthesis: none;
  }

  .hero-copy .outline {
    font-family: inherit;
    font-weight: 400;
    letter-spacing: 0.025em;
    color: transparent;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke-color: rgba(241, 250, 245, 0.82);
    -webkit-text-stroke-width: 1px;
    text-shadow: none;
  }

  /* Keep the decorative mark from visually crossing the transparent glyphs. */
  .hero-symbol {
    opacity: 0.16 !important;
  }

  .hero-cta {
    position: static;
    width: calc(100% - 40px);
    margin: 28px 20px 0;
  }

  /* Different typefaces have different cap heights; align section labels by
     their first text baseline instead of the top edge of their line boxes. */
  .section-title {
    align-items: baseline;
  }

  .section-heading p,
  .section-aside {
    display: none !important;
  }

  /* The desktop construction grid adds visual noise on narrow screens. */
  .structure-grid {
    display: none !important;
  }

  .structure-grid span {
    display: none !important;
  }

  #contacts .contact-details,
  #contacts .contact-main,
  #contacts .company-details,
  #contacts address {
    text-align: center;
  }

  #contacts .contact-main {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  #contacts .contact-main .outline-pill {
    order: -1;
    margin: 0 0 26px;
  }

  #contacts .contact-main address {
    margin: 0;
  }

  #contacts .company-details p {
    margin-top: 22px;
  }

  /* Mobile cards use brand-specific crops so the truck cab stays in frame. */
  .direction-card:nth-child(1) .card-photo {
    object-position: 85% center;
  }

  .direction-card:nth-child(2) .card-photo {
    object-position: 15% center;
  }

  .direction-card:nth-child(3) .card-photo {
    object-position: 90% center;
  }

  .direction-card:nth-child(4) .card-photo {
    object-position: 10% center;
  }

  .direction-card:nth-child(5) .card-photo {
    object-position: right center;
    width: 106%;
    transform: translateX(-2%);
  }

  .direction-card:nth-child(8) .card-photo,
  .service-card:first-child > img {
    object-position: 10% center;
  }

  .direction-card:nth-child(6) .card-photo {
    object-position: left center;
  }

  /* Touch screens do not have a persistent hover state: show photography in
     colour immediately instead of leaving it permanently grayscale. */
  .direction-card .card-photo,
  .service-card > img,
  .office .office-image {
    filter: none !important;
    -webkit-filter: none !important;
  }

  .office .office-grid,
  .office .office-image-slot {
    filter: none !important;
    -webkit-filter: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .site-header * {
    scroll-behavior: auto !important;
  }
}
