/**
 * ============================================
 * SKYRUM - Base Styles & Reset
 * ============================================
 * 
 * Temel stil sıfırlamaları ve global stiller.
 * Tüm tarayıcılarda tutarlı bir başlangıç noktası sağlar.
 * 
 * @author Skyrum Development Team
 * @version 1.0.0
 */

/* ==================== CSS RESET ==================== */

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

/* Prevent font size inflation; yatay kaydırmayı kapat (sadece yukarı-aşağı scroll) */
html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Remove default margin and set core body defaults */
body {
    min-height: 100vh;
    padding-top: 96px; /* Navbar yüksekliği – içerik navbar altında kalmaz */
    font-family: var(--font-sans);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    max-width: 100%;
}

/* Remove list styles on ul, ol elements with role="list" */
ul[role="list"],
ol[role="list"] {
    list-style: none;
}

/* Set shorter line heights on headings and interactive elements */
h1, h2, h3, h4, h5, h6 {
    line-height: var(--leading-tight);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    text-wrap: balance;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
    text-decoration-skip-ink: auto;
    color: currentColor;
}

/* Make images easier to work with */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

/* Remove default button styles */
button {
    background: none;
    border: none;
    cursor: pointer;
}

/* Make sure textareas without rows attribute are not tiny */
textarea:not([rows]) {
    min-height: 10em;
}

/* Anything that has been anchored should have extra scroll margin */
:target {
    scroll-margin-block: 5ex;
}

/* Remove all animations and transitions for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==================== TYPOGRAPHY ==================== */

h1 {
    font-size: var(--text-5xl);
    letter-spacing: var(--tracking-tight);
}

h2 {
    font-size: var(--text-4xl);
    letter-spacing: var(--tracking-tight);
}

h3 {
    font-size: var(--text-2xl);
}

h4 {
    font-size: var(--text-xl);
}

h5 {
    font-size: var(--text-lg);
}

h6 {
    font-size: var(--text-base);
}

p {
    line-height: var(--leading-relaxed);
    color: var(--text-secondary);
}

a {
    color: var(--color-primary-600);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-700);
}

strong {
    font-weight: var(--font-semibold);
}

/* ==================== LAYOUT UTILITIES ==================== */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-padding);
}

/* Section spacing */
section {
    padding-block: var(--space-20);
}

/* ==================== SELECTION ==================== */

::selection {
    background-color: var(--color-primary-200);
    color: var(--color-primary-900);
}

/* ==================== FOCUS STYLES ==================== */

:focus-visible {
    outline: 2px solid var(--color-primary-500);
    outline-offset: 2px;
}

/* ==================== SCROLLBAR STYLING ==================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-neutral-100);
}

::-webkit-scrollbar-thumb {
    background: var(--color-neutral-300);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-neutral-400);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-neutral-300) var(--color-neutral-100);
}

/* ==================== PAGE TRANSITION ==================== */

#page-transition {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2147483647;
    opacity: 1;
    visibility: visible;
    animation: fadeOut 0.5s ease 0.25s forwards;
}

#page-transition img {
    width: 120px;
    animation: spin3d 0.9s linear infinite;
}

@keyframes spin3d {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(360deg); }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        visibility: visible;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}
