/* ==========================================================================
   Base: design tokens, reset, typography, shared utilities
   ========================================================================== */

:root {
    --primary-color: #1a5490;
    --secondary-color: #2980b9;
    --accent-color: #e74c3c;
    --dark-bg: #1e2832;
    --light-bg: #f8f9fa;
    --text-dark: #2c3e50;
    --text-light: #5f6b6d;
    --success-color: #1e8449;
    --warning-color: #b9770e;
    --border-color: #e0e6ed;

    --radius: 10px;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 15px 30px rgba(0, 0, 0, 0.15);
    --transition: 0.3s ease;

    --container-width: 1200px;
    --gutter: clamp(16px, 4vw, 20px);
    --header-h: 64px;

    --font-sans: 'Segoe UI', Tahoma, Geneva, Verdana, 'Noto Sans Tamil', 'Latha', sans-serif;
}

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

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

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text-dark);
    background: #fff;
    min-width: 320px;
    overflow-x: hidden;
    padding-top: var(--header-h);
}

img,
svg {
    max-width: 100%;
    height: auto;
}

button {
    font: inherit;
}

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

:focus-visible {
    outline: 3px solid #f1c40f;
    outline-offset: 2px;
}

/* Fixed header must not cover anchor targets */
[id] {
    scroll-margin-top: calc(var(--header-h) + 10px);
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 2000;
    background: #fff;
    color: var(--primary-color);
    padding: 10px 16px;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    transition: top var(--transition);
}

.skip-link:focus {
    top: 12px;
}

.mt-sm {
    margin-top: 15px;
}

/* Scroll-reveal (enabled only when JS runs and motion is allowed) */
@media (prefers-reduced-motion: no-preference) {
    .js .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.6s ease, transform 0.6s ease, box-shadow var(--transition);
    }

    .js .reveal.is-visible {
        opacity: 1;
        transform: none;
    }
}

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

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: none; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: none; }
}
