/* ═══════════════════════════════════════════════════════════════════════════
   Jeddy Wellness — Reset & Typography
   ═══════════════════════════════════════════════════════════════════════════ */

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

html {
    scroll-behavior: smooth;
    /* Anchored program sections land below the sticky header */
    scroll-padding-top: calc(var(--header-height) + 1rem);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--weight-regular);
    line-height: var(--leading-normal);
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    color: var(--color-text);
    letter-spacing: -0.015em;
    text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 5.5vw, 4.25rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.75rem); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p { max-width: 68ch; }

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

img { display: block; max-width: 100%; height: auto; }
/* Icons are used inline beside text everywhere; flex containers blockify
   them anyway, so inline-block + middle keeps both contexts aligned. */
svg { display: inline-block; vertical-align: middle; max-width: 100%; }

ul[class], ol[class] { list-style: none; }

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

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

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

.u-primary { color: var(--color-primary); }

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

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

/* Screen-reader-only text */
.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 link — visible on focus */
.skip-link {
    position: fixed;
    top: 0; left: var(--space-4);
    transform: translateY(-110%);
    z-index: calc(var(--z-modal) + 1);
    padding: var(--space-3) var(--space-5);
    background: var(--color-primary-deep);
    color: var(--color-text-inverse);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    font-weight: var(--weight-semibold);
    transition: transform var(--transition-fast);
}
.skip-link:focus { transform: none; color: var(--color-text-inverse); }

/* Reduced motion: kill transitions & smooth scrolling */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
