/* ══════════════════════════════════════════════════════════════
   AISHAN TECHNOLOGIES — MAIN THEME
   Global shell, tokens, shared components.
   Page-specific styles live in assets/css/pages/*.css
   ══════════════════════════════════════════════════════════════ */

/* ─── 1. DESIGN TOKENS ───────────────────────────────────────── */
:root {
  /* Surfaces */
  --a-bg:           #0D1117;
  --a-bg-elevated:  #161B22;
  --a-bg-2:         #1C2229;
  --a-border:       #262C36;
  --a-border-2:     #353C48;

  /* Nav */
  --a-nav-bg:       #080B10;
  --a-nav-border:   #1A1F28;

  /* Brand red */
  --a-red:          #DC2626;
  --a-red-hov:      #EF4444;
  --a-red-dim:      #991B1B;
  --a-red-glow:     rgba(220, 38, 38, 0.35);
  --a-red-soft:     rgba(220, 38, 38, 0.12);

  /* Cyan accent */
  --a-cyan:         #22D3EE;
  --a-cyan-soft:    rgba(34, 211, 238, 0.12);

  /* Text */
  --a-text:         #F0F4F8;
  --a-text-muted:   #8B95A5;
  --a-text-dim:     #5A6472;
  --a-text-on-red:  #FFFFFF;

  /* Semantic */
  --a-success:      #10B981;
  --a-warning:      #F59E0B;

  /* Rhythm */
  --a-radius:       12px;
  --a-radius-lg:    20px;
  --a-radius-sm:    8px;
  --a-section-y:    6rem;
  --a-section-y-sm: 3.5rem;
  --a-transition:   200ms cubic-bezier(.4, 0, .2, 1);

  /* BS5 base overrides */
  --bs-body-bg:          var(--a-bg);
  --bs-body-color:       var(--a-text);
  --bs-border-color:     var(--a-border);
  --bs-link-color:       var(--a-red-hov);
  --bs-link-hover-color: var(--a-red);
  --bs-font-sans-serif:  'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ─── 2. BASE ────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--a-bg);
  color: var(--a-text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--a-text);
}

a {
  color: var(--a-red-hov);
  text-decoration: none;
  transition: color var(--a-transition);
}
a:hover { color: var(--a-red); }

::selection { background: var(--a-red); color: #fff; }

/* ─── 3. UTILITY BAR — RED BRAND STRIP ───────────────────────── */
.utility-bar {
  background: linear-gradient(90deg, var(--a-red) 0%, var(--a-red-dim) 100%);
  border-bottom: none;
  font-size: 0.85rem;
  padding: 0.55rem 0;
}
.utility-link, .utility-text {
  color: rgba(255, 255, 255, 0.92) !important;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
}
.utility-link:hover { color: #fff !important; }
.utility-link i, .utility-text i {
  color: rgba(255, 255, 255, 0.85);
  margin-right: 0.4rem;
}

/* General social button */
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--a-bg-2);
  color: var(--a-text-muted);
  transition: all var(--a-transition);
  font-size: 0.85rem;
}
.social-link:hover {
  background: var(--a-red);
  color: #fff;
  transform: translateY(-2px);
}

.utility-bar .social-link {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.utility-bar .social-link:hover {
  background: #fff;
  color: var(--a-red);
  transform: translateY(-2px);
}

/* ─── 4. NAV ─────────────────────────────────────────────────── */
.site-nav {
  background: var(--a-nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--a-nav-border);
  padding: 0.85rem 0;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--a-text) !important;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--a-radius-sm);
  background: linear-gradient(135deg, var(--a-red-hov), var(--a-red));
  color: #fff;
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: -0.05em;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.4), 0 8px 20px rgba(220, 38, 38, 0.25);
}
.brand-text { color: var(--a-text); }
.brand-text .text-muted { color: var(--a-text-muted) !important; font-weight: 500; }

.site-nav .nav-link {
  color: var(--a-text-muted);
  font-weight: 500;
  padding: 0.5rem 0.9rem !important;
  transition: color var(--a-transition);
  font-size: 0.95rem;
}
.site-nav .nav-link:hover,
.site-nav .nav-link.active { color: var(--a-text); }
.site-nav .nav-link.active { position: relative; }
.site-nav .nav-link.active::after {
  content: '';
  position: absolute;
  left: 0.9rem; right: 0.9rem; bottom: 0;
  height: 2px; background: var(--a-red);
  border-radius: 2px;
}
.site-nav .dropdown-menu {
  background: var(--a-bg-elevated);
  border: 1px solid var(--a-border);
  border-radius: var(--a-radius-sm);
  padding: 0.5rem;
  margin-top: 0.5rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}
.site-nav .dropdown-item {
  color: var(--a-text-muted);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}
.site-nav .dropdown-item:hover {
  background: var(--a-bg-2);
  color: var(--a-red-hov);
}

.btn-consult { font-size: 0.9rem; padding: 0.55rem 1.1rem; }

/* ─── 5. BUTTONS ─────────────────────────────────────────────── */
.btn {
  font-weight: 600;
  border-radius: var(--a-radius-sm);
  padding: 0.65rem 1.4rem;
  transition: all var(--a-transition);
  letter-spacing: 0.01em;
  border-width: 1.5px;
  border-style: solid;
}

.btn-primary,
.btn.btn-primary {
  background-color: var(--a-red) !important;
  border-color: var(--a-red) !important;
  color: #fff !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:not(:disabled):not(.disabled):active,
.btn.btn-primary:hover {
  background-color: var(--a-red-hov) !important;
  border-color: var(--a-red-hov) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--a-red-glow);
}

.btn-outline-primary {
  background-color: transparent !important;
  border-color: var(--a-red) !important;
  color: var(--a-red-hov) !important;
}
.btn-outline-primary:hover {
  background-color: var(--a-red) !important;
  border-color: var(--a-red) !important;
  color: #fff !important;
}

.btn-ghost {
  background-color: transparent;
  border-color: var(--a-border-2);
  color: var(--a-text);
}
.btn-ghost:hover {
  background-color: var(--a-bg-2);
  border-color: var(--a-red);
  color: var(--a-text);
}

.btn-outline-light {
  background-color: transparent;
  border-color: var(--a-border-2);
  color: var(--a-text);
}
.btn-outline-light:hover {
  background-color: var(--a-red);
  border-color: var(--a-red);
  color: #fff;
}

.btn-lg { padding: 0.85rem 1.75rem; font-size: 1rem; }

/* ─── 6. SHARED SECTION PRIMITIVES ───────────────────────────── */
.section { padding: var(--a-section-y) 0; }
.section-head { margin-bottom: 3rem; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--a-red-hov);
  margin-bottom: 0.75rem;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--a-red);
  vertical-align: middle;
  margin-right: 0.6rem;
  transform: translateY(-2px);
}
.section-heading {
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.section-subhead {
  color: var(--a-text-muted);
  font-size: 1.05rem;
  max-width: 44rem;
  margin: 0.75rem auto 0;
}
.section-body {
  font-size: 1.05rem;
  color: var(--a-text-muted);
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .section { padding: var(--a-section-y-sm) 0; }
}

/* ─── 7. CHECK LIST ──────────────────────────────────────────── */
.check-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.check-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.5rem 0;
  color: var(--a-text-muted);
  font-size: 0.98rem;
}
.check-list i {
  color: var(--a-red);
  font-size: 1.05rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

/* ─── 8. STAT CARDS ──────────────────────────────────────────── */
.stats-section {
  background: var(--a-bg-elevated);
  border-top: 1px solid var(--a-border);
  border-bottom: 1px solid var(--a-border);
}
.stat-card {
  text-align: center;
  padding: 1.75rem 1rem;
  border-radius: var(--a-radius);
  background: var(--a-bg);
  border: 1px solid var(--a-border);
  height: 100%;
  transition: all var(--a-transition);
}
.stat-card:hover {
  border-color: var(--a-red);
  transform: translateY(-3px);
}
.stat-value {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--a-red-hov);
  font-family: 'JetBrains Mono', monospace;
  line-height: 1;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
}
.stat-label {
  color: var(--a-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ─── 9. CTA BAND ────────────────────────────────────────────── */
.cta-band {
  padding: 4.5rem 0;
  background: linear-gradient(135deg, var(--a-red) 0%, var(--a-red-dim) 100%);
  position: relative;
  overflow: hidden;
}
.cta-band::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.cta-band .container { position: relative; z-index: 1; }
.cta-heading {
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: #fff;
}
.cta-body {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  margin: 0;
  max-width: 40rem;
}
.cta-band .btn-primary {
  background-color: #fff !important;
  border-color: #fff !important;
  color: var(--a-red) !important;
}
.cta-band .btn-primary:hover {
  background-color: var(--a-bg) !important;
  border-color: var(--a-bg) !important;
  color: #fff !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ─── 10. FOOTER ─────────────────────────────────────────────── */
.site-footer {
  background: #05080D;
  border-top: 3px solid var(--a-red);
  padding: 4rem 0 2rem;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--a-text);
  font-weight: 800;
  font-size: 1.1rem;
}
.footer-tagline {
  color: var(--a-text-muted);
  font-size: 0.92rem;
  max-width: 26rem;
  margin-bottom: 1.25rem;
}
.footer-social {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.footer-heading {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--a-red-hov);
  margin-bottom: 1rem;
}
.footer-links, .footer-contact {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li, .footer-contact li {
  margin-bottom: 0.6rem;
  font-size: 0.92rem;
  color: var(--a-text-muted);
}
.footer-links a, .footer-contact a {
  color: var(--a-text-muted);
  transition: color var(--a-transition);
}
.footer-links a:hover, .footer-contact a:hover { color: var(--a-red-hov); }
.footer-contact i {
  color: var(--a-red);
  width: 1.25rem;
  margin-right: 0.5rem;
  display: inline-block;
}
.footer-divider {
  border-color: var(--a-border);
  margin: 2.5rem 0 1.5rem;
  opacity: 1;
}
.footer-legal {
  font-size: 0.85rem;
  color: var(--a-text-dim);
}
.footer-legal a { color: var(--a-text-dim); }
.footer-legal a:hover { color: var(--a-red-hov); }

.footer-credit {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #1A1F28;
  text-align: center;
  font-size: 0.82rem;
  color: #5A6472;
  letter-spacing: 0.02em;
}

/* ─── 11. PAGE HERO (inner pages) ────────────────────────────── */
.page-hero {
  position: relative;
  padding: 4rem 0 3.5rem;
  background: var(--a-bg);
  overflow: hidden;
  border-bottom: 1px solid var(--a-border);
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(120deg, rgba(13, 17, 23, 0.94) 0%, rgba(13, 17, 23, 0.85) 60%, rgba(153, 27, 27, 0.25) 100%),
    url('https://picsum.photos/seed/aishan-page-bg/1920/600');
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.page-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(220, 38, 38, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220, 38, 38, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at 30% 50%, black, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 50%, black, transparent 75%);
}
.page-hero-inner { position: relative; z-index: 1; }

.page-breadcrumb { margin-bottom: 1.25rem; }
.page-breadcrumb .breadcrumb {
  background: transparent;
  padding: 0;
  margin: 0;
  font-size: 0.85rem;
}
.page-breadcrumb .breadcrumb-item a {
  color: var(--a-text-muted);
  text-decoration: none;
}
.page-breadcrumb .breadcrumb-item a:hover { color: var(--a-red-hov); }
.page-breadcrumb .breadcrumb-item.active { color: var(--a-red-hov); }
.page-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  content: '/';
  color: var(--a-text-dim);
}

.page-hero-headline {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0.75rem 0 1rem;
}
.page-hero-subhead {
  font-size: 1.1rem;
  color: var(--a-text-muted);
  max-width: 42rem;
  margin: 0;
}

/* ─── 12. REVEAL ANIMATION ───────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ─── 13. BS UTILITY OVERRIDES ───────────────────────────────── */
.text-primary { color: var(--a-red-hov) !important; }
.text-muted   { color: var(--a-text-muted) !important; }
.bg-primary   { background-color: var(--a-red) !important; }
.border-primary { border-color: var(--a-red) !important; }

/* ─── 14. SKIP LINK ──────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #DC2626;
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 9999;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 8px 0;
  transition: left 200ms ease;
}
.skip-link:focus {
  left: 0;
  color: #fff;
  outline: 2px solid #fff;
  outline-offset: -4px;
}

/* ─── 15. BACK TO TOP ────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #DC2626;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 250ms cubic-bezier(.4, 0, .2, 1);
  z-index: 900;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: #EF4444;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(220, 38, 38, 0.5);
}

/* ─── 16. RESPONSIVE (SHELL ONLY) ────────────────────────────── */
@media (max-width: 991.98px) {
  .site-nav .navbar-collapse {
    background: var(--a-bg-elevated);
    border: 1px solid var(--a-border);
    border-radius: var(--a-radius);
    padding: 1rem;
    margin-top: 0.75rem;
  }
  .site-nav .nav-link.active::after { display: none; }
  .site-nav .nav-link.active { color: var(--a-red-hov); }
  .btn-consult { width: 100%; display: block; text-align: center; margin-top: 0.5rem; }
}

@media (max-width: 575.98px) {
  .utility-bar { font-size: 0.78rem; }
  .back-to-top {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 42px;
    height: 42px;
  }
}