:root {
    --bg: #1a1d2b;
    --bg-alt: #24293c;
    --fg: #f2f0ec;
    --muted: #b1afad;
    --silver: #c5ccd4;
    --accent: #ff7a59;
    --accent-strong: #e85d3a;
    --card-bg: rgba(255, 255, 255, 0.04);
    --border: rgba(242, 240, 236, 0.10);
    --max-width: 1080px;
    --radius: 12px;
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); text-decoration: underline; }

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 24px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 14px 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--fg);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 52px; height: 52px; }
.brand-name em { font-style: normal; color: var(--muted); font-weight: 500; }

.primary-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 20px;
}
.primary-nav a {
    color: var(--muted);
    font-weight: 500;
}
.primary-nav a:hover { color: var(--fg); text-decoration: none; }

.hero {
    background: radial-gradient(1200px 600px at 20% -10%, rgba(255, 122, 89, 0.20), transparent 60%),
                radial-gradient(1000px 500px at 90% 10%, rgba(197, 204, 212, 0.08), transparent 60%);
    padding: 44px 24px 56px;
    border-bottom: 1px solid var(--border);
}
.hero-inner { max-width: var(--max-width); margin: 0 auto; }
.hero-centered { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-centered .lead { margin-left: auto; margin-right: auto; }
.hero-centered .cta-row { justify-content: center; }
.hero-logo {
    width: clamp(140px, 22vw, 220px);
    height: auto;
    margin: 0 0 18px;
    filter: drop-shadow(0 14px 40px rgba(0, 0, 0, 0.45));
}
.hero h1 {
    font-size: clamp(1.9rem, 4vw, 3rem);
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}
.hero .lead {
    font-size: 1.05rem;
    color: var(--muted);
    max-width: 600px;
}

.cta-row { margin-top: 22px; display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
    display: inline-block;
    padding: 12px 22px;
    border-radius: var(--radius);
    font-weight: 600;
    border: 1px solid transparent;
    transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover { background: var(--accent-strong); color: #fff; }
.btn-ghost {
    background: transparent;
    color: var(--fg);
    border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--fg); }

.section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 36px 24px;
}
.section-alt {
    background: var(--bg-alt);
    max-width: none;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
}
.section-alt > * { max-width: var(--max-width); margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }

.section h2 { font-size: 1.5rem; letter-spacing: -0.01em; margin: 0 0 16px; }
#apps > h3 { font-size: 1rem; margin: 20px 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
#apps > h3:first-of-type { margin-top: 0; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); }

.product {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}
.product h3 { margin: 0 0 10px; }
.product p { color: var(--muted); margin: 0 0 18px; max-width: 640px; }

/* App card with icon + store badges */
.app-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: start;
}
.app-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
}
/* Clickable feature graphic (Play Store 1024×500 banner) that opens a lightbox. */
.app-banner-btn {
    grid-column: 1 / -1;
    position: relative;
    display: block;
    width: 100%;
    margin: 0 0 4px;
    padding: 0;
    border: 0;
    background: none;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: zoom-in;
    line-height: 0;
}
.app-banner {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1024 / 500;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s ease;
}
.app-banner-btn:hover .app-banner,
.app-banner-btn:focus-visible .app-banner { transform: scale(1.03); }
.app-banner-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
a.app-banner-btn { cursor: pointer; }
.app-banner-zoom {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(14, 17, 22, 0.72);
    color: #fff;
    font-size: 1.05rem;
    line-height: 1;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}
.app-banner-btn:hover .app-banner-zoom,
.app-banner-btn:focus-visible .app-banner-zoom { opacity: 1; transform: translateY(0); }
.app-text h3 { margin: 0 0 4px; font-size: 1.1rem; }
.app-text p { color: var(--muted); margin: 0 0 12px; max-width: 640px; font-size: 0.9rem; }
.app-card + .app-card { margin-top: 24px; }

/* Two-column responsive grid of app cards. */
.app-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    align-items: start;
    margin-top: 16px;
}
.app-grid > .app-card { margin-top: 0; }
@media (max-width: 880px) {
    .app-grid { grid-template-columns: 1fr; }
}

.apps-soon { margin-top: 24px; }

.store-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(26, 29, 43, 0.6);
    color: var(--fg);
    font-weight: 600;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.08s ease;
}
.store-badge:hover {
    border-color: var(--accent);
    background: rgba(255, 122, 89, 0.10);
    text-decoration: none;
    color: var(--fg);
    transform: translateY(-1px);
}
/* Coming-soon variant — renders on a non-interactive <span>. */
.store-badge--soon {
    cursor: not-allowed;
    opacity: 0.55;
    /* Suppress hover lift inherited from .store-badge. */
    transform: none;
}
.store-badge--soon:hover {
    border-color: var(--border);
    background: rgba(26, 29, 43, 0.6);
    transform: none;
}
.store-badge--soon .store-text small {
    color: var(--accent);
    font-weight: 700;
}
/* Alpha-testing variant — badge remains a live <a>; only the small label
   is recolored to flag pre-release status. */
.store-badge--alpha .store-text small {
    color: var(--accent);
    font-weight: 700;
}
.store-glyph {
    width: 22px;
    height: 22px;
    color: var(--silver);
    flex-shrink: 0;
}
.store-text {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.15;
}
.store-text small {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    font-weight: 500;
}
.store-text strong { font-size: 0.85rem; }

@media (max-width: 640px) {
    .app-card { grid-template-columns: 1fr; text-align: center; }
    .app-icon { margin: 0 auto; width: 80px; height: 80px; }
    .app-text p { margin-left: auto; margin-right: auto; }
    .store-row { justify-content: center; }
}

/* Lightbox — floating window that shows a feature graphic at full size. */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(8, 10, 14, 0.88);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.lightbox.is-open { display: flex; }
.lightbox-figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: min(1100px, 96vw);
    max-height: 92vh;
    overflow-y: auto;
    animation: lightbox-in 0.18s ease;
}
.lightbox-img {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}
.lightbox-caption {
    text-align: center;
    color: var(--fg);
    margin: 0 auto;
    max-width: 720px;
}
.lightbox-title {
    font-size: 1.35rem;
    margin: 0 0 8px;
    letter-spacing: -0.01em;
}
.lightbox-desc {
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.6;
}
.lightbox-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(26, 29, 43, 0.85);
    color: var(--fg);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}
.lightbox-close:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-1px);
}
@keyframes lightbox-in {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .app-banner { transition: none; }
    .lightbox-figure { animation: none; }
}

.prose { max-width: 720px; color: var(--muted); }
.disclaimer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    font-style: italic;
    color: var(--muted);
    opacity: 0.85;
}
.footer-disclaimer {
    max-width: 720px;
    margin: 14px auto 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--muted);
    opacity: 0.7;
}

.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 40px;
    padding: 28px 24px;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}
.site-footer p { margin: 4px 0; }
.footer-links { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--fg); text-decoration: underline; }

/* ── Legal pages (privacy / terms) ─────────────────────────── */
.primary-nav a[aria-current="page"] {
    color: var(--fg);
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}
.primary-nav a[aria-current="page"]:hover { text-decoration: underline; }

.legal-hero {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 56px 24px 32px;
    border-bottom: 1px solid var(--border);
}
.legal-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}
.legal-hero h1 {
    margin: 10px 0 14px;
    font-size: clamp(2rem, 4vw, 2.8rem);
    letter-spacing: -0.02em;
}
.legal-meta {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.9rem;
}

.legal-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.callout {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin: 20px 0;
    color: var(--muted);
}
.callout p { margin: 0; }
.callout p + p { margin-top: 10px; }
.callout strong { color: var(--fg); }
.callout-safe    { border-left-color: #10b981; }
.callout-info    { border-left-color: #3b82f6; }
.callout-warning { border-left-color: #f59e0b; }
.callout-danger  { border-left-color: #ef4444; }

.toc {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 26px;
    margin: 32px 0 48px;
    box-shadow: var(--shadow);
}
.toc-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 12px;
}
.toc ol {
    margin: 0;
    padding-left: 22px;
    display: grid;
    gap: 6px;
}
.toc a { font-size: 0.95rem; }
.toc a:hover { text-decoration: underline; }

.legal-section { margin-bottom: 44px; scroll-margin-top: 24px; }
.legal-section-num {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 4px;
}
.legal-section h2 {
    margin: 4px 0 14px;
    font-size: 1.4rem;
    letter-spacing: -0.01em;
    color: var(--fg);
}
.legal-section h3 {
    margin: 20px 0 8px;
    font-size: 1.05rem;
    color: var(--fg);
}
.legal-section p,
.legal-section li {
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.7;
}
.legal-section ul,
.legal-section ol { padding-left: 22px; }
.legal-section li { margin-bottom: 6px; }
.legal-section strong { color: var(--fg); }

.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0 22px;
    font-size: 0.9rem;
}
.legal-table th,
.legal-table td {
    text-align: left;
    padding: 10px 14px;
    border: 1px solid var(--border);
    vertical-align: top;
    color: var(--muted);
}
.legal-table th {
    background: var(--card-bg);
    color: var(--fg);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.legal-table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.025); }
.perm-yes { color: #34d399; font-weight: 600; }
.perm-no  { color: var(--muted); }

@media (max-width: 640px) {
    .legal-page { padding: 28px 18px 64px; }
    .legal-table { font-size: 0.82rem; }
    .legal-table th, .legal-table td { padding: 8px 10px; }
}

@media (max-width: 640px) {
    .primary-nav { gap: 6px 14px; }
    .primary-nav a { font-size: 0.95rem; }
    .hero { padding: 56px 20px 80px; }
    .brand { font-size: 1.4rem; gap: 12px; }
    .brand img { width: 56px; height: 56px; }
}

/* ── App Store "coming soon" badge that opens the status popup ──── */
/* A live <a> (so it's clickable) but the small label is recolored to
   flag the pre-release status, like .store-badge--alpha. */
.store-badge--applesoon { cursor: pointer; }
.store-badge--applesoon .store-text small {
    color: var(--accent);
    font-weight: 700;
}

/* ── App Store status popup (CSS-only :target modal, no JS) ─────── */
.kx-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.kx-modal:target { display: flex; }
.kx-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 10, 14, 0.86);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.kx-modal-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 26px 22px;
    box-shadow: var(--shadow);
    animation: kx-pop 0.18s ease;
}
.kx-modal-badge {
    display: inline-block;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    background: var(--accent);
    padding: 5px 11px;
    border-radius: 999px;
    margin-bottom: 14px;
}
.kx-modal-card h3 {
    margin: 0 0 14px;
    font-size: 1.3rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
}
.kx-modal-body p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.62;
}
.kx-modal-body strong { color: var(--fg); }
.kx-modal-x {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: var(--fg);
    font-size: 1.35rem;
    line-height: 1;
}
.kx-modal-x:hover { background: var(--card-bg); color: var(--fg); text-decoration: none; }
.kx-modal-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}
.kx-modal-close-btn { color: var(--muted); font-weight: 600; padding: 11px 8px; }
.kx-modal-close-btn:hover { color: var(--fg); text-decoration: none; }
@keyframes kx-pop {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .kx-modal-card { animation: none; }
}
