/* Bubble theme. Tokens follow DESIGN.md in the Bubble repository. Fonts are local (SIL OFL, see fonts/). */
@font-face { font-family: "Inter"; src: url("fonts/inter-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
    --canvas: #0B0A10; --surface: #17151F; --surface-raised: #221F2C; --hairline: #2E2A3A;
    --ink: #F5F3FA; --ink-soft: #C9C4D6; --muted: #8F89A0;
    --pink: #FF4F9A; --violet: #8B5CF6; --cyan: #22D3EE; --accent: #B9A2FF;
    --cta-start: #D9246F; --cta-end: #6D3CF5; --on-cta: #FFFFFF; --success: #4ADE80;
    --iridescent: linear-gradient(135deg, var(--pink), var(--violet) 50%, var(--cyan));
    --cta: linear-gradient(120deg, var(--cta-start), var(--cta-end));
    --r-field: 16px; --r-card: 24px; --r-photo: 28px; --r-full: 9999px;
    --gutter: 16px; --wrap: 1120px;
    --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --display: "Fraunces", Georgia, serif;
    --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 400 1rem/1.55 var(--body); overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; }
h1 { font-size: clamp(2.4rem, 6vw, 4.25rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1.02; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); font-weight: 700; letter-spacing: -0.025em; }
h3 { font-size: 1.0625rem; font-weight: 600; }
p { margin: 0; }
code { font-family: var(--mono); font-size: .9em; background: var(--surface-raised); color: var(--ink); padding: .1em .4em; border-radius: 6px; overflow-wrap: anywhere; }
strong { font-weight: 600; color: var(--ink); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }

.skip-link { position: absolute; left: var(--gutter); top: -100px; z-index: 10; background: var(--ink); color: var(--canvas); padding: 10px 16px; border-radius: var(--r-full); font-weight: 600; }
.skip-link:focus { top: 12px; }

.eyebrow { font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.lead { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); line-height: 1.55; color: var(--ink-soft); max-width: 36em; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: rgb(11 10 16 / .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgb(46 42 58 / .6); }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font: 400 1.75rem/1 var(--display); letter-spacing: -0.01em; }
.wordmark-glyph { width: 30px; height: 30px; color: var(--ink); }
.wordmark:hover { color: var(--ink); }
.site-header-inner > .site-nav { margin-left: auto; }
.lang-switch { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 10px; border: 1px solid var(--hairline); border-radius: var(--r-full); color: var(--ink-soft); text-decoration: none; font-size: .8125rem; font-weight: 600; letter-spacing: .06em; }
.lang-switch:hover { color: var(--ink); background: var(--surface); }
.site-nav { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { color: var(--ink-soft); text-decoration: none; font-size: .9375rem; font-weight: 500; padding: 10px 12px; border-radius: var(--r-full); white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.site-nav a:hover { color: var(--ink); background: var(--surface); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--surface-raised); }
@media (max-width: 640px) {
    .site-header-inner { flex-direction: column; align-items: stretch; gap: 0; padding-top: 10px; }
    .site-nav { margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) 8px; }
    .site-nav a { font-size: .875rem; padding: 8px 12px; }
    .nav-source { margin-left: auto; }
    .site-header-inner { position: relative; }
    .site-header-inner > .site-nav { margin-left: calc(var(--gutter) * -1); }
    .lang-switch { position: absolute; top: 8px; right: var(--gutter); min-height: 40px; }
}

/* Actions */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; }
.action-link { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: var(--r-full); font-weight: 600; text-decoration: none; transition: transform .15s ease, background-color .15s ease; }
.action-link:active { transform: scale(.97); }
.action-link--primary { min-height: 56px; padding: 0 28px; background: var(--cta); color: var(--on-cta); box-shadow: 0 10px 40px -12px rgb(217 36 111 / .6); }
.action-link--primary:hover { color: var(--on-cta); filter: brightness(1.08); }
.action-link--ghost { color: var(--accent); padding-inline: 4px; }
.action-link--ghost:hover { color: var(--ink); }
.action-arrow { transition: transform .15s ease; }
.action-link:hover .action-arrow { transform: translateX(3px); }
.action-note { margin-top: 14px; font-size: .875rem; color: var(--muted); }

/* Hero */
.hero { position: relative; overflow-x: clip; padding: clamp(48px, 9vw, 112px) 0 clamp(56px, 8vw, 96px); }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto; height: 120%; background: radial-gradient(40% 40% at 75% 35%, rgb(139 92 246 / .22), transparent 70%), radial-gradient(30% 30% at 90% 70%, rgb(34 211 238 / .12), transparent 70%), radial-gradient(35% 35% at 60% 80%, rgb(255 79 154 / .14), transparent 70%); pointer-events: none; z-index: -1; }
.hero-inner { display: grid; gap: 56px; align-items: center; }
@media (min-width: 900px) { .hero-inner { grid-template-columns: 1.1fr .9fr; } }
.hero h1 { max-width: 11em; }
.hero h1 strong { font-weight: 700; color: var(--accent); }
.hero .lead { margin-top: 24px; }
.hero-visual { position: relative; display: grid; place-items: center; padding: 24px 0; }

.orb { position: absolute; border-radius: 50%; background: radial-gradient(circle at 32% 28%, rgb(255 255 255 / .55), transparent 18%), radial-gradient(circle at 50% 50%, transparent 58%, rgb(255 255 255 / .1) 70%), var(--iridescent); opacity: .5; filter: saturate(1.1); animation: float 9s ease-in-out infinite; }
.orb::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, var(--canvas) 55%, transparent 72%); opacity: .82; }
.orb--1 { width: 120px; height: 120px; top: 2%; left: 4%; }
.orb--2 { width: 64px; height: 64px; bottom: 10%; right: 2%; animation-delay: -3s; }
.orb--3 { width: 38px; height: 38px; top: 18%; right: 10%; animation-delay: -6s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* Phone mockup */
.phone { position: relative; margin: 0; width: min(320px, 100%); padding: 10px; border-radius: 46px; background: linear-gradient(160deg, #2a2635, #121019); box-shadow: 0 0 0 1px rgb(255 255 255 / .06), 0 40px 80px -30px rgb(0 0 0 / .8), 0 0 90px -20px rgb(139 92 246 / .35); }
.phone-screen { border-radius: 37px; background: var(--canvas); padding: 22px 14px 18px; overflow: hidden; }
.phone-top { display: flex; justify-content: space-between; align-items: center; padding: 0 4px 12px; }
.phone-title { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.stories { list-style: none; margin: 0 0 14px; padding: 0; display: flex; gap: 12px; }
.story { display: grid; justify-items: center; gap: 4px; font-size: .6875rem; color: var(--ink-soft); }
.story-avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(140deg, #7c3aed, #db2777); box-shadow: 0 0 0 2px var(--canvas), 0 0 0 4px #3A3548; }
.story--new .story-avatar { position: relative; box-shadow: none; background-image: linear-gradient(140deg, #0e7490, #6d28d9); }
.story--new + .story--new .story-avatar { background-image: linear-gradient(140deg, #be185d, #f97316); }
.story--self .story-avatar { background: var(--surface-raised); color: var(--ink); font-size: 1.4rem; font-weight: 400; }
.story--new .story-avatar::before { content: ""; position: absolute; inset: -5px; border-radius: 50%; padding: 2.5px; background: var(--iridescent); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }

.post { background: var(--surface); border-radius: var(--r-card); padding: 12px 0 12px; }
.post-head { display: flex; align-items: center; gap: 10px; padding: 0 12px 10px; }
.avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: .8125rem; font-weight: 700; color: #fff; background: linear-gradient(140deg, #be185d, #7c3aed); }
.avatar--sm { width: 22px; height: 22px; font-size: .625rem; box-shadow: 0 0 0 2px var(--surface); }
.avatar--m { background: linear-gradient(140deg, #0e7490, #6d28d9); }
.avatar--t { background: linear-gradient(140deg, #c2410c, #be185d); }
.post-who { display: grid; line-height: 1.2; min-width: 0; }
.post-who strong { font-size: .875rem; }
.post-who small { font-size: .6875rem; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 4px; border-radius: var(--r-full); font-size: .6875rem; font-weight: 500; padding: 5px 9px; white-space: nowrap; }
.pill--soft { margin-left: auto; background: var(--surface-raised); color: var(--ink); }
.pill--glass { position: absolute; top: 10px; right: 10px; background: rgb(11 10 16 / .55); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.post-photo { position: relative; aspect-ratio: 4 / 4.4; overflow: hidden; background: linear-gradient(180deg, #2b1a4f 0%, #7a2b6e 38%, #f0727a 58%, #ffb36b 66%, #3b2a5c 66.5%, #1b1630 100%); }
.sun { position: absolute; width: 34%; aspect-ratio: 1; left: 50%; top: 66%; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, #fff6d8 0 30%, #ffd08a 55%, rgb(255 179 107 / 0) 72%); clip-path: inset(0 0 50% 0); }
.lake { position: absolute; inset: 66.5% 0 0; background: repeating-linear-gradient(180deg, rgb(255 208 138 / .22) 0 2px, transparent 2px 9px); -webkit-mask: linear-gradient(90deg, transparent 22%, #000 42% 58%, transparent 78%); mask: linear-gradient(90deg, transparent 22%, #000 42% 58%, transparent 78%); }
.post-caption { padding: 10px 12px 6px; font-size: .875rem; font-weight: 500; }
.post-foot { display: flex; align-items: center; gap: 8px; padding: 0 12px; font-size: .75rem; color: var(--ink-soft); }
.post-foot .icon { width: 26px; height: 26px; color: var(--pink); fill: rgb(255 79 154 / .2); }
.faces { display: flex; }
.faces .avatar + .avatar { margin-left: -6px; }
.post-comments { margin-left: auto; color: var(--muted); }

/* Sections */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-head { max-width: 40em; margin-bottom: 40px; }
.section-head > p:not(.eyebrow) { margin-top: 16px; color: var(--ink-soft); font-size: 1.0625rem; }
.card { background: var(--surface); border-radius: var(--r-card); }

.feature-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.feature { padding: 28px 24px; }
.feature h3 { margin: 18px 0 8px; }
.feature p { color: var(--ink-soft); font-size: .9375rem; }
.feature-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-raised); color: var(--ink); position: relative; flex: none; }
.feature-icon::before { content: ""; position: absolute; inset: 0; border-radius: 50%; padding: 1.5px; background: var(--iridescent); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .8; }
.feature-icon .icon { width: 22px; height: 22px; }

.section--privacy { background: linear-gradient(180deg, transparent, rgb(23 21 31 / .7) 18%, rgb(23 21 31 / .7) 82%, transparent); }
.point-list { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 28px; }
@media (min-width: 860px) { .point-list { grid-template-columns: repeat(3, 1fr); } }
.point-list li { display: flex; gap: 16px; align-items: flex-start; }
.point-list h3 { margin: 4px 0 8px; }
.point-list p { color: var(--ink-soft); font-size: .9375rem; }

.relay-box { position: relative; border-radius: var(--r-card); background: var(--surface); padding: 28px 24px; margin-bottom: 28px; }
.relay-box::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; background: var(--iridescent); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.relay-box > h3 { font-size: 1.25rem; margin-bottom: 20px; }
.relay-cols { display: grid; gap: 24px; }
@media (min-width: 760px) { .relay-cols { grid-template-columns: 1fr 1fr; gap: 40px; } }
.relay-label { font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-soft); font-size: .9375rem; }
.check-list .icon { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--muted); }
.check-list--no .icon { color: var(--cyan); }
.check-list--no li { color: var(--ink); }

.split { display: grid; gap: 32px; align-items: start; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } .split .section-head { margin-bottom: 0; } }
.calm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.calm-list li { background: var(--surface); border-radius: var(--r-field); padding: 18px 20px 18px 52px; position: relative; font-weight: 500; }
.calm-list li::before { content: ""; position: absolute; left: 20px; top: 50%; width: 18px; height: 2px; background: var(--muted); border-radius: 2px; transform: translateY(-50%) rotate(-45deg); }
.calm-list li::after { content: ""; position: absolute; left: 20px; top: 50%; width: 18px; height: 18px; border: 2px solid var(--muted); border-radius: 50%; transform: translateY(-50%); }

.host-card > * { min-width: 0; }
.host-card { display: grid; gap: 32px; padding: clamp(28px, 5vw, 56px); align-items: center; }
@media (min-width: 860px) { .host-card { grid-template-columns: 1.1fr .9fr; } }
.host-card h2 { margin-bottom: 16px; }
.host-card p:not(.eyebrow) { color: var(--ink-soft); margin-bottom: 20px; }
.code { margin: 0; background: var(--canvas); border: 1px solid var(--hairline); border-radius: var(--r-field); padding: 18px 20px; overflow-x: auto; font: 500 .875rem/1.7 var(--mono); color: var(--ink); }
.code code { background: none; padding: 0; font-size: inherit; overflow-wrap: normal; white-space: pre; }
.host-card .code code::before { content: "$ "; color: var(--muted); }

.roadmap { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); counter-reset: step; }
.roadmap-step { background: var(--surface); border-radius: var(--r-card); padding: 24px; position: relative; }
.roadmap-step h3 { margin: 14px 0 8px; font-size: 1.25rem; }
.roadmap-step p { color: var(--ink-soft); font-size: .9375rem; }
.roadmap-status { display: inline-flex; border-radius: var(--r-full); padding: 4px 10px; font-size: .75rem; font-weight: 600; background: var(--surface-raised); color: var(--muted); }
.roadmap-step.is-current .roadmap-status { background: var(--cta); color: var(--on-cta); }
.roadmap-step.is-current::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; background: var(--iridescent); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }

/* Article pages */
.article-head { padding-top: clamp(48px, 8vw, 96px); padding-bottom: 40px; }
.article-head h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); max-width: 14em; }
.article-head .lead { margin-top: 20px; }
.article-body > * { min-width: 0; }
.article-body { display: grid; gap: 32px; padding-bottom: clamp(56px, 8vw, 104px); }
@media (min-width: 960px) { .article-body--plain { grid-template-columns: minmax(0, 1fr) !important; } .article-body { grid-template-columns: 220px minmax(0, 1fr); gap: 64px; align-items: start; } .toc { position: sticky; top: 96px; } }
.toc { background: var(--surface); border-radius: var(--r-card); padding: 20px; }
.toc-title { font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.toc a { display: block; padding: 8px 0; color: var(--ink-soft); text-decoration: none; font-size: .9375rem; }
.toc a:hover { color: var(--ink); }
.prose { max-width: 720px; }
.prose section { scroll-margin-top: 96px; }
.prose section + section { margin-top: 56px; }
.prose h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 20px; }
.prose p, .prose li { color: var(--ink-soft); }
.prose p + p, .prose p + .code, .prose .code + p, .prose p + ul, .prose p + ol, .prose ul + p, .prose ol + p, .prose .table-scroll + .code, .prose p + .table-scroll, .prose .note + p, .prose p + .note { margin-top: 16px; }
.prose ul, .prose ol { margin: 0; padding-left: 1.3em; display: grid; gap: 12px; }
.prose ul li::marker { color: var(--violet); }
.steps { counter-reset: step; list-style: none; padding-left: 0 !important; }
.steps li { counter-increment: step; position: relative; padding-left: 48px; min-height: 32px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-raised); color: var(--ink); font-weight: 700; font-size: .875rem; }
.prose .lines { line-height: 1.7; }
.note { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border-radius: var(--r-field); padding: 16px 18px; color: var(--ink) !important; }
.note .icon { flex: none; color: var(--cyan); }
.table-scroll { overflow-x: auto; border-radius: var(--r-field); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
th, td { text-align: left; vertical-align: top; padding: 14px 18px; }
th { font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--hairline); }
td { color: var(--ink-soft); }
tr + tr td { border-top: 1px solid var(--hairline); }
.prose .actions { margin-top: 56px; }

/* 404 */
.simple-page { padding-top: clamp(64px, 12vw, 140px); padding-bottom: clamp(64px, 12vw, 140px); display: grid; justify-items: center; text-align: center; gap: 20px; }
.simple-page .lead { margin-bottom: 12px; }
.empty-orbs { position: relative; width: 120px; height: 90px; }
.empty-orbs span { position: absolute; border-radius: 50%; border: 2px solid transparent; background: linear-gradient(var(--canvas), var(--canvas)) padding-box, var(--iridescent) border-box; }
.empty-orbs span:nth-child(1) { width: 64px; height: 64px; left: 10px; bottom: 0; }
.empty-orbs span:nth-child(2) { width: 34px; height: 34px; right: 14px; top: 6px; }
.empty-orbs span:nth-child(3) { width: 18px; height: 18px; right: 2px; bottom: 18px; }

/* Footer */
.site-footer { border-top: 1px solid var(--hairline); padding: 48px 0 40px; margin-top: 24px; }
.site-footer-inner { display: grid; gap: 32px; }
@media (min-width: 860px) { .site-footer-inner { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-brand p { margin-top: 14px; color: var(--muted); font-size: .9375rem; max-width: 26em; }
.footer-links { display: grid; gap: 4px; align-content: start; }
.footer-links a { color: var(--ink-soft); text-decoration: none; padding: 6px 0; }
.footer-links a:hover { color: var(--ink); }
.footer-meta { display: grid; gap: 14px; align-content: start; font-size: .875rem; color: var(--muted); }
.credit { color: var(--ink-soft); text-decoration: none; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--hairline); font-size: .875rem; color: var(--muted); }
.footer-legal-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; }
.footer-legal a { color: var(--ink-soft); text-decoration: none; }
.footer-legal a:hover, .footer-legal a[aria-current="page"] { color: var(--ink); text-decoration: underline; }
.credit:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
td code { white-space: nowrap; overflow-wrap: normal; }
