:root {
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
    
    /* Light Mode Colors */
    --background-light: #f8fafc;
    --text-light: rgba(15, 23, 42, 0.9);
    --primary-light: #0f7ad8;
    --card-background-light: #ffffff;
    --border-light: rgba(15, 23, 42, 0.12);

    /* Dark Mode Colors */
    --background-dark: #090b0d;
    --text-dark: rgba(248, 250, 252, 0.92);
    --primary-dark: #5bb2ff;
    --card-background-dark: #0f1216;
    --border-dark: rgba(248, 250, 252, 0.08);

    --radius: 8px;
}

body {
    font-family: var(--font-sans);
}

.site-shell {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(248,250,252,0.72) 38%, rgba(241,245,249,0.92) 100%),
        linear-gradient(135deg, rgba(14,165,233,0.12) 0%, rgba(16,185,129,0.10) 42%, rgba(244,63,94,0.08) 100%);
}

.dark .site-shell {
    background:
        linear-gradient(180deg, rgba(16,20,25,0.94) 0%, rgba(15,23,42,0.86) 42%, rgba(12,16,22,0.98) 100%),
        linear-gradient(135deg, rgba(91,178,255,0.12) 0%, rgba(52,211,153,0.08) 48%, rgba(251,113,133,0.08) 100%);
}

.feature-card {
    min-height: 17rem;
}

.product-frame img {
    transform: translateZ(0);
}

.hero-demo {
    position: relative;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 24px 80px -38px rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.dark .hero-demo {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.44);
}

.hero-demo-tabs {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 30;
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
}

.dark .hero-demo-tabs {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.78);
}

.hero-demo-tab {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 9px;
    border-radius: 6px;
    color: rgba(71, 85, 105, 0.92);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.dark .hero-demo-tab {
    color: rgba(226, 232, 240, 0.78);
}

.hero-demo-tab.is-active {
    background: var(--primary-light);
    color: white;
}

.dark .hero-demo-tab.is-active {
    background: var(--primary-dark);
    color: #07111f;
}

.hero-demo-stage {
    position: relative;
    width: 100%;
    min-width: 0;
    /* Unified across all hero-demo modes (text / file / drag / ocr).
       Slightly taller than 16:10 so the framed text + result blocks all fit
       comfortably without the Mac window having to clip its own children. */
    aspect-ratio: 16 / 12.4;
    min-height: 480px;
    background:
        linear-gradient(135deg, rgba(226, 232, 240, 0.9), rgba(248, 250, 252, 0.86)),
        linear-gradient(135deg, rgba(14, 165, 233, 0.14), rgba(16, 185, 129, 0.10));
}

.dark .hero-demo-stage {
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.9)),
        linear-gradient(135deg, rgba(91, 178, 255, 0.14), rgba(52, 211, 153, 0.08));
}

.hero-demo-panel {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(10px) scale(0.985);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.hero-demo-panel.is-active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.hero-mac-window {
    position: absolute;
    left: 5.2%;
    right: 5.2%;
    /* Shared inset for every channel so all four "Mac windows" feel uniform. */
    top: 9%;
    bottom: 6%;
    overflow: hidden;
    z-index: 1; /* keep window beneath all floating popovers */
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.26);
}

.dark .hero-mac-window {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.94);
}

.hero-titlebar {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(248, 250, 252, 0.78);
}

.dark .hero-titlebar {
    border-bottom-color: rgba(255, 255, 255, 0.1);
    background: rgba(30, 41, 59, 0.74);
}

.hero-traffic {
    display: flex;
    gap: 6px;
}

.hero-traffic span {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #ff5f57;
}

.hero-traffic span:nth-child(2) {
    background: #febc2e;
}

.hero-traffic span:nth-child(3) {
    background: #28c840;
}

.hero-window-title {
    font-size: 11px;
    font-weight: 800;
    color: rgba(15, 23, 42, 0.72);
}

.dark .hero-window-title {
    color: rgba(226, 232, 240, 0.8);
}

.hero-title-icons {
    display: flex;
    gap: 8px;
    color: rgba(100, 116, 139, 0.9);
}

.hero-title-icons .material-symbols-outlined {
    font-size: 16px;
}

.hero-notes-body,
.hero-finder-body {
    display: grid;
    min-width: 0;
    height: calc(100% - 36px);
}

.hero-notes-body {
    grid-template-columns: 26% 27% 1fr;
}

.hero-finder-body {
    grid-template-columns: 25% 43% 1fr;
}

.hero-notes-sidebar,
.hero-finder-sidebar {
    padding: 14px 9px;
    border-right: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(226, 232, 240, 0.58);
}

.dark .hero-notes-sidebar,
.dark .hero-finder-sidebar {
    border-right-color: rgba(255, 255, 255, 0.08);
    background: rgba(30, 41, 59, 0.54);
}

.hero-sidebar-row {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    border-radius: 6px;
    padding: 6px 8px;
    color: rgba(71, 85, 105, 0.86);
    font-size: 11px;
    font-weight: 700;
}

.hero-sidebar-row.is-active {
    background: rgba(255, 255, 255, 0.72);
    color: rgba(15, 23, 42, 0.9);
}

.dark .hero-sidebar-row {
    color: rgba(203, 213, 225, 0.74);
}

.dark .hero-sidebar-row.is-active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.hero-notes-list {
    min-width: 0;
    padding: 14px 10px;
    border-right: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(248, 250, 252, 0.82);
}

.dark .hero-notes-list {
    border-right-color: rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.74);
}

.hero-note-card {
    margin-bottom: 8px;
    border-radius: 6px;
    padding: 8px;
    color: rgba(71, 85, 105, 0.86);
    font-size: 11px;
}

.hero-note-card strong,
.hero-note-card span {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.hero-note-card span {
    margin-top: 3px;
    color: rgba(100, 116, 139, 0.72);
    font-size: 10px;
}

.hero-note-card.is-active {
    background: #f5b335;
    color: #1f2937;
}

.hero-note-card.is-active span {
    color: rgba(31, 41, 55, 0.62);
}

.hero-editor {
    position: relative;
    min-width: 0;
    padding: 38px 26px;
    background: rgba(255, 255, 255, 0.88);
}

.dark .hero-editor {
    background: rgba(2, 6, 23, 0.66);
}

.hero-editor-date {
    margin-bottom: 20px;
    color: rgba(100, 116, 139, 0.68);
    font-size: 10px;
    text-align: center;
}

.hero-text-line {
    position: relative;
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    margin: 14px 0;
    padding: 4px 5px;
    border-radius: 2px;
    color: rgba(15, 23, 42, 0.92);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.25;
}

.dark .hero-text-line {
    color: rgba(248, 250, 252, 0.94);
}

.hero-text-highlight {
    position: absolute;
    inset: 3px auto 3px 0;
    z-index: 0;
    width: 0;
    border-radius: 2px;
    background: rgba(15, 122, 216, 0.28);
    transition: width 0.82s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-text-content {
    position: relative;
    z-index: 1;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-text-cursor {
    position: absolute;
    z-index: 50;
    width: 2px;
    height: 22px;
    opacity: 0;
    border-radius: 2px;
    background: var(--primary-light);
    transition: left 0.82s cubic-bezier(0.22, 1, 0.36, 1), top 0.22s ease, opacity 0.18s ease;
}

.dark .hero-text-cursor {
    background: var(--primary-dark);
}

.hero-text-cursor.is-visible {
    opacity: 1;
    animation: blink 1s step-end infinite;
}

.hero-context-toolbar {
    position: absolute;
    z-index: 60;
    width: 190px;
    padding: 5px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.2);
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.dark .hero-context-toolbar {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.94);
}

.hero-context-toolbar.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.hero-toolbar-action {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 9px;
    border-radius: 6px;
    padding: 7px 8px;
    color: rgba(30, 41, 59, 0.9);
    font-size: 11px;
    font-weight: 800;
    text-align: left;
}

.dark .hero-toolbar-action {
    color: rgba(226, 232, 240, 0.88);
}

.hero-toolbar-action .material-symbols-outlined {
    font-size: 17px;
    color: var(--primary-light);
}

.dark .hero-toolbar-action .material-symbols-outlined {
    color: var(--primary-dark);
}

.hero-toolbar-action.is-armed,
.hero-toolbar-action.is-primary.is-armed {
    background: rgba(15, 122, 216, 0.12);
    color: var(--primary-light);
}

.hero-translate-card,
.hero-ai-card,
.hero-image-card,
.hero-progress-card {
    position: absolute;
    z-index: 70;
    width: 210px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 22px 52px rgba(15, 23, 42, 0.22);
    opacity: 0;
    transform: translateY(10px) scale(0.96);
    transition: opacity 0.24s ease, transform 0.24s ease;
}

.dark .hero-translate-card,
.dark .hero-ai-card,
.dark .hero-image-card,
.dark .hero-progress-card {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.94);
}

.hero-translate-card.is-visible,
.hero-ai-card.is-visible,
.hero-image-card.is-visible,
.hero-progress-card.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.hero-card-head {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 10px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    color: rgba(15, 23, 42, 0.9);
    font-size: 12px;
}

.dark .hero-card-head {
    border-bottom-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.hero-card-head .material-symbols-outlined {
    font-size: 17px;
    color: var(--primary-light);
}

.hero-card-head em {
    margin-left: auto;
    color: var(--primary-light);
    font-style: normal;
    font-weight: 900;
}

.hero-lang-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 10px 0;
    color: rgba(100, 116, 139, 0.9);
    font-size: 10px;
    font-weight: 800;
}

.hero-lang-row .material-symbols-outlined {
    font-size: 14px;
}

.hero-translation-output {
    min-height: 42px;
    margin: 9px 10px 10px;
    border-radius: 6px;
    background: rgba(15, 122, 216, 0.08);
    padding: 10px;
    color: rgba(15, 23, 42, 0.92);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.5;
}

.dark .hero-translation-output {
    color: white;
    background: rgba(91, 178, 255, 0.12);
}

.hero-ai-output {
    min-height: 62px;
    margin: 10px;
    border-radius: 6px;
    background: rgba(15, 122, 216, 0.08);
    padding: 10px;
    color: rgba(15, 23, 42, 0.92);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
}

.dark .hero-ai-output {
    color: white;
    background: rgba(91, 178, 255, 0.12);
}

.hero-ai-controls {
    display: flex;
    gap: 6px;
    padding: 0 10px 10px;
    color: rgba(100, 116, 139, 0.8);
    font-size: 10px;
    font-weight: 850;
}

.hero-ai-controls span,
.hero-ai-controls b {
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    padding: 4px 7px;
}

.hero-ai-controls b {
    margin-left: auto;
    color: #159947;
}

.dark .hero-ai-controls span,
.dark .hero-ai-controls b {
    background: rgba(255, 255, 255, 0.1);
}

.hero-image-card {
    width: 190px;
}

.hero-image-preview {
    margin: 10px;
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(14, 165, 233, 0.72), rgba(16, 185, 129, 0.68)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(226, 232, 240, 0.76));
    padding: 14px;
}

.hero-generated-icon {
    display: flex;
    aspect-ratio: 1;
    width: 72px;
    margin: 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.65);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 16px 32px rgba(15, 23, 42, 0.2);
}

.hero-generated-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.hero-generated-icon .material-symbols-outlined {
    font-size: 34px;
    color: var(--primary-light);
}

.hero-image-card p {
    margin: 0 10px 10px;
    color: rgba(71, 85, 105, 0.88);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
}

.dark .hero-image-card p {
    color: rgba(226, 232, 240, 0.82);
}

.hero-finder-sidebar {
    padding-top: 18px;
}

.hero-file-list {
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
    padding: 14px 12px;
    border-right: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.84);
}

.hero-file-list::-webkit-scrollbar {
    display: none;
}

.dark .hero-file-list {
    border-right-color: rgba(255, 255, 255, 0.08);
    background: rgba(2, 6, 23, 0.55);
}

.hero-file-row {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    border: 1px solid transparent;
    border-radius: 7px;
    padding: 7px 8px;
    transition: border 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.hero-file-row.is-selected {
    border-color: rgba(15, 122, 216, 0.24);
    background: rgba(15, 122, 216, 0.12);
}

.hero-file-row.is-dimmed {
    opacity: 0.5;
}

.hero-file-row strong,
.hero-file-row small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.hero-file-row strong {
    max-width: 145px;
    color: rgba(15, 23, 42, 0.9);
    font-size: 12px;
    font-weight: 850;
}

.dark .hero-file-row strong {
    color: rgba(248, 250, 252, 0.92);
}

.hero-file-row small {
    color: rgba(100, 116, 139, 0.76);
    font-size: 10px;
    font-weight: 700;
}

.hero-file-thumb {
    width: 34px;
    height: 30px;
    flex: none;
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.hero-file-thumb-image {
    background:
        linear-gradient(135deg, rgba(14, 165, 233, 0.7), rgba(16, 185, 129, 0.72)),
        linear-gradient(180deg, #e0f2fe, #ffffff);
}

.hero-file-thumb-image.alt {
    background:
        linear-gradient(135deg, rgba(244, 63, 94, 0.58), rgba(251, 191, 36, 0.68)),
        linear-gradient(180deg, #fff7ed, #ffffff);
}

.hero-file-thumb-image.portrait {
    background:
        linear-gradient(135deg, rgba(168, 85, 247, 0.58), rgba(14, 165, 233, 0.68)),
        linear-gradient(180deg, #f5f3ff, #ffffff);
}

.hero-file-thumb-video {
    background:
        linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(99, 102, 241, 0.76)),
        linear-gradient(180deg, #e0e7ff, #ffffff);
}

.hero-file-thumb-video.trailer {
    background:
        linear-gradient(135deg, rgba(244, 63, 94, 0.78), rgba(99, 102, 241, 0.74)),
        linear-gradient(180deg, #ffe4e6, #ffffff);
}

.hero-file-thumb-video.screen {
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(16, 185, 129, 0.72)),
        linear-gradient(180deg, #dcfce7, #ffffff);
}

.hero-preview-pane {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
}

.hero-preview-stack {
    position: relative;
    width: 80px;
    height: 62px;
    margin-bottom: 14px;
}

.hero-preview-stack span {
    position: absolute;
    width: 56px;
    height: 44px;
    border-radius: 7px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.hero-preview-stack span:nth-child(1) {
    left: 2px;
    top: 8px;
    background: rgba(14, 165, 233, 0.72);
    transform: rotate(-8deg);
}

.hero-preview-stack span:nth-child(2) {
    left: 14px;
    top: 4px;
    background: rgba(99, 102, 241, 0.76);
    transform: rotate(5deg);
}

.hero-preview-stack span:nth-child(3) {
    left: 24px;
    top: 12px;
    background: rgba(16, 185, 129, 0.74);
}

.hero-preview-pane strong {
    color: rgba(15, 23, 42, 0.92);
    font-size: 13px;
    font-weight: 900;
}

.dark .hero-preview-pane strong {
    color: white;
}

.hero-preview-pane small {
    margin-top: 4px;
    color: rgba(100, 116, 139, 0.78);
    font-size: 10px;
    font-weight: 750;
}

.hero-preview-info {
    width: 100%;
    margin-top: 16px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding-top: 13px;
    text-align: left;
}

.dark .hero-preview-info {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.hero-preview-info span {
    display: block;
    color: rgba(100, 116, 139, 0.76);
    font-size: 10px;
    font-weight: 800;
}

.hero-preview-info b {
    display: block;
    margin-top: 6px;
    color: var(--primary-light);
    font-size: 11px;
}

.hero-file-cursor {
    position: absolute;
    z-index: 80;
    width: 16px;
    height: 22px;
    opacity: 0;
    filter: drop-shadow(0 4px 6px rgba(15, 23, 42, 0.25));
    transition: left 0.42s cubic-bezier(0.22, 1, 0.36, 1), top 0.42s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.18s ease, transform 0.12s ease;
}

.hero-file-cursor::before {
    content: '';
    position: absolute;
    inset: 0;
    clip-path: polygon(0 0, 0 100%, 42% 72%, 63% 100%, 83% 89%, 62% 62%, 100% 62%);
    background: white;
    border: 1px solid rgba(15, 23, 42, 0.2);
}

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

.hero-file-cursor.is-clicking {
    transform: scale(0.92);
}

.hero-shortcut-hint {
    position: absolute;
    z-index: 65;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    padding: 7px 10px;
    color: rgba(30, 41, 59, 0.88);
    font-size: 11px;
    font-weight: 850;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.dark .hero-shortcut-hint {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.94);
    color: rgba(226, 232, 240, 0.9);
}

.hero-shortcut-hint .material-symbols-outlined {
    font-size: 15px;
    color: var(--primary-light);
}

.hero-shortcut-hint.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.hero-file-toolbar {
    width: 200px;
}

.hero-progress-card {
    right: 7.5%;
    bottom: 10%;
}

.hero-progress-track {
    height: 8px;
    margin: 11px 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
}

.hero-progress-subtitle {
    margin: 9px 10px 0;
    color: rgba(100, 116, 139, 0.8);
    font-size: 10px;
    font-weight: 800;
}

.hero-progress-stats {
    display: flex;
    justify-content: space-between;
    padding: 0 10px 8px;
    color: rgba(100, 116, 139, 0.82);
    font-size: 10px;
    font-weight: 850;
}

.hero-progress-stats b {
    color: #159947;
}

.hero-progress-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--primary-light);
    transition: width 0.15s linear;
}

.hero-progress-list {
    display: grid;
    gap: 6px;
    padding: 0 10px 10px;
    color: rgba(71, 85, 105, 0.88);
    font-size: 10px;
    font-weight: 750;
}

.dark .hero-progress-list {
    color: rgba(226, 232, 240, 0.84);
}

.hero-progress-list span {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.hero-progress-list b {
    color: #159947;
}

@media (max-width: 1024px) {
    .hero-notes-sidebar,
    .hero-notes-list,
    .hero-finder-sidebar {
        display: none !important;
    }
    .hero-notes-body {
        grid-template-columns: 1fr !important;
    }
    .hero-finder-body {
        grid-template-columns: 58% 1fr !important;
    }
}

@media (max-width: 640px) {
    .hero-demo {
        max-width: 440px;
        margin: 0 auto;
    }
    .hero-demo-tabs {
        left: 8px;
        top: 8px;
        transform: scale(0.86);
        transform-origin: top left;
    }

    .hero-demo-stage {
        min-height: auto;
    }

    .hero-mac-window {
        left: 3%;
        right: 3%;
        top: 14%;
        bottom: 8%;
    }

    .hero-notes-body {
        grid-template-columns: 1fr !important;
    }

    .hero-notes-sidebar,
    .hero-notes-list,
    .hero-finder-sidebar {
        display: none !important;
    }

    .hero-finder-body {
        grid-template-columns: 58% 1fr;
    }

    .hero-editor {
        padding: 24px 12px !important;
    }

    .hero-text-line {
        font-size: 12px !important;
    }

    .hero-text-cursor {
        height: 15px !important;
    }

    .hero-context-toolbar {
        width: 164px;
        transform-origin: top left;
    }

    .hero-toolbar-action {
        padding: 6px 7px;
        font-size: 10px;
    }

    .hero-translate-card,
    .hero-ai-card,
    .hero-image-card,
    .hero-progress-card {
        width: 176px;
    }

    .hero-file-row strong {
        max-width: 104px;
    }

    .hero-file-row {
        gap: 8px;
        padding: 6px 7px;
    }

    .hero-file-thumb {
        width: 31px;
        height: 28px;
    }

    .hero-shortcut-hint {
        max-width: 178px;
        font-size: 10px;
    }

    .hero-preview-pane {
        padding: 14px 8px;
    }

    .hero-preview-info {
        display: none;
    }
}

.aurora-background {
    background-color: transparent;
    transition: background-color 0.3s ease, background-image 0.3s ease;
}

/* Glass Panels */
.glass-panel {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.dark .glass-panel {
    background: rgba(40, 40, 40, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

/* Sidebar / Navbar Glass */
.sidebar-glass {
    background: rgba(246, 246, 246, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dark .sidebar-glass {
    background: rgba(40, 40, 40, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- Demo Stage & Animation --- */
#demo-stage {
    perspective: 1000px;
}

/* Toolbar Mobile & Backdrop Support */
#demo-toolbar {
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    z-index: 9999 !important;
}

.demo-line { white-space: nowrap; }

/* Animations */
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.animate-blink { animation: blink 1s step-end infinite; }

.demo-action-btn.active {
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--primary-light);
}

.dark .demo-action-btn.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--primary-dark);
}

.demo-action-btn:active { transform: scale(0.95); }

.typing-cursor::after {
    content: '|';
    animation: blink 1s step-end infinite;
    margin-left: 2px;
    color: var(--primary-light);
}

.dark .typing-cursor::after { color: var(--primary-dark); }

.demo-highlight-layer {
    position: absolute;
    top: 0; left: 0; height: 100%; width: 0;
    background-color: var(--primary-light);
    color: white;
    overflow: hidden;
    white-space: nowrap;
    border-radius: 0;
    pointer-events: none;
    z-index: 10;
}

.dark .demo-highlight-layer {
    background-color: var(--primary-dark);
    color: white;
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}


/* ============================================================
   2026 Visual Polish: aurora orbs, scroll reveal, micro-interactions.
   Performance budget:
   - Pure CSS, no JS hooks (other than reveal observer)
   - GPU-friendly transforms only, no per-frame paint
   - Honors prefers-reduced-motion
   ============================================================ */

.aurora-orbs {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    contain: strict;
}

.aurora-orb {
    position: absolute;
    width: 540px;
    height: 540px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.42;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.aurora-orb-blue {
    top: -180px;
    left: -120px;
    background: radial-gradient(circle at 30% 30%, rgba(14, 165, 233, 0.65), rgba(14, 165, 233, 0));
    animation: aurora-drift-a 22s ease-in-out infinite alternate;
}

.aurora-orb-cyan {
    top: 18%;
    right: -180px;
    background: radial-gradient(circle at 70% 30%, rgba(34, 197, 184, 0.55), rgba(34, 197, 184, 0));
    animation: aurora-drift-b 26s ease-in-out infinite alternate;
}

.aurora-orb-violet {
    bottom: -260px;
    left: 30%;
    background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.5), rgba(139, 92, 246, 0));
    animation: aurora-drift-c 30s ease-in-out infinite alternate;
}

.dark .aurora-orb-blue {
    background: radial-gradient(circle at 30% 30%, rgba(91, 178, 255, 0.45), rgba(91, 178, 255, 0));
}

.dark .aurora-orb-cyan {
    background: radial-gradient(circle at 70% 30%, rgba(52, 211, 153, 0.45), rgba(52, 211, 153, 0));
}

.dark .aurora-orb-violet {
    background: radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.45), rgba(168, 85, 247, 0));
}

@keyframes aurora-drift-a {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(80px, 60px, 0) scale(1.08); }
}

@keyframes aurora-drift-b {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(-90px, 50px, 0) scale(1.12); }
}

@keyframes aurora-drift-c {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(60px, -70px, 0) scale(1.05); }
}

/* Hero demo halo + subtle parallax-style float */
.hero-demo {
    position: relative;
    isolation: isolate;
}

.hero-demo::before {
    content: '';
    position: absolute;
    inset: -28px;
    z-index: -1;
    border-radius: 16px;
    background: radial-gradient(60% 60% at 50% 50%, rgba(14, 165, 233, 0.18), rgba(14, 165, 233, 0));
    filter: blur(40px);
    opacity: 0.85;
    pointer-events: none;
}

.dark .hero-demo::before {
    background: radial-gradient(60% 60% at 50% 50%, rgba(91, 178, 255, 0.22), rgba(91, 178, 255, 0));
}

/* Feature card subtle gradient border on hover, GPU only */
.feature-card {
    position: relative;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.25s ease,
                border-color 0.2s ease;
}

.feature-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(139, 92, 246, 0.18));
    opacity: 0;
    transition: opacity 0.25s ease;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    padding: 1px;
}

.feature-card:hover::after {
    opacity: 1;
}

/* Reveal-on-scroll utility — light, transform-only */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .aurora-orb,
    .reveal {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* Subtle text gradient for the brand name in hero */
.brand-gradient {
    background: linear-gradient(135deg, #0f7ad8 0%, #16a085 60%, #8b5cf6 100%);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
            color: transparent;
}

.dark .brand-gradient {
    background: linear-gradient(135deg, #5bb2ff 0%, #34d399 55%, #c084fc 100%);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
            color: transparent;
}


/* ============================================================
   Hero demo · Drag-direction triggers channel
   "Drag once instead of opening menus" — based on the 1.3.8
   marketing video script. Showcases drag-down/right/up actions
   in Finder + browser, with an 8-direction dial that lights up
   the active vector and a result chip that morphs per scene.
   ============================================================ */

.hero-drag-window {
    background: rgba(255, 255, 255, 0.94);
}

.dark .hero-drag-window {
    background: rgba(15, 23, 42, 0.94);
}

.hero-drag-body {
    position: relative;
    height: calc(100% - 36px);
    display: flex;
    flex-direction: column;
}

.hero-drag-canvas {
    position: relative;
    flex: 1;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 50%, rgba(15, 122, 216, 0.10), transparent 62%),
        linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(226, 232, 240, 0.85));
}

.dark .hero-drag-canvas {
    background:
        radial-gradient(circle at 50% 50%, rgba(91, 178, 255, 0.16), transparent 62%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.92));
}

/* The card that the cursor drags around */
.hero-drag-subject {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 188px;
    max-width: 78%;
    padding: 8px 12px 8px 8px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
    will-change: transform;
}

.dark .hero-drag-subject {
    background: rgba(30, 41, 59, 0.96);
    border-color: rgba(255, 255, 255, 0.12);
}

.hero-drag-subject.is-armed {
    box-shadow:
        0 0 0 2px rgba(15, 122, 216, 0.32),
        0 22px 40px rgba(15, 122, 216, 0.22);
}

.hero-drag-thumb {
    width: 36px;
    height: 32px;
    flex: none;
    border-radius: 7px;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.hero-drag-subject strong {
    display: block;
    color: rgba(15, 23, 42, 0.9);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.15;
}

.dark .hero-drag-subject strong {
    color: white;
}

.hero-drag-subject small {
    display: block;
    margin-top: 2px;
    color: rgba(100, 116, 139, 0.78);
    font-size: 10px;
    font-weight: 700;
}

/* 8-direction dial — lights up the active arrow */
.hero-drag-dial {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-drag-dial-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 240px;
    height: 240px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px dashed rgba(15, 122, 216, 0.32);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dark .hero-drag-dial-ring {
    border-color: rgba(91, 178, 255, 0.45);
}

.hero-drag-dial.is-visible .hero-drag-dial-ring {
    opacity: 0.9;
    animation: hero-drag-dial-pulse 2.6s ease-in-out infinite;
}

@keyframes hero-drag-dial-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.9; }
    50%      { transform: translate(-50%, -50%) scale(1.04); opacity: 0.55; }
}

.hero-drag-arrow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: rgba(255, 255, 255, 0.92);
    color: rgba(71, 85, 105, 0.75);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
    opacity: 0;
    transform-origin: center;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                background 0.25s ease,
                color 0.25s ease,
                opacity 0.3s ease;
}

.dark .hero-drag-arrow {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.96);
    color: rgba(226, 232, 240, 0.78);
}

.hero-drag-arrow .material-symbols-outlined {
    font-size: 18px;
}

.hero-drag-dial.is-visible .hero-drag-arrow {
    opacity: 1;
}

.hero-drag-arrow-up    { transform: translate(0, -110px); }
.hero-drag-arrow-right { transform: translate(110px, 0); }
.hero-drag-arrow-down  { transform: translate(0, 110px); }
.hero-drag-arrow-left  { transform: translate(-110px, 0); }

.hero-drag-arrow.is-active {
    background: var(--primary-light);
    color: white;
    box-shadow: 0 12px 26px rgba(15, 122, 216, 0.38);
}

.hero-drag-arrow-up.is-active    { transform: translate(0, -118px) scale(1.15); }
.hero-drag-arrow-right.is-active { transform: translate(118px, 0) scale(1.15); }
.hero-drag-arrow-down.is-active  { transform: translate(0, 118px) scale(1.15); }
.hero-drag-arrow-left.is-active  { transform: translate(-118px, 0) scale(1.15); }

.dark .hero-drag-arrow.is-active {
    background: var(--primary-dark);
    color: #07111f;
}

/* Optional shortcut hint chip ("Hold ⌥") */
.hero-drag-shortcut {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translate(-50%, -8px);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
    color: rgba(30, 41, 59, 0.92);
    font-size: 11px;
    font-weight: 800;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.dark .hero-drag-shortcut {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.94);
    color: rgba(226, 232, 240, 0.92);
}

.hero-drag-shortcut.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.hero-drag-shortcut kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 5px;
    border: 1px solid rgba(15, 23, 42, 0.16);
    background: white;
    color: rgba(15, 23, 42, 0.9);
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 900;
}

.dark .hero-drag-shortcut kbd {
    background: rgba(2, 6, 23, 0.92);
    border-color: rgba(255, 255, 255, 0.18);
    color: white;
}

.hero-drag-shortcut .material-symbols-outlined {
    font-size: 14px;
    color: var(--primary-light);
}

.dark .hero-drag-shortcut .material-symbols-outlined {
    color: var(--primary-dark);
}

/* Big subtitle band at bottom of the canvas */
.hero-drag-caption {
    margin: 0;
    padding: 12px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(15, 122, 216, 0.06);
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    color: rgba(15, 23, 42, 0.92);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.01em;
    transition: color 0.2s ease, background 0.2s ease;
}

.dark .hero-drag-caption {
    background: rgba(91, 178, 255, 0.08);
    border-top-color: rgba(255, 255, 255, 0.08);
    color: white;
}

.hero-drag-caption-arrow {
    color: var(--primary-light);
    font-size: 18px;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s ease;
}

.dark .hero-drag-caption-arrow {
    color: var(--primary-dark);
}

/* Cursor that drags the subject card */
.hero-drag-cursor {
    position: absolute;
    z-index: 85;
    width: 16px;
    height: 22px;
    opacity: 0;
    filter: drop-shadow(0 6px 8px rgba(15, 23, 42, 0.32));
    transition: left 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                top 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.2s ease,
                transform 0.15s ease;
    pointer-events: none;
}

.hero-drag-cursor::before {
    content: '';
    position: absolute;
    inset: 0;
    clip-path: polygon(0 0, 0 100%, 42% 72%, 63% 100%, 83% 89%, 62% 62%, 100% 62%);
    background: white;
    border: 1px solid rgba(15, 23, 42, 0.2);
}

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

.hero-drag-cursor.is-clicking {
    transform: scale(0.92);
}

/* Result chip — shape-shifts per scene */
.hero-drag-result {
    position: absolute;
    z-index: 75;
    right: 6%;
    top: 14%;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
    max-width: 78%;
    padding: 10px 14px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.22);
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.dark .hero-drag-result {
    background: rgba(15, 23, 42, 0.96);
    border-color: rgba(255, 255, 255, 0.12);
}

.hero-drag-result.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.hero-drag-result-icon {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: rgba(15, 122, 216, 0.12);
    color: var(--primary-light);
    font-size: 18px !important;
}

.dark .hero-drag-result-icon {
    background: rgba(91, 178, 255, 0.18);
    color: var(--primary-dark);
}

.hero-drag-result-text {
    min-width: 0;
}

.hero-drag-result-text strong {
    display: block;
    color: rgba(15, 23, 42, 0.92);
    font-size: 13px;
    font-weight: 900;
    line-height: 1.15;
}

.dark .hero-drag-result-text strong {
    color: white;
}

.hero-drag-result-text small {
    display: block;
    margin-top: 2px;
    color: rgba(100, 116, 139, 0.78);
    font-size: 11px;
    font-weight: 700;
}

.dark .hero-drag-result-text small {
    color: rgba(203, 213, 225, 0.74);
}

@media (max-width: 640px) {
    .hero-drag-dial-ring {
        width: 180px;
        height: 180px;
    }
    .hero-drag-arrow-up    { transform: translate(0, -82px); }
    .hero-drag-arrow-right { transform: translate(82px, 0); }
    .hero-drag-arrow-down  { transform: translate(0, 82px); }
    .hero-drag-arrow-left  { transform: translate(-82px, 0); }
    .hero-drag-arrow-up.is-active    { transform: translate(0, -88px) scale(1.12); }
    .hero-drag-arrow-right.is-active { transform: translate(88px, 0) scale(1.12); }
    .hero-drag-arrow-down.is-active  { transform: translate(0, 88px) scale(1.12); }
    .hero-drag-arrow-left.is-active  { transform: translate(-88px, 0) scale(1.12); }

    .hero-drag-subject {
        min-width: 152px;
        padding: 6px 10px 6px 6px;
    }
    .hero-drag-subject strong { font-size: 11px; }
    .hero-drag-subject small  { font-size: 9px; }
    .hero-drag-result {
        min-width: 180px;
        right: 4%;
        top: 12%;
        padding: 8px 10px;
    }
    .hero-drag-result-text strong { font-size: 11px; }
    .hero-drag-result-text small  { font-size: 10px; }
    .hero-drag-caption { font-size: 12px; padding: 10px 12px; }
}




/* ============================================================
   Hero demo · OCR capture channel (v3 layout — mirrors the
   native OCRResultWindow stack: image preview on top,
   recognized + translated text in the middle, extension
   actions toolbar at the bottom).
   ============================================================ */

/* OCR mode shares the same stage size as every other mode now —
   no per-mode dimension overrides are needed. */

.hero-ocr-window {
    background: rgba(255, 255, 255, 0.96);
    color: rgba(15, 23, 42, 0.92);
    /* Match native cornerRadius: 12 */
}

.dark .hero-ocr-window {
    background: rgba(15, 23, 42, 0.96);
    color: rgba(248, 250, 252, 0.92);
}

.hero-ocr-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 14px 14px;
    /* Right padding leaves a gutter where the floating toolbar lives */
    padding-right: 200px;
    min-height: 0;
    /* Body grows to fill the window minus titlebar (36px) and bottom caption band (44px) */
    height: calc(100% - 36px - 44px);
    overflow: hidden;
}

/* === Unified OCR result stack ===
   One glass card containing 3 stacked sections (preview / recognized / translated).
   Sections share borders via internal hairlines so the whole thing reads as a
   single object — no chunky per-card headers, no visual gap between blocks. */
.hero-ocr-stack {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.10);
    overflow: hidden;
}

.dark .hero-ocr-stack {
    background: rgba(30, 41, 59, 0.86);
    border-color: rgba(255, 255, 255, 0.12);
}

/* Generic section: opaque + active by default (e.g. the preview section
   is always visible since it IS the OCR canvas). The recognised and
   translated sections override this to be invisible/collapsed until the
   scenario activates them — so the user never sees stale "Copy/Translate"
   placeholders before the OCR has actually framed any text. */
.hero-ocr-section {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.35s ease,
                transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Recognised + translated: hidden by default; revealed only when active.
   We collapse height (visually + reserves no space) and fade out so the
   stack just shows the preview at first. */
.hero-ocr-recognized,
.hero-ocr-translated {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translateY(-4px);
}

.hero-ocr-recognized.is-active,
.hero-ocr-translated.is-active {
    opacity: 1;
    max-height: 200px;
    transform: translateY(0);
    pointer-events: auto;
    z-index: 5;
}

/* Hide the connecting hairline between collapsed sections. Once they expand,
   the natural border-top reappears. */
.hero-ocr-section + .hero-ocr-section {
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.dark .hero-ocr-section + .hero-ocr-section {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.hero-ocr-recognized:not(.is-active),
.hero-ocr-translated:not(.is-active) {
    border-top-color: transparent;
}

.hero-ocr-section.is-active {
    z-index: 5;
}

/* Compact inline tag — by default sits in the top-right corner so it
   never crowds the preview's selection. The recognised + translated
   sections override this to the bottom-right so the tag never overlaps
   the text body. */
.hero-ocr-section-tag {
    position: absolute;
    top: 6px;
    right: 8px;
    z-index: 6;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    background: transparent;
    color: rgba(71, 85, 105, 0.95);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.005em;
    pointer-events: none;
}

/* Result + translation sections place the tag in the bottom-right corner so
   it stays out of the way of the recognised / translated text above it. */
.hero-ocr-recognized .hero-ocr-section-tag,
.hero-ocr-translated .hero-ocr-section-tag {
    top: auto;
    bottom: 6px;
    right: 8px;
}

.dark .hero-ocr-section-tag {
    color: rgba(226, 232, 240, 0.95);
}

.hero-ocr-section.is-active .hero-ocr-section-tag {
    color: var(--primary-light);
}

.dark .hero-ocr-section.is-active .hero-ocr-section-tag {
    color: var(--primary-dark);
}

.hero-ocr-section-tag .material-symbols-outlined {
    font-size: 12px;
    color: inherit;
}

.hero-ocr-section-tag em {
    color: rgba(71, 85, 105, 0.85);
    font-style: normal;
    font-weight: 800;
    font-size: 9px;
    transition: color 0.2s ease;
}

.dark .hero-ocr-section-tag em {
    color: rgba(226, 232, 240, 0.85);
}

.hero-ocr-section.is-active .hero-ocr-section-tag em {
    color: #15803d;
}

.dark .hero-ocr-section.is-active .hero-ocr-section-tag em {
    color: #4ade80;
}

.hero-ocr-translated.is-active .hero-ocr-section-tag em {
    color: var(--primary-light);
}

.dark .hero-ocr-translated.is-active .hero-ocr-section-tag em {
    color: var(--primary-dark);
}

/* Preview claims roughly half the stack; recognition + translation
   each get a fair slice and never compress below their content. */
.hero-ocr-preview {
    flex: 2 1 0;
    min-height: 140px;
}

.hero-ocr-recognized,
.hero-ocr-translated {
    flex: 1 0 auto;
    min-height: 64px;
}

/* Body paragraph used in recognized + translated sections.
   Top padding is small now since the tag floats top-right, not above. */
.hero-ocr-section-body {
    margin: 0;
    padding: 12px 14px 14px;
    color: rgba(15, 23, 42, 0.9);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.55;
}

.dark .hero-ocr-section-body {
    color: rgba(248, 250, 252, 0.92);
}

/* The recognised + translated bodies need extra right + bottom padding
   so the bottom-right floating tag never overlaps the text. */
.hero-ocr-recognized .hero-ocr-section-body,
.hero-ocr-translated .hero-ocr-section-body {
    padding: 12px 14px 22px;
}

/* === Preview stage — large enough to clearly show the selection === */
.hero-ocr-preview-stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 116px;
    margin: 0;
    /* Top padding is small now: the floating tag sits in the corner,
       not in a header bar, so the selection has full breathing room. */
    padding: 16px 22px;
    background:
        radial-gradient(120% 90% at 50% 30%, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.94));
    overflow: hidden;
}

.dark .hero-ocr-preview-stage {
    background:
        radial-gradient(120% 90% at 50% 30%, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.94));
}

.hero-ocr-mock {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    height: 100%;
    color: rgba(15, 23, 42, 0.88);
}

.dark .hero-ocr-mock {
    color: rgba(226, 232, 240, 0.92);
}

/* The text region — large, readable, occupies the centre of the preview */
.hero-ocr-region {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px 0;
    color: rgba(15, 23, 42, 0.94);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.45;
    letter-spacing: 0.005em;
}

.dark .hero-ocr-region {
    color: rgba(248, 250, 252, 0.96);
}

.hero-ocr-text-row {
    display: block;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* Spotlight glow scanning effects when text is framed */
.hero-ocr-overlay.is-visible + .hero-ocr-mock .hero-ocr-text-row {
    color: rgba(15, 23, 42, 1);
    text-shadow: 0 0 1px rgba(15, 122, 216, 0.1);
}

.dark .hero-ocr-overlay.is-visible + .hero-ocr-mock .hero-ocr-text-row {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(91, 178, 255, 0.55), 0 0 20px rgba(91, 178, 255, 0.25);
}

/* Dim overlay confined to the preview stage only */
.hero-ocr-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: rgba(2, 6, 23, 0.32);
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dark .hero-ocr-overlay {
    background: rgba(2, 6, 23, 0.65);
}

.hero-ocr-overlay.is-visible {
    opacity: 1;
}

/* Selection rectangle — JS computes left/top/width/height from the
   region's bounding rect inside the preview stage. */
.hero-ocr-selection {
    position: absolute;
    z-index: 4;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    border: 2px solid var(--primary-light);
    background: rgba(15, 122, 216, 0.10);
    border-radius: 4px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
    opacity: 0;
    transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                height 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                left 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                top 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.2s ease;
    pointer-events: none;
}

.dark .hero-ocr-selection {
    border-color: var(--primary-dark);
    background: rgba(91, 178, 255, 0.16);
}

.hero-ocr-selection.is-visible {
    opacity: 1;
}

.hero-ocr-handle {
    position: absolute;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--primary-light);
    box-shadow: 0 0 0 2px white;
}

.dark .hero-ocr-handle {
    background: var(--primary-dark);
    box-shadow: 0 0 0 2px #07111f;
}

.hero-ocr-handle-tl { top: -5px;    left: -5px; }
.hero-ocr-handle-tr { top: -5px;    right: -5px; }
.hero-ocr-handle-bl { bottom: -5px; left: -5px; }
.hero-ocr-handle-br { bottom: -5px; right: -5px; }

.hero-ocr-dimensions {
    position: absolute;
    top: -20px;
    left: 0;
    padding: 2px 7px;
    border-radius: 4px;
    background: var(--primary-light);
    color: white;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.dark .hero-ocr-dimensions {
    background: var(--primary-dark);
    color: #07111f;
}

.hero-ocr-crosshair {
    position: absolute;
    z-index: 5;
    width: 26px;
    height: 26px;
    margin: -13px 0 0 -13px;
    pointer-events: none;
    opacity: 0;
    transition: left 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                top 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.2s ease;
}

.hero-ocr-crosshair.is-visible {
    opacity: 1;
}

.hero-ocr-crosshair-x,
.hero-ocr-crosshair-y {
    position: absolute;
    background: rgba(15, 122, 216, 0.85);
}

.dark .hero-ocr-crosshair-x,
.dark .hero-ocr-crosshair-y {
    background: rgba(91, 178, 255, 0.9);
}

.hero-ocr-crosshair-x {
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    transform: translateY(-50%);
}

.hero-ocr-crosshair-y {
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    transform: translateX(-50%);
}

/* (Section ordering: preview / recognized / translated render
   as a single vertical stack — no `hero-ocr-row` grid.) */

/* === Floating SwiftBiu-style toolbar (right side of OCR panel) ===
   Mirrors the native ToolbarPanel: vertical glass card, two action
   groups (text actions on top, image actions below), each row
   identical visual language to the text/file channel toolbars. */
.hero-ocr-toolbar {
    position: absolute;
    top: 12%;
    right: 4.5%;
    z-index: 78; /* sits above the Mac window AND the ocr cards */
    width: 168px;
    max-height: 72%;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 7px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 22px 52px rgba(15, 23, 42, 0.22);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    opacity: 0;
    transform: translateX(8px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-ocr-toolbar::-webkit-scrollbar {
    display: none;
}

.dark .hero-ocr-toolbar {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.96);
}

.hero-ocr-toolbar.is-visible {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.hero-ocr-toolbar-group-title {
    margin: 4px 6px 2px;
    color: rgba(100, 116, 139, 0.78);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.dark .hero-ocr-toolbar-group-title {
    color: rgba(203, 213, 225, 0.74);
}

.hero-ocr-toolbar-divider {
    display: block;
    height: 1px;
    margin: 5px 4px;
    background: rgba(15, 23, 42, 0.08);
}

.dark .hero-ocr-toolbar-divider {
    background: rgba(255, 255, 255, 0.08);
}

.hero-ocr-toolbar-action {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 9px;
    padding: 7px 9px;
    border-radius: 7px;
    border: 1px solid transparent;
    background: transparent;
    color: rgba(30, 41, 59, 0.92);
    font-size: 11px;
    font-weight: 800;
    text-align: left;
    transition: background 0.18s ease,
                color 0.18s ease,
                border-color 0.18s ease,
                transform 0.18s ease;
}

.dark .hero-ocr-toolbar-action {
    color: rgba(226, 232, 240, 0.9);
}

.hero-ocr-toolbar-action .material-symbols-outlined {
    font-size: 16px;
    color: var(--primary-light);
    flex: none;
}

.dark .hero-ocr-toolbar-action .material-symbols-outlined {
    color: var(--primary-dark);
}

.hero-ocr-toolbar-action > span:not(.material-symbols-outlined) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.hero-ocr-toolbar-action.is-armed {
    background: rgba(15, 122, 216, 0.14);
    border-color: rgba(15, 122, 216, 0.32);
    color: var(--primary-light);
    transform: translateX(2px);
}

.dark .hero-ocr-toolbar-action.is-armed {
    background: rgba(91, 178, 255, 0.18);
    border-color: rgba(91, 178, 255, 0.45);
    color: var(--primary-dark);
}

/* === Bottom subtitle band === */
.hero-ocr-caption {
    margin: 0;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(15, 122, 216, 0.10);
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    color: rgba(15, 23, 42, 0.92);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.01em;
    transition: background 0.25s ease;
}

.dark .hero-ocr-caption {
    background: rgba(91, 178, 255, 0.16);
    border-top-color: rgba(255, 255, 255, 0.08);
    color: white;
}

.hero-ocr-caption-icon {
    font-size: 18px;
    color: var(--primary-light);
}

.dark .hero-ocr-caption-icon {
    color: var(--primary-dark);
}

/* === Floating shortcut hint chip === */
.hero-ocr-shortcut {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translate(-50%, -8px);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    color: rgba(30, 41, 59, 0.92);
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.16);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 30;
}

.dark .hero-ocr-shortcut {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.96);
    color: rgba(226, 232, 240, 0.92);
}

.hero-ocr-shortcut.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.hero-ocr-shortcut kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 5px;
    border: 1px solid rgba(15, 23, 42, 0.16);
    background: white;
    color: rgba(15, 23, 42, 0.9);
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 900;
}

.dark .hero-ocr-shortcut kbd {
    background: rgba(2, 6, 23, 0.92);
    border-color: rgba(255, 255, 255, 0.18);
    color: white;
}

@media (max-width: 640px) {
    .hero-demo-stage {
        width: 100%;
        min-height: auto !important;
        aspect-ratio: 9 / 13;
    }
    .hero-ocr-body { padding: 10px; padding-right: 10px; gap: 9px; overflow-y: auto !important; }
    .hero-ocr-preview-stage {
        margin: 0;
        padding: 14px 16px;
        min-height: 110px;
    }
    .hero-ocr-region { font-size: 13px; }
    .hero-ocr-section-body { font-size: 11px; padding: 10px 12px 12px; }
    /* On mobile, the toolbar sits at the bottom edge as a horizontal scroll strip */
    .hero-ocr-toolbar {
        top: auto;
        right: 4%;
        left: 4%;
        bottom: 7%;
        width: auto;
        max-height: none;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 4px;
        padding: 6px;
        transform: translateY(8px) scale(0.96);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .hero-ocr-toolbar.is-visible {
        transform: translateY(0) scale(1) !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        z-index: 999 !important;
        display: flex !important;
    }
    .hero-ocr-toolbar-group-title { display: none; }
    .hero-ocr-toolbar-divider {
        width: 1px;
        height: 20px;
        margin: 0 3px;
        align-self: center;
    }
    .hero-ocr-toolbar-action {
        flex: 0 0 auto;
        width: auto !important;
        font-size: 10px;
        padding: 6px 8px;
        white-space: nowrap;
    }
    
    .hero-ocr-preview {
        min-height: auto;
    }
    
    .hero-ocr-recognized,
    .hero-ocr-translated {
        min-height: auto;
    }
    
    .hero-ocr-recognized .hero-ocr-section-body,
    .hero-ocr-translated .hero-ocr-section-body {
        padding: 8px 10px 16px;
    }
    
    .hero-ocr-caption {
        font-size: 12px;
        padding: 10px 12px;
        transition: opacity 0.25s ease, transform 0.25s ease, height 0.25s ease, padding 0.25s ease, border-color 0.25s ease;
    }
    
    .has-ocr-toolbar .hero-ocr-caption {
        opacity: 0;
        height: 0;
        padding-top: 0;
        padding-bottom: 0;
        border-top-color: transparent;
        pointer-events: none;
        transform: translateY(4px);
        overflow: hidden;
    }
    
    .has-ocr-toolbar .hero-ocr-body {
        padding-bottom: 58px !important;
    }
    
    /* Compress table cell padding to save space on small mobile screens */
    table th, table td {
        padding-left: 0.625rem !important; /* 10px */
        padding-right: 0.625rem !important; /* 10px */
        padding-top: 0.625rem !important; /* 10px */
        padding-bottom: 0.625rem !important; /* 10px */
        font-size: 12px !important;
    }
}

/* Extra small screens under 360px (e.g. iPhone SE) */
@media (max-width: 360px) {
    .hero-demo-stage {
        min-height: 390px !important;
    }
    .hero-mac-window {
        top: 15% !important;
        bottom: 8% !important;
    }
}

@media (max-width: 480px) {
    .hero-demo-tab-text {
        display: none;
    }
    .hero-demo-tab {
        padding: 0 10px;
        gap: 0;
    }
    .hero-demo-tabs {
        gap: 2px;
        padding: 2px;
    }
}
