/* ==========================================================
   TAPPITRACK — GLOBAL FOUNDATION
   Tokens, reset, typography and shared components.
   Load first on every page.
   ========================================================== */

:root {
    /* Brand */
    --tt-blue: #0067EE;
    --tt-blue-dark: #0052BF;
    --tt-blue-soft: #EAF2FF;
    --tt-red: #FF0F1D;
    --tt-dark: #102A43;
    --tt-text: #243B53;
    --tt-muted: #5F738A;
    --tt-border: #E2E8F0;
    --tt-light: #F5F8FC;
    --tt-white: #FFFFFF;
    --tt-success: #168151;

    /* Hero panel tones: deeper, muted shades of the brand blue family.
       Each keeps white text above WCAG AA contrast. Pages pick one so
       neighbouring sections don't all look the same. */
    --tt-tone-ocean: #0B4EA2;
    --tt-tone-steel: #1F5F8B;
    --tt-tone-slate: #3E5566;
    --tt-tone-teal: #1D6070;
    --tt-tone-indigo: #2E4A8C;

    /* Type */
    --tt-font-heading: "Manrope", "Inter", Arial, sans-serif;
    --tt-font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

    /* Layout */
    --tt-container: 1280px;
    --tt-gutter: clamp(16px, 4vw, 40px);
    --tt-radius-sm: 8px;
    --tt-radius: 14px;
    --tt-radius-lg: 22px;

    /* Effects */
    --tt-shadow-sm: 0 4px 14px rgba(16, 42, 67, 0.08);
    --tt-shadow: 0 18px 42px rgba(16, 42, 67, 0.12);
    --tt-ease: cubic-bezier(0.22, 1, 0.36, 1);

    /* Header height, used for anchor offsets */
    --tt-header-height: 76px;
}

/* ---------- Reset ---------- */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--tt-header-height) + 16px);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-width: 0;
    color: var(--tt-text);
    background: var(--tt-white);
    font-family: var(--tt-font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body.is-scroll-locked {
    overflow: hidden;
}

h1,
h2,
h3,
h4 {
    color: var(--tt-dark);
    font-family: var(--tt-font-heading);
    line-height: 1.15;
}

a {
    color: inherit;
}

img,
video,
canvas,
svg,
iframe {
    max-width: 100%;
}

img,
video {
    height: auto;
}

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

main,
section,
header,
footer,
nav,
article,
aside {
    min-width: 0;
}

:focus-visible {
    outline: 3px solid rgba(0, 103, 238, 0.55);
    outline-offset: 3px;
}

/* ---------- Accessibility helpers ---------- */

.tt-skip-link {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2000;
    padding: 10px 16px;
    color: var(--tt-white);
    background: var(--tt-dark);
    border-radius: var(--tt-radius-sm);
    font-weight: 700;
    text-decoration: none;
    transform: translateY(-150%);
    transition: transform 160ms ease;
}

.tt-skip-link:focus {
    transform: translateY(0);
}

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

/* ---------- Layout ---------- */

.tt-container {
    width: min(100% - 2 * var(--tt-gutter), var(--tt-container));
    margin-inline: auto;
}

/* ---------- Buttons (shared by header, hero, modal) ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: var(--tt-radius-sm);
    font-family: var(--tt-font-body);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition:
        background-color 180ms ease,
        border-color 180ms ease,
        color 180ms ease,
        transform 180ms ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    color: var(--tt-white);
    background: var(--tt-blue);
}

.btn-primary:hover {
    background: var(--tt-blue-dark);
}

.btn-outline {
    color: var(--tt-dark);
    background: transparent;
    border-color: #C9D5E3;
}

.btn-outline:hover {
    color: var(--tt-blue);
    border-color: var(--tt-blue);
}

.btn-light {
    color: var(--tt-white);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.55);
}

.btn-light:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: var(--tt-white);
}

/* ---------- Motion preferences ---------- */

@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;
        scroll-behavior: auto !important;
    }
}
