:root {
    --accent: #2f6bff;
    --accent-soft: rgba(47, 107, 255, 0.12);
    --bg: #0b0f1a;
    --bg-elev: #131a2b;
    --card: #161f33;
    --border: rgba(255, 255, 255, 0.08);
    --text: #f3f5fa;
    --text-dim: #aab3c5;
    --text-faint: #6b7587;
    --radius: 16px;
    --max: 1080px;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

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

html { scroll-behavior: smooth; }

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

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

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Header / nav */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 15, 26, 0.82);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--border);
}
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand .logo {
    width: 30px; height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), #5a8bff);
    display: grid; place-items: center;
    font-size: 16px;
}
.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a {
    color: var(--text-dim);
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: 10px;
}
.nav-links a:hover { color: var(--text); background: var(--card); text-decoration: none; }
.nav-links a.active { color: var(--text); }

/* Hero */
.hero {
    padding: 96px 0 72px;
    text-align: center;
    background:
        radial-gradient(1200px 480px at 50% -10%, rgba(47, 107, 255, 0.18), transparent 70%);
}
.eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 20px;
    font-weight: 600;
}
h1 {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 18px;
}
.hero p.lead {
    font-size: 1.2rem;
    color: var(--text-dim);
    max-width: 640px;
    margin: 0 auto 32px;
}
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; align-items: center; }

.app-store-badge {
    display: inline-block;
    line-height: 0;
}
.app-store-badge:hover { text-decoration: none; opacity: 0.88; }
.app-store-badge img {
    width: auto;
    height: 44px;
}
@media (min-width: 600px) {
    .app-store-badge img { height: 50px; }
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid transparent;
    cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #245ae0; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--card); }

.download-note {
    margin-top: 16px;
    font-size: 0.9rem;
    color: var(--text-faint);
}

.doc code {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 0.9em;
    color: var(--text);
}

/* Sections */
section.block { padding: 64px 0; }
.section-title {
    font-size: 1.9rem;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
    text-align: center;
}
.section-sub {
    color: var(--text-dim);
    text-align: center;
    max-width: 620px;
    margin: 0 auto 44px;
}

/* Feature grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
}
.card .icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--accent-soft);
    display: grid; place-items: center;
    font-size: 22px;
    margin-bottom: 16px;
}
.card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card p { color: var(--text-dim); font-size: 0.97rem; }

/* Steps / guide */
.steps { display: flex; flex-direction: column; gap: 16px; max-width: 760px; margin: 0 auto; }
.step {
    display: flex;
    gap: 18px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
}
.step .num {
    flex: 0 0 auto;
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    display: grid; place-items: center;
    font-weight: 700;
}
.step h3 { font-size: 1.1rem; margin-bottom: 4px; }
.step p { color: var(--text-dim); font-size: 0.97rem; }

/* Content pages (privacy, support) */
.doc { max-width: 800px; margin: 0 auto; padding: 56px 0; }
.doc h1 { font-size: 2.2rem; margin-bottom: 8px; }
.doc .updated { color: var(--text-faint); font-size: 0.9rem; margin-bottom: 36px; }
.doc h2 {
    font-size: 1.35rem;
    margin: 36px 0 12px;
    padding-top: 12px;
}
.doc h3 { font-size: 1.08rem; margin: 22px 0 8px; }
.doc p, .doc li { color: var(--text-dim); margin-bottom: 12px; }
.doc ul { padding-left: 22px; margin-bottom: 16px; }
.doc li { margin-bottom: 8px; }
.doc strong { color: var(--text); }

.callout {
    background: var(--accent-soft);
    border: 1px solid rgba(47, 107, 255, 0.25);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin: 24px 0;
}
.callout p { color: var(--text); margin: 0; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq details {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4px 22px;
    margin-bottom: 12px;
}
.faq summary {
    cursor: pointer;
    padding: 16px 0;
    font-weight: 600;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; font-weight: 400; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { color: var(--text-dim); padding-bottom: 18px; margin: 0; }

/* Studio app list */
.app-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 860px;
    margin: 0 auto;
}
.app-card {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.app-card:hover { text-decoration: none; border-color: rgba(47, 107, 255, 0.5); transform: translateY(-2px); }
.app-card .app-icon {
    flex: 0 0 auto;
    width: 56px; height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), #5a8bff);
    display: grid; place-items: center;
    font-size: 28px;
}
.app-card h3 { color: var(--text); font-size: 1.2rem; margin-bottom: 6px; }
.app-card p { color: var(--text-dim); font-size: 0.97rem; margin-bottom: 10px; }
.app-card .app-meta { color: var(--text-faint); font-size: 0.85rem; }
.app-card .app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
    display: block;
}
.app-card.soon:hover { transform: none; border-color: var(--border); }

    /* Work / portfolio */
    .work-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 24px;
        max-width: var(--max);
        margin: 0 auto;
    }
    .work-card {
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        overflow: hidden;
        display: flex;
        flex-direction: column;
        transition: border-color 0.15s ease, transform 0.15s ease;
    }
    .work-card:hover { border-color: rgba(47, 107, 255, 0.45); transform: translateY(-2px); }
    .work-card a.work-link { color: inherit; text-decoration: none; display: flex; flex-direction: column; flex: 1; }
    .work-card a.work-link:hover { text-decoration: none; }
    .work-shot {
        aspect-ratio: 16 / 10;
        background: linear-gradient(145deg, var(--bg-elev), var(--card));
        border-bottom: 1px solid var(--border);
        display: grid;
        place-items: center;
        color: var(--text-faint);
        font-size: 0.85rem;
        padding: 24px;
        text-align: center;
    }
    .work-shot.has-img {
        padding: 12px;
        background: var(--bg-elev);
    }
    .work-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .work-shot.has-img img { object-fit: contain; object-position: center top; }

    /* Built-in portfolio previews (no external image files needed) */
    .work-mock {
        width: 100%;
        height: 100%;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    }
    .work-mock-chat {
        background: #f5f5f5;
        padding: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .work-mock-chat .frame {
        width: 100%;
        max-width: 320px;
        background: #fff;
        border: 1px solid #e5e5e5;
        border-radius: 12px;
        overflow: hidden;
        font-size: 11px;
    }
    .work-mock-chat .head { padding: 10px 12px; border-bottom: 1px solid #eee; }
    .work-mock-chat .head strong { display: block; font-size: 12px; color: #111; }
    .work-mock-chat .head span { color: #888; font-size: 10px; }
    .work-mock-chat .msgs { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
    .work-mock-chat .b { padding: 8px 10px; border-radius: 12px; max-width: 88%; line-height: 1.4; }
    .work-mock-chat .b.bot { background: #f0f0f0; color: #333; align-self: flex-start; }
    .work-mock-chat .b.user { background: #2563eb; color: #fff; align-self: flex-end; }
    .work-mock-term {
        background: #0d1117;
        color: #c9d1d9;
        padding: 14px 16px;
        font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
        font-size: 10px;
        line-height: 1.55;
        text-align: left;
    }
    .work-mock-term .hi { color: #58a6ff; font-weight: 700; margin-bottom: 8px; }
    .work-mock-term .ok { color: #3fb950; }
    .work-mock-term .dim { color: #8b949e; }
    .work-mock-term .out { color: #d2a8ff; margin: 8px 0; padding: 8px; background: #161b22; border-radius: 6px; border: 1px solid #30363d; }
    .work-mock-site {
        background: #0b0f1a;
        color: #f3f5fa;
        padding: 16px;
        text-align: center;
    }
    .work-mock-site .brand { font-size: 11px; font-weight: 700; margin-bottom: 12px; opacity: .9; }
    .work-mock-site h4 { font-size: 14px; margin-bottom: 6px; }
    .work-mock-site p { font-size: 10px; color: #aab3c5; margin-bottom: 12px; }
    .work-mock-site .apps { display: flex; gap: 8px; justify-content: center; }
    .work-mock-site .apps span { font-size: 9px; background: #161f33; border: 1px solid rgba(255,255,255,.08); padding: 8px 10px; border-radius: 8px; color: #aab3c5; }
    .work-body { padding: 22px 24px 24px; flex: 1; display: flex; flex-direction: column; }
    .work-type {
        display: inline-block;
        font-size: 0.72rem;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        font-weight: 700;
        color: var(--accent);
        background: var(--accent-soft);
        padding: 4px 10px;
        border-radius: 999px;
        margin-bottom: 10px;
        width: fit-content;
    }
    .work-body h3 { font-size: 1.15rem; margin-bottom: 8px; color: var(--text); }
    .work-outcome {
        font-size: 0.92rem;
        color: var(--text);
        font-weight: 500;
        margin-bottom: 10px;
    }
    .work-body p { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 14px; flex: 1; }
    .work-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
    .work-tag {
        font-size: 0.78rem;
        color: var(--text-dim);
        background: var(--bg-elev);
        border: 1px solid var(--border);
        padding: 4px 10px;
        border-radius: 999px;
    }
    .work-links { display: flex; flex-wrap: wrap; gap: 12px; font-size: 0.88rem; }
    .work-links a { color: var(--accent); }
    .work-cta {
        text-align: center;
        margin-top: 48px;
        padding: 36px 24px;
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        max-width: 640px;
        margin-left: auto;
        margin-right: auto;
    }
    .work-cta h3 { margin-bottom: 8px; }
    .work-cta p { color: var(--text-dim); margin-bottom: 18px; }

    .category-label {
        font-size: 0.8rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--text-faint);
        font-weight: 600;
        margin: 48px 0 20px;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--border);
    }
    .category-label:first-of-type { margin-top: 0; }

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
    margin-top: 40px;
    color: var(--text-faint);
    font-size: 0.9rem;
}
.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; align-items: center; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--text-dim); }

@media (max-width: 600px) {
    .nav-links a { padding: 8px 8px; font-size: 0.9rem; }
    .hero { padding: 64px 0 48px; }
    section.block { padding: 48px 0; }
}
