/* ==========================================================================
   Kung Sheung Global Shell V2
   Premium header/footer system — scoped, responsive, contrast-safe
   ========================================================================== */

:root {
  --ks-shell-nav-h: 74px;
  --ks-shell-max: 1240px;
  --ks-shell-gutter: clamp(22px, 4vw, 56px);

  --ks-shell-teal: #2d6e6e;
  --ks-shell-teal-dk: #174949;
  --ks-shell-teal-soft: #e5f0ef;
  --ks-shell-blue: #245d73;
  --ks-shell-brass: #a57949;
  --ks-shell-brass-soft: #d8bf91;

  --ks-shell-ink: #1c1510;
  --ks-shell-ink-mid: #2e261d;
  --ks-shell-muted: #766b61;
  --ks-shell-canvas: #f5f1eb;
  --ks-shell-paper: #fffaf4;
  --ks-shell-white: #ffffff;
  --ks-shell-dark: #1c1510;
  --ks-shell-dark-mid: #2e261d;
  --ks-shell-rule: rgba(28,21,16,.12);

  --ks-shell-font-display: "Playfair Display", "DM Serif Display", Georgia, serif;
  --ks-shell-font-body: "Outfit", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ks-shell-font-mono: "JetBrains Mono", "Courier New", monospace;

  --ks-shell-shadow: 0 22px 60px rgba(28,21,16,.16);
  --ks-shell-shadow-soft: 0 10px 30px rgba(28,21,16,.08);
  --ks-shell-ease: .32s cubic-bezier(.16,.84,.44,1);
}

/* Fixed header compensation. Keep this single global rule; everything else is scoped. */
body {
  padding-top: var(--ks-shell-nav-h);
}

body.ks-shell-menu-open {
  overflow: hidden;
}

/* Accessibility */
.ks-shell-skip-link {
  position: fixed;
  top: -110px;
  left: 16px;
  z-index: 10000;
  padding: 10px 16px;
  border-radius: 0 0 8px 8px;
  background: var(--ks-shell-teal);
  color: #fff;
  font-family: var(--ks-shell-font-body);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: top .2s ease;
}
.ks-shell-skip-link:focus-visible {
  top: 0;
}

/* ==========================================================================
   Header
   ========================================================================== */

.ks-global-header,
.ks-global-header *,
.ks-global-footer,
.ks-global-footer * {
  box-sizing: border-box;
}

.ks-global-header a,
.ks-global-footer a {
  color: inherit;
  text-decoration: none;
}

.ks-global-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  min-height: var(--ks-shell-nav-h);
  display: flex;
  align-items: center;
  font-family: var(--ks-shell-font-body);
  background:
    linear-gradient(180deg, rgba(255,250,244,.96), rgba(245,241,235,.92));
  border-bottom: 1px solid rgba(28,21,16,.10);
  box-shadow: 0 8px 30px rgba(28,21,16,.06);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transition:
    background .35s ease,
    box-shadow .35s ease,
    border-color .35s ease,
    min-height .35s ease;
}

.ks-global-header.is-scrolled {
  background:
    radial-gradient(circle at 78% 0%, rgba(216,191,145,.10), transparent 34%),
    linear-gradient(135deg, rgba(23,73,73,.98), rgba(28,21,16,.96));
  border-bottom-color: rgba(255,255,255,.10);
  box-shadow: 0 16px 46px rgba(0,0,0,.25);
}

.ks-shell-header__inner {
  width: 100%;
  max-width: var(--ks-shell-max);
  margin: 0 auto;
  padding: 0 var(--ks-shell-gutter);
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: clamp(18px, 2vw, 34px);
}

/* Brand */
.ks-shell-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 205px;
  color: var(--ks-shell-ink);
}

.ks-shell-brand__mark {
  display: grid;
  place-items: center;
  width: 188px;
  min-height: 46px;
  transition: transform .28s ease;
}

.ks-shell-brand:hover .ks-shell-brand__mark {
  transform: translateY(-1px);
}

.ks-shell-brand__logo {
  width: 185px;
  height: auto;
  max-height: 52px;
  object-fit: contain;
  transition: filter .28s ease, opacity .28s ease;
}

.ks-global-header.is-scrolled .ks-shell-brand__logo {
  filter: brightness(0) invert(1);
}

.ks-shell-brand__fallback {
  display: none;
  flex-direction: column;
  line-height: 1;
}

.ks-shell-brand__fallback strong {
  font-family: var(--ks-shell-font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -.02em;
  color: var(--ks-shell-ink);
}

.ks-shell-brand__fallback span {
  margin-top: 5px;
  font-family: var(--ks-shell-font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ks-shell-muted);
}

.ks-global-header.is-scrolled .ks-shell-brand__fallback strong {
  color: #fff;
}
.ks-global-header.is-scrolled .ks-shell-brand__fallback span {
  color: rgba(255,255,255,.58);
}

/* Desktop nav */
.ks-shell-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}

.ks-shell-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--ks-shell-ink-mid);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color .24s ease, background .24s ease;
}

.ks-shell-nav__link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  opacity: .72;
  transition: transform .24s ease;
}

.ks-shell-nav__link:hover,
.ks-shell-nav__link.is-active {
  color: var(--ks-shell-teal);
  background: rgba(45,110,110,.075);
}

.ks-shell-nav__link:hover::after,
.ks-shell-nav__link.is-active::after {
  transform: scaleX(1);
}

.ks-shell-nav__link--accent {
  color: var(--ks-shell-blue);
}

.ks-global-header.is-scrolled .ks-shell-nav__link {
  color: rgba(255,255,255,.82);
}

.ks-global-header.is-scrolled .ks-shell-nav__link:hover,
.ks-global-header.is-scrolled .ks-shell-nav__link.is-active {
  color: var(--ks-shell-brass-soft);
  background: rgba(255,255,255,.08);
}

/* Right actions */
.ks-shell-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.ks-shell-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  font-family: var(--ks-shell-font-body);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform var(--ks-shell-ease), background var(--ks-shell-ease), color var(--ks-shell-ease), border-color var(--ks-shell-ease), box-shadow var(--ks-shell-ease);
}

.ks-shell-action--ghost {
  padding: 0 15px;
  border: 1px solid rgba(28,21,16,.14);
  background: rgba(255,255,255,.54);
  color: var(--ks-shell-ink-mid);
}

.ks-shell-action--ghost:hover {
  transform: translateY(-1px);
  border-color: rgba(45,110,110,.36);
  color: var(--ks-shell-teal-dk);
  background: rgba(255,255,255,.86);
}

.ks-global-header.is-scrolled .ks-shell-action--ghost {
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.84);
}

.ks-global-header.is-scrolled .ks-shell-action--ghost:hover {
  border-color: rgba(255,255,255,.36);
  background: rgba(255,255,255,.16);
  color: #fff;
}

.ks-shell-action--primary {
  position: relative;
  gap: 9px;
  padding: 0 21px;
  border: 1px solid rgba(45,110,110,.34);
  background: linear-gradient(135deg, var(--ks-shell-teal), var(--ks-shell-teal-dk));
  color: #fff !important;
  box-shadow: 0 13px 30px rgba(23,73,73,.25);
  overflow: hidden;
}

.ks-shell-action--primary::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -70%;
  width: 54%;
  transform: skewX(-16deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  transition: left .58s ease;
}

.ks-shell-action--primary:hover {
  transform: translateY(-1px);
  color: #fff !important;
  box-shadow: 0 18px 42px rgba(23,73,73,.34);
}

.ks-shell-action--primary:hover::after {
  left: 125%;
}

.ks-shell-action__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--ks-shell-brass-soft);
  box-shadow: 0 0 0 5px rgba(216,191,145,.18);
}

/* Hamburger */
.ks-shell-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(28,21,16,.14);
  border-radius: 999px;
  background: rgba(255,255,255,.44);
  cursor: pointer;
  transition: background .24s ease, border-color .24s ease;
}

.ks-shell-toggle__lines {
  display: grid;
  gap: 5px;
}

.ks-shell-toggle span {
  display: block;
  width: 21px;
  height: 1.5px;
  border-radius: 999px;
  background: var(--ks-shell-ink);
  transition: transform .28s ease, opacity .2s ease;
}

.ks-shell-toggle.is-active span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.ks-shell-toggle.is-active span:nth-child(2) {
  opacity: 0;
}
.ks-shell-toggle.is-active span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.ks-global-header.is-scrolled .ks-shell-toggle {
  border-color: rgba(255,255,255,.20);
  background: rgba(255,255,255,.09);
}

.ks-global-header.is-scrolled .ks-shell-toggle span {
  background: #fff;
}

/* Mobile menu */
.ks-shell-mobile {
  position: fixed;
  top: var(--ks-shell-nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 26px;
  padding: 30px var(--ks-shell-gutter) 34px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 82% 0%, rgba(216,191,145,.18), transparent 32%),
    linear-gradient(180deg, var(--ks-shell-paper), var(--ks-shell-canvas));
  transform: translateX(100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform .38s cubic-bezier(.16,.84,.44,1), opacity .24s ease, visibility .24s;
}

.ks-shell-mobile.is-open {
  transform: none;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ks-shell-mobile__intro {
  padding: 22px;
  border: 1px solid var(--ks-shell-rule);
  border-radius: 18px;
  background:
    radial-gradient(circle at 85% 0%, rgba(45,110,110,.14), transparent 34%),
    rgba(255,255,255,.62);
  box-shadow: var(--ks-shell-shadow-soft);
}

.ks-shell-mobile__intro small {
  display: block;
  margin-bottom: 8px;
  font-family: var(--ks-shell-font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .15em;
  color: var(--ks-shell-teal);
  text-transform: uppercase;
}

.ks-shell-mobile__intro strong {
  display: block;
  font-family: var(--ks-shell-font-display);
  font-size: 28px;
  line-height: 1.05;
  color: var(--ks-shell-ink);
  font-weight: 500;
}

.ks-shell-mobile__links {
  display: grid;
}

.ks-shell-mobile__link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 17px 0;
  border-bottom: 1px solid var(--ks-shell-rule);
  color: var(--ks-shell-ink);
  font-family: var(--ks-shell-font-display);
  font-size: clamp(28px, 8vw, 42px);
  line-height: 1;
  letter-spacing: -.02em;
  transition: color .24s ease, padding-left .24s ease;
}

.ks-shell-mobile__link small {
  min-width: 28px;
  font-family: var(--ks-shell-font-mono);
  font-size: 10px;
  font-weight: 800;
  color: var(--ks-shell-faint, #a59a91);
  letter-spacing: .08em;
}

.ks-shell-mobile__link::after {
  content: "→";
  font-family: var(--ks-shell-font-body);
  font-size: 18px;
  color: var(--ks-shell-teal);
}

.ks-shell-mobile__link:hover {
  padding-left: 8px;
  color: var(--ks-shell-teal-dk);
}

.ks-shell-mobile__cta-row {
  display: grid;
  gap: 12px;
}

.ks-shell-mobile__cta,
.ks-shell-mobile__wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 999px;
  font-family: var(--ks-shell-font-body);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ks-shell-mobile__cta {
  background: linear-gradient(135deg, var(--ks-shell-teal), var(--ks-shell-teal-dk));
  color: #fff !important;
  box-shadow: 0 12px 30px rgba(23,73,73,.26);
}

.ks-shell-mobile__wa {
  border: 1px solid rgba(45,110,110,.24);
  background: rgba(255,255,255,.62);
  color: var(--ks-shell-teal-dk);
}

.ks-shell-mobile__badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
  color: var(--ks-shell-muted);
  font-family: var(--ks-shell-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ks-shell-mobile__badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--ks-shell-teal);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.ks-global-footer {
  position: relative;
  overflow: hidden;
  font-family: var(--ks-shell-font-body);
  background:
    radial-gradient(circle at 12% 0%, rgba(45,110,110,.22), transparent 32%),
    radial-gradient(circle at 90% 10%, rgba(216,191,145,.13), transparent 34%),
    linear-gradient(135deg, #17110d, #2e261d 54%, #132d30);
  color: rgba(255,255,255,.76);
}

.ks-global-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .10;
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 46px 46px;
}

.ks-shell-footer__bar {
  height: 3px;
  background: linear-gradient(90deg, var(--ks-shell-teal), var(--ks-shell-brass), var(--ks-shell-teal-dk));
}

.ks-shell-footer__inner {
  position: relative;
  z-index: 2;
  max-width: var(--ks-shell-max);
  margin: 0 auto;
  padding: 0 var(--ks-shell-gutter);
}

.ks-shell-footer__grid {
  display: grid;
  grid-template-columns: 2.1fr 1fr 1fr 1.25fr;
  gap: clamp(36px, 5vw, 70px);
  padding: 68px 0 56px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.ks-shell-footer__brand {
  display: grid;
  gap: 18px;
}

.ks-shell-footer__brand-name {
  color: #fff;
  font-family: var(--ks-shell-font-display);
  font-size: 27px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -.02em;
}

.ks-shell-footer__brand-sub {
  margin-top: -8px;
  color: rgba(255,255,255,.48);
  font-family: var(--ks-shell-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.ks-shell-footer__desc {
  max-width: 430px;
  color: rgba(255,255,255,.70);
  font-size: 14px;
  line-height: 1.75;
}

.ks-shell-footer__meta {
  display: grid;
  gap: 8px;
  color: rgba(255,255,255,.48);
  font-family: var(--ks-shell-font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  line-height: 1.65;
}

.ks-shell-footer__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.ks-shell-footer__badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  color: rgba(255,255,255,.66);
  font-family: var(--ks-shell-font-mono);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ks-shell-footer__badge--accent {
  border-color: rgba(216,191,145,.32);
  color: var(--ks-shell-brass-soft);
}

.ks-shell-footer__title {
  display: block;
  margin-bottom: 22px;
  color: var(--ks-shell-brass-soft);
  font-family: var(--ks-shell-font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .20em;
  text-transform: uppercase;
}

.ks-shell-footer__list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.ks-shell-footer__link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(255,255,255,.72);
  font-size: 13.5px;
  line-height: 1.5;
  transition: color .24s ease, transform .24s ease;
}

.ks-shell-footer__link::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(216,191,145,.72);
  flex: 0 0 auto;
}

.ks-shell-footer__link:hover {
  color: #fff;
  transform: translateX(3px);
}

.ks-shell-footer__contact {
  display: grid;
  gap: 16px;
}

.ks-shell-footer__contact-item {
  display: grid;
  gap: 3px;
}

.ks-shell-footer__contact-label {
  color: rgba(255,255,255,.45);
  font-family: var(--ks-shell-font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.ks-shell-footer__contact-value {
  color: rgba(255,255,255,.82);
  font-size: 13.5px;
  line-height: 1.65;
}

a.ks-shell-footer__contact-value:hover {
  color: #fff;
}

.ks-shell-footer__whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  width: max-content;
  margin-top: 4px;
  padding: 0 18px;
  border: 1px solid rgba(216,191,145,.30);
  border-radius: 999px;
  background: rgba(216,191,145,.08);
  color: var(--ks-shell-brass-soft) !important;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: transform var(--ks-shell-ease), background var(--ks-shell-ease), color var(--ks-shell-ease), border-color var(--ks-shell-ease);
}

.ks-shell-footer__whatsapp:hover {
  transform: translateY(-1px);
  border-color: rgba(216,191,145,.48);
  background: rgba(216,191,145,.13);
  color: #fff !important;
}

.ks-shell-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 0 34px;
  color: rgba(255,255,255,.42);
  font-family: var(--ks-shell-font-mono);
  font-size: 10px;
  line-height: 1.65;
  letter-spacing: .05em;
}

.ks-shell-footer__bottom-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
}

.ks-shell-footer__bottom a {
  color: rgba(255,255,255,.56);
}
.ks-shell-footer__bottom a:hover {
  color: #fff;
}

/* Back to top */
.ks-shell-backtop {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1200;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--ks-shell-teal), var(--ks-shell-teal-dk));
  color: #fff;
  box-shadow: 0 14px 34px rgba(23,73,73,.28);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s ease, visibility .25s ease, transform .25s ease, box-shadow .25s ease;
}

.ks-shell-backtop.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.ks-shell-backtop:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(23,73,73,.36);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1240px) {
  .ks-shell-nav__link {
    padding-inline: 8px;
    letter-spacing: .115em;
  }

  .ks-shell-action--ghost {
    display: none;
  }
}

@media (max-width: 1120px) {
  :root {
    --ks-shell-nav-h: 70px;
  }

  .ks-shell-nav,
  .ks-shell-actions {
    display: none;
  }

  .ks-shell-toggle {
    display: inline-flex;
  }

  .ks-shell-header__inner {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }.ks-shell-footer__grid {
    grid-template-columns: 1fr;
  }

  
}

@media (max-width: 768px) {
  :root {
    --ks-shell-nav-h: 64px;
    --ks-shell-gutter: 22px;
  }

  .ks-shell-brand {
    min-width: 0;
  }

  .ks-shell-brand__mark {
    width: 158px;
    min-height: 40px;
  }

  .ks-shell-brand__logo {
    width: 156px;
  }

  .ks-shell-toggle {
    width: 42px;
    height: 42px;
  }

  .ks-shell-mobile {
    padding-top: 24px;
    padding-bottom: 28px;
  }

  

  

  

  .ks-shell-footer__grid {
    padding: 48px 0 44px;
    gap: 34px;
  }

  .ks-shell-footer__badges {
    align-items: flex-start;
  }

  .ks-shell-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .ks-shell-footer__bottom-links {
    justify-content: flex-start;
  }

  .ks-shell-backtop {
    right: 16px;
    bottom: 16px;
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 480px) {
  .ks-shell-footer__badges {
    display: grid;
  }

  .ks-shell-mobile__intro {
    padding: 19px;
  }

  .ks-shell-mobile__link {
    padding: 15px 0;
  }
}

@media print {
  .ks-global-header,
  .ks-shell-mobile,
  .ks-shell-backtop {
    display: none !important;
  }

  body {
    padding-top: 0 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ks-global-header,
  .ks-global-header *,
  .ks-global-footer,
  .ks-global-footer *,
  .ks-shell-mobile,
  .ks-shell-backtop {
    animation: none !important;
    transition: none !important;
  }
}
