/* ==================================================
   CODEXA TECH ACADEMY — GLOBAL BASE STYLES
   Resets, typography and shared utility classes.
   Bootstrap handles grid/layout; this file only
   carries what Bootstrap cannot express.
   ================================================== */

/* ---------- Reset ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--cx-font-body);
  font-size: var(--cx-fs-base);
  font-weight: 400;
  color: var(--cx-text);
  background-color: var(--cx-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--cx-font-display);
  color: var(--cx-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--cx-fs-5xl); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: var(--cx-fs-3xl); font-weight: 800; letter-spacing: -0.015em; }
h3 { font-size: var(--cx-fs-2xl); }
h4 { font-size: var(--cx-fs-xl); }

p {
  color: var(--cx-text);
}

/* ---------- Layout helpers ---------- */
.cx-container {
  width: 100%;
  max-width: var(--cx-container-max);
  margin-inline: auto;
  padding-inline: var(--cx-space-lg);
}

.cx-section {
  padding-block: var(--cx-space-2xl);
}

/* ---------- Eyebrow / badge, shared across sections ---------- */
.cx-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--cx-font-display);
  font-size: var(--cx-fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cx-primary);
  background-color: var(--cx-primary-light);
  padding: 0.4rem 0.85rem;
  border-radius: var(--cx-radius-pill);
}

[data-theme="dark"] .cx-eyebrow {
  color: #70EEFF;
}

/* ---------- Buttons ---------- */
.cx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--cx-font-display);
  font-size: var(--cx-fs-sm);
  font-weight: 600;
  padding: 0.85rem 1.75rem;
  border-radius: var(--cx-radius-pill);
  transition: transform var(--cx-transition-fast), box-shadow var(--cx-transition-fast), background-color var(--cx-transition-fast), color var(--cx-transition-fast), border-color var(--cx-transition-fast);
  white-space: nowrap;
}

.cx-btn:hover {
  transform: translateY(-2px);
}

.cx-btn-primary {
  background: var(--cx-gradient-brand);
  color: #FFFFFF;
  box-shadow: var(--cx-shadow-brand);
}

.cx-btn-primary:hover {
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.cx-btn-outline {
  background-color: transparent;
  color: var(--cx-heading);
  border: 1.5px solid var(--cx-border);
}

.cx-btn-outline:hover {
  border-color: var(--cx-primary);
  color: var(--cx-primary);
}

.cx-btn-sm {
  padding: 0.65rem 1.35rem;
  font-size: var(--cx-fs-xs);
}

/* ---------- Skip link (accessibility) ---------- */
.cx-skip-link {
  position: absolute;
  top: 0;
  left: var(--cx-space-md);
  z-index: 2000;
  background-color: var(--cx-heading);
  color: #FFFFFF;
  font-family: var(--cx-font-display);
  font-size: var(--cx-fs-sm);
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  border-radius: var(--cx-radius-sm);
  /* Moves up by exactly its own rendered height, so it's always fully
     off-screen regardless of font-size/line-height/padding — a fixed
     pixel offset (e.g. top: -48px) can end up smaller than the
     element's actual height and peek into view. */
  transform: translateY(-150%);
  transition: transform var(--cx-transition-fast);
}

.cx-skip-link:focus {
  top: var(--cx-space-md);
  transform: translateY(0);
}

/* ---------- Focus states (accessibility) ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--cx-primary);
  outline-offset: 3px;
  border-radius: var(--cx-radius-sm);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}