/* ==========================================================================
   Temel Sıfırlama, Tipografi, Erişilebilirlik ve RTL (Arapça) Kuralları
   ========================================================================== */

@layer base {
    *,
    *::before,
    *::after {
        box-sizing: border-box;
    }

    :where(
        html, body, div, span, header, nav, main, section, article, aside, footer,
        h1, h2, h3, h4, p, ul, ol, li, figure, figcaption, blockquote, dl, dd,
        form, fieldset, legend, label, input, textarea, select, button, table, th, td, dialog
    ) {
        margin: 0;
        padding: 0;
    }

    html {
        font-size: 100%;
        scroll-behavior: smooth;
        overflow-x: clip;
        -webkit-text-size-adjust: 100%;
    }

    @media (prefers-reduced-motion: reduce) {
        html {
            scroll-behavior: auto;
        }
    }

    body {
        min-block-size: 100dvh;
        display: flex;
        flex-direction: column;
        background-color: var(--surface-page);
        color: var(--ink-body);
        font-family: var(--font-body);
        font-size: 1rem;
        line-height: 1.65;
        text-align: start;
        overflow-x: clip;
        -webkit-font-smoothing: antialiased;
    }

    /* Arapça (RTL) Tipografi ve İkon Yönü Desteği */
    :root[dir="rtl"] body {
        font-family: var(--font-arabic);
        line-height: 1.75;
    }

    :root[dir="rtl"] :where(h1, h2, h3, h4, .eyebrow, .cms-pill, .btn) {
        font-family: var(--font-arabic);
        letter-spacing: normal;
    }

    :root[dir="rtl"] .icon-directional {
        scale: -1 1;
    }

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

    :where(h1, h2, h3, h4) {
        color: var(--ink-strong);
        font-family: var(--font-heading);
        font-weight: 700;
        line-height: 1.2;
        letter-spacing: -0.02em;
        text-wrap: balance;
    }

    p {
        max-inline-size: 72ch;
        text-wrap: pretty;
        overflow-wrap: break-word;
    }

    :where(ul, ol) {
        list-style: none;
    }

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

    :where(img, svg, video, iframe) {
        display: block;
        max-inline-size: 100%;
    }

    img {
        block-size: auto;
    }

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

    button {
        cursor: pointer;
        background: transparent;
        border: 0;
    }

    /* Klavye Odak Halkası (WCAG AA/AAA) */
    :focus-visible {
        outline: 2px solid var(--brand-accent-500);
        outline-offset: 3px;
    }

    /* Native Modal Dialog Kaydırma Yalıtımı */
    dialog:modal {
        overscroll-behavior: contain;
    }

    dialog::backdrop {
        overflow: hidden;
        overscroll-behavior: contain;
        background: rgba(10, 24, 18, 0.62);
        backdrop-filter: blur(3px);
    }

    /* Ekran Okuyucu Yardımcı Sınıfı */
    .visually-hidden,
    .sr-only {
        position: absolute;
        clip-path: inset(50%);
        overflow: hidden;
        inline-size: 1px;
        block-size: 1px;
        margin: -1px;
        padding: 0;
        border: 0;
        white-space: nowrap;
    }

    .skip-link {
        position: fixed;
        inset-block-start: -100%;
        inset-inline-start: 1rem;
        z-index: 9999;
        padding: 0.75rem 1.25rem;
        background: var(--brand-primary-900);
        color: var(--ink-on-dark);
        border-radius: var(--radius-sm);
        font-weight: 600;
    }

    .skip-link:focus {
        inset-block-start: 1rem;
    }
}

