:root {
    /* Text colors */
    --text: #e8f0f5;
    --text-muted: #b4c5d2;
    --text-subtle: #8299ab;

    /* Nerd-Werkz blue palette */
    --brand-blue: #003060;
    --accent: #5b9bc5;
    --accent-soft: rgba(91, 155, 197, .16);

    /* Background surfaces */
    --surface: rgba(8, 20, 35, .85);
    --surface-card: rgba(30, 65, 100, .20);
    --surface-card-hover: rgba(40, 85, 130, .35);

    /* Borders */
    --border: rgba(140, 180, 210, .20);
    --border-strong: rgba(140, 190, 225, .45);

    /* Shadows */
    --shadow:
        0 30px 90px rgba(0, 15, 35, .48);

    --radius-large: 24px;
    --radius-medium: 16px;

    --content-width: 1180px;

    --font-sans:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    --font-display:
        "Trebuchet MS",
        "Segoe UI",
        ui-sans-serif,
        system-ui,
        sans-serif;
}

/* ---------------------------------------------------------
   Foundation
--------------------------------------------------------- */

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

html {
    min-height: 100%;
    color-scheme: dark;
}

body {
    min-height: 100vh;
    margin: 0;

    color: var(--text);
    font-family: var(--font-sans);

    background:
        #071011
        url("../images/background.jpg")
        center center / cover fixed no-repeat;

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


/* Darkens the photograph while preserving detail. */

/* Background photograph overlay - brighter version */

.background-overlay {
    position: fixed;
    z-index: 0;
    inset: 0;

    pointer-events: none;

    background:
        linear-gradient(
            90deg,
            rgba(2, 7, 8, .35) 0%,
            rgba(2, 7, 8, .15) 48%,
            rgba(2, 7, 8, .25) 100%
        ),
        linear-gradient(
            180deg,
            rgba(0, 0, 0, .05),
            rgba(0, 0, 0, .20)
        );
}

/* ---------------------------------------------------------
   Page
--------------------------------------------------------- */

.page-shell {
    position: relative;
    z-index: 1;

    width: min(
        var(--content-width),
        calc(100% - 48px)
    );

    min-height: 100vh;

    margin-inline: auto;
    padding: 56px 0 30px;

    display: flex;
    flex-direction: column;
}


/* ---------------------------------------------------------
   Hero
--------------------------------------------------------- */

.hero {
    display: grid;

    grid-template-columns:
        minmax(220px, 330px)
        minmax(0, 1fr);

    align-items: center;

    gap: clamp(36px, 7vw, 90px);

    padding:
        clamp(12px, 2vw, 26px)
        0
        clamp(44px, 7vw, 78px);
}


.brand-mark img {
    display: block;

    width: 100%;
    max-width: 320px;
    height: auto;

    filter:
        drop-shadow(
            0 12px 22px rgba(0, 0, 0, .55)
        );
}

.brand-mark {
    transform: translateY(12px);
}

.hero-copy {
    max-width: 720px;

    padding: 28px 34px;

    background: rgba(0, 25, 50, 0.65);

    border: 1px solid rgba(91, 155, 197, 0.20);
    border-radius: 16px;

    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.20);
}

.eyebrow,
.section-label {
    margin: 0 0 10px;

    color: #a8d1eb;

    text-shadow:
        0 1px 4px rgba(0, 0, 0, 0.65);

    font-size: .72rem;
    font-weight: 700;

    letter-spacing: .22em;
    text-transform: uppercase;
}


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


.eyebrow-divider {
    width: 28px;
    height: 1px;

    background: var(--accent);
}


h1 {
    margin: 0;

    font-family: var(--font-display);
    font-size: clamp(3rem, 7vw, 5.7rem);
    font-weight: 700;

    line-height: .93;
    letter-spacing: -.055em;
}


h1 span {
    color: var(--accent);
}

h1 {
    color: #ffffff;

    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.65);
}

.portal-heading h2 {
    color: #d5e7f3;
}

.card-copy h3 {
    color: #d5e7f3;
}

.site-card:hover .card-copy h3 {
    color: #8fc4e5;
}

.tagline {
    max-width: 620px;

    margin: 24px 0 0;

    color: #e2edf5;

    font-size: clamp(.98rem, 1.6vw, 1.1rem);
    font-weight: 500;
    line-height: 1.7;

    text-shadow:
        0 2px 6px rgba(0, 0, 0, 0.65);
}

/* ---------------------------------------------------------
   Portal
--------------------------------------------------------- */

.portal {
    padding: clamp(22px, 4vw, 34px);

    border: 1px solid var(--border);
    border-radius: var(--radius-large);

    background: var(--surface);

    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);

    box-shadow: var(--shadow);
}


.portal-heading {
    display: flex;
    align-items: flex-end;

    gap: 24px;

    margin-bottom: 25px;
}


.portal-heading h2 {
    margin: 0;

    font-family: var(--font-display);

    font-size: clamp(1.65rem, 3vw, 2.2rem);
    line-height: 1;

    letter-spacing: -.025em;
}


.heading-rule {
    height: 1px;

    flex: 1;

    margin-bottom: 5px;

    background:
        linear-gradient(
            90deg,
            var(--border-strong),
            transparent
        );
}


/* ---------------------------------------------------------
   Cards
--------------------------------------------------------- */

.site-grid {
    display: grid;

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

    gap: 14px;
}


.site-card {
    min-width: 0;

    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: var(--radius-medium);

    background: var(--surface-card);

    transition:
        transform .18s ease,
        background-color .18s ease,
        border-color .18s ease,
        box-shadow .18s ease;
}


.site-card:hover:not(.site-card-disabled) {
    transform: translateY(-3px);

    border-color: var(--border-strong);

    background: var(--surface-card-hover);

    box-shadow:
        0 16px 35px rgba(0, 0, 0, .18);
}

.site-card:hover:not(.site-card-disabled) {
    border-color: var(--accent);

    box-shadow:
        0 16px 35px rgba(0, 35, 75, .30);
}

.card-content {
    min-height: 148px;

    display: flex;
    align-items: center;

    gap: 21px;

    padding: 24px;

    color: inherit;
    text-decoration: none;
}


a.card-content:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: -3px;
}


.card-icon {
    width: 58px;
    height: 58px;

    flex: 0 0 58px;

    display: grid;
    place-items: center;

    border: 1px solid var(--border);

    border-radius: 15px;

    background: rgba(0, 0, 0, .27);

    font-size: 1.45rem;
}


.card-copy {
    min-width: 0;
    flex: 1;
}


.card-title-row {
    display: flex;
    align-items: center;

    flex-wrap: wrap;

    gap: 10px;

    margin-bottom: 8px;
}


.card-copy h3 {
    margin: 0;

    font-family: var(--font-display);

    font-size: 1.25rem;
    font-weight: 700;

    line-height: 1.15;
}


.card-copy p {
    margin: 0 0 15px;

    color: var(--text-muted);

    font-size: .88rem;
    line-height: 1.55;
}


.visit {
    display: inline-flex;
    align-items: center;

    gap: 7px;

    color: var(--text);

    font-size: .72rem;
    font-weight: 700;

    letter-spacing: .13em;
    text-transform: uppercase;
}


.visit span {
    color: var(--accent);

    transition: transform .18s ease;
}


.site-card:hover .visit span {
    transform: translateX(4px);
}


.status-badge {
    padding: 5px 8px;

    border: 1px solid var(--border);

    border-radius: 999px;

    color: var(--text-subtle);

    font-size: .62rem;
    font-weight: 700;

    letter-spacing: .09em;
    text-transform: uppercase;
}


.site-card-disabled {
    opacity: .52;
}


.site-card-disabled .card-icon {
    filter: grayscale(1);
}


.empty-state {
    grid-column: 1 / -1;

    padding: 36px;

    border: 1px dashed var(--border);
    border-radius: var(--radius-medium);

    color: var(--text-muted);

    text-align: center;
}


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

.site-footer {
    margin-top: auto;

    padding: 26px 3px 0;

    display: flex;
    justify-content: space-between;

    gap: 20px;

    color: rgba(255, 255, 255, .52);

    font-size: .69rem;
    font-weight: 600;

    letter-spacing: .13em;
    text-transform: uppercase;
}


.site-footer p {
    margin: 0;
}


.footer-mark {
    color: var(--accent);
}


/* ---------------------------------------------------------
   Reduced motion
--------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        transition-duration: .01ms !important;
        animation-duration: .01ms !important;

        animation-iteration-count: 1 !important;
    }
}


/* ---------------------------------------------------------
   Tablet
--------------------------------------------------------- */

@media (max-width: 820px) {

    body {
        background-attachment: scroll;
    }

    .page-shell {
        width: min(100% - 32px, 680px);

        padding-top: 32px;
    }

    .hero {
        grid-template-columns: 1fr;

        gap: 27px;

        padding-bottom: 42px;
    }

    .brand-mark img {
        max-width: 255px;
    }

    .hero-copy {
        max-width: 600px;
    }

    .site-grid {
        grid-template-columns: 1fr;
    }

}


/* ---------------------------------------------------------
   Phone
--------------------------------------------------------- */

@media (max-width: 520px) {

    .page-shell {
        width: calc(100% - 20px);

        padding-top: 20px;
        padding-bottom: 18px;
    }

    .brand-mark img {
        max-width: 220px;
    }

    h1 {
        font-size: clamp(2.65rem, 15vw, 4rem);
    }

    .tagline {
        margin-top: 18px;
    }

    .portal {
        padding: 18px;

        border-radius: 19px;
    }

    .portal-heading {
        margin-bottom: 18px;
    }

    .card-content {
        min-height: 125px;

        gap: 16px;

        padding: 19px;
    }

    .card-icon {
        width: 50px;
        height: 50px;

        flex-basis: 50px;

        border-radius: 13px;
    }

    .site-footer {
        padding-inline: 2px;
    }

}
