:root {
  --nav-blur: 40px;
  --nav-glass: rgba(255, 255, 255, 0.06);
  --nav-border: rgba(255, 255, 255, 0.12);
  --nav-text: rgba(255, 255, 255, 0.96);
  --nav-muted: rgba(255, 255, 255, 0.82);
  --nav-accent: var(--qaraj-metallic, #c8c8d0);
  --nav-btn-h: 40px;
  --site-nav-h: 58px;
}

html[data-theme="light"] {
  --nav-glass: rgba(255, 255, 255, 0.52);
  --nav-border: rgba(28, 24, 20, 0.1);
  --nav-text: #1c1814;
  --nav-muted: #3d362e;
}

html[data-theme="light"] body {
  background: var(--qaraj-bg, #f0ebe3);
  color: var(--qaraj-text, #1c1814);
}

html[data-theme="light"] .theme-toggle {
  background: rgba(28, 24, 20, 0.06);
}

.site-nav--float {
  display: none !important;
}

.home-hero-main {
  position: relative;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-top: 0;
}

.home-hero-main::before,
.home-hero-main::after {
  display: none !important;
  content: none !important;
}

.home-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 1 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: unset !important;
}

.home-hero-bg::before,
.home-hero-bg::after {
  display: none !important;
  content: none !important;
}

.hero-overlay {
  display: none !important;
}

.home-hero-bg video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(3px) saturate(1.08);
  transform: scale(1.05);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.site-nav--top {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 28px);
  max-width: 1180px;
  z-index: 1000;
  padding: 0 18px;
  box-sizing: border-box;
  background: var(--nav-glass);
  backdrop-filter: blur(var(--nav-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--nav-blur)) saturate(140%);
  border: 1px solid var(--nav-border);
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  transition: background 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.site-nav--top.site-nav--surface-dark {
  --nav-glass: rgba(12, 12, 14, 0.44);
  --nav-border: rgba(255, 255, 255, 0.12);
  --nav-text: rgba(255, 255, 255, 0.96);
  --nav-muted: rgba(255, 255, 255, 0.82);
  --nav-accent: var(--qaraj-metallic, #c8c8d0);
}

.site-nav--top.site-nav--surface-light {
  --nav-glass: rgba(255, 255, 255, 0.78);
  --nav-border: rgba(28, 24, 20, 0.1);
  --nav-text: #1c1814;
  --nav-muted: rgba(28, 24, 20, 0.68);
  --nav-accent: #5c5c66;
  box-shadow: 0 8px 28px rgba(28, 24, 20, 0.08);
}

.site-nav--surface-light .site-nav-logo img {
  filter: invert(1) brightness(0.12);
}

.site-nav--surface-dark .site-nav-logo img {
  filter: none;
}

.site-nav--surface-light .site-nav-links a {
  color: var(--nav-muted) !important;
}

.site-nav--surface-light .site-nav-links a:hover,
.site-nav--surface-light .site-nav-links a.is-active {
  color: var(--nav-text) !important;
}

.site-nav--surface-dark .site-nav-links a {
  color: var(--nav-muted) !important;
}

.site-nav--surface-dark .site-nav-links a:hover {
  color: var(--nav-text) !important;
}

.site-nav--surface-dark .site-nav-links a.is-active {
  color: var(--nav-text) !important;
  font-weight: 700;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.35);
}

.site-nav--surface-light .site-nav-actions .shimmer-btn {
  --bg: rgba(20, 18, 16, 0.96);
  --shimmer-color: rgba(255, 255, 255, 0.95);
  color: #fff;
}

.site-nav--surface-dark .site-nav-actions .shimmer-btn {
  --bg: rgba(10, 10, 12, 0.94);
  --shimmer-color: rgba(255, 255, 255, 0.9);
  color: #fff;
}

body[data-page="home"] .site-nav--top {
  --nav-blur: 48px;
  --nav-glass: rgba(255, 255, 255, 0.04);
  --nav-border: rgba(255, 255, 255, 0.1);
  background: var(--nav-glass);
  backdrop-filter: blur(var(--nav-blur)) saturate(130%);
  -webkit-backdrop-filter: blur(var(--nav-blur)) saturate(130%);
  border: 1px solid var(--nav-border);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.14);
}

html[data-theme="light"] body[data-page="home"] .site-nav--top {
  --nav-glass: rgba(255, 255, 255, 0.45);
  --nav-border: rgba(28, 24, 20, 0.08);
}

.site-nav--sub.site-nav--top {
  padding: 0 18px;
}

body.subpage .site-nav-links a,
body.dash-page .site-nav-links a {
  color: rgba(255, 255, 255, 0.82);
}

body.subpage .site-nav-links a:hover,
body.subpage .site-nav-links a.is-active,
body.dash-page .site-nav-links a:hover,
body.dash-page .site-nav-links a.is-active {
  color: var(--qaraj-metallic, #c8c8d0);
}

html[data-theme="light"] body.subpage .site-nav-links a,
html[data-theme="light"] body.dash-page .site-nav-links a {
  color: #3d362e;
}

html[data-theme="light"] body.subpage .site-nav-links a:hover,
html[data-theme="light"] body.subpage .site-nav-links a.is-active,
html[data-theme="light"] body.dash-page .site-nav-links a:hover,
html[data-theme="light"] body.dash-page .site-nav-links a.is-active {
  color: #8a8a94;
}

body.subpage .site-nav-actions .theme-toggle:not(.shimmer-btn),
body.dash-page .site-nav-actions .theme-toggle:not(.shimmer-btn) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.96);
}

html[data-theme="light"] body.subpage .site-nav-actions .theme-toggle:not(.shimmer-btn),
html[data-theme="light"] body.dash-page .site-nav-actions .theme-toggle:not(.shimmer-btn) {
  background: rgba(28, 24, 20, 0.06);
  border-color: rgba(28, 24, 20, 0.14);
  color: #1c1814;
}

.site-nav-actions .q-btn-hero--sm {
  background: linear-gradient(145deg, #e8e8ec, #a8a8ae);
  color: #111111;
}

.home-hero-main .site-nav-links a {
  color: rgba(255, 255, 255, 0.82);
}

.home-hero-main .site-nav-links a:hover,
.home-hero-main .site-nav-links a.is-active {
  color: var(--qaraj-metallic, #d4d4dc);
}

.home-hero-main .site-nav-actions .theme-toggle:not(.shimmer-btn) {
  background: rgba(0, 0, 0, 0.28);
  border-color: rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.96);
}

.site-nav--top .site-nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: var(--site-nav-h);
  padding-bottom: 4px;
}

.site-nav-logo img {
  height: auto;
  width: auto;
  max-height: 28px;
  max-width: 108px;
  object-fit: contain;
  display: block;
}

.site-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  flex: 1;
  justify-content: center;
}

.site-nav-links a {
  color: var(--nav-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}

.site-nav-links a:hover,
.site-nav-links a.is-active { color: var(--nav-accent); }

.site-nav-admin-link .iconify {
  width: 20px;
  height: 20px;
  color: var(--nav-accent);
}

.site-nav-admin-link:hover .iconify {
  color: #fff;
}

.site-nav-actions .site-nav-admin-link {
  flex-shrink: 0;
}

.site-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.site-nav-actions .shimmer-btn {
  flex-shrink: 0;
}

/* Legacy theme-toggle without shimmer (fallback) */
.theme-toggle:not(.shimmer-btn) {
  width: var(--nav-btn-h);
  height: var(--nav-btn-h);
  min-width: var(--nav-btn-h);
  min-height: var(--nav-btn-h);
  max-width: var(--nav-btn-h);
  max-height: var(--nav-btn-h);
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 1px solid var(--nav-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--nav-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  box-shadow: none;
  filter: none;
  transition: none;
  flex-shrink: 0;
}

.theme-toggle:not(.shimmer-btn)::before,
.theme-toggle:not(.shimmer-btn)::after {
  display: none !important;
}

.theme-toggle:not(.shimmer-btn):hover,
.theme-toggle:not(.shimmer-btn):focus-visible {
  border-color: var(--nav-border);
  background: rgba(255, 255, 255, 0.08);
  transform: none;
  box-shadow: none;
}

.q-btn-hero--sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-radius: 12px;
  background: linear-gradient(145deg, #e8e8ec, #a8a8ae);
  color: #111111;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 18px rgba(168, 168, 174, 0.22);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.q-btn-hero--sm:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.hero-showcase {
  position: relative;
  z-index: 5;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 24px 24px 96px;
  box-sizing: border-box;
}

.hero-showcase-body {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.hero-showcase-tagline {
  margin: 0 auto 20px;
  width: 100%;
  max-width: 820px;
  font-size: clamp(22px, 4.2vw, 48px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  text-align: center;
  color: rgba(255, 255, 255, 0.96);
}

.hero-showcase-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 auto;
}

.home-hero-main .hero-showcase-logo {
  display: block;
  width: auto;
  max-width: min(92vw, 860px);
  height: clamp(56px, 11vw, 118px);
  margin: 0 auto;
  object-fit: contain;
  object-position: center center;
  mix-blend-mode: screen;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.28));
}

.home-hero-main .hero-showcase-title {
  margin: 18px auto 0;
  width: 100%;
  max-width: 920px;
  font-size: clamp(32px, 5.5vw, 64px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
  text-align: center !important;
  color: rgba(255, 255, 255, 0.96);
}

.hero-showcase-brand {
  margin: 18px auto 0;
  font-size: clamp(12px, 1.4vw, 14px);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--qaraj-metallic, #c8c8d0);
  text-align: center;
}

.hero-showcase-lead {
  margin: 22px auto 0;
  max-width: 640px;
  font-size: clamp(14px, 1.7vw, 17px);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.58);
  font-weight: 400;
  text-align: center;
}

.home-hero-main .hero-showcase-lead {
  color: rgba(255, 255, 255, 0.58);
}

.hero-stats-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  padding: 0 24px 28px;
  pointer-events: none;
}

.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px 20px;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-stat-item {
  text-align: center;
  background: none;
  border: none;
  padding: 0;
}

.hero-stat-item strong {
  display: block;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 700;
  color: var(--qaraj-metallic, #c8c8d0);
  margin-bottom: 4px;
  line-height: 1.1;
}

.home-hero-main .hero-stat-item span {
  color: rgba(255, 255, 255, 0.55);
}

.hero-stat-item span {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.35;
  letter-spacing: 0.02em;
}

@media (max-width: 991px) {
  .hero-stats-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .hero-stat-item:nth-child(1) { grid-column: 1 / 3; }
  .hero-stat-item:nth-child(2) { grid-column: 3 / 5; }
  .hero-stat-item:nth-child(3) { grid-column: 5 / 7; }
  .hero-stat-item:nth-child(4) { grid-column: 2 / 4; }
  .hero-stat-item:nth-child(5) { grid-column: 4 / 6; }
}

@media (max-width: 768px) {
  .site-nav--top .site-nav-inner {
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
  }

  .site-nav-logo {
    flex: 0 1 auto;
    min-width: 0;
  }

  .site-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    width: 40px;
    height: 40px;
    padding: 0;
    margin-left: 0;
    flex: 0 0 auto;
    border: 1px solid var(--nav-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--nav-text);
    cursor: pointer;
    flex-shrink: 0;
  }

  .site-nav-toggle-bar {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .site-nav--open .site-nav-toggle-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .site-nav--open .site-nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }

  .site-nav--open .site-nav-toggle-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .site-nav--open .site-nav-inner {
    flex-wrap: wrap;
  }

  .site-nav-links {
    display: none;
    order: 10;
    flex: 1 1 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 4px;
    border-top: 1px solid var(--nav-border);
    margin-top: 4px;
  }

  .site-nav--open .site-nav-links {
    display: flex;
  }

  .site-nav-links a {
    padding: 11px 4px;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .site-nav-links a:last-child {
    border-bottom: none;
  }

  .site-nav-actions {
    margin-left: auto;
    flex: 0 0 auto;
  }

  body.site-nav-menu-open {
    overflow: hidden;
  }

  .site-nav--top {
    top: max(10px, env(safe-area-inset-top, 0px));
    left: 14px;
    right: 14px;
    width: auto;
    max-width: none;
    transform: none;
    padding: 0 12px;
    border-radius: 18px;
  }
  .hero-showcase { padding: 16px 16px 88px; }
  .hero-stats-bar { padding: 0 16px 20px; }
  .hero-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
  }
  .hero-stat-item:nth-child(1),
  .hero-stat-item:nth-child(2),
  .hero-stat-item:nth-child(3),
  .hero-stat-item:nth-child(4),
  .hero-stat-item:nth-child(5) {
    grid-column: auto;
  }
  .hero-stat-item:last-child:nth-child(5) {
    grid-column: 1 / -1;
    max-width: 50%;
    margin: 0 auto;
  }
}

@media (min-width: 769px) {
  .site-nav-toggle {
    display: none;
  }
}
