/* ==========================================================================
   Base Styles & Reset - Research Loop
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;500;600;700;800&family=Montserrat:wght@400;500;600;700;800;900&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-body);
  background-image: 
    repeating-linear-gradient(45deg, rgba(7, 28, 44, 0.07) 0, rgba(7, 28, 44, 0.07) 1px, transparent 1px, transparent 120px),
    repeating-linear-gradient(-45deg, rgba(7, 28, 44, 0.07) 0, rgba(7, 28, 44, 0.07) 1px, transparent 1px, transparent 120px);
  line-height: 1.6;
  font-size: 1rem;
  font-weight: var(--fw-normal);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography Scale */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--primary-dark);
  line-height: 1.25;
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); line-height: 1.15; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em; }

p {
  margin-bottom: var(--space-4);
  color: var(--text-muted);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-5);
  padding-right: var(--space-5);
}

.container-narrow {
  max-width: var(--container-narrow);
}

/* Section Layout */
.section {
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
  position: relative;
}

.section-sm {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

.section-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto var(--space-12);
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  margin-bottom: var(--space-3);
}

.section-tag.accent {
  background: var(--accent-light);
  color: var(--accent-hover);
}

.section-title {
  margin-bottom: var(--space-4);
  font-weight: var(--fw-extrabold);
}

.section-subtitle {
  font-size: 1.12rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Text Gradients & Highlights */
.text-gradient {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-accent {
  color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.8rem 1.6rem;
  font-size: 0.95rem;
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-normal);
  line-height: 1.2;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-inverse);
  box-shadow: 0 4px 14px rgba(30, 58, 138, 0.25);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: var(--text-inverse);
  box-shadow: 0 6px 20px rgba(30, 58, 138, 0.35);
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--text-inverse);
}

.btn-secondary:hover {
  background-color: var(--secondary-hover);
  color: var(--text-inverse);
}

.btn-accent {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.3);
}

.btn-accent:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.45);
}

.btn-outline {
  border-color: var(--border-color);
  background-color: transparent;
  color: var(--text-main);
}

.btn-outline:hover {
  background-color: var(--bg-surface);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline-primary {
  border-color: var(--primary);
  background-color: transparent;
  color: var(--primary);
}

.btn-outline-primary:hover {
  background-color: var(--primary);
  color: var(--text-inverse);
}

.btn-white {
  background-color: var(--bg-surface);
  color: var(--primary-dark);
  box-shadow: var(--shadow-sm);
}

.btn-white:hover {
  background-color: #f8fafc;
  color: var(--primary);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 1rem 2.2rem;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.btn-block {
  width: 100%;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-full);
}

.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-accent { background: var(--accent-light); color: var(--accent-hover); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-free {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  font-weight: 700;
  text-transform: uppercase;
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-light { color: var(--text-light); }
.bg-surface { background: transparent; }
.bg-muted { background: transparent; }
.bg-dark { background-color: var(--bg-dark); color: var(--text-inverse); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
