/* TORQUEWORKS Bengkel Motor & Mobil — "TorqueSpec Garage" — Tech Spec Powerhouse archetype */

:root {
  --primary: #ff6a00;
  --primary-light: #ff9142;
  --secondary: #1a1d21;
  --accent: #ffcc00;
  --bg: #f4f4f2;
  --surface: #ffffff;
  --border: #dcdcd8;
  --text: #1a1d21;
  --text-muted: #55595e;
  --success: #1fb681;
  --warning: #f5a623;
  --danger: #e14b4b;
  --info: #2b8ce0;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(20, 20, 20, 0.1);
  --font-head: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
}

[data-theme="dark"] {
  --bg: #0e0f11;
  --surface: #17191c;
  --border: #2a2d31;
  --text: #f1f1ee;
  --text-muted: #a2a6ab;
  --primary: #ff7a1a;
  --primary-light: #ffa15c;
  --secondary: #101214;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

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

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--text); line-height: 1.25; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--primary); color: #1a1000; padding: 8px 16px; z-index: 999; }
.skip-link:focus { left: 8px; top: 8px; }

.section { padding: 88px 0; }
.section-dark { background: var(--secondary); color: #f1f1ee; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.eyebrow { display: inline-block; font-family: var(--font-head); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary); margin-bottom: 10px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 12px; }
.section-head p { color: var(--text-muted); }
.section-dark .section-head p { color: #c2c4c7; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: 8px; font-weight: 600; font-family: var(--font-head); border: none; cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease; font-size: 0.95rem; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #1a1000; box-shadow: 0 10px 24px rgba(255, 106, 0, 0.35); }
.btn-outline { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }
.btn-accent { background: var(--accent); color: #1a1000; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(14, 15, 17, 0.9); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,255,255,0.08); }
[data-theme="light"] .site-header { background: rgba(255,255,255,0.92); border-bottom: 1px solid var(--border); }
.header-inner { max-width: 1180px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; color: var(--text); }
.brand em { font-style: normal; color: var(--primary); }
.main-nav .nav-list { display: flex; gap: 26px; list-style: none; }
.main-nav a { font-weight: 600; font-size: 0.9rem; color: var(--text-muted); }
.main-nav a:hover { color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.icon-btn { background: transparent; border: 1px solid var(--border); color: var(--text); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.4rem; color: var(--text); cursor: pointer; }

@media (max-width: 900px) {
  .main-nav { position: fixed; inset: 62px 0 0 0; background: var(--bg); transform: translateX(100%); transition: transform 0.3s ease; overflow-y: auto; padding: 24px; }
  .main-nav.open { transform: translateX(0); }
  .main-nav .nav-list { flex-direction: column; gap: 20px; font-size: 1.1rem; }
  .nav-toggle { display: block; }
}

/* Hero */
.hero { position: relative; background: var(--secondary); color: #f1f1ee; padding: 100px 0 80px; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255,204,0,0.04) 0 2px, transparent 2px 22px); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; position: relative; z-index: 2; }
.hero-tag { color: var(--accent); font-family: var(--font-head); letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.8rem; margin-bottom: 16px; display: inline-block; }
.hero h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); margin-bottom: 18px; color: #fff; }
.hero p { color: #c9cbce; max-width: 480px; margin-bottom: 28px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-img { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* Feature matrix */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature-cell { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; text-align: center; opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.2s ease; }
.feature-cell.in-view { opacity: 1; transform: translateY(0); }
.feature-cell:hover { box-shadow: var(--shadow); }
.feature-cell i { font-size: 1.8rem; color: var(--primary); margin-bottom: 12px; }
.feature-cell h3 { font-size: 1rem; margin-bottom: 6px; }
.feature-cell p { font-size: 0.85rem; color: var(--text-muted); }
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }

/* Deep dive */
.deepdive-list { display: flex; flex-direction: column; gap: 28px; }
.deepdive-item { display: flex; gap: 20px; opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.deepdive-item.in-view { opacity: 1; transform: translateY(0); }
.deepdive-num { font-family: var(--font-head); font-size: 1.6rem; color: var(--primary); font-weight: 800; flex-shrink: 0; }
.deepdive-item h3 { margin-bottom: 6px; font-size: 1.1rem; }
.deepdive-item p { color: var(--text-muted); }

/* Performance tabs + bar chart */
.slide-tabs { display: flex; gap: 10px; margin-bottom: 32px; flex-wrap: wrap; }
.slide-tab { padding: 10px 22px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600; cursor: pointer; font-family: var(--font-head); font-size: 0.9rem; }
.slide-tab.active { background: var(--primary); color: #1a1000; border-color: var(--primary); }
.slide-panel-inner { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 32px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.slide-img { border-radius: var(--radius); }
.slide-list { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 20px; }
.slide-list li { background: rgba(255,106,0,0.12); color: var(--primary); padding: 6px 14px; border-radius: 6px; font-size: 0.82rem; font-weight: 600; }
.bar-chart { display: flex; flex-direction: column; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 70px; align-items: center; gap: 10px; }
.bar-label { font-size: 0.82rem; color: var(--text-muted); }
.bar-track { background: var(--border); border-radius: 6px; height: 10px; overflow: hidden; }
.bar-fill { background: linear-gradient(90deg, var(--primary), var(--accent)); height: 100%; border-radius: 6px; transition: width 0.6s ease; }
.bar-value { font-size: 0.82rem; font-weight: 700; text-align: right; }
@media (max-width: 800px) { .slide-panel-inner { grid-template-columns: 1fr; } }

/* Sortable spec table */
.spec-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table.spec-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.spec-table th, .spec-table td { padding: 14px 18px; text-align: left; font-size: 0.9rem; border-bottom: 1px solid var(--border); }
.spec-table thead { background: var(--secondary); color: #f1f1ee; }
.spec-table th { cursor: pointer; user-select: none; font-family: var(--font-head); white-space: nowrap; }
.spec-table th[data-key]::after { content: '⇅'; opacity: 0.5; margin-left: 6px; font-size: 0.75rem; }
.spec-table th.sort-asc::after { content: '↑'; opacity: 1; }
.spec-table th.sort-desc::after { content: '↓'; opacity: 1; }
.spec-table tbody tr:hover { background: rgba(255, 106, 0, 0.06); }

/* Before / after slider */
.ba-slider { position: relative; max-width: 640px; margin: 0 auto; aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); cursor: ew-resize; user-select: none; }
.ba-slider img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-after { clip-path: inset(0 50% 0 0); }
.ba-handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 4px; background: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,0.15); transform: translateX(-50%); }
.ba-handle::after { content: '↔'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; background: #fff; color: #1a1d21; border-radius: 50%; display: grid; place-items: center; font-size: 1.1rem; cursor: grab; }
.ba-label { position: absolute; top: 12px; font-size: 0.75rem; font-family: var(--font-head); background: rgba(0,0,0,0.55); color: #fff; padding: 4px 10px; border-radius: 6px; }
.ba-label.left { left: 12px; }
.ba-label.right { right: 12px; }

/* Ticket / SKU grid (paket servis) */
.ticket-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.ticket-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 22px; opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.2s ease; }
.ticket-card.in-view { opacity: 1; transform: translateY(0); }
.ticket-card:hover { box-shadow: var(--shadow); }
.ticket-badge { position: absolute; top: -12px; right: 16px; background: var(--accent); color: #1a1000; font-size: 0.7rem; font-weight: 700; padding: 4px 10px; border-radius: 6px; }
.ticket-sku { font-size: 0.72rem; color: var(--text-muted); font-family: monospace; }
.ticket-card h3 { font-size: 1.05rem; margin: 6px 0 10px; }
.ticket-price { font-family: var(--font-head); font-size: 1.4rem; color: var(--primary); font-weight: 800; margin-bottom: 8px; }
.ticket-includes { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 18px; min-height: 42px; }
@media (max-width: 900px) { .ticket-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .ticket-grid { grid-template-columns: 1fr; } }

/* Sparepart spec sheet */
.menu-tabs { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.menu-tab { padding: 9px 20px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600; cursor: pointer; font-size: 0.88rem; }
.menu-tab.active { background: var(--accent); color: #1a1000; border-color: var(--accent); }
.menu-panel { display: none; }
.menu-panel.active { display: block; }
.menu-row { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "main price" "note note"; gap: 4px 12px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.menu-row-main { grid-area: main; display: flex; align-items: center; gap: 8px; }
.menu-name { font-weight: 700; font-family: var(--font-head); }
.menu-note { grid-area: note; font-size: 0.82rem; color: var(--text-muted); }
.menu-price { grid-area: price; font-weight: 700; color: var(--accent); white-space: nowrap; }
[data-theme="light"] .menu-price { color: #b36b00; }

/* Stats */
.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat-num { font-family: var(--font-head); font-size: 2.2rem; font-weight: 800; color: var(--primary-light); }
.stat-label { font-size: 0.82rem; color: #c2c4c7; margin-top: 6px; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-list { list-style: none; margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.about-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-muted); }
.about-list i { color: var(--success); margin-top: 4px; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery-item { border-radius: var(--radius); overflow: hidden; cursor: pointer; position: relative; box-shadow: var(--shadow); }
.gallery-item img { transition: transform 0.4s ease; }
.gallery-item:hover img { transform: scale(1.06); }
@media (max-width: 700px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }

/* Lightbox modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.75); display: none; align-items: center; justify-content: center; z-index: 300; padding: 24px; }
.modal-overlay.open { display: flex; }
.lightbox-box { position: relative; max-width: 720px; width: 100%; }
.lightbox-box img { border-radius: var(--radius); width: 100%; }
.modal-close { position: absolute; top: -44px; right: 0; background: rgba(255,255,255,0.15); border: none; color: #fff; width: 36px; height: 36px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; }

/* Article cards + modal */
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.article-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.2s ease; }
.article-card.in-view { opacity: 1; transform: translateY(0); }
.article-card:hover { box-shadow: var(--shadow); }
.article-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.article-body { padding: 20px; }
.article-body h3 { font-size: 1.05rem; margin-bottom: 8px; }
.article-body p { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 14px; }
.article-link { background: none; border: none; color: var(--primary); font-weight: 700; font-family: var(--font-head); font-size: 0.88rem; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 900px) { .article-grid { grid-template-columns: 1fr; } }

.article-modal-box { position: relative; max-width: 640px; width: 100%; background: var(--surface); border-radius: var(--radius); overflow: hidden; max-height: 85vh; overflow-y: auto; }
.article-modal-box img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.article-modal-content { padding: 24px; }
.article-modal-content h3 { margin-bottom: 12px; font-size: 1.25rem; }
.article-modal-content p { color: var(--text-muted); font-size: 0.94rem; }
.article-modal-box .modal-close { top: 12px; right: 12px; background: rgba(0,0,0,0.5); }

/* Testimonials */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.testimonial-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.testimonial-card.in-view { opacity: 1; transform: translateY(0); }
.stars { color: var(--warning); margin-bottom: 10px; letter-spacing: 2px; }
.testimonial-name { display: block; margin-top: 14px; font-weight: 700; font-family: var(--font-head); font-size: 0.85rem; }
@media (max-width: 800px) { .testimonial-grid { grid-template-columns: 1fr; } }

/* FAQ */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.faq-question { width: 100%; text-align: left; padding: 18px 20px; background: none; border: none; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-family: var(--font-head); font-weight: 600; color: var(--text); font-size: 0.95rem; }
.faq-question i { transition: transform 0.3s ease; }
.faq-item.open .faq-question i { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; padding: 0 20px; }
.faq-item.open .faq-answer { max-height: 200px; padding-bottom: 18px; }
.faq-answer p { color: var(--text-muted); font-size: 0.9rem; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-info { display: flex; flex-direction: column; gap: 16px; }
.contact-info-item { display: flex; gap: 12px; align-items: flex-start; }
.contact-info-item i { color: var(--primary); font-size: 1.1rem; margin-top: 3px; }
.contact-form { display: flex; flex-direction: column; gap: 14px; }
.contact-form input, .contact-form textarea { padding: 13px 16px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-family: var(--font-body); font-size: 0.92rem; }
.contact-form textarea { resize: vertical; min-height: 110px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { background: var(--secondary); color: #c2c4c7; padding: 56px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-grid h4 { color: #fff; font-size: 0.95rem; margin-bottom: 14px; }
.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-grid a { color: #b7b9bc; font-size: 0.88rem; }
.footer-grid a:hover { color: var(--primary-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: 0.82rem; color: #8f9195; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }

/* Floating buttons */
.float-btn { position: fixed; right: 24px; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(0,0,0,0.25); z-index: 90; border: none; cursor: pointer; font-size: 1.3rem; }
.wa-float { bottom: 24px; background: #25d366; color: #fff; animation: pulse 2.2s infinite; }
.back-to-top { bottom: 90px; background: var(--primary); color: #1a1000; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.back-to-top.visible { opacity: 1; pointer-events: auto; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(37,211,102,0.5); } 50% { box-shadow: 0 0 0 12px rgba(37,211,102,0); } }

/* Toast */
.toast-container { position: fixed; bottom: 24px; left: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 200; max-width: 340px; }
.toast { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; display: flex; gap: 10px; align-items: flex-start; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); transition: opacity 0.3s ease, transform 0.3s ease; font-size: 0.86rem; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast i { color: var(--success); margin-top: 2px; }

/* Reveal generic */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* Responsive section spacing */
@media (max-width: 700px) {
  .section { padding: 56px 0; }
  .slide-panel-inner { padding: 20px; }
}
