:root {
    color-scheme: light dark;
    --primary: #007aff;
    --primary-dark: #0a84ff;
    --orange: #ff9500;
    --red: #ff3b30;
    --green: #34c759;
    --indigo: #5856d6;
    --label: #1c1c1e;
    --secondary-label: #48484a;
    --tertiary-label: #98989f;
    --background: #f5f5fa;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-solid: #ffffff;
    --surface-muted: #ecedf2;
    --separator: rgba(60, 60, 67, 0.16);
    --shadow: rgba(0, 0, 0, 0.08);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 12% 0%, rgba(0, 122, 255, 0.12), transparent 28rem),
        radial-gradient(circle at 88% 10%, rgba(255, 149, 0, 0.13), transparent 26rem),
        linear-gradient(180deg, var(--background), #ffffff 46%, var(--background));
    color: var(--label);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--primary);
}

.site-shell,
.document-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0;
}

.glass-nav {
    position: sticky;
    top: 12px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid var(--separator);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 32px var(--shadow);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--label);
    font-weight: 800;
    text-decoration: none;
}

.brand-logo {
    display: block;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--secondary-label);
    font-size: 0.94rem;
}

.nav-links a {
    color: var(--secondary-label);
    text-decoration: none;
}

.nav-links a:hover {
    color: var(--primary);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    gap: 28px;
    align-items: center;
    margin-bottom: 28px;
    padding: clamp(24px, 5vw, 56px);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--separator);
    border-radius: var(--radius-xl);
    box-shadow: 0 24px 64px var(--shadow);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.hero-copy {
    text-align: left;
}

h1 {
    margin: 0 0 12px;
    color: var(--label);
    font-size: clamp(3rem, 8vw, 6.25rem);
    line-height: 0.92;
    font-weight: 850;
}

.hero-subtitle {
    margin: 0 0 12px;
    color: var(--secondary-label);
    font-size: clamp(1.25rem, 2.2vw, 1.75rem);
    font-weight: 700;
    line-height: 1.2;
}

.hero-description {
    max-width: 560px;
    margin: 0;
    color: var(--secondary-label);
    font-size: 1.06rem;
    line-height: 1.6;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    margin-top: 24px;
    padding: 0 22px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-md);
    box-shadow: 0 14px 28px rgba(0, 122, 255, 0.24);
    font-weight: 750;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
}

.app-visual {
    position: relative;
    min-height: 420px;
}

.phone-frame {
    position: relative;
    width: min(300px, 100%);
    margin-left: auto;
    padding: 14px;
    background: #111113;
    border-radius: 42px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.22);
}

.phone-screen {
    min-height: 520px;
    padding: 18px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 18%, rgba(255, 149, 0, 0.16), transparent 8rem),
        linear-gradient(180deg, #ffffff, #f5f5fa);
    border-radius: 31px;
}

.phone-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 34px;
    color: var(--label);
    font-size: 0.76rem;
    font-weight: 800;
}

.phone-title {
    margin-bottom: 26px;
    text-align: center;
    font-size: 1.12rem;
    font-weight: 800;
}

.solver-orb {
    position: relative;
    display: grid;
    width: 132px;
    height: 132px;
    margin: 0 auto 28px;
    place-items: center;
    color: var(--orange);
    background: rgba(255, 149, 0, 0.1);
    border-radius: 50%;
}

.solver-tile {
    display: grid;
    width: 72px;
    height: 72px;
    place-items: center;
    background: linear-gradient(135deg, var(--orange), var(--red));
    border-radius: 22px;
    color: #ffffff;
    font-size: 1.9rem;
    box-shadow: 0 14px 30px rgba(255, 149, 0, 0.22);
}

.math-symbol {
    position: absolute;
    color: rgba(255, 149, 0, 0.42);
    font-family: Georgia, serif;
    font-size: 1.45rem;
    font-weight: 800;
}

.symbol-one {
    top: 8px;
    right: 28px;
}

.symbol-two {
    left: 14px;
    bottom: 38px;
}

.symbol-three {
    right: 30px;
    bottom: 12px;
}

.phone-copy {
    margin: 0 auto 22px;
    max-width: 230px;
    color: var(--secondary-label);
    text-align: center;
    line-height: 1.45;
}

.mock-line {
    width: 58%;
    height: 11px;
    margin: 0 auto 10px;
    background: rgba(72, 72, 74, 0.14);
    border-radius: 999px;
}

.mock-line.wide {
    width: 78%;
}

.phone-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.phone-action {
    min-height: 116px;
    padding: 12px;
    border: 1px solid currentColor;
    border-radius: 20px;
    background: currentColor;
}

.phone-action span {
    display: grid;
    width: 42px;
    height: 42px;
    margin: 0 auto 12px;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.62);
    font-size: 1.25rem;
}

.phone-action.camera {
    color: rgba(0, 122, 255, 0.1);
}

.phone-action.gallery {
    color: rgba(52, 199, 89, 0.1);
}

.phone-action.camera span {
    color: var(--primary);
}

.phone-action.gallery span {
    color: var(--green);
}

.features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    text-align: left;
}

.feature {
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--separator);
    border-radius: var(--radius-lg);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.045);
}

.feature h3 {
    margin: 0 0 10px;
    color: var(--label);
    font-size: 1.08rem;
}

.feature p {
    margin: 0;
    color: var(--secondary-label);
    line-height: 1.55;
}

footer {
    margin-top: 36px;
    color: var(--secondary-label);
    font-size: 0.94rem;
    text-align: center;
}

footer a {
    color: var(--secondary-label);
}

.redirect-card,
.document-card,
.support-card {
    background: var(--surface);
    border: 1px solid var(--separator);
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 48px var(--shadow);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.redirect-card {
    width: min(680px, calc(100% - 32px));
    margin: 72px auto;
    padding: 36px 24px;
    text-align: center;
}

.redirect-card h2 {
    margin: 0 0 10px;
}

.document-shell {
    max-width: 860px;
}

.document-card,
.support-card {
    padding: clamp(24px, 5vw, 44px);
}

.document-card h1,
.support-card h1 {
    margin: 0 0 8px;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.05;
}

.document-card h2,
.support-card h2 {
    margin: 30px 0 10px;
    color: var(--label);
}

.document-card p,
.document-card li,
.support-card p,
.support-card li {
    color: var(--secondary-label);
    line-height: 1.68;
}

.support-header {
    margin-bottom: 20px;
    text-align: center;
}

.support-stack {
    display: grid;
    gap: 18px;
}

.contact-email {
    color: var(--primary);
    font-weight: 750;
    text-decoration: none;
}

@media (max-width: 820px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        text-align: center;
    }

    .hero-description {
        margin: 0 auto;
    }

    .phone-frame {
        margin: 0 auto;
    }

    .features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .site-shell,
    .document-shell {
        width: min(100% - 24px, 1120px);
        padding: 16px 0 24px;
    }

    .glass-nav {
        align-items: flex-start;
        flex-direction: column;
        position: static;
    }

    .nav-links {
        width: 100%;
        flex-wrap: wrap;
    }

    .hero {
        padding: 22px;
    }

    .app-visual {
        min-height: auto;
    }

    .phone-frame {
        width: 100%;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --label: #f2f2f7;
        --secondary-label: #d1d1d6;
        --tertiary-label: #98989f;
        --background: #000000;
        --surface: rgba(28, 28, 30, 0.86);
        --surface-solid: #1c1c1e;
        --surface-muted: #2c2c2e;
        --separator: rgba(235, 235, 245, 0.16);
        --shadow: rgba(0, 0, 0, 0.45);
    }

    body {
        background:
            radial-gradient(circle at 12% 0%, rgba(10, 132, 255, 0.16), transparent 28rem),
            radial-gradient(circle at 88% 10%, rgba(255, 149, 0, 0.12), transparent 26rem),
            linear-gradient(180deg, #000000, #1c1c1e 48%, #000000);
    }

    .glass-nav {
        background: rgba(28, 28, 30, 0.78);
    }

    .phone-frame {
        background: #050506;
    }

    .phone-screen {
        background:
            radial-gradient(circle at 50% 18%, rgba(255, 149, 0, 0.16), transparent 8rem),
            linear-gradient(180deg, #1c1c1e, #000000);
    }

    .phone-status,
    .phone-title {
        color: var(--label);
    }
}
