/* Structural stability, responsive doorway treatment, and hero-loading fixes. */

/* The hero image is now an eager, preloaded picture element rather than a
   CSS background, so the browser discovers it immediately. */
.hero {
  background-image: none !important;
  background-color: var(--hero-paper, #fbfaf7) !important;
}

.hero-background {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  overflow: hidden;
  pointer-events: none;
}

.hero-background img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(251, 250, 247, 0.82) 0%,
    rgba(251, 250, 247, 0.54) 34%,
    rgba(251, 250, 247, 0.12) 58%,
    rgba(251, 250, 247, 0) 72%
  );
}

.hero-layout {
  z-index: 2 !important;
}

/* Mobile: typography becomes its own component above the doorway artwork.
   Nothing is positioned over the doorway, so the copy stays readable at
   every narrow viewport and dynamic-text size. */
@media (max-width: 760px) {
  .hero-background img {
    object-position: 72% 100%;
  }

  .hero::before {
    background: linear-gradient(
      180deg,
      rgba(251, 250, 247, 0.98) 0%,
      rgba(251, 250, 247, 0.94) 48%,
      rgba(251, 250, 247, 0.58) 76%,
      rgba(251, 250, 247, 0.2) 100%
    );
  }

  .experience {
    padding-top: 30px !important;
  }

  .experience > .container {
    width: min(calc(100% - 32px), 680px) !important;
    padding-inline: 0 !important;
  }

  .experience-frame {
    display: flex !important;
    overflow: visible !important;
    aspect-ratio: auto !important;
    min-height: 0 !important;
    flex-direction: column !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .doorway-overlay {
    position: relative !important;
    inset: auto !important;
    order: 1;
    width: 100% !important;
    max-width: 560px;
    padding: 0 4px 28px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #211b18 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .doorway-overlay-kicker {
    color: #8b431d !important;
    font-size: 10px !important;
    letter-spacing: 0.2em !important;
  }

  .doorway-overlay-title {
    max-width: 520px;
    margin-top: 15px !important;
    color: #1d1a19 !important;
    font-size: clamp(40px, 11vw, 55px) !important;
    line-height: 0.95 !important;
  }

  .doorway-title-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.12em;
    white-space: normal;
  }

  .doorway-title-break {
    margin-top: 0.05em;
    white-space: normal;
  }

  .doorway-title-script {
    color: #8b431d !important;
    font-size: 1.08em;
    transform: translateY(0.04em) rotate(-2deg);
  }

  .doorway-overlay-rule {
    width: 48px;
    height: 2px;
    margin: 21px 0 18px;
  }

  .doorway-overlay-copy {
    max-width: 470px;
    color: #4d4039 !important;
    font-size: 15.5px !important;
    line-height: 1.58 !important;
  }

  .experience-image {
    position: relative !important;
    inset: auto !important;
    order: 2;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 5 !important;
    object-fit: cover !important;
    object-position: 37% 50% !important;
    border: 1px solid rgba(103, 74, 57, 0.16);
    border-radius: 17px;
    box-shadow: 0 24px 54px rgba(44, 31, 29, 0.14), 0 4px 14px rgba(44, 31, 29, 0.06);
  }
}

@media (max-width: 420px) {
  .experience > .container {
    width: min(calc(100% - 28px), 680px) !important;
  }

  .doorway-overlay {
    padding-inline: 2px !important;
    padding-bottom: 24px !important;
  }

  .doorway-overlay-title {
    font-size: clamp(38px, 12.2vw, 49px) !important;
  }

  .doorway-overlay-copy {
    font-size: 15px !important;
  }

  .experience-image {
    aspect-ratio: 4 / 5.1 !important;
    object-position: 36% 50% !important;
    border-radius: 15px;
  }
}

/* Editorial header and warm light footer — HS Technologies brand shell. */
:root {
  --shell-navy: #0b1d3d;
  --shell-blue: #1d50c6;
  --shell-rust: #bd5026;
  --shell-gold: #d5a13b;
  --shell-ivory: #fbf8f1;
  --shell-paper: #f6f0e7;
  --shell-ink: #17213a;
  --shell-muted: #59657a;
  --shell-line: rgba(142, 109, 82, 0.22);
}

.header-inner {
  min-height: 76px !important;
  overflow: hidden !important;
  border-color: rgba(205, 214, 226, 0.86) !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 16px 38px rgba(25, 43, 71, 0.095), 0 3px 10px rgba(25, 43, 71, 0.035) !important;
}

.header-inner::after {
  position: absolute;
  right: -18px;
  bottom: -34px;
  z-index: 0;
  width: min(440px, 37vw);
  height: 126px;
  content: "";
  pointer-events: none;
  background: url("/assets/hero-blue-wave-art.webp?v=20260820-3") right 72% / 470px auto no-repeat;
  opacity: 0.23;
  filter: saturate(1.08) contrast(1.02);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 38%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 38%, #000 100%);
}

.header-inner > * {
  position: relative;
  z-index: 2;
}

.header .brand {
  min-width: 205px;
  align-items: center !important;
  gap: 13px !important;
  overflow: visible;
}

.header .brand-mark {
  position: relative;
  overflow: visible;
  color: var(--shell-navy) !important;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif !important;
  font-size: 42px !important;
  font-weight: 500 !important;
  letter-spacing: -0.085em !important;
  line-height: 0.82 !important;
  text-transform: none !important;
}

.header .brand-mark::after {
  position: absolute;
  right: -5px;
  bottom: -12px;
  left: -3px;
  height: 13px;
  content: "";
  background:
    linear-gradient(168deg, transparent 42%, var(--shell-gold) 43% 47%, transparent 48%) 0 0 / 100% 8px no-repeat,
    linear-gradient(174deg, transparent 44%, var(--shell-rust) 45% 49%, transparent 50%) 7px 6px / 86% 7px no-repeat;
  opacity: 0.96;
  transform: rotate(-2deg);
  transform-origin: center;
}

.header .brand-name {
  color: var(--shell-navy) !important;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 11px !important;
  font-weight: 760 !important;
  letter-spacing: 0.2em !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
}

.header .nav-button {
  color: #172642 !important;
  font-size: 14px !important;
  font-weight: 560 !important;
}

.header .nav-button:hover,
.header .nav-button:focus-visible,
.nav-links .nav-button[aria-current="page"] {
  color: var(--shell-blue) !important;
}

.nav-links .nav-button::after {
  background: var(--shell-blue) !important;
}

.header .button-header {
  min-height: 44px !important;
  padding: 12px 20px !important;
  border-color: rgba(134, 58, 28, 0.14) !important;
  background: linear-gradient(135deg, #c95c2d, #a9401f) !important;
  color: #fffdf8 !important;
  box-shadow: 0 10px 22px rgba(152, 63, 29, 0.18) !important;
}

.header .button-header::after {
  margin-left: 8px;
  content: "\2192";
  font-size: 15px;
  line-height: 1;
}

.header .button-header:hover,
.header .button-header:focus-visible {
  background: linear-gradient(135deg, #d46735, #b34925) !important;
  box-shadow: 0 13px 28px rgba(152, 63, 29, 0.24) !important;
}

#home-page > .cta {
  display: none !important;
}

.brand-footer {
  position: relative;
  padding: clamp(34px, 4vw, 64px) 0 clamp(28px, 3.5vw, 52px) !important;
  border-top: 1px solid rgba(165, 132, 103, 0.16) !important;
  background: #fbfaf7 !important;
  color: var(--shell-ink) !important;
}

.brand-footer-shell {
  position: relative;
  width: min(calc(100% - 48px), 1540px);
  margin-inline: auto;
  padding: clamp(42px, 4.4vw, 68px) clamp(34px, 4vw, 62px) clamp(24px, 2.4vw, 36px);
  overflow: hidden;
  border: 1px solid rgba(172, 137, 107, 0.26);
  border-radius: clamp(18px, 1.55vw, 25px);
  background:
    radial-gradient(75% 105% at 12% 0%, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0) 66%),
    linear-gradient(135deg, #fcfaf5 0%, #f8f3ea 100%);
  box-shadow: 0 24px 62px rgba(62, 43, 30, 0.085), 0 4px 14px rgba(62, 43, 30, 0.04);
  isolation: isolate;
}

.brand-footer-shell::before {
  position: absolute;
  right: -2%;
  bottom: -82px;
  left: 22%;
  z-index: 0;
  height: 275px;
  content: "";
  pointer-events: none;
  background: url("/assets/hero-blue-wave-art.webp?v=20260820-3") center 72% / cover no-repeat;
  opacity: 0.07;
  filter: sepia(0.62) saturate(0.68) hue-rotate(338deg) contrast(0.82);
  mix-blend-mode: multiply;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.25) 20%, #000 76%);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.25) 20%, #000 76%);
}

.brand-footer-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(270px, 1.35fr) minmax(180px, 0.92fr) minmax(120px, 0.7fr) minmax(180px, 0.92fr) minmax(215px, 1.08fr);
  align-items: start;
  gap: 0;
}

.brand-footer-cta {
  min-width: 0;
  padding-right: clamp(30px, 3.2vw, 54px);
}

.brand-footer-kicker,
.brand-footer-group > summary {
  margin: 0;
  color: #95411f;
  font-family: var(--mono, "SFMono-Regular", Consolas, "Liberation Mono", monospace);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.19em;
  line-height: 1.2;
  text-transform: uppercase;
}

.brand-footer-title {
  max-width: 430px;
  margin: 18px 0 0;
  color: #14203a;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: clamp(39px, 3.25vw, 55px);
  font-weight: 500;
  letter-spacing: -0.052em;
  line-height: 0.96;
}

.brand-footer-script {
  display: inline-block;
  margin-inline: 0.03em;
  color: var(--shell-rust);
  font-family: "Snell Roundhand", "Segoe Script", "Bradley Hand", "Brush Script MT", cursive;
  font-size: 1.12em;
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.72;
  transform: translateY(0.04em) rotate(-2.4deg);
  transform-origin: center;
}

.brand-footer-copy {
  max-width: 355px;
  margin: 22px 0 0;
  color: #566176;
  font-size: 15px;
  line-height: 1.62;
}

.brand-footer-cta-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin-top: 28px;
  padding: 13px 20px;
  border: 1px solid rgba(133, 55, 25, 0.14);
  border-radius: 7px;
  background: linear-gradient(135deg, #c85a2a, #aa421f);
  color: #fffdf8;
  box-shadow: 0 10px 22px rgba(146, 58, 25, 0.14);
  cursor: pointer;
  font-size: 14px;
  font-weight: 720;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.brand-footer-cta-button:hover,
.brand-footer-cta-button:focus-visible {
  background: linear-gradient(135deg, #d16632, #b64a24);
  box-shadow: 0 13px 26px rgba(146, 58, 25, 0.2);
  transform: translateY(-1px);
}

.brand-footer-group {
  min-width: 0;
  margin: 0;
  padding: 4px clamp(22px, 2.35vw, 38px) 0;
  border-left: 1px solid rgba(154, 121, 93, 0.22);
}

.brand-footer-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  color: #29334a;
  cursor: default;
}

.brand-footer-group > summary::-webkit-details-marker {
  display: none;
}

.brand-footer-toggle {
  display: none;
  color: var(--shell-rust);
  font-family: ui-sans-serif, sans-serif;
  font-size: 18px;
  font-weight: 450;
  letter-spacing: 0;
  transition: transform 160ms ease;
}

.brand-footer-group-content {
  display: flex;
  margin-top: 25px;
  align-items: flex-start;
  flex-direction: column;
  gap: 15px;
  color: #536078;
  font-size: 14px;
  line-height: 1.55;
}

.brand-footer-group-content p {
  max-width: 220px;
  margin: 0;
}

.brand-footer-links button,
.brand-footer-contact button {
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: #39445a;
  cursor: pointer;
  font-size: inherit;
  line-height: inherit;
  text-align: left;
  transition: color 150ms ease;
}

.brand-footer-links button:hover,
.brand-footer-links button:focus-visible,
.brand-footer-contact button:hover,
.brand-footer-contact button:focus-visible {
  color: var(--shell-rust);
}

.brand-footer-list span {
  color: #4e5a70;
}

.brand-footer-contact a {
  color: #344158;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.brand-footer-contact button {
  color: var(--shell-rust);
  font-weight: 650;
}

.brand-footer-brand-group > summary {
  display: none;
}

.brand-footer-lockup {
  position: relative;
  display: grid;
  width: fit-content;
  grid-template-columns: auto auto;
  align-items: end;
  gap: 11px;
  padding-bottom: 13px;
}

.brand-footer-monogram {
  color: #ad4a25;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: 48px;
  font-weight: 500;
  letter-spacing: -0.085em;
  line-height: 0.8;
}

.brand-footer-wordmark {
  color: #1b2944;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.19em;
  line-height: 1;
  text-transform: uppercase;
}

.brand-footer-squiggle {
  position: absolute;
  bottom: 0;
  left: -2px;
  width: 64px;
  height: 12px;
  background:
    linear-gradient(168deg, transparent 42%, var(--shell-gold) 43% 47%, transparent 48%) 0 0 / 100% 7px no-repeat,
    linear-gradient(174deg, transparent 44%, var(--shell-rust) 45% 49%, transparent 50%) 8px 5px / 84% 7px no-repeat;
  transform: rotate(-2deg);
}

.brand-footer-door {
  position: absolute;
  right: 8.5%;
  bottom: 62px;
  z-index: 2;
  width: 31px;
  height: 62px;
  border: 5px solid #b54d25;
  background: #09162c;
  box-shadow: 10px 9px 0 rgba(35, 65, 104, 0.12), 0 8px 14px rgba(76, 44, 24, 0.12);
}

.brand-footer-door::before {
  position: absolute;
  right: -26px;
  bottom: -10px;
  width: 62px;
  height: 1px;
  content: "";
  background: rgba(50, 79, 115, 0.28);
  transform: rotate(-17deg);
  transform-origin: left center;
}

.brand-footer-bottom {
  position: relative;
  z-index: 3;
  display: flex;
  margin-top: clamp(52px, 5.3vw, 82px);
  padding-top: 22px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(154, 121, 93, 0.22);
  color: #637086;
  font-family: var(--mono, "SFMono-Regular", Consolas, monospace);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.brand-footer-bottom em {
  margin-left: 0.18em;
  color: var(--shell-rust);
  font-family: "Snell Roundhand", "Segoe Script", "Bradley Hand", "Brush Script MT", cursive;
  font-size: 2.35em;
  font-style: normal;
  letter-spacing: -0.04em;
  line-height: 0;
}

.brand-footer-signoff {
  margin: 28px auto 0;
  color: #7f8ba0;
  font-family: var(--mono, "SFMono-Regular", Consolas, monospace);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.28em;
  text-align: center;
  text-transform: uppercase;
}

@media (min-width: 761px) {
  .brand-footer-group > summary {
    pointer-events: none;
  }

  .brand-footer-group > .brand-footer-group-content {
    display: flex !important;
  }
}

@media (max-width: 1120px) and (min-width: 761px) {
  .brand-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 42px;
  }

  .brand-footer-cta {
    grid-column: 1 / -1;
    padding: 0 0 40px;
    border-bottom: 1px solid rgba(154, 121, 93, 0.22);
  }

  .brand-footer-group {
    padding-left: 0;
    border-left: 0;
  }

  .brand-footer-group:nth-of-type(even) {
    padding-left: 34px;
    border-left: 1px solid rgba(154, 121, 93, 0.22);
  }

  .brand-footer-door {
    right: 10%;
    bottom: 58px;
  }
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 66px !important;
    overflow: hidden !important;
  }

  .header-inner::after {
    right: -40px;
    bottom: -25px;
    width: 230px;
    height: 88px;
    background-size: 270px auto;
    opacity: 0.24;
  }

  .header .brand {
    min-width: 0;
    gap: 10px !important;
  }

  .header .brand-mark {
    font-size: 35px !important;
  }

  .header .brand-mark::after {
    right: -3px;
    bottom: -10px;
    height: 11px;
  }

  .header .brand-name {
    font-size: 9.5px !important;
    letter-spacing: 0.17em !important;
  }

  .menu-toggle {
    border-color: rgba(166, 177, 193, 0.45) !important;
    background: rgba(255, 255, 255, 0.78) !important;
    color: var(--shell-navy) !important;
    box-shadow: 0 6px 16px rgba(22, 40, 68, 0.07);
  }

  .header .nav {
    background: rgba(255, 253, 249, 0.99) !important;
  }

  .header .button-header {
    background: linear-gradient(135deg, #c95c2d, #aa421f) !important;
  }

  .brand-footer {
    padding: 24px 14px 30px !important;
  }

  .brand-footer-shell {
    width: 100%;
    padding: 30px 20px 18px;
    border-radius: 17px;
  }

  .brand-footer-shell::before {
    right: -28%;
    bottom: -22px;
    left: 6%;
    height: 180px;
    opacity: 0.055;
  }

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

  .brand-footer-cta {
    padding: 0 2px 30px;
    border-bottom: 1px solid rgba(154, 121, 93, 0.24);
  }

  .brand-footer-title {
    max-width: 420px;
    font-size: clamp(40px, 11.5vw, 51px);
  }

  .brand-footer-copy {
    margin-top: 18px;
    font-size: 14.5px;
  }

  .brand-footer-cta-button {
    margin-top: 24px;
  }

  .brand-footer-group {
    padding: 0;
    border-left: 0;
    border-bottom: 1px solid rgba(154, 121, 93, 0.23);
  }

  .brand-footer-group > summary,
  .brand-footer-brand-group > summary {
    display: flex;
    min-height: 52px;
    align-items: center;
    cursor: pointer;
    color: #27334a;
  }

  .brand-footer-toggle {
    display: inline-block;
  }

  .brand-footer-group[open] .brand-footer-toggle {
    transform: rotate(45deg);
  }

  .brand-footer-group-content {
    margin-top: 0;
    padding: 2px 0 20px;
    gap: 12px;
  }

  .brand-footer-lockup {
    margin-top: 4px;
  }

  .brand-footer-door {
    right: 9%;
    bottom: 62px;
    width: 23px;
    height: 47px;
    border-width: 4px;
    opacity: 0.78;
  }

  .brand-footer-bottom {
    margin-top: 44px;
    padding-top: 18px;
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
    font-size: 9px;
  }

  .brand-footer-bottom em {
    font-size: 2.2em;
  }

  .brand-footer-signoff {
    margin-top: 22px;
    font-size: 8px;
    letter-spacing: 0.2em;
  }
}

@media (max-width: 390px) {
  .header .brand-name {
    font-size: 9px !important;
    letter-spacing: 0.14em !important;
  }

  .brand-footer-shell {
    padding-inline: 17px;
  }

  .brand-footer-title {
    font-size: 39px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .header .brand-mark::after,
  .brand-footer-script,
  .brand-footer-squiggle {
    transform: none !important;
  }
}
