
/* Prevent off-canvas UI from increasing document width */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}/* Hab Empire UI/UX Pro Max pass
   Scoped refinements for accessibility, touch behavior, responsive rhythm,
   and perceived craft without replacing the existing art direction. */

:root {
  --pro-surface: rgba(12, 9, 6, 0.72);
  --pro-surface-strong: rgba(18, 12, 6, 0.88);
  --pro-border: rgba(224, 168, 60, 0.22);
  --pro-border-strong: rgba(224, 168, 60, 0.48);
  --pro-focus: #f0c860;
  --pro-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --pro-radius: 8px;
  --pro-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  line-height: 1.5;
}

a,
button,
.tab-btn,
.bc,
.hab-gate-card,
.v11-card,
.sector-card {
  cursor: pointer !important;
}

a,
button {
  touch-action: manipulation;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible,
.bc:focus-within,
.hab-gate-card:focus-visible {
  outline: 2px solid var(--pro-focus);
  outline-offset: 4px;
}

::selection {
  background: rgba(224, 168, 60, 0.3);
  color: var(--ivory);
}

.hab-skip-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

#navbar {
  padding: 18px clamp(18px, 3vw, 44px);
}

#navbar.scrolled {
  background:
    linear-gradient(180deg, rgba(6, 5, 4, 0.96), rgba(6, 5, 4, 0.86)),
    rgba(6, 5, 4, 0.92);
  box-shadow: 0 14px 48px rgba(0, 0, 0, 0.32);
}

.nav-links {
  gap: clamp(10px, 1.15vw, 18px);
}

.nav-links a,
.nav-cta,
#langToggle,
.nav-hamburger,
#menu-close,
.btn-gold,
.btn-outline,
.btn-terminal,
.tab-btn,
.bc-cta,
.v11-btn,
.hab-dock a,
.hab-backtop,
.hab-install {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-links a {
  min-height: 36px;
  position: relative;
}

.nav-links a::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
  opacity: 0;
  transform: scaleX(0.55);
  transition: opacity 0.24s var(--pro-ease), transform 0.24s var(--pro-ease);
}

.nav-links a:hover::before,
.nav-links a:focus-visible::before,
.nav-links a.is-active::before {
  opacity: 1;
  transform: scaleX(1);
}

.nav-cta,
#langToggle,
.btn-gold,
.btn-outline,
.btn-terminal,
.v11-btn,
.tab-btn {
  border-radius: var(--pro-radius);
}

#hero {
  min-height: 100svh;
  padding-top: 96px;
  padding-bottom: 96px;
}

.hero-content {
  width: min(100%, 1040px);
}

.hero-transmission,
.hero-empire-tag,
.section-label,
.bc-cat,
.v11-kicker {
  overflow-wrap: anywhere;
}

.hero-h1 {
  max-width: 12ch;
  margin-left: auto;
  margin-right: auto;
  text-wrap: balance;
}

.hero-h2 {
  max-width: 720px;
  text-wrap: pretty;
}

.hero-cta-row {
  gap: 12px;
}

.hero-cta-row a {
  min-width: min(100%, 190px);
}

.hab-v7-strip {
  color: rgba(237, 224, 200, 0.7);
}

.hab-launch-gateway,
.hab-mission-section,
#portfolio,
#founder,
#media,
#contact,
.v11-section {
  scroll-margin-top: 92px;
}

.hab-gate-card,
.hab-mission-card,
.data-panel,
.bc,
.v11-card,
.sector-card,
.contact-card {
  border-radius: var(--pro-radius);
}

.hab-gate-card,
.bc,
.v11-card,
.sector-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 42%),
    var(--pro-surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.hab-gate-card:hover,
.hab-gate-card:focus-visible,
.bc:hover,
.bc:focus-within,
.bc.is-open,
.v11-card:hover,
.v11-card:focus-within,
.sector-card:hover,
.sector-card:focus-within {
  border-color: var(--pro-border-strong);
  box-shadow: var(--pro-shadow), 0 0 28px rgba(196, 136, 42, 0.08);
}

.hab-gate-body,
.hab-mission-text,
.hab-mission-list p,
.bc-body,
.founder-body,
.v11-card p,
.v11-card li {
  text-wrap: pretty;
}

.cat-tabs {
  gap: 10px;
  border-bottom: none;
  padding-bottom: 2px;
}

.tab-btn {
  border: 1px solid rgba(196, 136, 42, 0.14);
  background: rgba(6, 5, 4, 0.34);
  margin-bottom: 0;
}

.tab-btn.active {
  background: rgba(196, 136, 42, 0.12);
  box-shadow: inset 0 0 0 1px rgba(224, 168, 60, 0.16);
}

#portfolio a[href="empire-matrix.html"] {
  min-height: 46px;
  border-radius: var(--pro-radius);
}

.bc {
  min-height: 300px;
  isolation: isolate;
}

.bc-body,
.bc-cta {
  will-change: max-height, opacity, transform;
}

.bc:focus-within .bc-body,
.bc.is-open .bc-body {
  max-height: 380px;
  opacity: 1;
}

.bc:focus-within .bc-cta,
.bc.is-open .bc-cta {
  opacity: 1;
  transform: translateY(0);
}

.bc-cta {
  align-self: flex-start;
  padding: 10px 0;
}

.data-row {
  gap: 16px;
}

.data-key,
.data-val {
  overflow-wrap: anywhere;
}

#mobile-menu {
  padding: 84px 22px 40px;
  overflow-y: auto;
  align-items: stretch;
  justify-content: flex-start;
}

#mobile-menu a {
  width: min(100%, 520px);
  margin-left: auto;
  margin-right: auto;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#menu-close {
  width: 48px;
  height: 48px;
}

.hab-dock {
  border-radius: var(--pro-radius);
}

@media (hover: none) {
  .bc {
    min-height: 0;
  }

  .bc-body {
    max-height: none;
    opacity: 1;
  }

  .bc-cta {
    opacity: 1;
    transform: none;
  }

  #cursor-dot,
  #cursor-ring {
    display: none;
  }
}

@media (max-width: 1340px) {
  .nav-hamburger {
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 760px) {
  :root {
    --section-pad: clamp(64px, 16vw, 92px);
  }

  #navbar,
  #navbar.scrolled {
    padding: 12px 16px;
  }

  .logo-sub {
    display: none;
  }

  .hab-brand-mark {
    width: 38px !important;
    height: 46px !important;
  }

  .hero-content {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero-transmission {
    letter-spacing: 3px;
    line-height: 1.6;
  }

  .hero-h1 {
    font-size: clamp(2.25rem, 14vw, 3.65rem);
    letter-spacing: 1px;
    line-height: 1;
  }

  .hero-empire-tag {
    letter-spacing: 5px;
  }

  .hero-h2 {
    font-size: 1.03rem;
    line-height: 1.72;
  }

  .hero-h2 br {
    display: none;
  }

  .hero-cta-row a {
    width: min(100%, 330px);
  }

  .cat-tabs {
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .tab-btn {
    width: 100%;
    white-space: normal;
    line-height: 1.45;
    text-align: center;
  }

  .bc {
    padding: 28px 22px;
  }

  .bc-title {
    line-height: 1.28;
  }

  .data-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .data-val {
    text-align: left;
  }

  .footer-bottom {
    gap: 12px;
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 430px) {
  .logo-primary {
    font-size: 0.78rem;
    letter-spacing: 1.4px;
  }

  .hero-transmission {
    font-size: 0.54rem;
  }

  .section-label {
    letter-spacing: 3px;
  }

  #mobile-menu a {
    font-size: 0.82rem;
    letter-spacing: 2.4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #cursor-dot,
  #cursor-ring {
    display: none;
  }

  .hero-grid {
    transition: none;
    transform: perspective(700px) rotateX(22deg) scale(1.35);
  }
}
/* ===== Living Empire Sigil Console ===== */
.pro-sigil-console {
  position: relative;
  z-index: 3;
  width: min(100%, 820px);
  margin: 30px auto 0;
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(280px, 1.1fr);
  align-items: center;
  gap: clamp(18px, 4vw, 36px);
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(224, 168, 60, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(196, 136, 42, 0.08), rgba(0, 224, 240, 0.025) 44%, rgba(6, 5, 4, 0.58)),
    rgba(6, 5, 4, 0.56);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(14px);
  animation: proConsoleArrive 900ms var(--pro-ease) 1.65s both;
}

.pro-sigil-console::before,
.pro-sigil-console::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.pro-sigil-console::before {
  inset: 10px;
  border: 1px solid rgba(224, 168, 60, 0.08);
  border-radius: 6px;
}

.pro-sigil-console::after {
  left: 18px;
  right: 18px;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 200, 96, 0.82), transparent);
  box-shadow: 0 0 26px rgba(224, 168, 60, 0.32);
}

.pro-sigil-stage {
  position: relative;
  min-height: 238px;
  perspective: 900px;
  transform-style: preserve-3d;
}

.pro-sigil-orbit,
.pro-sigil-mark,
.pro-node {
  position: absolute;
  left: 50%;
  top: 50%;
}

.pro-sigil-orbit {
  border: 1px solid rgba(224, 168, 60, 0.2);
  border-radius: 50%;
  transform-style: preserve-3d;
  box-shadow: inset 0 0 28px rgba(224, 168, 60, 0.055), 0 0 26px rgba(0, 224, 240, 0.035);
}

.pro-orbit-one {
  width: 210px;
  height: 210px;
  margin: -105px;
  animation: proOrbitOne 18s linear infinite;
}

.pro-orbit-two {
  width: 260px;
  height: 144px;
  margin: -72px -130px;
  border-color: rgba(0, 224, 240, 0.14);
  animation: proOrbitTwo 24s linear infinite;
}

.pro-orbit-three {
  width: 150px;
  height: 260px;
  margin: -130px -75px;
  border-color: rgba(0, 255, 136, 0.12);
  animation: proOrbitThree 30s linear infinite;
}

.pro-sigil-mark {
  width: 118px;
  height: 118px;
  object-fit: contain;
  margin: -59px;
  filter: drop-shadow(0 0 20px rgba(224, 168, 60, 0.42));
  animation: proSigilFloat 5.8s ease-in-out infinite;
}

.pro-node {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border: 1px solid rgba(224, 168, 60, 0.28);
  border-radius: 999px;
  background: rgba(6, 5, 4, 0.72);
  color: rgba(237, 224, 200, 0.82);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 1.7px;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 0 18px rgba(196, 136, 42, 0.1);
}

.pro-node-truth { transform: translate(-50%, -50%) translate3d(-118px, -78px, 30px); }
.pro-node-service { transform: translate(-50%, -50%) translate3d(122px, -66px, 36px); }
.pro-node-cash { transform: translate(-50%, -50%) translate3d(-116px, 88px, 24px); }
.pro-node-sovereignty { transform: translate(-50%, -50%) translate3d(118px, 88px, 42px); }

.pro-command-panel {
  position: relative;
  display: grid;
  gap: 14px;
  text-align: left;
}

.pro-panel-kicker {
  font-family: var(--font-mono);
  color: var(--terminal-cyan);
  font-size: 0.58rem;
  letter-spacing: 3.5px;
  text-transform: uppercase;
}

.pro-panel-readout {
  min-height: 58px;
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-left: 2px solid rgba(224, 168, 60, 0.66);
  background: rgba(196, 136, 42, 0.06);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.5vw, 1.14rem);
  line-height: 1.55;
  font-style: italic;
  text-wrap: pretty;
}

.pro-panel-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.pro-step {
  min-height: 44px;
  border: 1px solid rgba(196, 136, 42, 0.18);
  border-radius: 8px;
  background: rgba(6, 5, 4, 0.42);
  color: rgba(237, 224, 200, 0.68);
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: transform 220ms var(--pro-ease), border-color 220ms var(--pro-ease), color 220ms var(--pro-ease), background 220ms var(--pro-ease);
}

.pro-step:hover,
.pro-step:focus-visible,
.pro-step.is-active {
  transform: translateY(-1px);
  border-color: rgba(224, 168, 60, 0.58);
  background: rgba(196, 136, 42, 0.14);
  color: var(--gold-bright);
}

@keyframes proConsoleArrive {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes proOrbitOne {
  from { transform: rotateX(64deg) rotateZ(0deg); }
  to { transform: rotateX(64deg) rotateZ(360deg); }
}

@keyframes proOrbitTwo {
  from { transform: rotateX(72deg) rotateY(18deg) rotateZ(360deg); }
  to { transform: rotateX(72deg) rotateY(18deg) rotateZ(0deg); }
}

@keyframes proOrbitThree {
  from { transform: rotateY(68deg) rotateZ(0deg); }
  to { transform: rotateY(68deg) rotateZ(-360deg); }
}

@keyframes proSigilFloat {
  0%, 100% { transform: translate3d(0, -2px, 42px) rotateY(-8deg); }
  50% { transform: translate3d(0, 7px, 58px) rotateY(8deg); }
}

@media (max-width: 880px) {
  .pro-sigil-console {
    grid-template-columns: 1fr;
    max-width: 560px;
  }

  .pro-command-panel {
    text-align: center;
  }

  .pro-panel-readout {
    text-align: center;
    border-left: none;
    border-top: 2px solid rgba(224, 168, 60, 0.66);
  }
}

@media (max-width: 560px) {
  .pro-sigil-console {
    margin-top: 22px;
    padding: 16px;
  }

  .pro-sigil-stage {
    min-height: 220px;
    transform: scale(0.88);
  }

  .pro-panel-steps {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pro-sigil-console,
  .pro-sigil-orbit,
  .pro-sigil-mark {
    animation: none !important;
  }
}
/* Desktop hero command deck placement */
@media (min-width: 1040px) and (min-height: 650px) {
  .hero-content {
    max-width: 1180px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 400px);
    grid-template-rows: auto auto auto auto;
    align-items: center;
    column-gap: clamp(28px, 5vw, 70px);
    text-align: left;
  }

  .hero-transmission,
  .hero-h1,
  .hero-empire-tag,
  .hero-h2,
  .hero-cta-row {
    grid-column: 1;
  }

  .hero-h1,
  .hero-h2 {
    margin-left: 0;
    margin-right: 0;
  }

  .hero-h1 {
    max-width: 10.8ch;
    font-size: clamp(3.4rem, 5.4vw, 6.2rem);
  }

  .hero-h2 {
    max-width: 610px;
    margin-top: 22px;
    margin-bottom: 30px;
  }

  .hero-cta-row {
    justify-content: flex-start;
  }

  .pro-sigil-console {
    grid-column: 2;
    grid-row: 1 / span 4;
    width: 100%;
    margin: 0;
    grid-template-columns: 1fr;
    align-self: center;
  }

  .pro-command-panel {
    text-align: center;
  }

  .pro-panel-readout {
    min-height: 82px;
    text-align: center;
    border-left: none;
    border-top: 2px solid rgba(224, 168, 60, 0.66);
  }

  .pro-panel-steps {
    grid-template-columns: 1fr 1fr;
  }
}
/* Small-screen sigil containment */
.pro-sigil-console,
.pro-sigil-stage {
  overflow: hidden;
}

@media (max-width: 560px) {
  .pro-sigil-stage {
    transform: none;
  }

  .pro-orbit-one {
    width: 180px;
    height: 180px;
    margin: -90px;
  }

  .pro-orbit-two {
    width: 220px;
    height: 124px;
    margin: -62px -110px;
  }

  .pro-orbit-three {
    width: 128px;
    height: 220px;
    margin: -110px -64px;
  }

  .pro-sigil-mark {
    width: 98px;
    height: 98px;
    margin: -49px;
  }

  .pro-node {
    min-height: 28px;
    padding: 5px 8px;
    font-size: 0.48rem;
    letter-spacing: 1.2px;
  }

  .pro-node-truth { transform: translate(-50%, -50%) translate3d(-88px, -70px, 24px); }
  .pro-node-service { transform: translate(-50%, -50%) translate3d(88px, -62px, 28px); }
  .pro-node-cash { transform: translate(-50%, -50%) translate3d(-86px, 78px, 20px); }
  .pro-node-sovereignty { transform: translate(-50%, -50%) translate3d(86px, 78px, 32px); }
}
/* fix: orbits (260px) exceeded stage (238px) and overlapped the hero title;
   console columns (260+280px min) overflowed phones */
.pro-sigil-stage { min-height: 300px; }
@media (max-width: 720px) {
  .pro-sigil-console { grid-template-columns: 1fr; }
  .pro-sigil-stage { min-height: 260px; }
  .pro-orbit-two { width: 220px; margin-left: -110px; }
  .pro-orbit-three { height: 220px; margin-top: -110px; }
}
