/* ==========================================================================
   ColdStorage Canada — Design System
   Global CSS imported by every page. Defines tokens, reset, base typography,
   and shared utility classes. No page-specific styles belong in this file.
   ========================================================================== */


/* ==========================================================================
   SECTION 1 — Google Fonts Import
   Loads Inter (400, 500, 600, 700) for use across the entire site.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');


/* ==========================================================================
   SECTION 2 — CSS Reset
   Normalizes default browser styling so layout and typography behave
   predictably across pages and components.
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

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

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

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}


/* ==========================================================================
   SECTION 3 — CSS Custom Properties (Design Tokens)
   The single source of truth for color, type, spacing, shadow, radius,
   transition, and layout values. Every other rule references these.
   ========================================================================== */
:root {
    /* Colors — Brand */
    --color-primary: #0A1628;
    --color-secondary: #1E3A5F;
    --color-accent: #0066CC;
    --color-accent-light: #E8F4FD;

    /* Colors — Status */
    --color-success: #1A7F4B;
    --color-warning: #B45309;
    --color-error: #DC2626;

    /* Colors — Neutrals */
    --color-neutral-900: #111827;
    --color-neutral-600: #4B5563;
    --color-neutral-400: #9CA3AF;
    --color-neutral-300: #D1D5DB;
    --color-neutral-100: #F3F4F6;
    --color-white: #FFFFFF;

    /* Typography — Family */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;

    /* Typography — Size scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;

    /* Typography — Weights */
    --font-regular: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    /* Typography — Line heights */
    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.75;

    /* Spacing — 8px base scale */
    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2rem;
    --space-5: 2.5rem;
    --space-6: 3rem;
    --space-8: 4rem;
    --space-10: 5rem;
    --space-12: 6rem;
    --space-16: 8rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.10);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);

    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;

    /* Layout */
    --max-width: 1280px;
    --nav-height: 72px;
}


/* ==========================================================================
   SECTION 4 — Base Typography
   Default styling for body and text elements. Mobile-first sizes for
   headings; desktop sizes applied at the 768px breakpoint.
   ========================================================================== */
body {
    font-family: var(--font-family);
    font-size: var(--text-base);
    font-weight: var(--font-regular);
    line-height: var(--leading-normal);
    color: var(--color-neutral-900);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-family);
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    color: var(--color-neutral-900);
}

/* Mobile-first heading sizes */
h1 {
    font-size: var(--text-4xl);
}

h2 {
    font-size: var(--text-3xl);
}

h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
}

h4 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
}

h5 {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
}

h6 {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
}

p {
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--color-neutral-900);
}

a {
    color: var(--color-accent);
    transition: color var(--transition-base);
}

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

strong {
    font-weight: var(--font-semibold);
    color: var(--color-neutral-900);
}

em {
    font-style: italic;
}

/* Desktop heading sizes — applied at tablet breakpoint and up */
@media (min-width: 768px) {
    h1 {
        font-size: var(--text-5xl);
    }

    h2 {
        font-size: var(--text-4xl);
    }

    h3 {
        font-size: var(--text-2xl);
    }
}


/* ==========================================================================
   SECTION 5 — Layout Utilities
   Container and grid/flex helpers used to compose page layouts.
   Mobile-first; columns expand at defined breakpoints.
   ========================================================================== */

/* .container — centers content and applies responsive horizontal padding */
.container {
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-3);
    padding-right: var(--space-3);
    width: 100%;
}

@media (min-width: 768px) {
    .container {
        padding-left: var(--space-6);
        padding-right: var(--space-6);
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: var(--space-10);
        padding-right: var(--space-10);
    }
}

/* Grid utilities */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
}

.grid-4 {
    display: grid;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Flex utilities */
.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

/* Gap utilities — work for both grid and flex containers */
.gap-1 {
    gap: var(--space-1);
}

.gap-2 {
    gap: var(--space-2);
}

.gap-3 {
    gap: var(--space-3);
}

.gap-4 {
    gap: var(--space-4);
}

.gap-5 {
    gap: var(--space-5);
}

.gap-6 {
    gap: var(--space-6);
}


/* ==========================================================================
   SECTION 6 — Spacing Utilities
   Margin/padding helpers for vertical rhythm and a section padding helper
   for consistent top/bottom space on full-width page sections.
   ========================================================================== */

/* Margin top */
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-7 { margin-top: var(--space-8); }
.mt-8 { margin-top: var(--space-10); }

/* Margin bottom */
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-7 { margin-bottom: var(--space-8); }
.mb-8 { margin-bottom: var(--space-10); }

/* Padding top */
.pt-1 { padding-top: var(--space-1); }
.pt-2 { padding-top: var(--space-2); }
.pt-3 { padding-top: var(--space-3); }
.pt-4 { padding-top: var(--space-4); }
.pt-5 { padding-top: var(--space-5); }
.pt-6 { padding-top: var(--space-6); }
.pt-7 { padding-top: var(--space-8); }
.pt-8 { padding-top: var(--space-10); }

/* Padding bottom */
.pb-1 { padding-bottom: var(--space-1); }
.pb-2 { padding-bottom: var(--space-2); }
.pb-3 { padding-bottom: var(--space-3); }
.pb-4 { padding-bottom: var(--space-4); }
.pb-5 { padding-bottom: var(--space-5); }
.pb-6 { padding-bottom: var(--space-6); }
.pb-7 { padding-bottom: var(--space-8); }
.pb-8 { padding-bottom: var(--space-10); }

/* Section padding — consistent vertical space on page sections */
.py-section {
    padding-top: var(--space-10);
    padding-bottom: var(--space-10);
}


/* ==========================================================================
   SECTION 7 — Display & Text Utilities
   Common alignment, color, weight, and visibility helpers.
   ========================================================================== */

/* Text alignment */
.text-center {
    text-align: center;
}

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

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

/* Text colors */
.text-white {
    color: var(--color-white);
}

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

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

/* Font weights */
.font-medium {
    font-weight: var(--font-medium);
}

.font-semibold {
    font-weight: var(--font-semibold);
}

.font-bold {
    font-weight: var(--font-bold);
}

/* Visibility */
.hidden {
    display: none;
}

/* .sr-only — hides element visually but keeps it accessible to screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* ==========================================================================
   SECTION 8 — Section Backgrounds
   Reusable background treatments for full-width page sections.
   .section-dark also flips text color to white for legibility.
   ========================================================================== */
.section-white {
    background-color: var(--color-white);
}

.section-light {
    background-color: var(--color-neutral-100);
}

.section-dark {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4,
.section-dark h5,
.section-dark h6,
.section-dark p {
    color: var(--color-white);
}

.section-accent {
    background-color: var(--color-accent-light);
}

/* End of file */
