/**
 * RÜYA NAKIŞ EVİ - TEMEL STİLLER VE SIFIRLAMA (MAIN CSS)
 */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--color-text-main);
  background-color: var(--color-bg-base);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Yatay taşmayı tamamen engelleyen temel kurallar */
img, svg, picture, video, canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

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

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

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

ul, ol {
  list-style: none;
}

/* Seçim Rengi */
::selection {
  background-color: var(--color-primary-light);
  color: var(--color-primary-dark);
}

/* Erişilebilirlik Odak Çerçevesi (WCAG AA) */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* Tipografi Hiyerarşisi */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-text-main);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4vw + 1rem, var(--font-size-4xl)); }
h2 { font-size: clamp(1.75rem, 3vw + 0.5rem, var(--font-size-3xl)); }
h3 { font-size: clamp(1.35rem, 2vw + 0.5rem, var(--font-size-2xl)); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

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

/* Layout Konteyneri */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

.container-narrow {
  max-width: 900px;
}

.container-wide {
  max-width: 1400px;
}

.main-content {
  flex: 1 0 auto;
}

/* Bölüm (Section) Standartları */
.section {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
}

.section-sm {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}

.section-lg {
  padding-top: var(--space-4xl);
  padding-bottom: var(--space-4xl);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--space-2xl) auto;
}

.section-subtitle {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
  position: relative;
}

.section-title {
  margin-bottom: var(--space-sm);
}

.section-desc {
  font-size: var(--font-size-md);
  color: var(--color-text-muted);
}

/* Bölüm Çizgisi Süsü */
.title-accent-line {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-primary-soft);
  margin-top: var(--space-xs);
}

.title-accent-line::before,
.title-accent-line::after {
  content: "";
  display: block;
  width: 36px;
  height: 1px;
  background-color: var(--color-border);
}

/* Grid Düzenleri */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

/* Yardımcı Sınıflar */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

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

.bg-white { background-color: var(--color-bg-white); }
.bg-base { background-color: var(--color-bg-base); }
.bg-light-lila { background-color: var(--color-primary-light); }

.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;
}

/* Mikro Animasyonlar */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(37, 211, 102, 0); }
}

.animate-fade-in {
  animation: fadeIn 0.4s ease forwards;
}

/* Reduced Motion Tercihi */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
