/* ==========================================
   INGENR Base Styles — base.css
   Reset, Typography, Globals, Utilities
   ========================================== */

/* ===== MODERN CSS RESET ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: var(--surface) var(--primary-bg);
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: var(--leading-relaxed);
  color: var(--text-muted);
  background-color: var(--primary-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--primary-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--surface);
  border-radius: var(--radius-full);
  border: 2px solid var(--primary-bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

h1 {
  font-size: var(--text-5xl);
  font-weight: 800;
}

h2 {
  font-size: var(--text-4xl);
  font-weight: 700;
}

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

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

h5 {
  font-size: var(--text-lg);
  font-weight: 700;
}

h6 {
  font-size: var(--text-base);
  font-weight: 700;
}

p {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--text-muted);
  max-width: 72ch;
}

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

a:hover {
  color: var(--accent-hover);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

strong, b {
  font-weight: 600;
  color: var(--text-secondary);
}

ul, ol {
  list-style: none;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ===== SELECTION ===== */
::selection {
  background: rgba(200, 134, 46, 0.3);
  color: var(--text-primary);
}

/* ===== FOCUS STYLES ===== */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.text-accent { color: var(--accent); }
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }

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

.text-uppercase {
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  font-size: var(--text-sm);
  font-weight: 600;
}

.font-heading { font-family: var(--font-heading); }
.font-body { font-family: var(--font-body); }

.weight-regular { font-weight: 400; }
.weight-medium { font-weight: 500; }
.weight-bold { font-weight: 700; }
.weight-extrabold { font-weight: 800; }

/* ===== SECTION LABEL (Overline) ===== */
.section-label {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  color: var(--accent);
  margin-bottom: var(--space-4);
  display: inline-block;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--accent);
  margin-right: var(--space-3);
  vertical-align: middle;
}

/* ===== GRADIENT TEXT ===== */
.gradient-text {
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== DIVIDER ===== */
.divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border: none;
  margin: var(--space-6) 0;
  border-radius: var(--radius-full);
}

.divider--center {
  margin-left: auto;
  margin-right: auto;
}

/* ===== RESPONSIVE TYPOGRAPHY ===== */
@media (max-width: 1024px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-xl); }
}

@media (max-width: 768px) {
  html { font-size: 15px; }
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }
  p { font-size: var(--text-sm); }
}

@media (max-width: 480px) {
  html { font-size: 14px; }
  h1 { font-size: var(--text-2xl); }
  h2 { font-size: var(--text-xl); }
}
