/* ============================================================================
   InspeksiKendaraan — Public site stylesheet
   Mobile-first, no external dependencies.
   ============================================================================ */

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

:root {
    --primary: #0F766E;
    --primary-dark: #115e59;
    --primary-light: #ccfbf1;
    --accent: #F59E0B;
    --accent-dark: #b45309;
    --accent-light: #fef3c7;
    --text: #0f172a;
    --text-muted: #475569;
    --text-soft: #64748b;
    --bg: #ffffff;
    --bg-soft: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --success: #16a34a;
    --success-bg: #ecfdf5;
    --warning: #d97706;
    --warning-bg: #fffbeb;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 28px rgba(0,0,0,0.12);
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --container-w: 1180px;
    --header-h: 64px;
}

html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5 { color: var(--text); font-weight: 700; line-height: 1.25; margin: 0 0 12px; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 12px; padding-left: 1.2rem; }

.container { width: 100%; max-width: var(--container-w); margin: 0 auto; padding: 0 16px; }
.skip-link { position: absolute; left: -9999px; top: 0; background: #000; color: #fff; padding: 8px 12px; z-index: 9999; }
.skip-link:focus { left: 8px; }

/* ===== Header ===== */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    height: var(--header-h);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); font-size: 1.05rem; }
.brand-icon { font-size: 1.4rem; }
.brand-logo { height: 32px; width: auto; }
.brand-name { white-space: nowrap; }

.main-nav { display: flex; align-items: center; }
.nav-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav-menu li a { padding: 8px 12px; color: var(--text); border-radius: var(--radius-sm); font-size: 0.92rem; }
.nav-menu li a:hover { background: var(--bg-soft); text-decoration: none; }

.nav-toggle {
    display: none;
    background: none; border: 0; padding: 8px;
    cursor: pointer;
}
.nav-toggle span {
    display: block; width: 22px; height: 2px; background: var(--text); margin: 4px 0;
    transition: all 0.2s;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: 0;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    line-height: 1.2;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; text-decoration: none; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--text-muted); padding: 6px 12px; }
.btn-ghost:hover { background: var(--bg-soft); text-decoration: none; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }

/* ===== Cards ===== */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.card-hover:hover { box-shadow: var(--shadow); transform: translateY(-2px); transition: all 0.15s; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #134e4a 100%);
    color: #fff;
    padding: 64px 0 48px;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute; right: -10%; top: -10%;
    width: 60%; height: 120%;
    background: radial-gradient(ellipse at center, rgba(245,158,11,0.18) 0%, transparent 60%);
}
.hero-inner { position: relative; z-index: 1; max-width: 760px; }
.hero h1 { color: #fff; font-size: 2.25rem; line-height: 1.15; margin-bottom: 16px; }
.hero .lead { font-size: 1.15rem; opacity: 0.95; margin-bottom: 24px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 600px) {
    .hero { padding: 40px 0 32px; }
    .hero h1 { font-size: 1.6rem; }
    .hero .lead { font-size: 1rem; }
}

/* ===== Sections ===== */
.section { padding: 56px 0; }
.section-soft { background: var(--bg-soft); }
.section-title { text-align: center; margin-bottom: 32px; }
.section-title h2 { font-size: 1.8rem; }
.section-title p { color: var(--text-muted); max-width: 640px; margin: 0 auto; }

/* ===== Pricing ===== */
.price-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    background: #fff;
    display: flex; flex-direction: column;
    height: 100%;
}
.price-card.featured {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(15, 118, 110, 0.12);
    transform: translateY(-4px);
}
.price-card .pkg-name { font-size: 1.1rem; font-weight: 700; }
.price-card .pkg-tag { font-size: 0.8rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.price-card .pkg-price { font-size: 2rem; font-weight: 800; color: var(--primary); margin: 8px 0; }
.price-card .pkg-price small { font-size: 0.9rem; font-weight: 400; color: var(--text-muted); }
.price-card ul { list-style: none; padding: 0; margin: 16px 0; flex-grow: 1; }
.price-card ul li { padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 0.92rem; }
.price-card ul li::before { content: '✓ '; color: var(--success); font-weight: 700; }

/* ===== Steps / how it works ===== */
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
@media (max-width: 800px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .steps-grid { grid-template-columns: 1fr; } }
.step-card { text-align: center; padding: 20px 12px; }
.step-card .step-num {
    display: inline-flex; width: 44px; height: 44px; border-radius: 50%;
    background: var(--primary); color: #fff; font-weight: 700; font-size: 1.2rem;
    align-items: center; justify-content: center; margin-bottom: 12px;
}

/* ===== Forms ===== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.92rem; }
.form-group .hint { font-weight: 400; color: var(--text-muted); font-size: 0.85rem; }
.form-control, input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="tel"], input[type="date"], select, textarea {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}
.form-row { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* ===== Badges & status pills ===== */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }
.badge-accent { background: var(--accent-light); color: var(--accent-dark); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }

/* ===== Tables ===== */
.table-wrap { overflow-x: auto; }
table.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
table.data-table th, table.data-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
}
table.data-table th { background: var(--bg-soft); font-weight: 700; }
table.data-table tr:hover td { background: #fafbfc; }

/* ===== Alerts ===== */
.alert { padding: 12px 16px; border-radius: var(--radius); margin: 12px 0; }
.alert-error { background: var(--danger-bg); color: var(--danger); border: 1px solid #fecaca; }
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid #a7f3d0; }
.alert-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid #fde68a; }
.alert-info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* ===== Footer ===== */
.site-footer { background: #0f172a; color: #cbd5e1; padding: 40px 0 0; margin-top: 60px; }
.site-footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 12px; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 24px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { padding: 4px 0; }
.footer-bottom { background: #020617; padding: 12px 0; font-size: 0.85rem; }
@media (max-width: 800px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== Breadcrumb ===== */
.breadcrumb { list-style: none; padding: 0; margin: 0 0 16px; display: flex; gap: 8px; flex-wrap: wrap; font-size: 0.85rem; color: var(--text-muted); }
.breadcrumb li::after { content: ' / '; }
.breadcrumb li:last-child::after { content: ''; }

/* ===== Mobile menu ===== */
@media (max-width: 880px) {
    .nav-toggle { display: block; }
    .nav-menu {
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        gap: 0;
        padding: 8px;
        box-shadow: var(--shadow);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
    }
    .nav-menu.open { max-height: 80vh; }
    .nav-menu li { width: 100%; }
    .nav-menu li a { display: block; padding: 12px; border-radius: 0; }
    .nav-menu li a.btn { padding: 12px; margin: 4px 0; text-align: center; }
}

/* ===== Misc utilities ===== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.hidden { display: none; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin: 16px 0; }
.stat-card { background: var(--bg-soft); padding: 16px; border-radius: var(--radius); border-left: 4px solid var(--primary); }
.stat-card .num { font-size: 1.8rem; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-card .label { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

/* Article content */
.prose { max-width: 720px; line-height: 1.75; }
.prose h2 { margin-top: 32px; }
.prose h3 { margin-top: 24px; }
.prose img { border-radius: var(--radius); margin: 16px 0; }
.prose ul, .prose ol { padding-left: 1.4rem; margin: 8px 0 16px; }

/* FAQ */
.faq-list details { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 8px; }
.faq-list summary { cursor: pointer; font-weight: 600; }
.faq-list details[open] summary { margin-bottom: 8px; }

/* Print friendly */
@media print {
    .site-header, .site-footer, .nav-toggle, .btn { display: none !important; }
    body { color: #000; }
    main { padding: 0 !important; }
}
