/* ============================================
   BEYOND STEM FUTURE LAB — Base Styles
   ============================================ */

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

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

body {
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-gray-600);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

a:hover {
  color: var(--color-primary-dark);
}

ul, ol {
  list-style: none;
}

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

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  color: var(--color-gray-900);
  line-height: var(--leading-tight);
}

h1 {
  font-size: var(--text-hero);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.875rem, 3.5vw, 2.75rem);
  letter-spacing: -0.015em;
}

h3 {
  font-size: var(--text-2xl);
}

h4 {
  font-size: var(--text-xl);
}

p {
  margin-bottom: var(--space-4);
}

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

.text-sm {
  font-size: var(--text-sm);
}

.text-lg {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
}

.text-muted {
  color: var(--color-gray-400);
}

.text-center {
  text-align: center;
}

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

.container-narrow {
  max-width: var(--container-narrow);
}

section {
  padding: var(--section-padding) 0;
}

.section-light {
  background: var(--color-gray-50);
}

.section-soft {
  background: var(--color-primary-soft);
}

.section-dark {
  background: var(--color-navy);
  color: var(--color-white);
}

.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: var(--color-white);
}

.section-dark p {
  color: rgba(255, 255, 255, 0.8);
}

/* ── Section Headers ── */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-16);
}

.section-badge {
  display: inline-block;
  padding: var(--space-2) var(--space-5);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.section-dark .section-badge {
  background: rgba(0, 201, 167, 0.15);
  color: var(--color-teal);
}

.section-header h2 {
  margin-bottom: var(--space-4);
}

.section-header p {
  font-size: var(--text-lg);
  color: var(--color-gray-500);
  line-height: var(--leading-relaxed);
}

.section-dark .section-header p {
  color: rgba(255, 255, 255, 0.7);
}

/* ── Grids ── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

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

  .container {
    padding: 0 var(--space-4);
  }
}

/* ── Utilities ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
