/*
 * The site's colours are the application's colours, taken from Theming/ThemePalette.cs in the
 * DutyAllocator repository rather than picked to look similar. If the application's palette
 * changes, change these to match: the point of the site looking like the software is that a
 * customer recognises what they are buying when they open it.
 *
 * Light is the default and dark follows the visitor's own system setting, the same way the
 * application follows Windows.
 */

:root {
    --page: #F4F5F7;
    --surface: #FFFFFF;
    --surface-alt: #F9FAFB;
    --border: #E1E4E8;
    --border-strong: #C7CED6;

    --text: #1B2733;
    --text-secondary: #5A6875;
    --text-muted: #8A95A1;

    --accent: #1264A3;
    --accent-hover: #0E5084;
    --accent-soft: #E4EEF7;
    --on-accent: #FFFFFF;

    --danger: #B42D2D;

    --rail: #FFFFFF;
    --shadow: 0 1px 2px rgba(27, 39, 51, .06), 0 8px 24px rgba(27, 39, 51, .06);

    --measure: 1120px;
    --radius: 10px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --page: #16191D;
        --surface: #1E2228;
        --surface-alt: #23282F;
        --border: #2E343C;
        --border-strong: #3D444E;

        --text: #E6EAEF;
        --text-secondary: #A2ACB8;
        --text-muted: #78828E;

        --accent: #4C9AFF;
        --accent-hover: #6FB2FF;
        --accent-soft: #1B2A3D;
        --on-accent: #0B1622;

        --danger: #F0736A;

        --rail: #1A1D22;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--page);
    color: var(--text);
    /* Segoe UI first, because that is what the application itself draws in. */
    font: 16px/1.6 "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 24px; }

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

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 600; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; }
h3 { font-size: 1.125rem; font-weight: 600; }
p { margin: 0 0 1em; }

.lead { font-size: 1.15rem; color: var(--text-secondary); max-width: 60ch; }
.muted { color: var(--text-muted); }

/* --- Header, styled after the application's own rail and header ------------------------ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--rail);
    border-bottom: 1px solid var(--border);
}

.site-header .wrap {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 64px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
}

.brand svg { width: 26px; height: 26px; color: var(--accent); flex: none; }

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

.site-nav a {
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: .95rem;
}

.site-nav a:hover { background: var(--surface-alt); color: var(--text); }
.site-nav a.current { background: var(--accent-soft); color: var(--accent); }

/* --- Buttons, matching AppButton ------------------------------------------------------- */

.btn {
    display: inline-block;
    padding: 11px 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }

.btn-secondary {
    background: var(--surface);
    border-color: var(--border-strong);
    color: var(--text);
}

.btn-secondary:hover { background: var(--surface-alt); color: var(--text); }

/* --- Sections -------------------------------------------------------------------------- */

section { padding: 72px 0; }
section + section { border-top: 1px solid var(--border); }

.hero { padding-top: 80px; padding-bottom: 40px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.badge {
    display: inline-block;
    padding: 4px 10px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: .8rem;
    font-weight: 600;
}

/* --- Cards, matching the Card control -------------------------------------------------- */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
}

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* --- Screenshots ----------------------------------------------------------------------- */

.shot {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--surface);
}

/* The two themes of the same screen, only the matching one shown. */
.shot-dark { display: none; }

@media (prefers-color-scheme: dark) {
    .shot-light { display: none; }
    .shot-dark { display: block; }
}

figure { margin: 0; }
figcaption { margin-top: 12px; color: var(--text-secondary); font-size: .95rem; }

/* --- The pipeline, which is how the product is explained in the README ----------------- */

.pipeline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 28px; padding: 0; list-style: none; }

.pipeline li {
    padding: 8px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 600;
    white-space: nowrap;
}

.pipeline li.feeds { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.pipeline .arrow { color: var(--text-muted); font-weight: 400; }

/* --- Honesty panel --------------------------------------------------------------------- */

.notice {
    border-left: 3px solid var(--danger);
    background: var(--surface);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 18px 22px;
}

.notice h3 { color: var(--danger); }

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

.site-footer {
    border-top: 1px solid var(--border);
    background: var(--rail);
    padding: 40px 0;
    color: var(--text-muted);
    font-size: .9rem;
}

.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; }

@media (max-width: 720px) {
    section { padding: 48px 0; }
    .site-nav { display: none; }
}
