/* ============================================================================
   WellApp Design System 2026 — Base
   ----------------------------------------------------------------------------
   Reset + body alapok + tipográfia + skip-link + prefers-reduced-motion.
   Forrás: docs/DESIGN_SYSTEM_2026.md (Sprint 1)

   FONTOS: ez a fájl SZÁNDÉKOSAN visszafogott, hogy a meglévő dashboard.css /
   company.css stílusok ne sérüljenek. A Tailwind CDN preflight-tal kompatibilis.
   ============================================================================ */

/* === MINIMÁL RESET === */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    text-rendering: optimizeLegibility;
}

/* === BODY === */
body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === HEADING TIPOGRÁFIA === */
/* Csak ott aktiválódik, ahol a HTML nincs felülírva inline / page-CSS-sel.
   Ha egy meglévő oldal saját h1-h4 stílussal él, az később jön a kaszkádban
   és felülírja ezeket — szándékos. */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    color: var(--color-text);
    line-height: var(--leading-tight);
    font-weight: var(--weight-semibold);
}

/* === LINKEK === */
a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out-expo);
}

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

a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* === FOCUS-VISIBLE GLOBÁLIS === */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Mouse-os kattintásnál nincs ronda outline (Chrome / FF támogatja) */
:focus:not(:focus-visible) {
    outline: none;
}

/* === SKIP LINK (WCAG 2.4.1) === */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--color-primary);
    color: var(--color-text-inverse);
    padding: var(--space-3) var(--space-4);
    border-radius: 0 0 var(--radius-md) 0;
    z-index: var(--z-skiplink);
    text-decoration: none;
    font-weight: var(--weight-semibold);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    transition: top var(--duration-fast) var(--ease-out-expo);
}

.skip-link:focus {
    top: 0;
    color: var(--color-text-inverse);
}

/* === 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;
}

.sr-only-focusable:focus,
.sr-only-focusable:active {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* === MEDIA ALAPÉRTÉKEK === */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

/* === FORM ALAPOK === */
input, button, textarea, select {
    font: inherit;
    color: inherit;
}

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

button:disabled {
    cursor: not-allowed;
}

/* === STANDARD KEYFRAMES (komponensek használhatják) === */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.5; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* === PREFERS-REDUCED-MOTION (WCAG 2.3.3) === */
@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;
    }
}
