/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #0A2D52;       /* Deep Navy - main brand from cert */
    --primary-mid: #0F4C81;   /* Mid Navy */
    --primary-light: #1a6bb5;
    --accent: #FFB020;        /* Orange-Gold from cert geometric accents */
    --gold: #D4AF37;          /* Gold for badge/laurel */
    --gold-light: #FFD700;
    --orange-cert: #F28C28;
    --success: #10b981;
    --success-light: #d1fae5;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --warning: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 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);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--gray-800);
    line-height: 1.6;
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

code {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    background: var(--gray-100);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--primary-mid);
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo-img {
    height: 36px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.brand-logo-img img {
    height: 36px;
    width: auto;
    max-height: 36px;
    object-fit: contain;
    display: block;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.brand-tag {
    font-size: 13px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0.5px;
}
.brand-sub {
    font-size: 10px;
    color: var(--gray-500);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}
.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    position: relative;
    padding: 8px 0;
    transition: color 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--primary); }
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}
.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: all 0.3s;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    padding: 140px 0 80px;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f4f9 0%, #e6eef7 50%, #eef3fa 100%);
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 40%, rgba(10, 45, 82, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 15%, rgba(255, 176, 32, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 70% 85%, rgba(15, 76, 129, 0.06) 0%, transparent 50%);
    pointer-events: none;
}
.hero-bg::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(10, 45, 82, 0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-container {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 60px;
    align-items: center;
}
.hero-content { animation: fadeInUp 0.8s ease-out; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(10, 45, 82, 0.08);
    border: 1px solid rgba(10, 45, 82, 0.15);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 24px;
}
.badge-dot {
    width: 8px; height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}

.hero-title {
    font-size: clamp(32px, 4.5vw, 52px);
    font-weight: 900;
    line-height: 1.1;
    color: var(--gray-900);
    margin-bottom: 20px;
}
.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 50%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-desc {
    font-size: 17px;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 20px;
    max-width: 560px;
}
.hero-desc strong { color: var(--primary); }

.hero-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}
.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.hero-stats {
    display: flex;
    gap: 40px;
}
.stat-number {
    font-size: 32px;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 4px;
}
.stat-label {
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 500;
}

/* ===== Verify Card ===== */
.verify-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(10, 45, 82, 0.06);
    padding: 32px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    position: relative;
}
.verify-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-mid), var(--accent));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.verify-card-header {
    text-align: center;
    margin-bottom: 24px;
}
.verify-icon {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--primary-mid));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(10, 45, 82, 0.3);
}
.verify-card-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 6px;
}
.verify-card-header p {
    font-size: 14px;
    color: var(--gray-500);
}

.verify-form { margin-bottom: 20px; }
.input-group { display: flex; flex-direction: column; gap: 8px; }
.input-group label {
    font-size: 13px; font-weight: 600; color: var(--gray-700);
}
.input-wrapper {
    position: relative;
    display: flex;
}
.input-wrapper input {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid var(--gray-200);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    font-size: 16px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-weight: 600;
    color: var(--gray-800);
    outline: none;
    transition: all 0.2s;
    background: var(--white);
    letter-spacing: 1px;
    text-transform: uppercase;
}
.input-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(10, 45, 82, 0.1);
}
.input-wrapper input::placeholder {
    color: var(--gray-400);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

.btn-verify {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary), var(--primary-mid));
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    position: relative;
    overflow: hidden;
    transition: all 0.2s;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-verify:hover {
    background: linear-gradient(135deg, var(--primary-dark, #061e36), var(--primary));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(10, 45, 82, 0.4);
}
.btn-verify.loading .btn-text { opacity: 0; }
.btn-loader {
    position: absolute;
    width: 20px; height: 20px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    opacity: 0;
    animation: spin 0.7s linear infinite;
}
.btn-verify.loading .btn-loader { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

.input-hint {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 4px;
}

.demo-section { padding-top: 16px; border-top: 1px solid var(--gray-100); }
.demo-label {
    font-size: 12px; color: var(--gray-400); font-weight: 500;
    display: block; margin-bottom: 8px;
}
.demo-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-chip {
    padding: 6px 14px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 100px;
    font-size: 12px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    color: var(--gray-600);
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}
.demo-chip:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* ===== Result Section ===== */
.result-section { padding: 0 0 80px; animation: fadeInUp 0.5s ease-out; }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-top: -40px;
    position: relative;
}
.result-status {
    padding: 24px 32px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.result-status.valid {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-bottom: 1px solid #a7f3d0;
}
.result-status.invalid {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-bottom: 1px solid #fecaca;
}
.status-icon {
    width: 52px; height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.result-status.valid .status-icon { background: var(--success); color: var(--white); }
.result-status.invalid .status-icon { background: var(--danger); color: var(--white); }

.status-text h3 {
    font-size: 20px; font-weight: 700; color: var(--gray-900); margin-bottom: 2px;
}
.result-status.valid .status-text h3 { color: #065f46; }
.result-status.invalid .status-text h3 { color: #991b1b; }
.status-text p { font-size: 14px; color: var(--gray-600); }
.result-status.valid .status-text p { color: #047857; }
.result-status.invalid .status-text p { color: #b91c1c; }

.result-body { padding: 32px; }
.cert-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}
.cert-field { margin-bottom: 20px; }
.cert-field-label {
    font-size: 11px; font-weight: 700; color: var(--gray-400);
    text-transform: uppercase; letter-spacing: 0.7px; margin-bottom: 4px;
}
.cert-field-value {
    font-size: 16px; font-weight: 600; color: var(--gray-800);
}
.cert-field-value.mono {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 18px; color: var(--primary); letter-spacing: 1.5px;
}
.cert-badge-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.badge-success {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px; background: var(--success-light);
    color: #065f46; font-size: 12px; font-weight: 600; border-radius: 100px;
}

.qr-section {
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    padding: 24px 20px; background: var(--gray-50);
    border-radius: var(--radius); border: 1px dashed var(--gray-300);
    height: 100%;
}
.qr-placeholder {
    width: 164px; height: 164px;
    background: var(--white);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: visible !important;
}
.qr-placeholder canvas, .qr-placeholder img {
    display: block !important;
    width: 140px !important;
    height: 140px !important;
    max-width: 140px !important;
    max-height: 140px !important;
    image-rendering: pixelated;
    margin: 0 auto !important;
    padding: 0 !important;
}
.qr-id { font-size: 10px; font-family: 'SF Mono', monospace; color: var(--gray-400); text-align: center; }

.result-actions {
    padding: 20px 32px; background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    display: flex; gap: 12px; flex-wrap: wrap;
}
.btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px; background: var(--primary);
    color: var(--white); font-size: 14px; font-weight: 600;
    border-radius: var(--radius-sm); transition: all 0.2s; cursor: pointer;
}
.btn-primary:hover {
    background: #061e36;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(10, 45, 82, 0.35);
}
.btn-secondary {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px; background: var(--white);
    color: var(--gray-700); font-size: 14px; font-weight: 600;
    border-radius: var(--radius-sm); border: 1px solid var(--gray-300);
    transition: all 0.2s; cursor: pointer;
}
.btn-secondary:hover { background: var(--gray-50); border-color: var(--gray-400); }
.btn-outline {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px; background: transparent;
    color: var(--gray-600); font-size: 14px; font-weight: 500;
    border-radius: var(--radius-sm); transition: all 0.2s; cursor: pointer;
}
.btn-outline:hover { color: var(--primary); }

.invalid-content { text-align: center; padding: 20px 0; }
.invalid-icon-big {
    width: 72px; height: 72px; background: var(--danger-light);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: var(--danger); margin: 0 auto 20px;
}
.invalid-content h4 { font-size: 20px; font-weight: 700; color: var(--gray-900); margin-bottom: 8px; }
.invalid-content p { color: var(--gray-600); max-width: 480px; margin: 0 auto 12px; font-size: 15px; }
.invalid-reasons {
    text-align: left; max-width: 480px; margin: 20px auto;
    padding: 20px; background: var(--gray-50);
    border-radius: var(--radius-sm); border-left: 3px solid var(--warning);
}
.invalid-reasons h5 { font-size: 14px; font-weight: 600; color: var(--gray-700); margin-bottom: 10px; }
.invalid-reasons li {
    font-size: 13px; color: var(--gray-600);
    padding: 4px 0 4px 20px; position: relative;
}
.invalid-reasons li::before {
    content: '•'; position: absolute; left: 4px; color: var(--warning); font-weight: bold;
}

/* ===== Features ===== */
.features { padding: 80px 0; background: var(--white); }
.section-header { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-tag {
    display: inline-block; padding: 6px 16px;
    background: rgba(10, 45, 82, 0.08); color: var(--primary);
    font-size: 13px; font-weight: 600; border-radius: 100px; margin-bottom: 16px;
}
.section-header h2 {
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 800; color: var(--gray-900); margin-bottom: 12px;
}
.section-header p { font-size: 16px; color: var(--gray-500); line-height: 1.7; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}
.feature-card {
    padding: 32px; background: var(--white);
    border: 1px solid var(--gray-200); border-radius: var(--radius);
    transition: all 0.3s;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}
.feature-icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
}
.feature-icon.blue { background: #dbeafe; color: #1d4ed8; }
.feature-icon.gold { background: #fef3c7; color: #92400e; }
.feature-icon.orange { background: #ffedd5; color: #c2410c; }
.feature-icon.navy { background: #e0eaf5; color: var(--primary); }
.feature-card h3 { font-size: 18px; font-weight: 700; color: var(--gray-900); margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--gray-500); line-height: 1.7; }

/* ===== How To ===== */
.howto { padding: 80px 0; background: var(--gray-50); }
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}
.step {
    background: var(--white); padding: 28px; border-radius: var(--radius);
    box-shadow: var(--shadow); display: flex; gap: 16px; align-items: flex-start;
}
.step-number {
    width: 40px; height: 40px; min-width: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-mid));
    color: var(--white); font-size: 18px; font-weight: 700;
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(10, 45, 82, 0.25);
}
.step-content h4 { font-size: 16px; font-weight: 700; color: var(--gray-900); margin-bottom: 6px; }
.step-content p { font-size: 14px; color: var(--gray-500); line-height: 1.6; }

/* ===== CTA ===== */
.cta-section { padding: 80px 0; }
.cta-box {
    background: linear-gradient(135deg, var(--primary) 0%, #061e36 100%);
    border-radius: var(--radius-lg); padding: 48px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 32px; position: relative; overflow: hidden;
}
.cta-box::before {
    content: ''; position: absolute;
    top: -100px; right: -100px;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(255,176,32,0.25), transparent 70%);
    border-radius: 50%;
}
.cta-box::after {
    content: ''; position: absolute;
    bottom: -80px; left: -80px;
    width: 250px; height: 250px;
    background: radial-gradient(circle, rgba(255,255,255,0.06), transparent 70%);
    border-radius: 50%;
}
.cta-content { position: relative; z-index: 1; max-width: 520px; }
.cta-content h2 { font-size: 28px; font-weight: 800; color: var(--white); margin-bottom: 8px; }
.cta-content p { font-size: 15px; color: rgba(255,255,255,0.8); line-height: 1.7; }
.cta-actions { position: relative; z-index: 1; display: flex; gap: 12px; flex-shrink: 0; }
.cta-actions .btn-primary { background: var(--accent); color: var(--gray-900); }
.cta-actions .btn-primary:hover { background: #e69e0f; box-shadow: 0 4px 12px rgba(255,176,32,0.4); }
.cta-actions .btn-secondary {
    background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); color: var(--white);
}
.cta-actions .btn-secondary:hover { background: rgba(255,255,255,0.2); }

/* ===== Footer ===== */
.footer {
    background: var(--gray-900); color: var(--gray-300); padding: 60px 0 0;
}
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1.5fr;
    gap: 48px; padding-bottom: 40px;
    border-bottom: 1px solid var(--gray-800);
}
.footer-desc {
    margin-top: 16px; font-size: 14px;
    color: var(--gray-400); line-height: 1.7;
}
.footer-col h5 {
    font-size: 14px; font-weight: 700; color: var(--white);
    margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.5px;
}
.footer-col ul li {
    font-size: 14px; color: var(--gray-400); padding: 6px 0;
    display: flex; align-items: center; gap: 8px;
}
.footer-col ul li a { transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--white); }
.footer-col ul li svg { flex-shrink: 0; color: var(--gray-500); }

.footer-bottom {
    padding: 24px 0; display: flex;
    align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { font-size: 13px; color: var(--gray-500); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 13px; color: var(--gray-500); transition: color 0.2s; }
.footer-links a:hover { color: var(--white); }

/* ===== Modal ===== */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 2000; display: flex; align-items: center; justify-content: center;
    padding: 20px; animation: fadeIn 0.3s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
    background: var(--white); border-radius: var(--radius-lg);
    width: 100%; max-width: 900px; max-height: 92vh;
    overflow: hidden; box-shadow: var(--shadow-xl);
    animation: modalIn 0.3s ease-out;
}
.modal-cert { max-width: 980px; }
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    padding: 16px 20px; display: flex; align-items: center;
    justify-content: space-between; border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}
.modal-header h3 { font-size: 17px; font-weight: 700; }

.modal-actions { display: flex; gap: 6px; align-items: center; }

.btn-icon {
    width: 38px; height: 38px; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: none; cursor: pointer;
    color: var(--gray-600); transition: all 0.15s ease;
    text-decoration: none; padding: 0; line-height: 1;
    flex-shrink: 0;
}
.btn-icon:hover { background: var(--gray-200); color: var(--primary); }
.btn-icon:active { background: var(--gray-300); transform: scale(0.95); }
.btn-icon svg { display: block; pointer-events: none; }
.btn-icon-close { font-size: 24px; line-height: 1; }
.btn-icon-close:hover { color: #dc2626; }

.modal-body {
    padding: 24px; overflow-y: auto; max-height: calc(92vh - 70px);
    background: #f0f2f5;
    display: flex; justify-content: center;
}

/* ============================================= */
/* REAL CERTIFICATE MOCKUP (mirrors attached PNG) */
/* ============================================= */

/* For certs that use real uploaded image */
.cert-image-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.cert-real-image {
    width: 100%;
    max-width: 100%;
    border: 1px solid var(--gray-200);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-radius: 4px;
}
.cert-image-actions {
    padding: 8px 14px;
    background: var(--gray-100);
    border-radius: 100px;
}

.cert-real {
    position: relative;
    width: 100%;
    max-width: 960px;
    aspect-ratio: 1.55 / 1;
    background:
        /* Faint topographic/mining contour background on right half */
        radial-gradient(ellipse at 85% 65%, rgba(0,0,0,0.03) 0%, transparent 50%),
        repeating-linear-gradient(125deg, rgba(0,0,0,0.015) 0 2px, transparent 2px 22px),
        linear-gradient(#ffffff, #fafbfc);
    border: none;
    overflow: hidden;
    flex-shrink: 0;
    font-family: 'Inter', sans-serif;
}

/* ===== Outer navy border with diagonal geometric cuts ===== */
.cert-real::before {
    content: '';
    position: absolute; inset: 0;
    background: var(--primary);
    z-index: 0;
}

/* White inner area with diagonal corners cutting into navy border */
.cert-real::after {
    content: '';
    position: absolute;
    inset: 18px;
    background:
        /* Faint topo background */
        linear-gradient(135deg, rgba(0,0,0,0.015) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 55%, rgba(0,0,0,0.025) 0%, transparent 55%),
        #ffffff;
    z-index: 1;
    /* Create diagonal cut corners on the white card */
    clip-path: polygon(
        0% 4%, 4% 0%,
        96% 0%, 100% 4%,
        100% 96%, 96% 100%,
        4% 100%, 0% 96%
    );
}

/* Thin gold inner frame */
.cert-real-frame {
    position: absolute;
    inset: 26px;
    border: 1.5px solid #c9a227;
    z-index: 2;
    pointer-events: none;
}

/* Top-right: gold scalloped badge */
.cert-real-badge {
    position: absolute;
    top: 30px; right: 38px;
    width: 128px; height: 128px;
    z-index: 10;
}
/* Gold scalloped ring (rosette) */
.cert-real-badge::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, #f5d048 0%, #e6bf2e 55%, #c9a227 85%);
    border-radius: 50%;
    /* Scalloped edge */
    clip-path: polygon(
        50% 0%, 57% 5%, 65% 2%, 69% 10%, 78% 9%, 79% 18%, 88% 19%, 87% 29%,
        95% 33%, 92% 42%, 99% 50%, 92% 58%, 95% 67%, 87% 71%, 88% 81%,
        79% 82%, 78% 91%, 69% 90%, 65% 98%, 57% 95%, 50% 100%, 43% 95%,
        35% 98%, 31% 90%, 22% 91%, 21% 82%, 12% 81%, 13% 71%, 5% 67%,
        8% 58%, 1% 50%, 8% 42%, 5% 33%, 13% 29%, 12% 19%, 21% 18%,
        22% 9%, 31% 10%, 35% 2%, 43% 5%
    );
    z-index: 1;
}
/* Darker outer ring highlight */
.cert-real-badge::after {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0a2542 0%, #0e3a6b 60%, #0a2d52 100%);
    z-index: 2;
    box-shadow: inset 0 0 0 2px #c9a227, inset 0 2px 6px rgba(0,0,0,0.4);
}
.badge-inner {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: #fff; text-align: center;
    padding-top: 6px;
}
.badge-hasco {
    font-size: 26px; font-weight: 900;
    color: #2b8fd8;
    letter-spacing: 1.5px;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    font-family: 'Arial Black', 'Inter', sans-serif;
}
.badge-line { display: none; }
.badge-text1 {
    font-size: 10px; font-weight: 800;
    letter-spacing: 0.5px; color: #fff; line-height: 1.2;
    margin-top: 3px;
}
.badge-text2 {
    font-size: 12px; font-weight: 800;
    letter-spacing: 0.8px; color: #fff; line-height: 1.2;
}

/* ===== Header Title ===== */
.cert-real-header {
    position: absolute;
    top: 40px; left: 0; right: 0;
    text-align: center;
    z-index: 5;
    padding: 0 170px 0 160px;
}
.cert-real-title { margin-top: 20px; }
.title-main {
    font-size: clamp(44px, 7vw, 82px);
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 6px;
    line-height: 1;
    font-family: 'Inter', 'Arial Black', sans-serif;
}
.title-sub {
    font-size: clamp(20px, 3vw, 36px);
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 14px;
    margin-top: 10px;
}
.title-divider {
    display: flex; align-items: center; justify-content: center;
    margin: 18px auto 18px;
    width: 72%;
    position: relative;
    height: 2px;
}
.title-divider .dot {
    width: 12px; height: 12px;
    background: #f28c28;
    border-radius: 50%;
    flex-shrink: 0;
    position: absolute;
}
.title-divider .dot-left { left: 0; }
.title-divider .dot-right { right: 0; }
.title-divider .line {
    position: absolute;
    left: 20px; right: 20px;
    height: 2px;
    background: #f28c28;
}
.cert-real-intro {
    font-size: clamp(15px, 2vw, 22px);
    color: var(--primary-mid);
    font-weight: 500;
    margin-top: 8px;
    font-family: 'Georgia', 'Times New Roman', serif;
}
.cert-real-name {
    font-size: clamp(34px, 5vw, 62px);
    font-family: 'Great Vibes', 'Brush Script MT', cursive;
    color: #000;
    line-height: 1.15;
    margin-top: 8px;
    font-weight: 400;
}
.name-divider {
    width: 58%;
    height: 1.5px;
    background: #c9a227;
    margin: 4px auto 0;
}

/* Left device illustration (hidden for now; we used real image for primary cert) */
.cert-real-device {
    position: absolute;
    left: 30px;
    top: 48%;
    transform: translateY(-50%);
    z-index: 4;
    opacity: 0.95;
    width: 130px;
}
.cert-real-device svg { width: 100%; height: auto; }

/* Right shield + drone */
.cert-real-shield {
    position: absolute;
    right: 40px;
    top: 45%;
    transform: translateY(-50%);
    z-index: 4;
    opacity: 0.35;
    width: 160px;
}
.cert-real-shield svg { width: 100%; height: auto; }

/* Body text */
.cert-real-body {
    position: absolute;
    top: 52%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 64%;
    z-index: 5;
    margin-top: 20px;
}
.body-line1 {
    font-size: clamp(13px, 1.6vw, 20px);
    color: var(--primary-mid);
    font-weight: 500;
    font-family: 'Georgia', serif;
    line-height: 1.5;
}
.body-program {
    font-size: clamp(15px, 2vw, 24px);
    font-weight: 900;
    color: #f28c28;
    margin-top: 8px;
    letter-spacing: 0.5px;
    line-height: 1.25;
}
.body-subprogram {
    font-size: clamp(15px, 2vw, 24px);
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 0.5px;
    line-height: 1.25;
}
.body-line2 {
    font-size: clamp(13px, 1.6vw, 20px);
    color: var(--primary-mid);
    font-weight: 500;
    margin-top: 12px;
    font-family: 'Georgia', serif;
}
.body-line3 {
    font-size: clamp(13px, 1.6vw, 20px);
    color: var(--primary-mid);
    font-weight: 500;
    font-family: 'Georgia', serif;
}

/* Footer signatures */
.cert-real-footer {
    position: absolute;
    bottom: 80px;
    left: 0; right: 0;
    padding: 0 60px;
    display: grid;
    grid-template-columns: 1fr 200px 1fr;
    align-items: end;
    z-index: 5;
}
.sig-block {
    text-align: center;
    position: relative;
}
.sig-company {
    font-size: clamp(24px, 2.6vw, 36px);
    font-weight: 900;
    color: #0072ce; /* HASCO blue matches cert */
    letter-spacing: 0.5px;
    margin-bottom: -8px;
    text-align: left;
    padding-left: 10px;
}
.sig-signature {
    display: block;
    margin: -10px 0 -16px;
    text-align: left;
    padding-left: 4px;
}
.sig-stamp {
    position: absolute;
    right: 5%;
    top: -4px;
    opacity: 0.75;
    transform: rotate(-12deg);
}
.sig-name {
    font-size: clamp(13px, 1.4vw, 18px);
    font-weight: 700;
    color: #111;
    text-align: left;
    padding-left: 4px;
}
.sig-title {
    font-size: clamp(11px, 1.1vw, 15px);
    color: #333;
    text-align: left;
    padding-left: 4px;
}
.sig-authorized-label {
    font-size: clamp(12px, 1.2vw, 16px);
    color: var(--primary-mid);
    font-weight: 600;
    margin-bottom: 8px;
    text-align: left;
}
.sig-lztech {
    display: flex; align-items: center;
    margin-bottom: 8px;
    justify-content: flex-start;
}
.lztech-logo {
    display: flex; align-items: center; gap: 10px;
    color: #26a3d0;
}
.lztech-text {
    font-size: clamp(26px, 3vw, 42px);
    font-weight: 900;
    color: #26a3d0;  /* LZ TECH light blue */
    letter-spacing: 1px;
}
.sig-divider-lz {
    width: 100%; height: 1.5px;
    background: var(--primary-mid);
    margin: 4px 0 0;
}
.laurel-block {
    display: flex; align-items: center; justify-content: center;
}

/* Bottom navy bar with CHAMFERED edges */
.cert-real-bottom-bar {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 72px;
    background: var(--primary);
    display: grid;
    grid-template-columns: 1fr 1.6fr 1fr;
    align-items: center;
    padding: 0 40px;
    color: #fff;
    z-index: 10;
    /* Chamfered/notched top edge */
    clip-path: polygon(
        0 0,
        16% 0, 20% 100%, 0 100%,
        0 0,
        38% 0, 42% 22%, 58% 22%, 62% 0, 100% 0,
        100% 100%, 80% 100%, 84% 0,
        100% 0
    );
    border-top: 2px solid var(--gold);
}
.bottom-left, .bottom-right, .bottom-center {
    display: flex; align-items: center;
    gap: 8px;
}
.bottom-center {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 2px;
    padding-top: 14px;
    align-self: start;
}
.bottom-right { justify-content: flex-end; }
.bottom-label {
    font-size: clamp(12px, 1.2vw, 16px);
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    display: block;
}
.bottom-value {
    font-size: clamp(13px, 1.5vw, 19px);
    color: #fff;
    font-weight: 700;
    display: block;
}
.bottom-value.mono {
    font-family: 'SF Mono', 'Fira Code', monospace;
    letter-spacing: 1.5px;
}
.bottom-tagline-top {
    font-size: clamp(11px, 1.1vw, 14px);
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}
.bottom-tagline-bottom {
    font-size: clamp(10px, 0.9vw, 13px);
    color: rgba(255,255,255,0.75);
}
/* Orange geometric corner strips */
.cert-corner-accent {
    position: absolute;
    z-index: 3;
    background: #f28c28;
}
.cert-corner-accent.tl { display:none; }
.cert-corner-accent.bl {
    bottom: 72px; left: 18px;
    width: 90px; height: 22px;
    transform: skewX(-40deg);
}
.cert-corner-accent.tr {
    top: 0; right: 80px;
    width: 100px; height: 24px;
    transform: skewX(-40deg);
}
.cert-corner-accent.mr {
    top: 60%; right: 0;
    width: 24px; height: 100px;
    transform: skewY(-40deg);
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
    .hero-container {
        grid-template-columns: 1fr; gap: 40px;
    }
    .verify-card { max-width: 480px; margin: 0 auto; width: 100%; }
    .cert-preview { grid-template-columns: 1fr; }
    .cta-box {
        flex-direction: column; text-align: center; padding: 36px 28px;
    }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }

    /* Certificate modal scaling for smaller screens */
    .cert-real { aspect-ratio: 1.414 / 1; }
    .cert-real-header { padding: 0 110px 0 110px; }
    .cert-real-device { display: none; }
    .cert-real-shield { display: none; }
    .cert-real-body { width: 70%; margin-top: 20px; }
    .cert-real-footer {
        grid-template-columns: 1fr 140px 1fr;
        padding: 0 20px;
        bottom: 60px;
    }
    .cert-real-bottom-bar { height: 50px; padding: 0 20px; }
}

@media (max-width: 640px) {
    .nav-links { display: none; }
    .mobile-toggle { display: flex; }
    .hero { padding: 120px 0 60px; }
    .hero-stats { gap: 24px; }
    .stat-number { font-size: 24px; }
    .verify-card { padding: 24px 20px; }
    .input-wrapper { flex-direction: column; gap: 8px; }
    .input-wrapper input {
        border-right: 2px solid var(--gray-200); border-radius: var(--radius-sm);
    }
    .input-wrapper input:focus { border-right-color: var(--primary); }
    .btn-verify { border-radius: var(--radius-sm); padding: 12px; }
    .result-status { padding: 20px; flex-direction: column; text-align: center; }
    .result-body { padding: 20px; }
    .result-actions { padding: 16px 20px; flex-direction: column; }
    .btn-primary, .btn-secondary, .btn-outline { justify-content: center; }
    .features { padding: 60px 0; }
    .howto { padding: 60px 0; }
    .cta-section { padding: 60px 0; }
    .cta-box { padding: 28px 20px; }
    .cta-content h2 { font-size: 22px; }
    .cta-actions { flex-direction: column; width: 100%; }
    .cta-actions a { justify-content: center; }
    .footer { padding: 40px 0 0; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; padding-bottom: 32px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .modal-body { padding: 12px; }
    .cert-real-badge { width: 70px; height: 70px; top: 12px; right: 14px; }
    .badge-hasco { font-size: 14px; }
    .badge-text1 { font-size: 6px; }
    .badge-text2 { font-size: 7px; }
    .cert-real-header { padding: 0 80px 0 14px; top: 14px; }
    .cert-real-title { margin-top: 26px; }
    .cert-real-body { width: 80%; margin-top: 10px; }
    .cert-real-footer {
        grid-template-columns: 1fr 1fr; gap: 10px;
        padding: 0 14px; bottom: 46px;
    }
    .laurel-block { display: none; }
    .sig-stamp { display: none; }
    .cert-real-bottom-bar {
        grid-template-columns: 1fr; height: auto; padding: 8px 14px; gap: 4px;
    }
    .bottom-left, .bottom-right { justify-content: center; }
    .bottom-center { padding: 4px 0; order: -1; }
}

.nav-links.open {
    display: flex; position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--white); flex-direction: column;
    padding: 16px 20px; gap: 0;
    box-shadow: var(--shadow-lg); border-top: 1px solid var(--gray-200);
}
.nav-links.open .nav-link { padding: 12px 0; border-bottom: 1px solid var(--gray-100); }
.nav-links.open .nav-link:last-child { border-bottom: none; }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}
.shake { animation: shake 0.4s ease; }

/* Floating WhatsApp button */
.wa-float {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 58px;
    height: 58px;
    background: #25D366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(37,211,102,0.45), 0 2px 6px rgba(0,0,0,0.2);
    z-index: 999;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}
.wa-float:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 26px rgba(37,211,102,0.55), 0 3px 8px rgba(0,0,0,0.25);
}
.wa-float-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #25D366;
    opacity: 0.55;
    z-index: -1;
    animation: waPulse 2s infinite;
}
@keyframes waPulse {
    0% { transform: scale(1); opacity: 0.55; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* ============================================
   PRINT AREA — dedicated container ONLY visible during print
   ============================================ */
.print-area {
    position: absolute;
    left: -99999px;
    top: -99999px;
    width: 0; height: 0;
    overflow: hidden;
}
.print-area img {
    max-width: 100%;
    height: auto;
}

/* === Media print ===
   PENTING: jangan pakai "visibility:hidden" untuk menyembunyikan halaman.
   visibility:hidden tetap memakan ruang, sehingga seluruh halaman web
   (hero, form, footer) ikut dihitung sebagai halaman kosong dan gambar
   sertifikat terdorong ke halaman paling belakang. Gunakan display:none. */
@media print {
    @page { size: A4 landscape; margin: 6mm; }
    html, body {
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
    }
    /* Sembunyikan semua elemen halaman kecuali area cetak */
    body > *:not(#printArea) {
        display: none !important;
    }
    #printArea {
        position: static !important;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
    }
    #printArea img {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: 196mm !important;   /* A4 landscape 210mm - margin 2x6mm */
        object-fit: contain !important;
        margin: 0 auto !important;
        border: none !important;
        box-shadow: none !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        page-break-after: avoid !important;
        break-after: avoid !important;
    }
}
