/*
 * public/css/app.css
 * Kawi Aluminium — Production Stylesheet
 * ─────────────────────────────────────────
 * Organisation:
 *   1. Variables (design tokens)
 *   2. Reset & base
 *   3. Typography
 *   4. Layout utilities
 *   5. Components (btn, badge, card, form, alert)
 *   6. Sections (navbar, hero, trust-bar, etc.)
 *   7. Page-specific (produk, proyek, kontak)
 *   8. Floating WhatsApp button
 *   9. Responsive breakpoints
 */

/* ═══════════════════════════════════════════════
   1. DESIGN TOKENS (CSS custom properties)
   ─────────────────────────────────────────────
   Change a colour here and it updates everywhere.
═══════════════════════════════════════════════ */
:root {
    --primary:        #1a56db;
    --primary-dark:   #1341b0;
    --primary-light:  #eff6ff;
    --primary-border: #bfdbfe;

    --text:           #111827;
    --text-muted:     #6b7280;
    --text-light:     #9ca3af;

    --bg:             #ffffff;
    --bg-gray:        #f9fafb;
    --border:         #e5e7eb;
    --border-strong:  #d1d5db;

    --success-bg:     #d1fae5;
    --success-border: #6ee7b7;
    --success-text:   #065f46;

    --error-text:     #dc2626;
    --error-bg:       #fef2f2;
    --error-border:   #fecaca;

    --wa-green:       #25D366;
    --wa-dark:        #1da851;

    --radius:         8px;
    --radius-lg:      12px;
    --radius-xl:      16px;

    --shadow-sm:      0 1px 2px rgba(0,0,0,0.06);
    --shadow:         0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md:      0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg:      0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.04);

    --navbar-h:       64px;
    --container-w:    1100px;
}

/* ═══════════════════════════════════════════════
   2. RESET & BASE
═══════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    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; }
ul, ol { list-style: none; }

/* ═══════════════════════════════════════════════
   3. TYPOGRAPHY
═══════════════════════════════════════════════ */
h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); font-weight: 700; line-height: 1.2; color: var(--text); }
h2 { font-size: clamp(1.25rem, 3vw, 1.6rem);  font-weight: 600; line-height: 1.3; color: var(--text); }
h3 { font-size: 1.05rem; font-weight: 600; color: var(--text); }
p  { color: var(--text-muted); }

/* ═══════════════════════════════════════════════
   4. LAYOUT UTILITIES
═══════════════════════════════════════════════ */
.container {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section        { padding: 4rem 0; }
.section--gray  { background: var(--bg-gray); }

.section__header  { margin-bottom: 2.5rem; }
.section__label   {
    display: block;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--primary); margin-bottom: 0.4rem;
}
.section__title   { margin-bottom: 0.4rem; }
.section__sub     { max-width: 520px; }
.section__footer  { text-align: center; margin-top: 2.5rem; }

/* ═══════════════════════════════════════════════
   5. COMPONENTS
═══════════════════════════════════════════════ */

/* ─── Buttons ──────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 0.65rem 1.35rem;
    border-radius: var(--radius);
    font-size: 0.9rem; font-weight: 500;
    border: 1.5px solid transparent;
    cursor: pointer; transition: all 0.15s;
    text-decoration: none; white-space: nowrap;
    font-family: inherit;
}
.btn:hover { text-decoration: none; }

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

.btn--outline  { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn--outline:hover { background: var(--bg-gray); color: var(--text); }

.btn--whatsapp { background: var(--wa-green); color: #fff; border-color: var(--wa-green); }
.btn--whatsapp:hover { background: var(--wa-dark); border-color: var(--wa-dark); color: #fff; }

.btn--sm  { padding: 0.45rem 0.9rem; font-size: 0.82rem; }
.btn--lg  { padding: 0.8rem 1.6rem;  font-size: 0.95rem; }
.btn--full { width: 100%; justify-content: center; }

/* ─── Badges ───────────────────────────────── */
.badge {
    display: inline-block;
    font-size: 0.72rem; font-weight: 600;
    padding: 3px 11px; border-radius: 20px;
    background: var(--primary-light); color: var(--primary);
}
.badge--featured { background: #fef3c7; color: #92400e; }

/* ─── Alert ────────────────────────────────── */
.alert {
    display: flex; align-items: center; gap: 10px;
    padding: 1rem 1.25rem; border-radius: var(--radius);
    font-size: 0.9rem; margin-bottom: 1.5rem;
}
.alert--success { background: var(--success-bg); border: 1px solid var(--success-border); color: var(--success-text); }

/* ─── Forms ────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }
.form-group label {
    display: block;
    font-size: 0.85rem; font-weight: 500;
    color: var(--text); margin-bottom: 0.35rem;
}
.form-required { color: var(--error-text); }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.9rem;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius);
    font-size: 0.9rem; color: var(--text);
    background: var(--bg); font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,86,219,0.12);
}
.form-group textarea { resize: vertical; min-height: 110px; }
.input--error { border-color: var(--error-text) !important; }
.form-error {
    display: flex; align-items: center; gap: 5px;
    font-size: 0.8rem; color: var(--error-text); margin-top: 5px;
}

/* ─── Image Placeholder ─────────────────────── */
/* Replace these with real <img> tags in production */
.img-placeholder {
    background: var(--primary-light);
    border: 2px dashed var(--primary-border);
    border-radius: var(--radius-lg);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 8px; padding: 2rem; text-align: center;
    color: var(--primary); min-height: 200px;
}
.img-placeholder span  { font-size: 3rem; }
.img-placeholder p     { font-size: 0.9rem; font-weight: 500; color: var(--primary); }
.img-placeholder small { font-size: 0.75rem; color: var(--text-light); }
.img-placeholder--lg   { min-height: 320px; }

/* ─── Checklist ─────────────────────────────── */
.checklist { display: flex; flex-direction: column; gap: 0.5rem; }
.checklist li {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 0.9rem; color: var(--text-muted);
}
.checklist li .ti-check { color: var(--primary); flex-shrink: 0; margin-top: 3px; }

/* ─── Tag List ───────────────────────────────── */
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
    font-size: 0.78rem; font-weight: 500;
    padding: 4px 12px; border-radius: 20px;
    background: var(--bg-gray); color: var(--text-muted);
    border: 1px solid var(--border);
}

/* ─── Breadcrumb ─────────────────────────────── */
.breadcrumb {
    background: var(--bg-gray);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
}
.breadcrumb ol {
    display: flex; align-items: center; gap: 0.4rem;
    font-size: 0.82rem; color: var(--text-light);
}
.breadcrumb a { color: var(--primary); }
.breadcrumb [aria-current="page"] { color: var(--text-muted); }

/* ═══════════════════════════════════════════════
   6. SECTIONS
═══════════════════════════════════════════════ */

/* ─── Navbar ─────────────────────────────────── */
.navbar {
    position: sticky; top: 0; z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    height: var(--navbar-h);
}
.navbar__inner {
    display: flex; align-items: center;
    justify-content: space-between; height: 100%;
}
.navbar__brand {
    display: flex; align-items: center; gap: 8px;
    font-size: 1rem; font-weight: 600; color: var(--text);
    text-decoration: none;
}
.navbar__brand:hover { text-decoration: none; }
.navbar__brand-name { font-size: 1.5rem;}
.navbar__links {
    display: flex; align-items: center; gap: 0.15rem;
    list-style: none;
}
.navbar__links a {
    display: block;
    padding: 0.4rem 0.75rem;
    font-size: 0.88rem; font-weight: 500;
    color: var(--text-muted); border-radius: var(--radius);
}
.navbar__links a:hover,
.navbar__links a.active {
    color: var(--primary);
    background: var(--primary-light);
    text-decoration: none;
}
.navbar__right { display: flex; align-items: center; gap: 0.5rem; }
.navbar__toggle { display: none; background: none; border: none; cursor: pointer; font-size: 1.25rem; color: var(--text); padding: 4px; }
.navbar__mobile { display: none; }

/* ─── Page Header ────────────────────────────── */
.page-header {
    background: var(--bg-gray);
    border-bottom: 1px solid var(--border);
    padding: 3rem 0;
}
.page-header__label {
    display: block;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--primary); margin-bottom: 0.5rem;
}
.page-header h1 { margin-bottom: 0.5rem; }

/* ─── Hero ───────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, var(--primary-light) 0%, #fff 65%);
    border-bottom: 1px solid var(--border);
    padding: 5rem 0 4rem;
}
.hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem; align-items: center;
}
.hero__eyebrow {
    display: flex; align-items: center; gap: 5px;
    font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--primary); margin-bottom: 1rem;
}
.hero__title { margin-bottom: 1rem; }
.hero__accent { color: var(--primary); }
.hero__desc { font-size: 1.05rem; margin-bottom: 1.75rem; max-width: 480px; }
.hero__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.hero__img-placeholder {
    background: var(--primary-light);
    border: 2px dashed var(--primary-border);
    border-radius: var(--radius-xl);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 8px; padding: 3rem; text-align: center;
    min-height: 280px;
}
.hero__img-placeholder span  { font-size: 3rem; }
.hero__img-placeholder p     { font-size: 0.9rem; font-weight: 500; color: var(--primary); }
.hero__img-placeholder small { font-size: 0.75rem; color: var(--text-light); }

/* ─── Trust Bar ──────────────────────────────── */
.trust-bar { background: var(--bg-gray); border-bottom: 1px solid var(--border); padding: 0.9rem 0; }
.trust-bar__items {
    display: flex; gap: 2rem;
    overflow-x: auto; padding-bottom: 2px;
}
.trust-bar__item {
    display: flex; align-items: center; gap: 7px;
    font-size: 0.82rem; font-weight: 500; color: var(--text-muted);
    white-space: nowrap; flex-shrink: 0;
}
.trust-bar__item .ti { color: var(--primary); font-size: 1rem; }

/* ─── Featured Banner ────────────────────────── */
.featured-banner { background: var(--primary-light); border-top: 1px solid var(--primary-border); border-bottom: 1px solid var(--primary-border); }
.featured-banner__inner {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 3rem; align-items: center;
}
.featured-banner__list {
    display: flex; flex-direction: column; gap: 0.4rem;
    margin: 1rem 0 1.5rem;
}
.featured-banner__list li {
    display: flex; align-items: center; gap: 7px;
    font-size: 0.9rem; color: var(--text-muted);
}
.featured-banner__list .ti-check { color: var(--primary); flex-shrink: 0; }

/* ─── Products Grid ──────────────────────────── */
.produk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}
.produk-grid--sm { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.produk-card {
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: box-shadow 0.15s, border-color 0.15s;
}
.produk-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.produk-card--featured { border-color: var(--primary); border-width: 2px; }
.produk-card__icon   { font-size: 2rem; margin-bottom: 0.85rem; }
.produk-card__nama   { font-size: 1rem; margin: 0.4rem 0; }
.produk-card__desc   { font-size: 0.85rem; line-height: 1.6; }
.produk-card__link   {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 0.82rem; font-weight: 500; color: var(--primary);
    margin-top: 0.85rem;
}
.produk-card__link:hover { text-decoration: underline; }

/* ─── Product Detail Card (index page) ──────── */
.produk-detail {
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    scroll-margin-top: calc(var(--navbar-h) + 1rem);
}
.produk-detail--featured { border-color: var(--primary); border-width: 2px; }
.produk-detail__header {
    display: flex; gap: 1.25rem; align-items: flex-start;
    margin-bottom: 1.25rem;
}
.produk-detail__icon { font-size: 2.5rem; flex-shrink: 0; }
.produk-detail__ringkasan { color: var(--text-muted); margin-top: 0.25rem; }
.produk-detail__body { margin-bottom: 1.5rem; }
.produk-detail__cols {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 2rem; margin-top: 1.25rem;
}
.produk-detail__footer { display: flex; gap: 0.75rem; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 1.25rem; }

/* ─── Product Show Page ──────────────────────── */
.produk-show__grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 3rem; align-items: start;
}
.produk-show__ringkasan { font-size: 1.05rem; margin: 0.5rem 0 1rem; }
.produk-show__cta { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 2rem; }

/* ─── Projects Grid ──────────────────────────── */
.proyek-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}
.proyek-grid--lg { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.proyek-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: box-shadow 0.15s;
}
.proyek-card:hover { box-shadow: var(--shadow-md); }
.proyek-card__img {
    height: 90px;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem;
}
.proyek-card__img--biru   { background: var(--primary-light); }
.proyek-card__img--hijau  { background: #f0fdf4; }
.proyek-card__img--kuning { background: #fffbeb; }
.proyek-card__img--ungu   { background: #f5f3ff; }

.proyek-card__body   { padding: 1rem 1.25rem; flex: 1; }
.proyek-card__tipe   { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-light); display: block; margin-bottom: 0.3rem; }
.proyek-card__nama   { font-size: 0.95rem; margin-bottom: 0.35rem; }
.proyek-card__lokasi,
.proyek-card__tahun  { font-size: 0.82rem; display: flex; align-items: center; gap: 5px; margin-top: 0.2rem; }
.proyek-card__footer { padding: 0.75rem 1.25rem; border-top: 1px solid var(--border); }
.proyek-card__link   { font-size: 0.82rem; font-weight: 500; color: var(--primary); display: inline-flex; align-items: center; gap: 4px; }

/* ─── Contact Page ───────────────────────────── */
.kontak__grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 3rem; align-items: start;
}
.kontak__card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}
.kontak__wa-cta {
    display: flex; gap: 1rem; align-items: flex-start;
}
.kontak__wa-cta > .ti {
    font-size: 2rem; color: var(--wa-green); flex-shrink: 0; margin-top: 2px;
}

.btn--whatsapp .ti {
    color: #ffffff;
}
.kontak__wa-cta strong { display: block; font-size: 0.95rem; margin-bottom: 4px; }
.kontak__info-list { display: flex; flex-direction: column; gap: 1rem; }
.kontak__info-list li { display: flex; gap: 12px; align-items: flex-start; }
.kontak__info-list .ti { color: var(--primary); font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }
.kontak__info-list strong { display: block; font-size: 0.8rem; color: var(--text-light); font-weight: 500; margin-bottom: 2px; }
.kontak__info-list span, .kontak__info-list a { font-size: 0.9rem; color: var(--text-muted); }

/* ─── CTA Section ────────────────────────────── */
.cta-section {
    background: var(--primary); padding: 4rem 0;
}
.cta-section__inner {
    display: flex; align-items: center;
    justify-content: space-between; gap: 2rem; flex-wrap: wrap;
}
.cta-section__text h2 { color: #fff; font-size: 1.5rem; }
.cta-section__text p  { color: rgba(255,255,255,0.8); margin-top: 0.4rem; }
.cta-section__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ─── Footer ─────────────────────────────────── */
.footer { background: #111827; color: #9ca3af; padding: 3.5rem 0 0; }
.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 2.5rem;
}
.footer__brand   { font-size: 1.05rem; font-weight: 700; color: #fff; margin-bottom: 0.6rem; }
.footer__tagline { font-size: 0.85rem; line-height: 1.6; margin-bottom: 1.25rem; }
.footer__heading { color: #fff; font-size: 0.88rem; font-weight: 600; margin-bottom: 1rem; }
.footer ul       { display: flex; flex-direction: column; gap: 0.5rem; }
.footer ul a     { font-size: 0.85rem; color: #9ca3af; }
.footer ul a:hover { color: #fff; text-decoration: none; }
.footer__contact-list { display: flex; flex-direction: column; gap: 0.6rem; }
.footer__contact-list li {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 0.82rem;
}
.footer__contact-list .ti { color: var(--primary); flex-shrink: 0; margin-top: 2px; }
.footer__bottom {
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
    border-top: 1px solid #374151;
    margin-top: 2.5rem; padding: 1.25rem 0;
    font-size: 0.8rem;
}

/* ═══════════════════════════════════════════════
   7. FLOATING WHATSAPP BUTTON
═══════════════════════════════════════════════ */
.whatsapp-float {
    position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 200;
    display: flex; align-items: center; gap: 8px;
    background: var(--wa-green); color: #fff;
    padding: 0.7rem 1.1rem; border-radius: 50px;
    font-size: 0.88rem; font-weight: 600;
    box-shadow: 0 4px 12px rgba(37,211,102,0.45);
    transition: transform 0.15s, box-shadow 0.15s;
    text-decoration: none;
}
.whatsapp-float:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37,211,102,0.55);
    color: #fff; text-decoration: none;
}
.whatsapp-float .ti { font-size: 1.25rem; }
.whatsapp-float__label { white-space: nowrap; }

/* ═══════════════════════════════════════════════
   8. RESPONSIVE
═══════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 900px) {
    .hero__inner,
    .featured-banner__inner,
    .produk-show__grid,
    .kontak__grid,
    .footer__grid { grid-template-columns: 1fr; }

    .hero__visual { order: -1; }
    .hero__img-placeholder { min-height: 200px; }

    .footer__grid { grid-template-columns: 1fr 1fr; }
    .footer__col--brand { grid-column: 1 / -1; }

    .cta-section__inner { flex-direction: column; text-align: center; }
    .cta-section__actions { justify-content: center; }
}

/* Mobile */
@media (max-width: 640px) {
    h1 { font-size: 1.6rem; }
    .section { padding: 2.5rem 0; }
    .hero { padding: 3rem 0 2.5rem; }

    /* Hide desktop nav, show hamburger */
    .navbar__links,
    .navbar__wa { display: none; }
    .navbar__toggle { display: block; }

    /* Mobile dropdown menu */
    .navbar__mobile {
        border-top: 1px solid var(--border);
        background: var(--bg);
        padding: 1rem 1.5rem 1.5rem;
    }
    .navbar__mobile.is-open { display: block; }
    .navbar__mobile ul { display: flex; flex-direction: column; gap: 0.25rem; }
    .navbar__mobile a {
        display: block; padding: 0.5rem 0.75rem;
        font-size: 0.95rem; font-weight: 500; color: var(--text-muted);
        border-radius: var(--radius);
    }
    .navbar__mobile a:hover { color: var(--primary); background: var(--primary-light); text-decoration: none; }

    .produk-detail__cols { grid-template-columns: 1fr; gap: 1.25rem; }
    .footer__grid { grid-template-columns: 1fr; }
    .footer__bottom { flex-direction: column; text-align: center; }

    /* Smaller WhatsApp float on mobile */
    .whatsapp-float__label { display: none; }
    .whatsapp-float { padding: 0.85rem; border-radius: 50%; }
}
