/* =====================================================
   GLYPHERE — FONT FINDER PAGE SPECIFIC STYLES
   Futuristic, premium dark theme matching the editorial
   aesthetic of Glyphere.
   ===================================================== */

@font-face {
    font-family: 'Vanguard_Axis';
    src: url('/main-website/homepage-updated/fonts/Vanguard_Axis.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

:root {
    --finder-dark: #0f0c08;
    --finder-dark-lighter: #1b1610;
    --finder-glass: rgba(27, 22, 16, 0.45);
    --finder-gold-glow: rgba(201, 171, 129, 0.25);
    --finder-border: rgba(201, 171, 129, 0.15);
    --finder-border-active: rgba(201, 171, 129, 0.5);
}

/* ── Main Container ── */
.finder-main {
    background: radial-gradient(circle at 50% 0%, #201912 0%, var(--finder-dark) 70%);
    color: #f2e7d5;
    min-height: 100vh;
    padding-top: 8rem;
    padding-bottom: 6rem;
    font-family: var(--font-body);
    overflow-x: hidden;
}

/* ── Hero Section ── */
.finder-hero {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem auto;
    padding: 0 1.5rem;
}

.finder-eyebrow {
    font-family: var(--font-headline);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    color: var(--gold);
    margin-bottom: 1rem;
    display: inline-block;
    position: relative;
}

.finder-eyebrow::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 20%;
    right: 20%;
    height: 1px;
    background: var(--gold);
}

.finder-title {
    font-family: var(--font-headline);
    font-size: clamp(2.5rem, 6vw, 4.2rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

.finder-title span {
    color: var(--gold);
    font-style: italic;
    font-family: var(--font-serif);
    font-weight: 400;
}

.finder-desc {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--body-text-on-gradient);
    line-height: 1.6;
    max-width: 680px;
    margin: 0 auto;
}

/* ── Workspace Panels ── */
.finder-workspace {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.glass-panel {
    background: var(--finder-glass);
    border: 1px solid var(--finder-border);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
    padding: 3rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.glass-panel:hover {
    border-color: rgba(201, 171, 129, 0.25);
}

/* ── Drag & Drop Upload Zone ── */
.finder-dropzone {
    border: 2px dashed var(--finder-border);
    border-radius: var(--radius);
    padding: 4rem 2rem;
    text-align: center;
    cursor: pointer;
    background: rgba(27, 22, 16, 0.2);
    transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    overflow: hidden;
}

.finder-dropzone:hover,
.finder-dropzone.dragover {
    border-color: var(--gold);
    background: rgba(201, 171, 129, 0.05);
    box-shadow: inset 0 0 30px rgba(201, 171, 129, 0.04);
}

.finder-dropzone.dragover {
    transform: scale(0.995);
}

.finder-dropzone-input {
    display: none;
}

.finder-dropzone-icon {
    font-size: 3.5rem;
    color: var(--gold);
    margin-bottom: 1.5rem;
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.finder-dropzone:hover .finder-dropzone-icon {
    transform: translateY(-8px) scale(1.05);
}

.finder-dropzone-title {
    font-family: var(--font-headline);
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.finder-dropzone-sub {
    font-size: 0.9rem;
    color: var(--body-text-on-gradient);
    margin-bottom: 1rem;
}

.finder-dropzone-limits {
    font-size: 0.75rem;
    color: rgba(242, 231, 213, 0.4);
    letter-spacing: 0.05em;
}

/* ── Preset Specimen Gallery ── */
.presets-section {
    margin-top: 3.5rem;
    text-align: center;
}

.presets-title {
    font-family: var(--font-headline);
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold);
    margin-bottom: 1.5rem;
}

.presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    max-width: 900px;
    margin: 0 auto;
}

.preset-card {
    background: rgba(15, 12, 8, 0.6);
    border: 1px solid var(--finder-border);
    border-radius: var(--radius);
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.preset-card:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3), 0 0 15px rgba(201, 171, 129, 0.05);
}

.preset-card__preview {
    font-size: 2.2rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    user-select: none;
    color: #ffffff;
    font-weight: 400;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preset-card__name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--body-text-on-gradient);
    letter-spacing: 0.02em;
}

.preset-card__tag {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gold);
    opacity: 0.7;
    margin-top: 0.35rem;
}

/* ── Interactive Scanner Interface ── */
.scanner-container {
    display: none;
    /* Shown dynamically during scan */
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .scanner-container {
        grid-template-columns: 1.2fr 1fr;
    }
}

/* ── Image Crop / Laser Scan view ── */
.scan-viewport-wrapper {
    position: relative;
    border: 1px solid var(--finder-border-active);
    border-radius: var(--radius);
    background: #050403;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.scan-viewport-grid {
    position: absolute;
    inset: 0;
    background-size: 20px 20px;
    background-image:
        linear-gradient(to right, rgba(201, 171, 129, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(201, 171, 129, 0.03) 1px, transparent 1px);
    pointer-events: none;
}

.scan-image-frame {
    position: relative;
    max-width: 100%;
    max-height: 280px;
    display: inline-block;
}

.scan-target-image {
    max-width: 100%;
    max-height: 280px;
    display: block;
    border-radius: 4px;
    filter: contrast(1.1) brightness(0.9);
}

/* Simulated laser sweep */
.scanner-laser {
    position: absolute;
    left: -5%;
    width: 110%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), #ffffff, var(--gold), transparent);
    box-shadow: 0 0 12px 3px var(--gold), 0 0 4px 1px #ffffff;
    pointer-events: none;
    z-index: 10;
    top: 0;
    opacity: 0;
}

.scanner-laser.active {
    animation: laserSweep 3.2s cubic-bezier(0.445, 0.05, 0.55, 0.95) infinite;
    opacity: 1;
}

@keyframes laserSweep {
    0% {
        top: 0%;
    }

    50% {
        top: 100%;
    }

    100% {
        top: 0%;
    }
}

/* Bounding boxes that outline recognized characters */
.scan-bbox {
    position: absolute;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    background: rgba(201, 171, 129, 0.08);
    box-shadow: 0 0 6px rgba(201, 171, 129, 0.2);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
    transform: scale(0.95);
}

.scan-bbox.active {
    opacity: 1;
    border-color: var(--gold);
    background: rgba(201, 171, 129, 0.15);
    transform: scale(1);
    animation: boxPulse 2s infinite ease-in-out;
}

@keyframes boxPulse {

    0%,
    100% {
        box-shadow: 0 0 4px rgba(201, 171, 129, 0.2);
    }

    50% {
        box-shadow: 0 0 12px var(--gold);
    }
}

/* Bounding box sizes & coordinates for the 4 presets (hardcoded simulated points) */
.bbox-preset-1-1 {
    top: 15%;
    left: 10%;
    width: 18%;
    height: 70%;
}

.bbox-preset-1-2 {
    top: 15%;
    left: 32%;
    width: 16%;
    height: 70%;
}

.bbox-preset-1-3 {
    top: 22%;
    left: 52%;
    width: 18%;
    height: 63%;
}

.bbox-preset-1-4 {
    top: 22%;
    left: 74%;
    width: 16%;
    height: 63%;
}

.bbox-preset-2-1 {
    top: 12%;
    left: 14%;
    width: 22%;
    height: 76%;
}

.bbox-preset-2-2 {
    top: 12%;
    left: 40%;
    width: 20%;
    height: 76%;
}

.bbox-preset-2-3 {
    top: 12%;
    left: 64%;
    width: 22%;
    height: 76%;
}

.bbox-preset-3-1 {
    top: 18%;
    left: 12%;
    width: 16%;
    height: 68%;
}

.bbox-preset-3-2 {
    top: 18%;
    left: 33%;
    width: 15%;
    height: 68%;
}

.bbox-preset-3-3 {
    top: 18%;
    left: 52%;
    width: 17%;
    height: 68%;
}

.bbox-preset-3-4 {
    top: 18%;
    left: 72%;
    width: 16%;
    height: 68%;
}

.bbox-preset-4-1 {
    top: 10%;
    left: 15%;
    width: 32%;
    height: 80%;
}

.bbox-preset-4-2 {
    top: 10%;
    left: 53%;
    width: 32%;
    height: 80%;
}

/* Default upload image coordinates */
.bbox-default-1 {
    top: 20%;
    left: 18%;
    width: 15%;
    height: 60%;
}

.bbox-default-2 {
    top: 25%;
    left: 40%;
    width: 22%;
    height: 55%;
}

.bbox-default-3 {
    top: 20%;
    left: 68%;
    width: 14%;
    height: 60%;
}

/* ── Console / Terminal Logs Panel ── */
.scan-console-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.scanner-header-block {
    margin-bottom: 1.5rem;
}

.scanner-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(201, 171, 129, 0.1);
    border: 1px solid rgba(201, 171, 129, 0.2);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.75rem;
}

.scanner-status-badge .status-dot {
    width: 6px;
    height: 6px;
    background-color: var(--gold);
    border-radius: 50%;
    display: inline-block;
    animation: liveDotPulse 1.2s infinite ease-in-out;
}

.scanner-panel-title {
    font-family: var(--font-headline);
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
}

.scan-terminal {
    background: #050403;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    padding: 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.5;
    color: #a89880;
    height: 140px;
    overflow-y: auto;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.6);
    margin-bottom: 1.5rem;
}

.scan-terminal-line {
    margin-bottom: 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    border-right: 1.5px solid transparent;
}

.scan-terminal-line.active {
    animation: typingBlink 0.8s infinite;
}

.scan-terminal-line span {
    color: var(--gold);
}

@keyframes typingBlink {
    50% {
        border-color: var(--gold);
    }
}

/* ── Progress Dial ── */
.progress-panel {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(27, 22, 16, 0.3);
    border: 1px solid rgba(251, 231, 213, 0.03);
    padding: 1.2rem;
    border-radius: var(--radius);
}

.progress-dial {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.progress-dial svg {
    width: 60px;
    height: 60px;
    transform: rotate(-90deg);
}

.progress-dial .bg-circle {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 4;
}

.progress-dial .bar-circle {
    fill: none;
    stroke: var(--gold);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 176;
    /* 2 * PI * 28 */
    stroke-dashoffset: 176;
    transition: stroke-dashoffset 0.1s ease;
}

.progress-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: #ffffff;
}

.progress-label-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.progress-label-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #ffffff;
}

.progress-label-sub {
    font-size: 0.78rem;
    color: rgba(242, 231, 213, 0.55);
}

/* ── Interactive Results Panel ── */
.results-container {
    display: none;
    /* Shown dynamically post-scan */
    margin-top: 1rem;
    animation: fadeUpReveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes fadeUpReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.results-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-bottom: 1px solid var(--finder-border);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .results-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }
}

.results-headline-wrap {
    display: flex;
    flex-direction: column;
}

.results-headline {
    font-family: var(--font-headline);
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
}

.results-meta {
    font-size: 0.88rem;
    color: var(--body-text-on-gradient);
}

.results-reset-btn {
    font-family: var(--font-label);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gold);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--finder-border);
    border-radius: var(--radius-full);
    transition: all 0.25s ease;
    background: rgba(201, 171, 129, 0.05);
}

.results-reset-btn:hover {
    color: #ffffff;
    border-color: var(--gold);
    background: rgba(201, 171, 129, 0.12);
    transform: translateY(-2px);
}

/* ── Result Cards Grid ── */
.results-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.result-card {
    background: rgba(20, 16, 12, 0.4);
    border: 1px solid var(--finder-border);
    border-radius: var(--radius-lg);
    padding: 2.2rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--gold);
    opacity: 0.4;
    transition: opacity 0.35s ease;
}

.result-card:hover {
    border-color: rgba(201, 171, 129, 0.3);
    background: rgba(27, 22, 16, 0.55);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.result-card:hover::before {
    opacity: 1;
}

@media (min-width: 900px) {
    .result-card {
        grid-template-columns: 1fr 1.5fr 1fr;
        align-items: center;
    }
}

/* Card Column 1: Info */
.result-card__info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.result-card__badge-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-card__match-badge {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #111111;
    font-size: 0.72rem;
    font-weight: 800;
    font-family: var(--font-mono);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    letter-spacing: 0.02em;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(201, 171, 129, 0.3);
}

.result-card__category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(242, 231, 213, 0.45);
    font-weight: 600;
}

.result-card__name {
    font-family: var(--font-headline);
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.result-card__desc {
    font-size: 0.85rem;
    color: var(--body-text-on-gradient);
    line-height: 1.5;
}

/* Card Column 2: Specimen / Custom Preview Input */
.result-card__preview-pane {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    border-left: 1px solid rgba(255, 255, 255, 0.04);
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    padding: 0 1.5rem;
}

@media (max-width: 899px) {
    .result-card__preview-pane {
        border-left: none;
        border-right: none;
        padding: 1.5rem 0;
        border-top: 1px solid rgba(255, 255, 255, 0.04);
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    }
}

.result-card__specimen-display {
    font-size: 2.8rem;
    line-height: 1.1;
    color: #ffffff;
    user-select: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-height: 60px;
    display: flex;
    align-items: center;
    transition: font-size 0.2s ease;
}

.result-card__specimen-display.text--long {
    font-size: 1.8rem;
}

.result-card__input-wrap {
    position: relative;
    width: 100%;
}

.result-card__input {
    width: 100%;
    background: rgba(15, 12, 8, 0.8);
    border: 1px solid var(--finder-border);
    border-radius: var(--radius);
    padding: 0.6rem 2.5rem 0.6rem 1rem;
    color: #ffffff;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.result-card__input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(201, 171, 129, 0.1);
}

.result-card__input-icon {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: rgba(201, 171, 129, 0.6);
    pointer-events: none;
}

/* Card Column 3: CTAs */
.result-card__actions {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
}

.finder-btn-details {
    width: 100%;
    text-align: center;
    border: 1px solid var(--finder-border-active);
    border-radius: var(--radius-full);
    padding: 0.75rem 1.5rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.finder-btn-details:hover {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.finder-btn-buy {
    width: 100%;
    text-align: center;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    border-radius: var(--radius-full);
    padding: 0.75rem 1.5rem;
    font-size: 0.88rem;
    font-weight: 800;
    color: #111111;
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 4px 15px rgba(201, 171, 129, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.finder-btn-buy:hover {
    background: linear-gradient(135deg, #ffffff 0%, var(--gold) 100%);
    box-shadow: 0 6px 20px rgba(201, 171, 129, 0.25);
    transform: translateY(-2px);
}

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

/* ── Floating Background Elements ── */
.ambient-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(201, 171, 129, 0.04) 0%, transparent 60%);
    top: 20%;
    left: -10%;
    pointer-events: none;
    z-index: 1;
}

.ambient-glow-2 {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(201, 171, 129, 0.035) 0%, transparent 60%);
    bottom: 10%;
    right: -10%;
    pointer-events: none;
    z-index: 1;
}