/* ==========================================================================
   Hero Demo Card — vanilla replacement for the React DocUploadCard / RecordCard
   Scoped under .hd- to avoid collisions with existing hero-* styles
   ========================================================================== */

:root {
    --hd-blue-400: #60a5fa;
    --hd-blue-500: #3b82f6;
    --hd-blue-600: #2563eb;
    --hd-cyan-300: #67e8f9;
    --hd-cyan-400: #22d3ee;
    --hd-violet-400: #a78bfa;
    --hd-rose-300: #fda4af;
    --hd-rose-400: #fb7185;
    --hd-red-300: #fca5a5;
    --hd-red-400: #f87171;
    --hd-red-700: #b91c1c;
    --hd-emerald-300: #6ee7b7;
    --hd-emerald-400: #34d399;
    --hd-slate-950: #020617;
    --hd-white: #ffffff;
    --hd-radius-outer: 40px;
    --hd-radius-card: 28px;
    --hd-radius-panel: 16px;
}

.hd-card {
    position: relative;
    margin: 0 auto;
    width: 100%;
    /* min-width: 400px;
    max-width: 400px; */
}

.hd-card-glow {
    position: absolute;
    inset: -24px;
    border-radius: var(--hd-radius-outer);
    background: linear-gradient(to bottom right, rgba(96, 165, 250, .20), rgba(103, 232, 249, .10), rgba(167, 139, 250, .15));
    filter: blur(48px);
    pointer-events: none;
}

.hd-card-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--hd-radius-card);
    border: 1px solid rgba(255, 255, 255, .15);
    background: rgba(255, 255, 255, .07);
    box-shadow: 0 25px 50px -12px rgba(2, 6, 23, .4);
    backdrop-filter: blur(20px);
}

.hd-card-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right, rgba(255, 255, 255, .10), rgba(255, 255, 255, .04), rgba(103, 232, 249, .08));
    pointer-events: none;
}

/* header */
.hd-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .10);
    padding: 12px 16px;
}

.hd-header-icon {
    display: grid;
    place-items: center;
    height: 32px;
    width: 32px;
    border-radius: 12px;
    background: rgba(59, 130, 246, .20);
    color: #bfdbfe;
    flex-shrink: 0;
}

.hd-header-icon svg {
    height: 16px;
    width: 16px;
}

.hd-header-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--hd-white);
    line-height: 1.3;
}

.hd-header-sub {
    font-size: 12px;
    color: rgba(207, 250, 254, .6);
    text-align: left;
}

.hd-badge {
    margin-left: auto;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    white-space: nowrap;
    border: 1px solid transparent;
}

.hd-badge-neutral {
    border-color: rgba(255, 255, 255, .15);
    background: rgba(255, 255, 255, .10);
    color: rgba(207, 250, 254, .7);
}

.hd-badge-cyan {
    border-color: rgba(103, 232, 249, .30);
    background: rgba(34, 211, 238, .20);
    color: #cffafe;
}

.hd-badge-blue {
    border-color: rgba(96, 165, 250, .30);
    background: rgba(96, 165, 250, .20);
    color: #dbeafe;
}

.hd-badge-emerald {
    border-color: rgba(110, 231, 183, .30);
    background: rgba(52, 211, 153, .20);
    color: #d1fae5;
}

.hd-badge-rose {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-color: rgba(253, 164, 175, .30);
    background: rgba(251, 113, 133, .20);
    color: #ffe4e6;
}

.hd-badge-dot {
    height: 6px;
    width: 6px;
    border-radius: 999px;
    background: var(--hd-rose-400);
}

/* body */
.hd-body {
    position: relative;
    display: flex;
    min-height: 372px;
    flex-direction: column;
    justify-content: center;
    padding: 16px;
}

.hd-panel {
    display: none;
}

.hd-panel.is-active {
    display: block;
    animation: hd-fadein .4s cubic-bezier(.2, .8, .2, 1) both;
}

/* shared bits */
.hd-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    font-size: 12px;
    margin-top: 12px;
}

.hd-meta-box {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .07);
    padding: 10px 12px;
}

.hd-meta-label {
    font-weight: 500;
    color: rgba(207, 250, 254, .6);
}

.hd-meta-value {
    margin-top: 2px;
    font-weight: 600;
    color: var(--hd-white);
}

.hd-meta-value-accent {
    margin-top: 2px;
    font-weight: 600;
    color: var(--hd-blue-400);
}

.hd-cta {
    width: 100%;
    border-radius: 16px;
    background: var(--hd-blue-600);
    padding: 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--hd-white);
    border: none;
    box-shadow: 0 10px 25px -10px rgba(30, 58, 138, .3);
    margin-top: 12px;
    cursor: default;
}

/* dropzone (idle / dragging / dropped share the box) */
.hd-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 16px;
    border: 2px dashed rgba(96, 165, 250, .40);
    background: rgba(59, 130, 246, .10);
    padding: 20px;
    min-height: 126px;
    overflow: visible;
}

.hd-dropzone.hd-dropzone-drag {
    border-color: rgba(34, 211, 238, .45);
    animation: hd-zone-light 1.5s ease-in-out infinite;
}

.hd-dropzone.hd-dropzone-drop {
    border: 2px solid rgba(34, 211, 238, .60);
    background: rgba(34, 211, 238, .10);
}

.hd-dropzone-icon {
    margin-bottom: 8px;
    display: grid;
    place-items: center;
    height: 44px;
    width: 44px;
    border-radius: 16px;
    background: rgba(59, 130, 246, .20);
    color: #bfdbfe;
}

.hd-dropzone-icon svg {
    height: 20px;
    width: 20px;
}

.hd-dropzone-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--hd-white);
}

.hd-dropzone-tags {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.hd-tag {
    border-radius: 6px;
    border: 1px solid rgba(147, 197, 253, .25);
    background: rgba(96, 165, 250, .15);
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #93c5fd;
}

.hd-glow-overlay {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    animation: hd-glow 1.5s ease-in-out infinite;
}

.hd-drop-title {
    position: relative;
    z-index: 10;
    font-size: 14px;
    font-weight: 600;
    color: #cffafe;
}

.hd-drop-sub {
    position: relative;
    z-index: 10;
    margin-top: 2px;
    font-size: 12px;
    color: rgba(207, 250, 254, .45);
}

.hd-drop-icon-ghost {
    position: relative;
    z-index: 10;
    margin-bottom: 8px;
    display: grid;
    place-items: center;
    height: 44px;
    width: 44px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .10);
    color: rgba(255, 255, 255, .30);
}

/* the travelling PDF chip + cursor (dragging state) */
.hd-file-chip {
    position: relative;
    display: flex;
    height: 68px;
    width: 56px;
    flex-direction: column;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(252, 165, 165, .40);
    box-shadow: 0 20px 40px rgba(0, 0, 0, .4);
    background: linear-gradient(160deg, rgba(239, 68, 68, .45), rgba(185, 28, 28, .35));
    backdrop-filter: blur(6px);
}

.hd-file-chip::before {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    height: 14px;
    width: 14px;
    background: rgba(252, 165, 165, .5);
    clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.hd-file-chip-label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .1em;
    color: #fee2e2;
}

.hd-file-chip-name {
    border-top: 1px solid rgba(255, 255, 255, .10);
    padding: 3px 6px;
    font-size: 7px;
    font-weight: 500;
    color: rgba(254, 202, 202, .6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hd-file-travel {
    pointer-events: none;
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 20;
    margin-left: -28px;
    margin-top: -34px;
    opacity: 0;
    animation: hd-pdf-travel 1s cubic-bezier(.5, 0, .3, 1) both;
}

.hd-cursor-travel {
    pointer-events: none;
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 30;
    margin-left: -9px;
    margin-top: -9px;
    opacity: 0;
    animation: hd-cursor-travel 1s cubic-bezier(.5, 0, .3, 1) both;
}

.hd-file-landed {
    position: relative;
    z-index: 10;
    margin-bottom: 12px;
    animation: hd-land .35s cubic-bezier(.2, .8, .2, 1) both;
}

/* uploading state */
.hd-upload-row {
    display: flex;
    align-items: center;
    gap: 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .07);
    padding: 16px;
}

.hd-upload-row-icon {
    display: grid;
    place-items: center;
    height: 44px;
    width: 44px;
    border-radius: 12px;
    background: rgba(248, 113, 113, .20);
    color: var(--hd-red-300);
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

.hd-upload-row-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--hd-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hd-upload-row-meta {
    font-size: 12px;
    color: rgba(207, 250, 254, .6);
}

.hd-upload-row-pct {
    font-size: 14px;
    font-weight: 700;
    color: var(--hd-blue-400);
}

.hd-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(207, 250, 254, .6);
    margin-bottom: 8px;
    margin-top: 16px;
}

.hd-progress-track {
    position: relative;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .10);
}

.hd-progress-fill {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: 999px;
    background: linear-gradient(to right, var(--hd-blue-400), var(--hd-cyan-300));
    transition: width .15s linear;
    width: 0%;
}

.hd-progress-fill.hd-sheen::after {
    content: "";
    position: absolute;
    inset: 0;
    left: 33%;
    width: 33%;
    background: rgba(255, 255, 255, .25);
    filter: blur(6px);
    animation: hd-sheen 2.4s ease-in-out infinite;
}

.hd-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.hd-step {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, .30);
}

.hd-step.is-active {
    color: var(--hd-white);
}

.hd-step.is-done {
    color: rgba(207, 250, 254, .5);
}

.hd-step-num {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    height: 20px;
    width: 20px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    background: rgba(255, 255, 255, .10);
}

.hd-step.is-active .hd-step-num {
    background: var(--hd-blue-500);
    color: var(--hd-white);
}

.hd-step.is-done .hd-step-num {
    background: rgba(52, 211, 153, .30);
    color: var(--hd-emerald-300);
}

.hd-step-tag {
    margin-left: auto;
    font-size: 12px;
    color: var(--hd-blue-300, #93c5fd);
}

/* processing state */
.hd-proc-head {
    text-align: center;
}

.hd-proc-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--hd-white);
}

.hd-proc-sub {
    margin-top: 2px;
    font-size: 14px;
    color: rgba(207, 250, 254, .6);
}

.hd-proc-row {
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, .30);
}

.hd-proc-row.is-active {
    border: 1px solid rgba(96, 165, 250, .30);
    background: rgba(59, 130, 246, .15);
    color: var(--hd-white);
}

.hd-proc-row.is-done {
    color: rgba(207, 250, 254, .5);
}

.hd-proc-row.is-done .hd-step-num {
    background: rgba(52, 211, 153, .30);
    color: var(--hd-emerald-300);
}

.hd-proc-row.is-active .hd-step-num {
    background: var(--hd-blue-500);
    color: var(--hd-white);
}

.hd-proc-note {
    margin-top: 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .07);
    padding: 12px 16px;
    text-align: center;
    font-size: 12px;
    color: rgba(207, 250, 254, .6);
}

/* done state — notes preview card */
.hd-notes-card {
    overflow: hidden;
    border-radius: 16px;
    background: var(--hd-white);
    color: var(--hd-slate-950);
    box-shadow: 0 10px 25px -10px rgba(0, 0, 0, .3);
}

.hd-notes-head {
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(to right, #eff6ff, rgba(236, 254, 255, .5));
    padding: 12px 16px;
    text-align: left;
}

.hd-notes-eyebrow {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: var(--hd-blue-500);
}

.hd-notes-title {
    margin-top: 2px;
    font-size: 16px;
    font-weight: 700;
    color: var(--hd-slate-950);
}

.hd-notes-sub {
    font-size: 12px;
    color: #64748b;
}

.hd-notes-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    font-size: 12px;
    line-height: 20px;
    color: #334155;
    text-align: left;
}

.hd-notes-tip {
    border-radius: 12px;
    background: #eff6ff;
    padding: 10px;
}

.hd-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #cffafe;
    margin-top: 12px;
}

.hd-tab {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .08);
    padding: 10px 0;
    backdrop-filter: blur(8px);
}

/* record card specific */
.hd-record-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 16px 0;
}

.hd-mic-wrap {
    position: relative;
    display: grid;
    place-items: center;
    height: 112px;
    width: 112px;
}

.hd-mic-pulse {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(96, 165, 250, .25);
    animation: hd-pulse 2s ease-out infinite;
}

.hd-mic-pulse.hd-pulse-2 {
    background: rgba(103, 232, 249, .25);
    animation-delay: .55s;
}

.hd-mic-circle {
    display: grid;
    place-items: center;
    height: 80px;
    width: 80px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .15);
    background: rgba(59, 130, 246, .25);
    color: #dbeafe;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .25);
    backdrop-filter: blur(8px);
}

.hd-mic-circle svg {
    height: 32px;
    width: 32px;
}

.hd-wave {
    display: flex;
    height: 40px;
    align-items: flex-end;
    gap: 6px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .06);
    padding: 8px 16px;
}

.hd-wave-bar {
    width: 4px;
    border-radius: 999px;
    background: #a5f3fc;
    animation: hd-wave 1.2s ease-in-out infinite;
}

.hd-timer-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .06);
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 500;
    color: #ecfeff;
}

.hd-timer-dot {
    height: 8px;
    width: 8px;
    border-radius: 999px;
    background: var(--hd-rose-400);
}

.hd-build-head {
    text-align: center;
}

.hd-build-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--hd-white);
}

.hd-build-sub {
    margin-top: 4px;
    font-size: 14px;
    color: rgba(207, 250, 254, .6);
}

.hd-build-chips {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    margin-top: 16px;
}

.hd-build-chip {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .06);
    padding: 10px 8px;
    color: rgba(207, 250, 254, .45);
}

.hd-build-chip.is-reached {
    border-color: rgba(103, 232, 249, .30);
    background: rgba(34, 211, 238, .15);
    color: #cffafe;
}

/* ==========================================================================
   Keyframes
   ========================================================================== */
@keyframes hd-fadein {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

@keyframes hd-glow {

    0%,
    100% {
        opacity: .3;
    }

    50% {
        opacity: .7;
    }
}

@keyframes hd-zone-light {

    0%,
    100% {
        background-color: rgba(34, 211, 238, .06);
    }

    50% {
        background-color: rgba(34, 211, 238, .14);
    }
}

@keyframes hd-pdf-travel {
    0% {
        opacity: 0;
        transform: translate(148px, -80px) rotate(6deg);
    }

    8% {
        opacity: 1;
        transform: translate(148px, -80px) rotate(6deg);
    }

    100% {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg);
    }
}

@keyframes hd-cursor-travel {
    0% {
        opacity: 0;
        transform: translate(172px, -60px);
    }

    8% {
        opacity: 1;
        transform: translate(172px, -60px);
    }

    90% {
        opacity: 1;
        transform: translate(24px, 20px);
    }

    100% {
        opacity: 0;
        transform: translate(24px, 20px);
    }
}

@keyframes hd-land {
    0% {
        transform: scale(1.08);
    }

    60% {
        transform: scale(.96);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes hd-sheen {
    0% {
        transform: translateX(-130%);
    }

    100% {
        transform: translateX(130%);
    }
}

@keyframes hd-pulse {
    0% {
        transform: scale(.85);
        opacity: .55;
    }

    70% {
        transform: scale(1.3);
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

@keyframes hd-wave {

    0%,
    100% {
        height: 22%;
        opacity: .55;
    }

    50% {
        height: 100%;
        opacity: 1;
    }
}
@media screen and (max-width: 1024px){
    .hd-card {
        max-width: 400px;
    }
}

@media (max-width: 740px) {
    .hd-card {
        /* min-width: 350px; */
        max-width: 350px;
    }

    .hd-body {
        min-height: 340px;
    }
}