:root {
    --primary: #1B3B6F;
    --accent: #3A86FF;
    --success: #38b000;
    --danger: #d90429;
    --warning: #fb8500;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --text-light: #f8f9fa;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--bg-white);
}

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

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary);
}

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.pr-4 { padding-right: 2rem; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography */
.section-title {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--accent);
    border-radius: 2px;
}

.designer-section .section-title::after,
.hero-split .section-title::after {
    left: 0;
    transform: none;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.text-large { font-size: 1.2rem; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn i {
    flex: 0 0 auto;
    font-size: 1.05em;
}

.btn span {
    min-width: 0;
}

.btn.is-disabled,
.btn[aria-disabled="true"] {
    pointer-events: none;
    opacity: 0.5;
    filter: saturate(0.7) grayscale(0.15);
}

.btn-primary {
    background-color: var(--accent);
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(58, 134, 255, 0.4);
}

.btn-primary:hover {
    background-color: #2a6ce2;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(58, 134, 255, 0.6);
}

/* Hero playground CTA — same visual weight as .btn-primary, distinct inviting palette */
.btn-playground {
    background: linear-gradient(145deg, #14b8a6 0%, #0d9488 45%, #0f766e 100%);
    color: #f0fdfa;
    box-shadow:
        0 4px 18px rgba(13, 148, 136, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-playground:hover {
    background: linear-gradient(145deg, #2dd4bf 0%, #14b8a6 50%, #0d9488 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow:
        0 6px 24px rgba(13, 148, 136, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn-playground:active {
    transform: translateY(0);
    box-shadow: 0 2px 12px rgba(13, 148, 136, 0.35);
}

.btn-playground:focus-visible {
    outline: 3px solid rgba(45, 212, 191, 0.65);
    outline-offset: 3px;
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-dark);
    border: 2px solid var(--text-dark);
}

.btn-secondary:hover {
    background-color: rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

.btn-tertiary {
    background-color: rgba(255, 255, 255, 0.85);
    color: var(--primary);
    border: 2px solid var(--accent);
    box-shadow: 0 2px 10px rgba(58, 134, 255, 0.12);
}

.btn-tertiary:hover {
    background-color: rgba(58, 134, 255, 0.1);
    border-color: #2a6ce2;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(58, 134, 255, 0.2);
}

/* Sections */
.section {
    padding: 5rem 0;
}

.bg-light {
    background-color: #f1f5f9;
}

/* Grids */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

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

.flex-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.align-center { align-items: center; }
.flex-1 { flex: 1; min-width: 300px; }
.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* NEW Hero Section - Split Layout */
.hero {
    position: relative;
    min-height: 0;
    display: flex;
    align-items: center;
    background-color: #eceff3;
    background-image:
        linear-gradient(135deg, rgba(248, 249, 250, 0.94) 0%, rgba(233, 236, 239, 0.9) 100%),
        radial-gradient(#d1d5db 1px, transparent 1px);
    background-size: auto, 30px 30px;
    padding: 3rem 0 3.5rem;
    overflow: hidden;
    animation: heroGridDrift 55s linear infinite;
}

@keyframes heroGridDrift {
    to {
        background-position: 0 0, 30px 30px;
    }
}

.hero-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.hero-text {
    flex: 1;
    max-width: 640px;
    min-width: 0;
}

.hero h1 {
    font-size: 3rem;
    line-height: 1.12;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.hero h2 {
    font-size: 1.35rem;
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 1.25rem;
}

.hero-desc {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.hero-meta {
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 3px solid var(--accent);
}

.hero-logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem 1.1rem;
    margin: -0.35rem 0 1.55rem;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    background-color: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    width: fit-content;
    max-width: 100%;
}

.hero-logo {
    height: 34px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    flex: 0 0 auto;
    filter: drop-shadow(0 1px 2px rgba(27, 59, 111, 0.12));
}

/* Staggered copy reveal (checklist / pipeline metaphor) */
.hero-text--reveal.visible > h1,
.hero-text--reveal.visible > h2,
.hero-text--reveal.visible > .hero-desc,
.hero-text--reveal.visible > .hero-meta,
.hero-text--reveal.visible > .cta-group {
    animation: heroRevealLine 0.68s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.hero-text--reveal.visible > h1 {
    animation-delay: 0.06s;
}

.hero-text--reveal.visible > h2 {
    animation-delay: 0.14s;
}

.hero-text--reveal.visible > .hero-desc {
    animation-delay: 0.22s;
}

.hero-text--reveal.visible > .hero-meta {
    animation-delay: 0.3s;
}

.hero-text--reveal.visible > .cta-group {
    animation-delay: 0.38s;
}

@keyframes heroRevealLine {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.authors, .affiliation {
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
}

.authors {
    font-weight: 700;
}

.cta-group {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.75rem 1rem;
    max-width: 100%;
}

.cta-group .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    text-align: center;
    flex: 0 1 auto;
    min-height: 2.85rem;
    line-height: 1.3;
    padding: 0.75rem 1.35rem;
}

/* Same visual width as GitHub: equal flex share (content-only sizing was shrinking “Playground”) */
@media (min-width: 481px) {
    .hero .cta-group .btn-primary,
    .hero .cta-group .btn-playground {
        flex: 1 1 0;
        min-width: 12rem;
    }
}

/* Hero Visual Graphic (Mock Checklist) */
.hero-visual {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
}

/* Demo card: gentle float + “live review” glow (hero only) */
.hero .mock-doc--live {
    animation: heroDemoCardFloat 5.5s ease-in-out infinite, heroDemoCardGlow 3.8s ease-in-out infinite;
}

@keyframes heroDemoCardFloat {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-7px);
    }
}

@keyframes heroDemoCardGlow {
    0%,
    100% {
        box-shadow:
            0 22px 44px rgba(27, 59, 111, 0.12),
            0 0 0 1px rgba(58, 134, 255, 0.22);
    }

    50% {
        box-shadow:
            0 26px 50px rgba(58, 134, 255, 0.16),
            0 0 0 1px rgba(58, 134, 255, 0.38);
    }
}

.mock-doc {
    background: linear-gradient(180deg, #f5f9ff 0%, #ffffff 55%);
    width: 100%;
    max-width: 450px;
    border-radius: 14px;
    box-shadow:
        0 22px 44px rgba(27, 59, 111, 0.12),
        0 0 0 1px rgba(58, 134, 255, 0.22);
    padding: 1.75rem 1.5rem;
    border: 1px solid rgba(58, 134, 255, 0.28);
}

.mock-doc-heading {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.mock-doc-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    line-height: 1.35;
}

.mock-doc-continued {
    margin-top: 0.5rem;
    padding-top: 1rem;
    text-align: center;
    border-top: 1px dashed rgba(27, 59, 111, 0.12);
}

.mock-doc-continued-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
}

.mock-doc-continued-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.45;
    animation: mockDocDot 1.35s ease-in-out infinite;
}

.mock-doc-continued-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.mock-doc-continued-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes mockDocDot {
    0%,
    100% {
        opacity: 0.35;
        transform: scale(0.9);
    }

    50% {
        opacity: 0.95;
        transform: scale(1);
    }
}

.check-row {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1rem;
    padding: 1rem 1.05rem;
    border-radius: 10px;
    background: rgba(248, 249, 250, 0.95);
    border: 1px solid #e9ecef;
    position: relative;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.check-row:last-child {
    margin-bottom: 0;
}

.mock-doc-scene[data-hero-scene="review"] .hero-check-row:last-of-type {
    margin-bottom: 0;
}

.check-row:hover {
    border-color: rgba(58, 134, 255, 0.22);
    box-shadow: 0 6px 18px rgba(27, 59, 111, 0.06);
}

.check-box {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.check-row.done .check-box {
    background: var(--success);
    color: white;
}

.check-row.fail .check-box {
    background: var(--danger);
    color: white;
}

.check-row.active .check-box {
    background: rgba(58, 134, 255, 0.12);
    color: var(--accent);
}

.mock-doc--live .check-text {
    flex: 1;
    min-width: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    font-weight: 500;
    color: var(--text-dark);
}

.mock-doc--live .check-text em {
    font-style: normal;
    font-weight: 700;
    color: var(--primary);
}

.mock-doc--live .hero-check-row {
    animation: mockRowIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.mock-doc-scene[data-hero-scene="review"].is-active .hero-check-row:nth-child(2) {
    animation-delay: 0.06s;
}

.mock-doc-scene[data-hero-scene="review"].is-active .hero-check-row:nth-child(3) {
    animation-delay: 0.14s;
}

.mock-doc-scene[data-hero-scene="review"].is-active .hero-check-row:nth-child(4) {
    animation-delay: 0.22s;
}

@keyframes mockRowIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.check-row.active {
    animation: rowGlow 2.4s ease-in-out infinite;
}

.check-row.check-row--pending .check-box {
    background: rgba(233, 236, 239, 0.95);
    color: #adb5bd;
    border-radius: 50%;
}

.check-row.check-row--pending .check-icon-pending {
    font-size: 0.65rem;
}

.check-row.done .check-box,
.check-row.fail .check-box,
.check-row.active .check-box {
    border-radius: 8px;
}

/* Hero demo: multi-scene card */
.mock-doc--live {
    position: relative;
    overflow: hidden;
}

/* Faux pointer — hollow ring + dot (setup scene only) */
.hero-demo-cursor {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 55;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    pointer-events: none;
    opacity: 0;
    --cx: 22px;
    --cy: 22px;
    transform: translate3d(var(--cx), var(--cy), 0);
    transition:
        opacity 0.35s ease,
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-demo-cursor.is-visible {
    opacity: 1;
}

.hero-demo-cursor-core {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    transition: transform 0.12s ease;
}

.hero-demo-cursor.is-clicking .hero-demo-cursor-core {
    transform: scale(0.88);
}

.hero-demo-cursor-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    translate: -50% -50%;
    border-radius: 50%;
    pointer-events: none;
}

.hero-demo-cursor-ring--outer {
    width: 42px;
    height: 42px;
    border: 2px solid rgba(58, 134, 255, 0.42);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.95) inset,
        0 0 24px rgba(58, 134, 255, 0.22),
        0 4px 12px rgba(27, 59, 111, 0.12);
    animation: heroCursorRingBreathe 2.4s ease-in-out infinite;
}

.hero-demo-cursor-ring--inner {
    width: 28px;
    height: 28px;
    border: 1.5px solid rgba(27, 59, 111, 0.28);
    box-shadow: 0 0 0 1px rgba(58, 134, 255, 0.12) inset;
    animation: heroCursorRingBreathe 2.4s ease-in-out infinite;
    animation-delay: -0.65s;
}

.hero-demo-cursor-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 11px;
    height: 11px;
    margin: -5.5px 0 0 -5.5px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #ffffff 0%, #a8c9ff 38%, var(--accent) 72%, var(--primary) 100%);
    box-shadow:
        0 1px 3px rgba(27, 59, 111, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.65) inset;
    z-index: 2;
}

@keyframes heroCursorRingBreathe {
    0%,
    100% {
        opacity: 0.62;
    }

    50% {
        opacity: 1;
    }
}

.hero-demo-cursor-flash {
    animation: heroCursorTargetFlash 0.5s ease;
}

@keyframes heroCursorTargetFlash {
    0% {
        box-shadow: 0 0 0 0 rgba(58, 134, 255, 0.35);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(58, 134, 255, 0);
    }
}

.hero-demo-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.hero-demo-progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.28;
    transform: scale(0.92);
    transition: opacity 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

.hero-demo-progress-dot.is-active {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.22);
}

.mock-doc-scenes {
    position: relative;
    min-height: 380px;
}

.mock-doc-scene {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition:
        opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0.45s;
    pointer-events: none;
    z-index: 0;
}

.mock-doc-scene.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    z-index: 1;
}

.mock-doc-scene .mock-doc-heading {
    margin-bottom: 1.1rem;
    padding-bottom: 0.85rem;
}

.hero-demo-upload {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-demo-dropzone {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 1.05rem;
    border-radius: 10px;
    background: rgba(248, 249, 250, 0.95);
    border: 1px solid #e9ecef;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.hero-demo-dropzone--empty {
    border-style: dashed;
    border-color: #c5cdd6;
}

.hero-demo-dropzone--empty .hero-demo-dropzone-icon {
    background: rgba(58, 134, 255, 0.08);
    color: var(--accent);
}

.hero-demo-drop-hint {
    margin: 0;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-muted);
    line-height: 1.35;
}

.hero-demo-filename--hidden {
    display: none;
}

.hero-demo-upload-meta--hidden {
    display: none;
}

.hero-demo-badge--hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.hero-demo-dropzone--uploading {
    border-style: solid;
    border-color: rgba(58, 134, 255, 0.45);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.75),
        0 0 0 1px rgba(58, 134, 255, 0.12),
        0 8px 24px rgba(58, 134, 255, 0.08);
}

.hero-demo-dropzone-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(217, 4, 41, 0.08);
    color: var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.hero-demo-dropzone-body {
    flex: 1;
    min-width: 0;
}

.hero-demo-filename {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-demo-dropzone-meta {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-demo-upload-bar {
    display: inline-block;
    width: 44px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(58, 134, 255, 0.15), var(--accent));
    position: relative;
    overflow: hidden;
}

.hero-demo-upload-bar--busy {
    width: 72px;
    background: rgba(58, 134, 255, 0.2);
}

.hero-demo-upload-bar--busy::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 38%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), #5aa9ff);
    animation: heroUploadProgress 2.2s ease-in-out infinite;
}

.hero-demo-upload-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85), transparent);
    transform: translateX(-100%);
    animation: heroUploadShimmer 1.6s ease-in-out infinite;
}

.hero-demo-upload-bar--busy::after {
    animation-duration: 1.25s;
}

@keyframes heroUploadShimmer {
    100% {
        transform: translateX(100%);
    }
}

@keyframes heroUploadProgress {
    0% {
        transform: translateX(-100%);
        opacity: 0.85;
    }

    55% {
        opacity: 1;
    }

    100% {
        transform: translateX(220%);
        opacity: 0.9;
    }
}

.hero-demo-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    flex-shrink: 0;
    color: #fff;
    background: var(--success);
    box-shadow: 0 6px 14px rgba(56, 176, 0, 0.28);
    transition: background 0.35s ease, box-shadow 0.35s ease, transform 0.2s ease;
}

.hero-demo-badge--upload {
    background: linear-gradient(145deg, var(--accent), #2a6ce2);
    box-shadow: 0 6px 16px rgba(58, 134, 255, 0.35);
    font-size: 0.68rem;
}

.hero-demo-badge--upload i {
    animation: heroBadgeNudge 1.1s ease-in-out infinite;
}

@keyframes heroBadgeNudge {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2px);
    }
}

.hero-demo-fields {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hero-demo-field-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.32rem;
}

.hero-demo-dd {
    position: relative;
    z-index: 2;
}

.hero-demo-dd.is-open {
    z-index: 60;
}

.hero-demo-dd-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.52rem 0.65rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    background: #fff;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
    cursor: default;
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hero-demo-dd.is-open .hero-demo-dd-trigger {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(58, 134, 255, 0.2);
}

.hero-demo-dd-chevron {
    font-size: 0.62rem;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.22s ease;
}

.hero-demo-dd.is-open .hero-demo-dd-chevron {
    transform: rotate(180deg);
}

.hero-demo-dd-menu {
    list-style: none;
    margin: 0.3rem 0 0;
    padding: 0.28rem;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 14px 32px rgba(27, 59, 111, 0.14);
    display: none;
}

.hero-demo-dd.is-open .hero-demo-dd-menu {
    display: block;
}

.hero-demo-dd-menu li {
    margin: 0;
    padding: 0;
}

.hero-demo-dd-option {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-dark);
    padding: 0.48rem 0.5rem;
    border-radius: 6px;
    cursor: default;
    transition: background 0.15s ease, color 0.15s ease;
}

.hero-demo-dd-option:hover,
.hero-demo-dd-option.is-picked {
    background: rgba(58, 134, 255, 0.12);
    color: var(--primary);
}

.hero-demo-cta {
    margin-top: 0.15rem;
    width: 100%;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-light);
    background: linear-gradient(135deg, var(--accent) 0%, #2a6ce2 100%);
    padding: 0.85rem 1rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    box-shadow: 0 10px 26px rgba(58, 134, 255, 0.35);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.hero-demo-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(58, 134, 255, 0.42);
    filter: brightness(1.03);
}

.hero-demo-cta:active {
    transform: translateY(0);
}

.hero-demo-cta.is-simulated-press {
    transform: translateY(1px) scale(0.985);
    box-shadow: 0 6px 18px rgba(58, 134, 255, 0.32);
    filter: brightness(0.98);
}

.hero-demo-cta:focus-visible {
    outline: 3px solid rgba(58, 134, 255, 0.45);
    outline-offset: 3px;
}

.hero-demo-cta.is-busy {
    pointer-events: none;
    opacity: 0.92;
}

.hero-demo-cta-icon {
    font-size: 0.85rem;
    transition: transform 0.25s ease;
}

.hero-demo-cta:hover .hero-demo-cta-icon {
    transform: translateX(3px);
}

.mock-doc-continued--hero {
    margin-top: 1rem;
    padding-top: 0.95rem;
    text-align: left;
    border-top: 1px dashed rgba(27, 59, 111, 0.12);
}

.hero-demo-hint {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--text-muted);
    font-weight: 500;
}

.hero-demo-analysis {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hero-demo-stat {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.15rem 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: rgba(248, 249, 250, 0.95);
    border: 1px solid #e9ecef;
    align-items: center;
}

.hero-demo-stat-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
}

.hero-demo-stat-value {
    grid-row: 1 / span 2;
    grid-column: 2;
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.hero-demo-stat-sub {
    grid-column: 1 / -1;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.hero-demo-stat--pass .hero-demo-stat-value {
    color: var(--success);
}

.hero-demo-stat--warn .hero-demo-stat-value {
    color: var(--danger);
}

.hero-demo-stat--score {
    grid-template-columns: 1fr;
}

.hero-demo-stat--score .hero-demo-stat-label {
    grid-column: 1;
}

.hero-demo-meter {
    margin-top: 0.35rem;
    height: 8px;
    border-radius: 999px;
    background: rgba(27, 59, 111, 0.08);
    overflow: hidden;
}

.hero-demo-meter-fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), #5aa9ff);
    transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.mock-doc-scene[data-hero-scene="analysis"].is-active .hero-demo-meter-fill {
    width: calc(var(--score, 0.67) * 100%);
}

.hero-demo-stat--score .hero-demo-stat-sub {
    margin-top: 0.35rem;
}

@keyframes rowGlow {
    0%,
    100% {
        box-shadow: 0 0 0 1px rgba(58, 134, 255, 0.12);
    }
    50% {
        box-shadow:
            0 0 0 1px rgba(58, 134, 255, 0.35),
            0 8px 28px rgba(58, 134, 255, 0.12);
    }
}

@media (prefers-reduced-motion: reduce) {
    .mock-doc--live .hero-check-row {
        animation: none;
    }

    .check-row.active {
        animation: none;
    }

    .check-row .fa-spin {
        animation: none;
    }

    .mock-doc-continued-dots span {
        animation: none;
        opacity: 0.55;
        transform: none;
    }

    .hero {
        animation: none;
    }

    .hero .mock-doc--live {
        animation: none;
    }

    .mock-doc-scene {
        transition: none;
        transform: none;
    }

    .hero-demo-upload-bar::after,
    .hero-demo-upload-bar--busy::before {
        animation: none;
    }

    .hero-demo-badge--upload i {
        animation: none;
    }

    .hero-demo-cursor {
        transition: none;
    }

    .hero-demo-cursor-ring--outer,
    .hero-demo-cursor-ring--inner {
        animation: none;
        opacity: 0.95;
        transform: none;
    }

    .hero-demo-dd-chevron {
        transition: none;
    }

    .hero-demo-meter-fill {
        transition: none;
    }

    .hero-text--reveal.visible > h1,
    .hero-text--reveal.visible > h2,
    .hero-text--reveal.visible > .hero-desc,
    .hero-text--reveal.visible > .hero-meta,
    .hero-text--reveal.visible > .cta-group {
        animation: none;
        opacity: 1;
        transform: none;
    }
}


/* Cards */
.card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

/* Motivation Cards */
.motivation-card h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.status {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}
.status.bad { background: #ffe3e3; color: var(--danger); }
.status.good { background: #d3f9d8; color: var(--success); }

.motivation-card.highlight {
    background: linear-gradient(145deg, #ffffff, #f0f7ff);
    border: 2px solid var(--accent);
    position: relative;
    overflow: hidden;
    animation: motivationFeaturedFloat 5.8s ease-in-out infinite;
}

.motivation-card.highlight::after {
    content: '';
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle at 30% 20%, rgba(58, 134, 255, 0.18), transparent 55%);
    opacity: 0.9;
    pointer-events: none;
    animation: motivationFeaturedGlow 3.6s ease-in-out infinite;
}

.motivation-workflow-container {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.motivation-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    align-items: stretch;
}

.motivation-card.clickable {
    cursor: pointer;
    text-align: center;
}

.motivation-card.clickable:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

@keyframes motivationFeaturedFloat {
    0%,
    100% {
        transform: translateY(0);
        box-shadow:
            0 4px 15px rgba(0,0,0,0.03),
            0 0 0 0 rgba(58, 134, 255, 0.0);
    }
    50% {
        transform: translateY(-6px);
        box-shadow:
            0 14px 32px rgba(27, 59, 111, 0.08),
            0 0 0 4px rgba(58, 134, 255, 0.14);
    }
}

@keyframes motivationFeaturedGlow {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 0.75;
    }
    50% {
        transform: translate3d(0, 0, 0) scale(1.06);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .motivation-card.highlight {
        animation: none;
        transform: none;
    }

    .motivation-card.highlight::after {
        animation: none;
    }
}

/* Hand pointer for any control that opens a modal */
.card.clickable,
.component-card.clickable {
    cursor: pointer;
}

.designer-hit {
    cursor: pointer;
}

.text-muted {
    color: var(--text-muted);
}

/* Component Cards */
.component-card {
    text-align: center;
    padding-top: 3rem;
    position: relative;
}

.step-num {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 5rem;
    font-weight: 800;
    color: rgba(0,0,0,0.04);
    z-index: 0;
}

.component-card > * { position: relative; z-index: 1; }

/* Interactive Diagram */
.interactive-diagram {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.diagram-node {
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    background: var(--bg-light);
    border: 2px solid #e9ecef;
}

.core-node {
    background: #fff;
    border-color: var(--primary);
    padding-bottom: 2.5rem;
    position: relative;
}

.agent-cluster {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.4rem;
}

.agent {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.agent.github { background: #333; }
.agent.material { background: #ffca28; color: #333; }
.agent.db { background: #ef476f; }

/* Feature List */
.feature-list { list-style: none; }
.feature-list li { margin-bottom: 0.8rem; font-size: 1.05rem; display: flex; align-items: center; gap: 0.8rem; }
.icon-large { font-size: 2.5rem; margin-bottom: 1rem; }

/* Diagrams */
.responsive-diagram {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.diagram-wrapper {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

/* Interactive designer panel (replaces static diagram image) */
.designer-interactive-wrap {
    text-align: left;
    max-width: 1100px;
}

.designer-interactive-lead {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    text-align: center;
}

.designer-interactive-grid {
    display: block;
}

/* Review Process box + agentic card as siblings (card sits outside the bordered canvas) */
.designer-review-assembly {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 1rem 1.35rem;
    min-width: 0;
}

.designer-review-assembly .designer-canvas {
    flex: 1 1 420px;
    min-width: 260px;
}

.designer-agentic-aside {
    display: flex;
    flex-direction: column;
    flex: 0 1 260px;
    min-width: 220px;
    max-width: 280px;
}

.designer-agentic-aside .designer-agentic-card {
    flex: 1;
    width: 100%;
}

.designer-canvas {
    background: linear-gradient(165deg, #d8e6f5 0%, #e5eef9 40%, #dbe7f5 100%);
    border: 1px solid var(--primary);
    border-radius: 12px;
    box-shadow: 0 14px 36px rgba(27, 59, 111, 0.12);
    overflow: hidden;
}

.designer-window-tab {
    display: inline-block;
    margin: 0;
    padding: 0.5rem 1.25rem;
    background: var(--primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 0 0 12px 0;
    border-top-left-radius: 10px;
}

/* Inside Review Process box only: [ Input ] → [ Question reviewer → Output ] */
.designer-window-body {
    display: grid;
    grid-template-columns: auto 1.75rem minmax(220px, 1fr);
    gap: 0.35rem 0.45rem;
    padding: 1.35rem 1.5rem 1.65rem;
    align-items: center;
}

.designer-stage--input {
    justify-self: end;
}

.designer-stage--arrow-h {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #868e96;
    font-size: 1.05rem;
}

.designer-stage--center {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.45rem 0.5rem;
    justify-self: stretch;
}

.designer-stage--arrow-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #868e96;
    font-size: 1.05rem;
    flex-shrink: 0;
    padding: 0 0.15rem;
}

.designer-node {
    border-radius: 10px;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    line-height: 1.3;
    min-width: 5.75rem;
}

.designer-node--io {
    background: #e9ecef;
    border: 1px solid #c5cdd6;
    padding: 0.7rem 0.85rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.designer-node--io i {
    display: block;
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.designer-node--io .fa-file-pdf {
    color: #d90429;
}

.designer-node--out .fa-file-lines {
    color: var(--accent);
}

.designer-node-sub {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.designer-node--core {
    width: auto;
    flex: 0 1 280px;
    max-width: 300px;
    background: #fff;
    border: 2px solid var(--primary);
    padding: 0.85rem 0.9rem 1rem;
    box-shadow: 0 8px 24px rgba(27, 59, 111, 0.1);
}

.designer-node--out {
    flex-shrink: 0;
    align-self: center;
}

.designer-core-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--primary);
}

.designer-core-head i {
    font-size: 1.2rem;
    color: var(--accent);
}

.designer-agent-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #adb5bd;
}

.designer-agent-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    border: 2px solid transparent;
    cursor: default;
    color: #fff;
}

.designer-agent-chip i {
    font-size: 0.85rem;
}

.designer-agent-chip--github {
    background: #24292f;
    color: #fff;
}

.designer-agent-chip--github i {
    color: #fff;
}

.designer-agent-chip--material {
    background: #ffd43b;
    color: var(--primary);
    border: 2px solid var(--accent);
}

.designer-agent-chip--material i {
    color: var(--accent);
}

.designer-agent-chip--db {
    background: #d63384;
    color: #fff;
}

.designer-agent-chip--db i {
    color: #a5d8ff;
}

.designer-hit.designer-agent-chip {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.designer-hit.designer-agent-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.designer-hit.designer-agent-chip:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.designer-hit.is-selected {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--accent);
}

.designer-agent-more {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    border: 1px dashed #ced4da;
    border-radius: 8px;
    background: #f8f9fa;
}

.designer-agentic-card {
    flex: 1;
    width: 100%;
    margin: 0;
    text-align: left;
    padding: 1rem 1.05rem 1.1rem;
    border-radius: 12px;
    border: 1px solid rgba(251, 133, 0, 0.55);
    background: linear-gradient(180deg, #fff4e6 0%, #ffe8cc 100%);
    cursor: pointer;
    font: inherit;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    display: flex;
    flex-direction: column;
    animation: designerAgenticVibrate 2.8s linear infinite;
}

.designer-agentic-card:hover {
    border-color: var(--warning);
    box-shadow: 0 10px 28px rgba(251, 133, 0, 0.18);
    transform: translateY(-2px) scale(1.01);
}

.designer-agentic-card:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.designer-agentic-card.is-selected {
    border-color: var(--warning);
    box-shadow: 0 0 0 3px rgba(251, 133, 0, 0.22);
}

.designer-agentic-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.35;
}

.designer-agentic-hint {
    display: block;
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-weight: 500;
}

@keyframes designerAgenticVibrate {
    /* Rest */
    0%,
    72%,
    100% {
        transform: translate3d(0, 0, 0) rotate(0deg);
    }

    /* Quick vibration burst (phone-call style) */
    74% { transform: translate3d(-1px, 0, 0) rotate(-0.9deg); }
    75% { transform: translate3d( 1px, 0, 0) rotate( 0.9deg); }
    76% { transform: translate3d(-2px, 0, 0) rotate(-1.4deg); }
    77% { transform: translate3d( 2px, 0, 0) rotate( 1.4deg); }
    78% { transform: translate3d(-2px, 0, 0) rotate(-1.4deg); }
    79% { transform: translate3d( 2px, 0, 0) rotate( 1.4deg); }
    80% { transform: translate3d(-1px, 0, 0) rotate(-0.9deg); }
    81% { transform: translate3d( 1px, 0, 0) rotate( 0.9deg); }
    82% { transform: translate3d(0, 0, 0) rotate(0deg); }
}

@media (prefers-reduced-motion: reduce) {
    .designer-agentic-card {
        animation: none;
        transform: none;
    }
}

.designer-mini-graph {
    margin-top: 0.65rem;
    padding: 0.5rem 0;
}

.designer-mini-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.designer-mini-row--bottom {
    gap: 0.45rem;
    margin-top: 0.15rem;
}

.mini-node {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.85;
}

.mini-node--accent {
    background: var(--accent);
    opacity: 1;
}

.mini-node--sm {
    width: 11px;
    height: 11px;
    background: #868e96;
    opacity: 1;
}

.mini-link {
    font-size: 0.55rem;
    color: #868e96;
}

.designer-mini-fork {
    text-align: center;
    font-size: 0.65rem;
    color: #adb5bd;
    margin: 0.15rem 0;
}

@media (max-width: 820px) {
    .designer-review-assembly {
        flex-direction: column;
        align-items: stretch;
    }

    .designer-review-assembly .designer-canvas {
        flex: 1 1 auto;
    }

    .designer-agentic-aside {
        flex: 1 1 auto;
        max-width: none;
    }

    .designer-window-body {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 0.65rem;
    }

    .designer-stage--input {
        justify-self: center;
    }

    .designer-stage--arrow-h {
        transform: rotate(90deg);
        padding: 0.15rem 0;
    }

    .designer-stage--center {
        width: 100%;
        max-width: 340px;
    }
}

/* Poster Viewer */
.poster-host-link {
    display: inline-block;
    color: inherit;
    text-decoration: none;
}

.poster-host-link:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
    border-radius: 999px;
}

.poster-host {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.65rem 0.95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    margin: 0 auto 1.25rem;
    max-width: 100%;
    transform-origin: center;
    animation: posterHostFloat 5.25s ease-in-out infinite;
}

.poster-host-link:hover .poster-host {
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
    transform: translateY(-2px);
}

.poster-host-label {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    white-space: nowrap;
}

.poster-host-logo {
    height: 34px;
    width: auto;
    max-width: min(260px, 70vw);
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.12));
}

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

.poster-actions {
    margin-top: 1.1rem;
    display: flex;
    justify-content: center;
}

.poster-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 2.85rem;
    padding: 0.75rem 1.35rem;
}

.poster-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.poster-thumbnail { width: 100%; display: block; transition: transform 0.5s ease; }
.poster-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(27, 59, 111, 0.8);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.5rem; opacity: 0; transition: opacity 0.3s;
}
.poster-container:hover .poster-overlay { opacity: 1; }
.poster-container:hover .poster-thumbnail { transform: scale(1.02); }

/* Modal — light frosted backdrop */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    padding: 1.5rem;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    background-color: rgba(232, 240, 252, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.lightbox {
    width: 100%;
    max-width: 1200px;
    margin: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.lightbox-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
}

.lightbox-btn {
    border: 1px solid rgba(15, 23, 42, 0.14);
    background: #fff;
    color: var(--primary);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.lightbox-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(27, 59, 111, 0.12);
    background: rgba(58, 134, 255, 0.06);
}

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

.lightbox-btn:focus-visible {
    outline: 3px solid rgba(58, 134, 255, 0.45);
    outline-offset: 3px;
}

.lightbox-help {
    margin-left: 0.35rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
}

.lightbox-viewport {
    position: relative;
    border-radius: 16px;
    overflow: auto;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow:
        0 8px 32px rgba(27, 59, 111, 0.12),
        0 32px 64px rgba(27, 59, 111, 0.18);
    height: min(72vh, 860px);
    touch-action: none;
    cursor: grab;
    overscroll-behavior: contain;
    padding: var(--lb-pad-y, 0px) var(--lb-pad-x, 0px);
}

.lightbox-viewport:active {
    cursor: grabbing;
}

.lightbox-img {
    position: relative;
    left: 0;
    top: 0;
    transform-origin: 0 0;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
    max-width: none;
    max-height: none;
    width: auto;
    height: auto;
    will-change: transform;
}

.lightbox-close {
    position: fixed;
}

#imageModal .close.lightbox-close {
    top: 1.25rem;
    right: 1.5rem;
}

.close i {
    font-size: 1.1rem;
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 1000px;
    border-radius: 4px;
    animation: zoom 0.3s ease;
}

.close {
    position: fixed;
    top: 1.25rem;
    right: 1.5rem;
    z-index: 1001;
    color: var(--primary);
    font-size: 2.25rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 20px rgba(27, 59, 111, 0.12);
    transition: background 0.2s ease, transform 0.2s ease;
}

.close:hover {
    background: #fff;
    transform: scale(1.05);
}

#imageModal .close {
    position: fixed;
}

/* Info / detail dialog (toolkit & motivation cards) */
.modal.info-modal {
    padding: 1.5rem;
    align-items: center;
    justify-content: center;
}

.modal.info-modal .info-content {
    position: relative;
    margin: 0;
    display: block;
    width: 100%;
    max-width: 540px;
    background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
    color: var(--text-dark);
    padding: 2.5rem 2.25rem 2.25rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow:
        0 4px 24px rgba(27, 59, 111, 0.07),
        0 20px 50px rgba(27, 59, 111, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    overflow: hidden;
}

.modal.info-modal .info-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 20px 20px 0 0;
}

.modal.info-modal .info-content .close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-muted);
    background: rgba(241, 245, 249, 0.9);
    box-shadow: none;
    border-radius: 10px;
}

.modal.info-modal .info-content .close:hover {
    color: var(--text-dark);
    background: #e2e8f0;
    transform: none;
}

.modal.info-modal .modal-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.35rem;
    padding: 0.35rem 2.75rem 0 0;
}

.modal.info-modal .modal-header h2 {
    margin: 0;
    font-size: 1.45rem;
    letter-spacing: -0.02em;
    color: var(--primary);
    line-height: 1.25;
}

.modal.info-modal .modal-icon {
    font-size: 2.15rem;
    line-height: 1;
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 12px;
    background: rgba(58, 134, 255, 0.08);
}

.modal.info-modal .modal-body {
    font-size: 1.04rem;
    line-height: 1.68;
    color: var(--text-muted);
    padding-top: 0.25rem;
    border-top: 1px solid rgba(27, 59, 111, 0.08);
}

.modal.info-modal .modal-body p {
    margin: 0;
    padding-top: 1rem;
}

.modal.info-modal .modal-body strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* Playground gate — external demo disclosure */
.playground-gate-modal {
    padding: 1.25rem;
    align-items: center;
    justify-content: center;
    background-color: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.playground-gate-panel {
    position: relative;
    width: 100%;
    max-width: 26.5rem;
    margin: 0 auto;
    padding: 2.35rem 1.85rem 1.85rem;
    border-radius: 1.35rem;
    background:
        linear-gradient(155deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 250, 252, 0.98) 45%, rgba(241, 245, 249, 0.99) 100%);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow:
        0 0 0 1px rgba(58, 134, 255, 0.06),
        0 24px 48px rgba(27, 59, 111, 0.14),
        0 8px 16px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    animation: zoom 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.playground-gate-glow {
    position: absolute;
    inset: -45% -30% auto;
    height: 75%;
    background:
        radial-gradient(ellipse 70% 60% at 30% 20%, rgba(58, 134, 255, 0.22) 0%, transparent 55%),
        radial-gradient(ellipse 55% 50% at 85% 35%, rgba(99, 102, 241, 0.14) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: playgroundGateGlow 14s ease-in-out infinite;
}

.playground-gate-modal .playground-gate-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 3;
    width: 2.45rem;
    height: 2.45rem;
    margin: 0;
    padding: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(241, 245, 249, 0.95);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    border-radius: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.playground-gate-modal .playground-gate-close:hover {
    color: var(--text-dark);
    background: #fff;
    transform: scale(1.04);
}

.playground-gate-header {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 0.25rem;
}

.playground-gate-icon-ring {
    width: 4.25rem;
    height: 4.25rem;
    margin: 0 auto 1.15rem;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--accent) 0%, #6366f1 50%, #22d3ee 100%);
    box-shadow:
        0 12px 28px rgba(58, 134, 255, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.playground-gate-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    font-size: 1.65rem;
    color: var(--accent);
}

.playground-gate-kicker {
    margin: 0 0 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

.playground-gate-title {
    margin: 0 0 0.85rem;
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--primary);
}

.playground-gate-lead {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-muted);
    text-align: left;
}

.playground-gate-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.5rem;
    justify-content: stretch;
}

.playground-gate-actions .btn {
    flex: 1 1 calc(50% - 0.35rem);
    min-width: min(100%, 10rem);
    min-height: 2.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.75rem 1rem;
    font-size: 0.92rem;
}

.playground-gate-actions .playground-gate-confirm {
    flex: 1 1 100%;
    order: -1;
    box-shadow: 0 6px 20px rgba(58, 134, 255, 0.38);
}

@media (min-width: 420px) {
    .playground-gate-actions .playground-gate-confirm {
        flex: 1 1 auto;
        order: 0;
    }

    .playground-gate-actions .playground-gate-cancel {
        flex: 1 1 auto;
    }
}

@keyframes playgroundGateGlow {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(4%, -3%) scale(1.05);
        opacity: 0.92;
    }
}

@media (prefers-reduced-motion: reduce) {
    .playground-gate-panel {
        animation-duration: 0.01ms;
    }

    .playground-gate-glow {
        animation: none;
    }
}

@keyframes zoom { from {transform:scale(0.95); opacity:0} to {transform:scale(1); opacity:1} }

/* Footer */
.footer { background: var(--primary); color: rgba(255,255,255,0.8); padding: 3rem 0 1rem; }
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 1.5rem; margin-bottom: 1rem; }
.footer-brand h3 { color: #fff; margin-bottom: 0.5rem; }
.footer-links a { color: #fff; margin-left: 1rem; }
.footer-bottom { text-align: center; font-size: 0.85rem; }

/* Animations */
.fade-in, .fade-in-up, .fade-in-left, .fade-in-right, .slide-up { opacity: 0; will-change: opacity, transform; }
.fade-in.visible { animation: fadeIn 0.6s forwards; }
.fade-in-up.visible { animation: fadeInUp 0.6s forwards; }
.fade-in-left.visible { animation: fadeInLeft 0.6s forwards; }
.fade-in-right.visible { animation: fadeInRight 0.6s forwards; }
.slide-up.visible { animation: slideUp 0.6s forwards; }
.delay-1 { animation-delay: 0.2s !important; }
.delay-2 { animation-delay: 0.4s !important; }
.delay-3 { animation-delay: 0.6s !important; }
.delay-4 { animation-delay: 0.8s !important; }

@keyframes fadeIn { to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInLeft { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* Responsive */
@media (max-width: 1024px) {
    .hero-split { flex-direction: column; text-align: center; }
    .hero-text { max-width: 100%; }
    .hero-meta { border-left: none; padding-left: 0; }
    .hero-logos {
        margin-left: auto;
        margin-right: auto;
        justify-content: center;
        width: auto;
    }
    .cta-group {
        justify-content: center;
        max-width: 32rem;
        margin-left: auto;
        margin-right: auto;
    }

    .cta-group .btn {
        flex: 1 1 auto;
        min-width: 12rem;
    }

    .hero { padding: 2.75rem 0 3rem; }
    .hero h1 { font-size: 2.5rem; }
}

/* Tablet / mid-size: keep hero demo comfortably wide */
@media (min-width: 481px) and (max-width: 1024px) {
    .hero-visual {
        width: 100%;
    }

    .mock-doc {
        max-width: min(560px, calc(100vw - 4rem));
    }
}

@media (max-width: 480px) {
    /* Let the hero demo keep its intended proportions on very small screens */
    .hero .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero-visual {
        width: 100%;
    }

    .mock-doc {
        width: 100%;
        max-width: min(450px, calc(100vw - 2rem));
    }

    .cta-group .btn {
        flex: 1 1 100%;
        min-width: 0;
    }

    .hero-logo {
        height: 28px;
        max-width: 132px;
    }

    .poster-host {
        padding: 0.55rem 0.8rem;
        gap: 0.55rem;
    }

    .poster-host-logo {
        height: 30px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .poster-host {
        animation: none;
    }
}