/* ==========================================================================
   Tema Demo Yayın — temel.css
   Tasarım jetonları, sıfırlama, tipografi, yardımcı sınıflar, düğmeler.
   Ad alanı: --td-* değişkenleri, yalnızca sınıf seçiciler (çakışma yok).
   ========================================================================== */

:root {
    /* Renkler */
    --td-ana:          #6d4aff;
    --td-ana-koyu:     #5530e8;
    --td-ana-acik:     #efeaff;
    --td-ikincil:      #ff4d8d;
    --td-vurgu:        #00bfa6;
    --td-altin:        #f5b301;
    --td-zemin:        #f4f5fb;
    --td-yuzey:        #ffffff;
    --td-yuzey-2:      #f9f9fd;
    --td-metin:        #1a1c2c;
    --td-metin-soluk:  #5b6079;
    --td-metin-silik:  #656a82;   /* WCAG AA: beyaz üstünde 5,3:1, zeminde 4,9:1 (eski #8a8fa8 yalnız 3,2:1'di) */
    --td-cizgi:        #e3e5f1;
    --td-koyu:         #12131f;
    --td-koyu-2:       #1c1e30;
    --td-basari:       #12a05c;
    --td-hata:         #e5354a;
    --td-gradyan:      linear-gradient(120deg, #6d4aff 0%, #c040e8 38%, #ff4d8d 70%, #ff9a3c 100%);
    --td-gradyan-yumusak: linear-gradient(135deg, #efeaff 0%, #ffeaf3 100%);

    /* Biçim */
    --td-yaricap-k:    8px;
    --td-yaricap:      14px;
    --td-yaricap-b:    22px;
    --td-golge-1:      0 1px 2px rgba(26, 28, 44, .06), 0 2px 8px rgba(26, 28, 44, .05);
    --td-golge-2:      0 6px 18px rgba(26, 28, 44, .10), 0 2px 6px rgba(26, 28, 44, .06);
    --td-golge-3:      0 22px 50px rgba(55, 40, 130, .22), 0 8px 18px rgba(26, 28, 44, .10);

    /* Yerleşim */
    --td-kap:          2100px;
    --td-kap-dar:      860px;
    --td-bosluk:       clamp(12px, 1.5vw, 24px);

    /* Hareket */
    --td-gecis:        .28s cubic-bezier(.2, .7, .2, 1);
    --td-gecis-yavas:  .6s cubic-bezier(.2, .7, .2, 1);

    /* Yazı */
    --td-yazi:         "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --td-yazi-baslik:  "Poppins", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

    color-scheme: light;
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;   /* iOS/Android adres çubuğunda taşma olmasın (100vh yedek) */
    font-family: var(--td-yazi);
    font-size: 16px;
    line-height: 1.65;
    color: var(--td-metin);
    background: var(--td-zemin);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

main { display: block; outline: none; }

img, svg, video { display: block; max-width: 100%; height: auto; }
img { border-style: none; }

h1, h2, h3, h4 {
    margin: 0 0 .5em;
    font-family: var(--td-yazi-baslik);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.015em;
    color: var(--td-metin);
    text-wrap: balance;
}
h1 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a {
    color: var(--td-ana);
    text-decoration: none;
    transition: color var(--td-gecis);
}
a:hover { color: var(--td-ikincil); }

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

small { font-size: .8em; }

hr { border: 0; border-top: 1px solid var(--td-cizgi); margin: 2rem 0; }

::selection { background: var(--td-ana); color: #fff; }

:focus-visible {
    outline: 3px solid rgba(109, 74, 255, .55);                              /* color-mix desteklemeyen tarayıcılar için */
    outline: 3px solid color-mix(in srgb, var(--td-ana) 55%, transparent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---- Yardımcı sınıflar ------------------------------------------------- */

.gorunmez {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.kap {
    width: 100%;
    max-width: var(--td-kap);
    margin-inline: auto;
    padding-inline: var(--td-bosluk);
}
.kap--dar { max-width: var(--td-kap-dar); }
.kap--tam { max-width: none; }

.atla-baglantisi {
    position: fixed;
    top: -60px; left: 12px;
    z-index: 1000;
    padding: 10px 18px;
    border-radius: var(--td-yaricap-k);
    background: var(--td-ana);
    color: #fff;
    font-weight: 600;
    transition: top var(--td-gecis);
}
.atla-baglantisi:focus { top: 12px; color: #fff; }

.bolum-bosluk { padding-block: clamp(28px, 5vw, 56px); }

/* ---- Düğmeler ---------------------------------------------------------- */

.dugme {
    --dugme-zemin: var(--td-yuzey);
    --dugme-metin: var(--td-metin);
    --dugme-cizgi: var(--td-cizgi);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    min-height: 46px;
    padding: .6em 1.4em;
    border: 1.5px solid var(--dugme-cizgi);
    border-radius: 999px;
    background: var(--dugme-zemin);
    color: var(--dugme-metin);
    font-weight: 600;
    font-size: .95rem;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    isolation: isolate;
    transition: transform var(--td-gecis), box-shadow var(--td-gecis), background var(--td-gecis), color var(--td-gecis), border-color var(--td-gecis);
}
.dugme:hover { transform: translateY(-2px); color: var(--dugme-metin); box-shadow: var(--td-golge-2); }
.dugme:active { transform: translateY(0) scale(.98); }
.dugme[disabled], .dugme.is-yukleniyor { opacity: .7; cursor: progress; pointer-events: none; }

.dugme--birincil {
    --dugme-zemin: var(--td-ana);
    --dugme-metin: #fff;
    --dugme-cizgi: transparent;
    background-image: linear-gradient(120deg, var(--td-ana), #8a4dff 50%, var(--td-ikincil));
    background-size: 220% 100%;
    background-position: 0 0;
    transition: background-position .5s ease, transform var(--td-gecis), box-shadow var(--td-gecis);
}
.dugme--birincil:hover { background-position: 100% 0; box-shadow: 0 10px 26px rgba(109, 74, 255, .38); }

.dugme--ikincil {
    --dugme-zemin: var(--td-ana-acik);
    --dugme-metin: var(--td-ana-koyu);
    --dugme-cizgi: transparent;
}
.dugme--ikincil:hover { background: var(--td-ana); color: #fff; }

.dugme--hayalet {
    --dugme-zemin: rgba(255, 255, 255, .92);
    --dugme-metin: var(--td-metin);
    --dugme-cizgi: transparent;
    backdrop-filter: blur(6px);
}
.dugme--hayalet:hover { background: #fff; color: var(--td-ana); }

.dugme--kucuk { min-height: 38px; padding: .4em 1.1em; font-size: .85rem; }
.dugme--buyuk { min-height: 54px; padding: .7em 1.9em; font-size: 1.02rem; }

/* Yükleniyor göstergesi (düğme içinde) */
.yukleniyor {
    display: none;
    width: 1.1em; height: 1.1em;
    border: 2.5px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tdDon .7s linear infinite;
}
.is-yukleniyor .yukleniyor { display: inline-block; }
.is-yukleniyor .dugme__yazi { opacity: .85; }

/* ---- Anahtar kareler --------------------------------------------------- */

@keyframes tdDon { to { transform: rotate(360deg); } }
@keyframes tdGradyan {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes tdYuz {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50%      { transform: translate3d(0, -18px, 0) scale(1.06); }
}
@keyframes tdGiris {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}
