/* ── Shared styles for yesd3v.github.io ──────────────────────────── */

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

:root {
    --bg: #030303;
    --panel: #0a0a0b;
    --panel-2: #0f0f11;
    --border: rgba(255, 255, 255, .08);
    --border-strong: rgba(255, 255, 255, .16);
    --text: #f5f5f7;
    --text-2: rgba(255, 255, 255, .62);
    --text-3: rgba(255, 255, 255, .40);
    --accent: #fff;
    --glow: rgba(255, 255, 255, .55);

    --discord: #5865F2;
    --scriptblox: #8b5cf6;

    --radius: 18px;
    --radius-sm: 12px;
    --ease: cubic-bezier(.2, .7, .2, 1);

    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-display: "Space Grotesk", "Inter", sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;

    color-scheme: dark;
}

html {
    width: 100%;
    scroll-behavior: smooth;
    overflow-y: scroll;
    scrollbar-width: none;
    -webkit-text-size-adjust: 100%;
}

html::-webkit-scrollbar {
    display: none;
}

body {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

::selection {
    background: rgba(255, 255, 255, .9);
    color: #000;
}

a {
    color: inherit;
}

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

:focus-visible {
    outline: 2px solid rgba(255, 255, 255, .85);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ── Background ─────────────────────────────────────────────────── */

.bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .3;
}

/* Vignette keeps the contour lines away from text-heavy areas */
.bg::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        radial-gradient(ellipse 75% 65% at 50% 40%, transparent 20%, rgba(3, 3, 3, .8) 100%),
        linear-gradient(to bottom, rgba(3, 3, 3, 0) 40%, rgba(3, 3, 3, .55));
}

.bg::before {
    content: "";
    position: absolute;
    z-index: 1;
    inset: -20% -10% auto;
    height: 80%;
    background:
        radial-gradient(ellipse 50% 45% at 50% 0%, rgba(255, 255, 255, .10), transparent 70%),
        radial-gradient(ellipse 30% 30% at 20% 10%, rgba(139, 92, 246, .07), transparent 70%),
        radial-gradient(ellipse 30% 30% at 80% 10%, rgba(88, 101, 242, .06), transparent 70%);
    animation: drift 18s var(--ease) infinite alternate;
}

.bg-noise {
    position: absolute;
    inset: 0;
    z-index: 3;
    opacity: .05;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes drift {
    from { transform: translate3d(-2%, 0, 0) scale(1); }
    to   { transform: translate3d(2%, 2%, 0) scale(1.06); }
}

/* ── Custom scrollbar ───────────────────────────────────────────── */

#custom-scrollbar {
    position: fixed;
    right: 4px;
    top: 8px;
    width: 4px;
    height: calc(100% - 16px);
    z-index: 9999;
    pointer-events: none;
}

#custom-scrollbar-thumb {
    position: absolute;
    left: 0;
    right: 0;
    min-height: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    opacity: 0;
    transition: opacity .3s ease;
}

#custom-scrollbar.scrolling #custom-scrollbar-thumb {
    opacity: 1;
}

/* ── Layout ─────────────────────────────────────────────────────── */

.wrap {
    width: min(1120px, calc(100% - 48px));
    margin-inline: auto;
}

.wrap-narrow {
    width: min(680px, calc(100% - 32px));
    margin-inline: auto;
}

/* ── Top bar ────────────────────────────────────────────────────── */

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 14px 0 22px;
    background: linear-gradient(to bottom, rgba(3, 3, 3, .92) 55%, rgba(3, 3, 3, 0));
}

.topbar .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px 8px 10px;
    color: var(--text-2);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, .03);
    transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.back:hover {
    color: var(--text);
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, .06);
}

.back svg {
    width: 16px;
    height: 16px;
    transition: transform .2s var(--ease);
}

.back:hover svg {
    transform: translateX(-2px);
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -.03em;
    color: var(--text-2);
    text-decoration: none;
    transition: color .2s ease, text-shadow .2s ease;
}

.wordmark img {
    width: 20px;
    height: 20px;
}

.wordmark:hover {
    color: var(--text);
    text-shadow: 0 0 12px var(--glow);
}

/* ── Icons ──────────────────────────────────────────────────────── */

.icon {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
}

.icon-stroke {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-fill {
    fill: currentColor;
}

/* ── Panels ─────────────────────────────────────────────────────── */

.panel {
    position: relative;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .01) 40%, rgba(0, 0, 0, .3)),
        var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow:
        inset 0 1px rgba(255, 255, 255, .04),
        0 24px 60px rgba(0, 0, 0, .45);
}

/* ── Buttons ────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 26px;
    font: inherit;
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: .01em;
    text-decoration: none;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    white-space: nowrap;
    cursor: pointer;
    transition:
        background .2s ease,
        border-color .2s ease,
        box-shadow .25s ease,
        transform .2s var(--ease);
}

.btn .icon {
    font-size: 18px;
}

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

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    color: #000;
    background: #fff;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, .4),
        0 8px 30px rgba(255, 255, 255, .16);
}

.btn-primary:hover {
    background: #ececec;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, .5),
        0 10px 44px rgba(255, 255, 255, .26);
}

.btn-ghost {
    color: var(--text);
    background: rgba(255, 255, 255, .04);
    border-color: var(--border-strong);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .3);
}

/* ── Chips ──────────────────────────────────────────────────────── */

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, .03);
    white-space: nowrap;
}

.chip .icon {
    font-size: 13px;
    color: var(--text-3);
}

.chip a {
    color: var(--text);
    text-decoration: none;
}

.chip a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ── Product page ───────────────────────────────────────────────── */

.product {
    flex: 1;
    padding: 28px 0 56px;
}

.product-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 48px 40px 40px;
    overflow: hidden;
}

.product-hero::before {
    content: "";
    position: absolute;
    top: -120px;
    left: 50%;
    width: 360px;
    height: 240px;
    transform: translateX(-50%);
    background: radial-gradient(closest-side, rgba(255, 255, 255, .14), transparent);
    pointer-events: none;
}

.logo-wrap {
    position: relative;
    width: 104px;
    height: 104px;
    display: grid;
    place-items: center;
    border-radius: 26px;
    background: linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(0, 0, 0, .5));
    border: 1px solid var(--border-strong);
    box-shadow:
        inset 0 1px rgba(255, 255, 255, .08),
        0 16px 40px rgba(0, 0, 0, .6),
        0 0 50px rgba(255, 255, 255, .06);
    animation: float 6s ease-in-out infinite;
}

.logo-wrap img {
    width: 66px;
    height: 66px;
    object-fit: contain;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-5px); }
}

.product-title {
    margin-top: 26px;
    font-family: var(--font-display);
    font-size: clamp(30px, 6vw, 42px);
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.05;
    text-shadow:
        0 0 8px rgba(255, 255, 255, .35),
        0 0 28px rgba(255, 255, 255, .14);
}

.product-sub {
    margin-top: 10px;
    max-width: 440px;
    font-size: 15px;
    color: var(--text-2);
}

.product-actions {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.product-meta {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.dl-chip[hidden] {
    display: none;
}

.dl-chip strong {
    color: var(--text);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* ── Sections ───────────────────────────────────────────────────── */

.section {
    margin-top: 36px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-3);
}

.section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-strong), transparent);
}

/* ── Features ───────────────────────────────────────────────────── */

.features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.feature {
    display: flex;
    gap: 14px;
    padding: 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .025);
    border: 1px solid var(--border);
    transition: border-color .2s ease, background .2s ease;
}

.feature:hover {
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, .045);
}

.feature-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 18px;
}

.feature-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.feature-desc {
    margin-top: 2px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-3);
}

/* ── Steps ──────────────────────────────────────────────────────── */

.steps {
    list-style: none;
    padding: 6px 20px;
    counter-reset: step;
}

.steps li {
    position: relative;
    display: flex;
    gap: 14px;
    padding: 14px 0;
    font-size: 14px;
    color: var(--text-2);
    counter-increment: step;
}

.steps li + li {
    border-top: 1px solid var(--border);
}

.steps li::before {
    content: counter(step);
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    color: #000;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 0 16px rgba(255, 255, 255, .2);
}

.steps b {
    color: var(--text);
    font-weight: 600;
}

code {
    font-family: var(--font-mono);
    font-size: .88em;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid var(--border);
    color: var(--text);
    white-space: nowrap;
}

/* ── Footer ─────────────────────────────────────────────────────── */

.footer {
    padding: 28px 0 36px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-3);
}

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

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

.footer-links a {
    color: var(--text-2);
    text-decoration: none;
    transition: color .2s ease;
}

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

/* ── Reveal on load ─────────────────────────────────────────────── */

/* Uses `translate` (not `transform`) so hover transforms still apply. */
.reveal {
    opacity: 0;
    translate: 0 12px;
    animation: reveal .7s var(--ease) forwards;
    animation-delay: calc(var(--i, 0) * 70ms);
}

@keyframes reveal {
    to {
        opacity: 1;
        translate: none;
    }
}

/* ── Mobile ─────────────────────────────────────────────────────── */

@media (max-width: 800px) {
    #custom-scrollbar { display: none; }
}

@media (max-width: 600px) {
    .wrap { width: calc(100% - 32px); }

    .product { padding-top: 12px; }

    .product-hero { padding: 40px 20px 32px; }

    .logo-wrap {
        width: 88px;
        height: 88px;
        border-radius: 22px;
    }

    .logo-wrap img {
        width: 54px;
        height: 54px;
    }

    .product-actions { width: 100%; }

    .product-actions .btn { width: 100%; }

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

    .steps { padding: 4px 16px; }

    code { white-space: normal; word-break: break-all; }

    .footer .wrap {
        flex-direction: column;
        text-align: center;
    }
}

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

    html { scroll-behavior: auto; }
}
