/* --------------------

TABLE OF CONTENTS 

# GLOBALS
    # DEFINE GLOBAL VARIABLES (CUSTOM PROPERTIES)
    # SET GLOBAL COLORS
    # SET GLOBAL TYPOGRAPHY
    # GLOBAL MEDIA (images, video, svg)
    # GLOBAL HELPERS
    # GLOBAL RESETS
        # ENABLE SMOOTH SCROLLING

# LAYOUT
    # CONTAINER
    # GRID SYSTEM (12 column)

# SITE STRUCTURE
    # HEADER
        # LOGO
        # SITE NAV
    # MAIN
        # SECTIONS
    # FOOTER

# UI COMPONENTS
    # BUTTONS
    # CARDS
    # HR (HORIZONTAL RULE)
    # CODE BLOCKS
    # SWIPER SLIDER (CAROUSEL)

    (WE WILL ADD MORE HERE)

# CUSTOM SITE STYLING (OPINIONATED)
    # BODY GRID LAYOUT SYSTEM (header, main, and footer)
    # HEADER ON TOP OF HERO
    # CUSTOM HERO STYLING
    # CUSTOM PAGE LAYOUT - 2 COLUMNS: ASIDE + MAIN CONTENT
    # STICKYBOX
    # NMA TYPE BLOCK

# ANIMATIONS
    # REGULAR ON PAGE LOAD ANIMATIONS
    # SCROLL-TRIGGERED ANIMATIONS

----------------------- */

/* ------------------
        GLOBALS 
--------------------- */

/* DEFINE GLOBAL VARIABLES */
:root {

    /* ===== Aether palette & tokens ===== */
    --bg: #f8f8f5;
    /* off-white main background */
    --card: #ffffff;
    --text-dark: #0b1220;
    /* default body/headline color (light backgrounds) */
    --muted: #6b7482;
    /* secondary text */
    --primary: #16204d;
    /* deep navy */
    --primary-600: #243c7a;
    /* lighter navy */
    --accent: #f4c95d;
    /* soft gold */
    --radius-lg: 20px;
    --container: 1100px;
    --gap: 1.25rem;
    --shadow: 0 8px 24px rgba(11, 35, 64, 0.06);
    --card-shadow: 0 6px 18px rgba(11, 35, 64, 0.05);
    --teal-acc: #2b89a8;
    /* small accent (arrows/caret) */

    /* Base colors */
    --color-white: #ffffff;
    --color-black: #000000;
    --color-black-80: rgba(11, 18, 32, .85);

    --color-grey-100: rgb(0 0 0 / .05);
    --color-grey-200: rgb(0 0 0 / .2);

    /* Navy family */
    --color-blue-100: #cbd0e3;
    /* subtle underline/tint */
    --color-blue-400: #16204d;
    /* = --primary */
    --color-blue-800: #243c7a;
    /* = --primary-600 */
    --color-blue-900: #081531;
    /* extra-deep for hero */

    /* Semantics */
    --color-body-background: var(--bg);
    --color-body-text: var(--text-dark);
    --color-body-text-dark: var(--text-dark);

    --color-primary: var(--primary);
    --color-primary-dark: var(--color-blue-900);
    --color-secondary: var(--accent);

    /* Links (light theme defaults) */
    --color-links: var(--color-blue-800);
    --color-links-hover: var(--color-blue-900);
    --color-links-light: var(--color-blue-100);

    /* Sections */
    --color-siteheader-background: transparent;
    --color-siteheader-links: var(--text-dark);
    --color-siteheader-links-hover: var(--primary);
    --color-sitefooter-background: var(--color-grey-100);
    --color-hero-background: var(--color-blue-900);
    /* #081531 */

    /* Contrast tokens when on dark backgrounds (hero/header overlay) */
    --on-dark-text: #ffffff;
    --on-dark-text-soft: rgba(255, 255, 255, .85);
    --on-dark-muted: rgba(255, 255, 255, .75);
    --on-dark-underline: rgba(255, 255, 255, .5);

    /* Borders */
    --color-border: var(--color-grey-200);
    --border-radius: 5px;
    --border-thickness: .5px;

    /* Spacing */
    --unit-2xs: 0.25rem;
    --unit-xs: 0.5rem;
    --unit-s: 1rem;
    --unit-m: 1.5rem;
    --unit-l: 2rem;
    --unit-xl: 3rem;
    --unit-2xl: 4rem;
    --unit-3xl: 6rem;
    --container-width: 1100px;

    /* Fonts */
    --font-body: system-ui, Helvetica, Arial, sans-serif;
    --font-headings: Georgia, Times, "Times New Roman", serif;
}

/* SET GLOBAL COLORS */
body {
    background-color: var(--color-body-background);
    color: var(--color-body-text);
}

/* HEADINGS */
h1,
h2,
h3 {
    color: var(--color-body-text-dark);
    text-wrap: balance;
}

/* Paragraphs */
p {
    max-inline-size: 66ch;
}

/* Remove widows for paragraphs and list items */
p,
li {
    text-wrap: pretty;
}

/* LINKS */
a {
    color: var(--color-links);
    text-decoration-color: var(--color-links-light);
    text-underline-offset: .135em;
    text-decoration-thickness: .1em;
}

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

/* GLOBAL TYPOGRAPHY */
body {
    font-family: var(--font-body);
    font-size: 100%;
    line-height: 1.4;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-headings);
}

/* GLOBAL MEDIA */
img {
    max-width: 100%;
    height: auto;
}

/* HELPERS */
.text-centered {
    text-align: center;
}

.text-centered p {
    margin-inline: auto;
}

/* Visually hidden */
.hide-visually,
.visually-hidden,
.screen-reader-only {
    position: absolute;
    top: -9999px;
    left: -9999px;
}

/* RESETS */
body {
    margin: 0;
}

* {
    box-sizing: border-box;
}

/* SMOOTH SCROLLING */
html {
    scroll-behavior: smooth;
}

/* Offset for hash links */
:target {
    scroll-margin-top: var(--unit-m);
}

/* ------------------
        LAYOUT 
--------------------- */
.container {
    max-width: var(--container-width);
    margin-inline: auto;
    padding-inline: var(--unit-s);
}

/* GRID SYSTEM (12 column) */
.row {
    --grid-gap: var(--unit-s);
}

.row>* {
    margin-block-end: var(--grid-gap);
}

@media (width >=768px) {
    .row {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        gap: var(--grid-gap);
    }

    .one-whole {
        grid-column: auto / span 12;
    }

    .one-half {
        grid-column: auto / span 6;
    }

    .one-third {
        grid-column: auto / span 4;
    }

    .two-thirds {
        grid-column: auto / span 8;
    }

    .one-fourth {
        grid-column: auto / span 3;
    }

    .three-fourths {
        grid-column: auto / span 9;
    }

    .row.swapped>*:first-child {
        order: 2;
    }

    .row.swapped>*:last-child {
        order: 1;
    }

    .one-half.centered {
        grid-column-start: 4;
    }

    .two-thirds.centered {
        grid-column-start: 3;
    }

    .col-1 {
        grid-column: auto / span 1;
    }

    .col-2 {
        grid-column: auto / span 2;
    }

    .col-3 {
        grid-column: auto / span 3;
    }

    .col-4 {
        grid-column: auto / span 4;
    }

    .col-5 {
        grid-column: auto / span 5;
    }

    .col-6 {
        grid-column: auto / span 6;
    }

    .col-7 {
        grid-column: auto / span 7;
    }

    .col-8 {
        grid-column: auto / span 8;
    }

    .col-9 {
        grid-column: auto / span 9;
    }

    .col-10 {
        grid-column: auto / span 10;
    }

    .col-11 {
        grid-column: auto / span 11;
    }

    .col-12 {
        grid-column: auto / span 12;
    }

    .push-1 {
        grid-column-start: 2;
    }

    .push-2 {
        grid-column-start: 3;
    }

    .push-3 {
        grid-column-start: 4;
    }

    .push-4 {
        grid-column-start: 5;
    }

    .push-5 {
        grid-column-start: 6;
    }

    .push-6 {
        grid-column-start: 7;
    }

    .push-7 {
        grid-column-start: 8;
    }

    .push-8 {
        grid-column-start: 9;
    }

    .push-9 {
        grid-column-start: 10;
    }

    .push-10 {
        grid-column-start: 11;
    }

    .push-11 {
        grid-column-start: 12;
    }
}

/* Demo helper */
.row.demo>* {
    background-color: #eee;
    text-align: center;
    padding: var(--unit-s);
}

/* ------------------
    SITE STRUCTURE 
--------------------- */

/* SITE HEADER */
.site-header {
    background-color: var(--color-siteheader-background);
    padding-block: var(--unit-s);
    padding-inline: var(--unit-s);
    display: flex;
    justify-content: space-between;
    gap: var(--unit-s);
    flex-wrap: wrap;
}

/* Remove padding if wrapped in .container */
.site-header:has(.container) {
    padding-inline: 0;
}

/* LOGO */
.site-header .logo {
    display: flex;
    align-items: center;
    gap: var(--unit-s);
}

.site-header .logo svg {
    max-height: 50px;
    min-width: 50px;
}

.site-header .logo img,
.site-header .logo svg {
    vertical-align: middle;
}

.site-header .logo h1 {
    font-size: 1.3125rem;
    margin: 0;
}

.site-header .logo a {
    text-decoration: none;
    color: inherit;
}

/* NAV */
.site-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: var(--unit-s);
    flex-wrap: wrap;
}

.site-nav a {
    color: var(--color-siteheader-links);
    text-decoration: none;
    font-weight: bold;
    display: block;
    padding: var(--unit-xs);
    padding-block-start: calc(var(--unit-xs) + .1em);
}

.site-nav a:hover {
    color: var(--color-siteheader-links-hover);
    text-decoration: underline;
    text-decoration-color: var(--color-links);
    text-underline-offset: .5em;
    text-decoration-thickness: .1em;
}

/* Menu button */
.site-nav .menubutton {
    position: relative;
    z-index: 100;
    border: none;
    font-size: inherit;
    font-family: inherit;
    padding: var(--unit-xs);
    margin-block-start: var(--unit-xs);
    background-color: transparent;
}

/* Small screens */
.site-nav .menubutton {
    display: block;
}

.site-nav ul {
    display: none;
}

/* Large screens */
@media (width >=768px) {
    .site-nav .menubutton {
        display: none;
    }

    .site-nav ul {
        display: flex;
    }
}

/* Mobile overlay menu */
@media (width < 768px) {
    .site-nav[data-menustate] ul {
        display: grid;
        align-content: center;
        justify-content: center;
        position: fixed;
        right: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background: var(--color-primary);
    }

    .site-nav[data-menustate] a {
        color: var(--color-white);
    }

    .site-nav[data-menustate="open"] ul {
        translate: 0 0;
        animation: openMenuAnimation .3s forwards;
    }

    .site-nav[data-menustate="closed"] ul {
        translate: 100% 0;
        animation: closeMenuAnimation .3s forwards;
    }

    @keyframes openMenuAnimation {
        0% {
            translate: 100% 0
        }

        100% {
            translate: 0 0
        }
    }

    @keyframes closeMenuAnimation {
        0% {
            translate: 0 0
        }

        100% {
            translate: 100% 0
        }
    }

    .site-nav svg.simple-navicon rect {
        transition: all .3s ease-out;
        fill: var(--color-primary);
    }

    .site-nav[data-menustate="open"] svg.simple-navicon rect {
        fill: var(--color-white);
    }

    .site-nav .simple-navicon {
        display: block;
    }

    .site-nav .simple-navicon rect {
        transform-origin: center;
        width: 100%;
    }

    .site-nav[data-menustate="open"] .simple-navicon {
        position: fixed;
        top: calc(var(--unit-s) + var(--unit-s));
        right: calc(var(--unit-s) + var(--unit-xs));
    }

    .site-nav[data-menustate="open"] .simple-navicon-top {
        rotate: 45deg;
        translate: -21% 24%;
    }

    .site-nav[data-menustate="open"] .simple-navicon-middle {
        opacity: 0;
    }

    .site-nav[data-menustate="open"] .simple-navicon-bottom {
        rotate: -45deg;
        translate: -21% -24%;
    }
}

/* SITE MAIN */
.site-main {
    background-color: transparent;
}

/* SECTIONS */
section {
    padding-block: var(--unit-2xl);
}

/* HERO */
.hero {
    background-color: var(--color-hero-background);
    /* deep navy */
    padding-block: var(--unit-3xl);
    padding-inline: var(--unit-s);
}

.hero:has(.container) {
    padding-inline: 0;
}

/* FORCE HERO TEXT WHITE FOR READABILITY */
.hero,
.hero :is(h1, h2, h3, h4, p, li, small, strong, em, span) {
    color: var(--on-dark-text);
}

.hero a {
    color: var(--on-dark-text);
    text-decoration-color: var(--on-dark-underline);
}

.hero a:hover {
    color: var(--on-dark-text);
    text-decoration-color: rgba(255, 255, 255, .7);
}

/* SITE FOOTER */
.site-footer {
    background-color: var(--color-sitefooter-background);
    padding-block: var(--unit-2xl);
    padding-inline: var(--unit-s);
}

.site-footer:has(.container) {
    padding-inline: 0;
}

/* ------------------
    UI COMPONENTS 
--------------------- */

/* BUTTONS */
.button {
    background-color: var(--color-links);
    color: var(--color-white);
    padding: var(--unit-s) var(--unit-m);
    margin-block: var(--unit-2xs);
    display: inline-block;
    text-decoration: none;
    border-radius: var(--border-radius);
    line-height: 1;
}

.button:hover {
    background-color: var(--color-links-hover);
    color: var(--color-white);
}

/* On dark hero, lighten button by default */
.hero .button {
    background-color: rgba(255, 255, 255, .2);
    color: var(--on-dark-text);
    border: 1px solid rgba(255, 255, 255, .6);
}

.hero .button:hover {
    background-color: rgba(255, 255, 255, .8);
    color: #333;
}

/* CARDS */
.card {
    border: var(--border-thickness) solid var(--color-border);
    display: inline-block;
    padding: var(--unit-s);
    border-radius: var(--border-radius);
}

.color-swatch {
    --_swatch-color: grey;
    background-color: var(--_swatch-color);
    width: 150px;
    height: 150px;
}

/* HR */
hr {
    border: none;
    border-bottom: var(--border-thickness) solid var(--color-border);
    margin: var(--unit-xl) 0;
}

/* Code blocks */
pre:has(code) {
    background-color: var(--color-black);
    color: var(--color-white);
    padding-inline: var(--unit-m);
    border-radius: var(--border-radius);
    white-space: pre-wrap;
}

/* SWIPER */
.swiper {
    padding-block-end: 2rem;
    text-align: center;
}

.swiper-wrapper {}

.swiper-button-prev,
.swiper-button-next {
    background-color: var(--color-white);
    padding: var(--unit-xs);
    border-radius: 100%;
}

.swiper {
    padding-inline: 50px;
}

.swiper-button-prev {
    translate: -4px -50%;
    background-color: white;
    height: 100%;
    border-radius: 0;
    top: 0;
    left: 0;
}

.swiper-button-next {
    translate: 4px -50%;
    background-color: white;
    height: 100%;
    border-radius: 0;
    top: 0;
    right: 0;
}

.swiper-slide .card {
    display: block;
}

.swiper-slide .color-swatch {
    width: 100%;
    min-height: 150px;
}

/* ------------------
    CUSTOM SITE STYLING 
--------------------- */

/* Push footer to bottom */
body {
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100svh;
}

body>* {
    min-width: 0;
}

/* Nav alignment */
.site-header .site-nav a {
    padding-block-start: calc(var(--unit-xs) + .35em);
}

/* Header on top of hero */
.site-header.on-top-of-hero {
    position: absolute;
    width: 100%;
}

.site-header.on-top-of-hero+.site-main .hero {
    padding-block-start: calc(var(--unit-3xl) + var(--unit-xl));
}

/* ===== Invert header/nav when over dark backgrounds ===== */
/* Add class `.is-on-dark` (or keep `.on-top-of-hero is-on-dark`) to switch colors */
.site-header.is-on-dark {
    --color-siteheader-links: var(--on-dark-text);
    --color-siteheader-links-hover: var(--on-dark-text);
}

.site-header.is-on-dark .logo h1,
.site-header.is-on-dark .logo a {
    color: var(--on-dark-text);
}

.site-header.is-on-dark .site-nav a {
    color: var(--on-dark-text);
    text-decoration-color: var(--on-dark-underline);
}

.site-header.is-on-dark .site-nav a:hover {
    color: var(--on-dark-text);
    text-decoration-color: rgba(255, 255, 255, .7);
}

/* HERO typography */
.hero h1 {
    font-size: clamp(2.5em, 4vw, 4em);
    margin-block: 0;
    overflow-wrap: break-word;
    color: var(--on-dark-text);
}

.hero p {
    text-wrap: balance;
    color: var(--on-dark-text-soft);
}

/* Optional: if you also use a .navbar elsewhere, support a dark variant */
.navbar.is-on-dark,
.navbar.is-on-dark * {
    color: var(--on-dark-text);
}

.navbar.is-on-dark a {
    color: var(--on-dark-text);
    text-decoration-color: var(--on-dark-underline);
}

.navbar.is-on-dark a:hover {
    text-decoration-color: rgba(255, 255, 255, .7);
}

/* Two-column page layout */
@media (width >=768px) {
    .pagelayout-wrapper-twocolumn {
        display: flex;
        gap: var(--unit-l);
    }

    .pagesection-aside {
        width: 25%;
    }

    .pagesection-maincontent {
        width: 75%;
    }
}

/* Stickybox */
@media (width >=768px) {
    .stickybox {
        position: sticky;
        top: var(--unit-m);
    }
}

/* NMA TYPE BLOCK */
.nma-eyebrow {
    font-size: .875rem;
    font-weight: bold;
    text-transform: uppercase;
    opacity: .5;
    line-height: 1;
}

.nma-headline {
    font-size: 3rem;
    margin-block: var(--unit-s);
    line-height: 1.1;
    color: inherit;
}

.nma-subheadline {
    font-size: 1.5rem;
    font-weight: 400;
    font-style: italic;
    margin-block: var(--unit-xs);
    opacity: .85;
    line-height: 1.2;
    color: var(--on-dark-text-soft);
}

/* ------------------
        ANIMATIONS 
--------------------- */
.slide-from-top-and-fade-in {
    animation-name: slide-from-top-and-fade-in;
    animation-duration: 1s;
    animation-timing-function: cubic-bezier(0, .5, .5, 1);
    animation-fill-mode: forwards;
    opacity: 0;
    translate: 0 -40px;
}

@keyframes slide-from-top-and-fade-in {
    0% {
        opacity: 0;
        translate: 0 -40px;
    }

    100% {
        opacity: 1;
        translate: 0 0;
    }
}

.slide-from-left-and-fade-in {
    animation-name: slide-from-left-and-fade-in;
    animation-duration: 2s;
    animation-timing-function: cubic-bezier(0, 1, 0, 1);
    animation-fill-mode: forwards;
    opacity: 0;
    translate: -20px 0;
}

@keyframes slide-from-left-and-fade-in {
    0% {
        opacity: 0;
        translate: -20px 0;
    }

    100% {
        opacity: 1;
        translate: 0 0;
    }
}

.delay-0 {
    animation-delay: 0s;
}

.delay-1 {
    animation-delay: .1s;
}

.delay-2 {
    animation-delay: .2s;
}

.delay-3 {
    animation-delay: .3s;
}

.delay-4 {
    animation-delay: .5s;
}

.delay-5 {
    animation-delay: .7s;
}

.delay-6 {
    animation-delay: .9s;
}

/* Scroll-triggered */
section:has(.observe-me) {
    overflow-x: clip;
}

.observe-me.onscroll-slide-in-from-left {
    opacity: 0;
    translate: -20px 0;
    transition: all .5s ease-out .2s;
}

.observe-me[data-viewstate="active"].onscroll-slide-in-from-left {
    opacity: 1;
    translate: 0 0;
}

.observe-me.onscroll-slide-in-from-right {
    opacity: 0;
    translate: 20px 0;
    transition: all .5s ease-out .2s;
}

.observe-me[data-viewstate="active"].onscroll-slide-in-from-right {
    opacity: 1;
    translate: 0 0;
}

.observe-me.delay-0 {
    transition-delay: 0s;
}

.observe-me.delay-1 {
    transition-delay: .1s;
}

.observe-me.delay-2 {
    transition-delay: .2s;
}

.observe-me.delay-3 {
    transition-delay: .3s;
}

.observe-me.delay-4 {
    transition-delay: .5s;
}

.observe-me.delay-5 {
    transition-delay: .7s;
}

.observe-me.delay-6 {
    transition-delay: .9s;
}