/* Firox Linux website (GitHub Pages, served from /docs) */

:root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-2: #eef1f8;
    --text: #1c1c1e;
    --muted: #5b6070;
    --border: #dfe3ee;
    --accent: #2f6fe0;
    --accent-ink: #ffffff;
    --flame: #f08a24;
    --code-bg: #f0f2f8;
    --shadow: 0 6px 24px rgba(20, 30, 70, 0.10);
    --radius: 16px;
    --hero: linear-gradient(135deg, #14205e 0%, #4b2a8f 45%, #b8407e 80%, #f08a5d 100%);
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #111318;
        --surface: #1a1d24;
        --surface-2: #222631;
        --text: #eceef3;
        --muted: #a3a9b8;
        --border: #2c313d;
        --accent: #6aa1ff;
        --accent-ink: #0b1020;
        --code-bg: #20242e;
        --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 "Noto Sans", "Segoe UI", system-ui, -apple-system, "DejaVu Sans", sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.25; }
h2 { font-size: 1.7rem; margin: 2.6rem 0 0.8rem; }
h3 { font-size: 1.2rem; margin: 1.8rem 0 0.5rem; }
p { margin: 0.6rem 0; }
code, pre, kbd { font-family: "Noto Sans Mono", "DejaVu Sans Mono", ui-monospace, Menlo, Consolas, monospace; }
code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 6px; font-size: 0.9em; overflow-wrap: anywhere; }
pre code { background: none; padding: 0; overflow-wrap: normal; }
kbd {
    background: var(--surface); border: 1px solid var(--border); border-bottom-width: 2px;
    border-radius: 6px; padding: 0.05em 0.45em; font-size: 0.85em; white-space: nowrap;
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* ---- header: frosted glass, like the Glass look's taskbar ---- */
.site-header {
    position: sticky; top: 0; z-index: 10;
    background: color-mix(in srgb, var(--surface) 72%, transparent);
    backdrop-filter: blur(14px) saturate(1.4);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.brand img { width: 36px; height: 36px; }
.brand span { font-style: italic; letter-spacing: 0.2px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.nav a {
    color: var(--text); text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: 0.95rem;
}
.nav a:hover { background: var(--surface-2); }
.nav a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }

/* ---- hero ---- */
.hero { background: var(--hero); color: #fff; padding: 64px 0 56px; position: relative; overflow: hidden; }
.hero::after {
    content: ""; position: absolute; inset: auto -10% -40% -10%; height: 70%;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.18), transparent 60%);
    pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin: 0 0 0.4rem; }
.hero .lead { font-size: clamp(1.05rem, 2.2vw, 1.3rem); max-width: 720px; opacity: 0.95; }
.hero .shot { margin-top: 32px; border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 255, 255, 0.5); }
.page-hero { padding: 44px 0 36px; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }

.buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.btn {
    display: inline-block; padding: 10px 18px; border-radius: 999px; text-decoration: none; font-weight: 600;
    background: #fff; color: #1c1c1e; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
.btn.ghost { background: rgba(255, 255, 255, 0.16); color: #fff; border: 1px solid rgba(255, 255, 255, 0.6); box-shadow: none; }
.btn:hover { filter: brightness(1.05); }

main { padding-bottom: 48px; }

/* ---- cards and grids ---- */
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px 22px; box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card .icon { font-size: 1.6rem; line-height: 1; margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.tech { color: var(--muted); font-size: 0.88rem; }

figure { margin: 18px 0; }
figure img {
    border-radius: 12px; border: 1px solid var(--border); box-shadow: var(--shadow); background: #000;
    cursor: zoom-in;
}
figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 8px; text-align: center; }
.shots { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }

/* feature sections: text beside a screenshot */
.feature { display: grid; gap: 28px; grid-template-columns: 1fr 1fr; align-items: center; margin: 34px 0; }
.feature:nth-of-type(even) .feature-text { order: 2; }
.feature h3 { margin-top: 0; }
@media (max-width: 820px) {
    .feature { grid-template-columns: 1fr; }
    .feature:nth-of-type(even) .feature-text { order: 0; }
}

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.toc a {
    display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--surface);
    border: 1px solid var(--border); text-decoration: none; color: var(--text); font-size: 0.92rem;
}
.toc a:hover { border-color: var(--accent); }

/* ---- code blocks with a copy button ---- */
.code { position: relative; margin: 12px 0; }
.code pre {
    margin: 0; background: var(--code-bg); border: 1px solid var(--border); border-radius: 12px;
    padding: 14px 76px 14px 16px; overflow-x: auto; font-size: 0.92rem;
}
.code button {
    position: absolute; top: 8px; right: 8px; border: 1px solid var(--border); background: var(--surface);
    color: var(--text); border-radius: 8px; padding: 3px 10px; font-size: 0.8rem; cursor: pointer;
}
.code button:hover { border-color: var(--accent); }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: var(--surface); border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); font-weight: 600; }
tr:last-child td { border-bottom: none; }
td:first-child { white-space: nowrap; }
/* Under the hood: the piece's name heads each row */
tbody th[scope=row] { background: none; white-space: nowrap; }
tbody tr.group th { background: var(--surface-2); font-size: 0.95em; letter-spacing: 0.02em; }
@media (max-width: 600px) { tbody th[scope=row] { white-space: normal; } }

.note {
    border-left: 4px solid var(--flame); background: var(--surface); padding: 12px 16px; border-radius: 0 12px 12px 0;
    margin: 16px 0; box-shadow: var(--shadow);
}
.keys { display: grid; gap: 8px 22px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 12px 0; }
.keys div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--border); padding: 6px 0; }

/* ---- lightbox ---- */
.lightbox {
    position: fixed; inset: 0; z-index: 100; background: rgba(5, 8, 20, 0.86);
    display: none; align-items: center; justify-content: center; padding: 16px; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-height: 92vh; max-width: 96vw; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0 40px; color: var(--muted); font-size: 0.92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer a { color: var(--muted); }

/* phones: let long commands in tables wrap instead of widening the page */
@media (max-width: 600px) {
    td:first-child { white-space: normal; }
    td code { word-break: break-word; }
    th, td { padding: 8px 10px; }
}

.toc { margin-top: 22px; }
/* phones: one scrollable row of menu items under the name */
@media (max-width: 600px) {
    .site-header .wrap { gap: 4px; padding-top: 6px; padding-bottom: 6px; }
    .nav { margin-left: 0; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .nav::-webkit-scrollbar { display: none; }
    .nav a { flex: none; padding: 5px 10px; }
}

/* Darling: app compatibility labels */
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.9em; font-weight: 600; white-space: nowrap; }
.status.good { background: #dcf3e2; color: #17602e; }
.status.partial { background: #fdefd6; color: #8a4b00; }
.status.bad { background: #fadede; color: #9b1c1c; }
@media (prefers-color-scheme: dark) {
    .status.good { background: #173a24; color: #8fe0a8; }
    .status.partial { background: #3d2d12; color: #f5c27a; }
    .status.bad { background: #3f1a1a; color: #f2a1a1; }
}
@media (max-width: 600px) {
    .compat .kind { display: none; }
    .compat .status { white-space: normal; padding: 2px 8px; font-size: 0.82em; }
}
.shots.pair { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 700px) { .shots.pair { grid-template-columns: 1fr; } }

/* News */
.post { max-width: 820px; }
.post-date { color: var(--muted); font-size: 0.92rem; margin: 24px 0 -6px; }
.post h2 { margin-top: 8px; }
.post li { margin: 4px 0; }
