/* ==========================================================================
   GrahaKarya Konstruksi — Jasa Kontraktor Bangunan/Renovasi
   Style: "GrahaKarya Directory" (Corporate Institutional Directory archetype)
   ========================================================================== */

:root {
  --primary: #16324a;
  --primary-light: #1f4a6e;
  --secondary: #6b7280;
  --accent: #ff6a13;
  --accent-light: #ffb27a;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --border: #dfe4ea;
  --text: #1c2733;
  --text-muted: #5a6472;
  --success: #1f9d55;
  --warning: #f59e0b;
  --danger: #e3342f;
  --info: #2f80ed;
  --radius: 10px;
  --shadow: 0 4px 16px rgba(22, 50, 74, 0.08);
  --shadow-lg: 0 12px 32px rgba(22, 50, 74, 0.16);
  --font-head: 'Barlow Semi Condensed', Arial, sans-serif;
  --font-body: 'Inter', Arial, sans-serif;
}

:root[data-theme="dark"] {
  --primary: #2e6690;
  --primary-light: #3d84b6;
  --secondary: #9aa4b2;
  --accent: #ff8a3d;
  --accent-light: #ffcc9e;
  --bg: #0f1a24;
  --surface: #16232f;
  --border: #253544;
  --text: #eaf0f5;
  --text-muted: #a9b6c3;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #2e6690;
    --primary-light: #3d84b6;
    --secondary: #9aa4b2;
    --accent: #ff8a3d;
    --accent-light: #ffcc9e;
    --bg: #0f1a24;
    --surface: #16232f;
    --border: #253544;
    --text: #eaf0f5;
    --text-muted: #a9b6c3;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0 0 0.5em; font-weight: 700; }
p { margin: 0 0 1em; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.text-center { text-align: center; }
.eyebrow { display: inline-block; color: var(--accent); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.8rem; margin-bottom: 10px; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.section-desc { color: var(--text-muted); max-width: 640px; margin: 0 auto 40px; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent); color: #fff; padding: 10px 16px; z-index: 2000; }
.skip-link:focus { left: 10px; top: 10px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 8px; font-weight: 700; cursor: pointer;
  border: 2px solid transparent; font-size: 0.95rem; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
  font-family: var(--font-body);
}
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-outline { background: transparent; border-color: var(--surface); color: var(--surface); }
.btn-outline-dark { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline-dark:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* ---- Navbar ---- */
.navbar {
  position: sticky; top: 0; z-index: 900;
  background: var(--surface); border-bottom: 1px solid var(--border);
  transition: box-shadow 0.25s ease;
}
.navbar.is-scrolled { box-shadow: var(--shadow); }
.navbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; max-width: 1200px; margin: 0 auto; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; color: var(--primary); }
.brand-mark { width: 38px; height: 38px; border-radius: 8px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.nav-menu { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-menu > li { position: relative; }
.nav-link { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 6px; font-weight: 600; color: var(--text); font-size: 0.94rem; }
.nav-link:hover, .nav-link.active { color: var(--accent); }
.nav-dropdown { position: absolute; top: 100%; left: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); min-width: 240px; padding: 10px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: all 0.18s ease; }
.nav-menu > li:hover .nav-dropdown, .nav-menu > li.open .nav-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown a { display: block; padding: 10px 12px; border-radius: 6px; font-size: 0.9rem; }
.nav-dropdown a:hover { background: var(--bg); color: var(--accent); }
.nav-dropdown small { display: block; color: var(--text-muted); font-weight: 400; margin-top: 2px; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle { background: var(--bg); border: 1px solid var(--border); width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 1rem; }
.hamburger { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--primary); }

@media (max-width: 960px) {
  .nav-menu { position: fixed; inset: 0 0 0 auto; width: min(320px, 85vw); height: 100vh; background: var(--surface); flex-direction: column; align-items: stretch; padding: 90px 20px 20px; transform: translateX(100%); transition: transform 0.28s ease; overflow-y: auto; z-index: 950; box-shadow: var(--shadow-lg); }
  .nav-menu.open { transform: translateX(0); }
  .nav-dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; padding: 4px 0 4px 14px; display: none; }
  .nav-menu > li.open .nav-dropdown { display: block; }
  .hamburger { display: block; }
  .nav-menu > li { border-bottom: 1px solid var(--border); }
}

/* ---- Hero ---- */
.hero { background: linear-gradient(120deg, var(--primary) 0%, var(--primary-light) 100%); color: #fff; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; padding: 70px 0; }
.hero h1 { font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.15; }
.hero-lead { color: #d9e4ec; max-width: 520px; font-size: 1.05rem; }
.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 28px; }
.hero-badge { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25); padding: 6px 14px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-visual { border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-lg); }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 50px; border-top: 1px solid rgba(255,255,255,0.2); padding-top: 30px; }
.hero-stat b { display: block; font-size: 1.8rem; font-family: var(--font-head); }
.hero-stat span { color: #cfe0ea; font-size: 0.85rem; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; padding: 40px 0; } .hero-stats { grid-template-columns: repeat(2,1fr); } }

/* ---- Certification badges (accreditation row) ---- */
.badge-row { background: var(--surface); border-bottom: 1px solid var(--border); padding: 26px 0; }
.badge-track { display: flex; gap: 34px; overflow-x: auto; align-items: center; scrollbar-width: none; }
.badge-track::-webkit-scrollbar { display: none; }
.badge-item { display: flex; align-items: center; gap: 10px; flex-shrink: 0; color: var(--text-muted); font-weight: 700; font-size: 0.85rem; white-space: nowrap; }
.badge-item i { color: var(--accent); font-size: 1.3rem; }

/* ---- Cards generic ---- */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 620px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card-body { padding: 22px; }
.card-tag { display: inline-block; background: var(--bg); color: var(--primary); font-size: 0.72rem; font-weight: 700; padding: 4px 10px; border-radius: 20px; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.04em; }

/* ---- Services ---- */
.service-icon { width: 56px; height: 56px; border-radius: 12px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 16px; }
.service-list { list-style: none; padding: 0; margin: 14px 0 0; }
.service-list li { padding: 6px 0 6px 26px; position: relative; font-size: 0.92rem; color: var(--text-muted); }
.service-list li::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 0; color: var(--accent); }

/* ---- Timeline (proses kerja) ---- */
.process-timeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; position: relative; margin-top: 30px; }
.process-timeline::before { content: ""; position: absolute; top: 50px; left: 6%; right: 6%; height: 3px; background: var(--border); z-index: 0; }
.process-step { position: relative; z-index: 1; text-align: center; }
.process-step img { width: 90px; height: 90px; margin: 0 auto 16px; }
.process-step h4 { font-size: 1rem; }
.process-step p { font-size: 0.85rem; color: var(--text-muted); }
.process-num { position: absolute; top: -6px; right: 32%; background: var(--accent); color: #fff; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 800; }
@media (max-width: 860px) { .process-timeline { grid-template-columns: 1fr; } .process-timeline::before { display: none; } }

/* ---- Project portfolio (chronological case studies) ---- */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.chip { border: 1px solid var(--border); background: var(--surface); padding: 8px 18px; border-radius: 20px; font-weight: 600; font-size: 0.85rem; cursor: pointer; }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.project-list { display: flex; flex-direction: column; gap: 22px; }
.project-row { display: grid; grid-template-columns: 260px 1fr; gap: 26px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; align-items: center; }
.project-row .thumb { border-radius: 8px; overflow: hidden; }
.project-year { font-family: var(--font-head); font-size: 1.6rem; color: var(--accent); font-weight: 800; }
.project-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.82rem; color: var(--text-muted); margin: 8px 0 14px; }
.project-meta span { display: flex; align-items: center; gap: 6px; }
@media (max-width: 720px) { .project-row { grid-template-columns: 1fr; } }

/* ---- Before/After slider ---- */
.ba-slider { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 7/5; user-select: none; box-shadow: var(--shadow); }
.ba-slider img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-slider .ba-after { clip-path: inset(0 0 0 50%); }
.ba-handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 4px; background: #fff; cursor: ew-resize; transform: translateX(-2px); box-shadow: 0 0 0 2px rgba(0,0,0,0.15); }
.ba-handle::after { content: "\f337"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); background: var(--accent); color: #fff; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.ba-label { position: absolute; top: 14px; padding: 4px 12px; border-radius: 6px; background: rgba(0,0,0,0.55); color: #fff; font-size: 0.78rem; font-weight: 700; }
.ba-label.left { left: 14px; }
.ba-label.right { right: 14px; }
.ba-range { width: 100%; margin-top: 12px; accent-color: var(--accent); }

/* ---- Team / Engineer directory ---- */
.directory-toolbar { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-bottom: 30px; }
.search-box { flex: 1; min-width: 220px; position: relative; }
.search-box input { width: 100%; padding: 12px 16px 12px 42px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 0.95rem; }
.search-box i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.team-card { text-align: center; padding: 24px 18px; }
.team-card img { width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 14px; }
.team-card .role { color: var(--accent); font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.03em; }
.team-card .spec { color: var(--text-muted); font-size: 0.85rem; margin-top: 6px; }
.no-result { text-align: center; padding: 40px 20px; color: var(--text-muted); display: none; }
.no-result.show { display: block; }

/* ---- Announcements (chronological) ---- */
.announce-item { display: grid; grid-template-columns: 90px 1fr; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.announce-date { text-align: center; }
.announce-date b { display: block; font-size: 1.7rem; font-family: var(--font-head); color: var(--primary); }
.announce-date span { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; }

/* ---- Stat counter ---- */
.stat-band { background: var(--primary); color: #fff; }
.stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; text-align: center; }
.stat-grid b { font-size: 2.2rem; font-family: var(--font-head); display: block; }
@media (max-width: 720px) { .stat-grid { grid-template-columns: repeat(2,1fr); } }

/* ---- FAQ Accordion ---- */
.accordion-item { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 12px; overflow: hidden; background: var(--surface); }
.accordion-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; cursor: pointer; font-weight: 700; }
.accordion-head i { transition: transform 0.25s ease; color: var(--accent); }
.accordion-item.open .accordion-head i { transform: rotate(45deg); }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; color: var(--text-muted); }
.accordion-body-inner { padding: 0 20px 18px; }
.accordion-item.open .accordion-body { max-height: 400px; }

/* ---- Gallery ---- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery-grid figure { margin: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in; position: relative; }
.gallery-grid img { transition: transform 0.3s ease; }
.gallery-grid figure:hover img { transform: scale(1.06); }
@media (max-width: 860px) { .gallery-grid { grid-template-columns: repeat(2,1fr); } }

/* ---- Testimonials ---- */
.testi-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.testi-stars { color: var(--warning); margin-bottom: 10px; }
.testi-who { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.testi-who img { width: 44px; height: 44px; border-radius: 50%; }

/* ---- Forms ---- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 0.9rem; }
.form-control { width: 100%; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-family: var(--font-body); font-size: 0.95rem; }
.form-control:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea.form-control { resize: vertical; min-height: 110px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }

/* ---- RFQ Panel (Ajukan Penawaran) ---- */
.rfq-band { background: linear-gradient(120deg, var(--primary), var(--primary-light)); color: #fff; border-radius: 16px; padding: 44px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .rfq-band { grid-template-columns: 1fr; padding: 30px; } }
.rfq-widget-box { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.2); border-radius: 12px; padding: 20px; }
.rfq-list-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px dashed rgba(255,255,255,0.2); font-size: 0.9rem; }
.rfq-list-item button { background: none; border: none; color: #ffb27a; cursor: pointer; font-size: 1rem; }
.rfq-empty { color: #cfe0ea; font-size: 0.9rem; }

/* ---- Footer ---- */
footer { background: var(--primary); color: #d9e4ec; padding: 60px 0 24px; margin-top: 40px; }
:root[data-theme="dark"] footer, @media (prefers-color-scheme:dark){ footer { background: #0a141d; } }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.footer-grid h5 { color: #fff; font-family: var(--font-head); margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; font-size: 0.9rem; }
.footer-grid a:hover { color: var(--accent-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); margin-top: 40px; padding-top: 20px; text-align: center; font-size: 0.82rem; color: #a9bfcb; }
.social-icons { display: flex; gap: 10px; margin-top: 14px; }
.social-icons a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---- Floating elements ---- */
.float-wa { position: fixed; bottom: 24px; right: 24px; width: 58px; height: 58px; border-radius: 50%; background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; box-shadow: var(--shadow-lg); z-index: 500; animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,0.5);} 70% { box-shadow: 0 0 0 16px rgba(37,211,102,0);} 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0);} }
.back-to-top { position: fixed; bottom: 24px; right: 92px; width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg); z-index: 500; opacity: 0; pointer-events: none; transition: opacity 0.25s ease; cursor: pointer; border: none; }
.back-to-top.show { opacity: 1; pointer-events: auto; }

/* ---- Modal ---- */
.modal-overlay { position: fixed; inset: 0; background: rgba(10,20,30,0.55); display: flex; align-items: center; justify-content: center; z-index: 1200; opacity: 0; visibility: hidden; transition: all 0.2s ease; padding: 20px; }
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-box { background: var(--surface); border-radius: 14px; max-width: 640px; width: 100%; max-height: 88vh; overflow-y: auto; padding: 30px; transform: translateY(20px); transition: transform 0.25s ease; position: relative; }
.modal-overlay.open .modal-box { transform: translateY(0); }
.modal-close { position: absolute; top: 16px; right: 16px; background: var(--bg); border: none; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 1rem; }
.modal-box img { border-radius: 10px; margin-bottom: 16px; }

/* ---- Toast ---- */
.toast-wrap { position: fixed; top: 20px; right: 20px; z-index: 1500; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--surface); border-left: 4px solid var(--success); box-shadow: var(--shadow-lg); border-radius: 8px; padding: 14px 18px; min-width: 260px; max-width: 340px; display: flex; gap: 10px; align-items: flex-start; transform: translateX(120%); transition: transform 0.3s ease; }
.toast.show { transform: translateX(0); }
.toast i { color: var(--success); margin-top: 2px; }
.toast.error { border-left-color: var(--danger); }
.toast.error i { color: var(--danger); }

/* ---- Skeleton loading ---- */
.skeleton { background: linear-gradient(90deg, var(--border) 25%, var(--bg) 50%, var(--border) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 200% 0;} 100% { background-position: -200% 0;} }

/* ---- Reveal on scroll ---- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---- Breadcrumb / page header ---- */
.page-header { background: linear-gradient(120deg, var(--primary), var(--primary-light)); color: #fff; padding: 60px 0 50px; }
.breadcrumb { font-size: 0.85rem; color: #cfe0ea; margin-bottom: 10px; }
.breadcrumb a { color: #fff; font-weight: 600; }

/* ---- Detail split ---- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 46px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ---- Utility ---- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-accent { color: var(--accent); }
.bg-surface { background: var(--surface); }
.border-top { border-top: 1px solid var(--border); }
.tag-pill { display: inline-block; background: var(--bg); border: 1px solid var(--border); padding: 4px 12px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; margin: 2px 4px 2px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
