/* ============================================
   Timexora — Base / Reset
   Element defaults and typography. No component-specific styling here.
   ============================================ */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-main);
    color: var(--color-ink);
    background: var(--color-surface);
    line-height: 1.55;
    font-size: 16px;
}

/* Sticky footer: on short pages (e.g. an empty gallery) main grows to fill
   the viewport so the footer stays pinned to the bottom instead of
   floating mid-page with a gap of body background beneath it. */
body > main {
    flex: 1 0 auto;
}

img, svg {
    display: block;
    max-width: 100%;
}

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

h1, h2, h3, h4 {
    margin: 0 0 var(--space-3);
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4vw + 1rem, 3.25rem); }
h2 { font-size: clamp(1.5rem, 2vw + 1rem, 2.25rem); }
h3 { font-size: 1.25rem; }

p {
    margin: 0 0 var(--space-3);
    color: var(--color-ink-muted);
}

button {
    font-family: inherit;
}

/* Consistent, visible focus ring for keyboard users — accessibility matters for SEO/UX quality */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-5);
}

.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 var(--space-5);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}
