/* ============================================
   PixelScale.de – Base Styles
   Reset, Fonts, Typography, Global Defaults
   ============================================ */

/* ── Font Face (Poppins – lokal) ── */
@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/Poppins-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/Poppins-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/Poppins-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/Poppins-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/Poppins-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/Poppins-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* ── Modern Reset ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: var(--fs-base);
    font-weight: var(--fw-regular);
    line-height: var(--lh-normal);
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
    min-height: 100dvh;
}

/* Prevent layout shift from scrollbar */
body {
    scrollbar-gutter: stable;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

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

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

ul,
ol {
    list-style: none;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
    letter-spacing: var(--ls-tight);
    color: var(--color-text);
    text-wrap: balance;
    overflow-wrap: break-word;
    word-break: break-word;
}

h1 {
    font-size: var(--fs-4xl);
    font-weight: var(--fw-extrabold);
    letter-spacing: -0.04em;
}

h2 {
    font-size: var(--fs-3xl);
    font-weight: var(--fw-bold);
}

h3 {
    font-size: var(--fs-2xl);
    font-weight: var(--fw-semibold);
}

h4 {
    font-size: var(--fs-xl);
    font-weight: var(--fw-semibold);
}

h5 {
    font-size: var(--fs-lg);
    font-weight: var(--fw-medium);
}

h6 {
    font-size: var(--fs-md);
    font-weight: var(--fw-medium);
}

p {
    max-width: 70ch;
    text-wrap: pretty;
}

p + p {
    margin-top: var(--space-md);
}

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

small {
    font-size: var(--fs-sm);
}

/* ── Selection ── */
::selection {
    background-color: var(--color-primary);
    color: white;
}

/* ── Focus Styles ── */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-tertiary);
}

/* ── Utility: 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-width: 0;
}
