/* ==========================================================
   AcoVerify Vehicles — style.css
   Marine blue + customs-stamp teal. Paper-document card.
   ========================================================== */

:root {
    --marine-900: #081b30;
    --marine-800: #0c2742;
    --marine-700: #123660;
    --marine-300: #9fb6cf;
    --paper: #fbfcfd;
    --paper-edge: #e3e8ee;
    --mist: #eef2f6;
    --ink: #14202e;
    --ink-soft: #4b5b6d;
    --line: #d6dde5;
    --stamp: #0e7c6b;
    --stamp-soft: #e2f3ef;
    --alert: #b3321f;
    --alert-soft: #fbeae7;
    --amber: #8a5a00;
    --amber-soft: #fdf2d9;

    --font-display: "Bricolage Grotesque", "IBM Plex Sans", system-ui, sans-serif;
    --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-data: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

    --radius-card: 14px;
    --radius-field: 8px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--mist);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.hidden { display: none !important; }

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    background: var(--ink);
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    z-index: 100;
}
.skip-link:focus { left: 8px; }

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

/* ---------- Header ---------- */
.header {
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 68px;
}

.logo { height: 38px; width: auto; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--marine-700);
    background: var(--mist);
}
.badge svg { color: var(--stamp); flex: none; }

/* ---------- Hero ---------- */
.main { flex: 1; }

.hero {
    position: relative;
    background:
        radial-gradient(1000px 420px at 85% -10%, rgba(18, 54, 96, 0.9), transparent 70%),
        var(--marine-800);
    color: #fff;
    padding: 72px 0 96px;
    overflow: hidden;
}

/* faint road-lane markings along the bottom edge */
.hero::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 28px;
    height: 2px;
    background: repeating-linear-gradient(90deg, rgba(255,255,255,0.14) 0 36px, transparent 36px 72px);
    pointer-events: none;
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 64px;
    align-items: center;
}

.hero-text h1 {
    margin: 0 0 20px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(2.2rem, 4.6vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    max-width: 14ch;
}

.subtitle {
    margin: 0 0 36px;
    max-width: 46ch;
    font-size: 1.1rem;
    color: var(--marine-300);
}

.hero-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 18px;
    max-width: 46ch;
}

.hero-points li {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 14px;
    align-items: start;
    font-size: 0.95rem;
    color: #d5e1ee;
}
.hero-points svg { color: #5fd1bd; margin-top: 3px; }
.hero-points strong { color: #fff; font-weight: 600; }

/* ---------- Verification card (the "document") ---------- */
.verification-card {
    position: relative;
    background: var(--paper);
    color: var(--ink);
    border-radius: var(--radius-card);
    padding: 32px 32px 22px;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.6) inset,
        0 30px 60px -20px rgba(3, 12, 24, 0.55),
        0 0 0 1px rgba(255,255,255,0.08);
    overflow: hidden;
    isolation: isolate;
}

/* security-print pattern behind the content */
.card-guilloche {
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.55;
    background:
        repeating-radial-gradient(circle at 100% 0%, transparent 0 7px, rgba(14,124,107,0.10) 7px 8px),
        repeating-radial-gradient(circle at 0% 100%, transparent 0 9px, rgba(18,54,96,0.07) 9px 10px);
    -webkit-mask-image: linear-gradient(135deg, #000 0%, transparent 55%, #000 100%);
            mask-image: linear-gradient(135deg, #000 0%, transparent 55%, #000 100%);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 26px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--line);
}

.card-header h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.card-header p {
    margin: 2px 0 0;
    font-size: 0.92rem;
    color: var(--ink-soft);
}

.seal { color: var(--stamp); flex: none; }

/* the one page-load moment: the stamp draws itself */
.seal-ring {
    stroke-dasharray: 183;
    stroke-dashoffset: 183;
    animation: seal-draw 1.1s 0.25s cubic-bezier(.5,.1,.2,1) forwards;
}
.seal-tick {
    stroke-dasharray: 44;
    stroke-dashoffset: 44;
    animation: seal-draw 0.5s 1.1s ease-out forwards;
}
@keyframes seal-draw { to { stroke-dashoffset: 0; } }

/* ---------- Form ---------- */
.form-group { margin-bottom: 18px; }

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink);
}

input[type="text"] {
    width: 100%;
    padding: 15px 16px;
    font-family: var(--font-data);
    font-size: 1rem;
    letter-spacing: 0.04em;
    color: var(--ink);
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-field);
    transition: border-color .15s ease, box-shadow .15s ease;
}

input[type="text"]::placeholder {
    color: #94a1b0;
    letter-spacing: 0;
    font-size: 0.9rem;
}

input[type="text"]:hover { border-color: #b4c0cc; }

input[type="text"]:focus {
    outline: none;
    border-color: var(--marine-700);
    box-shadow: 0 0 0 4px rgba(18, 54, 96, 0.14);
}

.field-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    font-size: 0.82rem;
    color: var(--ink-soft);
}

.count {
    flex: none;
    font-family: var(--font-data);
    font-size: 0.8rem;
    color: var(--ink-soft);
}
.count.ok { color: var(--stamp); font-weight: 500; }

.btn-primary {
    width: 100%;
    padding: 15px 20px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--marine-800);
    border: 0;
    border-radius: var(--radius-field);
    cursor: pointer;
    transition: background .15s ease, transform .1s ease, box-shadow .15s ease;
    box-shadow: 0 6px 16px -6px rgba(12, 39, 66, 0.6);
}

.btn-primary:hover { background: var(--marine-700); }
.btn-primary:active { transform: translateY(1px); }

.btn-primary:focus-visible {
    outline: 3px solid #5fd1bd;
    outline-offset: 2px;
}

.btn-primary:disabled,
.btn-primary.loading {
    opacity: 0.75;
    cursor: progress;
}

/* ---------- Result area ----------
   Covers common state class names so it works with verify.js
   whichever it adds (success / error / valid / invalid / not-found / warning). */
.result {
    margin-top: 22px;
    padding: 18px 20px;
    border-radius: 10px;
    border: 1px solid var(--line);
    border-left-width: 5px;
    background: var(--mist);
    font-size: 0.95rem;
    animation: result-in .25s ease-out;
}

.result h3, .result h4 {
    margin: 0 0 6px;
    font-family: var(--font-display);
    font-size: 1.1rem;
}
.result p { margin: 0 0 6px; }
.result p:last-child { margin-bottom: 0; }

.result table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.9rem; }
.result td, .result th { padding: 7px 0; border-top: 1px dashed var(--line); text-align: left; vertical-align: top; }
.result th { font-weight: 500; color: var(--ink-soft); width: 40%; padding-right: 12px; }
.result td { font-family: var(--font-data); word-break: break-word; }

.result.success, .result.valid, .result.verified, .result.result-success {
    background: var(--stamp-soft);
    border-color: #b4ddd4;
    border-left-color: var(--stamp);
    color: #0a4f44;
}

.result.error, .result.invalid, .result.not-found, .result.result-error {
    background: var(--alert-soft);
    border-color: #f0c5bf;
    border-left-color: var(--alert);
    color: #7a1f12;
}

.result.warning, .result.pending, .result.result-warning {
    background: var(--amber-soft);
    border-color: #f0d9a3;
    border-left-color: #d49a1a;
    color: var(--amber);
}

@keyframes result-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: none; }
}

.card-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
    font-size: 0.8rem;
    color: var(--ink-soft);
}
.card-foot svg { color: var(--stamp); flex: none; }

/* ---------- Scope section ---------- */
.scope { padding: 64px 0 72px; }

.scope-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    overflow: hidden;
}

.scope-col { padding: 32px 36px; }

.scope-col-muted {
    background: var(--paper);
    border-left: 1px solid var(--line);
}

.scope-col h3 {
    margin: 0 0 16px;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
}

.scope-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }

.scope-col li {
    position: relative;
    padding-left: 28px;
    font-size: 0.96rem;
    color: var(--ink);
}

/* check marks for what's covered */
.scope-col li::before {
    content: "";
    position: absolute;
    left: 0; top: 4px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--stamp-soft)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4.500 8.200 2.300 2.300 4.700-4.800' fill='none' stroke='%230e7c6b' stroke-width='1.800' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}

/* dashes for what's not covered */
.scope-col-muted li { color: var(--ink-soft); }
.scope-col-muted li::before {
    background: #e6ebf0
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.500 8h7' fill='none' stroke='%234b5b6d' stroke-width='1.800' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}

/* ---------- Footer ---------- */
.footer {
    background: var(--marine-900);
    color: var(--marine-300);
    padding: 36px 0 32px;
    font-size: 0.85rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

.footer p { margin: 0; }
.disclaimer { max-width: 62ch; line-height: 1.65; }
.copyright { flex: none; color: #7f97b1; white-space: nowrap; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
    .hero { padding: 48px 0 72px; }
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero-text h1 { max-width: 18ch; }
    .scope-grid { grid-template-columns: 1fr; }
    .scope-col-muted { border-left: 0; border-top: 1px solid var(--line); }
    .footer-container { flex-direction: column; gap: 16px; }
    .copyright { white-space: normal; }
}

@media (max-width: 520px) {
    .container { padding: 0 18px; }
    .badge { font-size: 12px; padding: 5px 10px; }
    .logo { height: 32px; }
    .verification-card { padding: 24px 20px 18px; }
    .card-header { gap: 12px; }
    .seal svg { width: 44px; height: 44px; }
    .scope-col { padding: 26px 22px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
    .seal-ring, .seal-tick { stroke-dashoffset: 0; }
}
