 :root {
     --ink: #12151C;
     --canvas: #F5F6F2;
     --panel: #FFFFFF;
     --border: #DFE2E6;
     --muted: #6B7280;
     --accent: var(--primary);
     --accent-dark: var(--hover);
     --accent-tint: #EBF1FE;
     --success: #0FA36B;
     --success-tint: #E7F8F0;
     --danger: #D6483F;
     --radius-lg: 24px;
     --radius-md: 14px;
     --radius-sm: 8px;
 }

 * {
     box-sizing: border-box;
 }

 html,
 body {
     height: 100%;
 }

 .page-hero-title {
     font-weight: 800;
     display: block;
     font-family: 'Bricolage Grotesque', 'DM Sans', sans-serif;
     font-size: clamp(2.2rem, 5.5vw, 3.75rem);
     background: linear-gradient(to right, #a3c43a, #a866ff);
     -webkit-background-clip: text;
     background-clip: text;
     color: transparent;
 }

 h1,
 h2,
 .brand-word {
     font-family: 'Space Grotesk', sans-serif;
 }

 .mono {
     font-family: 'JetBrains Mono', monospace;
 }

 a,
 button {
     font-family: inherit;
 }

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


 /* ---------- Dropzone ---------- */
 .dropzone {
     border: 2px dashed var(--dark);
     border-radius: var(--radius-lg);
     padding: 3.25rem 1.5rem;
     text-align: center;
     cursor: pointer;
     transition: border-color .15s ease, background-color .15s ease, transform .1s ease;
 }

 .dropzone:hover {
     border-color: var(--primary);
     border: 2px dashed var(--primary);

 }

 .dropzone.dragover {
     border-color: var(--accent);
     background: var(--accent-tint);
     transform: scale(1.005);
 }

 .dropzone-icon {
     width: 64px;
     height: 64px;
     border-radius: 50%;
     background: var(--accent-tint);
     color: var(--accent);
     display: inline-flex;
     align-items: center;
     justify-content: center;
     font-size: 1.6rem;
     margin-bottom: 1rem;
 }

 .dropzone h1 {
     font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem);
     font-weight: 600;
     margin-bottom: .4rem;
 }

 .dropzone p {
     margin-bottom: .2rem;
 }

 /* ---------- Panels ---------- */
 .panel {
     /* background: var(--panel); */
     border: 1px solid var(--border);
     border-radius: var(--radius-md);
     padding: 1.5rem;
 }

 .panel h2 {
     font-size: 1rem;
     font-weight: 600;
     margin-bottom: 1.1rem;
 }

 .field-label {
     font-size: .82rem;
     font-weight: 500;
     margin-bottom: .35rem;
     display: flex;
     justify-content: space-between;
 }

 .field-hint {
     font-size: .78rem;
     color: var(--muted);
     margin-top: .4rem;
 }

 .form-range {
     color: var(--primary);
 }

 .form-select,
 .form-control {
     border-color: var(--border);
 }

 .form-select:focus,
 .form-control:focus {
     border-color: var(--accent);
     box-shadow: 0 0 0 .2rem var(--accent-tint);
 }

 .btn-accent {
     background: var(--accent);
     border-color: var(--accent);
     color: #fff;
     font-weight: 500;
 }

 .btn-accent:hover {
     background: var(--accent-dark);
     border-color: var(--accent-dark);
     color: #fff;
 }

 .btn-accent:disabled {
     background: #A9C0F2;
     border-color: #A9C0F2;
 }

 .btn-outline-quiet {
     border-color: var(--border);
     color: var(--ink);
     font-weight: 500;
 }

 .btn-outline-quiet:hover {
     background: var(--canvas);
     border-color: #c3cbd6;
     color: var(--ink);
 }

 /* ---------- Summary panel ---------- */
 .summary-row {
     display: flex;
     justify-content: space-between;
     align-items: baseline;
     padding: .5rem 0;
     border-bottom: 1px solid var(--border);
 }

 .summary-row:last-of-type {
     border-bottom: none;
 }

 .summary-row .label {
     color: var(--muted);
     font-size: .85rem;
 }

 .summary-row .value {
     font-weight: 600;
 }

 .summary-row.saved .value {
     color: var(--success);
 }

 /* ---------- File list ---------- */
 .file-row {
     display: flex;
     align-items: center;
     gap: 1rem;
     padding: .85rem 0;
     border-bottom: 1px solid var(--border);
 }

 .file-row:last-child {
     border-bottom: none;
 }

 .file-thumb {
     width: 52px;
     height: 52px;
     object-fit: cover;
     border-radius: var(--radius-sm);
     border: 1px solid var(--border);
     background: var(--canvas);
     flex: 0 0 auto;
 }

 .file-info {
     min-width: 0;
     flex: 1 1 auto;
 }

 .file-name {
     font-weight: 500;
     font-size: .92rem;
     max-width: 100%;
 }

 .badge-pct {
     font-family: 'JetBrains Mono', monospace;
     font-size: .76rem;
     font-weight: 600;
     padding: .1rem .45rem;
     border-radius: 999px;
     background: var(--success-tint);
 }

 .badge-pct.text-danger {
     background: #FBEAE9;
 }

 .file-actions {
     display: flex;
     align-items: center;
     gap: .25rem;
     flex: 0 0 auto;
 }

 .icon-btn {
     width: 34px;
     height: 34px;
     border-radius: var(--radius-sm);
     border: 1px solid transparent;
     background: transparent;
     color: var(--ink);
     display: inline-flex;
     align-items: center;
     justify-content: center;
     transition: background-color .12s ease;
 }

 .icon-btn:hover {
     background: var(--canvas);
     border-color: var(--border);
 }

 .icon-btn.remove-btn:hover {
     color: var(--danger);
 }

 /* ---------- Compare modal ---------- */
 .compare-figure {
     border: 1px solid var(--border);
     border-radius: var(--radius-sm);
     overflow: hidden;
     background:
         linear-gradient(45deg, #eee 25%, transparent 25%),
         linear-gradient(-45deg, #eee 25%, transparent 25%),
         linear-gradient(45deg, transparent 75%, #eee 75%),
         linear-gradient(-45deg, transparent 75%, #eee 75%);
     background-size: 16px 16px;
     background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
 }

 .compare-figure img {
     width: 100%;
     display: block;
 }

 .compare-caption {
     font-size: .82rem;
     color: var(--muted);
     margin-top: .5rem;
 }

 footer {
     color: var(--muted);
 }

 @media (prefers-reduced-motion: reduce) {
     .dropzone {
         transition: none;
     }
 }



 /* ================================
   Section Heading
================================ */

.section-heading {
    max-width: 700px;

    margin: 100px auto 45px;
}

.section-tag {
    display: inline-block;

    margin-bottom: 12px;

    color: var(--primary);

    font-size: 12px;
    font-weight: 750;
    letter-spacing: 1px;
}

.section-heading h2 {
    margin-bottom: 12px;

    font-size: clamp(26px, 4vw, 34px);
    font-weight: 750;
    letter-spacing: -0.8px;
}

.section-heading p {
    margin: 0;

    color: var(--muted);
}


/* ================================
   Feature Cards
================================ */

.feature-card {
    height: 100%;

    padding: 26px;

    border: 1px solid var(--border);
    border-radius: 16px;

    background: var(--white);

    box-shadow: var(--shadow-sm);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 20px;

    border-radius: 12px;

    background: rgba(108, 92, 231, 0.10);

    color: var(--primary);

    font-size: 22px;
}

.feature-card h4 {
    margin-bottom: 10px;

    font-size: 17px;
    font-weight: 700;
}

.feature-card p {
    margin: 0;

    color: var(--muted);

    font-size: 14px;
    line-height: 1.7;
}


/* ================================
   How To Section
================================ */

.how-section {
    padding-bottom: 20px;
}

.steps-container {
    display: flex;
    align-items: flex-start;

    gap: 15px;

    max-width: 1100px;

    margin: 0 auto;
    margin-bottom: 50px;
}

.step {
    flex: 1;

    text-align: center;
}

.step-number {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 18px;

    border-radius: 50%;

    background: var(--primary);

    color: var(--dark);

    font-weight: 750;
}

.step h4 {
    margin-bottom: 8px;

    font-size: 16px;
    font-weight: 700;
}

.step p {
    margin: 0;

    color: var(--muted);

    font-size: 13px;
    line-height: 1.6;
}

.step-line {
    width: 70px;
    height: 1px;

    margin-top: 24px;

    background: var(--border);
}


/* ================================
   Responsive
================================ */

@media (max-width: 991px) {

    .tool-wrapper {
        padding-top: 45px;
    }

    .preview-grid {
        grid-template-columns: 1fr;
    }

    .image-container {
        height: 350px;
    }

    .steps-container {
        flex-wrap: wrap;
        justify-content: center;
    }

    .step {
        flex: 0 0 calc(50% - 20px);
    }

    .step-line {
        display: none;
    }

}


@media (max-width: 767px) {

    .tool-wrapper {
        padding: 35px 15px 60px;
    }

    .tool-header {
        margin-bottom: 30px;
    }

    .tool-header h1 {
        font-size: 32px;
    }

    .tool-header p {
        font-size: 15px;
    }

    .converter-card {
        padding: 15px;

        border-radius: 18px;
    }

    .upload-area {
        min-height: 310px;

        padding: 30px 15px;
    }

    .upload-area h3 {
        font-size: 20px;
    }

    .image-container {
        height: 300px;
    }

    .controls-card {
        padding: 18px;
    }

    .controls-header {
        align-items: center;
    }

    .action-buttons {
        flex-direction: column-reverse;
    }

    .action-buttons .btn {
        width: 100%;
    }

    .section-heading {
        margin-top: 70px;
        margin-bottom: 30px;
    }

    .step {
        flex: 0 0 100%;
    }

}


@media (max-width: 480px) {

    .tool-header h1 {
        font-size: 28px;
        letter-spacing: -0.8px;
    }

    .tool-icon {
        width: 60px;
        height: 60px;

        font-size: 27px;
    }

    .image-info {
        flex-direction: column;
    }

    .info-item {
        min-width: 0;
    }

    .preview-header {
        font-size: 13px;
    }

    .image-container {
        height: 260px;
    }

    .controls-header {
        flex-direction: column;
    }

    .reset-btn {
        width: 100%;
    }

}


