/* Hyper Volume site - shared styles.
   Palette comes straight from the app (lib/core/theme/app_colors.dart): the
   deep indigo canvas, the violet -> cyan brand gradient and the soft glass
   cards. No web fonts or third-party assets are loaded - the privacy policy
   says so in "This website". */

:root {
    --bg: #0b0c1e;
    --bg-mid: #0e0b26;
    --bg-deep: #07070f;
    --surface: #15163a;
    --surface-hi: #1e2050;
    --surface-low: #101130;

    --violet: #7c5cff;
    --violet-lite: #a896ff;
    --cyan: #22d3ee;
    --pink: #ff4fd8;
    --amber: #ffb547;
    --green: #34d399;
    --red: #ff3d6e;

    --ink: #f4f5ff;
    --ink-dim: #a7a9d0;
    --ink-mute: #6e7099;
    --line: rgba(255, 255, 255, .08);
    --line-strong: rgba(255, 255, 255, .14);

    --brand: linear-gradient(90deg, var(--violet), var(--cyan));
    --hot: linear-gradient(135deg, var(--pink), var(--violet));
    --radius: 22px;
    --gutter: 1.5rem;
    --maxw: 1180px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, "Helvetica Neue", sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.65;
    overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--violet-lite); }
a:hover { color: var(--cyan); }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.ic { width: 1em; height: 1em; fill: currentColor; flex-shrink: 0; display: inline-block; }

/* The neon night canvas behind every page. */
.canvas {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 70% 50% at 15% -5%, rgba(124, 92, 255, .30), transparent 65%),
        radial-gradient(ellipse 50% 40% at 95% 5%, rgba(255, 79, 216, .12), transparent 70%),
        radial-gradient(ellipse 60% 50% at 90% 100%, rgba(34, 211, 238, .10), transparent 70%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-mid) 55%, var(--bg-deep) 100%);
}

.skip-link {
    position: absolute;
    left: -999px;
    top: .5rem;
    background: var(--violet);
    color: #fff;
    padding: .5rem 1rem;
    border-radius: 999px;
    z-index: 200;
}
.skip-link:focus { left: .5rem; }

/* ---------------------------------------------------------------- Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 12, 30, .78);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: .8rem var(--gutter);
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    color: var(--ink);
    text-decoration: none;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: .2px;
    flex-shrink: 0;
}
.brand:hover { color: var(--ink); }
.brand img { width: 36px; height: 36px; border-radius: 10px; }

.site-nav {
    display: flex;
    align-items: center;
    gap: .25rem;
    margin-left: auto;
}

.site-nav a {
    color: var(--ink-dim);
    text-decoration: none;
    font-weight: 600;
    font-size: .95rem;
    padding: .45rem .8rem;
    border-radius: 999px;
    transition: color .2s, background .2s;
    white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }
.site-nav a[aria-current="page"] { color: var(--ink); background: rgba(124, 92, 255, .18); }

.site-nav .nav-cta {
    color: #fff;
    background: var(--brand);
    margin-left: .4rem;
}
.site-nav .nav-cta:hover { color: #fff; background: var(--brand); filter: brightness(1.1); }

@media (max-width: 820px) {
    .header-inner { flex-wrap: wrap; gap: .5rem; padding: .7rem 1rem .55rem; }
    .site-nav {
        width: 100%;
        margin: 0;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
        mask-image: linear-gradient(90deg, #000 88%, transparent);
        padding-right: 1.5rem;
    }
    .site-nav::-webkit-scrollbar { display: none; }
    .site-nav a { font-size: .9rem; padding: .35rem .7rem; }
}

/* --------------------------------------------------------------- Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: .9rem 1.6rem;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform .15s ease, filter .2s, background .2s, border-color .2s;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn .ic { width: 1.2em; height: 1.2em; }

.btn-primary {
    color: #fff;
    background: var(--brand);
    box-shadow: 0 10px 30px -8px rgba(124, 92, 255, .65);
}
.btn-primary:hover { color: #fff; filter: brightness(1.1); transform: translateY(-1px); }

.btn-ghost {
    color: var(--ink);
    background: rgba(255, 255, 255, .05);
    border-color: var(--line-strong);
}
.btn-ghost:hover { color: var(--ink); background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .24); }

/* Laid out like Google's own black badge: mark on the left, a small line
   over the store name. */
.store-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    background: #000;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 12px;
    padding: .6rem 1.3rem .6rem 1rem;
    text-decoration: none;
    min-width: 200px;
    transition: border-color .2s, transform .15s;
}
.store-badge:hover { color: #fff; border-color: rgba(255, 255, 255, .7); }
.store-badge svg { width: 32px; height: 32px; flex-shrink: 0; }
.store-badge .small { display: block; font-size: .66rem; letter-spacing: .4px; text-transform: uppercase; line-height: 1.2; }
.store-badge .name { display: block; font-size: 1.35rem; font-weight: 600; letter-spacing: -.2px; line-height: 1.15; }
.store-badge[aria-disabled="true"] { cursor: default; }
.store-badge .soon {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--amber);
    color: #2b1a00;
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: .6px;
    padding: .2rem .55rem;
    border-radius: 999px;
}

/* -------------------------------------------------------------- Sections */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

.section { padding: 5.5rem 0; scroll-margin-top: 3rem; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: .8rem;
}

.section-title {
    font-size: clamp(1.9rem, 4.2vw, 2.8rem);
    line-height: 1.12;
    font-weight: 850;
    letter-spacing: -.5px;
    margin-bottom: .9rem;
}

.section-sub {
    color: var(--ink-dim);
    font-size: 1.08rem;
    max-width: 60ch;
}

.center { text-align: center; }
.center .section-sub { margin-left: auto; margin-right: auto; }

.grad-text {
    background: var(--brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.glass {
    background: linear-gradient(135deg, rgba(21, 22, 58, .88), rgba(16, 17, 48, .88));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 18px 40px -18px rgba(124, 92, 255, .25);
}

@media (max-width: 720px) {
    :root { --gutter: 1rem; }
    .section { padding: 4rem 0; }
}

/* ---------------------------------------------------------------- Footer */
.site-footer {
    margin-top: 4rem;
    border-top: 1px solid var(--line);
    background: rgba(7, 7, 15, .72);
    color: var(--ink-dim);
    font-size: .93rem;
}

.footer-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 3rem var(--gutter) 2rem;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2rem;
}

.footer-inner h4 {
    color: var(--ink);
    font-size: .8rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: .8rem;
}

.footer-inner ul { list-style: none; }
.footer-inner li { margin-bottom: .45rem; }
.footer-inner li a { color: var(--ink-dim); text-decoration: none; }
.footer-inner li a:hover { color: var(--ink); }
.footer-about p { margin-top: .8rem; max-width: 38ch; }

.footer-bottom {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 1.25rem var(--gutter) 2rem;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .5rem 1.5rem;
    color: var(--ink-mute);
    font-size: .85rem;
}

@media (max-width: 720px) {
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .footer-about { grid-column: 1 / -1; }
}

/* ------------------------------------------------------ Document pages
   Privacy policy, terms, data deletion and the setup guide share this. */
.doc-hero { padding: 3.5rem 0 1.5rem; }
.doc-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.1;
    font-weight: 850;
    letter-spacing: -.6px;
    margin-bottom: .75rem;
}
.doc-hero .lede { color: var(--ink-dim); font-size: 1.1rem; max-width: 62ch; }
.doc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.25rem;
    margin-top: 1.1rem;
    color: var(--ink-mute);
    font-size: .9rem;
}

.doc-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
    padding-bottom: 2rem;
}

.toc {
    position: sticky;
    top: 5.5rem;
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
    font-size: .9rem;
    padding: 1.1rem 1rem;
}
.toc summary {
    list-style: none;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin: 0 0 .6rem .5rem;
    pointer-events: none;
}
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; counter-reset: toc; }
.toc li { margin: 0; }
.toc a {
    display: block;
    color: var(--ink-dim);
    text-decoration: none;
    padding: .32rem .5rem;
    border-radius: 8px;
    line-height: 1.35;
}
.toc a:hover { color: var(--ink); background: rgba(255, 255, 255, .05); }
.toc a.active { color: var(--ink); background: rgba(124, 92, 255, .18); }

.doc {
    padding: 2.5rem 2.75rem;
    min-width: 0;
}

.doc h2 {
    font-size: 1.45rem;
    line-height: 1.25;
    margin: 2.75rem 0 .9rem;
    scroll-margin-top: 5.5rem;
    letter-spacing: -.2px;
}
.doc h2:first-child { margin-top: 0; }
.doc h3 {
    font-size: 1.08rem;
    color: var(--violet-lite);
    margin: 1.75rem 0 .55rem;
    scroll-margin-top: 5.5rem;
}
.doc p, .doc li { color: var(--ink-dim); }
.doc p { margin-bottom: 1rem; }
.doc ul, .doc ol { margin: 0 0 1.1rem 1.35rem; }
.doc li { margin-bottom: .45rem; padding-left: .2rem; }
.doc strong { color: var(--ink); }
.doc code, .kbd {
    font-family: var(--mono);
    font-size: .88em;
    background: rgba(255, 255, 255, .07);
    border: 1px solid var(--line);
    padding: .08rem .38rem;
    border-radius: 6px;
    color: var(--ink);
}
.path { color: var(--ink); font-weight: 600; }

.callout {
    border: 1px solid var(--line);
    border-left: 4px solid var(--violet);
    background: rgba(124, 92, 255, .09);
    border-radius: 14px;
    padding: 1.15rem 1.35rem;
    margin: 1.4rem 0;
}
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout.good { border-left-color: var(--green); background: rgba(52, 211, 153, .08); }
.callout.warn { border-left-color: var(--amber); background: rgba(255, 181, 71, .08); }
.callout .callout-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--ink);
    font-weight: 700;
    margin-bottom: .45rem;
}
.callout .callout-title .ic { width: 1.15em; height: 1.15em; }
.callout.good .callout-title .ic { color: var(--green); }
.callout.warn .callout-title .ic { color: var(--amber); }

.table-wrap { overflow-x: auto; margin: 0 0 1.25rem; border: 1px solid var(--line); border-radius: 14px; }
.doc table { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 560px; }
.doc th, .doc td { text-align: left; padding: .75rem .95rem; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-dim); }
.doc th { color: var(--ink); background: rgba(255, 255, 255, .04); font-weight: 700; }
.doc tr:last-child td { border-bottom: 0; }

@media (max-width: 960px) {
    .doc-layout { grid-template-columns: 1fr; }
    .toc { position: static; max-height: none; padding: 0; }
    /* Collapsible on small screens (doc.js closes it on load). */
    .toc summary {
        pointer-events: auto;
        cursor: pointer;
        margin: 0;
        padding: 1rem 1.2rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .toc summary::after { content: "+"; font-size: 1.2rem; line-height: 1; color: var(--ink-dim); }
    .toc details[open] summary::after { content: "2"; }
    .toc ol { columns: 2; column-gap: 1rem; padding: 0 .7rem 1rem; }
}

@media (max-width: 620px) {
    .doc { padding: 1.6rem 1.2rem; }
    .toc ol { columns: 1; }

    /* Tables become stacked cards; doc.js copies each header into data-label. */
    .table-wrap { overflow: visible; border: 0; }
    .doc table, .doc tbody, .doc tr, .doc td { display: block; min-width: 0; width: 100%; }
    .doc thead { display: none; }
    .doc tr {
        border: 1px solid var(--line);
        border-radius: 14px;
        background: rgba(255, 255, 255, .03);
        margin-bottom: .7rem;
        padding: .35rem 0;
    }
    .doc td { border: 0; padding: .4rem 1rem; }
    .doc td[data-label]::before {
        content: attr(data-label);
        display: block;
        font-size: .72rem;
        font-weight: 700;
        letter-spacing: .6px;
        text-transform: uppercase;
        color: var(--ink-mute);
        margin-bottom: .1rem;
    }
    .doc td:first-child { color: var(--ink); }
    .doc td:first-child[data-label]::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
