/* ===== Base theme ===== */
:root {
  --bg: #0b0f14;
  --bg2: #0f1620;
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.65);
  --border: rgba(255, 255, 255, 0.10);
  --accent: #b08d57;
}

.site-bg {
  background: var(--bg);
  color: var(--text);
}

.nav-blur {
  background: rgba(11, 15, 20, 0.75) !important;
  backdrop-filter: blur(10px);
}

.brand-logo {
  height: 85px;
  width: auto;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.35));
}

.brand-logo-control4 {
  height: 60px;
  width: auto;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.35));
}
.brand-logo-knx {
  height: 60px;
  width: auto;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.35));
}

.brand-logo-lutron {
  height: auto;
  width: 200px;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.35));
}

.brand-title {
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

/* Typography */
h1,
h2,
h3 {
  letter-spacing: -0.02em;
}

.lead {
  color: var(--muted);
}

/* Links */
.link-soft {
  color: rgba(255, 255, 255, 0.70);
  text-decoration: none;
}

.link-soft:hover {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
}

/* Buttons */
.btn-primary {
  --bs-btn-bg: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-color: #0b0f14;
  --bs-btn-hover-bg: #c6a46f;
  --bs-btn-hover-border-color: #c6a46f;
  --bs-btn-hover-color: #0b0f14;
  --bs-btn-active-bg: #c6a46f;
  --bs-btn-active-border-color: #c6a46f;
  --bs-btn-active-color: #0b0f14;
}

/* Hero with background image */
.hero {
  position: relative;
  padding: clamp(80px, 10vw, 140px) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #0b0f14;
}

.hero.has-bg {
  background: url('../img/hero-main.jpg') center/cover no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55));
}

.hero>.container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  line-height: 1.05;
}

.hero .hero-card {
  background: rgba(15, 22, 32, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.section-border {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Subtle transitions */
a,
.btn,
.card {
  transition: all .25s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.card:hover {
  transform: translateY(-2px);
}

/* Card */
.card-soft {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
}


/* Hero readability */
.hero.has-bg {
  color: rgba(255, 255, 255, 0.92);
}

.hero.has-bg h1,
.hero.has-bg h2,
.hero.has-bg p,
.hero.has-bg .lead,
.hero.has-bg .text-white-50 {
  color: rgba(255, 255, 255, 0.85) !important;
}

.hero.has-bg h1 {
  color: rgba(255, 255, 255, 0.95) !important;
}


.btn-outline-light:hover {
  color: #0b0f14 !important;
}

/* Header shrink */
.transition-header {
  transition: all 0.3s ease;
}

.header-shrink {
  backdrop-filter: blur(12px);
}

.header-shrink .container {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

.header-shrink .brand-logo {
  height: 50px;
}

/* Active nav */
.navbar .nav-link.active {
  color: #fff !important;
  font-weight: 600;
  position: relative;
}

.navbar .nav-link.active::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 4px;
  width: 100%;
  height: 2px;
  background: var(--accent);
}

/* Smooth navbar collapse animation */
.navbar-collapse {
  transition: height 0.35s ease, opacity 0.3s ease, transform 0.3s ease;
}

.navbar-collapse.collapsing {
  opacity: 0;
  transform: translateY(-8px);
}

.navbar-collapse.show {
  opacity: 1;
  transform: translateY(0);
}

/* Improve dropdown panel feel on mobile */
@media (max-width: 991px) {
  .navbar-collapse {
    background: rgba(15, 22, 32, 0.98);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 1rem 0;
  }
}

.navbar-toggler {
  border: none;
}

.navbar-toggler-icon-custom {
  display: inline-block;
  width: 24px;
  height: 2px;
  background: #fff;
  position: relative;
  transition: all 0.3s ease;
}

.collapsing {
  transition: height 0.4s ease;
}

.navbar-toggler-icon-custom::before,
.navbar-toggler-icon-custom::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: #fff;
  left: 0;
  transition: all 0.3s ease;
}

.navbar-toggler-icon-custom::before {
  top: -7px;
}

.navbar-toggler-icon-custom::after {
  top: 7px;
}

/* Animate to X */
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon-custom {
  background: transparent;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon-custom::before {
  transform: rotate(45deg);
  top: 0;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon-custom::after {
  transform: rotate(-45deg);
  top: 0;
}

/* Fade-in sections */
.fade-section {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.fade-section.visible {
  opacity: 1;
  transform: translateY(0);
}