:root {
    --accent: #e5344b;
    --accent-soft: rgba(229, 52, 75, 0.14);
    --bg: #0f1117;
    --bg-elev: #171a24;
    --bg-card: #1c2029;
    --border: #2a2f3c;
    --text: #e8eaed;
    --text-dim: #a2a8b6;
    --link: #5b9bff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --radius: 14px;
    --maxw: 1080px;
}

[data-theme="light"] {
    --accent: #d21f36;
    --accent-soft: rgba(210, 31, 54, 0.10);
    --bg: #f5f6f9;
    --bg-elev: #ffffff;
    --bg-card: #ffffff;
    --border: #e2e5ec;
    --text: #1b1e26;
    --text-dim: #5a6070;
    --link: #2563d8;
    --shadow: 0 10px 30px rgba(20, 24, 40, 0.10);
}

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

html {
    scroll-behavior: smooth;
}

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

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

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

/* ---------- Navigation ---------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    color: var(--text);
}

.brand:hover {
    text-decoration: none;
}

.brand img {
    width: 34px;
    height: 34px;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    color: var(--text-dim);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
    color: var(--text);
    background: var(--accent-soft);
    text-decoration: none;
}

.nav-links a.active {
    color: var(--text);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: transform 0.15s, border-color 0.2s;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    border-color: var(--accent);
}

.nav-toggle {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 1.2rem;
    cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 40%, transparent);
}

.btn-primary:hover {
    box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 50%, transparent);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
    padding: 88px 0 64px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: -30% 0 auto 0;
    height: 600px;
    background: radial-gradient(60% 60% at 50% 0%, var(--accent-soft), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-card);
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-bottom: 28px;
}

.hero-badge strong {
    color: var(--accent);
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    font-weight: 800;
}

.hero p.lead {
    font-size: 1.15rem;
    color: var(--text-dim);
    max-width: 620px;
    margin: 0 auto 34px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- Section ---------- */
section.block {
    padding: 72px 0;
}

.section-head {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 48px;
}

.section-head h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.3rem);
    letter-spacing: -0.02em;
    margin-bottom: 14px;
    font-weight: 800;
}

.section-head p {
    color: var(--text-dim);
    font-size: 1.05rem;
}

.eyebrow {
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

/* ---------- Cards / grids ---------- */
.grid {
    display: grid;
    gap: 20px;
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: transform 0.2s ease, border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
    box-shadow: var(--shadow);
}

.card .icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    margin-bottom: 18px;
}

.card h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

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

/* ---------- Language chips ---------- */
.lang-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

.lang-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.98rem;
    transition: transform 0.15s, border-color 0.2s;
}

.lang-chip:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.lang-chip .flag {
    font-size: 1.3rem;
}

/* ---------- Screenshots ---------- */
.shots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.shot {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.shot:hover {
    transform: translateY(-4px);
}

.shot img {
    width: 100%;
    background: var(--bg-elev);
}

.shot figcaption {
    padding: 14px 18px;
    font-size: 0.9rem;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
}

/* ---------- Content / guide pages ---------- */
.prose {
    max-width: 800px;
    margin: 0 auto;
}

.prose h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.prose .sub {
    color: var(--text-dim);
    margin-bottom: 36px;
    font-size: 1.05rem;
}

.prose h2 {
    font-size: 1.5rem;
    margin: 40px 0 14px;
    letter-spacing: -0.01em;
}

.prose h3 {
    font-size: 1.15rem;
    margin: 28px 0 10px;
}

.prose p {
    color: var(--text-dim);
    margin-bottom: 16px;
}

.prose ul {
    margin: 0 0 16px 20px;
    color: var(--text-dim);
}

.prose li {
    margin-bottom: 8px;
}

.prose figure {
    margin: 28px 0;
    text-align: center;
}

.prose figure img {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 560px;
    margin: 0 auto;
}

.prose figure figcaption {
    margin-top: 12px;
    font-size: 0.9rem;
    color: var(--text-dim);
}

.prose code {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px 7px;
    font-size: 0.9em;
    font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

.callout {
    background: var(--accent-soft);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
    border-radius: var(--radius);
    padding: 18px 22px;
    margin: 28px 0;
    color: var(--text);
}

.contact-list {
    display: grid;
    gap: 14px;
    margin-top: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 22px;
    transition: border-color 0.2s, transform 0.15s;
}

.contact-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.contact-item .icon {
    font-size: 1.4rem;
    color: var(--accent);
    flex: 0 0 auto;
}

.contact-item .meta strong {
    display: block;
    font-size: 1rem;
}

.contact-item .meta span {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* ---------- Footer ---------- */
.footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
    margin-top: 40px;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-dim);
}

.footer-links a:hover {
    color: var(--accent);
    text-decoration: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .grid-3, .grid-2, .shots {
        grid-template-columns: 1fr;
    }

    .nav-toggle {
        display: grid;
        place-items: center;
    }

    .nav-links {
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--bg-elev);
        border-bottom: 1px solid var(--border);
        padding: 12px;
        gap: 4px;
        display: none;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 12px;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}
