/*
 * Preserve splash page styles. No framework: plain CSS grid/flexbox.
 * Colors and sizes live in the variables below; change them here.
 */

@font-face {
    font-family: 'Nexa';
    src: url('../fonts/nexa/NexaLight.woff') format('woff'),
         url('../fonts/nexa/NexaLight.ttf') format('truetype');
    font-weight: 300;
    font-display: swap;
}

@font-face {
    font-family: 'Nexa';
    src: url('../fonts/nexa/NexaBold.woff') format('woff'),
         url('../fonts/nexa/NexaBold.ttf') format('truetype');
    font-weight: 700;
    font-display: swap;
}

:root {
    /* Brand colors */
    --juniper: #6FCCDD;
    --hickory: #B0D358;
    --redwood: #F0494B;
    --maple: #A87AB6;
    --siteadmin: #7E8DC7;
    --portal: #F3AE20;
    --logistics: #2BB3A3;

    /* Neutrals */
    --text: #4D4D4E;
    --muted: #8A8A8C;
    --line: #DDDDDD;
    --bg: #FFFFFF;
    --card: #FFFFFF;

    --radius: 10px;
    --max-width: 1100px;
}

/* Each card picks its color via an accent-* class */
.accent-juniper   { --accent: var(--juniper); }
.accent-hickory   { --accent: var(--hickory); }
.accent-redwood   { --accent: var(--redwood); }
.accent-maple     { --accent: var(--maple); }
.accent-siteadmin { --accent: var(--siteadmin); }
.accent-portal    { --accent: var(--portal); }
.accent-logistics { --accent: var(--logistics); }

/* ---------- Base ---------- */

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

body {
    margin: 0;
    font-family: 'Nexa', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-weight: 300;
    color: var(--text);
    background: var(--bg);
    line-height: 1.4;
}

img {
    max-width: 100%;
    height: auto;
}

h2 {
    margin: 0;
    font-weight: 700;
}

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

a:focus-visible {
    outline: 3px solid var(--accent, var(--text));
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---------- Environment banner (non-prod only, set by js/index.js) ---------- */

.env-banner {
    padding: 0.75rem 1rem;
    text-align: center;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    color: #FFFFFF;
}

.env-banner[data-env="local"] { background: #F5AE1F; }
.env-banner[data-env="dev"]   { background: firebrick; }
.env-banner[data-env="qa"]    { background: deepskyblue; }
.env-banner[data-env="beta"]  { background: forestgreen; }

/* ---------- Header ---------- */

.site-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: var(--max-width);
    margin: 3rem auto 0;
    padding: 0 1.5rem;
}

/* Thin rules either side of the logo */
.site-header::before,
.site-header::after {
    content: "";
    flex: 1;
    border-top: 2px solid var(--line);
}

.site-logo {
    width: 300px;
}

/* ---------- App cards ---------- */

.apps {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4.5rem 2rem;
    max-width: var(--max-width);
    margin: 5rem auto 0;
    padding: 0 1.5rem;
}

.app {
    flex: 0 1 320px;
    min-width: 260px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3.75rem 1.5rem 1.5rem;
    text-align: center;
    background: var(--card);
    border: 1px solid var(--line);
    border-top: 4px solid var(--accent);
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.app:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* Icon sits on top edge of the card */
.app > img {
    position: absolute;
    top: -42px;
    width: 86px;
}

.app h2 {
    font-size: 1.6rem;
}

.app p {
    margin: 0.25rem 0 1.5rem;
    color: var(--muted);
}

.app-launch {
    margin-top: auto;
    width: 100%;
    padding: 0.7rem 1rem;
    font-weight: 700;
    border: 2px solid var(--accent);
    border-radius: 6px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.app-launch:hover,
.app-launch:focus-visible {
    background: var(--accent);
    color: #FFFFFF;
}

/* ---------- Footer ---------- */

.site-footer {
    margin-top: 5rem;
    padding: 2.5rem 1.5rem;
    border-top: 2px solid var(--line);
}

.powered-by {
    margin: 0 0 0.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted);
}

.footer-logo {
    display: block;
    width: 160px;
    margin: 0 auto;
}

/* ---------- Small screens ---------- */

@media (max-width: 600px) {
    .site-header::before,
    .site-header::after {
        display: none;
    }

    .site-header {
        justify-content: center;
    }
}
