/* ==========================================
   KAYSON INTEGRATIVE BODYWORK
   Base Styles: Reset, Normalize, Semantic Elements
   ========================================== */

@import url('variables.css');

/* Import Gotham font from CDN (or use system fallback) */
@font-face {
  font-family: 'Gotham';
  src: local('Gotham'), local('Gotham-Book'), 
       url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap') format('woff2');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Gotham';
  src: local('Gotham Medium'), local('Gotham-Medium'),
       url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500&display=swap') format('woff2');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Gotham';
  src: local('Gotham Bold'), local('Gotham-Bold'),
       url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&display=swap') format('woff2');
  font-weight: 700;
  font-style: normal;
}

/* ==========================================
   RESET & NORMALIZE
   ========================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-gray-800);
  background-color: var(--color-white);
  overflow-x: hidden;
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--color-gray-900);
  margin-bottom: var(--space-4);
  letter-spacing: -0.01em;
}

h1 {
  font-size: var(--font-size-5xl);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.015em;
}

h3 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-semibold);
}

h4 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-semibold);
}

h5 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-medium);
}

h6 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
}

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

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

/* ==========================================
   LINKS
   ========================================== */

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

a:hover {
  color: var(--color-primary-medium);
  text-decoration: underline;
}

a:focus {
  outline: 2px solid var(--color-accent-yellow);
  outline-offset: 2px;
}

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

/* ==========================================
   LISTS
   ========================================== */

ul, ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
}

li {
  margin-bottom: var(--space-2);
  line-height: var(--line-height-relaxed);
}

/* ==========================================
   IMAGES & MEDIA
   ========================================== */

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

img {
  border-radius: var(--radius-lg);
}

svg {
  overflow: visible;
}

/* ==========================================
   FORM ELEMENTS
   ========================================== */

input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

button {
  background-color: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

input, textarea, select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-md);
  background-color: var(--color-white);
  font-size: var(--font-size-base);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-primary-dark);
  box-shadow: 0 0 0 3px rgba(0, 61, 130, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: var(--font-weight-medium);
  color: var(--color-gray-700);
}

/* ==========================================
   TABLES
   ========================================== */

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-8);
}

th, td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--color-gray-200);
}

th {
  background-color: var(--color-gray-50);
  font-weight: var(--font-weight-semibold);
  color: var(--color-gray-900);
}

tr:hover {
  background-color: var(--color-gray-50);
}

/* ==========================================
   CODE & PRE
   ========================================== */

code, pre {
  font-family: var(--font-family-mono);
  background-color: var(--color-gray-100);
  border-radius: var(--radius-md);
}

code {
  padding: 0.125rem 0.375rem;
  font-size: var(--font-size-sm);
}

pre {
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  overflow-x: auto;
  line-height: var(--line-height-normal);
}

pre code {
  background-color: transparent;
  padding: 0;
}

/* ==========================================
   BLOCKQUOTE & CITATIONS
   ========================================== */

blockquote {
  margin: var(--space-4) 0;
  padding: var(--space-4) var(--space-6);
  border-left: 4px solid var(--color-primary-dark);
  background-color: var(--color-gray-50);
  font-style: italic;
  color: var(--color-gray-700);
}

cite {
  font-style: normal;
  color: var(--color-gray-600);
}

/* ==========================================
   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-width: 0;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* Responsive text utilities */
@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);
  }
}

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

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

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