/* ============================================
   BASE STYLES - Variables, Reset, Typography
   Reusable across the entire project
   ============================================ */

/* ---------- Root Variables ---------- */
/* Brand colours sampled directly from IHCC Parking Solutions brochure (PDF) */
:root {
    /* Brand Colors */
    --color-primary: #E43030;          /* IHCC brand red (logo bars / "PARKING SOLUTIONS") */
    --color-primary-dark: #C02424;     /* Darker red for hover / active states */
    --color-primary-light: #F25C5C;    /* Lighter red for tints */
    --color-primary-deep: #841818;     /* Deep red for gradients (cover panel of PDF) */
    --color-secondary: #404850;        /* IHCC dark slate (used for "IHCC" letters & headings) */
    --color-accent: #E43030;           /* Brand red - single accent across the site */
    --color-accent-dark: #C02424;      /* Red hover */

    /* Neutral Colors */
    --color-white: #ffffff;
    --color-black: #000000;
    --color-dark: #404850;             /* IHCC slate (softer than pure black, matches logo) */
    --color-text: #585858;             /* Body text - matches PDF subheaders */
    --color-text-light: #8A8F94;       /* Muted body text */
    --color-heading: #404850;
    --color-muted: #A0A0A0;

    /* Backgrounds */
    --color-bg: #ffffff;
    --color-bg-alt: #F6F7F8;           /* Soft cool-grey background */
    --color-bg-dark: #2A3038;          /* Deep slate background (footer / dark sections) */
    --color-border: #E5E7EA;
    --color-border-light: #F0F2F4;

    /* Typography */
    --font-primary: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --font-heading: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;

    /* Font sizes */
    --fs-xs: 12px;
    --fs-sm: 14px;
    --fs-base: 16px;
    --fs-md: 18px;
    --fs-lg: 20px;
    --fs-xl: 24px;
    --fs-2xl: 30px;
    --fs-3xl: 36px;
    --fs-4xl: 44px;
    --fs-5xl: 56px;

    /* Font weights */
    --fw-light: 300;
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --fw-extrabold: 800;

    /* Spacing */
    --space-xxs: 4px;
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 80px;
    --space-5xl: 120px;

    /* Layout */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 14px;
    --radius-xl: 22px;
    --radius-pill: 999px;

    /* Shadows */
    --shadow-sm: 0 2px 6px rgba(26, 26, 26, 0.05);
    --shadow-md: 0 8px 24px rgba(26, 26, 26, 0.08);
    --shadow-lg: 0 18px 40px rgba(26, 26, 26, 0.12);
    --shadow-primary: 0 12px 28px rgba(228, 48, 48, 0.28);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Header height (used to offset anchor links) */
    --header-height: 88px;
}

/* ---------- Global Reset ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    margin: 0;
    font-family: var(--font-primary);
    font-size: var(--fs-base);
    font-weight: var(--fw-regular);
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--color-primary-dark);
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

p {
    margin: 0 0 var(--space-md);
}

p:last-child {
    margin-bottom: 0;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: var(--fs-base);
}

figure {
    margin: 0;
}

section {
    position: relative;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 var(--space-md);
    font-family: var(--font-heading);
    font-weight: var(--fw-bold);
    line-height: 1.25;
    color: var(--color-heading);
}

h1 { font-size: var(--fs-5xl); }
h2 { font-size: var(--fs-4xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-md); }

/* ---------- Container ---------- */
.container {
    max-width: 1280px;
    padding-left: var(--space-md);
    padding-right: var(--space-md);
}

/* ============================================
   REUSABLE UTILITY CLASSES
   ============================================ */

/* ---------- Section Padding ---------- */
.section__padding {
    padding-top: var(--space-5xl);
    padding-bottom: var(--space-5xl);
}

.section__padding--sm {
    padding-top: var(--space-3xl);
    padding-bottom: var(--space-3xl);
}

/* ---------- Section Head ---------- */
.section__head {
    margin-bottom: var(--space-2xl);
}

.section__tag {
    display: inline-block;
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: var(--space-md);
    position: relative;
    padding-left: 40px;
}

.section__tag::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 2px;
    background-color: var(--color-primary);
}

.text-center .section__tag {
    padding-left: 40px;
    padding-right: 40px;
}

.text-center .section__tag::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 2px;
    background-color: var(--color-primary);
}

.section__title {
    font-size: var(--fs-4xl);
    font-weight: var(--fw-bold);
    color: var(--color-heading);
    margin-bottom: var(--space-md);
    line-height: 1.2;
}

.section__title span {
    color: var(--color-primary);
    position: relative;
}

.section__subtitle {
    font-size: var(--fs-md);
    color: var(--color-text-light);
    max-width: 720px;
    margin: 0 auto;
}

/* ---------- Buttons ---------- */
.btn__primary,
.btn__outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 14px 32px;
    font-family: var(--font-primary);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--radius-pill);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
}

.btn__primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.btn__primary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

.btn__primary--light {
    background-color: var(--color-white);
    color: var(--color-primary);
    border-color: var(--color-white);
}

.btn__primary--light:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-white);
}

.btn__outline {
    background-color: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

.btn__outline:hover {
    background-color: var(--color-white);
    color: var(--color-primary);
    transform: translateY(-2px);
}

/* ---------- Background helpers ---------- */
.bg__light {
    background-color: var(--color-bg-alt);
}

.bg__dark {
    background-color: var(--color-bg-dark);
    color: var(--color-white);
}

.bg__dark h1,
.bg__dark h2,
.bg__dark h3,
.bg__dark h4,
.bg__dark h5,
.bg__dark h6 {
    color: var(--color-white);
}

/* ---------- Text helpers ---------- */
.text__primary { color: var(--color-primary) !important; }
.text__accent { color: var(--color-accent) !important; }
.text__dark { color: var(--color-dark) !important; }
.text__muted { color: var(--color-muted) !important; }
.text__white { color: var(--color-white) !important; }

/* ---------- Scrollbar styling ---------- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--color-bg-alt);
}
::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-dark);
}

/* ---------- Selection ---------- */
::selection {
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade__in-up {
    animation: fadeInUp 0.8s ease forwards;
}

.fade__in {
    animation: fadeIn 0.8s ease forwards;
}


/* ============================================
   PRELOADER
   ============================================ */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-white);
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.is__hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
}

.preloader__logo img {
    max-height: 64px;
    width: auto;
    animation: preloaderLogoPulse 1.6s ease-in-out infinite;
}

@keyframes preloaderLogoPulse {
    0%, 100% { opacity: 1;   transform: scale(1); }
    50%      { opacity: 0.6; transform: scale(0.96); }
}

/* Spinner - 4 dots that pulse in sequence (parking-themed: like cars cycling) */
.preloader__spinner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.preloader__spinner span {
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: var(--color-primary);
    border-radius: 50%;
    animation: preloaderDot 1.2s ease-in-out infinite;
}

.preloader__spinner span:nth-child(1) { animation-delay: 0s;    }
.preloader__spinner span:nth-child(2) { animation-delay: 0.15s; }
.preloader__spinner span:nth-child(3) { animation-delay: 0.30s; }
.preloader__spinner span:nth-child(4) { animation-delay: 0.45s; }

@keyframes preloaderDot {
    0%, 100% { transform: translateY(0)    scale(1);   opacity: 0.4; }
    50%      { transform: translateY(-10px) scale(1.2); opacity: 1;   }
}

.preloader__text {
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin: 0;
}

.preloader__text span {
    display: inline-block;
    animation: preloaderTextDot 1.4s ease-in-out infinite;
    color: var(--color-primary);
}

.preloader__text span:nth-child(1) { animation-delay: 0s;   }
.preloader__text span:nth-child(2) { animation-delay: 0.2s; }
.preloader__text span:nth-child(3) { animation-delay: 0.4s; }

@keyframes preloaderTextDot {
    0%, 100% { opacity: 0.2; }
    50%      { opacity: 1;   }
}

/* Prevent scroll while preloader is showing */
body.preloader-active {
    overflow: hidden;
}
