/* CertGuard — Stylesheet */

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

:root {
    --blue:       #2563EB;
    --blue-dark:  #1D4ED8;
    --blue-light: #EFF6FF;
    --green:      #16A34A;
    --green-light:#DCFCE7;
    --red:        #DC2626;
    --red-light:  #FEE2E2;
    --yellow:     #D97706;
    --yellow-light:#FEF3C7;
    --gray-50:    #F9FAFB;
    --gray-100:   #F3F4F6;
    --gray-200:   #E5E7EB;
    --gray-400:   #9CA3AF;
    --gray-600:   #4B5563;
    --gray-700:   #374151;
    --gray-900:   #111827;
    --radius:     0.75rem;
    --shadow:     0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg:  0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--gray-700);
    background: #fff;
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Header ── */
header.hero {
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.875rem 0;
}

header.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--gray-900);
    text-decoration: none;
}

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

nav a {
    text-decoration: none;
    color: var(--gray-600);
    font-size: 0.9375rem;
    transition: color 0.15s;
}

nav a:hover { color: var(--blue); }

.btn-nav {
    background: var(--blue);
    color: #fff !important;
    padding: 0.5rem 1.125rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background 0.15s !important;
}

.btn-nav:hover { background: var(--blue-dark) !important; }

/* ── Buttons ── */
.btn-primary,
.btn-secondary,
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background 0.15s, box-shadow 0.15s;
}

.btn-primary {
    background: var(--blue);
    color: #fff;
}
.btn-primary:hover { background: var(--blue-dark); box-shadow: var(--shadow); }

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-900);
}
.btn-secondary:hover { background: var(--gray-200); }

.btn-download {
    background: var(--blue);
    color: #fff;
    width: 100%;
    justify-content: center;
    margin-top: 1.25rem;
    font-size: 1rem;
}
.btn-download:hover { background: var(--blue-dark); }

/* ── Hero Section ── */
.hero-content {
    padding: 5rem 0 4rem;
    background: linear-gradient(135deg, #F8FAFF 0%, #EFF6FF 100%);
}

.hero-content .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-text h1 {
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.highlight { color: var(--blue); }

.lead {
    font-size: 1.0625rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.cta-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.browser-note {
    font-size: 0.8125rem;
    color: var(--gray-400);
}

/* ── Certificate Card ── */
.cert-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.cert-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    font-weight: 600;
    font-size: 0.9375rem;
}

.cert-card-header.valid { background: var(--green-light); color: var(--green); }
.cert-card-header.invalid { background: var(--red-light); color: var(--red); }

.cert-card-body { padding: 1.25rem; }

.cert-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.875rem;
    gap: 1rem;
}

.cert-field:last-child { border-bottom: none; }

.cert-field .label {
    color: var(--gray-400);
    flex-shrink: 0;
}

.cert-field .value {
    color: var(--gray-900);
    font-weight: 500;
    text-align: right;
}

.cert-field .value.monospace { font-family: monospace; }

.cert-match {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.875rem;
    padding: 0.625rem 0.875rem;
    background: var(--green-light);
    color: var(--green);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

/* ── How it works ── */
.how-it-works {
    padding: 5rem 0;
    background: #fff;
}

.how-it-works h2,
.checker h2,
.download h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.section-lead {
    text-align: center;
    color: var(--gray-600);
    margin-bottom: 2.5rem;
    font-size: 1.0625rem;
}

.steps {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-top: 2.5rem;
}

.step {
    flex: 1;
    text-align: center;
    padding: 0 1.25rem;
}

.step-number {
    width: 3rem;
    height: 3rem;
    background: var(--blue);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
    margin: 0 auto 1rem;
}

.step h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.step p { font-size: 0.875rem; color: var(--gray-600); }

.step-arrow {
    font-size: 1.5rem;
    color: var(--gray-200);
    align-self: center;
    flex-shrink: 0;
    padding-top: 0.5rem;
}

/* ── Checker ── */
.checker {
    padding: 5rem 0;
    background: var(--gray-50);
}

.checker-form { max-width: 640px; margin: 0 auto; }

.input-group {
    display: flex;
    gap: 0.75rem;
}

.input-group input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--gray-200);
    border-radius: 0.5rem;
    font-size: 1rem;
    color: var(--gray-900);
    outline: none;
    transition: border-color 0.15s;
}

.input-group input:focus { border-color: var(--blue); }

.checker-result {
    margin-top: 1.5rem;
    border-radius: var(--radius);
    overflow: hidden;
}

.checker-result.hidden { display: none; }

.checker-result .result-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    font-weight: 600;
}

.checker-result.ok .result-header    { background: var(--green-light); color: var(--green); }
.checker-result.error .result-header { background: var(--red-light);   color: var(--red);   }
.checker-result.warn .result-header  { background: var(--yellow-light); color: var(--yellow);}

.checker-result .result-body {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-top: none;
    padding: 1rem 1.25rem;
}

.result-field {
    display: flex;
    justify-content: space-between;
    padding: 0.375rem 0;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--gray-100);
}

.result-field:last-child { border-bottom: none; }

.result-field .label { color: var(--gray-400); }
.result-field .value { color: var(--gray-900); font-weight: 500; font-family: monospace; font-size: 0.8125rem; word-break: break-all; text-align: right; max-width: 70%; }

.spinner {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--gray-200);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 0.5rem;
}

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

/* ── Download ── */
.download { padding: 5rem 0; background: #fff; }

.download-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2.5rem;
}

.download-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 2rem;
}

.download-icon { text-align: center; margin-bottom: 1rem; }

.download-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    text-align: center;
    margin-bottom: 1.25rem;
}

.install-steps {
    padding-left: 1.25rem;
    color: var(--gray-600);
    font-size: 0.9375rem;
}

.install-steps li { margin-bottom: 0.375rem; }

.download-info {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 2rem;
    background: var(--blue-light);
}

.download-info h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.download-info ul {
    padding-left: 1.25rem;
    color: var(--gray-600);
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
}

.download-info li { margin-bottom: 0.25rem; }

.download-info p {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

code {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 0.25rem;
    padding: 0.1em 0.4em;
    font-size: 0.85em;
    font-family: monospace;
    color: var(--blue-dark);
}

/* ── Footer ── */
footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 1.75rem 0;
    text-align: center;
    font-size: 0.875rem;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .steps { flex-direction: column; gap: 1.5rem; }
    .step-arrow { align-self: center; transform: rotate(90deg); }
}

@media (max-width: 768px) {
    .hero-content .container { grid-template-columns: 1fr; }
    .hero-visual { display: none; }
    .download-cards { grid-template-columns: 1fr; }

    nav { display: none; }
}

@media (max-width: 480px) {
    .input-group { flex-direction: column; }
    .cta-group { flex-direction: column; }
    .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
}
