/* =========================================================
   MegVolt Tech Website
   Version: 0.2 — Modular Rebuild

   File:
   /assets/css/main.css

   Purpose:
   - CSS reset
   - Global design tokens
   - Shared typography
   - Global container
   - Shared buttons
   - Common utilities

   Module-specific styling MUST remain in its own CSS file.
   ========================================================= */


/* =========================================================
   1. DESIGN TOKENS
   ========================================================= */

:root {
    /* Brand colours */
    --color-red: #D71920;
    --color-red-dark: #B91319;
    --color-red-deep: #8F0F14;

    --color-black: #111111;
    --color-black-soft: #1A1A1A;
    --color-charcoal: #2A2A2A;

    --color-white: #FFFFFF;
    --color-off-white: #F7F7F7;
    --color-light: #EFEFEF;

    --color-gray-100: #F5F5F5;
    --color-gray-200: #E8E8E8;
    --color-gray-300: #D2D2D2;
    --color-gray-500: #777777;
    --color-gray-600: #5F5F5F;
    --color-gray-700: #444444;

    /* Text */
    --color-text: #222222;
    --color-text-muted: #666666;
    --color-text-light: #FFFFFF;

    /* Borders */
    --color-border: #E2E2E2;

    /* Fonts */
    --font-primary:
        "Inter",
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    /* Container */
    --container-width: 92%;
    --container-max: 1440px;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 14px;
    --radius-pill: 999px;

    /* Shadows */
    --shadow-sm:
        0 4px 16px rgba(0, 0, 0, 0.06);

    --shadow-md:
        0 12px 32px rgba(0, 0, 0, 0.10);

    /* Transitions */
    --transition-fast: 160ms ease;
    --transition-base: 240ms ease;

    /* Layering */
    --z-header: 1000;
}


/* =========================================================
   2. RESET / NORMALISATION
   ========================================================= */

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

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

body {
    margin: 0;
    padding: 0;

    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;

    color: var(--color-text);
    background: var(--color-white);

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body,
button,
input,
textarea,
select {
    font-family: var(--font-primary);
}

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

img {
    height: auto;
}

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

button {
    border: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    margin: 0;
    padding: 0;
}

figure,
blockquote,
dl,
dd {
    margin: 0;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}


/* =========================================================
   3. GLOBAL PAGE STRUCTURE
   ========================================================= */

.site-main {
    width: 100%;
    overflow: clip;
}

.container {
    width: var(--container-width);
    max-width: var(--container-max);
    margin-inline: auto;
}


/* =========================================================
   4. TYPOGRAPHY
   ========================================================= */

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-black);
    font-weight: 700;
    line-height: 1.15;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.75rem);
    letter-spacing: -0.045em;
}

h2 {
    font-size: clamp(2rem, 3.5vw, 3.25rem);
    letter-spacing: -0.035em;
}

h3 {
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    letter-spacing: -0.02em;
}

h4 {
    font-size: 1.2rem;
}

h5 {
    font-size: 1rem;
}

h6 {
    font-size: 0.875rem;
}

p {
    margin-bottom: 1rem;
}

p:last-child {
    margin-bottom: 0;
}

strong,
b {
    font-weight: 700;
}


/* =========================================================
   5. SHARED SECTION TYPOGRAPHY
   ========================================================= */

.section-eyebrow {
    display: inline-block;
    margin-bottom: var(--space-3);

    color: var(--color-red);

    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.section-title {
    margin-bottom: var(--space-4);
}

.section-intro {
    max-width: 720px;

    color: var(--color-text-muted);
    font-size: clamp(1rem, 1.4vw, 1.125rem);
    line-height: 1.7;
}


/* =========================================================
   6. SHARED BUTTONS
   ========================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);

    min-height: 48px;
    padding: 0.75rem 1.5rem;

    border: 1px solid transparent;
    border-radius: var(--radius-sm);

    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.015em;

    cursor: pointer;

    transition:
        background-color var(--transition-base),
        border-color var(--transition-base),
        color var(--transition-base),
        transform var(--transition-fast),
        box-shadow var(--transition-base);
}

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

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    color: var(--color-white);
    background: var(--color-red);
    border-color: var(--color-red);
}

.btn-primary:hover {
    background: var(--color-red-dark);
    border-color: var(--color-red-dark);
}

.btn-dark {
    color: var(--color-white);
    background: var(--color-black);
    border-color: var(--color-black);
}

.btn-dark:hover {
    background: var(--color-charcoal);
    border-color: var(--color-charcoal);
}

.btn-outline {
    color: var(--color-black);
    background: transparent;
    border-color: var(--color-black);
}

.btn-outline:hover {
    color: var(--color-white);
    background: var(--color-black);
}

.btn-outline-light {
    color: var(--color-white);
    background: transparent;
    border-color: rgba(255, 255, 255, 0.65);
}

.btn-outline-light:hover {
    color: var(--color-black);
    background: var(--color-white);
    border-color: var(--color-white);
}


/* =========================================================
   7. ACCESSIBILITY / KEYBOARD FOCUS
   ========================================================= */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid rgba(215, 25, 32, 0.35);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    top: 0;
    left: 1rem;
    z-index: 9999;

    padding: 0.75rem 1rem;

    color: var(--color-white);
    background: var(--color-red);

    font-size: 0.875rem;
    font-weight: 700;

    transform: translateY(-120%);
    transition: transform var(--transition-fast);
}

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


/* =========================================================
   8. COMMON UTILITIES
   ========================================================= */

.text-red {
    color: var(--color-red);
}

.text-white {
    color: var(--color-white);
}

.text-muted {
    color: var(--color-text-muted);
}

.bg-white {
    background-color: var(--color-white);
}

.bg-light {
    background-color: var(--color-off-white);
}

.bg-black {
    background-color: var(--color-black);
}

.text-center {
    text-align: center;
}

.visually-hidden {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    padding: 0 !important;
    margin: -1px !important;

    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;

    border: 0 !important;
}


/* =========================================================
   9. RESPONSIVE GLOBAL ADJUSTMENTS
   ========================================================= */

@media (max-width: 1024px) {
    :root {
        --container-width: 90%;
    }
}

@media (max-width: 768px) {
    :root {
        --container-width: calc(100% - 32px);
    }

    body {
        font-size: 15px;
    }

    .btn {
        min-height: 46px;
        padding-inline: 1.25rem;
    }
}

@media (max-width: 480px) {
    :root {
        --container-width: calc(100% - 24px);
    }

    h1 {
        font-size: clamp(2.25rem, 12vw, 3rem);
    }

    h2 {
        font-size: clamp(1.75rem, 9vw, 2.35rem);
    }
}


/* =========================================================
   10. REDUCED MOTION
   ========================================================= */

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

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}