/* Home page (index.html): hero, products, features, capabilities, changelog, readme, install dialog. */

/* Hero */

.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
    column-gap: clamp(32px, 4vw, 72px);
    /* Left edge lines up with the navbar; the screenshot runs towards the right edge. */
    padding: 84px clamp(16px, 3vw, 48px) 110px max(24px, calc((100vw - var(--page)) / 2));
}

.hero::before {
    content: "";
    position: absolute;
    top: 46%;
    right: -8%;
    width: min(780px, 62vw);
    height: min(780px, 62vw);
    transform: translateY(-50%);
    background: radial-gradient(circle, rgba(139, 92, 246, 0.13) 0%, rgba(139, 92, 246, 0.045) 42%, transparent 68%);
    filter: blur(30px);
    pointer-events: none;
    z-index: -1;
}

.hero-copy { max-width: 560px; }
.hero-copy > * { animation: hero-rise 0.85s var(--ease-out) both; }
.hero-copy > :nth-child(2) { animation-delay: .08s; }
.hero-copy > :nth-child(3) { animation-delay: .16s; }
.hero-copy > :nth-child(4) { animation-delay: .24s; }
.hero-copy > :nth-child(5) { animation-delay: .30s; }
.hero-copy > :nth-child(6) { animation-delay: .36s; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    padding: 5px 12px 5px 6px;
    border: 1px solid rgba(167, 139, 250, 0.22);
    border-radius: 999px;
    background: rgba(167, 139, 250, 0.06);
    color: var(--text-soft);
    font-size: 12.5px;
    font-weight: 500;
    transition: border-color .2s, background-color .2s;
}

.hero-badge:hover { border-color: rgba(167, 139, 250, 0.45); background: rgba(167, 139, 250, 0.1); }

.hero-badge-tag {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--accent);
    color: #0b0a10;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero-badge svg { width: 12px; height: 12px; color: var(--muted); }

.hero-title {
    font-size: clamp(38px, 4.4vw, 58px);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1.02;
    text-wrap: balance;
}

.hero-title span { color: var(--accent); }

.hero-description {
    max-width: 450px;
    margin-top: 22px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 36px;
}

.hero-platforms {
    margin-top: 14px;
    font-size: 12.5px;
    color: var(--faint);
    line-height: 1.9;
}

.hero-platforms a {
    color: var(--muted);
    border-bottom: 1px dotted #3f3f46;
    transition: color .2s, border-color .2s;
    white-space: nowrap;
}

.hero-platforms a:hover { color: var(--text); border-color: var(--muted); }
.hero-platforms a[aria-current="true"] { color: var(--text); }
.hero-platforms .sep { margin: 0 7px; color: #3f3f46; }

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 28px;
    list-style: none;
    font-size: 12.5px;
    color: var(--faint);
}

.hero-meta li { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta li svg { width: 12px; height: 12px; flex: none; color: #52525b; }
.hero-meta li + li { position: relative; margin-left: 10px; padding-left: 20px; }

.hero-meta li + li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 3px;
    transform: translateY(-50%);
    border-radius: 50%;
    background: #3f3f46;
}

.hero-showcase {
    position: relative;
    justify-self: end;
    width: 100%;
    max-width: 800px;
    margin: 0;
    animation: showcase-in 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.showcase-frame {
    position: relative;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.015) 45%, rgba(255, 255, 255, 0.03) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 24px 50px -18px rgba(0, 0, 0, 0.85),
        0 60px 120px -40px rgba(0, 0, 0, 0.9),
        0 0 90px -30px rgba(167, 139, 250, 0.45);
    overflow: hidden;
}

.showcase-frame::before {
    content: "";
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    pointer-events: none;
}

.showcase-frame img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1451 / 852;
    border-radius: 11px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
}

@keyframes hero-rise {
    from { opacity: 0; transform: translate3d(0, 16px, 0); }
    to { opacity: 1; transform: none; }
}

@keyframes showcase-in {
    from { opacity: 0; transform: translate3d(48px, 0, 0) scale(0.96); filter: blur(20px); }
    to { opacity: 1; transform: none; filter: none; }
}

/* Products */

.products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

.product-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    transition: border-color .25s;
}
.product-card:hover { border-color: var(--border-hover); }

.product-preview {
    position: relative;
    aspect-ratio: 16 / 9;
    max-width: 100%;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    background: #0c0c0e;
}
.product-preview img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .35s, transform .6s var(--ease-out);
}
.product-preview img.is-hidden { opacity: 0; }
.product-card:hover .product-preview img { transform: scale(1.02); }

.product-body { flex: 1; display: flex; flex-direction: column; padding: 24px 26px 26px; }

.product-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
}
.product-card h3 { font-size: 19px; font-weight: 650; letter-spacing: -.4px; }

.product-meta { color: var(--faint); font: 500 11.5px var(--mono); }

.product-versions {
    display: inline-flex;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.product-versions button {
    padding: 3px 9px;
    border: 0;
    border-radius: 6px;
    background: none;
    color: var(--faint);
    font: 500 11.5px var(--mono);
    cursor: pointer;
    transition: color .2s, background .2s;
}
.product-versions button:hover { color: var(--text-soft); }
.product-versions button[aria-pressed="true"] { background: var(--surface-hover); color: var(--text); }
.product-versions button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.product-card p { max-width: 420px; margin-top: 10px; color: var(--muted); font-size: 13.5px; line-height: 1.75; }

.product-link {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 22px;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 600;
    transition: color .2s, gap .25s var(--ease-out);
}
.product-link svg { width: 13px; height: 13px; color: var(--faint); transition: color .2s; }
.product-link:hover { gap: 9px; color: var(--text); }
.product-link:hover svg { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
    .product-preview img { transition: none; }
    .product-card:hover .product-preview img { transform: none; }
}

/* Features (numbered row) */

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    counter-reset: feat;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

/* The numbers replace the icons in these two lists. */
.feature-icon, .capability-icon { display: none; }

.feature { counter-increment: feat; padding: 28px 28px 28px 0; }
.feature + .feature { border-left: 1px solid var(--border); padding-left: 28px; }

.feature::before {
    content: "0" counter(feat);
    display: block;
    margin-bottom: 20px;
    font: 500 11px var(--mono);
    letter-spacing: .08em;
    color: var(--muted);
}

.feature h3 { font-size: 15px; font-weight: 600; }
.feature p { color: var(--muted); font-size: 13px; line-height: 1.8; margin-top: 9px; }

/* Capabilities: highlighted cards on top */

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

.highlight {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(167, 139, 250, 0.09), transparent 60%),
        var(--surface);
    overflow: hidden;
    transition: border-color .25s, background-color .25s;
}

.highlight::before {
    content: "";
    position: absolute;
    top: 0;
    left: 16px;
    right: 16px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.45), transparent);
    opacity: .6;
    transition: opacity .25s;
}

.highlight:hover { border-color: rgba(167, 139, 250, 0.35); }
.highlight:hover::before { opacity: 1; }

.highlight-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 20px;
    border-radius: 10px;
    border: 1px solid rgba(167, 139, 250, 0.22);
    background: rgba(167, 139, 250, 0.08);
    color: var(--accent);
}

.highlight-icon svg { width: 19px; height: 19px; }
.highlight h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.2px; }
.highlight p { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.7; }

.highlight-tag {
    align-self: flex-start;
    margin-top: auto;
    padding-top: 18px;
    color: var(--faint);
    font: 500 11px var(--mono);
    letter-spacing: .02em;
}

/* Capabilities (numbered list) */

.capabilities {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 56px;
    counter-reset: cap;
}

.capability {
    counter-increment: cap;
    display: grid;
    grid-template-columns: 30px 1fr;
    column-gap: 10px;
    padding: 20px 0;
    border-top: 1px solid var(--border);
}

.capability::before {
    content: counter(cap, decimal-leading-zero);
    grid-row: 1 / 3;
    padding-top: 2px;
    font: 500 11px var(--mono);
    color: var(--muted);
}

.capability h3, .capability p { grid-column: 2; }
.capability h3 { font-size: 14px; font-weight: 600; }
.capability p { color: var(--muted); font-size: 13px; line-height: 1.75; margin-top: 4px; }

/* Changelog */

.changelog { display: grid; gap: 20px; }

.release {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 32px;
    padding: 28px 32px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}

.release-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.release-meta h3 { font-size: 16px; font-weight: 700; letter-spacing: -0.3px; }

.release-version {
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--accent-soft);
    color: var(--accent);
    font: 600 12px var(--mono);
}

.release-date { color: var(--faint); font: 500 11.5px var(--mono); }

.release-sub {
    margin: 22px 0 10px;
    color: var(--faint);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.release-sub:first-child { margin-top: 0; }

.release-list { list-style: none; display: grid; gap: 9px; }

.release-list li {
    position: relative;
    padding-left: 16px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.release-list li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 9px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(167, 139, 250, 0.7);
}

.release-list strong { color: var(--text-soft); font-weight: 600; }

.release-older { margin-top: 22px; border-top: 1px solid var(--border); padding-top: 16px; }

.release-older summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
    transition: color .2s;
}

.release-older summary::-webkit-details-marker { display: none; }
.release-older summary:hover { color: var(--text); }
.release-older summary svg { width: 12px; height: 12px; transition: transform .2s; }
.release-older[open] summary svg { transform: rotate(90deg); }

.release-older-item { margin-top: 18px; }
.release-older-item .release-version { display: inline-block; margin-bottom: 12px; }

.changelog-state { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 0; }

/* Readme */

.readme-body { max-width: 780px; margin: 0 auto; }

.readme-block { padding: 34px 0; border-top: 1px solid rgba(255, 255, 255, 0.055); }
.readme-block:first-child { border-top: none; padding-top: 0; }
.readme-block h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.2px; }
.readme-block h3 + * { margin-top: 13px; }
.readme-block p { color: var(--muted); font-size: 13.5px; line-height: 1.85; }
.readme-block p + p { margin-top: 14px; }
.readme-block a { color: var(--accent); border-bottom: 1px solid rgba(167, 139, 250, 0.25); transition: color .2s, border-color .2s; }
.readme-block a:hover { color: var(--accent-hover); border-color: var(--accent-hover); }
.readme-block strong { color: var(--text-soft); font-weight: 600; }

.readme-list { list-style: none; display: grid; gap: 9px; margin-top: 14px; }
.readme-list + p { margin-top: 16px; }

.readme-list li {
    position: relative;
    padding-left: 20px;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.8;
}

.readme-list li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 10px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(167, 139, 250, 0.7);
}

.readme-note {
    display: inline-block;
    padding: 9px 13px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.015);
    font-size: 12px;
    color: #a1a1aa !important;
}

.readme-foot { margin-top: 38px; padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, 0.055); }

/* Install dialog */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(4, 4, 6, 0.78);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
    backdrop-filter: blur(16px) saturate(130%);
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s ease, visibility .28s ease;
}

.modal-overlay.is-open { opacity: 1; visibility: visible; }

.modal {
    position: relative;
    width: 100%;
    max-width: 600px;
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(160deg, #151517 0%, #0c0c0e 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 24px 60px -12px rgba(0, 0, 0, 0.85);
    transform: translateY(20px) scale(0.97);
    opacity: 0;
    transition: transform .45s cubic-bezier(0.16, 1, 0.3, 1), opacity .32s ease;
    overflow: hidden;
}

.modal-overlay.is-open .modal { transform: none; opacity: 1; }

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--faint);
    cursor: pointer;
    transition: background-color .2s, color .2s;
}

.modal-close:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.modal-close svg { width: 16px; height: 16px; }

.modal-header { display: flex; align-items: center; gap: 14px; padding: 26px 28px 18px; flex: none; }

.modal-icon {
    flex: none;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #fbbf24;
}

.modal-icon svg { width: 20px; height: 20px; }
.modal-header h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.6px; }

.modal-body { padding: 0 28px 24px; overflow-y: auto; flex: 1 1 auto; scrollbar-width: thin; scrollbar-color: #3f3f46 transparent; }
.modal-body p { color: var(--muted); font-size: 13.5px; line-height: 1.75; }
.modal-body p + p { margin-top: 14px; }

.modal-body code {
    font-family: var(--mono);
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.modal-body .modal-highlight {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 20px;
    padding: 13px 15px;
    border-radius: 9px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    background: rgba(245, 158, 11, 0.055);
    color: #fcd48a;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.6;
}

.modal-highlight svg { flex: none; width: 15px; height: 15px; margin-top: 1px; color: #fbbf24; }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 18px 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.012);
    flex: none;
}

.modal-footer .button { height: 42px; font-size: 13px; }

/* Responsive */

@media (max-width: 1100px) {
    .hero { column-gap: 32px; padding-top: 68px; padding-bottom: 92px; }
    .hero-title { font-size: clamp(36px, 4.6vw, 50px); }
    .hero-description { font-size: 14px; }
}

@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; row-gap: 56px; padding: 56px 24px 84px; }
    .hero::before { top: auto; bottom: -120px; right: -25%; width: 110vw; height: 110vw; transform: none; }
    .hero-copy { max-width: 620px; }
    .hero-title { font-size: clamp(36px, 7vw, 52px); }
    .hero-showcase { justify-self: stretch; max-width: 100%; }
    .highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .release { grid-template-columns: 1fr; gap: 18px; padding: 24px; }
    .release-meta { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; }
}

@media (max-width: 760px) {
    .products, .features, .capabilities { grid-template-columns: 1fr; }
    .feature, .feature + .feature { padding: 24px 0; border-left: 0; }
    .feature + .feature { border-top: 1px solid var(--border); }
    .readme-block { padding: 28px 0; }
}

@media (max-width: 520px) {
    .hero { padding: 48px 20px 72px; row-gap: 44px; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .button { width: 100%; height: 46px; }
    .showcase-frame { padding: 5px; border-radius: 15px; }
    .showcase-frame img { border-radius: 10px; }
    .product-body { padding: 20px; }
    .highlights { grid-template-columns: 1fr; }
    .modal-overlay { padding: 16px; }
    .modal-header { padding: 22px 20px 14px; gap: 12px; }
    .modal-header h2 { font-size: 18px; }
    .modal-body { padding: 0 20px 20px; }
    .modal-footer { padding: 16px 20px; flex-direction: column-reverse; }
    .modal-footer .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-copy > *, .hero-showcase { animation: none !important; }
    .modal, .modal-overlay { transition: none; }
}
