/* PrivatePaste homepage. Colours, type and radii follow DESIGN.md (Night Vault), like the web app. */

@font-face {
    font-family: "Sora";
    src: url("/fonts/sora-latin.woff2") format("woff2");
    font-weight: 100 800;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Sora";
    src: url("/fonts/sora-latin-ext.woff2") format("woff2");
    font-weight: 100 800;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    color-scheme: dark;
    --night: #15122B;
    --surface: #1D1838;
    --raised: #262046;
    --line: #2E2756;
    --text: #E9E6F7;
    --muted: #9A94BD;
    --accent: #B7A5FF;
    --accent-ink: #15122B;
    --accent-soft: rgba(183, 165, 255, .14);
    --danger: #FF8FA3;
    --danger-soft: rgba(255, 143, 163, .08);
    --code: #100E22;
    --glow: rgba(183, 165, 255, .18);
    /* Outlines that must stand out from the surface (at least 3:1). */
    --edge: #6A62A0;
    --radius: 16px;
}

@media (prefers-color-scheme: light) {
    :root {
        color-scheme: light;
        --night: #F6F4FD;
        --surface: #FFFFFF;
        --raised: #EFEBFC;
        --line: #E1DBF7;
        --text: #1E1A38;
        --muted: #625C88;
        --accent: #5B45D6;
        --accent-ink: #FFFFFF;
        --accent-soft: rgba(91, 69, 214, .10);
        --danger: #C2364A;
        --danger-soft: rgba(194, 54, 74, .06);
        --code: #F1EEFC;
        --glow: rgba(91, 69, 214, .12);
        --edge: #7E76B0;
    }
}

* { box-sizing: border-box; }
/* No scroll padding: a section's own top padding keeps its heading just below the sticky top bar. */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
    margin: 0; background: var(--night); color: var(--text);
    font-family: "Sora", "Segoe UI", system-ui, sans-serif; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
code { background: var(--raised); padding: .05em .4em; border-radius: 6px; font-size: .9em; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; overflow-wrap: anywhere; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Top bar */
/* The top bar stays on screen, so the menu is always one tap away. */
.bar {
    position: sticky; top: 0; z-index: 20;
    background: var(--night); background: color-mix(in srgb, var(--night) 88%, transparent); border-bottom: 1px solid transparent;
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.bar.scrolled { border-bottom-color: var(--line); }
.top { display: flex; align-items: center; gap: 12px; padding-top: 14px; padding-bottom: 14px; position: relative; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.word { font-weight: 600; font-size: 20px; letter-spacing: -.2px; }
.word span { color: var(--accent); font-weight: 400; }
.top nav { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 14px; padding: 6px 12px; border-radius: 99px; }
.top nav a:hover { color: var(--accent); background: var(--accent-soft); }

/* Hero */
.hero { text-align: center; padding-top: 48px; position: relative; isolation: isolate; }
.hero::before {
    content: ""; position: absolute; left: 50%; top: -60px; width: min(900px, 100%); height: 460px; transform: translateX(-50%);
    background: radial-gradient(closest-side, var(--glow), transparent); z-index: -1; pointer-events: none;
}
.hero h1 { font-size: clamp(32px, 5.2vw, 54px); line-height: 1.12; letter-spacing: -.8px; margin: 0 0 18px; }
.intro { color: var(--muted); font-size: clamp(16px, 2vw, 18px); max-width: 640px; margin: 0 auto 30px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-block; padding: 13px 22px; border-radius: 12px; font-weight: 600; font-size: 15px; text-decoration: none; transition: filter .15s, background .15s; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.soft { background: var(--accent-soft); color: var(--accent); }
.btn.soft:hover { background: var(--raised); }

.trust { margin: 18px auto 0; color: var(--muted); font-size: 13px; max-width: 640px; }

.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
    display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: 12px;
    background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 15px; text-decoration: none;
    transition: background .15s, color .15s;
}
.pill svg { width: 20px; height: 20px; flex: none; }
.pill:hover { background: var(--accent); color: var(--accent-ink); }

.shot { display: block; margin: 36px auto 0; max-width: 1000px; }
/* The screenshot carries its own rounded frame and backdrop. */
.shot img { display: block; width: 100%; height: auto; }

/* Phones: a carousel with one app per slide instead of the wide hero. Native swipe with scroll snap; site.js adds
   the dots and arrow keys. Each slide image carries its own frame and shadow on a transparent background. */
.carousel { display: none; }
.slides {
    --slide: min(78%, 320px);
    display: flex; gap: 12px; position: relative; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--radius);
}
.slides::-webkit-scrollbar { display: none; }
/* Room before the first slide and after the last, so they too can sit in the middle. */
.slides::before, .slides::after { content: ""; flex: 0 0 calc((100% - var(--slide)) / 2 - 12px); }
.slides:focus-visible { outline-offset: -2px; }
/* Captions at the bottom, also on a slide whose picture site.js hasn't put in yet. */
.slide {
    flex: 0 0 var(--slide); margin: 0; scroll-snap-align: center; scroll-snap-stop: always;
    display: flex; flex-direction: column; justify-content: flex-end;
}
.slide img { display: block; width: 100%; height: auto; }
.slide figcaption { margin-top: 4px; font-weight: 600; font-size: 15px; }
.slide figcaption span { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 4px; }
.dots { display: none; }
.dots button { width: 32px; height: 32px; padding: 0; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.dots button::before { content: ""; width: 8px; height: 8px; border-radius: 99px; background: var(--edge); transition: width .15s, background .15s; }
.dots button[aria-current="true"]::before { width: 22px; background: var(--accent); }

/* Sections */
section[id] { padding-top: 88px; }
h2 { font-size: clamp(24px, 3vw, 30px); letter-spacing: -.4px; margin: 0 0 6px; }
.lead { color: var(--muted); margin: 0 0 28px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin: 0 0 6px; font-size: 16px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.ico { width: 40px; height: 40px; border-radius: 11px; background: var(--raised); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }
.ico svg { width: 20px; height: 20px; }

/* How it works */
.how { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; }
.flow { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 14px; }
.flow li { counter-increment: step; position: relative; padding-left: 44px; color: var(--muted); }
.flow li::before {
    content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 99px;
    background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; display: grid; place-items: center;
}
.flow b { color: var(--text); font-weight: 600; }
.diagram { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.diagram svg { display: block; width: 100%; height: auto; stroke-linecap: round; }
.d-server { fill: var(--raised); stroke: var(--accent); stroke-width: 1.5; }
.d-box { fill: var(--night); stroke: var(--edge); stroke-width: 1.5; }
.d-line { stroke: var(--accent); stroke-width: 2; fill: none; }
.d-arrow { fill: var(--accent); stroke: none; }
.diagram text { stroke: none; font-family: inherit; }
.d-title { fill: var(--text); font-size: 15px; font-weight: 600; }
.d-label { fill: var(--text); font-size: 13px; }
.d-sub { fill: var(--muted); font-size: 11.5px; }

/* Security */
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.facts li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; color: var(--muted); font-size: 14px; }
.facts b { display: block; color: var(--text); font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.facts .caution { border-color: var(--danger); background: var(--danger-soft); }
.facts .caution b { color: var(--danger); }

/* Deploy tabs */
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; margin-bottom: 18px; }
.tabs button {
    font: inherit; font-size: 14px; font-weight: 600; padding: 8px 18px; border-radius: 10px; border: 0;
    background: transparent; color: var(--muted); cursor: pointer; transition: background .15s, color .15s;
}
.tabs button:hover { color: var(--accent); }
.tabs button[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); }

.howto { list-style: none; counter-reset: n; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.howto > li { counter-increment: n; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 18px 66px; }
.howto > li::before {
    content: counter(n); position: absolute; left: 20px; top: 17px; width: 30px; height: 30px; border-radius: 99px;
    background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px; display: grid; place-items: center;
}
.howto h3 { margin: 2px 0 4px; font-size: 16px; }
.howto p, .howto ul { margin: 0; color: var(--muted); font-size: 14px; }
.howto ul { padding-left: 18px; margin-top: 6px; }
.howto ul li { margin: 4px 0; }

.howto .after { margin-top: 10px; }

/* A code block: a strip with what it is and the Copy button (added by site.js), so the button never covers code. */
.code { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--code); overflow: hidden; }
.code-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; padding: 4px 6px 4px 16px;
    border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px;
}
.code pre {
    margin: 0; padding: 12px 16px 14px; color: var(--text); overflow-x: auto;
    font: 12.5px/1.55 ui-monospace, "Cascadia Code", Consolas, monospace; tab-size: 4;
}
/* Lines as site.js splits them: an empty one keeps its height, a wrapped one hangs under its own text. */
.code pre .line { display: block; padding-left: var(--hang, 0); text-indent: calc(-1 * var(--hang, 0)); }
.code pre .line:empty::after { content: " "; }
.copy {
    font: inherit; font-size: 12px; font-weight: 600; padding: 4px 10px;
    border-radius: 8px; border: 0; background: var(--accent-soft); color: var(--accent); cursor: pointer;
}
.copy:hover { background: var(--accent); color: var(--accent-ink); }

.aside { margin-top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.aside h3 { margin: 0 0 4px; font-size: 16px; }
.aside p { margin: 0; color: var(--muted); font-size: 14px; }
.note { margin: 16px 0 0; color: var(--muted); font-size: 14px; }

.warn { margin: 16px 0 0; background: var(--danger-soft); border: 1px solid var(--danger); border-radius: 12px; padding: 12px 16px; font-size: 14px; }
.warn b { color: var(--danger); }

/* Apps */
.apps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.apps > li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.apps p { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
/* Web has nothing to download: same badge as the download buttons, without the button behaviour. */
.pill.static { cursor: default; }
.pill.static:hover { background: var(--accent-soft); color: var(--accent); }

/* FAQ: plain <details>, so the answers open without JavaScript. */
.faq { display: grid; gap: 10px; margin-top: 22px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.faq summary {
    cursor: pointer; list-style: none; padding: 16px 20px 16px 48px; position: relative; font-weight: 600; font-size: 15px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
    content: "+"; position: absolute; left: 20px; top: 15px; width: 18px; text-align: center; color: var(--accent); font-weight: 700;
}
.faq details[open] summary::before { content: "\2212"; }
.faq summary:hover { color: var(--accent); }
.faq summary:focus-visible { outline-offset: -2px; border-radius: var(--radius); }
.faq details p { margin: 0; padding: 0 20px 18px 48px; color: var(--muted); font-size: 14px; }

/* Hosted version sign-up. Without JavaScript the form posts and comes back with #notify-<result>, and :target shows
   that message; site.js sends it with fetch instead, puts the result in .notify-status and hides those. */
.hosted {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 40px; align-items: start;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
}
.hosted .lead { margin: 0; }
.notify { display: grid; gap: 12px; position: relative; }
.field-label { font-size: 14px; font-weight: 600; margin-bottom: -4px; }
.notify-row { display: flex; flex-wrap: wrap; gap: 10px; }
.notify-row input {
    flex: 1 1 220px; min-width: 0; font: inherit; font-size: 15px; color: var(--text);
    background: var(--raised); border: 1px solid var(--edge); border-radius: 10px; padding: 11px 14px;
}
.notify-row input::placeholder { color: var(--muted); opacity: 1; }
.notify-row input:focus-visible { outline-offset: 1px; border-radius: 10px; }
.notify .btn { border: 0; cursor: pointer; font-family: inherit; border-radius: 10px; padding: 12px 20px; }
.notify .btn:disabled { cursor: progress; filter: saturate(.6); }
.consent { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 14px; cursor: pointer; }
.consent input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--accent); cursor: pointer; }
.trap { position: absolute; left: -10000px; top: 0; width: 1px; height: 1px; overflow: hidden; }
.notify-status, .notify-msg { margin: 0; padding: 10px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.notify-status:empty, .notify-msg, .notify.sent .notify-msg:target { display: none; }
/* Scrolled to with room above, so the form shows too and the sticky top bar covers neither. */
.notify-msg:target { display: block; scroll-margin-top: 240px; }
.notify-status.ok, .notify-msg.ok { color: var(--accent); background: var(--accent-soft); }
.notify-status.error, .notify-msg.error { color: var(--danger); background: var(--danger-soft); border: 1px solid var(--danger); }
.fine { margin: 0; color: var(--muted); font-size: 13px; }

/* Footer */
.bottom { margin-top: 96px; padding-top: 26px; padding-bottom: 40px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 13px; }
.bottom a { color: var(--muted); }
.bottom a:hover { color: var(--accent); }

@media (max-width: 800px) {
    .how, .hosted { grid-template-columns: minmax(0, 1fr); }
    .howto > li { padding-left: 20px; padding-top: 58px; }
    .howto > li::before { top: 18px; }
}

.menu-button { display: none; }
@media (max-width: 640px) {
    .hero { padding-top: 28px; }
    .shot { display: none; }
    /* Edge to edge, so the neighbouring slides peek in from the sides of the screen. */
    .carousel { display: block; margin: 28px -20px 0; }
    /* Long lines wrap (keeping their indentation) instead of hiding off the side; Copy still copies them as they are. */
    .code pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; padding-left: 14px; padding-right: 14px; }
    .howto > li, .apps > li, .facts li, .aside { padding-left: 16px; padding-right: 16px; }
    .hosted { padding: 20px 16px; }
    .notify-row .btn { flex: 1 1 100%; }
    .facts, .apps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) and (scripting: enabled) {
    .dots { display: flex; justify-content: center; margin-top: 6px; }
}
@media (max-width: 380px) {
    .wrap { padding-left: 16px; padding-right: 16px; }
    .carousel { margin-left: -16px; margin-right: -16px; }
    .howto > li, .apps > li, .facts li, .aside, .hosted { padding-left: 12px; padding-right: 12px; }
}

/* Narrow screens: the links fold into a menu under a button next to the logo. Without JavaScript they wrap. */
@media (max-width: 900px) and (scripting: enabled) {
    .menu-button {
        display: grid; place-items: center; margin-left: auto; width: 42px; height: 42px; padding: 0;
        border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); cursor: pointer;
    }
    .menu-button svg { width: 22px; height: 22px; }
    .menu-button .cross, .menu-button[aria-expanded="true"] .bars { display: none; }
    .menu-button[aria-expanded="true"] .cross { display: inline; }
    .top nav {
        display: none; position: absolute; top: calc(100% - 6px); left: 20px; right: 20px; z-index: 10;
        flex-direction: column; gap: 2px; padding: 8px; margin: 0;
        background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
        box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
    }
    .top nav.open { display: flex; }
    .top nav a { font-size: 16px; color: var(--text); padding: 12px 14px; border-radius: 10px; }
    .top nav a:hover { background: var(--accent-soft); color: var(--accent); }
}

/* Privacy policy page: one column of text under the same top bar, with a plain link home instead of the menu. */
.top .home { margin-left: auto; color: var(--muted); text-decoration: none; font-size: 14px; padding: 6px 12px; border-radius: 99px; }
.top .home:hover { color: var(--accent); background: var(--accent-soft); }
.policy { max-width: 760px; padding-top: 40px; }
.policy h1 { font-size: clamp(30px, 4.4vw, 42px); line-height: 1.15; letter-spacing: -.6px; margin: 0 0 10px; }
.policy h2 { font-size: 20px; letter-spacing: -.2px; margin: 40px 0 8px; }
/* Linked from the homepage's sign-up form: lands below the sticky top bar. */
.policy h2[id] { scroll-margin-top: 90px; }
.policy p, .policy li { color: var(--muted); font-size: 15px; }
.policy b { color: var(--text); font-weight: 600; }
.policy ul { padding-left: 20px; margin: 0; }
.policy li { margin: 6px 0; }
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.summary li b { display: block; }
