/* whatsclip.app - shared styles */

:root {
    color-scheme: light dark;
    --bg: #f6f7fa;
    --surface: #ffffff;
    --surface2: #eceef4;
    --ink: #1d1f27;
    --muted: #646a7a;
    --line: #dde0e9;
    --accent: #4655d4;
    --accent-ink: #ffffff;
    --spot: #d4691a;
    --shadow: 0 1px 2px rgba(20, 24, 40, .06), 0 8px 28px rgba(20, 24, 40, .08);
    --mono: "Cascadia Mono", Consolas, "JetBrains Mono", "DejaVu Sans Mono", monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #121318;
        --surface: #1a1c23;
        --surface2: #22252e;
        --ink: #e6e8ef;
        --muted: #979db0;
        --line: #2c2f3a;
        --accent: #8e9bff;
        --accent-ink: #10121a;
        --spot: #f39a52;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
    }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-padding-top: 16px; }
body {
    background: var(--bg);
    color: var(--ink);
    font: 16px/1.55 "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, kbd, pre { font-family: var(--mono); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* The name as the app spells it: What, a muted s, Clip in the spot colour */
.wm { font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.wm .s { color: var(--muted); }
.wm .c { color: var(--spot); }

/* ---------- header and footer ---------- */
.head { display: flex; align-items: center; gap: 22px; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 21px; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.nav { display: flex; gap: 20px; margin-left: auto; font-size: 15px; }
.nav a { color: var(--muted); white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); text-decoration: none; }
.foot { border-top: 1px solid var(--line); margin-top: 72px; padding: 26px 0 40px; color: var(--muted); font-size: 14px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.foot .grow { flex: 1; }
.foot a { color: inherit; text-decoration: underline; text-decoration-color: var(--line); }

/* ---------- buttons ---------- */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
    display: inline-flex; align-items: center; gap: 12px;
    padding: 11px 18px 11px 15px; border-radius: 11px;
    font-weight: 600; line-height: 1.2; color: var(--ink);
}
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn small { display: block; font-weight: 400; font-size: 12.5px; opacity: .78; margin-top: 2px; overflow-wrap: anywhere; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.secondary { background: var(--surface); border: 1px solid var(--line); }
.fine { color: var(--muted); font-size: 14px; margin: 14px 0 0; }
.fine a { color: inherit; text-decoration: underline; text-decoration-color: var(--line); }
.badge {
    display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px;
    background: var(--surface2); color: var(--muted); vertical-align: 2px; margin-left: 6px;
}

/* ---------- home: hero ---------- */
h1 { font-size: 44px; line-height: 1.12; letter-spacing: -.02em; margin: 0 0 16px; font-weight: 650; }
.hero { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; padding: 22px 0 28px; }
.hero h1 { font-size: 40px; margin-bottom: 10px; }
.hero .lede { font-size: 18px; color: var(--muted); margin: 0; max-width: 36em; }
.hero .btns { flex-direction: column; align-items: stretch; }
.hero .fine { margin-top: 12px; max-width: 21em; }

/* ---------- home: the feature browser, shaped like the app's format strip ---------- */
.fb {
    display: grid; grid-template-columns: 272px 1fr;
    background: var(--surface2); border: 1px solid var(--line); border-radius: 16px;
    overflow: hidden; box-shadow: var(--shadow);
}
.fb-strip { padding: 10px 0; }
.fb-strip a {
    display: block; margin-left: 10px; padding: 12px 18px;
    border-radius: 10px 0 0 10px; line-height: 1.25; color: var(--ink);
}
.fb-strip a:hover { text-decoration: none; background: color-mix(in srgb, var(--surface) 50%, transparent); }
.fb-strip a[aria-selected="true"] { background: var(--surface); }
.fb-strip a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.fb-strip b { display: block; font-weight: 600; }
.fb-strip span { font-size: 13px; color: var(--muted); }
.fb-strip .badge { background: var(--surface); font-size: 11px; color: var(--muted); }
.fb-strip hr { border: 0; height: 1px; background: var(--line); margin: 8px 22px; }
.fb-stage { background: var(--surface); padding: 30px 34px 26px; min-width: 0; }
/* A link to a panel brings the whole strip into view, not the panel alone */
.panel { scroll-margin-top: 31px; }
.panel + .panel { margin-top: 44px; }
.js .panel + .panel { margin-top: 0; }
.js .panel[hidden] { display: none; }
.panel p { margin: 20px 0 0; color: var(--muted); font-size: 16px; max-width: 44em; }
.panel p b { color: var(--ink); font-weight: 600; }

/* ---------- screenshots ---------- */
/* A scene is a 16:10 box. Its images stand in slots set by the layout class:
   single - one window; pair - two overlapping; scale - small and large; trio - three cascading. */
.scene { position: relative; aspect-ratio: 16 / 10; width: 100%; container-type: inline-size; }
.scene > img, .scene > picture { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene img { object-fit: contain; filter: drop-shadow(0 6px 18px rgba(10, 14, 30, .18)); }
.scene > picture img { width: 100%; height: 100%; }
.scene.pair > :nth-child(1) { inset: 0 auto auto 0; width: 66%; height: 70%; }
.scene.pair > :nth-child(1) img, .scene.pair > img:nth-child(1) { object-position: left top; }
.scene.pair > :nth-child(2) { inset: auto 0 0 auto; width: 66%; height: 70%; }
.scene.pair > :nth-child(2) img, .scene.pair > img:nth-child(2) { object-position: right bottom; }
.scene.scale > :nth-child(1) { inset: auto auto 0 0; width: 44%; height: 50%; }
.scene.scale > :nth-child(1) img, .scene.scale > img:nth-child(1) { object-position: left bottom; }
.scene.scale > :nth-child(2) { inset: 8% 0 auto auto; width: 68%; height: 80%; }
.scene.scale > :nth-child(2) img, .scene.scale > img:nth-child(2) { object-position: right top; }
.scene.trio > :nth-child(1) { inset: 0 auto auto 0; width: 60%; height: 62%; }
.scene.trio > :nth-child(1) img, .scene.trio > img:nth-child(1) { object-position: left top; }
.scene.trio > :nth-child(2) { inset: 19% auto auto 20%; width: 60%; height: 62%; }
.scene.trio > :nth-child(3) { inset: auto 0 0 auto; width: 60%; height: 62%; }
.scene.trio > :nth-child(3) img, .scene.trio > img:nth-child(3) { object-position: right bottom; }

/* ---------- downloads ---------- */
.downloads { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 40px; }
.dlcard { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; }
.dlcard h2 { margin: 0 0 4px; font-size: 19px; }
.dlcard .req { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.dlcard .fine { margin-top: 12px; }

/* ---------- install guide ---------- */
.doc { display: grid; grid-template-columns: 210px 1fr; gap: 48px; padding: 30px 0; }
.toc { position: sticky; top: 24px; align-self: start; font-size: 14.5px; }
.toc a { display: block; color: var(--muted); padding: 4px 0; }
.toc a:hover { color: var(--ink); text-decoration: none; }
.prose { max-width: 720px; min-width: 0; }
.prose h1 { font-size: 36px; }
.prose h2 { font-size: 24px; margin: 42px 0 10px; padding-top: 6px; }
.prose p, .prose li { color: color-mix(in srgb, var(--ink) 86%, var(--muted)); }
.prose li + li { margin-top: 4px; }
.prose code, .prose kbd { font-size: 14px; background: var(--surface2); padding: 1px 6px; border-radius: 5px; overflow-wrap: anywhere; }
.prose pre { font-size: 14px; line-height: 1.6; background: var(--surface2); padding: 14px 16px; border-radius: 10px; overflow: auto; }
.prose pre code { background: none; padding: 0; }
.prose .label { display: block; font-size: 13px; color: var(--muted); margin: 18px 0 -6px; }
.prose .table {
    display: grid; grid-template-columns: auto 1fr; gap: 8px 16px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px;
}
.prose .table > span:nth-child(odd) { color: var(--muted); }
.prose .table code { background: none; padding: 0; }

/* ---------- narrow screens ---------- */
@media (max-width: 860px) {
    h1, .hero h1 { font-size: 34px; }
    .hero, .doc { grid-template-columns: 1fr; gap: 26px; }
    .hero .btns { flex-direction: row; }
    .fb { grid-template-columns: 220px 1fr; }
    .fb-strip a { padding: 10px 14px; }
    .fb-stage { padding: 20px; }
    .downloads { grid-template-columns: 1fr; }
    .toc { position: static; }
}
/* Too narrow for a strip beside the stage: every feature is shown, one under another */
@media (max-width: 640px) {
    .fb { display: block; }
    .fb-strip { display: none; }
    .fb-stage { padding: 18px; }
    .panel, .js .panel[hidden] { display: flex; flex-direction: column; }
    .panel p { order: -1; margin: 0 0 14px; }
    .panel + .panel, .js .panel + .panel { margin-top: 36px; }
}
@media (max-width: 560px) {
    .head { gap: 12px; }
    .brand { font-size: 18px; }
    .nav { gap: 14px; font-size: 14px; }
    .nav .wide { display: none; }
}
