/* Liquid glass design system shared by the ShiftSync pages. */
:root {
    color-scheme: light dark;
    --bg: #eef2fb;
    --text: #0f1420;
    --muted: #5b6577;
    --body: #3a4353;
    --accent: #0a6cff;
    --glass: rgba(255, 255, 255, 0.42);
    --glass-strong: rgba(255, 255, 255, 0.62);
    --glass-edge: rgba(255, 255, 255, 0.85);
    --glass-edge-soft: rgba(255, 255, 255, 0.35);
    --glass-shadow: 0 30px 60px -30px rgba(20, 40, 90, 0.35), 0 12px 24px -16px rgba(20, 40, 90, 0.25);
    --specular: rgba(255, 255, 255, 0.9);
    --pill: rgba(255, 255, 255, 0.5);
    --border: rgba(15, 20, 32, 0.08);
    --blob-1: #7fb3ff;
    --blob-2: #b8a6ff;
    --blob-3: #8fe3d1;
    --blob-4: #ffd6a8;
    --blob-cursor: #9cc7ff;
    --blob-blend: normal;
    --blob-alpha: 0.85;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #07090f;
        --text: #f3f5fa;
        --muted: #8b95a8;
        --body: #b9c1d0;
        --accent: #63a4ff;
        --glass: rgba(255, 255, 255, 0.07);
        --glass-strong: rgba(255, 255, 255, 0.11);
        --glass-edge: rgba(255, 255, 255, 0.45);
        --glass-edge-soft: rgba(255, 255, 255, 0.12);
        --glass-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7), 0 12px 24px -12px rgba(0, 0, 0, 0.5);
        --specular: rgba(255, 255, 255, 0.55);
        --pill: rgba(255, 255, 255, 0.08);
        --border: rgba(255, 255, 255, 0.1);
        --blob-1: #1f5fd6;
        --blob-2: #5b3fd6;
        --blob-3: #1c8f86;
        --blob-4: #b2652a;
        --blob-cursor: #2f7bff;
        --blob-blend: screen;
        --blob-alpha: 0.75;
    }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: rgba(10, 108, 255, 0.25); }

/* ---------- background: canvas when the page has one, gradient fallback otherwise ---------- */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg canvas { position: absolute; inset: -12%; width: 124%; height: 124%; filter: blur(48px) saturate(1.25); will-change: transform; }
.bg .fallback {
    position: absolute; inset: -12%;
    background:
        radial-gradient(40% 45% at 18% 20%, var(--blob-1) 0%, transparent 70%),
        radial-gradient(40% 45% at 82% 18%, var(--blob-2) 0%, transparent 70%),
        radial-gradient(40% 45% at 30% 85%, var(--blob-3) 0%, transparent 70%),
        radial-gradient(35% 40% at 85% 80%, var(--blob-4) 0%, transparent 70%);
    filter: blur(40px) saturate(1.2);
    opacity: var(--blob-alpha);
}
.bg .grain {
    position: absolute; inset: 0; opacity: 0.35; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.5  0 0 0 0 0.5  0 0 0 0 0.5  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.bg .vignette {
    position: absolute; inset: 0;
    background: radial-gradient(120% 80% at 50% 0%, transparent 40%, color-mix(in srgb, var(--bg) 70%, transparent) 100%);
}

/* ---------- glass ---------- */
.glass {
    position: relative;
    background: var(--glass);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    backdrop-filter: blur(28px) saturate(180%);
    box-shadow:
        inset 0 1px 0 var(--glass-edge),
        inset 0 -1px 0 var(--glass-edge-soft),
        inset 1px 0 0 var(--glass-edge-soft),
        inset -1px 0 0 var(--glass-edge-soft),
        var(--glass-shadow);
}
.glass::before {
    content: "";
    position: absolute; inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(135deg, var(--glass-edge) 0%, transparent 35%, transparent 65%, var(--glass-edge-soft) 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* ---------- layout ---------- */
.page { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 1.25rem 1rem 4rem; }
@media (min-width: 720px) { .page { padding: 1.5rem 2rem 5rem; } }

.nav {
    position: sticky; top: 0.75rem; z-index: 5;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 0.5rem 0.6rem 0.5rem 0.6rem;
    border-radius: 999px;
    max-width: 680px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 650; letter-spacing: -0.01em; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 9px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 4px 10px -4px rgba(40,100,121,0.6); }
.nav-links { display: flex; gap: 0.15rem; }
.nav-links a { padding: 0.45rem 0.8rem; border-radius: 999px; font-size: 0.92rem; color: var(--body); transition: background 0.2s ease, color 0.2s ease; }
.nav-links a:hover, .nav-links a[aria-current] { background: var(--pill); color: var(--text); text-decoration: none; }
@media (max-width: 480px) { .nav-links a { padding: 0.45rem 0.55rem; font-size: 0.85rem; } .brand span { display: none; } }

.pill {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.4rem 0.95rem; border-radius: 999px;
    font-size: 0.9rem; font-weight: 550; color: var(--text);
    background: var(--pill);
    box-shadow: inset 0 1px 0 var(--glass-edge), inset 0 -1px 0 var(--glass-edge-soft);
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #34c759; box-shadow: 0 0 0 4px rgba(52,199,89,0.2); }

/* ---------- document pages (privacy, terms, support) ---------- */
.doc { max-width: 720px; margin: clamp(1.5rem, 5vh, 3rem) auto 0; padding: clamp(1.75rem, 4vw, 3rem); border-radius: 28px; }
.doc h1 { font-size: clamp(1.9rem, 4.5vw, 2.5rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 0.5rem; }
.doc .subtitle { color: var(--muted); font-size: 1.1rem; margin-bottom: 0.5rem; }
.doc .effective { color: var(--muted); font-size: 0.9rem; margin-bottom: 2rem; }
.doc h2 { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.015em; margin-top: 2rem; margin-bottom: 0.75rem; }
.doc h3 { font-size: 1.05rem; font-weight: 600; margin-top: 1.25rem; margin-bottom: 0.5rem; }
.doc p { margin-bottom: 1rem; color: var(--body); }
.doc ul, .doc ol { margin-bottom: 1rem; padding-left: 1.5rem; color: var(--body); }
.doc li { margin-bottom: 0.5rem; }
.doc table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; font-size: 0.95rem; }
.doc th, .doc td { text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--body); }
.doc th { color: var(--text); font-weight: 600; }
.doc .card { background: var(--pill); border-radius: 16px; padding: 1.25rem 1.5rem; margin: 1.5rem 0; box-shadow: inset 0 1px 0 var(--glass-edge); }
.doc .card p { margin-bottom: 0.5rem; } .doc .card p:last-child { margin-bottom: 0; }

.foot {
    margin-top: 2.5rem;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem;
    padding: 1rem 1.4rem; border-radius: 20px;
    font-size: 0.9rem; color: var(--muted);
    max-width: 720px; margin-left: auto; margin-right: auto;
}
.foot .links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.foot a { color: var(--body); }
.foot a:hover { color: var(--accent); text-decoration: none; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
