/* Temel: yazı tipi, değişkenler, renk temaları, sıfırlama, tipografi, erişilebilirlik ve yükleme ekranı. */

@font-face {
    font-family: "Inter";
    src: url("../assets/fonts/InterVariable.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("../assets/fonts/InterVariable-Italic.woff2") format("woff2");
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --header-height: 88px;
    --reading-offset: calc(var(--header-height) + 30px);
    --body-font: "Inter", sans-serif;
    --heading-font: var(--body-font);
    font-family: var(--body-font);
    font-optical-sizing: auto;
    background: #ece8df;
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

html {
    scroll-padding-top: var(--reading-offset);
}

body {
    --world: #e5e2d9;
    --world-glow: #f8f3e9;
    --hero-ink: #30382f;
    --hero-soft: #60685f;
    --surface: #faf9f4;
    --panel-ink: #292d29;
    --panel-muted: #6c736b;
    --line: #dddcd3;
    --accent: #617750;
    --header-bg: #f5f2e9e8;
    --header-ink: #30382f;
    --header-muted: #60685f;
    --header-line: #ccc8bd;
}

body {
    margin: 0;
    color: var(--panel-ink);
    -webkit-font-smoothing: antialiased;
}

body[data-theme="aplomb"] {
    --world: #e4dccb;
    --world-glow: #f7f0df;
    --hero-ink: #43372a;
    --hero-soft: #74634f;
    --surface: #fffdf6;
    --panel-ink: #43372a;
    --panel-muted: #887a68;
    --line: #e4ddce;
    --accent: #8b6233;
    --header-bg: #ede6d6eb;
    --header-ink: #43372a;
    --header-muted: #74634f;
    --header-line: #cfc3ad;
}

body[data-theme="mozaik-blast"] {
    --world: #0b6b68;
    --world-glow: #32b9ad;
    --hero-ink: #fffdf1;
    --hero-soft: #d3eeea;
    --surface: #fcfdf8;
    --panel-ink: #233e3a;
    --panel-muted: #627972;
    --line: #d8e2dc;
    --accent: #13736a;
    --header-bg: #0c6c67df;
    --header-ink: #fffdf1;
    --header-muted: #d3eeea;
    --header-line: #ffffff30;
}

body[data-theme="crumble-crew"] {
    --world: #143a63;
    --world-glow: #3981bd;
    --hero-ink: #fffdf5;
    --hero-soft: #d4e5f5;
    --surface: #f9fbfa;
    --panel-ink: #2b3742;
    --panel-muted: #6d7b85;
    --line: #dbe2e7;
    --accent: #2a669e;
    --header-bg: #203f65;
    --header-ink: #fffdf5;
    --header-muted: #d4e5f5;
    --header-line: #ffffff30;
}

a {
    color: inherit;
}

button {
    font: inherit;
    cursor: pointer;
}

code,
kbd,
pre,
samp {
    font-family: var(--body-font);
}

button,
summary,
a {
    -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 5px;
}

h1:focus,
h2:focus {
    outline: none;
}

[hidden] {
    display: none !important;
}

/* Seçim rengi her sayfanın kendi temasından: Hakkımda adaçayı, Aplomb pirinç, Mozaik Blast camgöbeği, Crumble Crew mavi. */
::selection {
    background: #cdd9ba;
    color: #292d29;
}

body[data-theme="ben-kimim"] ::selection {
    background: #e3d2b9;
    color: #30382f;
}

body[data-theme="aplomb"] ::selection {
    background: #e8cf9b;
    color: #43372a;
}

body[data-theme="mozaik-blast"] ::selection {
    background: #b5e4de;
    color: #233e3a;
}

body[data-theme="crumble-crew"] ::selection {
    background: #bfd7ef;
    color: #2b3742;
}

.skip-link {
    position: fixed;
    z-index: 60;
    top: 12px;
    left: 12px;
    padding: 12px 18px;
    background: #fff;
    color: #222;
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

html.is-loading {
    overflow: hidden;
}

.page-loader {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    place-content: center;
    justify-items: center;
    padding: 24px;
    background: #ece8df;
    color: #30382f;
    opacity: 1;
    transition: opacity .4s ease;
}

.is-loading .page-loader {
    display: grid;
}

.is-loading .site-header,
.is-loading .layout,
.is-loading .skip-link {
    visibility: hidden;
}

.page-loader.is-leaving {
    display: grid;
    opacity: 0;
    pointer-events: none;
}

.loader-mark {
    display: block;
    width: 58px;
    height: 58px;
    margin-bottom: 24px;
    stroke: #d7b09a;
}

.loader-outline {
    opacity: .3;
}

.loader-trace {
    stroke-dasharray: 30 70;
    animation: trace-loader 1.7s linear infinite;
}

.loader-caption {
    color: #80796f;
    font-size: 11px;
    line-height: 1.5;
    letter-spacing: 1.2px;
}

@keyframes trace-loader {
    to {
        stroke-dashoffset: -100;
    }
}

h1,
h2 {
    font-family: var(--heading-font);
}

h1 {
    font-size: clamp(52px, 6.4vw, 88px);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -1.5px;
    margin: 0 0 22px;
    max-width: 460px;
}

p {
    font-size: 15px;
    line-height: 1.8;
    margin: 0 0 16px;
}

h2 {
    font-size: 25px;
    font-weight: 500;
    letter-spacing: -.3px;
    line-height: 1.3;
    margin: 0 0 17px;
}

@media (max-width: 1100px) {
    h1 {
        font-size: 64px;
    }
}

@media (max-width: 760px) {
    :root {
        --header-height: 68px;
        --reading-offset: calc(var(--header-height) + 70px);
    }

    h1 {
        font-size: 59px;
        letter-spacing: -1px;
        max-width: 100%;
    }

    h2 {
        font-size: 23px;
    }

    p {
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    h1 {
        font-size: 53px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
