html { scroll-padding-top: 100px; }
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

:focus-visible { outline: 2px solid var(--accent-main); outline-offset: 2px; }

.home-section {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 96px 24px 0;
}
.home-section--last { padding-bottom: 96px; }

.home-head { max-width: 640px; margin-bottom: 36px; }
.home-head h2 {
    margin-bottom: 12px;
    color: #fff;
    font-size: 2.1em;
    line-height: 1.15;
    letter-spacing: -0.5px;
}
.home-head p { color: var(--accent-text); opacity: 0.8; line-height: 1.6; }

/* ============================================
   HERO
   ============================================ */
.home-hero {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 56px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 150px 24px 0;
}

.home-hero h1 {
    margin-bottom: 20px;
    font-size: 3.4em;
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -2px;
    background: linear-gradient(135deg, var(--accent-text), var(--accent-main));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-lead {
    max-width: 520px;
    color: var(--accent-text);
    font-size: 1.15em;
    line-height: 1.6;
    opacity: 0.9;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 24px; }
.hero-actions--center { justify-content: center; margin-bottom: 0; }

.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    list-style: none;
    color: var(--accent-text);
    font-size: 14px;
    opacity: 0.85;
}
.hero-points li { display: flex; align-items: center; gap: 6px; }
.hero-points svg { color: var(--accent-main); }

.stage {
    position: relative;
    background: rgba(18, 18, 18, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 80px rgba(var(--accent-rgb), 0.08);
}

.stage-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px 20px 0 0;
    color: #f2f3f5;
    font-weight: 600;
    font-size: 15px;
}
.stage-hash { color: #949ba4; font-size: 20px; font-weight: 400; line-height: 1; }

.stage-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 6px 8px; }

.stage-composer {
    margin: 4px 16px 16px;
    padding: 12px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #6d6f78;
    font-size: 14px;
    user-select: none;
}

.stage--hero .dc-message { opacity: 0; transform: translateY(10px); animation: msgIn 0.55s ease forwards; }
.stage--hero .dc-message:nth-child(1) { animation-delay: 0.3s; }
.stage--hero .dc-message:nth-child(2) { animation-delay: 1.1s; }
@keyframes msgIn { to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
    .stage--hero .dc-message { opacity: 1; transform: none; animation: none; }
}

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }

.pill {
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    color: #ccc;
    font: 500 0.9em inherit;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
}
.pill:hover { background: rgba(var(--accent-rgb), 0.1); color: #fff; }
.pill.active { background: var(--accent-main); color: #fff; box-shadow: 0 2px 10px rgba(var(--accent-rgb), 0.4); }

/* ============================================
   BENTO
   ============================================ */
.bento {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-flow: dense;
    gap: 16px;
}

.bento-card {
    position: relative;
    grid-column: span var(--span, 2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 24px;
    background: rgba(30, 30, 30, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.bento-card[hidden] { display: none; }
.bento-card:hover { border-color: rgba(var(--accent-rgb), 0.4); box-shadow: 0 8px 30px rgba(var(--accent-rgb), 0.12); }

.bento-card.is-feature {
    min-height: 250px;
    background:
        radial-gradient(120% 120% at 0% 0%, rgba(var(--accent-rgb), 0.16), transparent 55%),
        rgba(30, 30, 30, 0.4);
}
.bento-mark {
    position: absolute;
    right: -20px;
    bottom: -24px;
    color: rgba(var(--accent-rgb), 0.09);
    pointer-events: none;
}

.bento-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }

.bento-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--accent-main);
}

.bento-card h3 { margin-bottom: 8px; color: #fff; font-size: 1.15em; font-weight: 600; }
.bento-card.is-feature h3 { font-size: 1.4em; }
.bento-card p {
    flex-grow: 1;
    max-width: 46ch;
    color: var(--accent-text);
    font-size: 0.92em;
    line-height: 1.55;
    opacity: 0.8;
}
.bento-card.is-feature p { font-size: 1em; }

.bento-link {
    position: relative;
    z-index: 1;
    align-self: flex-start;
    margin-top: 18px;
    color: var(--accent-main);
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none;
}
.bento-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.bento-card.is-dev { border-style: dashed; }
.bento-card.is-dev .bento-icon { background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.5); }
.bento-card.is-dev h3, .bento-card.is-dev p { opacity: 0.65; }

.h-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.78em;
    font-weight: 600;
    white-space: nowrap;
}
.h-badge--dev { background: rgba(var(--warn-rgb), 0.15); color: var(--warn-main); border: 1px solid rgba(var(--warn-rgb), 0.3); }
.h-badge--beta { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }

.preview { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }

.preview-tabs { display: flex; flex-direction: column; gap: 4px; }

.preview-tab {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--accent-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease;
}
.preview-tab::before {
    content: '';
    position: absolute;
    left: 0; top: 10px; bottom: 10px;
    width: 3px;
    border-radius: 3px;
    background: var(--accent-main);
    transform: scaleY(0);
    transition: transform 0.25s ease;
}
.preview-tab svg { flex-shrink: 0; }
.preview-tab span { display: flex; flex-direction: column; min-width: 0; }
.preview-tab strong { font-size: 0.95em; font-weight: 600; }
.preview-tab small { font-size: 0.78em; opacity: 0.65; }
.preview-tab:hover { background: rgba(var(--accent-rgb), 0.05); }
.preview-tab.active { background: rgba(var(--accent-rgb), 0.1); color: var(--accent-main); }
.preview-tab.active::before { transform: scaleY(1); }

.stage-body--preview { min-height: 300px; padding-top: 18px; }
.preview-panel[hidden] { display: none; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; list-style: none; }

.step {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 28px;
    background: rgba(30, 30, 30, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
}
.step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-bottom: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-dark), var(--accent-main));
    color: #fff;
    font-weight: 700;
    box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.4);
}
.step h3 { margin-bottom: 8px; color: #fff; font-size: 1.2em; }
.step p { flex-grow: 1; margin-bottom: 20px; color: var(--accent-text); opacity: 0.8; line-height: 1.55; font-size: 0.95em; }

.steps-help { margin-top: 20px; color: var(--accent-text); opacity: 0.75; font-size: 0.95em; }
.steps-help a { color: var(--accent-main); font-weight: 600; text-decoration: none; }
.steps-help a:hover { text-decoration: underline; text-underline-offset: 3px; }

.mini-modules { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.mini-mod {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.25);
    color: var(--accent-text);
    font-size: 0.9em;
    cursor: pointer;
}
.mini-mod > span:first-child { display: flex; align-items: center; gap: 8px; }

.mini-switch { position: relative; flex-shrink: 0; width: 44px; height: 24px; }
.mini-switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.mini-slider {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: 30px;
    background: rgba(248, 113, 113, 0.1);
    transition: 0.3s ease;
    pointer-events: none;
}
.mini-slider::before {
    content: '';
    position: absolute;
    left: 3px; bottom: 3px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #f87171;
    transition: 0.3s ease;
}
.mini-switch input:checked + .mini-slider { border-color: rgba(16, 185, 129, 0.5); background: rgba(16, 185, 129, 0.2); }
.mini-switch input:checked + .mini-slider::before { transform: translateX(20px); background: #10b981; box-shadow: 0 0 10px rgba(16, 185, 129, 0.7); }
.mini-switch input:focus-visible + .mini-slider { outline: 2px solid var(--accent-main); outline-offset: 2px; }

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

.duo-card {
    padding: 36px;
    background: rgba(30, 30, 30, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
}
.duo-card--main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-color: rgba(var(--accent-rgb), 0.25);
    background:
        radial-gradient(110% 120% at 100% 100%, rgba(var(--accent-rgb), 0.16), transparent 60%),
        rgba(30, 30, 30, 0.4);
}
.duo-card h2 { margin-bottom: 14px; color: #fff; font-size: 1.9em; line-height: 1.15; letter-spacing: -0.5px; }
.duo-card h3 { margin-bottom: 14px; color: #fff; font-size: 1.3em; }
.duo-card p { margin-bottom: 24px; color: var(--accent-text); line-height: 1.6; opacity: 0.85; max-width: 52ch; }
.duo-card--main p { flex-grow: 1; }
.duo-list { display: flex; flex-direction: column; gap: 10px; padding-left: 20px; color: var(--accent-text); font-size: 0.95em; }
.duo-list li::marker { color: var(--accent-main); }

.timeline {
    position: relative;
    margin: 0 0 24px 6px;
    padding-left: 28px;
    list-style: none;
    border-left: 1px solid rgba(var(--accent-rgb), 0.25);
}
.tl-entry { position: relative; max-width: 720px; padding-bottom: 32px; }
.tl-entry::before {
    content: '';
    position: absolute;
    left: -34px; top: 6px;
    width: 11px; height: 11px;
    border-radius: 50%;
    background: var(--accent-main);
    box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.7);
}
.tl-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; color: var(--accent-text); opacity: 0.8; font-size: 0.9em; }
.tl-entry h3 { margin-bottom: 4px; color: #fff; font-size: 1.2em; }
.timeline.is-collapsed .tl-entry:nth-child(n + 4) { display: none; }

.version-badge {
    padding: 4px 10px;
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    border-radius: 12px;
    background: rgba(var(--accent-rgb), 0.2);
    color: var(--accent-main);
    font-size: 0.85em;
    font-weight: 600;
}

.changelog-list { margin-top: 12px; list-style: none; color: var(--accent-text); font-size: 0.95em; opacity: 0.95; }
.changelog-list li { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; line-height: 1.3; }

.tag-new, .tag-dev, .tag-fix {
    display: inline-block;
    flex-shrink: 0;
    min-width: 72px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.72em;
    font-weight: 800;
    text-align: center;
}
.tag-new { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.tag-dev { background: rgba(59, 130, 246, 0.15); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.3); }
.tag-fix { background: rgba(var(--accent-rgb), 0.15); color: var(--accent-main); border: 1px solid rgba(var(--accent-rgb), 0.3); }

.cta-card {
    padding: 56px 32px;
    text-align: center;
    background:
        radial-gradient(80% 140% at 50% 0%, rgba(var(--accent-rgb), 0.18), transparent 70%),
        rgba(18, 18, 18, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(var(--accent-rgb), 0.25);
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.cta-card h2 { margin-bottom: 12px; color: #fff; font-size: 2.1em; letter-spacing: -0.5px; }
.cta-card p { max-width: 520px; margin: 0 auto 28px; color: var(--accent-text); line-height: 1.6; opacity: 0.85; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .home-hero { grid-template-columns: 1fr; gap: 40px; padding-top: 130px; }
    .home-hero h1 { font-size: 2.8em; }

    .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bento-card { grid-column: span 1; }
    .bento-card.is-feature { grid-column: span 2; min-height: 0; }

    .preview { grid-template-columns: 1fr; }
    .preview-tabs { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
    .preview-tabs::-webkit-scrollbar { height: 0; }
    .preview-tab { flex-shrink: 0; }
    .preview-tab small { display: none; }
    .preview-tab::before { left: 12px; right: 12px; top: auto; bottom: 2px; width: auto; height: 3px; transform: scaleX(0); }
    .preview-tab.active::before { transform: scaleX(1); }

    .steps, .duo { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .home-section { padding: 72px 16px 0; }
    .home-hero { padding: 110px 16px 0; }
    .home-hero h1 { font-size: 2.2em; letter-spacing: -1px; }
    .home-head h2, .cta-card h2 { font-size: 1.7em; }

    .bento { grid-template-columns: 1fr; }
    .bento-card, .bento-card.is-feature { grid-column: span 1; }

    .duo-card { padding: 26px; }
    .cta-card { padding: 40px 20px; }
    .changelog-list li { align-items: flex-start; }
}