:root {
    color-scheme: light dark;
    --bg: #f7f3ff;
    --surface: #ffffff;
    --surface-strong: #f1eaff;
    --text: #211a33;
    --muted: #6a6080;
    --line: #ded2ff;
    --accent: #6333E9;
    --accent-strong: #4f24cf;
    --accent-soft: #e7deff;
    --selected-control-text: #f7f3ff;
    --top-glow: rgba(99, 51, 233, 0.16);
    --glass-fill: rgba(255, 255, 255, 0.48);
    --glass-fill-strong: rgba(255, 255, 255, 0.68);
    --glass-rim: rgba(255, 255, 255, 0.78);
    --glass-line: rgba(99, 51, 233, 0.18);
    --glass-shadow: 0 1.25rem 3.75rem rgba(68, 39, 142, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.82);
    --shadow: 0 24px 70px rgba(68, 39, 142, 0.16);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #100d18;
        --surface: #1a1426;
        --surface-strong: #241a36;
        --text: #f6f1ff;
        --muted: #b6aeca;
        --line: #3a2d55;
        --accent: #6333E9;
        --accent-strong: #b9a7ff;
        --accent-soft: rgba(99, 51, 233, 0.22);
        --selected-control-text: #ffffff;
        --top-glow: rgba(99, 51, 233, 0.20);
        --glass-fill: rgba(28, 22, 40, 0.44);
        --glass-fill-strong: rgba(42, 32, 60, 0.68);
        --glass-rim: rgba(255, 255, 255, 0.2);
        --glass-line: rgba(255, 255, 255, 0.12);
        --glass-shadow: 0 1.25rem 4rem rgba(0, 0, 0, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.16);
        --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
    }
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, var(--top-glow), transparent 34rem),
        var(--bg);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header {
    position: sticky;
    top: env(safe-area-inset-top);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 0.65rem 0;
    transition: padding 220ms ease;
}

.site-header.is-at-top {
    padding-top: 2.5rem;
}

.site-header::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    z-index: -2;
    width: 100%;
    height: calc(3.45rem + env(safe-area-inset-top));
    background: color-mix(in srgb, var(--glass-fill) 58%, transparent);
    box-shadow: inset 0 -1px 0 var(--glass-line);
    opacity: 1;
    backdrop-filter: blur(1.35rem) saturate(165%);
    -webkit-backdrop-filter: blur(1.35rem) saturate(165%);
    pointer-events: none;
    transition: opacity 220ms ease;
}

.site-header.is-at-top::before {
    opacity: 0;
}

.brand,
.hero-actions,
.site-footer {
    display: flex;
    align-items: center;
}

.brand {
    gap: 0.65rem;
    font-size: 1rem;
    font-weight: 800;
    transition: gap 220ms ease, font-size 220ms ease;
}

.site-header.is-at-top .brand {
    gap: 1rem;
    font-size: 2rem;
}

.brand > span,
.brand-mark {
    position: relative;
    z-index: 1;
}

.brand-mark {
    display: block;
    width: 2.15rem;
    height: 2.15rem;
    overflow: hidden;
    border-radius: 0.65rem;
    transition: width 220ms ease, height 220ms ease, border-radius 220ms ease;
}

.site-header.is-at-top .brand-mark {
    width: 4.3rem;
    height: 4.3rem;
    border-radius: 1.3rem;
}

.brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.hero,
.section,
.download-section {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    align-items: center;
    gap: clamp(2rem, 6vw, 5rem);
    min-height: calc(100vh - 5rem);
    padding: 4rem 0 5rem;
}

.eyebrow {
    margin: 0 0 0.8rem;
    color: var(--accent-strong);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 12ch;
    margin-bottom: 1.25rem;
    font-size: clamp(3rem, 8vw, 5rem);
    line-height: 0.98;
    letter-spacing: 0;
}

h2 {
    max-width: 13ch;
    margin-bottom: 1rem;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.04;
    letter-spacing: 0;
}

h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.hero-text {
    max-width: 36rem;
    color: var(--muted);
    font-size: 1.15rem;
}

.hero-actions {
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 2rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.8rem 1.15rem;
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    font-weight: 800;
}

.button-primary {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--bg);
}

.button-secondary {
    background: color-mix(in srgb, var(--surface) 84%, transparent);
}

.app-preview {
    align-self: center;
}

.preview-window {
    display: block;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 1.8rem;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.preview-screenshot {
    display: block;
    width: 100%;
    height: auto;
}

.preview-screenshot-dark {
    display: none;
}

@media (prefers-color-scheme: dark) {
    .button-primary,
    .theme-mode-selector span,
    .theme-mode-selector input:checked + span {
        color: #ffffff;
    }

    .preview-screenshot-light {
        display: none;
    }

    .preview-screenshot-dark {
        display: block;
    }
}

.section {
    padding: 5rem 0;
}

.section-heading {
    max-width: 42rem;
    margin-bottom: 2rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

.feature-card {
    min-height: 10.5rem;
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: var(--surface);
}

.feature-icon {
    display: inline-flex;
    margin-bottom: 2rem;
    color: var(--accent-strong);
    font-weight: 800;
}

.feature-card p,
.feature-overview p,
.download-section p,
.step p {
    color: var(--muted);
}

.step p {
    margin-bottom: 0;
}

.feature-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.feature-overview-grid-full {
    grid-template-columns: 1fr;
}

.feature-overview {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-content: start;
    padding: clamp(1.25rem, 4vw, 2rem);
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: var(--surface);
}

.feature-overview-wide {
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 24rem);
    align-items: center;
}

.feature-overview-wide .feature-overview-media {
    justify-self: end;
    width: min(100%, 24rem);
}

.feature-overview-copy p {
    max-width: 28rem;
    margin-bottom: 0;
}

.feature-overview-media {
    width: min(100%, 18rem);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: var(--surface-strong);
}

.feature-overview-media video {
    display: block;
    width: 100%;
    height: auto;
}

.custom-theme-media img {
    display: block;
    width: 100%;
    height: auto;
}

.themes-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1.5rem;
}

.theme-mode-selector {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(5.5rem, 1fr));
    gap: 0.25rem;
    margin: 0;
    padding: 0.25rem;
    border: 1px solid var(--line);
    border-radius: 0.9rem;
    background: var(--surface);
}

.theme-mode-selector label {
    display: grid;
    min-height: 2.5rem;
    cursor: pointer;
}

.theme-mode-selector input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.theme-mode-selector span {
    display: grid;
    place-items: center;
    padding: 0.55rem 0.9rem;
    border-radius: 0.65rem;
    color: var(--muted);
    font-weight: 800;
    transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.theme-mode-selector input:checked + span {
    background: var(--accent);
    color: var(--selected-control-text);
    box-shadow: 0 0.5rem 1.5rem rgba(99, 51, 233, 0.24);
}

.theme-mode-selector input:focus-visible + span {
    outline: 2px solid var(--accent-strong);
    outline-offset: 2px;
}

.theme-scroll {
    display: grid;
    grid-auto-columns: minmax(17rem, 22rem);
    grid-auto-flow: column;
    gap: 1rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 0 0 1rem;
    scroll-padding-inline: 1rem;
    scroll-snap-type: inline mandatory;
    -webkit-overflow-scrolling: touch;
}

.theme-card {
    display: grid;
    gap: 0.9rem;
    align-content: start;
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: var(--surface);
    scroll-snap-align: start;
}

.theme-preview,
.theme-card img {
    display: block;
}

.theme-preview {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    background: var(--surface-strong);
}

.theme-card img {
    width: 100%;
    height: auto;
}

.theme-card h3 {
    margin-bottom: 0;
}

.split-section {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 2rem;
    align-items: start;
}

.steps {
    display: grid;
    gap: 0.25rem;
}

.step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem;
    align-items: start;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--line);
}

.step span {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-weight: 800;
}

.download-section {
    margin-bottom: 3rem;
    padding: clamp(2rem, 6vw, 4rem);
    border: 1px solid var(--line);
    border-radius: 1.25rem;
    background: var(--surface);
}

.download-section p {
    max-width: 36rem;
    margin-bottom: 1.5rem;
}

.floating-nav {
    position: fixed;
    bottom: calc(1rem + env(safe-area-inset-bottom));
    left: 50%;
    z-index: 20;
    display: flex;
    justify-content: center;
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 0.55rem;
    overflow: hidden;
    border: 1px solid var(--glass-line);
    border-radius: 1.35rem;
    background: color-mix(in srgb, var(--glass-fill) 58%, transparent);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(1.35rem) saturate(165%);
    -webkit-backdrop-filter: blur(1.35rem) saturate(165%);
    transform: translate(-50%, calc(100% + 1.5rem)) scale(0.98);
    opacity: 0;
    pointer-events: none;
    transition: transform 220ms ease, opacity 220ms ease;
}

.floating-nav::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid var(--glass-rim);
    border-radius: inherit;
    mask-image: linear-gradient(150deg, #000 0 26%, transparent 62%);
    -webkit-mask-image: linear-gradient(150deg, #000 0 26%, transparent 62%);
    pointer-events: none;
}

.floating-nav.is-visible {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.floating-nav .button {
    position: relative;
    z-index: 1;
    min-width: min(100%, 14rem);
    border-color: color-mix(in srgb, var(--accent) 72%, var(--glass-rim));
    border-radius: 999px;
    box-shadow: 0 0.8rem 2rem rgba(99, 51, 233, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.site-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 0.7rem;
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.footer-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    font-weight: 700;
}

.legal-placeholder {
    max-width: 48rem;
    color: color-mix(in srgb, var(--muted) 62%, transparent);
    font-size: 0.78rem;
    line-height: 1.45;
}

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

    .hero {
        min-height: auto;
        padding-top: 2.5rem;
    }

    .feature-grid,
    .feature-overview,
    .feature-overview-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        min-height: 0;
    }

    .feature-overview-media {
        justify-self: start;
    }

    .themes-header {
        display: grid;
        gap: 0;
    }

    .theme-mode-selector {
        width: min(100%, 18rem);
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 520px) {
    h1 {
        font-size: 3rem;
    }

    .button,
    .hero-actions {
        width: 100%;
    }

    .footer-main {
        align-items: flex-start;
        flex-direction: column;
    }
}
