/* ==========================================================================
   Temel — sıfırlama + sahne (video, vualet, scroll kararması, grain)
   ========================================================================== */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 5.5rem;
    -webkit-text-size-adjust: 100%;
    padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
    background: #0a0908;
}

body {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: var(--fs-govde);
    line-height: var(--lh-govde);
    color: var(--text);
    background: transparent;
    overflow-x: hidden;
    min-height: 100svh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    -webkit-user-select: none;
    user-select: none;
}

/* Metin alanları yine seçilebilir kalsın istenirse buraya istisna eklenir — şimdilik tüm site kopyalanamaz */
img, video {
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    user-drag: none;
}

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

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
h1, h2 { font-weight: 300; line-height: 1.1; text-wrap: balance; }
p { text-wrap: pretty; }

:focus-visible { outline: 1px solid var(--iz); outline-offset: 4px; }
::selection { background: var(--iz); color: #0a0908; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: #0a0908; }
::-webkit-scrollbar-thumb { background: #2a241d; }
::-webkit-scrollbar-thumb:hover { background: var(--iz); }

.atla {
    position: fixed;
    top: -100px; left: 1rem;
    z-index: 9999;
    padding: 0.6rem 1rem;
    background: var(--ink-1);
    color: var(--text);
    font-size: 0.7rem;
    transition: top 0.2s ease;
}
.atla:focus { top: 1rem; }

/* — Arka plan video — */
.arka-plan-video {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100svh;
    object-fit: cover;
    z-index: var(--z-video);
    pointer-events: none;
    opacity: 0;
    transform: scale(1.03);
    filter: saturate(0.72) brightness(0.72);
    transition: opacity var(--sure-yavas) ease;
}

.arka-plan-video.video-net { opacity: 1; }

/* — Vualet: koyu-sinematik — */
.sahne-vualet {
    position: fixed;
    inset: 0;
    z-index: var(--z-veil);
    pointer-events: none;
    background:
        radial-gradient(ellipse 140% 115% at 50% 30%, rgba(8, 7, 6, 0.32) 0%, rgba(8, 7, 6, 0.78) 100%),
        linear-gradient(180deg, rgba(8, 7, 6, 0.62) 0%, rgba(8, 7, 6, 0.46) 40%, rgba(8, 7, 6, 0.82) 100%);
}

/* — Kararma: aşağı indikçe video geri çekilir — */
.sahne-kararma {
    position: fixed;
    inset: 0;
    z-index: var(--z-veil);
    pointer-events: none;
    background: var(--ink);
    opacity: var(--kararma, 0);
    transition: opacity 0.3s linear;
}

/* — Film grain — */
.sahne-grain {
    position: fixed;
    inset: 0;
    z-index: var(--z-grain);
    pointer-events: none;
    opacity: 0.045;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    background-size: 120px 120px;
}

@media (prefers-reduced-motion: reduce) {
    .arka-plan-video { filter: saturate(0.72) brightness(0.72); }
}

/* — Açılış — */
body.acilis { overflow: hidden; }
body.menu-acik { overflow: hidden; }

body.acilis #icerik,
body.acilis .topbar { opacity: 0; visibility: hidden; }

body.hazir #icerik,
body.hazir .topbar {
    opacity: 1;
    visibility: visible;
    transition: opacity 1.1s ease 0.2s;
}

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
