/*
  Debrief marketing site — shared design system.
  Used by index.html, r.html, and join.html so every public-facing page
  shares one visual language: colors, type scale, buttons, cards, nav,
  footer, and motion. Page-specific layout (hero, QR card, etc.) stays
  in each page's own <style> block; anything reusable belongs here.
*/

:root {
    color-scheme: light dark;

    --bg: #faf8f6;
    --bg-elevated: #ffffff;
    --text: #12110f;
    --text-muted: #6b6864;
    --text-faint: #98948e;
    --border: rgba(20, 18, 15, 0.08);
    --card-bg: #ffffff;
    --shadow: 0 24px 60px -20px rgba(20, 18, 15, 0.14), 0 4px 16px -4px rgba(20, 18, 15, 0.06);
    --shadow-sm: 0 8px 24px -8px rgba(20, 18, 15, 0.10);
    --nav-bg: rgba(250, 248, 246, 0.72);

    --blob-1: rgba(255, 189, 138, 0.38);
    --blob-2: rgba(189, 170, 255, 0.30);
    --blob-3: rgba(147, 210, 255, 0.30);

    --cta-bg: #111110;
    --cta-text: #faf8f6;
    --pill-bg: #111110;
    --pill-text: #faf8f6;

    --icon-bg: #f1ede8;

    --success: #1f9d55;
    --error: #c0392b;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0c0c0e;
        --bg-elevated: #17171a;
        --text: #f5f4f2;
        --text-muted: #a5a29d;
        --text-faint: #6f6c68;
        --border: rgba(255, 255, 255, 0.08);
        --card-bg: #17171a;
        --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.55), 0 4px 16px -4px rgba(0, 0, 0, 0.35);
        --shadow-sm: 0 8px 24px -8px rgba(0, 0, 0, 0.45);
        --nav-bg: rgba(12, 12, 14, 0.68);

        --blob-1: rgba(255, 150, 90, 0.16);
        --blob-2: rgba(150, 120, 255, 0.14);
        --blob-3: rgba(90, 170, 255, 0.13);

        --cta-bg: #f5f4f2;
        --cta-text: #111110;
        --pill-bg: #f5f4f2;
        --pill-text: #111110;

        --icon-bg: #201f22;

        --success: #3ec46d;
        --error: #ff6b5e;
    }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    overflow-x: hidden;
}

a { color: inherit; }

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

/* ---------- Nav ---------- */

.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--nav-bg);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.brand-mark {
    font-size: 18px;
    line-height: 1;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 100px;
    background: var(--pill-bg);
    color: var(--pill-text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.nav-cta:hover { opacity: 0.85; }
.nav-cta:active { transform: scale(0.96); }

/* ---------- Blobs (soft background gradients) ---------- */

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
}

.blob-1 { background: var(--blob-1); }
.blob-2 { background: var(--blob-2); }
.blob-3 { background: var(--blob-3); }

/* ---------- Buttons ---------- */

.btn-store {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--cta-bg);
    color: var(--cta-text);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
    padding: 18px 32px;
    border-radius: 100px;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    border: none;
    cursor: pointer;
}

.btn-store:hover { transform: translateY(-2px); }
.btn-store:active { transform: translateY(0) scale(0.98); }

.btn-store svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-store.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.btn-store.btn-secondary.highlighted {
    background: var(--cta-bg);
    color: var(--cta-text);
    box-shadow: var(--shadow);
}

.btn-store:disabled,
.btn-store[aria-disabled="true"] {
    opacity: 0.55;
    pointer-events: none;
}

/* ---------- Cards ---------- */

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.card-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--icon-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.card-icon svg {
    width: 24px;
    height: 24px;
    color: var(--text);
}

.card h3 {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin: 0 0 10px 0;
}

.card p {
    font-size: 15.5px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* ---------- Status message (deep-link attempt feedback) ---------- */

.status-msg {
    font-size: 14px;
    color: var(--text-faint);
    margin: 18px 0 0 0;
    min-height: 20px;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.status-msg.visible { color: var(--text-muted); }
.status-msg.error { color: var(--error); }

/* ---------- Footer ---------- */

footer.site-footer {
    border-top: 1px solid var(--border);
    padding: 32px 24px 40px;
}

.footer-inner {
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.footer-brand {
    font-size: 13px;
    color: var(--text-faint);
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Scroll reveal ---------- */

.js .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .js .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ---------- Shared responsive rules ---------- */

@media (max-width: 720px) {
    .footer-inner { flex-direction: column; align-items: flex-start; }
}
