/* ============================================
   ZENITH VIDYALYA — Certificate Verification
   Ivory paper, navy ink, gold accents.
   Standalone: does not depend on style.css.
   ============================================ */

:root {
    --ivory: #faf6ec;
    --paper: #fffdf8;
    --navy: #0b1b3a;
    --navy-2: #1b2e58;
    --ink: #1c2740;
    --ink-soft: #55607a;
    --gold: #a97c1f;
    --gold-bright: #c9a03f;
    --gold-pale: #f4e8c8;
    --line: #e4d9bd;
    --line-soft: #efe7d2;

    --ok: #146c43;
    --ok-bg: #eef7f0;
    --ok-line: #b9dcc5;
    --bad: #9a1c1c;
    --bad-bg: #fdf1ef;
    --bad-line: #eec3bd;
    --warn: #865800;
    --warn-bg: #fdf5e0;
    --warn-line: #ecd596;

    --serif: 'Lora', Georgia, 'Times New Roman', serif;
    --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

    --radius: 14px;
    --shadow: 0 1px 2px rgba(11, 27, 58, .05), 0 12px 32px -12px rgba(11, 27, 58, .18);
}

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

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

body {
    margin: 0;
    background: var(--ivory);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

h1, h2, h3 { font-family: var(--serif); color: var(--navy); margin: 0; line-height: 1.2; }
p { margin: 0; }
a { color: var(--navy-2); text-underline-offset: 3px; }
a:hover { color: var(--gold); }

:focus-visible { outline: 3px solid var(--gold-bright); outline-offset: 2px; border-radius: 4px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { width: 100%; max-width: 920px; margin: 0 auto; padding: 0 24px; }

.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 10;
    background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- assurance strip + masthead ---------- */

.assurance { background: var(--navy); color: #dfe5f2; font-size: 13px; letter-spacing: .01em; }
.assurance__inner { display: flex; align-items: center; gap: 8px; padding-top: 9px; padding-bottom: 9px; }
.assurance__icon { width: 15px; height: 15px; color: var(--gold-bright); flex: none; }
.assurance__host { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--gold-bright); white-space: nowrap; }

.masthead { background: var(--paper); border-bottom: 1px solid var(--line); }
.masthead__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; padding-bottom: 16px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.brand__mark { width: 38px; height: 38px; color: var(--navy); flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-family: var(--serif); font-weight: 700; font-size: 20px; color: var(--navy); }
.brand__sub { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-top: 3px; font-weight: 600; }

.masthead__link {
    display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500;
    color: var(--ink-soft); text-decoration: none; white-space: nowrap;
}
.masthead__link svg { width: 14px; height: 14px; }

/* ---------- hero + lookup ---------- */

.hero {
    background:
        radial-gradient(900px 320px at 50% -80px, rgba(201, 160, 63, .16), transparent 70%),
        var(--ivory);
    padding: 56px 0 28px;
    text-align: center;
}
.hero__inner { display: flex; flex-direction: column; align-items: center; }
.hero__seal { width: 72px; height: 72px; color: var(--gold); margin-bottom: 14px; }

.eyebrow {
    font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--gold);
    margin-bottom: 10px;
}

h1 { font-size: clamp(32px, 5.2vw, 46px); font-weight: 700; letter-spacing: -.01em; }

.hero__lead { max-width: 620px; margin-top: 14px; color: var(--ink-soft); font-size: 17px; }

.lookup {
    width: 100%; max-width: 640px; margin-top: 32px; text-align: left;
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 24px; box-shadow: var(--shadow); position: relative;
}
.lookup::before {
    content: ''; position: absolute; left: 24px; right: 24px; top: -1px; height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold-bright), transparent); border-radius: 3px;
}
.lookup__label { display: block; font-weight: 600; font-size: 14px; color: var(--navy); margin-bottom: 8px; }
.lookup__row { display: flex; gap: 10px; }
.lookup__input {
    flex: 1; min-width: 0; height: 52px; padding: 0 16px;
    font-family: var(--mono); font-size: 17px; font-weight: 500; letter-spacing: .04em; color: var(--navy);
    text-transform: uppercase;
    background: #fff; border: 1.5px solid #cfc6ad; border-radius: 10px;
    transition: border-color .15s, box-shadow .15s;
}
.lookup__input::placeholder { color: #b3ab97; letter-spacing: .04em; }
.lookup__input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(11, 27, 58, .1); }
.lookup__input[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 4px rgba(154, 28, 28, .08); }

.lookup__error { color: var(--bad); font-size: 14px; font-weight: 500; margin-top: 10px; }
.lookup__error:empty { display: none; }
.lookup__hint { color: var(--ink-soft); font-size: 13.5px; margin-top: 12px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 52px; padding: 0 22px; border-radius: 10px; border: 1.5px solid transparent;
    font-family: var(--sans); font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none;
    transition: background .15s, border-color .15s, color .15s, transform .05s;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-2); color: #fff; }
.btn--ghost { background: transparent; border-color: #cfc6ad; color: var(--navy); height: 42px; font-size: 14px; }
.btn--ghost:hover { border-color: var(--navy); color: var(--navy); }
.btn__icon { width: 19px; height: 19px; color: var(--gold-bright); }
.btn[disabled] { opacity: .8; cursor: progress; }

.spinner {
    display: none; width: 18px; height: 18px; border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, .3); border-top-color: var(--gold-bright);
    animation: spin .7s linear infinite;
}
.is-loading .spinner { display: inline-block; }
.is-loading .btn__icon { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- result ---------- */

.result-area { padding-top: 8px; padding-bottom: 8px; }
.result-area:focus { outline: none; }
.result-area:empty { display: none; }

.result {
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden; margin: 16px auto 0; max-width: 760px;
    animation: rise .35s ease-out;
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.result__banner { display: flex; align-items: flex-start; gap: 14px; padding: 20px 24px; border-bottom: 1px solid; }
.result__icon { width: 34px; height: 34px; flex: none; margin-top: 1px; }
.result__status { font-family: var(--sans); font-size: 17px; font-weight: 700; letter-spacing: .04em; line-height: 1.35; }
.result__sub { font-size: 14.5px; margin-top: 3px; }

.result--valid .result__banner { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.result--revoked .result__banner { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad); }
.result--suspended .result__banner { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.result--not_found .result__banner { background: #f3f1ea; border-color: var(--line); color: var(--navy); }
.result--not_found .result__icon { color: var(--ink-soft); }
.result__sub { color: var(--ink); }

.result__body { padding: 26px 24px 24px; }

.recipient { text-align: center; padding-bottom: 22px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; }
.recipient__label { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.recipient__name { font-family: var(--serif); font-size: clamp(26px, 4.4vw, 34px); font-weight: 700; color: var(--navy); margin-top: 6px; line-height: 1.2; overflow-wrap: anywhere; }
.recipient__course { color: var(--ink-soft); margin-top: 6px; font-size: 16px; }

.details { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.details__item { padding: 14px 0; border-bottom: 1px solid var(--line-soft); min-width: 0; }
.details__item:nth-child(odd) { padding-right: 20px; }
.details__item--wide { grid-column: 1 / -1; }
.details dt { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.details dd { margin: 4px 0 0; font-size: 16px; font-weight: 500; color: var(--navy); overflow-wrap: anywhere; }
.details dd.mono { font-family: var(--mono); letter-spacing: .03em; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.chips li {
    background: var(--gold-pale); color: #5c430c; border: 1px solid #e6d3a0;
    padding: 4px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 500;
}

.badge {
    display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px;
    font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border: 1px solid;
}
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--valid { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-line); }
.badge--revoked { color: var(--bad); background: var(--bad-bg); border-color: var(--bad-line); }
.badge--suspended { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }

.statement {
    margin-top: 22px; padding: 16px 18px; background: #f8f3e4; border-left: 3px solid var(--gold-bright);
    border-radius: 0 10px 10px 0; font-size: 14.5px; color: var(--ink);
}
.statement + .statement { margin-top: 10px; }

.download {
    margin-top: 16px; padding: 16px 18px; border: 1px solid #e6d3a0; border-radius: 12px; background: #fffaf0;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
}
.download__text { flex: 1 1 220px; min-width: 0; }
.download__title { font-weight: 600; color: var(--navy); }
.download__sub { font-size: 14px; color: var(--ink-soft); margin-top: 2px; }
.download__error { flex-basis: 100%; color: var(--bad); font-size: 14px; font-weight: 500; }
.download__error:empty { display: none; }
.btn--gold { background: linear-gradient(180deg, #d2ab4c, #b98d2c); color: #1d1503; height: 46px; border-color: #a97c1f; }
.btn--gold:hover { background: linear-gradient(180deg, #dab65c, #c2962f); color: #1d1503; }
.btn--gold .btn__icon { color: #1d1503; }

.result__list { margin: 14px 0 0; padding-left: 20px; color: var(--ink); font-size: 15px; }
.result__list li { margin-top: 6px; }

.result__meta {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
    padding: 14px 24px; background: #f8f4e9; border-top: 1px solid var(--line-soft);
    font-size: 13px; color: var(--ink-soft);
}
.result__meta strong { color: var(--navy); font-weight: 600; }
.result__actions { display: flex; gap: 8px; }

.notice {
    max-width: 760px; margin: 16px auto 0; padding: 14px 18px; border-radius: 10px;
    background: var(--warn-bg); border: 1px solid var(--warn-line); color: #5f3f00; font-size: 14.5px;
}

/* ---------- about ---------- */

.about { padding-top: 44px; padding-bottom: 56px; }
.about h2 { font-size: 22px; text-align: center; }

.steps { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.step { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.step__num {
    display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%;
    background: var(--navy); color: var(--gold-bright); font-family: var(--serif); font-weight: 700; font-size: 15px;
}
.step h3 { font-size: 17px; margin-top: 12px; }
.step p { font-size: 14.5px; color: var(--ink-soft); margin-top: 6px; }

.scope { margin-top: 28px; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.scope h2 { text-align: left; font-size: 19px; }
.scope p { margin-top: 10px; font-size: 14.5px; color: var(--ink-soft); }

/* ---------- footer ---------- */

.foot { background: var(--navy); color: #c8d0e2; font-size: 13.5px; }
.foot__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 20px; padding-bottom: 20px; }
.foot__links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot a { color: #e7ecf7; text-decoration: none; }
.foot a:hover { color: var(--gold-bright); text-decoration: underline; }

/* ---------- responsive ---------- */

@media (max-width: 720px) {
    .steps { grid-template-columns: 1fr; }
    .assurance__host { display: none; }
}

@media (max-width: 560px) {
    .wrap { padding-left: 16px; padding-right: 16px; }
    .hero { padding: 36px 0 20px; }
    .hero__seal { width: 60px; height: 60px; }
    .hero__lead { font-size: 16px; }
    .lookup { padding: 18px 16px; }
    .lookup__row { flex-direction: column; }
    .lookup__button { width: 100%; }
    .lookup__input { font-size: 16px; flex: none; width: 100%; }
    .masthead__link { display: none; }
    .result__banner, .result__body { padding-left: 16px; padding-right: 16px; }
    .result__status { font-size: 15.5px; }
    .details { grid-template-columns: 1fr; }
    .details__item:nth-child(odd) { padding-right: 0; }
    .result__meta { padding: 14px 16px; }
    .result__actions { width: 100%; }
    .result__actions .btn { flex: 1; }
    .download .btn { width: 100%; }
    .foot__inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    .result { animation: none; }
    .spinner { animation-duration: 1.6s; }
    html { scroll-behavior: auto; }
}

/* ---------- print: a clean record of the verification ---------- */

@media print {
    body { background: #fff; }
    .assurance, .masthead__link, .lookup, .hero__seal, .eyebrow, .hero__lead, .about, .result__actions, .download, .skip-link { display: none !important; }
    .hero { padding: 0 0 8px; background: none; }
    h1 { font-size: 24px; }
    .result { box-shadow: none; animation: none; break-inside: avoid; }
    .foot { background: none; color: #333; border-top: 1px solid #ccc; }
    .foot a { color: #333; }
}
