:root {
    --bg: #050816;
    --bg-soft: #0a1022;
    --card: rgba(255, 255, 255, 0.06);
    --card-strong: rgba(255, 255, 255, 0.1);
    --border: rgba(255, 255, 255, 0.14);
    --text: #ffffff;
    --muted: #cbd5e1;
    --quiet: #94a3b8;
    --primary: #38bdf8;
    --secondary: #8b5cf6;
    --success: #34d399;
    --warning: #f59e0b;
    --radius: 24px;
    --shadow: 0 24px 80px rgba(56, 189, 248, 0.16);
    --ease: cubic-bezier(.2, .8, .2, 1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -3;
    background:
        linear-gradient(135deg, rgba(5, 8, 22, .96), rgba(5, 8, 22, .86)),
        radial-gradient(circle at top left, rgba(56, 189, 248, .2), transparent 34rem),
        radial-gradient(circle at 82% 20%, rgba(139, 92, 246, .18), transparent 36rem),
        linear-gradient(180deg, #050816 0%, #07111f 48%, #050816 100%);
}

a {
    color: inherit;
}

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

.container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.section-pad {
    padding: 112px 0;
}

.animated-background {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

.mesh {
    position: absolute;
    width: 68vw;
    height: 68vw;
    min-width: 620px;
    min-height: 620px;
    filter: blur(72px);
    opacity: .42;
    transform: translate3d(0, 0, 0);
    animation: drift 22s var(--ease) infinite alternate;
}

.mesh-one {
    top: -28%;
    left: -22%;
    background: linear-gradient(130deg, rgba(56, 189, 248, .34), rgba(52, 211, 153, .16), transparent 70%);
}

.mesh-two {
    right: -26%;
    top: 6%;
    background: linear-gradient(200deg, rgba(139, 92, 246, .42), rgba(56, 189, 248, .14), transparent 68%);
    animation-delay: -7s;
}

.mesh-three {
    left: 22%;
    bottom: -44%;
    background: linear-gradient(45deg, rgba(52, 211, 153, .24), rgba(245, 158, 11, .14), transparent 72%);
    animation-delay: -13s;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .75), transparent 78%);
}

.navbar {
    position: fixed;
    inset: 16px 0 auto;
    z-index: 50;
}

.nav-container {
    width: min(1180px, calc(100% - 32px));
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 12px 0 18px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 24px;
    background: rgba(5, 8, 22, .64);
    box-shadow: 0 16px 54px rgba(0, 0, 0, .28);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 750;
    text-decoration: none;
    letter-spacing: 0;
    white-space: nowrap;
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary) 52%, var(--success));
    color: white;
    box-shadow: 0 10px 30px rgba(56, 189, 248, .28);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-menu a {
    padding: 10px 12px;
    border-radius: 14px;
    color: var(--muted);
    font-size: .92rem;
    text-decoration: none;
    transition: color .24s var(--ease), background .24s var(--ease);
}

.nav-menu a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, .08);
}

.nav-menu .nav-cta {
    color: #06111f;
    background: linear-gradient(135deg, var(--primary), #7dd3fc);
    font-weight: 800;
    box-shadow: 0 12px 26px rgba(56, 189, 248, .22);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px;
    background: rgba(255, 255, 255, .06);
    padding: 10px;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    background: white;
    border-radius: 999px;
}

.hero {
    min-height: 860px;
    display: flex;
    align-items: center;
    padding-top: 146px;
}

.hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(380px, .78fr);
    gap: 64px;
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    padding: 8px 13px;
    border: 1px solid rgba(56, 189, 248, .24);
    border-radius: 999px;
    background: rgba(56, 189, 248, .08);
    color: #bae6fd;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.support-card h2 {
    margin: 0;
    letter-spacing: 0;
    line-height: 1;
}

.hero h1 {
    max-width: 780px;
    font-size: clamp(4.5rem, 4rem + 2vw, 7rem);
    background: linear-gradient(115deg, #fff 2%, #dbeafe 26%, #38bdf8 50%, #c4b5fd 76%, #fff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subheadline {
    max-width: 690px;
    margin: 28px 0 0;
    color: var(--muted);
    font-size: 1.35rem;
}

.hero-actions,
.support-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 34px;
}

.button,
.app-store-button {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 12px 18px;
    border: 1px solid transparent;
    border-radius: 16px;
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
    overflow: hidden;
    transition: transform .24s var(--ease), border-color .24s var(--ease), background .24s var(--ease);
}

.button::after,
.app-store-button::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,.24) 42%, transparent 58%);
    transform: translateX(-130%);
    transition: transform .72s var(--ease);
}

.button:hover,
.app-store-button:hover {
    transform: translateY(-2px);
}

.button:hover::after,
.app-store-button:hover::after {
    transform: translateX(130%);
}

.button-primary,
.app-store-button {
    color: #06111f;
    background: linear-gradient(135deg, var(--primary), #7dd3fc 48%, var(--success));
    box-shadow: 0 18px 38px rgba(56, 189, 248, .22);
}

.button-secondary {
    border-color: rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .07);
    backdrop-filter: blur(18px);
}

.maine-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    color: var(--quiet);
    font-weight: 700;
}

.maine-badge span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--success);
    box-shadow: 0 0 0 6px rgba(52, 211, 153, .12);
}

.hero-visual {
    position: relative;
    min-height: 550px;
}

.constellation {
    position: absolute;
    inset: 0;
}

.floating-icon {
    --x: 0px;
    --y: 0px;
    position: absolute;
    left: 50%;
    top: 50%;
    width: 86px;
    height: 86px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 23px;
    background: rgba(255, 255, 255, .08);
    box-shadow: 0 18px 45px rgba(0, 0, 0, .28);
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y)));
    animation: float 7s ease-in-out infinite;
    backdrop-filter: blur(18px);
    padding: 7px;
}

.floating-icon img {
    width: 100%;
    height: 100%;
    border-radius: 18px;
    object-fit: cover;
}

.hero-device {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 260px;
    height: 430px;
    padding: 13px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 40px;
    background: linear-gradient(145deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04));
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .18);
    transform: translate(-50%, -50%) rotate(4deg);
    backdrop-filter: blur(28px);
}

.device-top {
    width: 82px;
    height: 8px;
    margin: 0 auto 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .24);
}

.device-screen {
    height: calc(100% - 20px);
    display: grid;
    place-items: center;
    align-content: center;
    gap: 6px;
    border-radius: 30px;
    background:
        linear-gradient(145deg, rgba(56, 189, 248, .2), rgba(139, 92, 246, .18)),
        rgba(255, 255, 255, .08);
    text-align: center;
}

.device-label,
.device-screen span:last-child {
    color: var(--muted);
    font-weight: 700;
}

.device-screen strong {
    font-size: 6rem;
    line-height: 1;
}

.stats-strip {
    padding: 0 0 40px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.stat-card,
.app-card,
.why-card,
.support-card {
    border: 1px solid var(--border);
    background: var(--card);
    box-shadow: 0 18px 60px rgba(0, 0, 0, .18);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.stat-card {
    min-height: 132px;
    padding: 24px;
    border-radius: var(--radius);
}

.stat-card strong {
    display: block;
    font-size: 2.15rem;
    line-height: 1;
}

.stat-card span {
    display: block;
    margin-top: 10px;
    color: var(--quiet);
    font-weight: 700;
}

.section-heading {
    max-width: 780px;
    margin: 0 auto 44px;
    text-align: center;
}

.section-heading h2,
.support-card h2 {
    font-size: clamp(3rem, 2.5rem + 1vw, 4.5rem);
}

.section-heading p:not(.eyebrow),
.support-card p {
    margin: 18px auto 0;
    color: var(--muted);
    font-size: 1.1rem;
}

.featured-grid,
.app-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.cfr-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.app-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 22px;
    border-radius: var(--radius);
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform .26s var(--ease), border-color .26s var(--ease), box-shadow .26s var(--ease), background .26s var(--ease);
}

.app-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(56, 189, 248, .18), transparent 34%, rgba(139, 92, 246, .16));
    opacity: 0;
    transition: opacity .26s var(--ease);
}

.app-card:hover {
    border-color: rgba(56, 189, 248, .38);
    background: var(--card-strong);
    box-shadow: 0 28px 82px rgba(56, 189, 248, .15), 0 20px 60px rgba(139, 92, 246, .12);
    transform: translateY(-8px) rotateX(1deg) rotateY(-1deg);
}

.app-card:hover::before {
    opacity: 1;
}

.app-top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.app-icon {
    width: 68px;
    height: 68px;
    flex: 0 0 auto;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .24);
    object-fit: cover;
}

.featured-grid .app-icon {
    width: 82px;
    height: 82px;
    border-radius: 22px;
}

.app-card h3 {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.15;
}

.featured-grid .app-card h3 {
    font-size: 1.45rem;
}

.app-subtitle {
    margin: 6px 0 0;
    color: #bae6fd;
    font-weight: 750;
}

.app-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 16px 0;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 5px 9px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, .06);
    font-size: .78rem;
    font-weight: 800;
}

.app-description {
    color: var(--quiet);
    margin: 0 0 22px;
}

.app-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
}

.price {
    color: var(--success);
    font-weight: 900;
}

.app-store-button {
    min-height: 42px;
    padding: 10px 13px;
    border-radius: 14px;
    font-size: .9rem;
}

.app-store-button svg {
    width: 17px;
    height: 17px;
}

.chip-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.chip {
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, .06);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: color .22s var(--ease), background .22s var(--ease), border-color .22s var(--ease);
}

.chip:hover,
.chip.is-active {
    color: #06111f;
    border-color: transparent;
    background: linear-gradient(135deg, var(--primary), #a5b4fc);
}

.studio-section {
    position: relative;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.why-card {
    min-height: 255px;
    padding: 24px;
    border-radius: var(--radius);
}

.why-icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(56, 189, 248, .12);
    color: #bae6fd;
    font-weight: 900;
}

.why-card h3 {
    margin: 24px 0 10px;
    font-size: 1.2rem;
}

.why-card p {
    margin: 0;
    color: var(--quiet);
}

.catalog-tools {
    display: grid;
    grid-template-columns: minmax(240px, 420px) 1fr;
    gap: 18px;
    align-items: start;
    margin-bottom: 28px;
}

.search-box {
    display: grid;
    gap: 8px;
}

.search-box span {
    color: var(--quiet);
    font-size: .85rem;
    font-weight: 800;
}

.search-box input {
    width: 100%;
    min-height: 50px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 16px;
    padding: 0 16px;
    color: var(--text);
    background: rgba(255, 255, 255, .07);
    outline: none;
    font: inherit;
    backdrop-filter: blur(18px);
}

.search-box input:focus {
    border-color: rgba(56, 189, 248, .56);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, .1);
}

.catalog-tools .chip-row {
    justify-content: flex-start;
    margin-bottom: 0;
}

.support-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 36px;
    align-items: center;
    padding: 40px;
    border-radius: 30px;
    background:
        linear-gradient(135deg, rgba(56, 189, 248, .14), rgba(139, 92, 246, .1)),
        var(--card);
}

.support-actions {
    justify-content: flex-end;
    margin-top: 0;
}

.footer {
    padding: 44px 0;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.footer-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer p {
    margin: 12px 0 0;
    color: var(--quiet);
}

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

.footer-links a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 700;
}

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

.legal-page {
    padding-top: 140px;
}

.legal-card {
    max-width: 920px;
    padding: 44px;
    border: 1px solid var(--border);
    border-radius: 30px;
    background: rgba(255, 255, 255, .07);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .24);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.legal-card h1 {
    margin: 0;
    font-size: clamp(3rem, 2.6rem + 1.4vw, 4.8rem);
    line-height: 1;
}

.legal-updated {
    color: #bae6fd;
    font-weight: 800;
}

.legal-card h2 {
    margin: 34px 0 10px;
    font-size: 1.35rem;
}

.legal-card p,
.legal-card li {
    color: var(--muted);
}

.legal-card p {
    margin: 14px 0 0;
}

.legal-card ul {
    margin: 14px 0 0;
    padding-left: 22px;
}

.legal-card li + li {
    margin-top: 8px;
}

.legal-card a {
    color: #7dd3fc;
    font-weight: 800;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.empty-state {
    grid-column: 1 / -1;
    padding: 36px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--radius);
    color: var(--muted);
    text-align: center;
    background: rgba(255, 255, 255, .06);
}

@keyframes drift {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(6%, 4%, 0) scale(1.05); }
}

@keyframes float {
    0%, 100% { margin-top: 0; }
    50% { margin-top: -18px; }
}

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

    .hero {
        min-height: auto;
    }

    .hero-visual {
        min-height: 500px;
    }

    .stats-grid,
    .why-grid,
    .cfr-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .support-card,
    .catalog-tools {
        grid-template-columns: 1fr;
    }

    .support-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 820px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 76px;
        left: 16px;
        right: 16px;
        display: none;
        padding: 12px;
        border: 1px solid rgba(255, 255, 255, .14);
        border-radius: 22px;
        background: rgba(5, 8, 22, .92);
        backdrop-filter: blur(22px);
        box-shadow: 0 20px 70px rgba(0, 0, 0, .4);
    }

    .nav-menu.is-open {
        display: grid;
    }

    .nav-menu a {
        padding: 13px 14px;
    }

    .hero h1 {
        font-size: 4.1rem;
    }
}

@media (max-width: 680px) {
    .container {
        width: min(100% - 28px, 1180px);
    }

    .section-pad {
        padding: 76px 0;
    }

    .hero {
        padding-top: 126px;
    }

    .hero h1,
    .section-heading h2,
    .support-card h2 {
        font-size: 3rem;
    }

    .hero-subheadline {
        font-size: 1.08rem;
    }

    .hero-actions,
    .support-actions,
    .app-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .button,
    .app-store-button {
        width: 100%;
    }

    .hero-visual {
        min-height: 410px;
    }

    .hero-device {
        width: 210px;
        height: 342px;
    }

    .floating-icon {
        width: 66px;
        height: 66px;
        border-radius: 18px;
    }

    .floating-icon img {
        border-radius: 13px;
    }

    .stats-grid,
    .featured-grid,
    .app-grid,
    .cfr-grid,
    .why-grid {
        grid-template-columns: 1fr;
    }

    .stat-card,
    .why-card,
    .support-card,
    .app-card {
        border-radius: 20px;
    }

    .support-card {
        padding: 24px;
    }

    .legal-card {
        padding: 26px;
    }

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

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
