/**
 * Base Styles
 * CSS Reset and fundamental styles
 * 
 * @package OGULCAN_Theme
 * @requirements 2.1, 2.2
 */

/* ==========================================================================
   CSS Reset / Normalize
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Remove default margin and padding */
html,
body,
h1, h2, h3, h4, h5, h6,
p,
blockquote,
pre,
dl, dd,
ol, ul,
figure,
hr,
fieldset,
legend {
    margin: 0;
    padding: 0;
}

/* Set core root defaults */
html {
    font-size: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Set core body defaults */
body {
    min-height: 100vh;
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--color-text);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ==========================================================================
   Typography Base
   ========================================================================== */

/* Remove list styles on ul, ol elements with a list role */
ul[role='list'],
ol[role='list'] {
    list-style: none;
}

/* Set shorter line heights on headings and interactive elements */
h1, h2, h3, h4, h5, h6,
button,
input,
label {
    line-height: var(--line-height-tight);
}

/* Balance text wrapping on headings */
h1, h2, h3, h4, h5, h6 {
    text-wrap: balance;
}

/* ==========================================================================
   Links
   ========================================================================== */

a {
    color: inherit;
    text-decoration: none;
    text-decoration-skip-ink: auto;
}

a:not([class]) {
    color: var(--color-secondary);
    text-decoration: underline;
    text-underline-offset: 0.2em;
    transition: color var(--transition-fast);
}

a:not([class]):hover {
    color: var(--color-secondary-dark);
}

/* ==========================================================================
   Media Elements
   ========================================================================== */

/* 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;
}

/* ==========================================================================
   Tables
   ========================================================================== */

table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
}

/* ==========================================================================
   Forms
   ========================================================================== */

/* Remove default fieldset styles */
fieldset {
    border: 0;
    padding: 0;
    margin: 0;
    min-width: 0;
}

/* Textarea resize only vertically */
textarea {
    resize: vertical;
}

/* Remove default input appearance */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
    -webkit-appearance: none;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

/* Remove all animations and transitions for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus visible styles */
:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    z-index: var(--z-tooltip);
    padding: var(--space-sm) var(--space-md);
    background-color: var(--color-primary);
    color: var(--color-white);
    font-weight: var(--font-weight-medium);
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 0;
}

/* Screen reader only */
.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;
}

/* ==========================================================================
   Selection
   ========================================================================== */

::selection {
    background-color: var(--color-secondary);
    color: var(--color-white);
}

::-moz-selection {
    background-color: var(--color-secondary);
    color: var(--color-white);
}

/* ==========================================================================
   Scrollbar Styling (Webkit)
   ========================================================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-light);
}

::-webkit-scrollbar-thumb {
    background: var(--color-gray-400);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-500);
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

/* Clearfix */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Hidden */
.hidden {
    display: none !important;
}

/* Visible */
.visible {
    visibility: visible !important;
}

/* Invisible */
.invisible {
    visibility: hidden !important;
}
