/* ══════════════════════════════════════════════════════════════════
   Delve — Product Page
   Blue primary (#3b82f6), teal secondary (#06b6d4), violet accent
   Native macOS aesthetic — Big Sur / Sonoma chrome cues
   ══════════════════════════════════════════════════════════════════ */

/* ── Reset & Base ────────────────────────────────────────────────── */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --accent: #3b82f6;
    --accent-dim: rgba(59, 130, 246, 0.6);
    --accent-faint: rgba(59, 130, 246, 0.12);
    --accent-glow: rgba(59, 130, 246, 0.35);
    --teal: #06b6d4;
    --teal-dim: rgba(6, 182, 212, 0.6);
    --teal-faint: rgba(6, 182, 212, 0.12);
    --violet: #a78bfa;
    --violet-faint: rgba(167, 139, 250, 0.12);
    --pink: #f472b6;
    --green: #34d399;
    --warm: #f59e0b;
    --bg: #060a0f;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(59, 130, 246, 0.06);
    --bg-glass: rgba(6, 10, 15, 0.8);
    --border: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(59, 130, 246, 0.2);
    --text: rgba(255, 255, 255, 0.88);
    --text-dim: rgba(255, 255, 255, 0.5);
    --text-faint: rgba(255, 255, 255, 0.3);
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --mono: 'JetBrains Mono', 'Menlo', 'SF Mono', monospace;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.2s;
}
a:hover { opacity: 0.8; }

code {
    font-family: var(--mono);
    font-size: 0.88em;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--teal);
}

img { max-width: 100%; height: auto; }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--accent);
    color: #000;
    padding: 10px 16px;
    z-index: 200;
    border-radius: 0 0 var(--radius) 0;
    font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ── Utility ─────────────────────────────────────────────────────── */

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent), var(--teal), var(--violet));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Buttons ─────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font);
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, opacity 0.2s;
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); opacity: 1; }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 20px var(--accent-glow);
}
.btn-primary:hover {
    box-shadow: 0 0 30px var(--accent-dim);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-ghost:hover {
    border-color: var(--accent-dim);
    color: var(--text);
    background: var(--accent-faint);
}

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-xl { padding: 16px 32px; font-size: 1.05rem; }

/* ── Navigation ──────────────────────────────────────────────────── */

#nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0 24px;
    transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
    border-bottom: 1px solid transparent;
}

#nav.scrolled {
    background: var(--bg-glass);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom-color: var(--border);
}

.nav-inner {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
}
.nav-logo:hover { opacity: 1; }
.nav-logo-glyph { color: var(--accent); display: inline-flex; }
.nav-logo-text {
    font-weight: 800;
    letter-spacing: -0.01em;
    font-size: 1.1rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links a {
    color: var(--text-dim);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); opacity: 1; }

.nav-cta {
    background: var(--accent);
    color: #fff !important;
    padding: 8px 18px;
    border-radius: var(--radius);
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    transition: box-shadow 0.2s, transform 0.2s;
}
.nav-cta:hover {
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-1px);
}

.nav-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 101;
}
.nav-mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
.nav-mobile-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-mobile-toggle.open span:nth-child(2) { opacity: 0; }
.nav-mobile-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── Hero ─────────────────────────────────────────────────────────── */

#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 120px 24px 80px;
    gap: 56px;
}

#hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 820px;
}

.hero-label {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 24px;
    padding: 6px 16px;
    border: 1px solid var(--border-accent);
    border-radius: 100px;
    background: var(--accent-faint);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.6rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    color: #fff;
}

.hero-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: var(--text-dim);
    max-width: 640px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.hero-platforms {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-dim);
    padding: 5px 12px;
    border: 1px solid var(--border);
    border-radius: 100px;
}

.trust-pill {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--accent);
    padding: 5px 12px;
    border: 1px solid rgba(59, 130, 246, 0.18);
    border-radius: 100px;
    background: var(--accent-faint);
}

/* ── Hero Visual: Mac Window with Treemap ─────────────────────────── */

.hero-visual {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 900px;
}

.mac-window {
    border-radius: 14px;
    overflow: hidden;
    background: #0a0e14;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.7),
        0 0 80px rgba(59, 130, 246, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.mac-titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
}

.mac-traffic {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.3);
}
.mac-traffic-red { background: #ff5f57; }
.mac-traffic-yellow { background: #febc2e; }
.mac-traffic-green { background: #28c840; }

.mac-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-dim);
    letter-spacing: -0.01em;
}

.mac-toolbar {
    margin-left: auto;
    display: flex;
    gap: 4px;
    padding: 3px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
}

.mac-pill {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-dim);
    padding: 4px 10px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}
.mac-pill-active {
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
}

.mac-statusbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
    font-size: 0.75rem;
    color: var(--text-dim);
    font-family: var(--mono);
}
.mac-stat-label {
    color: var(--accent);
    font-weight: 600;
}
.mac-stat-label::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    margin-right: 6px;
    animation: pulse-dot 1.4s ease-in-out infinite;
    vertical-align: 1px;
}
.mac-stat-path {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
}
.mac-stat-count {
    flex-shrink: 0;
    color: var(--text-dim);
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.treemap-host {
    display: grid;
    grid-template-columns: 1fr 220px;
    background: #04060a;
    min-height: 380px;
}

.treemap {
    position: relative;
    overflow: hidden;
    background: #050810;
}

.treemap-tile {
    position: absolute;
    box-sizing: border-box;
    border: 1px solid rgba(0, 0, 0, 0.45);
    transition: transform 0.25s ease, filter 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}
.treemap-tile::after {
    /* cushion sheen */
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 25%, rgba(255, 255, 255, 0.35), transparent 65%);
    pointer-events: none;
}
.treemap-tile:hover {
    filter: brightness(1.25);
    z-index: 2;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35), 0 8px 24px rgba(0, 0, 0, 0.5);
}

.treemap-tile-label {
    position: absolute;
    left: 8px;
    top: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    z-index: 1;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 12px);
}

.treemap-legend {
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
}

.treemap-legend-row {
    display: grid;
    grid-template-columns: 12px 1fr auto;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.legend-label {
    color: var(--text);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.legend-value {
    color: var(--text-dim);
    font-family: var(--mono);
    font-size: 0.72rem;
}

/* ── Hero scroll indicator ──────────────────────────────────────── */

.hero-scroll-indicator {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}
.hero-scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(180deg, transparent, var(--accent-dim), transparent);
    animation: scroll-pulse 2s ease-in-out infinite;
}
@keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ── Sections base ──────────────────────────────────────────────── */

section { padding: 100px 0; position: relative; }
section + section { border-top: 1px solid rgba(255, 255, 255, 0.04); }

.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 64px;
}

.section-label {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    color: #fff;
}

.section-desc {
    font-size: 1rem;
    color: var(--text-dim);
    line-height: 1.7;
}

/* ── Why row ─────────────────────────────────────────────────────── */

#why { padding: 80px 0; }

.why-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.why-card {
    text-align: center;
    flex: 1;
}

.why-number {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--accent), var(--teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.why-card p {
    font-size: 0.9rem;
    color: var(--text-dim);
}

.why-divider {
    width: 1px;
    height: 60px;
    background: var(--border);
}

/* ── Bento grid (features) ───────────────────────────────────────── */

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    grid-auto-rows: 1fr;
}

.bento-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: background 0.3s, border-color 0.3s, transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
}
/* Subtle top accent line */
.bento-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-dim), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.bento-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-accent);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--border-accent);
}
.bento-card:hover::before { opacity: 1; }

.bento-wide { grid-column: span 2; }

.bento-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--accent-faint), rgba(59, 130, 246, 0.04));
    color: var(--accent);
    margin-bottom: 20px;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.15);
}
.bento-icon-teal {
    background: linear-gradient(135deg, var(--teal-faint), rgba(6, 182, 212, 0.04));
    color: var(--teal);
    box-shadow: inset 0 0 0 1px rgba(6, 182, 212, 0.15);
}
.bento-icon-violet {
    background: linear-gradient(135deg, var(--violet-faint), rgba(167, 139, 250, 0.04));
    color: var(--violet);
    box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.15);
}

.bento-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
    color: #fff;
}

.bento-card p {
    font-size: 0.92rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* ── Bento hero (wide cards with visual) ─────────────────────── */

.bento-hero {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 28px;
    padding: 32px;
    background:
        radial-gradient(ellipse at 100% 0%, var(--accent-faint), transparent 55%),
        var(--bg-card);
}

.bento-text { display: flex; flex-direction: column; }
.bento-text p { margin-bottom: auto; padding-bottom: 16px; }

.bento-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}
.bento-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 100px;
    background: var(--accent-faint);
    border: 1px solid rgba(59, 130, 246, 0.18);
    letter-spacing: 0.01em;
}

.bento-visual {
    position: relative;
    min-height: 220px;
    border-radius: var(--radius);
    overflow: hidden;
    background: #04060a;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.4);
}

/* Mini treemap inside hero card */
.bento-mini-tree {
    position: absolute;
    inset: 0;
}
.bento-mini-tree span {
    position: absolute;
    box-sizing: border-box;
    border: 1px solid rgba(0, 0, 0, 0.45);
    transition: filter 0.4s;
}
.bento-mini-tree span::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 28% 22%, rgba(255, 255, 255, 0.42), transparent 65%);
}
.bento-card:hover .bento-mini-tree span { filter: brightness(1.18); }

/* Histogram inside hero card */
.bento-histogram {
    position: absolute;
    inset: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
}
.histo-row {
    display: grid;
    grid-template-columns: 42px 1fr 64px;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
}
.histo-label {
    font-family: var(--mono);
    color: var(--text);
    font-weight: 600;
    text-align: right;
}
.histo-bar {
    height: 22px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}
.histo-fill {
    height: 100%;
    border-radius: 4px;
    transform-origin: left;
    animation: histo-grow 1.4s cubic-bezier(0.22, 1, 0.36, 1) both;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.histo-row:nth-child(1) .histo-fill { animation-delay: 0.05s; }
.histo-row:nth-child(2) .histo-fill { animation-delay: 0.12s; }
.histo-row:nth-child(3) .histo-fill { animation-delay: 0.19s; }
.histo-row:nth-child(4) .histo-fill { animation-delay: 0.26s; }
.histo-row:nth-child(5) .histo-fill { animation-delay: 0.33s; }
.histo-row:nth-child(6) .histo-fill { animation-delay: 0.40s; }

@keyframes histo-grow {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.histo-val {
    font-family: var(--mono);
    color: var(--text-dim);
    font-size: 0.7rem;
    text-align: right;
}

/* Stat callout pill inside small bento cards */
.bento-stat {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--teal-faint);
    border: 1px solid rgba(6, 182, 212, 0.2);
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.bento-stat-value {
    font-family: var(--mono);
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--teal);
    letter-spacing: -0.02em;
}
.bento-stat-label {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* ── Treemap deep-dive ──────────────────────────────────────────── */

.deepdive-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 32px;
    align-items: stretch;
}

.deepdive-visual {
    position: relative;
    background: #04060a;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 460px;
}

.big-treemap {
    position: absolute;
    inset: 0;
}

.big-treemap-tooltip {
    position: absolute;
    left: 24px;
    top: 24px;
    background: rgba(6, 10, 15, 0.92);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius);
    padding: 10px 14px;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
}
.big-tt-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
}
.big-tt-meta {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-family: var(--mono);
    margin-top: 2px;
}

.deepdive-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.deepdive-spec {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.spec-key {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    font-weight: 600;
    flex-shrink: 0;
}
.spec-val {
    font-size: 0.85rem;
    color: var(--text);
    text-align: right;
    font-family: var(--mono);
}

.deepdive-note {
    margin-top: 6px;
    padding: 14px 18px;
    font-size: 0.85rem;
    color: var(--text-dim);
    background: var(--violet-faint);
    border-left: 2px solid var(--violet);
    border-radius: var(--radius-sm);
    line-height: 1.6;
}

/* ── Accounting cards ───────────────────────────────────────────── */

.accounting-demo {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.acc-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: border-color 0.3s, background 0.3s;
}
.acc-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-accent);
}

.acc-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}
.acc-icon {
    color: var(--accent);
    flex-shrink: 0;
}
.acc-card-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    font-family: var(--mono);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acc-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
    font-size: 0.85rem;
}
.acc-label {
    color: var(--text-dim);
}
.acc-val {
    font-family: var(--mono);
    font-weight: 700;
    font-size: 1rem;
}
.acc-val-logical { color: var(--text-faint); text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, 0.2); }
.acc-val-disk { color: var(--teal); }

.acc-card:nth-child(2) .acc-val-logical { text-decoration: none; color: var(--text); }
.acc-card:nth-child(2) .acc-val-disk { color: var(--text); }

.acc-note {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 0.82rem;
    color: var(--text-dim);
    line-height: 1.6;
}
.acc-note strong { color: var(--teal); font-weight: 700; }

/* ── Native grid ────────────────────────────────────────────────── */

.native-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.native-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: background 0.3s, border-color 0.3s;
}
.native-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-accent);
}
.native-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--accent-faint);
    color: var(--accent);
}
.native-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
    letter-spacing: -0.01em;
}
.native-card p {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* ── Promise grid (privacy) ─────────────────────────────────────── */

.promise-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.promise-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: background 0.3s, border-color 0.3s;
}
.promise-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-accent);
}
.promise-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
    letter-spacing: -0.01em;
}
.promise-card p {
    font-size: 0.92rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* ── FAQ ────────────────────────────────────────────────────────── */

.faq-list {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s;
}
.faq-item[open] { border-color: var(--border-accent); }

.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 24px;
    font-weight: 600;
    color: var(--text);
    font-size: 0.98rem;
    position: relative;
    padding-right: 48px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    color: var(--accent);
    transition: transform 0.2s;
    line-height: 1;
}
.faq-item[open] summary::after {
    content: '−';
    transform: translateY(-50%) rotate(180deg);
}
.faq-item p {
    padding: 0 24px 20px;
    color: var(--text-dim);
    font-size: 0.92rem;
    line-height: 1.7;
}

/* ── Download ───────────────────────────────────────────────────── */

.download-block {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
    padding: 60px 32px;
    background: radial-gradient(ellipse at top, var(--accent-faint), transparent 70%), var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-xl);
}

.download-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.download-note {
    font-size: 0.85rem;
    color: var(--text-faint);
    font-family: var(--mono);
}

/* ── Footer ─────────────────────────────────────────────────────── */

#footer {
    padding: 64px 0 40px;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.3);
}

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 32px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-weight: 700;
    color: var(--text);
}
.footer-brand .nav-logo-glyph { color: var(--accent); }

.footer-tagline {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.footer-col-heading {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 16px;
}
.footer-col a {
    display: block;
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 10px;
    transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent); opacity: 1; }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-copy {
    font-size: 0.85rem;
    color: var(--text-faint);
}
.footer-studio-inline, .footer-studio-link {
    color: var(--accent);
}

/* ── Reveal animations ──────────────────────────────────────────── */

[data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Responsive ─────────────────────────────────────────────────── */

@media (max-width: 960px) {
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
    .bento-wide { grid-column: span 2; }
    .bento-hero { grid-template-columns: 1fr; }
    .bento-visual { min-height: 180px; }
    .deepdive-grid { grid-template-columns: 1fr; }
    .accounting-demo { grid-template-columns: 1fr; }
    .native-grid, .promise-grid { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr 1fr; }
    .treemap-host { grid-template-columns: 1fr; }
    .treemap-legend { border-left: none; border-top: 1px solid rgba(255, 255, 255, 0.05); }
    .mac-title { display: none; }
    .why-row { flex-direction: column; }
    .why-divider { width: 60px; height: 1px; }
}

@media (max-width: 720px) {
    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--bg-glass);
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: stretch;
        padding: 24px;
        gap: 18px;
        border-bottom: 1px solid var(--border);
        transform: translateY(-110%);
        transition: transform 0.3s;
    }
    .nav-links.open { transform: translateY(0); }
    .nav-mobile-toggle { display: flex; }
    .bento-grid { grid-template-columns: 1fr; }
    .bento-wide { grid-column: span 1; }
    .footer-top { grid-template-columns: 1fr; }
    section { padding: 72px 0; }
}
