/**
 * applytogo skin — base katmanı
 * Font-face, tipografi, focus, scrollbar, selection, reduced-motion.
 *
 * Konvansiyon: tüm override kuralları `html:root` önekiyle yazılır (özgüllük
 * (0,1,1) = Elastic'in `html.dark-mode` önekiyle eşit; kaynak sırası bizde
 * olduğundan iki temada da kazanır). Renkler yalnız var(--atg-*).
 */

/* ---- Inter (self-host, değişken ağırlık 100-900, SIL OFL) ---- */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url(../fonts/inter-var-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
        U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
        U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Türkçe Ğ/İ/Ş/ğ/ı/ş bu blokta (U+011E/0130/015E...) — latin-ext şart. */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url(../fonts/inter-var-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
        U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
        U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
        U+A720-A7FF;
}

/* ---- Kök tipografi ---- */
html:root {
    font-size: 15px; /* atg gövde tabanı; Elastic rem ölçeği buradan türetilir */
    font-family: var(--atg-font);
    scrollbar-color: var(--atg-scrollbar-thumb) transparent;
    scrollbar-width: thin;
}

html:root body {
    font-family: var(--atg-font);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--atg-text);
    background-color: var(--atg-bg-ground);
}

html:root h1,
html:root h2,
html:root h3,
html:root h4,
html:root h5,
html:root h6 {
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--atg-text-strong);
}

/* ---- Linkler ---- */
html:root a {
    color: var(--atg-link);
    transition: color var(--atg-dur) var(--atg-ease);
}

html:root a:hover {
    color: var(--atg-link-hover);
}

/* ---- Selection ---- */
html:root ::selection {
    background-color: var(--atg-selection);
    color: inherit;
}

/* ---- Scrollbar (ince, sessiz) ---- */
html:root:not(.touch) ::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

html:root:not(.touch) ::-webkit-scrollbar-track {
    background-color: transparent;
}

html:root:not(.touch) ::-webkit-scrollbar-thumb {
    background-color: var(--atg-scrollbar-thumb);
    border-radius: var(--atg-radius-pill);
    border: 2px solid transparent;
    background-clip: content-box;
}

html:root:not(.touch) ::-webkit-scrollbar-thumb:hover {
    background-color: var(--atg-scrollbar-thumb-hover);
}

/* ---- Focus: halka asla kaldırılmaz, yeniden stillenir ---- */
html:root :focus-visible {
    outline: 2px solid var(--atg-link);
    outline-offset: 2px;
}

/* Fare tıklamasında halka temizlenir; klavyede kalır. */
html:root :focus:not(:focus-visible) {
    outline: none;
}

/* ---- Hareket: mutlak reduced-motion saygısı ---- */
@media (prefers-reduced-motion: reduce) {
    html:root {
        --atg-dur: 0ms;
    }

    html:root *,
    html:root *::before,
    html:root *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
