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

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: #222222;
    background-color: #fffdf7;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

a {
    text-decoration: none;
    color: inherit;
}

.section-container {
    width: min(1100px, 90%);
    margin: 0 auto;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* HEADER */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 5%;
    background: rgba(255, 253, 247, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.logo {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.logo span {
    color: #b63344;
}

.nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav a {
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.25s ease;
}

.nav a:hover,
.nav a:focus-visible {
    color: #b63344;
}

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

.section-alt {
    background-color: #faf7f0;
}

.section h2 {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    line-height: 1.2;
    color: #b63344;
    margin-bottom: 1.25rem;
}

.section p {
    max-width: 800px;
    font-size: 1rem;
    color: #333333;
}

.eyebrow {
    margin-bottom: 0.7rem;
    color: #777777 !important;
    font-size: 0.8rem !important;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-heading {
    margin-bottom: 2rem;
}

.section-heading p:last-child {
    max-width: 720px;
}

.primary-btn,
.secondary-btn,
.text-btn {
    border: 0;
    border-radius: 999px;
    font-weight: 700;
    transition:
        transform 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease;
}

.primary-btn {
    padding: 0.85rem 1.5rem;
    background-color: #b63344;
    color: #ffffff;
    border: 2px solid #b63344;
}

.primary-btn:hover:not(:disabled),
.primary-btn:focus-visible:not(:disabled) {
    transform: translateY(-1px);
    background-color: #972a39;
    border-color: #972a39;
}

.secondary-btn {
    padding: 0.75rem 1.25rem;
    background: transparent;
    color: #b63344;
    border: 1px solid #b63344;
}

.secondary-btn:hover,
.secondary-btn:focus-visible {
    background-color: #ffffff;
}

.text-btn {
    padding: 0.45rem 0.8rem;
    color: #b63344;
    background: transparent;
}

.text-btn:hover,
.text-btn:focus-visible {
    background-color: #faf7f0;
}

/* INTRO */
.intro {
    padding-top: 9rem;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.7fr);
    gap: 4rem;
    align-items: center;
}

.intro-copy h1 {
    max-width: 760px;
    margin-bottom: 1.25rem;
    color: #1f1f1f;
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1.03;
    letter-spacing: -0.04em;
}

.intro-text {
    max-width: 720px !important;
    font-size: clamp(1rem, 2vw, 1.15rem) !important;
}



.intro-summary {
    border-left: 2px solid #b63344;
    padding-left: 1.5rem;
}

.intro-summary div {
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.intro-summary div:last-child {
    border-bottom: none;
}

.summary-label {
    color: #777777;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.intro-summary strong {
    font-size: 1.1rem;
}

/* CHECKER */
.checker-section {
    scroll-margin-top: 5rem;
}

.upload-card {
    padding: 2rem;
    background-color: #fffdf7;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 24px;
}

.drop-zone {
    min-height: 310px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 2rem;
    text-align: center;
    border: 2px dashed rgba(182, 51, 68, 0.4);
    border-radius: 18px;
    background-color: #ffffff;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        transform 0.2s ease;
}

.drop-zone:hover,
.drop-zone:focus-visible,
.drop-zone.is-dragging {
    border-color: #b63344;
    background-color: #fffaf7;
}

.drop-zone.is-dragging {
    transform: scale(1.005);
}

.drop-icon {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.3rem;
    border: 1px solid #b63344;
    border-radius: 50%;
    color: #b63344;
    font-size: 1.7rem;
    font-weight: 700;
}

.drop-zone h3 {
    font-size: 1.35rem;
}

.drop-zone p {
    margin-bottom: 0.7rem;
    color: #777777;
}

.file-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.25rem;
    padding: 1rem 1.15rem;
    border-radius: 16px;
    background-color: #faf7f0;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.file-details-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.file-details-main div {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.file-details-main strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-details-main span:last-child {
    color: #777777;
    font-size: 0.88rem;
}

.file-badge {
    min-width: 58px;
    padding: 0.4rem 0.6rem;
    text-align: center;
    border-radius: 999px;
    color: #b63344;
    background-color: #ffffff;
    border: 1px solid #b63344;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.25rem;
}

.progress-panel {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.25rem;
    padding: 1rem 1.15rem;
    border-radius: 16px;
    background-color: #f3eee5;
}

.progress-panel div:last-child {
    display: flex;
    flex-direction: column;
}

.progress-panel span {
    color: #666666;
    font-size: 0.9rem;
}

.spinner {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 3px solid rgba(182, 51, 68, 0.2);
    border-top-color: #b63344;
    border-radius: 50%;
    animation: spin 0.85s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* RESULTS */
.result-panel {
    margin-top: 2rem;
    padding: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 24px;
    background-color: #fffdf7;
}

.status-banner {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 18px;
}

.status-banner h3 {
    margin-bottom: 0.25rem;
    font-size: clamp(1.25rem, 3vw, 1.65rem);
}

.status-banner p {
    max-width: none;
}

.status-banner.status-error {
    background-color: #851c29;
    color: #ffe66d;
}

.status-banner.status-error p {
    color: #ffe66d;
}

.status-banner.status-clean {
    background-color: #24613c;
    color: #ffffff;
}

.status-banner.status-clean p {
    color: rgba(255, 255, 255, 0.92);
}

.status-badge {
    flex: 0 0 auto;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid currentColor;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.metric-card {
    min-height: 118px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    background-color: #ffffff;
}

.metric-card span {
    color: #777777;
    font-size: 0.82rem;
}

.metric-card strong {
    color: #1f1f1f;
    font-size: 1.8rem;
}

.metric-card .metric-text {
    font-size: 1rem;
    line-height: 1.25;
}

.guid-reminder {
    margin-top: 1.25rem;
    padding: 1.15rem;
    border-left: 3px solid #b63344;
    background-color: #faf7f0;
}

.guid-reminder-title {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.35rem;
}

.guid-reminder-title span {
    color: #777777;
    font-size: 0.85rem;
}

.guid-reminder p {
    max-width: none;
}

.report-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 1.25rem;
    padding: 1.25rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.report-area h3 {
    margin-bottom: 0.2rem;
}

.report-area p {
    color: #666666;
    font-size: 0.9rem;
}

.issue-preview {
    margin-top: 1.25rem;
}

.issue-preview summary {
    cursor: pointer;
    font-weight: 700;
    color: #b63344;
}

.issue-preview summary span {
    color: #777777;
    font-weight: 400;
}

.issue-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.issue-item {
    padding: 1rem;
    border-radius: 14px;
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.07);
}

.issue-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.3rem;
}

.issue-item-header span {
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
}

.issue-item-header .severity-error {
    color: #851c29;
    background-color: #fff1f2;
}

.issue-item-header .severity-warning {
    color: #775f00;
    background-color: #fff7ce;
}

.issue-item p {
    max-width: none;
    font-size: 0.92rem;
}

.issue-item small {
    display: block;
    margin-top: 0.4rem;
    color: #777777;
}

#clearButton {
    margin-top: 1.25rem;
}

/* CONTENT */




.steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.step-card {
    padding: 1.25rem;
    border-top: 2px solid #b63344;
    background-color: #ffffff;
}

.step-card > span {
    color: #b63344;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.step-card h3 {
    margin: 0.5rem 0 0.3rem;
}

.step-card p {
    color: #666666;
    font-size: 0.92rem;
}

/* FOOTER */
.footer {
    padding: 2rem 5%;
    text-align: center;
    background-color: #f3eee5;
    color: #555555;
    font-size: 0.95rem;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .header {
        padding: 1rem 4%;
    }

    .nav {
        gap: 1rem;
    }

    .intro-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .intro-summary {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        border-left: 0;
        border-top: 2px solid #b63344;
        padding: 0.75rem 0 0;
    }

    .intro-summary div {
        padding: 0.75rem;
        border-right: 1px solid rgba(0, 0, 0, 0.08);
        border-bottom: 0;
    }

    .intro-summary div:last-child {
        border-right: 0;
    }

    .metric-grid,
    .steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 0.8rem;
        padding: 1rem 1.25rem;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.9rem 1.2rem;
    }

    .nav a {
        font-size: 0.9rem;
    }

    .intro {
        padding-top: 10.5rem;
    }

    .section {
        padding: 4rem 0;
    }

    .upload-card,
    .result-panel {
        padding: 1.25rem;
    }

    .report-area {
        align-items: stretch;
        flex-direction: column;
    }

    .report-area .primary-btn {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .intro-summary,
    .metric-grid,
    .steps {
        grid-template-columns: 1fr;
    }

    .intro-summary div {
        border-right: 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }

    .file-details {
        align-items: flex-start;
        flex-direction: column;
    }

    .actions .primary-btn,
    #clearButton {
        width: 100%;
    }

    .status-banner {
        flex-direction: column;
    }

    .guid-reminder-title {
        flex-direction: column;
        gap: 0.2rem;
    }
}


/* FILE PICKER FIXES */
.file-select-label {
    display: inline-block;
    cursor: pointer;
    user-select: none;
}

.file-select-label:focus-visible {
    outline: 3px solid rgba(182, 51, 68, 0.22);
    outline-offset: 3px;
}

.file-error {
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border-left: 3px solid #b63344;
    border-radius: 10px;
    background-color: #fff1f2;
    color: #851c29;
    font-size: 0.94rem;
}

.steps-simple {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
    .steps-simple {
        grid-template-columns: 1fr;
    }
}
