/* ================================================================
   ENGELSIZ ISPARTA - BASE STYLES
   Reset, CSS Variables, Typography, Utilities
   ================================================================ */

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
    /* Colors - Kurumsal Resmi Palet */
    --navy: #0B1D32;
    --navy-light: #163A5E;
    --navy-rgb: 11, 29, 50;
    --blue: #1A5DC7;
    --blue-dark: #14509B;
    --blue-rgb: 26, 93, 199;
    --gold: #B8860B;
    --gold-light: #CDA434;
    --gold-rgb: 184, 134, 11;
    --green: #00796B;
    --green-rgb: 0, 121, 107;
    --red: #C62828;
    --purple: #6A1B9A;
    --bg-light: #F5F6F8;
    --text-dark: #1C1C2E;
    --text-grey: #5A6170;
    --white: #FFFFFF;
    --divider: #D8DEE5;
    --card-white: #FFFFFF;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-section: 100px;

    /* Typography */
    --font-heading: 'Merriweather', 'Georgia', 'Times New Roman', serif;
    --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-family: var(--font-body);

    /* Borders */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-full: 40px;

    /* Shadows */
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
    --shadow-md: 0 2px 12px rgba(0,0,0,0.07);
    --shadow-lg: 0 8px 28px rgba(0,0,0,0.09);
    --shadow-xl: 0 12px 36px rgba(0,0,0,0.11);
    --shadow-blue: 0 4px 16px rgba(26,93,199,0.25);
    --shadow-gold: 0 4px 16px rgba(200,145,10,0.2);
    --shadow-phone: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 2px rgba(255,255,255,0.08);

    /* Transitions */
    --ease-out-expo: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Layout */
    --container-max: 1200px;
    --navbar-height: 72px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

ul, ol { list-style: none; }

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ===== CONTAINER ===== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    color: var(--text-dark);
}

/* ===== SELECTION ===== */
::selection {
    background: rgba(var(--blue-rgb), 0.2);
    color: var(--navy);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--navy-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--navy);
}

/* ===== ACCESSIBILITY ===== */

/* Screen-reader only: visible to assistive tech, hidden visually */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip navigation link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    background: var(--navy);
    color: var(--gold);
    padding: 12px 24px;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    font-size: 0.95rem;
    font-weight: 700;
    z-index: 10000;
    transition: top 0.2s ease;
    text-decoration: underline;
}
.skip-link:focus {
    top: 0;
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

/* Focus visible styles for all interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
}

/* Dark background focus override */
.navbar a:focus-visible,
.navbar button:focus-visible,
.footer a:focus-visible,
.footer button:focus-visible,
.page-hero a:focus-visible,
.hero a:focus-visible,
.hero button:focus-visible,
.cta-section a:focus-visible,
.screenshots-section a:focus-visible,
.project-stats a:focus-visible {
    outline-color: var(--gold);
}

/* Respect user motion preferences */
@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;
    }
    html {
        scroll-behavior: auto;
    }
}

/* High contrast mode support */
@media (prefers-contrast: more) {
    :root {
        --text-grey: #333;
        --divider: #666;
    }
    .nav-links a {
        color: rgba(255,255,255,0.9);
    }
    .section-subtitle,
    .footer {
        color: rgba(255,255,255,0.85);
    }
}

/* ARIA live region for dynamic announcements */
.aria-live-region {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
