/* ════════════════════════════════════════════════════════════════════════════
   Nuages — landing page styles
   Purple / dark design system. Tokens echo the MAUI app's structure but shift
   the accent from SoundCloud orange to a violet/magenta gradient.
   ════════════════════════════════════════════════════════════════════════════ */

:root {
    /* ── Surfaces ─────────────────────────────────────────────── */
    --c-bg:        #0b0712;
    --c-bg-2:      #0f0a1a;
    --c-surface:   #15101f;
    --c-surface-2: #1c1530;
    --c-surface-3: #251b3d;

    /* ── Accent (violet → magenta) ───────────────────────────── */
    --c-accent:      #8b5cf6;
    --c-accent-2:    #a855f7;
    --c-accent-3:    #d946ef;
    --c-accent-dim:  rgba(139, 92, 246, 0.14);
    --c-accent-glow: rgba(139, 92, 246, 0.30);
    --c-accent-soft: rgba(168, 85, 247, 0.10);

    /* ── Text ─────────────────────────────────────────────────── */
    --c-text:    #f5f3ff;
    --c-text-2:  rgba(245, 243, 255, 0.66);
    --c-text-3:  rgba(245, 243, 255, 0.40);

    /* ── Lines ────────────────────────────────────────────────── */
    --c-border:    rgba(245, 243, 255, 0.08);
    --c-border-2:  rgba(245, 243, 255, 0.14);

    /* ── Status ───────────────────────────────────────────────── */
    --c-go:     #34d399;
    --c-warn:   #fbbf24;
    --c-danger: #f87171;

    /* ── Radii ────────────────────────────────────────────────── */
    --r-xs:  6px;
    --r-sm:  10px;
    --r-md:  14px;
    --r-lg:  20px;
    --r-xl:  28px;
    --r-full: 9999px;

    /* ── Motion ───────────────────────────────────────────────── */
    --dur-micro:  90ms;
    --dur-fast:   160ms;
    --dur-base:   240ms;
    --dur-slow:   420ms;
    --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* ── Shadows ─────────────────────────────────────────────── */
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.40);
    --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.50);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.60);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.35);

    /* ── Layout ───────────────────────────────────────────────── */
    --maxw: 1140px;
    --nav-h: 68px;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
    margin: 0;
    min-height: 100dvh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display',
                 'Helvetica Neue', Arial, sans-serif;
    background: var(--c-bg);
    color: var(--c-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
code {
    font-family: 'SF Mono', 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
    font-size: 0.88em;
    background: var(--c-accent-soft);
    color: var(--c-accent-2);
    padding: 1px 6px;
    border-radius: var(--r-xs);
    border: 1px solid rgba(139, 92, 246, 0.18);
}

/* ── Scrollbar ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.30);
    border-radius: var(--r-full);
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(139, 92, 246, 0.55); background-clip: padding-box; }
* { scrollbar-width: thin; scrollbar-color: rgba(139, 92, 246, 0.30) transparent; }

:focus-visible {
    outline: 2px solid var(--c-accent);
    outline-offset: 3px;
    border-radius: var(--r-xs);
}
:focus:not(:focus-visible) { outline: none; }

/* ════════════════════════════════════════════════════════════════════════════
   Ambient background
   ════════════════════════════════════════════════════════════════════════════ */
.bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background:
        radial-gradient(1200px 800px at 80% -10%, rgba(139, 92, 246, 0.16), transparent 60%),
        radial-gradient(1000px 700px at 0% 100%, rgba(217, 70, 239, 0.10), transparent 55%),
        var(--c-bg);
}

.bg__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.55;
    will-change: transform;
}
.bg__blob--1 {
    width: 520px; height: 520px;
    top: -120px; right: -80px;
    background: radial-gradient(circle, #7c3aed, transparent 70%);
    animation: drift1 22s ease-in-out infinite;
}
.bg__blob--2 {
    width: 460px; height: 460px;
    bottom: -100px; left: -120px;
    background: radial-gradient(circle, #d946ef, transparent 70%);
    opacity: 0.40;
    animation: drift2 28s ease-in-out infinite;
}
.bg__blob--3 {
    width: 380px; height: 380px;
    top: 40%; left: 55%;
    background: radial-gradient(circle, #6366f1, transparent 70%);
    opacity: 0.30;
    animation: drift3 34s ease-in-out infinite;
}

@keyframes drift1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-40px, 30px); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(50px, -40px); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-30px, 20px) scale(1.1); } }

.bg__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(139, 92, 246, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.045) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 80%);
}

.bg__noise {
    position: absolute;
    inset: 0;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ════════════════════════════════════════════════════════════════════════════
   Nav
   ════════════════════════════════════════════════════════════════════════════ */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    z-index: 100;
    transition: background var(--dur-base), border-color var(--dur-base),
                backdrop-filter var(--dur-base);
    border-bottom: 1px solid transparent;
}
.nav.scrolled {
    background: rgba(11, 7, 18, 0.72);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-bottom-color: var(--c-border);
}
.nav__inner {
    max-width: var(--maxw);
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand__mark {
    display: grid;
    place-items: center;
    width: 34px; height: 34px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 1.15rem;
    color: #fff;
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent-3));
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.45);
}
.brand__name {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.nav__links { display: flex; gap: 4px; margin-left: 8px; }
.nav__links a {
    padding: 8px 14px;
    border-radius: var(--r-full);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--c-text-2);
    transition: color var(--dur-fast), background var(--dur-fast);
}
.nav__links a:hover { color: var(--c-text); background: var(--c-accent-soft); }

.nav__status {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: var(--r-full);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--c-text-2);
}
.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--c-text-3);
    box-shadow: 0 0 0 0 transparent;
    transition: background var(--dur-base), box-shadow var(--dur-base);
}
.status-dot.ok {
    background: var(--c-go);
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.15);
    animation: pulse 2.4s ease-in-out infinite;
}
.status-dot.down { background: var(--c-danger); box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.15); }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.15); } 50% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0.05); } }

.nav__burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
}
.nav__burger span {
    width: 22px; height: 2px;
    background: var(--c-text);
    border-radius: 2px;
    transition: transform var(--dur-base), opacity var(--dur-base);
}
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ════════════════════════════════════════════════════════════════════════════
   Layout primitives
   ════════════════════════════════════════════════════════════════════════════ */
.section {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 96px 24px;
}
.section--alt {
    max-width: none;
    background:
        radial-gradient(700px 400px at 50% 0%, rgba(139, 92, 246, 0.06), transparent 70%),
        var(--c-bg-2);
    border-top: 1px solid var(--c-border);
    border-bottom: 1px solid var(--c-border);
}
.section--alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }

.section__head { max-width: 680px; margin-bottom: 56px; }
.eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c-accent-2);
    margin-bottom: 14px;
}
.section__title {
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 0 0 16px;
}
.section__sub {
    font-size: 1.08rem;
    color: var(--c-text-2);
    margin: 0;
}

/* ════════════════════════════════════════════════════════════════════════════
   Hero
   ════════════════════════════════════════════════════════════════════════════ */
.hero {
    position: relative;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    padding: calc(var(--nav-h) + 40px) 24px 80px;
}
.hero__inner {
    max-width: var(--maxw);
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
    align-items: center;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--r-full);
    background: var(--c-surface);
    border: 1px solid var(--c-border-2);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--c-text-2);
    margin-bottom: 28px;
}
.pill__dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--c-accent-2);
    box-shadow: 0 0 8px var(--c-accent-glow);
}

.hero__title {
    font-size: clamp(2.6rem, 6.5vw, 4.6rem);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -0.045em;
    margin: 0 0 24px;
}
.grad {
    background: linear-gradient(120deg, var(--c-accent) 0%, var(--c-accent-3) 60%, #f0abfc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero__lead {
    font-size: 1.18rem;
    color: var(--c-text-2);
    max-width: 540px;
    margin: 0 0 36px;
}

.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 48px; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 26px;
    border-radius: var(--r-full);
    font-size: 0.98rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform var(--dur-fast) var(--ease-out),
                background var(--dur-fast), box-shadow var(--dur-fast),
                border-color var(--dur-fast);
    font-family: inherit;
}
.btn:active { transform: scale(0.97); }

.btn--primary {
    color: #fff;
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent-3));
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.40);
}
.btn--primary:hover {
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.55);
    transform: translateY(-2px);
}
.btn--ghost {
    color: var(--c-text);
    background: var(--c-surface);
    border-color: var(--c-border-2);
}
.btn--ghost:hover { background: var(--c-surface-2); border-color: var(--c-accent); }

.hero__meta { display: flex; gap: 40px; flex-wrap: wrap; }
.hero__meta-item { display: flex; flex-direction: column; gap: 2px; }
.hero__meta-num {
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--c-text);
    font-variant-numeric: tabular-nums;
}
.hero__meta-label {
    font-size: 0.8rem;
    color: var(--c-text-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ── Phone mockup ─────────────────────────────────────────────────────────── */
.hero__visual { display: flex; justify-content: center; }

.phone {
    position: relative;
    width: 300px;
    height: 610px;
    border-radius: 44px;
    background: linear-gradient(160deg, #1a1230, #0d0818);
    padding: 12px;
    box-shadow:
        0 0 0 2px rgba(139, 92, 246, 0.20),
        var(--shadow-lg),
        var(--shadow-glow);
    animation: phone-float 6s ease-in-out infinite;
}
@keyframes phone-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

.phone__notch {
    position: absolute;
    top: 12px; left: 50%;
    transform: translateX(-50%);
    width: 110px; height: 26px;
    background: #0d0818;
    border-radius: 0 0 16px 16px;
    z-index: 3;
}
.phone__screen {
    position: relative;
    height: 100%;
    border-radius: 34px;
    background: linear-gradient(180deg, #140d24 0%, #0b0712 100%);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 44px 18px 22px;
}
.phone__bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--c-text-2);
    margin-bottom: 18px;
}
.phone__bar-icons { letter-spacing: 2px; color: var(--c-accent-2); }

.phone__art {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--r-lg);
    background: linear-gradient(135deg, #7c3aed, #d946ef 70%, #f0abfc);
    overflow: hidden;
    margin-bottom: 18px;
    box-shadow: 0 12px 30px rgba(124, 58, 237, 0.45);
}
.phone__art-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.35), transparent 55%);
}
.phone__wave {
    position: absolute;
    bottom: 14px; left: 14px; right: 14px;
    height: 50px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 3px;
}
.phone__wave span {
    flex: 1;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 2px;
    animation: wave 1.1s ease-in-out infinite;
}
.phone__wave span:nth-child(1)  { animation-delay: 0.0s; }
.phone__wave span:nth-child(2)  { animation-delay: 0.1s; }
.phone__wave span:nth-child(3)  { animation-delay: 0.2s; }
.phone__wave span:nth-child(4)  { animation-delay: 0.3s; }
.phone__wave span:nth-child(5)  { animation-delay: 0.4s; }
.phone__wave span:nth-child(6)  { animation-delay: 0.5s; }
.phone__wave span:nth-child(7)  { animation-delay: 0.6s; }
.phone__wave span:nth-child(8)  { animation-delay: 0.7s; }
.phone__wave span:nth-child(9)  { animation-delay: 0.8s; }
.phone__wave span:nth-child(10) { animation-delay: 0.9s; }
.phone__wave span:nth-child(11) { animation-delay: 1.0s; }
.phone__wave span:nth-child(12) { animation-delay: 1.1s; }
@keyframes wave { 0%,100% { height: 20%; } 50% { height: 100%; } }

.phone__track { text-align: center; margin-bottom: 14px; }
.phone__track-title { font-weight: 700; font-size: 1.05rem; }
.phone__track-artist { font-size: 0.82rem; color: var(--c-text-2); }

.phone__progress {
    height: 4px;
    border-radius: var(--r-full);
    background: var(--c-surface-3);
    overflow: hidden;
    margin-bottom: 16px;
}
.phone__progress-fill {
    height: 100%;
    width: 42%;
    border-radius: var(--r-full);
    background: linear-gradient(90deg, var(--c-accent), var(--c-accent-3));
    animation: progress 4s linear infinite;
}
@keyframes progress { from { width: 12%; } to { width: 78%; } }

.phone__controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    font-size: 1.1rem;
    color: var(--c-text-2);
    margin-bottom: 16px;
}
.phone__play {
    display: grid;
    place-items: center;
    width: 52px; height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent-3));
    color: #fff;
    font-size: 1.1rem;
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.50);
}

.phone__chips { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.chip {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: var(--r-xs);
    background: var(--c-surface-2);
    color: var(--c-text-2);
    border: 1px solid var(--c-border);
}
.chip--accent { color: var(--c-accent-2); background: var(--c-accent-dim); border-color: rgba(139,92,246,0.30); }
.chip--go { color: var(--c-go); background: rgba(52,211,153,0.10); border-color: rgba(52,211,153,0.26); }

/* ── Scroll cue ───────────────────────────────────────────────────────────── */
.scroll-cue {
    position: absolute;
    bottom: 28px; left: 50%;
    transform: translateX(-50%);
    width: 26px; height: 42px;
    border: 2px solid var(--c-border-2);
    border-radius: var(--r-full);
    display: flex;
    justify-content: center;
    padding-top: 7px;
}
.scroll-cue span {
    width: 4px; height: 8px;
    border-radius: var(--r-full);
    background: var(--c-accent-2);
    animation: cue 1.6s ease-in-out infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ════════════════════════════════════════════════════════════════════════════
   Feature cards
   ════════════════════════════════════════════════════════════════════════════ */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}
.card {
    padding: 28px;
    border-radius: var(--r-lg);
    background: linear-gradient(180deg, var(--c-surface), var(--c-bg-2));
    border: 1px solid var(--c-border);
    transition: transform var(--dur-base) var(--ease-out),
                border-color var(--dur-base), box-shadow var(--dur-base);
}
.card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.35);
    box-shadow: var(--shadow-md);
}
.card__icon {
    display: grid;
    place-items: center;
    width: 52px; height: 52px;
    border-radius: var(--r-md);
    background: var(--c-accent-dim);
    color: var(--c-accent-2);
    margin-bottom: 18px;
    border: 1px solid rgba(139, 92, 246, 0.22);
}
.card h3 {
    font-size: 1.18rem;
    font-weight: 700;
    margin: 0 0 8px;
    letter-spacing: -0.01em;
}
.card p { margin: 0; color: var(--c-text-2); font-size: 0.96rem; }

/* ════════════════════════════════════════════════════════════════════════════
   Security flow
   ════════════════════════════════════════════════════════════════════════════ */
.flow {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-bottom: 56px;
    flex-wrap: wrap;
}
.flow__step {
    flex: 1;
    min-width: 220px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 24px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
}
.flow__num {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent-3));
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.40);
}
.flow__body h4 { margin: 0 0 6px; font-size: 1.05rem; }
.flow__body p { margin: 0; color: var(--c-text-2); font-size: 0.92rem; }
.flow__line {
    width: 40px;
    align-self: center;
    height: 2px;
    background: linear-gradient(90deg, var(--c-accent), transparent);
}

.security__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.security__item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 20px;
    border-radius: var(--r-md);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
}
.security__check {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: rgba(52, 211, 153, 0.14);
    color: var(--c-go);
    font-weight: 800;
    font-size: 0.85rem;
}
.security__item strong { display: block; margin-bottom: 4px; }
.security__item p { margin: 0; color: var(--c-text-2); font-size: 0.9rem; }

/* ════════════════════════════════════════════════════════════════════════════
   API endpoints
   ════════════════════════════════════════════════════════════════════════════ */
.endpoints { display: flex; flex-direction: column; gap: 12px; margin-bottom: 40px; }
.endpoint {
    padding: 18px 22px;
    border-radius: var(--r-md);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    transition: border-color var(--dur-fast), background var(--dur-fast);
}
.endpoint:hover { border-color: rgba(139, 92, 246, 0.30); background: var(--c-surface-2); }
.endpoint__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.method {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: var(--r-xs);
    font-family: 'SF Mono', ui-monospace, monospace;
}
.method--get  { color: var(--c-go);     background: rgba(52,211,153,0.12); }
.method--post { color: var(--c-accent-2); background: var(--c-accent-dim); }
.endpoint__path {
    font-size: 0.95rem;
    color: var(--c-text);
    background: none;
    border: none;
    padding: 0;
}
.endpoint__auth {
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--r-full);
    color: var(--c-warn);
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.26);
}
.endpoint__auth--open { color: var(--c-go); background: rgba(52,211,153,0.10); border-color: rgba(52,211,153,0.26); }
.endpoint__desc { margin: 0; color: var(--c-text-2); font-size: 0.92rem; }

/* ── Try-it box ───────────────────────────────────────────────────────────── */
.try {
    border-radius: var(--r-lg);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    overflow: hidden;
}
.try__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--c-border);
    background: var(--c-bg-2);
}
.try__title { font-size: 0.85rem; font-weight: 600; color: var(--c-text-2); }
.try__copy {
    background: var(--c-surface-2);
    border: 1px solid var(--c-border-2);
    color: var(--c-text-2);
    padding: 5px 14px;
    border-radius: var(--r-full);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background var(--dur-fast), color var(--dur-fast);
}
.try__copy:hover { background: var(--c-surface-3); color: var(--c-text); }
.try__copy.copied { color: var(--c-go); border-color: rgba(52,211,153,0.4); }
.try__code {
    margin: 0;
    padding: 18px;
    font-family: 'SF Mono', ui-monospace, monospace;
    font-size: 0.88rem;
    color: var(--c-text);
    overflow-x: auto;
}
.try__code code { background: none; border: none; color: inherit; padding: 0; }
.try__result {
    padding: 14px 18px;
    border-top: 1px solid var(--c-border);
    background: var(--c-bg-2);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.try__result-label { font-size: 0.8rem; color: var(--c-text-3); }
.try__result code { background: none; border: none; padding: 0; color: var(--c-go); }

/* ════════════════════════════════════════════════════════════════════════════
   Downloads
   ════════════════════════════════════════════════════════════════════════════ */
.downloads {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.download {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px;
    border-radius: var(--r-lg);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    color: var(--c-accent-2);
    transition: transform var(--dur-base) var(--ease-out),
                border-color var(--dur-base), box-shadow var(--dur-base);
}
.download:hover {
    transform: translateY(-3px);
    border-color: rgba(139, 92, 246, 0.40);
    box-shadow: var(--shadow-md);
}
.download svg { flex-shrink: 0; }
.download__name { display: block; font-weight: 700; color: var(--c-text); font-size: 1.05rem; }
.download__sub { display: block; font-size: 0.82rem; color: var(--c-text-3); }

/* ════════════════════════════════════════════════════════════════════════════
   Install & auto-update
   ════════════════════════════════════════════════════════════════════════════ */
.install {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}
.install__card {
    padding: 24px;
    border-radius: var(--r-lg);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
}
.install__os {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--c-accent-2);
    margin-bottom: 16px;
}
.install__os h3 { margin: 0; font-size: 1.1rem; color: var(--c-text); }
.install__steps {
    margin: 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--c-text-2);
    font-size: 0.92rem;
}
.install__steps code,
.install__note code,
.autoupdate code {
    background: var(--c-accent-soft);
    border: 1px solid var(--c-border);
    border-radius: var(--r-xs);
    padding: 1px 6px;
    font-size: 0.85em;
    color: var(--c-text);
    white-space: nowrap;
}
.install__note {
    margin: 16px 0 0;
    font-size: 0.82rem;
    color: var(--c-text-3);
}

.autoupdate {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    margin-top: 24px;
    padding: 24px 26px;
    border-radius: var(--r-lg);
    background: linear-gradient(135deg, var(--c-accent-dim), transparent 70%), var(--c-surface);
    border: 1px solid var(--c-accent-glow);
}
.autoupdate__icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: var(--r-md);
    background: var(--c-accent-dim);
    color: var(--c-accent-2);
}
.autoupdate h4 { margin: 0 0 6px; font-size: 1.05rem; color: var(--c-text); }
.autoupdate p { margin: 0; color: var(--c-text-2); font-size: 0.92rem; }

/* ── Install command on the download tile ───────────────────────────────────
   The tile is one big <a>, so this is deliberately inert text rather than a
   copy button: a click anywhere inside it has to stay "start the download". */
.download__cmd {
    display: block;
    margin-top: 7px;
    font-family: 'SF Mono', 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
    font-size: 0.76rem;
    color: var(--c-text-2);
    white-space: nowrap;
    /* The tile is a fixed grid track; a long command must not widen it. */
    overflow: hidden;
    text-overflow: ellipsis;
}
.download__cmd-prompt { color: var(--c-accent-2); margin-right: 4px; }

/* ── Command-line reference ─────────────────────────────────────────────── */
.cli {
    margin-top: 24px;
    padding: 24px 26px;
    border-radius: var(--r-lg);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
}
.cli__head { margin-bottom: 18px; }
.cli__head h4 { margin: 0 0 6px; font-size: 1.05rem; color: var(--c-text); }
.cli__head p  { margin: 0; color: var(--c-text-2); font-size: 0.92rem; }

.cli__list { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.cli__row {
    display: grid;
    /* Term column sized to the longest command so the descriptions align; it
       collapses to a stacked layout below, where there is no room for two. */
    grid-template-columns: minmax(190px, max-content) 1fr;
    gap: 6px 20px;
    align-items: baseline;
    padding: 14px 16px;
    border-radius: var(--r-md);
    background: var(--c-bg-2);
    border: 1px solid var(--c-border);
}
.cli__row dt { margin: 0; }
.cli__row dd { margin: 0; color: var(--c-text-2); font-size: 0.9rem; line-height: 1.6; }
.cli__row dt code {
    display: inline-block;
    background: var(--c-accent-soft);
    border: 1px solid var(--c-accent-glow);
    border-radius: var(--r-xs);
    padding: 3px 9px;
    font-size: 0.85rem;
    color: var(--c-text);
    white-space: nowrap;
}
.cli__row dd code,
.cli__note code {
    background: var(--c-accent-soft);
    border: 1px solid var(--c-border);
    border-radius: var(--r-xs);
    padding: 1px 6px;
    font-size: 0.85em;
    color: var(--c-text);
    white-space: nowrap;
}
.cli__note {
    margin: 16px 0 0;
    font-size: 0.82rem;
    line-height: 1.7;
    color: var(--c-text-3);
}

@media (max-width: 640px) {
    .cli { padding: 20px; }
    .cli__row { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════════════════════
   Footer
   ════════════════════════════════════════════════════════════════════════════ */
.footer {
    border-top: 1px solid var(--c-border);
    background: var(--c-bg-2);
    padding: 56px 24px;
}
.footer__inner {
    max-width: var(--maxw);
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.footer__brand { display: flex; align-items: center; gap: 10px; }
.footer__name { font-weight: 800; font-size: 1.15rem; }
.footer__tag { margin: 0; color: var(--c-text-2); }
.footer__links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.footer__links a { color: var(--c-text-2); font-size: 0.9rem; transition: color var(--dur-fast); }
.footer__links a:hover { color: var(--c-accent-2); }
.footer__copy { margin: 8px 0 0; font-size: 0.82rem; color: var(--c-text-3); }

/* ════════════════════════════════════════════════════════════════════════════
   Reveal-on-scroll
   ════════════════════════════════════════════════════════════════════════════ */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--dur-slow) var(--ease-out),
                transform var(--dur-slow) var(--ease-out);
}
.reveal.in { opacity: 1; transform: none; }

/* ════════════════════════════════════════════════════════════════════════════
   Toast
   ════════════════════════════════════════════════════════════════════════════ */
.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(92vw, 480px);
    padding: 13px 20px;
    background: rgba(28, 21, 48, 0.85);
    border: 1px solid var(--c-border-2);
    border-left: 3px solid var(--c-accent);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    color: var(--c-text);
    font-size: 0.9rem;
    opacity: 0;
    transform: translate(-50%, 16px) scale(0.97);
    pointer-events: none;
    transition: opacity var(--dur-base) var(--ease-out),
                transform var(--dur-base) var(--ease-out);
}
.toast.show {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}
.toast__icon { flex-shrink: 0; }
.toast__msg { line-height: 1.4; }

/* ── Version badge (populated from /api/v1/app/version) ──────────────────── */
.version-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 10px;
    padding: 3px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--c-accent-2);
    background: var(--c-accent-dim);
    border: 1px solid var(--c-accent-glow);
    border-radius: var(--r-full);
    vertical-align: middle;
}

/* ── Platforms without a build yet ───────────────────────────────────────── */
/* Dim the contents (not the card) so the .reveal fade-in keeps working. */
.download--soon > * {
    opacity: 0.55;
}
.download--soon {
    cursor: not-allowed;
}
.downloads .download--soon:hover {
    transform: none;
    border-color: var(--c-border);
    box-shadow: none;
}

/* ════════════════════════════════════════════════════════════════════════════
   Responsive
   ════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 920px) {
    .hero__inner { grid-template-columns: 1fr; gap: 48px; text-align: center; }
    .hero__copy { display: flex; flex-direction: column; align-items: center; }
    .hero__lead { margin-left: auto; margin-right: auto; }
    .hero__cta, .hero__meta { justify-content: center; }
    .hero__visual { order: -1; }
    .phone { width: 260px; height: 530px; }
}

@media (max-width: 720px) {
    .nav__links { display: none; }
    .nav__status { display: none; }
    .nav__burger { display: flex; }
    .nav__links.open {
        display: flex;
        position: absolute;
        top: var(--nav-h); left: 0; right: 0;
        flex-direction: column;
        padding: 12px 24px 20px;
        gap: 4px;
        background: rgba(11, 7, 18, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--c-border);
    }
    .nav__links.open a { padding: 12px 14px; }

    .section { padding: 72px 20px; }
    .hero { padding-top: calc(var(--nav-h) + 24px); }
    .flow__line { display: none; }
    .flow__step { flex: 1 1 100%; }
}

@media (max-width: 480px) {
    .hero__meta { gap: 24px; }
    .hero__meta-num { font-size: 1.4rem; }
    .btn { padding: 13px 22px; font-size: 0.92rem; }
}

/* ── Reduced motion ────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
}
