/* CSS Document */

/* ==========================================================
   MOOSTER GROUP
   GLOBAL DESIGN SYSTEM

   File: /assets/css/style.css
   ========================================================== */


/* ==========================================================
   01. DESIGN TOKENS
   ========================================================== */

:root {

    /* Brand colours */

    --color-black: #101010;
    --color-black-soft: #181818;
    --color-charcoal: #242424;

    --color-white: #ffffff;
    --color-off-white: #f5f5f2;
    --color-light-grey: #e9e9e6;
    --color-mid-grey: #a0a0a0;
    --color-dark-grey: #626262;

    --color-orange: #ff6b00;
    --color-orange-hover: #e85f00;

    /* Semantic colours */

    --color-text: var(--color-black);
    --color-text-muted: var(--color-dark-grey);
    --color-background: var(--color-off-white);
    --color-border: rgba(16, 16, 16, 0.14);

    /* Typography */

    --font-primary:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Helvetica,
        Arial,
        sans-serif;

    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-heavy: 800;

    /* Fluid typography */

    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.375rem;

    --font-size-h4: clamp(1.4rem, 2vw, 2rem);
    --font-size-h3: clamp(1.8rem, 3vw, 3rem);
    --font-size-h2: clamp(2.5rem, 5vw, 5.5rem);
    --font-size-h1: clamp(3.5rem, 9vw, 10rem);

    /* Layout */

    --container-width: 1600px;
    --container-narrow: 960px;

    --page-gutter: clamp(20px, 4.5vw, 88px);

    --section-spacing: clamp(90px, 12vw, 200px);
    --section-spacing-small: clamp(60px, 8vw, 120px);

    /* Borders */

    --radius-small: 8px;
    --radius-medium: 16px;
    --radius-large: 28px;
    --radius-pill: 999px;

    /* Motion */

    --ease-standard: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-smooth: cubic-bezier(0.76, 0, 0.24, 1);

    --transition-fast: 180ms ease;
    --transition-medium: 350ms var(--ease-standard);
    --transition-slow: 700ms var(--ease-standard);

    /* Layers */

    --z-base: 1;
    --z-header: 1000;
    --z-menu: 1100;
    --z-modal: 2000;
}


/* ==========================================================
   02. RESET
   ========================================================== */

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

* {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 110px;
}

body {
    min-width: 320px;
    min-height: 100vh;
    overflow-x: clip;

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

    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-regular);
    line-height: 1.6;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Prevent long content from breaking responsive layouts */
p,
li,
blockquote {
    overflow-wrap: break-word;
}

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

img {
    height: auto;
}

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

button {
    cursor: pointer;
}

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

ul,
ol {
    list-style: none;
}

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

::selection {
    background: var(--color-orange);
    color: var(--color-white);
}


/* ==========================================================
   03. ACCESSIBILITY
   ========================================================== */

:focus-visible {
    outline: 2px solid var(--color-orange);
    outline-offset: 5px;
}

:focus:not(:focus-visible) {
    outline: none;
}

.skip-link {
    position: fixed;
    top: -100px;
    left: 20px;

    z-index: calc(var(--z-modal) + 1);

    padding: 12px 20px;

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

    font-weight: var(--font-weight-semibold);

    transition: top var(--transition-fast);
}

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

.sr-only {
    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;
}


/* ==========================================================
   04. TYPOGRAPHY
   ========================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-semibold);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

h1 {
    font-size: var(--font-size-h1);
    letter-spacing: -0.065em;
}

h2 {
    font-size: var(--font-size-h2);
}

h3 {
    font-size: var(--font-size-h3);
}

h4 {
    font-size: var(--font-size-h4);
}

p {
    line-height: 1.7;
}

strong,
b {
    font-weight: var(--font-weight-semibold);
}

small {
    font-size: var(--font-size-sm);
}

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

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

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

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

.text-uppercase {
    text-transform: uppercase;
}

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

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


/* ==========================================================
   05. CONTAINERS
   ========================================================== */

.container {
    width: 100%;
    max-width: var(--container-width);

    margin-inline: auto;
    padding-inline: var(--page-gutter);
}

.container--narrow {
    max-width: var(--container-narrow);
}

.container--full {
    max-width: none;
}

.section {
    position: relative;
    padding-block: var(--section-spacing);
}

.section--small {
    padding-block: var(--section-spacing-small);
}

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

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

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


/* ==========================================================
   06. GRID UTILITIES
   ========================================================== */

.grid {
    display: grid;
    gap: clamp(20px, 3vw, 48px);
}

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

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

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

.flex {
    display: flex;
}

.flex--between {
    justify-content: space-between;
}

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

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

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


/* ==========================================================
   07. SECTION LABELS
   ========================================================== */

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;

    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);

    line-height: 1.4;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";

    width: 7px;
    height: 7px;

    flex: 0 0 7px;

    border-radius: 50%;

    background: var(--color-orange);
}

.section-heading {
    max-width: 1100px;
    margin-top: clamp(25px, 4vw, 60px);
}

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

    margin-top: 30px;

    font-size: clamp(1.125rem, 1.6vw, 1.5rem);
    line-height: 1.6;
}


/* ==========================================================
   08. LINKS
   ========================================================== */

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 14px;

    padding-bottom: 8px;

    border-bottom: 1px solid currentColor;

    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);

    letter-spacing: 0.05em;
    text-transform: uppercase;

    transition:
        color var(--transition-medium),
        gap var(--transition-medium);
}

.text-link:hover {
    gap: 22px;
    color: var(--color-orange);
}

.text-link__arrow {
    font-size: 1.25em;
    line-height: 1;
}


/* ==========================================================
   09. DIVIDERS
   ========================================================== */

.divider {
    width: 100%;
    height: 1px;

    border: 0;

    background: var(--color-border);
}

.divider--light {
    background: rgba(255, 255, 255, 0.2);
}


/* ==========================================================
   10. IMAGE UTILITIES
   ========================================================== */

.image-cover {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.image-contain {
    width: 100%;
    height: 100%;

    object-fit: contain;
}

.image-frame {
    position: relative;
    overflow: hidden;

    background: var(--color-light-grey);
}

.image-frame img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* ==========================================================
   11. ANIMATION FOUNDATIONS
   ========================================================== */

.reveal {
    opacity: 1;
    transform: none;
}

.js-animations-ready .reveal {
    opacity: 0;
    transform: translateY(35px);

    transition:
        opacity 850ms var(--ease-standard),
        transform 850ms var(--ease-standard);
}

.js-animations-ready .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 100ms !important;
}

.reveal-delay-2 {
    transition-delay: 200ms !important;
}

.reveal-delay-3 {
    transition-delay: 300ms !important;
}


/* ==========================================================
   12. RESPONSIVE FOUNDATIONS
   ========================================================== */

@media (max-width: 1024px) {

    :root {
        --section-spacing: 110px;
        --section-spacing-small: 75px;
    }

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

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

}

@media (max-width: 767px) {

   :root {
    --page-gutter: 22px;

    --section-spacing: 80px;
    --section-spacing-small: 55px;

    --font-size-h1: clamp(2.75rem, 10vw, 5.5rem);
    --font-size-h2: clamp(2.25rem, 7vw, 4rem);
}

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

    .section-intro {
        margin-top: 22px;
    }

    .text-link {
        font-size: 0.8rem;
    }

}


/* ==========================================================
   13. REDUCED MOTION
   ========================================================== */

@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;
        transition-delay: 0ms !important;
    }

    .js-animations-ready .reveal {
        opacity: 1;
        transform: none;
    }

}

/* ==========================================================
   EXTRA SMALL SCREENS
   ========================================================== */

@media (max-width: 375px) {

    :root {
        --page-gutter: 18px;
    }

    .eyebrow {
        font-size: 0.68rem;
        letter-spacing: 0.12em;
    }

}