*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-300: #93c5fd;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --blue-900: #1e3a8a;
  --sky-400: #38bdf8;
  --sky-500: #0ea5e9;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-700: #334155;
  --gray-900: #0f172a;
  --font-head: "Sora", sans-serif;
  --font-body: "DM Sans", sans-serif;
  --nav-h: 68px;
  --r: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-2xl: 28px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.1);
  --shadow-blue: 0 6px 24px rgba(37, 99, 235, 0.2);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--gray-50);
  color: var(--gray-900);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--blue-300);
  border-radius: 2px;
}

/* ─── HERO BANNER ─── */
.page-hero {
  background: linear-gradient(150deg, var(--blue-700) 0%, var(--blue-900) 100%);
  padding: calc(var(--nav-h) + 40px) 24px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 52px 52px;
}

.page-hero::after {
  content: "";
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.07) 0%,
    transparent 65%
  );
}

.hero-inner-wrap {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-head);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--sky-400);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 18px;
}

.hero-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sky-400);
}

.page-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -1.2px;
  line-height: 1.15;
  margin-bottom: 12px;
}

.page-hero p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.65);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.75;
}

/* ─── MAIN LAYOUT ─── */
.main-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
}

/* ─── SIDEBAR ─── */
.sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}

.sidebar-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.sidebar-head {
  background: var(--blue-600);
  padding: 16px 18px;
}

.sidebar-head-title {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 18px;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s;
  border-bottom: 1px solid var(--gray-100);
  position: relative;
}

.tab-btn:last-child {
  border-bottom: none;
}

.tab-btn .tab-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--r);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  transition: all 0.18s;
}

.tab-btn .tab-icon i {
  width: 16px;
  height: 16px;
  color: var(--gray-400);
  transition: color 0.18s;
}

.tab-btn .tab-label {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
  transition: color 0.18s;
}

.tab-btn .tab-sub {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 1px;
  transition: color 0.18s;
}

.tab-btn .tab-arrow {
  margin-left: auto;
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.18s;
}

.tab-btn .tab-arrow i {
  width: 14px;
  height: 14px;
  color: var(--blue-500);
}

.tab-btn:hover {
  background: var(--blue-50);
}

.tab-btn:hover .tab-label {
  color: var(--blue-700);
}

.tab-btn:hover .tab-icon {
  background: var(--blue-100);
}

.tab-btn:hover .tab-icon i {
  color: var(--blue-600);
}

.tab-btn.active {
  background: var(--blue-50);
}

.tab-btn.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--blue-600);
  border-radius: 0 2px 2px 0;
}

.tab-btn.active .tab-label {
  color: var(--blue-700);
  font-weight: 700;
}

.tab-btn.active .tab-icon {
  background: var(--blue-100);
}

.tab-btn.active .tab-icon i {
  color: var(--blue-600);
}

.tab-btn.active .tab-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Last updated badge */
.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
}

.sidebar-footer-txt {
  font-size: 11px;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-footer-txt i {
  width: 12px;
  height: 12px;
  color: var(--gray-300);
}

/* ─── CONTENT PANEL ─── */
.content-panel {
  min-width: 0;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.35s ease;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Content card */
.content-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--r-2xl);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* Content header */
.content-hdr {
  padding: 28px 32px 24px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.content-hdr-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.content-hdr-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  flex-shrink: 0;
  background: var(--blue-50);
  border: 1.5px solid var(--blue-100);
  display: flex;
  align-items: center;
  justify-content: center;
}

.content-hdr-icon i {
  width: 24px;
  height: 24px;
  color: var(--blue-600);
}

.content-hdr-title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.5px;
}

.content-hdr-sub {
  font-size: 13px;
  color: var(--gray-400);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.content-hdr-sub i {
  width: 12px;
  height: 12px;
}

.updated-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  color: var(--blue-700);
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  padding: 5px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

.updated-badge i {
  width: 11px;
  height: 11px;
}

/* Content body */
.content-body {
  padding: 32px;
}

/* Section blocks */
.doc-section {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--gray-100);
}

.doc-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.doc-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.section-num {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
  background: var(--blue-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.2px;
}

.section-title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
}

.doc-p {
  font-size: 14.5px;
  color: var(--gray-500);
  line-height: 1.82;
  margin-bottom: 14px;
}

.doc-p:last-child {
  margin-bottom: 0;
}

.doc-p strong {
  color: var(--gray-700);
  font-weight: 600;
}

.doc-p a {
  color: var(--blue-600);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.doc-p a:hover {
  color: var(--blue-700);
}

.doc-ul {
  margin: 12px 0 14px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.doc-ul li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--gray-500);
  line-height: 1.72;
}

.doc-ul li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-400);
  flex-shrink: 0;
  margin-top: 8px;
}

.doc-ul li strong {
  color: var(--gray-700);
  font-weight: 600;
}

.doc-subsection {
  margin: 18px 0;
}

.doc-subsection-title {
  font-family: var(--font-head);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.doc-subsection-title::before {
  content: "";
  width: 3px;
  height: 16px;
  border-radius: 2px;
  background: var(--blue-400);
  flex-shrink: 0;
}

/* Highlight box */
.highlight-box {
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  margin: 14px 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.highlight-box i {
  width: 18px;
  height: 18px;
  color: var(--blue-500);
  flex-shrink: 0;
  margin-top: 1px;
}

.highlight-box-text {
  font-size: 13.5px;
  color: var(--blue-800);
  line-height: 1.7;
}

.highlight-box-text strong {
  font-weight: 700;
}

/* Warning box */
.warning-box {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--r-lg);
  padding: 16px 18px;
  margin: 14px 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.warning-box i {
  width: 18px;
  height: 18px;
  color: #ea580c;
  flex-shrink: 0;
  margin-top: 1px;
}

.warning-box-text {
  font-size: 13.5px;
  color: #9a3412;
  line-height: 1.7;
}

.warning-box-text strong {
  font-weight: 700;
}

/* ─── MOBILE TAB SELECTOR ─── */
.mobile-tab-select {
  display: none;
  margin-bottom: 20px;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.mobile-tab-select select {
  width: 100%;
  padding: 14px 16px;
  border: none;
  outline: none;
  background: none;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
  cursor: pointer;
}

/* ── ANIMATIONS ── */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.stagger > * {
  transition-delay: calc(var(--i) * 80ms);
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stack-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .hero-visual {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  #header {
    padding: 0 20px;
  }

  nav ul {
    display: none;
  }

  nav ul.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    padding: 16px;
    border-bottom: 1px solid #dde6f5;
    box-shadow: 0 8px 24px rgba(10, 50, 120, 0.08);
  }

  .mobile-toggle {
    display: flex;
  }

  #hero {
    padding: 100px 20px 60px;
  }

  .container {
    padding: 0 20px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .stack-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 20px;
  }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .main-wrap {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: none;
  }

  .mobile-tab-select {
    display: block;
  }

  .foot-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  nav.desktop {
    display: none;
  }

  .btn-mob {
    display: flex;
  }
}

@media (max-width: 620px) {
  .content-hdr {
    padding: 20px;
  }

  .content-body {
    padding: 20px;
  }

  .foot-grid {
    grid-template-columns: 1fr;
  }

  .content-hdr-title {
    font-size: 18px;
  }
}
