/* WhatDay site. Always dark, like the strip. There is no light mode; that is
   the joke and also the specification (Amendment 2). */

:root {
    color-scheme: dark;
    --bg: #11141b;
    --bg-deep: #0b0d12;
    --surface: rgba(28, 34, 47, 0.72);
    --surface-solid: #1c222f;
    --border: rgba(255, 255, 255, 0.09);
    --text: #e8ebf2;
    --muted: #9aa3b5;
    --faint: #6b7385;

    /* The seven palette shades, copied from internal/domain/palette.go. */
    --red: #ff6666;
    --amber: #ffb020;
    --yellow: #f5f04a;
    --green: #4cd964;
    --blue: #5aa8ff;
    --purple: #c58cff;
    --neutral: #ffffff;

    --accent: var(--red);
    --radius: 14px;
    --gutter: 16px;
    --max: 1040px;
    --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background:
        radial-gradient(1200px 600px at 80% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
        radial-gradient(900px 500px at -10% 30%, rgba(90, 168, 255, 0.08), transparent 60%),
        var(--bg);
    color: var(--text);
    font: 17px/1.6 var(--font);
    overflow-x: hidden;
    transition: background 0.6s ease;
}

a { color: var(--accent); text-underline-offset: 3px; }

img { max-width: 100%; }

.wrap {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    /* Sides only: a shorthand here outranks `section`'s vertical padding. */
    padding-inline: var(--gutter);
}

/* Header */

.site-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 20px;
    padding-bottom: 20px;
}

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

.brand img { width: 34px; height: 34px; }

.site-head nav { display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }

.site-head nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }

.site-head nav a:hover,
.site-head nav a:focus-visible { color: var(--text); }

/* Hero */

.hero {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 48px;
    align-items: center;
    padding-top: 48px;
    padding-bottom: 72px;
}

.eyebrow {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 18px;
}

.pill {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
    padding: 3px 12px;
    font-size: 0.8rem;
    color: var(--muted);
}

h1 {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    line-height: 1.02;
    letter-spacing: -0.02em;
    margin: 0 0 20px;
}

h1 .swear { color: var(--accent); transition: color 0.4s ease; }

.lead { font-size: 1.2rem; color: var(--muted); margin: 0 0 28px; max-width: 34em; }

.lead strong { color: var(--text); font-weight: 600; }

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.btn:hover,
.btn:focus-visible { border-color: rgba(255, 255, 255, 0.28); transform: translateY(-1px); }

.btn-primary {
    background: var(--accent);
    border-color: transparent;
    color: #14161c;
}

.btn-primary:hover,
.btn-primary:focus-visible { background: color-mix(in srgb, var(--accent) 88%, white); border-color: transparent; }

/* The desk: a mock of the strip above a mock taskbar. */

.desk {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 18px;
    border: 1px solid var(--border);
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 30%, rgba(197, 140, 255, 0.35), transparent 45%),
        radial-gradient(circle at 75% 55%, rgba(90, 168, 255, 0.35), transparent 50%),
        radial-gradient(circle at 50% 90%, rgba(255, 176, 32, 0.25), transparent 45%),
        #1a1f2b;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.desk-note {
    position: absolute;
    top: 18px;
    left: 18px;
    right: 18px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
}

.strip {
    position: absolute;
    right: 14px;
    bottom: 62px;
    padding: 6px 22px;
    border-radius: 8px;
    background: rgba(32, 36, 46, 0.62);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--accent);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.3rem, 3.2vw, 1.8rem);
    letter-spacing: 0.01em;
    cursor: grab;
    user-select: none;
    touch-action: none;
    transition: color 0.4s ease;
}

.strip:active { cursor: grabbing; }

.taskbar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    padding: 0 16px;
    background: rgba(20, 24, 34, 0.86);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text);
    font-size: 0.8rem;
}

.taskbar .start {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.taskbar .start span {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
}

.taskbar .clock { text-align: right; line-height: 1.25; }

.swatches {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
    align-items: center;
    color: var(--muted);
    font-size: 0.9rem;
}

.swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: var(--c);
    cursor: pointer;
    padding: 0;
    transition: transform 0.15s ease;
}

.swatch:hover,
.swatch:focus-visible { transform: scale(1.12); outline: none; border-color: rgba(255, 255, 255, 0.55); }

.swatch[aria-pressed="true"] { border-color: var(--text); }

/* Sections */

section { padding-top: 72px; padding-bottom: 24px; }

h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    letter-spacing: -0.015em;
    line-height: 1.1;
    margin: 0 0 16px;
}

.kicker {
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    margin: 0 0 10px;
    transition: color 0.4s ease;
}

.prose { max-width: 40em; color: var(--muted); }

.prose p { margin: 0 0 16px; }

.prose strong { color: var(--text); }

/* The over-engineering ledger */

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
    margin-top: 28px;
}

.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.stat .n {
    display: block;
    font-family: var(--font-display);
    font-size: 2.3rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 10px;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.stat p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.stat .aside { display: block; margin-top: 8px; color: var(--faint); font-size: 0.85rem; font-style: italic; }

.verdict {
    margin-top: 24px;
    color: var(--muted);
    font-style: italic;
}

/* Lists */

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
}

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

.card h3 { margin: 0 0 12px; font-size: 1.15rem; }

.card ul { margin: 0; padding-left: 20px; color: var(--muted); }

.card li { margin-bottom: 8px; }

.card li strong { color: var(--text); }

/* Downloads: the house card per platform (EarthNow, SymDiary, BridgeTalk). WhatDay is
   Windows only, so there is one card, centred at a card's width. */

.dl-version {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.85rem;
    color: var(--accent);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 14px;
    transition: color 0.4s ease;
}

.downloads {
    display: grid;
    grid-template-columns: minmax(0, 420px);
    justify-content: center;
    margin-top: 28px;
}

.dl-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dl-card .ico { font-size: 30px; }

.dl-card h3 { margin: 4px 0 0; }

.dl-card .req { color: var(--muted); font-size: 0.85rem; margin: 0; }

.dl-card .btn { align-self: center; margin: 14px 0 4px; }

.dl-card .meta { color: var(--muted); font-size: 0.8rem; min-height: 1.2em; margin: 0; }

.dl-card .how { color: var(--muted); font-size: 0.85rem; margin: 8px 0 0; }

.dl-links { text-align: center; margin-top: 20px; font-size: 0.9rem; }

code {
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: 0.88em;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1px 6px;
    overflow-wrap: anywhere;
}

/* Support: the house donate section, last before the footer. */

.support .cta { margin-top: 20px; }

.btn-donate img {
    display: block;
    height: 2.7em;
    width: auto;
}

/* Footer */

.site-foot {
    margin-top: 72px;
    padding-top: 28px;
    padding-bottom: 40px;
    border-top: 1px solid var(--border);
    color: var(--faint);
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.site-foot a { color: var(--muted); }

/* Phones */

@media (max-width: 820px) {
    .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 24px; }
    .two-col { grid-template-columns: 1fr; }
    .site-head nav { gap: 12px; }
}

@media (max-width: 480px) {
    body { font-size: 16px; }
    .site-head nav a.hide-sm { display: none; }
    .taskbar .start { display: none; }
    .strip { right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
}
