/* ============================================================
   BASE — Reset, Typography, Layout Primitives, Utilities
   ============================================================ */

/* Google Fonts — Inter 400 / 500 / 600 / 700 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* --------------------------------------------------------
   1. 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%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  color: var(--color-dark);
  line-height: 1.6;
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}

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

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

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

a {
  text-decoration: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Remove default search input styling */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

/* --------------------------------------------------------
   2. TYPOGRAPHY — Headings
   -------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  color: var(--color-dark);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--font-size-5xl); }
h2 { font-size: var(--font-size-4xl); }
h3 { font-size: var(--font-size-3xl); }
h4 { font-size: var(--font-size-2xl); }
h5 { font-size: var(--font-size-xl);  }
h6 { font-size: var(--font-size-lg);  }

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

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

strong, b { font-weight: var(--font-weight-semibold); }

small { font-size: var(--font-size-sm); }

/* --------------------------------------------------------
   3. SELECTION & FOCUS
   -------------------------------------------------------- */
::selection {
  background: var(--color-brand);
  color: var(--color-white);
}

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

/* --------------------------------------------------------
   4. CUSTOM SCROLLBAR
   -------------------------------------------------------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-gray-lighter);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-full);
  border: 2px solid var(--color-gray-lighter);
}

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

/* Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) var(--color-gray-lighter);
}

/* --------------------------------------------------------
   5. LAYOUT PRIMITIVES
   -------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.section {
  padding: 6rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

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

.section-header p {
  color: var(--color-gray);
  font-size: var(--font-size-lg);
}

.section-label {
  display: inline-block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-brand);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
}

/* --------------------------------------------------------
   6. UTILITY CLASSES
   -------------------------------------------------------- */

/* Text */
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }
.text-brand   { color: var(--color-brand); }
.text-gray    { color: var(--color-gray); }
.text-white   { color: var(--color-white); }
.text-sm      { font-size: var(--font-size-sm); }
.text-lg      { font-size: var(--font-size-lg); }
.text-xl      { font-size: var(--font-size-xl); }
.text-gradient {
  background: var(--color-brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Font Weight */
.fw-regular  { font-weight: var(--font-weight-regular); }
.fw-medium   { font-weight: var(--font-weight-medium); }
.fw-semibold { font-weight: var(--font-weight-semibold); }
.fw-bold     { font-weight: var(--font-weight-bold); }

/* Flex */
.flex          { display: flex; }
.flex-col      { flex-direction: column; }
.flex-wrap     { flex-wrap: wrap; }
.flex-center   { display: flex; align-items: center; justify-content: center; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.items-end     { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Grid */
.grid { display: grid; }

/* Spacing */
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Display */
.block        { display: block; }
.inline-block { display: inline-block; }
.hidden       { display: none; }
.relative     { position: relative; }

/* Width */
.w-full { width: 100%; }

/* Overflow */
.overflow-hidden { overflow: hidden; }

/* Visually Hidden (accessible) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* --------------------------------------------------------
   7. RESPONSIVE TYPOGRAPHY
   -------------------------------------------------------- */
@media (max-width: 768px) {
  h1 { font-size: var(--font-size-4xl); }
  h2 { font-size: var(--font-size-3xl); }
  h3 { font-size: var(--font-size-2xl); }

  .section {
    padding: 4rem 0;
  }

  .section-header {
    margin-bottom: 2rem;
  }
}

@media (max-width: 576px) {
  h1 { font-size: var(--font-size-3xl); }
  h2 { font-size: var(--font-size-2xl); }

  .section {
    padding: 3rem 0;
  }

  :root {
    --container-padding: 1rem;
  }
}
