/* =========================================================
   global.css – CSS Variables, Reset, Base Typography
   ========================================================= */

/* ── Design Tokens ── */
:root {
  /* Brand — Logo palette (navy + orange) */
  --sb-primary: #1f266f; /* Navy — links, nav, structure */
  --sb-primary-dark: #141a52; /* Deeper navy — hover/active states */
  --sb-primary-light: #eef1ff; /* Soft navy tint backgrounds */
  --sb-primary-mid: #4e5aa5; /* Mid navy for borders/dividers */

  --sb-secondary: #f26f21; /* Orange — CTAs & highlights */
  --sb-secondary-dark: #d85b12; /* Deeper orange hover tone */
  --sb-secondary-light: #fff3ea; /* Light orange tint */

  --sb-cream: #fff8f3; /* Warm off-white base */

  /* Focus / glass (RGB #1F266F, #F26F21) */
  --sb-primary-ring: rgba(31, 38, 111, 0.24);
  --sb-secondary-soft: rgba(242, 111, 33, 0.16);
  --sb-secondary-border: rgba(242, 111, 33, 0.4);

  --sb-accent-purple: #1f266f;
  --sb-accent-teal: #2f3a86;
  --sb-accent-pink: #f59a61;
  --sb-accent-orange: #f26f21;
  --sb-accent-green: #f26f21;

  /* Neutrals — navy adapted */
  --sb-dark: #161d5c; /* Headings */
  --sb-dark-2: #253074; /* Body text */
  --sb-dark-3: #47549a; /* Tertiary */
  --sb-muted: #5f6ba8;
  --sb-muted-light: #8792c2;
  --sb-border: #dbe0f5;
  --sb-light: #f3f5ff;
  --sb-lighter: #f8f9ff; /* Page canvas */
  --sb-white: #ffffff; /* Cards & forms */

  /* Aliases (used by course / cart / auth partials) */
  --sb-heading: var(--sb-dark);
  --sb-bg-light: var(--sb-light);

  /* Typography */
  --sb-font: "Open Sans", sans-serif;
  --sb-fw-light: 300;
  --sb-fw-regular: 400;
  --sb-fw-medium: 500;
  --sb-fw-semibold: 600;
  --sb-fw-bold: 700;
  --sb-fw-extrabold: 800;

  --sb-text-xs: 0.75rem; /* 12px */
  --sb-text-sm: 0.875rem; /* 14px */
  --sb-text-base: 1rem; /* 16px */
  --sb-text-lg: 1.125rem; /* 18px */
  --sb-text-xl: 1.25rem; /* 20px */
  --sb-text-2xl: 1.5rem; /* 24px */
  --sb-text-3xl: 1.875rem; /* 30px */
  --sb-text-4xl: 2.25rem; /* 36px */
  --sb-text-5xl: 3rem; /* 48px */

  /* Spacing */
  --sb-space-1: 0.25rem;
  --sb-space-2: 0.5rem;
  --sb-space-3: 0.75rem;
  --sb-space-4: 1rem;
  --sb-space-5: 1.25rem;
  --sb-space-6: 1.5rem;
  --sb-space-8: 2rem;
  --sb-space-10: 2.5rem;
  --sb-space-12: 3rem;
  --sb-space-16: 4rem;
  --sb-space-20: 5rem;
  --sb-space-24: 6rem;

  /* Radii */
  --sb-radius-sm: 6px;
  --sb-radius: 12px;
  --sb-radius-lg: 18px;
  --sb-radius-xl: 24px;
  --sb-radius-full: 9999px;

  /* Shadows */
  --sb-shadow-sm:
    0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.06);
  --sb-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
  --sb-shadow-md:
    0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.06);
  --sb-shadow-lg:
    0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.06);
  --sb-shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.2);

  /* Transitions */
  --sb-transition: all 0.25s ease;
  --sb-transition-fast: all 0.15s ease;
  --sb-transition-slow: all 0.4s ease;

  /* Layout */
  --sb-container-max: 1280px;
  --sb-container-pad: clamp(1rem, 4vw, 2rem);

  /* Navbar height (used for offset calculations) */
  --sb-top-banner-h: 44px;
  --sb-navbar-h: 70px;
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--sb-font);
  font-size: var(--sb-text-base);
  font-weight: var(--sb-fw-regular);
  line-height: 1.65;
  color: var(--sb-dark-2);
  background: var(--sb-lighter);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  border: none !important; /* override parent theme test style */
  overflow-x: hidden;
}

a {
  color: var(--sb-primary);
  text-decoration: none;
  transition: var(--sb-transition-fast);
}
a:hover {
  color: var(--sb-primary-dark);
}

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

ul,
ol {
  list-style: none;
}

button {
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--sb-font);
  font-weight: var(--sb-fw-bold);
  line-height: 1.25;
  color: var(--sb-dark);
}

/* ── Layout Utility ── */
.sb-container {
  width: 100%;
  max-width: var(--sb-container-max);
  margin: 0 auto;
  padding: 0 var(--sb-container-pad);
}

/* ── Section Shared Styles ── */
.sb-section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--sb-space-12);
}

.sb-section-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sb-space-2);
  background: var(--sb-primary-light);
  color: var(--sb-primary);
  font-size: var(--sb-text-xs);
  font-weight: var(--sb-fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: var(--sb-space-1) var(--sb-space-3);
  border-radius: var(--sb-radius-full);
  margin-bottom: var(--sb-space-4);
}

.sb-section-title {
  font-size: clamp(var(--sb-text-2xl), 3.5vw, var(--sb-text-4xl));
  font-weight: var(--sb-fw-extrabold);
  color: var(--sb-dark);
  margin-bottom: var(--sb-space-4);
  line-height: 1.2;
}

.sb-section-subtitle {
  font-size: var(--sb-text-lg);
  color: var(--sb-muted);
  line-height: 1.7;
}

.sb-highlight {
  color: var(--sb-secondary);
  position: relative;
}

/* ── Button System ── */
.sb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sb-space-2);
  padding: 0.75rem 1.5rem;
  border-radius: var(--sb-radius-sm);
  font-family: var(--sb-font);
  font-size: var(--sb-text-sm);
  font-weight: var(--sb-fw-semibold);
  line-height: 1;
  text-decoration: none;
  transition: var(--sb-transition);
  white-space: nowrap;
  cursor: pointer;
  border: 2px solid transparent;
}

.sb-btn--primary {
  background: var(--sb-secondary);
  color: var(--sb-cream);
  border-color: var(--sb-secondary);
}
.sb-btn--primary:hover {
  background: var(--sb-secondary-dark);
  border-color: var(--sb-secondary-dark);
  color: var(--sb-cream);
  transform: translateY(-1px);
  box-shadow: var(--sb-shadow-md);
}

.sb-btn--outline {
  background: transparent;
  color: var(--sb-primary);
  border-color: var(--sb-primary);
}
.sb-btn--outline:hover {
  background: var(--sb-primary);
  color: var(--sb-cream);
}

.sb-btn--outline-white {
  background: transparent;
  color: var(--sb-white);
  border-color: rgba(255, 255, 255, 0.6);
}
.sb-btn--outline-white:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--sb-white);
  color: var(--sb-white);
}

.sb-btn--ghost {
  background: transparent;
  color: var(--sb-primary);
  border-color: var(--sb-border);
}
.sb-btn--ghost:hover {
  background: var(--sb-primary-light);
  border-color: var(--sb-primary);
}

.sb-btn--full {
  width: 100%;
}

/* ── Icon Sizes ── */
.sb-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.sb-icon--xs {
  width: 14px;
  height: 14px;
}
.sb-icon--sm {
  width: 16px;
  height: 16px;
}
.sb-icon--lg {
  width: 28px;
  height: 28px;
}
.sb-icon--xl {
  width: 36px;
  height: 36px;
}
.sb-icon--stat {
  width: 32px;
  height: 32px;
}
.sb-icon--feature {
  width: 32px;
  height: 32px;
}
.sb-icon--contact {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}
.sb-icon--check {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--sb-primary);
}
.sb-icon--check-sm {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.sb-icon--menu {
  display: block;
}
.sb-icon--close {
  display: none;
}
.sb-icon--star {
  width: 18px;
  height: 18px;
  color: var(--sb-secondary);
}
.sb-icon--success-big {
  width: 40px;
  height: 40px;
  color: var(--sb-accent-green);
}

/* ── Spinner ── */
.sb-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--sb-white);
  border-radius: 50%;
  animation: sb-spin 0.7s linear infinite;
}
@keyframes sb-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Offset body for sticky top bar + navbar */
.admin-bar .sb-navbar {
  top: 32px;
}
