﻿/* ==========================================================================
   Revival Cast - site stylesheet

   Plain CSS, served straight from /public. There is no Node build step: the
   site is text and images, so deployment stays "composer install" and nothing
   more.

   Two themes. Light is the default and dark is applied by setting
   data-theme="dark" on <html>, which an inline script in the layout does
   before first paint so there is no flash of the wrong theme. Every colour is
   a token here, so the two themes differ only in this block.

   The dark values come from the application's own dark theme
   (RevivalCast/Themes/Dark/Colors.xaml): the same blue-grey surfaces, text
   ramp and lightened blue accent, so the site and the product look like one
   thing. Navy and gold stay in both themes because that is the brand.
   ========================================================================== */

:root {
    color-scheme: light;

    /* Brand surfaces and strong accents */
    --navy: #032660;
    --navy-deep: #001b57;
    --navy-light: #0b3c87;
    --brand-fg: #ffffff;
    --brand-name: #032660;

    /* Gold accent */
    --gold: #fdb001;
    --gold-hover: #ffc02e;
    --gold-fg: #26190a;
    --gold-text: #b87f00;
    --gold-soft: #fff6e2;
    --gold-line: #f0dcb0;

    /* Neutral surfaces */
    --ink: #141821;
    --body: #3d4657;

    /* A shade darker than the obvious #6b7484, which measured 4.43:1 on the
       page background and just missed WCAG AA. This measures 4.80:1. */
    --muted: #666e7d;
    --line: #e2e6ed;
    --line-strong: #cdd3dd;
    --canvas: #f7f8fa;
    --surface: #ffffff;
    --chip-bg: #eef1f6;
    --header-bg: rgba(255, 255, 255, 0.88);

    /* Hero band */
    --hero-from: #032660;
    --hero-via: #001b57;
    --hero-to: #00123c;

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;

    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 10px 28px -14px rgba(16, 24, 40, 0.22);
    --shadow-lg: 0 2px 4px rgba(16, 24, 40, 0.06), 0 24px 48px -20px rgba(3, 38, 96, 0.32);

    --wrap: 1120px;
    --wrap-narrow: 760px;

    --font: "Segoe UI Variable Display", "Segoe UI Variable Text", "Segoe UI",
        system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

[data-theme="dark"] {
    color-scheme: dark;

    /* The application lightens its blue accent in dark mode so it holds up on
       dark surfaces. The same swap happens here, which is what turns solid
       buttons from navy-on-white into light-blue-on-near-black. */
    --navy: #68b5ff;
    --navy-deep: #0f1520;
    --navy-light: #92caff;
    --brand-fg: #10161f;
    --brand-name: #edf3fa;

    --gold: #fdb001;
    --gold-hover: #ffc02e;
    --gold-fg: #26190a;
    --gold-text: #fdb001;
    --gold-soft: rgba(253, 176, 1, 0.12);
    --gold-line: rgba(253, 176, 1, 0.3);

    /* Surfaces and text ramp, taken from the application's dark palette. */
    --ink: #edf3fa;
    --body: #c2cddb;
    --muted: #9bacbf;
    --line: #344253;
    --line-strong: #465365;
    --canvas: #141a22;
    --surface: #202a36;
    --chip-bg: #253041;
    --header-bg: rgba(20, 26, 34, 0.85);

    /* Still navy: it is the brand, and keeping it makes the hero a deliberate
       band next to the neutral page rather than a slightly different black. */
    --hero-from: #07214d;
    --hero-via: #04173a;
    --hero-to: #0b1220;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px -14px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 24px 48px -20px rgba(0, 0, 0, 0.7);
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--body);
    background: var(--canvas);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
    margin: 0 0 0.5em;
    color: var(--ink);
    line-height: 1.2;
    font-weight: 650;
    letter-spacing: -0.011em;
}

h1 {
    font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
}

h2 {
    font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2.125rem);
}

h3 {
    font-size: 1.175rem;
}

p {
    margin: 0 0 1rem;
}

a {
    color: var(--navy-light);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

code,
kbd {
    font-family: "Cascadia Code", "Consolas", ui-monospace, monospace;
    font-size: 0.875em;
    background: var(--chip-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.1em 0.4em;
    /* A long PowerShell line must wrap instead of stretching the phone layout. */
    overflow-wrap: anywhere;
}

/* Fenced code blocks in release notes (for example the PowerShell hash check). */
pre {
    margin: 0 0 1.1em;
    padding: 12px 14px;
    background: var(--chip-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    max-width: 100%;
    overflow-x: auto;
}

pre code {
    display: block;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    background: none;
    border: none;
    padding: 0;
    font-size: 0.8125rem;
}

:focus-visible {
    outline: 3px solid var(--navy-light);
    outline-offset: 2px;
    border-radius: 3px;
}

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: 24px;
}

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

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--navy);
    color: var(--brand-fg);
    padding: 10px 16px;
    z-index: 100;
}

.skip-link:focus {
    left: 8px;
    top: 8px;
}

/* ---------------------------------------------------------------- header -- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--header-bg);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: 68px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    flex-shrink: 0;
}

.brand:hover {
    text-decoration: none;
}

.brand__mark {
    width: 36px;
    height: 36px;
    display: block;
}

.brand__name {
    font-weight: 700;
    font-size: 1.0625rem;
    color: var(--brand-name);
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.brand__name span {
    color: var(--gold-text);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    margin-left: auto;
}

/* Small-screen menu button. Hidden on desktop, where the links fit inline. */
.nav-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding: 9px 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
}

.nav-toggle:hover {
    background: var(--surface-hover, rgba(0, 0, 0, 0.05));
}

.nav-toggle:focus-visible {
    outline: 3px solid var(--navy-light);
    outline-offset: 2px;
}

/* Scoped to plain links: without :not(.btn) these rules outrank .btn--gold and
   repaint the header button's label in body text colour. */
.site-nav a:not(.btn) {
    color: var(--body);
    font-size: 0.9375rem;
    font-weight: 500;
}

.site-nav a:not(.btn):hover {
    color: var(--navy);
}

.site-nav a[aria-current="page"]:not(.btn) {
    color: var(--navy);
    font-weight: 650;
}

/* --------------------------------------------------------------- buttons -- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 11px 20px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.06s ease;
}

.btn:hover {
    text-decoration: none;
}

.btn:active {
    transform: translateY(1px);
}

.btn--gold {
    background: var(--gold);
    color: var(--gold-fg);
    box-shadow: var(--shadow-sm);
}

.btn--gold:hover {
    background: var(--gold-hover);
}

.btn--navy {
    background: var(--navy);
    color: var(--brand-fg);
}

.btn--navy:hover {
    background: var(--navy-light);
}

.btn--ghost {
    background: var(--surface);
    border-color: var(--line-strong);
    color: var(--ink);
}

.btn--ghost:hover {
    border-color: var(--navy);
    color: var(--navy);
}

.btn--lg {
    padding: 14px 26px;
    font-size: 1rem;
}

.btn--sm {
    padding: 8px 14px;
    font-size: 0.875rem;
}

.btn__icon {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

/* ------------------------------------------------------------------ hero -- */

.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(158deg, var(--hero-from) 0%, var(--hero-via) 62%, var(--hero-to) 100%);
    color: rgba(255, 255, 255, 0.86);
}

.hero::after {
    /* A single soft gold glow, echoing the rays in the mark. */
    content: "";
    position: absolute;
    top: -240px;
    right: -180px;
    width: 640px;
    height: 640px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(253, 176, 1, 0.22) 0%, rgba(253, 176, 1, 0) 68%);
    pointer-events: none;
}

.hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 56px;
    align-items: center;
    padding: 84px 0 92px;
}

.hero h1 {
    color: #fff;
    margin-bottom: 0.45em;
}

.hero__lead {
    font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
    color: rgba(255, 255, 255, 0.82);
    max-width: 34em;
    margin-bottom: 2rem;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 18px;
}

.hero__meta {
    margin: 22px 0 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.62);
}

.hero__meta strong {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.hero__art {
    justify-self: center;
    max-width: 340px;
    filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.45));
}

/* --------------------------------------------------------------- sections -- */

.section {
    padding: 72px 0;
}

.section--tight {
    padding: 56px 0;
}

.section--alt {
    background: var(--surface);
    border-block: 1px solid var(--line);
}

.section__head {
    max-width: 46rem;
    margin-bottom: 40px;
}

.section__lead {
    font-size: 1.0625rem;
    color: var(--muted);
    margin: 0;
}

.grid {
    display: grid;
    gap: 22px;
}

.grid--3 {
    /* min() lets the column shrink below its preferred width on very narrow
       phones instead of forcing the whole page wider. */
    grid-template-columns: repeat(auto-fit, minmax(min(268px, 100%), 1fr));
}

.grid--2 {
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
}

/* Lets one card take the full row inside a multi-column grid. */
.span-2 {
    grid-column: 1 / -1;
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 26px 24px;
    box-shadow: var(--shadow-sm);
}

.section--alt .card {
    box-shadow: var(--shadow);
}

.card__icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--gold-soft);
    border: 1px solid var(--gold-line);
    display: grid;
    place-items: center;
    margin-bottom: 16px;
    color: var(--gold-text);
}

.card__icon svg {
    width: 20px;
    height: 20px;
}

.card h3 {
    margin-bottom: 0.4em;
}

.card p {
    margin: 0;
    color: var(--body);
    font-size: 0.9375rem;
}

/* ------------------------------------------------------------- releases -- */

.release {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.release--latest {
    border-color: var(--gold-line);
    box-shadow: var(--shadow);
}

.release__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.release__version {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.015em;
    margin: 0;
}

.release__date {
    color: var(--muted);
    font-size: 0.875rem;
}

.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: var(--gold);
    color: var(--gold-fg);
}

.badge--soft {
    background: var(--chip-bg);
    color: var(--body);
    border: 1px solid var(--line-strong);
}

.release__notes {
    margin: 16px 0 20px;
    font-size: 0.9375rem;
}

.release__notes > :first-child {
    margin-top: 0;
}

.release__notes > :last-child {
    margin-bottom: 0;
}

.release__notes ul,
.release__notes ol {
    padding-left: 1.25em;
    margin: 0 0 1em;
}

.release__notes li {
    margin-bottom: 0.35em;
}

.release__files {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.file {
    font-size: 0.8125rem;
    color: var(--muted);
}

.file strong {
    color: var(--ink);
    font-weight: 600;
}

/* Packages published with a release, named and sized so there is no guessing. */
.filelist {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    border-top: 1px solid var(--line);
}

.filelist li {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    justify-content: space-between;
    align-items: baseline;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.8125rem;
}

.filelist li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.filelist__name {
    font-family: "Cascadia Code", "Consolas", ui-monospace, monospace;
    color: var(--ink);
    word-break: break-all;
}

.filelist__size {
    color: var(--muted);
    white-space: nowrap;
}

/* The full notes live behind a disclosure on the all-versions page. */
.notes-disclosure {
    margin: 14px 0 0;
}

.notes-disclosure summary {
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--navy-light);
    list-style: none;
}

.notes-disclosure summary::-webkit-details-marker {
    display: none;
}

.notes-disclosure summary::before {
    content: "\25B8";
    display: inline-block;
    margin-right: 7px;
    transition: transform 0.15s ease;
}

.notes-disclosure[open] summary::before {
    transform: rotate(90deg);
}

.notes-disclosure > div {
    padding-top: 14px;
    font-size: 0.9375rem;
}

/* --------------------------------------------------------- empty / callout -- */

.empty {
    text-align: center;
    padding: 64px 24px;
    background: var(--surface);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-lg);
}

.empty__mark {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    opacity: 0.9;
}

.empty h3 {
    margin-bottom: 0.35em;
}

.empty p {
    color: var(--muted);
    max-width: 32rem;
    margin-inline: auto;
}

.callout {
    background: var(--gold-soft);
    border: 1px solid var(--gold-line);
    border-left: 4px solid var(--gold);
    border-radius: var(--radius);
    padding: 18px 22px;
    font-size: 0.9375rem;
}

.callout p:last-child {
    margin-bottom: 0;
}

.callout--plain {
    background: var(--surface);
    border-color: var(--line);
    border-left-color: var(--navy);
}

/* -------------------------------------------------------------- support -- */

.contact-card {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
    align-items: baseline;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px 26px;
    box-shadow: var(--shadow-sm);
}

.contact-card__label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    width: 100%;
}

.contact-card a {
    font-size: 1.125rem;
    font-weight: 600;
    /* The support address is longer than a 360px phone can fit on one line. */
    overflow-wrap: anywhere;
}

.requirements {
    margin: 0;
    padding-left: 1.2em;
}

.requirements li {
    margin-bottom: 0.4em;
}

/* System requirements, as a two-column definition list so the label column
   stays aligned and the values are scannable. */
.specs {
    margin: 0;
    display: grid;
    grid-template-columns: minmax(150px, max-content) 1fr;
}

.specs dt {
    font-weight: 600;
    color: var(--ink);
    font-size: 0.9375rem;
    padding: 11px 28px 11px 0;
    border-top: 1px solid var(--line);
}

.specs dd {
    margin: 0;
    color: var(--body);
    font-size: 0.9375rem;
    padding: 11px 0;
    border-top: 1px solid var(--line);
}

/* The first row sits directly under the heading, so it needs no rule. */
.specs dt:first-of-type,
.specs dd:first-of-type {
    border-top: none;
    padding-top: 0;
}

.specs dd strong {
    color: var(--ink);
    font-weight: 600;
}

/* --------------------------------------------------------------- footer -- */

.site-footer {
    background: var(--navy-deep);
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.875rem;
    padding: 46px 0 34px;
    margin-top: 0;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.86);
}

.site-footer__top {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 26px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.site-footer__brand {
    display: flex;
    align-items: center;
    gap: 11px;
}

.site-footer__brand img {
    width: 34px;
    height: 34px;
}

.site-footer__brand strong {
    color: #fff;
    font-size: 1rem;
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
}

.site-footer__bottom {
    padding-top: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    justify-content: space-between;
}

/* ---------------------------------------------------------- theme toggle -- */

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    padding: 0;
    background: transparent;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    color: var(--body);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.theme-toggle:hover {
    background: var(--chip-bg);
    border-color: var(--navy-light);
    color: var(--ink);
}

.theme-toggle svg {
    width: 17px;
    height: 17px;
}

/* The icon shows the theme on offer, not the one in use: a moon while the site
   is light, a sun while it is dark. */
.theme-toggle__sun {
    display: none;
}

[data-theme="dark"] .theme-toggle__sun {
    display: block;
}

[data-theme="dark"] .theme-toggle__moon {
    display: none;
}

/* ------------------------------------------------------------ responsive -- */

@media (max-width: 880px) {
    .hero__inner {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 60px 0 64px;
    }

    .hero__art {
        max-width: 240px;
        order: -1;
    }

    .section {
        padding: 56px 0;
    }
}

@media (max-width: 720px) {
    .site-header__inner {
        flex-wrap: wrap;
        gap: 12px;
        padding-block: 12px;
    }

    /* One compact row: brand and Menu button. The links become a panel that
       drops below the header only when the Menu button opens it, so the phone
       header never wraps into a wall of links. */
    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        width: 100%;
        margin-left: 0;
        padding: 8px 0 10px;
        border-top: 1px solid var(--line);
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a:not(.btn) {
        padding: 12px 6px;
        border-radius: 8px;
        font-size: 1rem;
    }

    .site-nav a:not(.btn):hover {
        background: var(--surface-hover, rgba(0, 0, 0, 0.05));
    }

    .site-nav .btn {
        width: 100%;
        margin-top: 8px;
    }

    .site-nav .theme-toggle {
        align-self: flex-start;
        margin-top: 8px;
    }

    .release {
        padding: 22px 18px;
    }

    .wrap {
        padding-inline: 18px;
    }
}

@media (max-width: 620px) {
    /* One column: the label sits on its own line above its value, so the
       dividing rule moves to the label instead of the row. */
    .specs {
        grid-template-columns: 1fr;
    }

    .specs dt {
        padding: 14px 0 0;
    }

    .specs dd {
        padding: 2px 0 0;
        border-top: none;
    }

    .specs dt:first-of-type,
    .specs dd:first-of-type {
        padding-top: 0;
    }
}


@media (max-width: 380px) {
    /* At the narrowest phone widths the brand and the Menu button share one
       row: the header never wraps into two stacked rows. */
    .site-header__inner {
        gap: 8px;
    }

    .brand {
        gap: 8px;
    }

    .brand__mark {
        width: 30px;
        height: 30px;
    }

    .nav-toggle {
        padding: 8px 10px;
    }
}

@media (max-width: 420px) {
    /* The support address fits on one line at this size, instead of breaking
       in the middle of the domain. */
    .contact-card a { font-size: 1rem; }
}

@media (max-width: 520px) {
    .site-nav {
        gap: 6px 14px;
    }

    .site-nav a:not(.btn) {
        font-size: 0.875rem;
    }

    .brand__name {
        font-size: 1rem;
    }

    .hero__inner {
        gap: 28px;
        padding: 48px 0 52px;
    }

    .hero__art {
        max-width: 190px;
    }

    /* Full-width actions read better than two cramped buttons side by side,
       and give a bigger target for a thumb. */
    .btn-row {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-row .btn {
        width: 100%;
    }

    .release {
        padding: 20px 16px;
    }

    .release__version {
        font-size: 1.2rem;
    }

    .release__files {
        flex-direction: column;
        align-items: stretch;
    }

    .release__files .btn {
        width: 100%;
    }
}
