/**
 * BizCon Advisory - Master Multi-Device Responsive Stylesheet
 * Optimized for Mobile (320px+), Tablets, Foldables, Laptops, Desktops & 4K Displays
 */

:root {
  --navy-950: #0a1322;
  --navy-900: #10233F;
  --navy-800: #162C4E;
  --navy-700: #1F3864;
  --gold-500: #B08D57;
  --gold-400: #C5A065;
  --gold-300: #D9C29A;
  --gold-100: #FDF8F0;
  --accent-orange: #FF5722;
  --accent-orange-glow: rgba(255, 87, 34, 0.35);
  --paper: #F6F4EF;
  --paper-card: #FFFFFF;
  --ink: #1B1F27;
  --ink-soft: #4B5160;
  --ink-muted: #848D9E;
  --line: #E4DFD3;
  --line-dark: rgba(255, 255, 255, 0.14);
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 8px rgba(16, 35, 63, 0.06);
  --shadow-md: 0 12px 32px rgba(16, 35, 63, 0.12);
  --shadow-lg: 0 20px 48px rgba(16, 35, 63, 0.18);
  --header-height: 72px;
}

/* ================= RESET & RESILIENCE ================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: clamp(15px, 1.1vw, 16.5px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

body.nav-open {
  overflow: hidden !important;
  touch-action: none;
}

img, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-optical-sizing: auto;
  font-weight: 600;
  color: var(--navy-900);
  letter-spacing: -0.015em;
  line-height: 1.2;
}

h1 { font-size: clamp(30px, 5.2vw, 54px); }
h2 { font-size: clamp(24px, 3.8vw, 38px); }
h3 { font-size: clamp(19px, 2.4vw, 26px); }
h4 { font-size: clamp(16px, 1.8vw, 20px); }

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

button {
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 3px;
}

/* ================= CONTAINERS & TYPOGRAPHY ================= */
.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
}

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(11px, 1.2vw, 12.5px);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-500);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.eyebrow::before {
  content: "";
  width: 20px;
  height: 2px;
  background: var(--gold-500);
  display: inline-block;
}

.lede {
  font-size: clamp(16px, 1.8vw, 19.5px);
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 68ch;
}

/* ================= BUTTONS & CTAS ================= */
.btn-primary, .nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--navy-900);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 14.5px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--navy-900);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(16, 35, 63, 0.15);
  min-height: 46px;
  white-space: nowrap;
}

.btn-primary:hover, .nav-cta:hover {
  background: var(--navy-700);
  border-color: var(--navy-700);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 35, 63, 0.25);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: var(--navy-900);
  font-weight: 600;
  font-size: 14.5px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--navy-900);
  transition: all 0.22s ease;
  min-height: 46px;
  white-space: nowrap;
}

.btn-ghost:hover {
  background: rgba(16, 35, 63, 0.06);
  transform: translateY(-2px);
}

.btn-ghost-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: #ffffff;
  font-weight: 600;
  font-size: 14.5px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  transition: all 0.22s ease;
  min-height: 46px;
  white-space: nowrap;
}

.btn-ghost-dark:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* ================= HEADER & NAV ================= */
header.site-header, header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 244, 239, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: all 0.3s ease;
}

nav.main-nav, header nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-height);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-badge {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--navy-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(16, 35, 63, 0.2);
}

.brand-badge svg {
  width: 22px;
  height: 22px;
}

.brand-name {
  font-family: 'Source Serif 4', serif;
  font-weight: 700;
  font-size: clamp(17px, 2vw, 19px);
  color: var(--navy-900);
  white-space: nowrap;
  letter-spacing: -0.02em;
}

/* Desktop Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.8vw, 24px);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  flex-shrink: 0;
}

.nav-links a {
  transition: color 0.2s ease;
  white-space: nowrap;
  padding: 6px 2px;
  position: relative;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--navy-900);
  font-weight: 600;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gold-500);
  border-radius: 2px;
}

/* Right Nav Controls */
.nav-right-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

/* Search Component */
.nav-search {
  position: relative;
}

.search-toggle {
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-soft);
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  background: var(--paper-card);
}

.search-toggle:hover {
  color: var(--navy-900);
  border-color: var(--navy-700);
}

.search-box {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 380px;
  max-width: 90vw;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 16px;
  z-index: 120;
}

.search-box.open {
  display: block;
  animation: fadeInDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-box input {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--navy-900);
  outline: none;
  transition: border-color 0.2s;
}

.search-box input:focus {
  border-color: var(--gold-500);
}

.search-results {
  max-height: 280px;
  overflow-y: auto;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.search-item {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  transition: background 0.15s;
}

.search-item:hover {
  background: var(--paper);
}

.search-item strong {
  display: block;
  font-size: 13.5px;
  color: var(--navy-900);
}

.search-item span {
  font-size: 11.5px;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--gold-500);
  text-transform: uppercase;
}

/* Mobile Hamburger Button */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  gap: 5px;
  padding: 0;
  z-index: 110;
  transition: all 0.2s ease;
}

.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy-900);
  border-radius: 2px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-menu-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer Overlay */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 19, 34, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 105;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(88vw, 360px);
  height: 100%;
  height: 100dvh;
  background: #0f1c33;
  color: #ffffff;
  z-index: 110;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
  padding: 24px 24px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-drawer.open {
  transform: translateX(0);
}

.mobile-drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 20px;
}

.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  border-radius: 8px;
  font-size: 15.5px;
  font-weight: 500;
  color: #E2E8F0;
  transition: all 0.2s ease;
}

.mobile-nav-link:hover, .mobile-nav-link.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 600;
}

.mobile-nav-link span.arrow {
  color: var(--gold-500);
  font-size: 18px;
}

.mobile-drawer-footer {
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mobile-drawer-footer .nav-cta {
  width: 100%;
  background: linear-gradient(145deg, #ff5722, #f4511e);
  border-color: #ff5722;
  box-shadow: 0 4px 20px rgba(255, 87, 34, 0.35);
}

.mobile-drawer-contact {
  font-size: 12.5px;
  color: #94a3b8;
  text-align: center;
}

.mobile-drawer-contact a {
  color: var(--gold-300);
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  margin-top: 2px;
}

/* ================= HERO SECTION (MULTI-DEVICE) ================= */
.hero {
  padding: clamp(36px, 7vw, 90px) 0 clamp(48px, 8vw, 110px);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: clamp(24px, 4vw, 36px);
  flex-wrap: wrap;
}

.hero-figure {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-figure svg {
  width: 100%;
  max-width: 380px;
  height: auto;
  aspect-ratio: 400 / 340;
}

/* ================= PAGE HERO (SUBPAGES) ================= */
.page-hero {
  background: var(--navy-900);
  color: #ffffff;
  padding: clamp(40px, 6vw, 76px) 0;
  position: relative;
  border-bottom: 2px solid var(--gold-500);
}

.page-hero h1 {
  color: #ffffff;
  margin-bottom: 16px;
}

.page-hero .lede {
  color: #cbd5e1;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--gold-300);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.breadcrumbs a {
  color: #94a3b8;
  transition: color 0.2s;
}

.breadcrumbs a:hover {
  color: #ffffff;
}

/* ================= SECTIONS & GRIDS ================= */
.section-pad {
  padding: clamp(48px, 8vw, 100px) 0;
}

.section-dark {
  background: var(--navy-950);
  color: #ffffff;
}

.section-dark h2, .section-dark h3 {
  color: #ffffff;
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(32px, 5vw, 60px);
}

.section-head p {
  color: var(--ink-soft);
  font-size: clamp(15.5px, 1.4vw, 18px);
  margin-top: 12px;
}

.section-dark .section-head p {
  color: #94a3b8;
}

/* Responsive Fluid Grid Layouts */
.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(20px, 3vw, 32px);
}

.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(20px, 3vw, 32px);
}

.card-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: clamp(16px, 2.5vw, 24px);
}

/* ================= FEATURE CARDS ================= */
.feature-card-dark {
  background: #111e33;
  border: 1.5px solid var(--gold-500);
  border-radius: var(--radius);
  padding: clamp(24px, 3.5vw, 36px) clamp(20px, 3vw, 30px);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  text-decoration: none;
}

.feature-card-dark:hover {
  background: #162c4e;
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  border-color: var(--gold-300);
}

.feature-card-dark .card-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  color: var(--gold-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.feature-card-dark h3 {
  color: #ffffff;
  margin-bottom: 10px;
}

.feature-card-dark p {
  color: #cbd5e1;
  font-size: 14.5px;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.feature-card-dark .card-action {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  color: var(--gold-300);
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  transition: color 0.2s;
}

.feature-card-dark:hover .card-action {
  color: #ffffff;
}

/* Feature Card Light */
.feature-card-light {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 3.5vw, 36px) clamp(20px, 3vw, 30px);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-card-light:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold-500);
}

.feature-card-light .card-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--gold-500);
  font-weight: 600;
  margin-bottom: 12px;
}

.feature-card-light h3 {
  margin-bottom: 10px;
}

.feature-card-light p {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.6;
}

/* ================= CTA BANNER ================= */
.cta-banner {
  background: var(--navy-900);
  color: #ffffff;
  border-radius: var(--radius);
  padding: clamp(36px, 6vw, 64px) clamp(20px, 4vw, 48px);
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1.5px solid var(--gold-500);
  margin: clamp(40px, 6vw, 70px) 0;
}

.cta-banner h2 {
  color: #ffffff;
  margin-bottom: 14px;
}

.cta-banner p {
  color: #cbd5e1;
  font-size: clamp(15.5px, 1.6vw, 18px);
  max-width: 58ch;
  margin: 0 auto clamp(20px, 3vw, 32px);
}

.cta-banner-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ================= FOOTER ================= */
footer.site-footer, footer {
  background: #ffffff;
  border-top: 1px solid var(--line);
  padding: clamp(48px, 6vw, 72px) 0 clamp(24px, 4vw, 40px);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: clamp(24px, 4vw, 48px);
  flex-wrap: wrap;
  padding-bottom: clamp(32px, 5vw, 48px);
  border-bottom: 1px solid var(--line);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.footer-tag {
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.5;
  max-width: 34ch;
}

.footer-links {
  display: flex;
  gap: clamp(16px, 2.5vw, 32px);
  font-size: 13.5px;
  font-weight: 500;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--ink-soft);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--navy-900);
}

.footer-bottom {
  padding-top: clamp(20px, 3vw, 32px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink-muted);
  font-size: 12.5px;
  flex-wrap: wrap;
  gap: 14px;
}

/* ================= ANIMATIONS ================= */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================= RESPONSIVE MEDIA QUERIES ================= */
@media (max-width: 992px) {
  .nav-links { display: none !important; }
  .mobile-menu-toggle { display: flex; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-ctas { justify-content: center; }
  .hero-figure { order: -1; margin-bottom: 16px; }
  .hero-figure svg { max-width: 280px; }
  .footer-top { flex-direction: column; }
}

@media (max-width: 640px) {
  .wrap { padding-left: 18px; padding-right: 18px; }
  nav.main-nav { padding: 12px 18px; }
  .hero-ctas .btn-primary, .hero-ctas .btn-ghost, .hero-ctas a {
    width: 100%;
    justify-content: center;
  }
  .search-box {
    position: fixed;
    top: var(--header-height);
    left: 16px;
    right: 16px;
    width: auto;
    max-width: none;
  }
  .footer-links {
    flex-direction: column;
    gap: 12px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
