:root {
  --mc-green-deep: #0a3529;
  --mc-green: #154f3a;
  --mc-gold: #d7ba78;
  --mc-ivory: #fffdf8;
}

/* One premium header system on every route. */
.site-header {
  height: 112px !important;
  padding: 0 clamp(22px, 3.2vw, 58px) !important;
  background: transparent !important;
  box-shadow: none !important;
  pointer-events: none;
  transition:
    height .32s ease,
    padding .32s ease,
    background .32s ease,
    box-shadow .32s ease,
    backdrop-filter .32s ease !important;
}

.site-header::before {
  display: none !important;
}

.site-header .header-inner {
  position: relative !important;
  z-index: 3 !important;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  padding: 0 !important;
  gap: 24px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  pointer-events: auto;
}

.site-header[data-scrolling="true"] {
  height: 80px !important;
  padding-inline: clamp(18px, 3vw, 50px) !important;
  border-bottom: 1px solid rgba(226, 198, 133, .2) !important;
  background: linear-gradient(105deg, rgba(10, 53, 41, .98), rgba(21, 79, 58, .96)) !important;
  box-shadow: 0 16px 40px rgba(4, 26, 19, .28) !important;
  -webkit-backdrop-filter: blur(18px) saturate(128%) !important;
  backdrop-filter: blur(18px) saturate(128%) !important;
}

/* Keep a real, high-contrast logo at the left in every header state. */
.site-header .brand-logo-link {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  flex-direction: row !important;
  gap: 0 !important;
}

.site-header .brand-logo-mark {
  position: relative !important;
  display: grid !important;
  place-items: center !important;
  width: 70px !important;
  height: 66px !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: width .32s ease, height .32s ease !important;
}

.site-header .brand-logo-mark::before {
  content: none !important;
  display: none !important;
  width: 116% !important;
  height: 112% !important;
  grid-area: 1 / 1 !important;
  border-radius: 50% !important;
  background: radial-gradient(ellipse, rgba(248, 246, 235, .46) 0, rgba(248, 246, 235, .14) 46%, transparent 72%) !important;
  opacity: .55 !important;
  transform: none !important;
}

.site-header .brand-logo-image {
  position: relative !important;
  z-index: 1 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  opacity: 1 !important;
  filter: none !important;
}

/* Preserve the gold tower mark while keeping the lettering legible on every header background. */
.site-header .brand-logo-mark::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  background: url("/media/brand/master-craft-logo.png") center / contain no-repeat;
  clip-path: inset(43% 0 0 0);
  filter: brightness(0) invert(1) drop-shadow(0 1px 3px rgba(0, 0, 0, .42));
  pointer-events: none;
}

.site-header .brand-slogan,
.site-header .desktop-nav {
  display: none !important;
}

.site-header[data-scrolling="true"] .brand-logo-mark {
  width: 54px !important;
  height: 51px !important;
}

/*
 * Premium signature inspired by the Senclave assurance seal:
 * the wordmark resolves from a soft centre reveal once, then a restrained
 * warm sheen and twin pin-point glints keep travelling across the gold rule.
 */
body .site-header .header-inner::after {
  --mc-underline-rest: 58%;
  --mc-underline-thickness: 3px;
  content: "MASTER CRAFT" !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  display: block !important;
  width: max-content !important;
  min-width: 0 !important;
  margin: 0 -.3em 0 0 !important;
  padding: 0 0 11px !important;
  transform: translate(-50%, -50%) !important;
  border: 0 !important;
  color: var(--mc-ivory) !important;
  background-image:
    linear-gradient(90deg, rgba(215, 186, 120, .74), rgba(215, 186, 120, .96), rgba(215, 186, 120, .74)),
    radial-gradient(ellipse at center, rgba(255, 226, 153, .82), rgba(215, 186, 120, 0) 72%),
    radial-gradient(circle, rgba(255, 255, 244, 1) 0 18%, rgba(255, 226, 153, .92) 25%, rgba(255, 226, 153, 0) 70%),
    radial-gradient(circle, rgba(255, 255, 244, 1) 0 18%, rgba(255, 226, 153, .92) 25%, rgba(255, 226, 153, 0) 70%) !important;
  background-position: center bottom, center bottom, 50% calc(100% + 3px), 50% calc(100% + 3px);
  background-repeat: no-repeat !important;
  background-size: 100% 1px, var(--mc-underline-rest) var(--mc-underline-thickness), 0 0, 0 0;
  animation:
    mc-signature-arrival 2.25s cubic-bezier(.22, .72, .18, 1) .12s 1 both,
    mc-signature-glow 4.8s cubic-bezier(.45, 0, .25, 1) 2.37s infinite !important;
  font-family: var(--serif) !important;
  font-size: clamp(24px, 3vw, 36px) !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  letter-spacing: .3em !important;
  text-align: center !important;
  text-indent: 0 !important;
  text-transform: uppercase !important;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .55);
  white-space: nowrap !important;
  pointer-events: none;
  will-change: opacity, filter, clip-path, background-position, background-size;
}

@keyframes mc-signature-arrival {
  0% {
    opacity: 0;
    clip-path: inset(0 50% 0 50%);
    filter: blur(5px) brightness(.72);
    text-shadow: 0 2px 12px rgba(0, 0, 0, .38);
    background-position: center bottom, center bottom, 50% calc(100% + 3px), 50% calc(100% + 3px);
    background-size: 0% 1px, 0% var(--mc-underline-thickness), 0 0, 0 0;
  }
  22% {
    opacity: .88;
    filter: blur(2px) brightness(.92);
  }
  45% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    filter: blur(0) brightness(1.04);
    text-shadow: 0 2px 12px rgba(0, 0, 0, .5), 0 0 5px rgba(255, 242, 205, .25);
    background-position: center bottom, center bottom, 50% calc(100% + 3px), 50% calc(100% + 3px);
    background-size: 100% 1px, 12% var(--mc-underline-thickness), 0 0, 0 0;
  }
  58% {
    filter: brightness(1.12) drop-shadow(0 0 7px rgba(255, 228, 158, .24));
    text-shadow: 0 0 2px rgba(255, 255, 248, .95), 0 0 12px rgba(255, 226, 153, .62), 0 3px 16px rgba(0, 0, 0, .5);
    background-position: center bottom, center bottom, 50% calc(100% + 3px), 50% calc(100% + 3px);
    background-size: 100% 1px, var(--mc-underline-rest) var(--mc-underline-thickness), 11px 11px, 11px 11px;
  }
  76% {
    filter: brightness(1.06) drop-shadow(0 0 4px rgba(255, 228, 158, .18));
    text-shadow: 0 1px 2px rgba(255, 255, 248, .64), 0 0 7px rgba(255, 226, 153, .38), 0 3px 15px rgba(0, 0, 0, .5);
    background-position: center bottom, center bottom, 1% calc(100% + 3px), 99% calc(100% + 3px);
    background-size: 100% 1px, var(--mc-underline-rest) var(--mc-underline-thickness), 9px 9px, 9px 9px;
  }
  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    filter: none;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .55);
    background-position: center bottom, center bottom, -12px calc(100% + 3px), calc(100% + 12px) calc(100% + 3px);
    background-size: 100% 1px, var(--mc-underline-rest) var(--mc-underline-thickness), 0 0, 0 0;
  }
}

/* The entrance stays one-shot; this quieter signature shimmer repeats forever. */
@keyframes mc-signature-glow {
  0%, 18%, 100% {
    filter: none;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .55), 0 0 1px rgba(255, 236, 190, .18);
    background-position: center bottom, center bottom, 50% calc(100% + 3px), 50% calc(100% + 3px);
    background-size: 100% 1px, var(--mc-underline-rest) var(--mc-underline-thickness), 0 0, 0 0;
  }
  36% {
    filter: brightness(1.05) drop-shadow(0 0 3px rgba(255, 228, 158, .16));
    text-shadow: 0 1px 2px rgba(255, 255, 248, .52), 0 0 7px rgba(255, 226, 153, .34), 0 3px 15px rgba(0, 0, 0, .5);
    background-position: center bottom, center bottom, 50% calc(100% + 3px), 50% calc(100% + 3px);
    background-size: 100% 1px, var(--mc-underline-rest) var(--mc-underline-thickness), 5px 5px, 5px 5px;
  }
  50% {
    filter: brightness(1.12) drop-shadow(0 0 7px rgba(255, 228, 158, .25));
    text-shadow: 0 0 2px rgba(255, 255, 248, .94), 0 0 13px rgba(255, 226, 153, .64), 0 3px 16px rgba(0, 0, 0, .5);
    background-position: center bottom, center bottom, 50% calc(100% + 3px), 50% calc(100% + 3px);
    background-size: 100% 1px, var(--mc-underline-rest) var(--mc-underline-thickness), 11px 11px, 11px 11px;
  }
  72% {
    filter: brightness(1.06) drop-shadow(0 0 4px rgba(255, 228, 158, .18));
    text-shadow: 0 1px 2px rgba(255, 255, 248, .62), 0 0 8px rgba(255, 226, 153, .4), 0 3px 15px rgba(0, 0, 0, .5);
    background-position: center bottom, center bottom, 1% calc(100% + 3px), 99% calc(100% + 3px);
    background-size: 100% 1px, var(--mc-underline-rest) var(--mc-underline-thickness), 8px 8px, 8px 8px;
  }
  86% {
    filter: brightness(1.02) drop-shadow(0 0 2px rgba(255, 228, 158, .1));
    text-shadow: 0 2px 12px rgba(0, 0, 0, .54), 0 0 3px rgba(255, 226, 153, .2);
    background-position: center bottom, center bottom, -8px calc(100% + 3px), calc(100% + 8px) calc(100% + 3px);
    background-size: 100% 1px, var(--mc-underline-rest) var(--mc-underline-thickness), 2px 2px, 2px 2px;
  }
}

body .site-header .header-inner::before {
  content: "™" !important;
  position: absolute !important;
  z-index: 4 !important;
  top: calc(50% - 19px) !important;
  left: calc(50% + clamp(142px, 14.9vw, 190px)) !important;
  display: block !important;
  color: var(--mc-ivory) !important;
  font-family: var(--sans) !important;
  font-size: 10px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-shadow: 0 2px 10px rgba(8, 18, 16, .65) !important;
  pointer-events: none;
  transform-origin: 50% 80%;
  animation: mc-trademark-arrival .9s cubic-bezier(.22, .72, .18, 1) .82s 1 both;
}

@keyframes mc-trademark-arrival {
  0% {
    opacity: 0;
    transform: translateY(3px) scale(.62);
    filter: blur(2px) brightness(.8);
  }
  62% {
    opacity: 1;
    transform: translateY(0) scale(1.18);
    filter: blur(0) brightness(1.5) drop-shadow(0 0 5px rgba(255, 230, 168, .7));
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: none;
  }
}

body .site-header[data-scrolling="true"] .header-inner::after {
  padding-bottom: 9px !important;
  font-size: clamp(22px, 2.25vw, 32px) !important;
}

body .site-header[data-scrolling="true"] .header-inner::before {
  top: calc(50% - 17px) !important;
  left: calc(50% + clamp(124px, 13.3vw, 170px)) !important;
}

/* Keep every hero-copy element on the same left edge as the action buttons. */
.home-hero > h1.visually-hidden {
  left: clamp(18px, 2vw, 28px) !important;
}

.home-hero > h1.visually-hidden::before {
  transform: translateY(8px);
}

.home-hero-overlay::before {
  left: clamp(18px, 2vw, 28px) !important;
  bottom: calc(clamp(168px, 19vh, 220px) - 26px) !important;
}

.home-hero-overlay::after {
  left: calc(clamp(18px, 2vw, 28px) + clamp(55px, 6vw, 78px)) !important;
  bottom: calc(clamp(168px, 19vh, 220px) - 17px) !important;
}

/* Transparent hero actions, held in the clear left margin away from the artwork. */
body .home-hero .home-hero-actions {
  position: absolute !important;
  right: auto !important;
  bottom: clamp(34px, 5vh, 54px) !important;
  left: clamp(18px, 2vw, 28px) !important;
  z-index: 4 !important;
  display: flex !important;
  width: max-content !important;
  max-width: none !important;
  padding: 0 !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  gap: 9px !important;
  justify-content: flex-start !important;
  pointer-events: auto;
}

body .home-hero .home-hero-actions .button,
body .home-hero .home-hero-actions .button.primary,
body .home-hero .home-hero-actions .button.outline {
  min-width: 0 !important;
  min-height: 44px !important;
  padding: 0 23px !important;
  border: 1px solid rgba(255, 255, 255, .66) !important;
  border-radius: 999px !important;
  color: #fffdf8 !important;
  background: transparent !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 10px 28px rgba(3, 17, 12, .2) !important;
  -webkit-backdrop-filter: blur(5px) !important;
  backdrop-filter: blur(5px) !important;
  font-family: var(--sans) !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  letter-spacing: .18em !important;
  text-transform: uppercase !important;
  white-space: nowrap;
  transition: border-color .22s ease, color .22s ease, background .22s ease, transform .22s ease, box-shadow .22s ease !important;
}

body .home-hero .home-hero-actions .button:hover,
body .home-hero .home-hero-actions .button:focus-visible {
  border-color: rgba(245, 207, 110, .92) !important;
  color: #f5cf6e !important;
  background: rgba(8, 37, 28, .16) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 12px 30px rgba(3, 17, 12, .28), 0 0 18px rgba(215, 186, 120, .12) !important;
  transform: translateY(-2px) !important;
}

body .home-hero .home-hero-actions .button span {
  margin-left: 5px;
  font-size: 1.05em;
}

/* Compact right-side navigation drawer instead of a full-screen takeover. */
.site-header .menu-button {
  position: relative !important;
  z-index: 5 !important;
  display: grid !important;
  width: 52px !important;
  height: 52px !important;
  margin-left: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
  transform: none !important;
}

.site-header .menu-button::before {
  content: "MENU" !important;
  position: absolute !important;
  top: 50% !important;
  right: 58px !important;
  transform: translateY(-50%) !important;
  color: #fff !important;
  font-family: var(--sans) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: .24em !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .5) !important;
  white-space: nowrap !important;
}

.site-header .menu-button span {
  width: 30px !important;
  height: 1.5px !important;
  background: #fff !important;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .35) !important;
}

.site-header .menu-button span:first-child {
  transform: translateY(-7px) !important;
}

.site-header .menu-button span:nth-child(2) {
  transform: translateY(0) !important;
}

.site-header .menu-button span:last-child {
  transform: translateY(7px) !important;
}

.site-header .menu-button.open span:first-child {
  transform: rotate(45deg) !important;
}

.site-header .menu-button.open span:nth-child(2) {
  opacity: 0 !important;
  transform: scaleX(.2) !important;
}

.site-header .menu-button.open span:last-child {
  transform: rotate(-45deg) !important;
}

.site-header .mobile-menu {
  position: fixed !important;
  inset: 0 0 0 auto !important;
  z-index: 2 !important;
  display: flex !important;
  width: min(430px, 88vw) !important;
  height: 100dvh !important;
  padding: 116px 34px 36px !important;
  align-items: flex-start !important;
  justify-content: center !important;
  border-left: 1px solid rgba(215, 186, 120, .24) !important;
  background:
    radial-gradient(circle at 70% 8%, rgba(215, 186, 120, .16), transparent 34%),
    linear-gradient(155deg, rgba(7, 37, 28, .995), rgba(15, 64, 47, .99)) !important;
  box-shadow: -28px 0 70px rgba(2, 18, 13, .34) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateX(calc(100% + 34px)) !important;
  -webkit-backdrop-filter: blur(24px) saturate(125%) !important;
  backdrop-filter: blur(24px) saturate(125%) !important;
  pointer-events: none !important;
  transition: opacity .28s ease, visibility .28s ease, transform .34s cubic-bezier(.22, 1, .36, 1) !important;
}

.site-header .mobile-menu.open {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(0) !important;
  pointer-events: auto !important;
}

.site-header .mobile-menu nav {
  width: 100% !important;
  padding: 8px 22px 14px !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  border-radius: 24px !important;
  background: rgba(255, 255, 255, .045) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05) !important;
}

.site-header .mobile-menu a {
  padding: 15px 4px !important;
  text-align: left !important;
}

/* Shared left grid and text alignment on homepage sections and every inner page. */
.page-hero-content,
.section-head,
.section-head h2,
.section-head > p,
.section-head > div,
.section-head > div:last-child,
.section-head > div:last-child > p,
.editorial-copy,
.two-column-copy,
.founder-message,
.identity-copy,
.career-practice,
.application-section,
.privacy-copy,
.contact-page-grid {
  text-align: left !important;
}

.section-head h2,
.section-head > p,
.section-head > div:last-child > p {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.about-story .editorial-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 24px !important;
  align-items: start !important;
}

.about-story .editorial-copy {
  width: min(100%, 980px) !important;
  max-width: 980px !important;
  margin: 0 !important;
}

.about-story .editorial-copy h2,
.about-story .editorial-copy .lead,
.about-story .two-column-copy {
  max-width: 920px !important;
}

.about-principles .section-head,
.promise-section .section-head,
.testimonial-intro.section-head {
  align-items: start !important;
}

.about-principles .section-head h2,
.promise-section .section-head h2,
.testimonial-intro.section-head h2 {
  text-align: left !important;
}

@media (max-width: 960px) {
  .site-header {
    height: 96px !important;
    padding-inline: 22px !important;
  }

  .site-header .brand-logo-mark {
    width: 60px !important;
    height: 56px !important;
  }

  .site-header[data-scrolling="true"] {
    height: 76px !important;
    padding-inline: 20px !important;
  }

  .site-header[data-scrolling="true"] .brand-logo-mark {
    width: 50px !important;
    height: 47px !important;
  }

  .site-header .menu-button {
    width: 48px !important;
    height: 48px !important;
  }

  .site-header .menu-button::before {
    right: 53px !important;
  }

  .section-head,
  .about-principles .section-head,
  .promise-section .section-head,
  .testimonial-intro.section-head {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
}

@media (max-width: 560px) {
  .site-header {
    height: 84px !important;
    padding-inline: 12px !important;
  }

  .site-header[data-scrolling="true"] {
    height: 70px !important;
    padding-inline: 12px !important;
  }

  .site-header .brand-logo-mark,
  .site-header[data-scrolling="true"] .brand-logo-mark {
    width: 42px !important;
    height: 40px !important;
  }

  body .site-header .header-inner::after,
  body .site-header[data-scrolling="true"] .header-inner::after {
    --mc-underline-rest: 56%;
    --mc-underline-thickness: 2px;
    display: block !important;
    margin-right: -.14em !important;
    padding-bottom: 7px !important;
    font-size: 16px !important;
    letter-spacing: .14em !important;
  }

  body .site-header .header-inner::before,
  body .site-header[data-scrolling="true"] .header-inner::before {
    top: calc(50% - 12px) !important;
    left: calc(50% + 72px) !important;
    font-size: 8px !important;
  }

  .home-hero > h1.visually-hidden::before {
    transform: translateY(6px);
  }

  .home-hero > h1.visually-hidden {
    left: 14px !important;
    width: calc(100% - 28px) !important;
  }

  .home-hero-overlay::before {
    left: 14px !important;
    bottom: 118px !important;
  }

  .home-hero-overlay::after {
    left: 69px !important;
    bottom: 126px !important;
  }

  body .home-hero .home-hero-actions {
    right: 14px !important;
    bottom: 78px !important;
    left: 14px !important;
    display: grid !important;
    grid-template-columns: max-content minmax(0, max-content) !important;
    width: auto !important;
    gap: 8px !important;
    justify-content: start !important;
  }

  body .home-hero .home-hero-actions .button,
  body .home-hero .home-hero-actions .button.primary,
  body .home-hero .home-hero-actions .button.outline {
    width: auto !important;
    min-height: 38px !important;
    padding: 0 12px !important;
    justify-self: start !important;
    font-size: 8.5px !important;
    letter-spacing: .12em !important;
  }

  .site-header .menu-button,
  .site-header[data-scrolling="true"] .menu-button {
    width: 42px !important;
    height: 42px !important;
  }

  .site-header .menu-button::before {
    display: none !important;
  }

  .site-header .menu-button span {
    width: 26px !important;
  }

  .site-header .mobile-menu {
    width: min(360px, 88vw) !important;
    padding: 92px 14px 82px !important;
  }

  .site-header .mobile-menu nav {
    padding-inline: 16px !important;
    border-radius: 21px !important;
  }

  .site-header .mobile-menu a {
    padding-block: 14px !important;
  }

  .page-hero-content,
  .about-story .editorial-grid,
  .section-head {
    text-align: left !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body .site-header .header-inner::after {
    animation: none !important;
    opacity: 1 !important;
    clip-path: none !important;
    filter: none !important;
    background-position: center bottom, center bottom, -12px calc(100% + 3px), calc(100% + 12px) calc(100% + 3px) !important;
    background-size: 100% 1px, var(--mc-underline-rest) var(--mc-underline-thickness), 0 0, 0 0 !important;
  }

  body .site-header .header-inner::before {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}
