/**
 * Base Styles - Temel Reset ve Global Stiller
 */

/* ========================================
   RESET & NORMALIZE
   ======================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px; /* Base font size for rem calculations */
  line-height: var(--line-height-normal);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  line-height: var(--line-height-normal);
}

/* ========================================
   TYPOGRAPHY DEFAULTS
   ======================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  margin-bottom: var(--spacing-3);
  color: var(--color-text-primary);
}

h1 { font-size: var(--font-size-2xl); }
h2 { font-size: var(--font-size-xl); }
h3 { font-size: var(--font-size-lg); }
h4 { font-size: var(--font-size-md); }
h5 { font-size: var(--font-size-base); }
h6 { font-size: var(--font-size-sm); }

p {
  margin-bottom: var(--spacing-3);
  line-height: var(--line-height-normal);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-accent-dark);
  text-decoration: underline;
}

/* ========================================
   FORM DEFAULTS
   ======================================== */
input,
textarea,
select,
button {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: var(--input-focus-ring);
}

/* ========================================
   LIST DEFAULTS
   ======================================== */
ul, ol {
  margin-bottom: var(--spacing-3);
  padding-left: var(--spacing-5);
}

li {
  margin-bottom: var(--spacing-1);
}

/* ========================================
   IMAGE DEFAULTS
   ======================================== */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========================================
   TABLE DEFAULTS
   ======================================== */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--spacing-4);
}

th, td {
  padding: var(--spacing-2);
  text-align: left;
  border-bottom: 1px solid var(--color-border-light);
}

th {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
/* Focus styles for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Screen reader only */
.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;
}

/* ========================================
   RESPONSIVE TYPOGRAPHY
   ======================================== */
@media (max-width: 768px) {
  h1 { font-size: var(--font-size-xl); }
  h2 { font-size: var(--font-size-lg); }
  h3 { font-size: var(--font-size-md); }
}

@media (max-width: 480px) {
  h1 { font-size: var(--font-size-lg); }
  h2 { font-size: var(--font-size-md); }
  h3 { font-size: var(--font-size-base); }
}
