:root {
    --primary: #1d4ed8;
    --primary-dark: #1e40af;
    --secondary: #0f172a;
    --accent: #06b6d4;
    --text: #0f172a;
    --muted: #475569;
    --surface: #ffffff;
    --surface-alt: #f1f5f9;
    --border: #e2e8f0;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Sora", "Noto Sans Sinhala", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top, #e0f2fe 0%, #f8fafc 50%, #ffffff 100%);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.container {
    width: min(1100px, 92%);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 16px;
}

.brand {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.01em;
}

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

.nav a {
    font-size: 0.92rem;
    color: var(--muted);
    transition: color 0.2s ease;
}

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

.nav-toggle {
    display: none;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 1.2rem;
}

.lang-toggle {
    border: 1px solid var(--border);
    background: var(--surface-alt);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    cursor: pointer;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(30, 64, 175, 0.18);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    color: var(--primary-dark);
    border-color: rgba(29, 78, 216, 0.3);
}

.hero {
    padding: 90px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(14, 116, 144, 0.1));
    z-index: 0;
}

.hero-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.75rem;
    color: var(--primary-dark);
    font-weight: 600;
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin: 12px 0 16px;
}

.lead {
    color: var(--muted);
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 24px 0;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.hero-metrics strong {
    display: block;
    font-size: 1.1rem;
}

.hero-metrics span {
    color: var(--muted);
    font-size: 0.85rem;
}

.hero-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(226, 232, 240, 0.9);
    padding: 24px;
}

.hero-card-inner {
    display: grid;
    gap: 18px;
}

.snapshot {
    display: grid;
    gap: 12px;
}

.snapshot div {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

.status-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--muted);
}

.dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 999px;
}

.section {
    padding: 70px 0;
}

.section.alt {
    background: var(--surface-alt);
}

.section-title h2 {
    margin: 12px 0 32px;
    font-size: clamp(1.7rem, 2.8vw, 2.4rem);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 22px;
    border: 1px solid var(--border);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.card h3 {
    margin-top: 0;
}

.card p {
    color: var(--muted);
    line-height: 1.6;
}

.why-grid {
    display: grid;
    gap: 18px;
}

.why-item {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: start;
    border: 1px solid var(--border);
}

.icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e0f2fe;
    font-size: 1.2rem;
}

.certificate-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    align-items: center;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.certificate-preview {
    border-radius: 16px;
    border: 1px dashed rgba(29, 78, 216, 0.35);
    padding: 28px;
    background: linear-gradient(180deg, #ffffff 0%, #eef2ff 100%);
    min-height: 220px;
    display: grid;
    gap: 12px;
    position: relative;
}

.certificate-preview.large {
    min-height: 300px;
}

.certificate-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.certificate-badge {
    background: rgba(29, 78, 216, 0.12);
    color: var(--primary-dark);
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 600;
    width: fit-content;
}


.certificate-actions p {
    color: var(--muted);
    line-height: 1.6;
}

.button-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.helper {
    margin-top: 10px;
    color: #dc2626;
    font-size: 0.9rem;
    min-height: 1.2em;
}

.note {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--muted);
}

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

.terms li {
    background: var(--surface);
    border-radius: 14px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    line-height: 1.6;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.contact-info h3 {
    margin-top: 0;
}

.contact-info p {
    color: var(--muted);
    margin: 8px 0;
}

.contact-form {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 22px;
    border: 1px solid var(--border);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.field {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
}

.field input,
.field textarea {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 1rem;
    font-family: inherit;
}

.field input:focus,
.field textarea:focus {
    outline: 2px solid rgba(29, 78, 216, 0.3);
    border-color: rgba(29, 78, 216, 0.4);
}

.toast {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(34, 197, 94, 0.12);
    color: #166534;
    display: none;
}

.site-footer {
    padding: 40px 0;
    background: #0f172a;
    color: #e2e8f0;
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.footer-links a {
    display: block;
    margin-bottom: 6px;
    color: #cbd5f5;
}

.copyright {
    font-size: 0.85rem;
    color: #94a3b8;
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 2000;
}

.modal.is-open {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
}

.modal-content {
    position: relative;
    background: var(--surface);
    border-radius: 20px;
    padding: 24px;
    max-width: 640px;
    width: 100%;
    box-shadow: var(--shadow);
    z-index: 1;
    display: grid;
    gap: 16px;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    border: none;
    background: var(--surface-alt);
    border-radius: 999px;
    width: 32px;
    height: 32px;
    cursor: pointer;
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .nav {
        position: absolute;
        top: 64px;
        right: 4%;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 16px;
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        min-width: 220px;
        box-shadow: var(--shadow);
        display: none;
    }

    .site-header.nav-open .nav {
        display: flex;
    }

    .nav-toggle {
        display: inline-flex;
    }
}

@media (max-width: 600px) {
    .hero {
        padding-top: 70px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
}
