/* ============================================================
   SyncCord — design system
   Modern indigo/violet glassmorphism. Mobile-first.
   ============================================================ */

:root {
    --bg:           #080808;
    --bg-2:         #111111;
    --bg-3:         #161616;
    --surface:      rgba(28, 28, 28, 0.7);
    --surface-2:    rgba(36, 36, 36, 0.85);
    --border:       rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 215, 0, 0.35);

    --text:         #f8f8f5;
    --text-muted:   #a8a8a8;
    --text-soft:    #6f6f6f;

    --accent:       #FFD700;                       /* bright gold */
    --accent-2:     #FFF000;                       /* brighter yellow */
    --accent-soft:  rgba(255, 215, 0, 0.6);
    --accent-dim:   rgba(255, 215, 0, 0.12);
    --accent-mid:   rgba(255, 215, 0, 0.25);
    --accent-glow:  rgba(255, 215, 0, 0.55);
    --success:      #40c480;
    --warn:         #f8b840;
    --danger:       #e85860;

    --glow-1:       0 0 40px rgba(255, 215, 0, 0.18);
    --glow-2:       0 0 60px rgba(255, 215, 0, 0.28);

    --radius-sm: 8px;
    --radius:    14px;
    --radius-lg: 22px;

    --shadow-1: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-2: 0 24px 60px rgba(0, 0, 0, 0.55);
    --glow:     0 0 32px var(--accent-glow);

    --font:         "Inter", "SF Pro Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: "Syne", "Inter", system-ui, sans-serif;
    --font-mono:    "DM Mono", "JetBrains Mono", ui-monospace, "Cascadia Mono", Menlo, monospace;
    /* Back-compat alias */
    --mono:         var(--font-mono);

    --topbar-h: 64px;
    --max-w:    1200px;

    /* Fluid typography */
    --fs-xs:  clamp(0.78rem, 0.74rem + 0.2vw, 0.85rem);
    --fs-sm:  clamp(0.88rem, 0.84rem + 0.2vw, 0.95rem);
    --fs-md:  clamp(1rem,    0.96rem + 0.3vw, 1.05rem);
    --fs-lg:  clamp(1.15rem, 1.05rem + 0.6vw, 1.35rem);
    --fs-xl:  clamp(1.5rem,  1.25rem + 1.2vw, 2rem);
    --fs-2xl: clamp(2rem,    1.5rem + 2.5vw, 3rem);
    --fs-3xl: clamp(2.6rem,  1.6rem + 4vw, 4.5rem);

    /* Custom Cursors */
    --cursor-default: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyOCIgaGVpZ2h0PSIyOCIgdmlld0JveD0iMCAwIDI4IDI4Ij48cGF0aCBmaWxsPSIjRkZENzAwIiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjEuMiIgZD0iTTUuNSwzLjUgTDIxLjUsMTMuNSBMMTQsMTUuNSBMMTkuNSwyNC41IEwxNi41LDI2LjUgTDExLDE3LjUgTDUuNSwyMi41IFoiLz48L3N2Zz4=') 4 2, auto;
    --cursor-pointer: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyOCIgaGVpZ2h0PSIyOCIgdmlld0JveD0iMCAwIDI4IDI4Ij48cGF0aCBmaWxsPSIjRkZENzAwIiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjEuMiIgZD0iTTUuNSwzLjUgTDIxLjUsMTMuNSBMMTQsMTUuNSBMMTkuNSwyNC41IEwxNi41LDI2LjUgTDExLDE3LjUgTDUuNSwyMi41IFoiLz48L3N2Zz4=') 4 2, pointer;
}

/* ───────────────── reset ───────────────── */

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

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: var(--fs-md);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    min-height: 100dvh;
    background: var(--bg);
    background-image:
        radial-gradient(900px 600px at 20% -10%, rgba(255, 215, 0, 0.06), transparent 60%),
        radial-gradient(700px 500px at 100% 0%, rgba(255, 215, 0, 0.04), transparent 60%);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, .brand-name, .btn { font-family: var(--font-display); letter-spacing: -0.02em; }
.tag, .label, .author-tag, .review-meta, .post-meta, .help, .footer-fine, .marquee-track, .scroll-indicator {
    font-family: var(--font-mono);
}
.tag, .label, .author-tag, .scroll-indicator { text-transform: uppercase; letter-spacing: 0.08em; }

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

a { color: var(--accent-2); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--text); }

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: var(--cursor-pointer);
}

input:not(.toggle-input), textarea, select {
    font: inherit;
    color: inherit;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.85rem;
    width: 100%;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
input:not(.toggle-input):focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-mid);
    background: rgba(255, 255, 255, 0.05);
}
textarea { resize: vertical; min-height: 6rem; }

::selection { background: var(--accent); color: var(--text); }

.skip-link {
    position: absolute;
    top: -40px;
    left: 1rem;
    background: var(--accent);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    z-index: 1000;
}
.skip-link:focus { top: 0.5rem; }

/* ───────────────── layout ───────────────── */

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.25rem;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background 0.25s ease, backdrop-filter 0.25s ease, border-color 0.25s;
}
.topbar.scrolled {
    background: rgba(8, 8, 8, 0.85);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-bottom-color: var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
    flex-shrink: 0;
}
.brand-mark {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: conic-gradient(from 220deg, var(--accent), var(--accent-2), var(--accent));
    box-shadow: 0 0 18px var(--accent-glow);
    animation: brand-spin 14s linear infinite;
}
@keyframes brand-spin { to { transform: rotate(360deg); } }
.brand-name { font-size: 1.05rem; }

.nav-primary {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
.nav-pill {
    display: flex;
    gap: 0.1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 0.3rem;
    backdrop-filter: blur(12px);
}
.nav-primary a {
    color: var(--text-muted);
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-size: var(--fs-sm);
    font-weight: 600;
    font-family: var(--font-display);
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}
.nav-primary a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}
.nav-primary a.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    box-shadow: inset 0 -2px 0 var(--accent), 0 0 12px rgba(255, 215, 0, 0.12);
    border-bottom: 2px solid var(--accent);
}

.nav-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.icon-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--text-muted);
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: rgba(255,255,255,0.06); color: var(--text); }

.nav-toggle { display: none; }

.auth-slot { display: flex; gap: 0.5rem; align-items: center; }

.view {
    flex: 1;
    width: 100%;
    padding: 2rem 1.25rem 4rem;
    min-height: 60vh;
    position: relative;
    z-index: 1;
}
.view:focus { outline: none; }

#particle-field {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.4), transparent),
        radial-gradient(2px 2px at 70% 60%, rgba(255,215,0,0.4), transparent),
        radial-gradient(2px 2px at 50% 80%, rgba(255,240,0,0.3), transparent),
        radial-gradient(1px 1px at 90% 20%, rgba(255,255,255,0.3), transparent);
    opacity: 0.5;
    animation: drift 60s linear infinite;
}
@keyframes drift {
    from { background-position: 0 0; }
    to   { background-position: 200px 200px; }
}

/* ───────────────── footer ───────────────── */

.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    background: rgba(8, 8, 8, 0.88);
    backdrop-filter: blur(12px);
    padding: 2rem 1.25rem 3rem;
    position: relative;
    z-index: 1;
    box-shadow: inset 0 1px 0 rgba(255, 215, 0, 0.12);
}
.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: grid;
    gap: 1rem;
    grid-template-columns: auto 1fr;
    align-items: center;
}
.footer-brand { display: flex; gap: 0.6rem; align-items: center; font-weight: 600; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; justify-content: flex-end; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }
.footer-fine {
    grid-column: 1 / -1;
    margin: 0;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    color: var(--text-soft);
    font-size: var(--fs-xs);
    text-align: center;
}

/* ───────────────── components ───────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: var(--fs-sm);
    transition: transform 0.1s, background 0.15s, box-shadow 0.15s, border-color 0.15s;
    border: 1px solid transparent;
    line-height: 1;
    user-select: none;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
    background: var(--accent);
    color: #0a0a0a;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.25);
    position: relative;
    overflow: hidden;
}
.btn-primary:hover { box-shadow: 0 12px 36px rgba(255, 215, 0, 0.45); transform: translateY(-1px); }
.btn-primary::after {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%),
                                rgba(255,255,255,0.35), transparent 55%);
    opacity: 0; transition: opacity 0.2s ease;
    pointer-events: none;
}
.btn-primary:hover::after { opacity: 1; }
.btn-primary > * { position: relative; z-index: 1; }

.btn-ghost {
    background: transparent;
    border-color: var(--border-strong);
    color: var(--text);
}
.btn-ghost:hover { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

.btn-outline {
    border-color: var(--border-strong);
    color: var(--text);
}
.btn-outline:hover { background: rgba(255,255,255,0.04); }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #d04550; }

.btn-sm { padding: 0.45rem 0.8rem; font-size: var(--fs-xs); }
.btn-lg { padding: 0.85rem 1.5rem; font-size: var(--fs-md); }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
}
.card::after {
    content: "";
    position: absolute;
    bottom: 0; left: 10%; right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.5), transparent);
    border-radius: 0 0 var(--radius) var(--radius);
    opacity: 0.7;
    transition: opacity 0.25s, left 0.25s, right 0.25s;
}
.card:hover::after {
    left: 5%; right: 5%;
    opacity: 1;
}
.card:hover {
    border-color: rgba(255, 215, 0, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(255, 215, 0, 0.12), 0 0 0 1px rgba(255, 215, 0, 0.14);
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.7rem;
    background: var(--accent-dim);
    border: 1px solid var(--accent-mid);
    color: var(--accent);
    border-radius: 999px;
    font-size: var(--fs-xs);
    font-weight: 500;
}

.divider { height: 1px; background: var(--border); margin: 1.5rem 0; border: 0; }

.label {
    display: block;
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.field { margin-bottom: 1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.help { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 0.35rem; }

.section { padding: 4rem 0; max-width: var(--max-w); margin-left: auto; margin-right: auto; }
.section-tight { padding: 2.5rem 0; max-width: var(--max-w); margin-left: auto; margin-right: auto; }
.section h2 { font-size: var(--fs-xl); margin: 0 0 0.5rem; letter-spacing: -0.01em; }
.section h3 { font-size: var(--fs-lg); margin: 0 0 0.5rem; letter-spacing: -0.01em; }
.section .lede { color: var(--text-muted); font-size: var(--fs-md); margin: 0 0 1.5rem; max-width: 60ch; }

.grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

/* ───────────────── hero ───────────────── */

.hero {
    position: relative;
    min-height: 88vh;
    padding: 6rem clamp(1.25rem, 4vw, 4rem) 5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
    text-align: center;
}
.hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    z-index: 2;
    max-width: 780px;
    position: relative;
}
.hero-media {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.45;
}
#hero-morph-canvas { display: block; }

.hero-side-web {
    position: absolute;
    top: 0; bottom: 0;
    width: clamp(200px, 22vw, 320px);
    z-index: 0;
    pointer-events: auto;
    opacity: 0.55;
    overflow: hidden;
}
.hero-side-web--left  { left: 0; }
.hero-side-web--right { right: 0; }
.hero-side-web canvas { display: block; width: 100%; height: 100%; }
.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7vw, 6rem);
    line-height: 1.02;
    letter-spacing: -0.03em;
    margin: 0;
    font-weight: 800;
    color: var(--text);
}
.hero-sub {
    font-size: var(--fs-xl);
    color: var(--text-muted);
    margin: 0;
    justify-content: center;
}
#hero-morph-canvas {
    display: block;
    width: 100%;
}

/* Hero orb — radial-gradient circle with dual spinning rings */
.hero-orb {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(280px, 55vw, 520px);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(255, 215, 0, 0.07) 0%, transparent 70%);
    border: 1px solid rgba(255, 215, 0, 0.06);
    box-shadow: var(--glow-1);
    animation: orb-pulse 6s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}
.hero-orb::before, .hero-orb::after {
    content: "";
    position: absolute;
    inset: -8%;
    border-radius: 50%;
    border: 1px dashed rgba(255, 215, 0, 0.18);
    animation: orb-spin 20s linear infinite;
}
.hero-orb::after {
    inset: -16%;
    border: 1px solid rgba(255, 215, 0, 0.10);
    border-style: solid;
    animation: orb-spin 35s linear infinite reverse;
}
@keyframes orb-pulse {
    0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1); }
    50%      { opacity: 1.0; transform: translate(-50%, -50%) scale(1.04); }
}
@keyframes orb-spin { to { transform: rotate(360deg); } }

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 1.5rem; left: 50%;
    transform: translateX(-50%);
    color: var(--accent-soft);
    font-size: 0.72rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    display: flex; flex-direction: column; align-items: center;
    gap: 0.4rem;
    animation: scroll-bounce 2.2s ease-in-out infinite;
}
.scroll-indicator .arrow { font-size: 1.1rem; }
@keyframes scroll-bounce {
    0%, 100% { transform: translate(-50%, 0); opacity: 0.7; }
    50%      { transform: translate(-50%, 8px); opacity: 1; }
}
.hero-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; }

.hero-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* ───────────────── marquee ───────────────── */

.marquee {
    overflow: hidden;
    background: var(--accent);
    color: #0a0a0a;
    transform: skewY(-0.8deg);
    margin: 5rem 0;
    padding: 0.85rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 12px 40px rgba(255, 215, 0, 0.25);
}
.marquee-track {
    display: flex;
    gap: 3rem;
    width: max-content;
    animation: marquee-scroll 22s linear infinite;
    font-family: var(--font-display);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 1.05rem;
    will-change: transform;
}
.marquee-track > span { display: inline-flex; align-items: center; gap: 3rem; }
.marquee-track > span::before { content: "✦"; }
@keyframes marquee-scroll { to { transform: translateX(-50%); } }

/* ───────────────── custom cursor ───────────────── */

body {
    cursor: var(--cursor-default);
}

a, button, input[type="button"], input[type="submit"], [role="button"], summary, label, .btn, .nav-link, .nav-icon {
    cursor: var(--cursor-pointer);
}

@media (hover: none), (pointer: coarse) {
    body, a, button, input, [role="button"], summary, label, .btn { cursor: auto !important; }
}
.hero-stat strong { display: block; font-size: var(--fs-xl); color: var(--text); }
.hero-stat span   { color: var(--text-muted); font-size: var(--fs-sm); }

/* ───────────────── reviews ───────────────── */

.review-card { display: flex; flex-direction: column; gap: 0.6rem; }
.review-head { display: flex; align-items: center; gap: 0.75rem; }
.review-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    object-fit: cover;
    border: 2px solid var(--border);
}
.review-name { font-weight: 600; }
.review-meta { color: var(--text-muted); font-size: var(--fs-xs); }
.review-stars { color: var(--accent-2); font-size: 1.1rem; letter-spacing: 1px; }
.review-content { color: var(--text-muted); font-size: var(--fs-sm); }

.star-input {
    display: inline-flex;
    direction: rtl;
    gap: 0.2rem;
    font-size: 1.6rem;
}
.star-input input { display: none; }
.star-input label {
    cursor: var(--cursor-pointer);
    color: var(--text-soft);
    transition: color 0.15s;
}
.star-input input:checked ~ label,
.star-input label:hover,
.star-input label:hover ~ label { color: var(--accent-2); }

/* ───────────────── builder ───────────────── */

.builder-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 920px) {
    .builder-grid { grid-template-columns: 1fr 360px; }
}
.preview-card {
    position: sticky;
    top: calc(var(--topbar-h) + 1rem);
    align-self: start;
}
.discord-mock {
    background: #2b2d31;
    border-radius: 10px;
    padding: 1rem;
    color: #dcddde;
    font-size: 0.92rem;
    line-height: 1.45;
    border: 1px solid rgba(0,0,0,0.4);
}
.discord-mock .author {
    display: flex; gap: 0.6rem; align-items: center;
    margin-bottom: 0.4rem;
}
.discord-mock .author-name { color: #fff; font-weight: 600; }
.discord-mock .author-tag {
    background: var(--accent);
    color: white;
    font-size: 0.65rem;
    padding: 1px 5px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
}
.discord-mock .embed {
    border-left: 4px solid var(--accent);
    background: #2b2d31;
    padding: 0.8rem 0.9rem;
    border-radius: 4px;
    margin-top: 0.4rem;
    max-width: 100%;
}

/* ───────────────── toggle switch ───────────────── */

.toggle-row {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    cursor: var(--cursor-pointer);
    user-select: none;
    padding: 0.55rem 0;
}

.toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.toggle-track {
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    flex-shrink: 0;
    transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-soft);
    transition: transform 0.22s cubic-bezier(.4,0,.2,1), background 0.22s ease;
}

.toggle-input:checked + .toggle-track {
    background: var(--accent-dim);
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.25);
}

.toggle-input:checked + .toggle-track .toggle-thumb {
    transform: translateX(20px);
    background: var(--accent);
}

.toggle-input:focus-visible + .toggle-track {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.toggle-row:hover .toggle-track {
    border-color: rgba(255, 255, 255, 0.2);
}

.toggle-label {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    line-height: 1.4;
}

/* ───────────────── forum ───────────────── */

.forum-toolbar {
    display: flex; flex-wrap: wrap; gap: 0.75rem;
    margin-bottom: 1.5rem;
    align-items: center;
}
.forum-toolbar input { max-width: 320px; }
.forum-list { display: flex; flex-direction: column; gap: 0.85rem; }

.post-row {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 1rem;
    padding: 1rem 1.25rem;
}
.post-votes {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    color: var(--text-muted);
}
.post-votes button {
    color: var(--text-soft);
    border-radius: 6px;
    padding: 0.25rem 0.4rem;
    transition: color 0.15s, background 0.15s;
}
.post-votes button:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.post-votes .voted-up   { color: var(--success); }
.post-votes .voted-down { color: var(--danger); }
.post-votes .score { font-weight: 700; color: var(--text); }

.post-body h3 { font-size: 1.1rem; margin: 0 0 0.25rem; }
.post-body h3 a { color: var(--text); }
.post-body h3 a:hover { color: var(--accent-2); }
.post-meta { color: var(--text-muted); font-size: var(--fs-xs); display: flex; gap: 0.75rem; flex-wrap: wrap; }

.post-detail .post-meta { font-size: var(--fs-sm); }
.post-detail .markdown { margin: 1.25rem 0; }
.markdown h1, .markdown h2, .markdown h3 { letter-spacing: -0.01em; }
.markdown pre {
    background: rgba(0,0,0,0.4);
    padding: 1rem;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    border: 1px solid var(--border);
    font-size: 0.86rem;
}
.markdown code:not(pre code) {
    background: var(--accent-dim);
    color: var(--accent);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}
.markdown img { border-radius: var(--radius-sm); }
.markdown blockquote {
    border-left: 3px solid var(--accent);
    margin: 1rem 0;
    padding-left: 1rem;
    color: var(--text-muted);
}

.reply { padding: 1rem 1.25rem; }
.reply-nested { margin-left: 2rem; border-left: 2px solid var(--border); padding-left: 1rem; }

/* ───────────────── premium ───────────────── */

.premium-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-top: 2rem;
}
.tier {
    display: flex; flex-direction: column;
    padding: 2rem 1.75rem;
    position: relative;
}
.tier.featured {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), 0 20px 60px rgba(255, 215, 0, 0.28);
}
.tier-badge {
    position: absolute;
    top: -12px; right: 1rem;
    background: var(--accent);
    color: white;
    font-size: var(--fs-xs);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-weight: 600;
}
.tier h3 { font-size: 1.25rem; margin: 0 0 0.5rem; }
.tier .price { font-size: 2.25rem; font-weight: 700; margin: 0.25rem 0 1rem; }
.tier .price span { font-size: 1rem; color: var(--text-muted); font-weight: 400; }
.tier ul { padding: 0; margin: 0 0 1.5rem; list-style: none; }
.tier li {
    padding: 0.4rem 0;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    font-size: var(--fs-sm);
}
.tier li:last-child { border-bottom: 0; }
.tier .btn { margin-top: auto; }
.tier li::before { content: "✓ "; color: var(--accent-2); font-weight: 700; }

/* ───────────────── support ───────────────── */

.support-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.support-card {
    display: flex; flex-direction: column; gap: 0.5rem;
    text-align: center;
    padding: 2rem 1.5rem;
}
.support-card .icon {
    width: 48px; height: 48px;
    margin: 0 auto 0.5rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 1.5rem;
}

/* ───────────────── auth modal ───────────────── */

.modal-region.is-open {
    position: fixed; inset: 0;
    background: rgba(4, 4, 4, 0.82);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
}
.modal-region:not(.is-open) { display: none; }
.modal {
    background: var(--bg-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow-2);
    position: relative;
}
.modal::after {
    content: "";
    position: absolute;
    bottom: 0; left: 10%; right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.55), transparent);
    border-radius: 0 0 var(--radius) var(--radius);
}
.modal h2 { margin-top: 0; }

.oauth-row {
    display: flex; flex-direction: column; gap: 0.6rem;
    margin-bottom: 1rem;
}
.oauth-btn {
    display: flex; align-items: center; gap: 0.7rem;
    justify-content: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    padding: 0.7rem 1rem;
    border-radius: 10px;
    font-weight: 500;
    transition: background 0.15s;
    color: var(--text);
}
.oauth-btn:hover { background: rgba(255,255,255,0.07); }
.oauth-btn .logo { width: 18px; height: 18px; }

.divider-text {
    display: flex; align-items: center; gap: 0.75rem;
    color: var(--text-muted);
    font-size: var(--fs-xs);
    margin: 1rem 0;
}
.divider-text::before, .divider-text::after {
    content: ""; flex: 1; height: 1px; background: var(--border);
}

/* ───────────────── toast ───────────────── */

.toast-region {
    position: fixed;
    bottom: 1.25rem; right: 1.25rem;
    display: flex; flex-direction: column;
    gap: 0.5rem;
    z-index: 200;
    pointer-events: none;
    max-width: calc(100% - 2.5rem);
}
.toast {
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    backdrop-filter: blur(14px);
    color: var(--text);
    padding: 0.7rem 1rem;
    border-radius: 10px;
    box-shadow: var(--shadow-1);
    pointer-events: auto;
    font-size: var(--fs-sm);
    animation: toast-in 0.2s ease;
    min-width: 220px;
}
.toast.success { border-color: rgba(64, 196, 128, 0.55); }
.toast.error   { border-color: rgba(232, 88, 96, 0.55); }
.toast.warn    { border-color: rgba(248, 184, 64, 0.55); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ───────────────── spinner ───────────────── */

.spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,0.18);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-block {
    display: flex; align-items: center; justify-content: center;
    gap: 0.6rem;
    padding: 3rem;
    color: var(--text-muted);
}

/* ───────────────── reveal animation ───────────────── */

.reveal {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
    transition: opacity 0.7s cubic-bezier(.2,.8,.2,1), transform 0.7s cubic-bezier(.2,.8,.2,1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal-stagger > * { transition-delay: calc(var(--i, 0) * 70ms); }

.icon-tile {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.20), rgba(255, 215, 0, 0.04));
    border: 1px solid var(--accent-mid);
    color: var(--accent);
    box-shadow: inset 0 0 24px rgba(255, 215, 0, 0.06), 0 4px 14px rgba(255, 215, 0, 0.10);
    flex-shrink: 0;
}
.icon-tile.lg  { width: 56px; height: 56px; border-radius: 14px; }
.icon-tile.sm  { width: 32px; height: 32px; border-radius: 9px; }
.icon-tile svg { width: 22px; height: 22px; }
.icon-tile.lg svg { width: 28px; height: 28px; }
.icon-tile.sm svg { width: 16px; height: 16px; }

.count-up { display: inline-block; min-width: 1ch; }

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.04); }
}
.breathe { animation: breathe 3s ease-in-out infinite; }

@keyframes float-y {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}
.float { animation: float-y 4.5s ease-in-out infinite; }

.glow-text {
    text-shadow: 0 0 24px rgba(255, 215, 0, 0.45);
}

.typewriter-cursor {
    display: inline-block;
    color: var(--accent);
    font-weight: 300;
    animation: cursor-blink 1s step-end infinite;
    margin-left: 2px;
}
@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* Hero typewriter line */
.hero-typewriter-line {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-weight: 600;
    color: var(--text-muted);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    letter-spacing: -0.01em;
}
.hero-typewriter-text {
    color: var(--accent);
    font-weight: 800;
    font-family: var(--font-display);
    text-shadow: 0 0 28px rgba(255, 215, 0, 0.5);
    min-width: 1ch;
}

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    #particle-field { animation: none; }
    .brand-mark, .breathe, .float, .hero h1, .hero-orb, .hero-orb::before, .hero-orb::after,
    .marquee-track, .scroll-indicator { animation: none !important; }
    .card:hover { transform: none; }
    .cursor-dot, .cursor-ring { display: none; }
    body { cursor: auto !important; }
}

/* ───────────────── responsive ───────────────── */

@media (max-width: 760px) {
    .nav-toggle { display: inline-flex; }
    .nav-primary {
        display: none;
        position: absolute;
        top: var(--topbar-h);
        left: 0; right: 0;
        transform: none;
        background: rgba(8, 8, 8, 0.97);
        backdrop-filter: blur(18px);
        padding: 1rem;
        border-bottom: 1px solid var(--border);
    }
    .nav-primary.is-open { display: block; }
    .nav-pill {
        flex-direction: column;
        background: none;
        border: none;
        border-radius: 0;
        padding: 0;
        gap: 0.25rem;
    }
    .nav-primary a {
        display: block;
        padding: 0.7rem 1rem;
        border-radius: var(--radius-sm);
    }

    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-links { justify-content: center; }
    .footer-brand { justify-content: center; }

    .field-row { grid-template-columns: 1fr; }
    .post-row { grid-template-columns: 50px 1fr; padding: 0.85rem 1rem; }
    .reply-nested { margin-left: 1rem; padding-left: 0.75rem; }
    .hero { grid-template-columns: 1fr; padding: 4rem 1.25rem 5rem; }
    .hero-stats { gap: 1.25rem; }
    .hero h1 { font-size: clamp(2.2rem, 8vw, 3.2rem); }
}
