/*
 * Public verification site. Extends the same brand tokens as the
 * certificate PDF (resources/certificate-assets/certificate.css) for a
 * consistent product identity - purple/magenta gradient, Geist +
 * Geist Mono, the same muted-ink palette - but this is a responsive web
 * page, not print output.
 */

@font-face {
    font-family: 'Geist';
    src: url('/fonts/geist/Geist-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geist';
    src: url('/fonts/geist/Geist-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geist';
    src: url('/fonts/geist/Geist-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geist';
    src: url('/fonts/geist/Geist-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geist Mono';
    src: url('/fonts/geist/GeistMono-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geist Mono';
    src: url('/fonts/geist/GeistMono-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

:root {
    --ink: #0E0A14;
    --muted: #6B5F78;
    --muted-light: #8B7F98;
    --brand: #7A01FE;
    --brand-magenta: #E224C3;
    --divider: #E6E0EC;
    --panel: #FAF8FC;
    --valid-bg: #F5EDFF;
    --revoked: #B91C1C;
    --revoked-bg: #FEF2F2;
    --gradient: linear-gradient(92deg, #7A01FE 0%, #9008F1 25%, #BC17D8 60%, #E224C3 100%);
    --font-body: 'Geist', ui-sans-serif, system-ui, sans-serif;
    --font-mono: 'Geist Mono', ui-monospace, monospace;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--panel);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--brand);
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    padding: 20px 24px;
}

.brand {
    display: inline-flex;
    text-decoration: none;
}

.brand-logo {
    height: 32px;
    width: auto;
    display: block;
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 20px 60px;
}

.site-footer {
    padding: 20px 24px 32px;
    text-align: center;
    font-size: 12px;
    color: var(--muted-light);
}

/* ---- Form page ---- */

.hero {
    max-width: 560px;
    text-align: center;
    margin-bottom: 32px;
}

.hero h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0 0 12px;
}

.hero .lead {
    color: var(--muted);
    font-size: 16px;
    margin: 0;
    line-height: 1.5;
}

.verify-panels {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.panel {
    background: #fff;
    border: 1px solid var(--divider);
    border-radius: 16px;
    padding: 24px;
}

.panel h2 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted-light);
    margin: 0 0 16px;
}

.panel-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted-light);
    font-size: 13px;
}

.panel-divider::before,
.panel-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--divider);
}

form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

label {
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
}

input[type="text"],
input[type="file"] {
    font-family: var(--font-mono);
    font-size: 15px;
    padding: 12px 14px;
    border: 1px solid var(--divider);
    border-radius: 10px;
    color: var(--ink);
    background: #fff;
    width: 100%;
}

input[type="text"] {
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

input[type="file"] {
    font-family: var(--font-body);
    padding: 10px 12px;
}

input:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 1px;
    border-color: var(--brand);
}

button {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: var(--gradient);
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    cursor: pointer;
}

button:hover {
    filter: brightness(1.05);
}

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

.error {
    color: var(--revoked);
    font-size: 13px;
    margin: 8px 0 0;
}

/* ---- Result page ---- */

.result {
    width: 100%;
    max-width: 560px;
    background: #fff;
    border: 1px solid var(--divider);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.status-valid {
    color: var(--brand);
    background: var(--valid-bg);
}

.status-revoked {
    color: var(--revoked);
    background: var(--revoked-bg);
}

.status-neutral {
    color: var(--muted);
    background: var(--panel);
}

.result h1 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.4px;
    margin: 0 0 8px;
}

.result .lead {
    color: var(--muted);
    font-size: 15px;
    margin: 0 0 24px;
    line-height: 1.5;
}

.details {
    text-align: left;
    display: grid;
    gap: 16px;
    margin: 0 0 28px;
    padding-top: 24px;
    border-top: 1px solid var(--divider);
}

.details dt {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted-light);
    margin-bottom: 3px;
}

.details dd {
    margin: 0;
    font-size: 15px;
    color: var(--ink);
}

.code-line {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 20px;
}

.code-line strong {
    color: var(--ink);
    font-weight: 500;
}

.back-link {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

@media (min-width: 640px) {
    .content {
        padding-top: 48px;
    }

    .hero h1 {
        font-size: 34px;
    }

    .result {
        padding: 40px 48px;
    }
}
