:root {
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --bg-dark: #0f172a;
    --surface: #ffffff;
    --border: #e2e8f0;
    --text: #1e293b;
    --heading: #0f172a;
    --muted: #64748b;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --on-accent: #ffffff;
    --shadow: 0 15px 30px -5px rgba(15, 23, 42, 0.06);
    --shadow-hover: 0 25px 50px -12px rgba(15, 23, 42, 0.14);
    --nav-bg: rgba(255, 255, 255, 0.9);
    --section-pad: clamp(72px, 12vw, 120px) 24px;
    color-scheme: light;
}


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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.container { width: 100%; max-width: 1100px; margin: 0 auto; }
.narrow { max-width: 760px; }

/* --- NAVIGATION --- */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 5%;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.logo {
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: -0.02em;
    color: var(--heading);
    text-decoration: none;
    white-space: nowrap;
}

.nav-links { display: flex; gap: 24px; }

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--accent); }

/* --- TYPE --- */
.tagline {
    display: inline-block;
    font-weight: 800;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--accent);
    margin-bottom: 16px;
}

h1 {
    font-size: clamp(2.2rem, 8vw, 4rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--heading);
    margin-bottom: 24px;
}

h2 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--heading);
}

h3 { font-size: 1.15rem; font-weight: 700; color: var(--heading); line-height: 1.4; }

.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 600px; }

.section { padding: var(--section-pad); }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-header { margin-bottom: 48px; }
.section-header p { color: var(--muted); margin-top: 12px; max-width: 600px; }

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent);
    color: var(--on-accent);
    padding: 18px 32px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.78rem;
    border: 1px solid var(--accent);
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn svg { width: 18px; height: 18px; flex: none; }

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

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* --- CARDS --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 24px;
}

.card {
    background: var(--surface);
    padding: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: var(--accent); }
.card h3 { margin-bottom: 12px; }
.card p { font-size: 0.95rem; color: var(--muted); }

/* --- APP LIST --- */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: 16px;
}

.app {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 22px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
}

.app h3 { font-size: 1rem; }
.app .platform {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
}
.app p { font-size: 0.9rem; color: var(--muted); flex: 1; }
.app a { font-size: 0.8rem; font-weight: 600; text-decoration: none; margin-top: 6px; }
.app a:hover { text-decoration: underline; }

/* --- FOOTER --- */
footer {
    padding: 48px 5%;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px 32px;
    color: var(--muted);
    font-size: 0.78rem;
}

.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }

/* --- REVEAL (only when JS is on, so content never stays hidden) --- */
.js [data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.js [data-reveal].active { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js [data-reveal] { opacity: 1; transform: none; transition: none; }
    .card, .card:hover { transition: none; transform: none; }
}

@media (max-width: 640px) {
    nav { padding: 14px 16px; }
    .logo { font-size: 0.8rem; }
    .nav-links { gap: 14px; }
    .nav-links a { font-size: 0.66rem; letter-spacing: 0.04em; }
    .nav-links .hide-sm { display: none; }
    .section { padding-left: 16px; padding-right: 16px; }
    .card { padding: 28px; }
    footer { justify-content: center; text-align: center; padding: 40px 16px; }
    footer .footer-links { justify-content: center; }
}

.app-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.app-icon { width: 56px; height: 56px; flex: none; border-radius: 22%; border: 1px solid var(--border); background: var(--bg-alt); }
.app-head h3 { margin-top: 2px; }
.app-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.app-icon-letter { display: grid; place-items: center; font-weight: 800; font-size: 1.4rem; color: var(--accent); }

.more-apps { margin-top: 28px; }
.more-apps summary { list-style: none; cursor: pointer; }
.more-apps summary::-webkit-details-marker { display: none; }
.more-apps summary::after { content: '+'; font-size: 1rem; line-height: 1; }
.more-apps[open] summary { margin-bottom: 28px; }
.more-apps[open] summary::after { content: '\2212'; }
