/* ==========================================================================
   DENTALINS — MODERN CSS RESET (reset.css)
   Andy Bell's Modern Reset + ek normalize kuralları.
   Tüm tarayıcı varsayılan stillerini sıfırlar, tutarlı başlangıç sağlar.
   ========================================================================== */

/* --- Box Sizing ---
   Her element border-box olsun. Padding ve border, 
   width/height hesabına dahil edilir. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* --- Margin/Padding Sıfırlama ---
   Tüm elementlerin varsayılan margin/padding'ini kaldır. */
*{
  margin: 0;
  padding: 0;
}

/* --- HTML & Body --- */
html {
  /* Smooth scroll — erişilebilirlik prefers-reduced-motion ile kontrol edilir (variables.css) */
  scroll-behavior: smooth;
  /* Prevent font size inflation on mobile */
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  /* Antialiasing */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  /* Minimum tam ekran yüksekliği */
  min-height: 100vh;
  /* Text rendering optimizasyonu */
  text-rendering: optimizeSpeed;
  line-height: 1.5;
}

/* --- Başlıklar & Büyük Elementler ---
   Intrinsic sizing ile text wrapping iyileştirmesi. */
h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
  text-wrap: balance;
}

p, li, figcaption {
  overflow-wrap: break-word;
  text-wrap: pretty;
}

/* --- Liste Sıfırlama ---
   role="list" olmayan listelerde varsayılan stili kaldır. */
ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* --- Link Sıfırlama --- */
a {
  text-decoration-skip-ink: auto;
  color: inherit;
}

/* --- Görsel Elementler ---
   Responsive görseller + block display */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
  /* Lazy load sırasında CLS önleme */
  font-style: italic;
  background-repeat: no-repeat;
  background-size: cover;
  shape-margin: 0.75rem;
}

/* --- Form Elementleri ---
   Tarayıcı varsayılan fontlarını override et. */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* --- Textarea ---
   Sadece dikey resize izin ver. */
textarea {
  resize: vertical;
}

/* textarea:not([rows]) {
  min-height: 10em;
} */

/* --- Button Sıfırlama --- */
button {
  cursor: pointer;
  background: none;
  border: none;
}

/* --- Fieldset Sıfırlama --- */
fieldset {
  border: none;
}

/* --- Table Sıfırlama --- */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* --- Focus Visible ---
   Keyboard kullanıcıları için görünür focus ring.
   Mouse tıklamalarında gizlenir. */
:focus-visible {
  outline: 2px solid var(--color-primary-400);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* --- Disabled Elementler --- */
[disabled] {
  cursor: not-allowed;
  opacity: 0.6;
}

/* --- Hidden Attribute --- */
[hidden] {
  display: none !important;
}

/* --- Screen Reader Only ---
   Görsel olarak gizli ama screen reader tarafından okunur. */
.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;
}

/* --- Skip to Content Link ---
   Keyboard navigation için "İçeriğe geç" linki. */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 1rem;
  background: var(--color-primary-500);
  color: var(--color-text-inverse);
  z-index: var(--z-max);
  border-radius: var(--radius-md);
  font-weight: var(--weight-semibold);
  text-decoration: none;
}

.skip-link:focus {
  top: var(--space-2);
}

/* --- Selection Color --- */
::selection {
  background-color: var(--color-primary-100);
  color: var(--color-primary-900);
}

/* --- Scrollbar Styling (Webkit) --- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-neutral-100);
}

::-webkit-scrollbar-thumb {
  background: var(--color-neutral-400);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-neutral-500);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-neutral-400) var(--color-neutral-100);
}
