/* 24seven.fm Covers — site stylesheet. Mobile-first; dark is the default theme,
   light kicks in via prefers-color-scheme. The manual toggle is a hidden checkbox
   (#themeswitch) that sits BEFORE the .page wrapper — no JavaScript: when checked,
   the sibling selector flips the palette relative to the OS scheme. */

.page {
    --bg: #0b0d12;
    --bg-raised: #141824;
    --bg-card: #171c2a;
    --text: #e8eaf2;
    --text-dim: #9aa1b5;
    --line: #262c3f;
    --accent: #7c5cff;
    --accent-2: #ff5c9d;
    --accent-grad: linear-gradient(135deg, #7c5cff, #ff5c9d);
    --shadow: 0 10px 30px rgba(0, 0, 0, .45);
    color-scheme: dark;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

@media (prefers-color-scheme: light) {
    .page {
        --bg: #f6f7fa;
        --bg-raised: #ffffff;
        --bg-card: #ffffff;
        --text: #1a1e2b;
        --text-dim: #5b6274;
        --line: #e2e5ee;
        --shadow: 0 10px 30px rgba(30, 35, 60, .12);
        color-scheme: light;
    }
    /* toggled: dark on a light OS */
    #themeswitch:checked ~ .page {
        --bg: #0b0d12;
        --bg-raised: #141824;
        --bg-card: #171c2a;
        --text: #e8eaf2;
        --text-dim: #9aa1b5;
        --line: #262c3f;
        --shadow: 0 10px 30px rgba(0, 0, 0, .45);
        color-scheme: dark;
    }
}

@media (prefers-color-scheme: dark) {
    /* toggled: light on a dark OS */
    #themeswitch:checked ~ .page {
        --bg: #f6f7fa;
        --bg-raised: #ffffff;
        --bg-card: #ffffff;
        --text: #1a1e2b;
        --text-dim: #5b6274;
        --line: #e2e5ee;
        --shadow: 0 10px 30px rgba(30, 35, 60, .12);
        color-scheme: light;
    }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font: 16px/1.6 system-ui, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 60rem; margin: 0 auto; padding: 0 1.25rem; }

/* --- Header ----------------------------------------------------------- */
header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.nav {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem 1.25rem;
    max-width: 60rem;
    margin: 0 auto;
}

.nav .brand {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.nav .brand img { width: 28px; height: 28px; }

.nav .spacer { flex: 1; }

.nav a.link { color: var(--text-dim); font-size: .9rem; display: none; }
.nav a.link:hover { color: var(--text); text-decoration: none; }

.theme-toggle {
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    background: var(--bg-raised);
    color: var(--text);
    border-radius: 999px;
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.05rem;
    cursor: pointer;
    line-height: 1;
    user-select: none;
}

/* --- Hero -------------------------------------------------------------- */
.hero { padding: 3rem 0 2.5rem; text-align: center; }

.hero h1 {
    font-size: clamp(1.9rem, 6vw, 3.1rem);
    line-height: 1.15;
    margin: 0 0 .75rem;
}

.hero h1 .grad {
    background: var(--accent-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p.tag {
    color: var(--text-dim);
    font-size: 1.05rem;
    max-width: 34rem;
    margin: 0 auto 1.75rem;
}

.cta {
    display: flex;
    flex-direction: column;
    gap: .7rem;
    align-items: stretch;
    margin-bottom: 2.5rem;
}

.btn {
    display: inline-block;
    padding: .8rem 1.4rem;
    border-radius: .7rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

.btn:hover { text-decoration: none; filter: brightness(1.08); }

.btn.primary { background: var(--accent-grad); color: #fff; box-shadow: var(--shadow); }

.btn.ghost {
    border: 1px solid var(--line);
    background: var(--bg-raised);
    color: var(--text);
}

.shot {
    border-radius: .9rem;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    overflow: hidden;
    background: #000;
}

.shot img, .shot svg { display: block; width: 100%; }

.shot-caption { color: var(--text-dim); font-size: .85rem; margin-top: .6rem; }

/* --- Sections ----------------------------------------------------------- */
section { padding: 2.75rem 0; border-top: 1px solid var(--line); }

/* Anchor jumps must clear the sticky header */
section[id], .plugin[id] { scroll-margin-top: 4rem; }

section h2 { font-size: 1.6rem; margin: 0 0 .4rem; }

section p.lead { color: var(--text-dim); margin: 0 0 1.75rem; max-width: 38rem; }

.grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }

.card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: .9rem;
    padding: 1.15rem 1.25rem;
}

.card h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.card p { margin: 0; color: var(--text-dim); font-size: .92rem; }
.card .emoji { font-size: 1.4rem; display: block; margin-bottom: .5rem; }

/* Plugin cards: one per host — screenshot, description, download links */
.plugin {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1fr;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: .9rem;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.plugin .shot { align-self: center; }
.plugin h3 { margin: 0 0 .3rem; font-size: 1.3rem; }
.plugin .meta { color: var(--text-dim); font-size: .85rem; margin: 0 0 .8rem; }
.plugin p { margin: 0 0 .5rem; }

.links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.links a {
    font-size: .85rem;
    border: 1px solid var(--line);
    border-radius: .5rem;
    padding: .35rem .7rem;
    background: var(--bg-raised);
}
.links a.main { background: var(--accent-grad); border: 0; color: #fff; font-weight: 600; }
.links a:hover { text-decoration: none; filter: brightness(1.08); }
.links .size { font-weight: 400; font-size: .9em; opacity: .75; }

.note { color: var(--text-dim); font-size: .85rem; margin-top: 1rem; }
.note code { background: var(--bg-raised); border: 1px solid var(--line); border-radius: .3rem; padding: .05rem .35rem; }

/* Listener-support line in the footer */
.support { max-width: 42rem; margin: 0 auto 1.25rem; }

/* Footer */
footer {
    border-top: 1px solid var(--line);
    padding: 2rem 0 2.5rem;
    color: var(--text-dim);
    font-size: .85rem;
    text-align: center;
}
footer a { color: var(--text-dim); text-decoration: underline; }

/* --- Wider screens -------------------------------------------------------- */
@media (min-width: 640px) {
    .cta { flex-direction: row; justify-content: center; }
    .grid { grid-template-columns: repeat(2, 1fr); }
    .nav a.link { display: inline; }
}

@media (min-width: 768px) {
    /* Plugin cards go two-column, image and text alternating sides */
    .plugin { grid-template-columns: 1fr 1fr; align-items: center; padding: 1.5rem; }
    .plugin:nth-of-type(even) .shot { order: 2; }
}

@media (min-width: 900px) {
    .grid { grid-template-columns: repeat(3, 1fr); }
    .hero { padding-top: 4rem; }
}
