html { -webkit-text-size-adjust: 100%; }
body { font-family: Inter, system-ui, sans-serif; color: #111827; background: #fff; overflow-x: hidden; }
.js-loading [data-hero] { visibility: hidden; }
:focus-visible { outline: 2px solid #E60012; outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible { outline-color: #fff; }
.font-display { letter-spacing: -0.005em; }

/* Technical backgrounds */
.grid-dark {
  background-image:
    linear-gradient(rgba(148,163,184,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,.07) 1px, transparent 1px);
  background-size: 64px 64px;
}
.grid-light {
  background-image:
    linear-gradient(rgba(17,24,39,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17,24,39,.045) 1px, transparent 1px);
  background-size: 64px 64px;
}
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .08em; }

/* Navbar */
#siteHeader { transition: background-color .3s ease, box-shadow .3s ease, backdrop-filter .3s ease; }
#siteHeader.is-scrolled { background-color: rgba(7,17,31,.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.nav-link { position: relative; }
.nav-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: #E60012; transform: scaleX(0); transform-origin: left; transition: transform .3s ease; }
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: #fff; }

/* Mobile menu */
#mobileMenu { transform: translateX(100%); transition: transform .45s cubic-bezier(.22,1,.36,1); }
#mobileMenu.is-open { transform: translateX(0); }
#menuOverlay { opacity: 0; pointer-events: none; transition: opacity .3s ease; }
#menuOverlay.is-open { opacity: 1; pointer-events: auto; }

/* Hero line mask */
.line-mask { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.line-mask > span { display: block; will-change: transform; }

/* Image fallback */
.img-wrap { position: relative; overflow: hidden; background: #0B1625; }
.img-wrap > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-wrap.img-failed > img { display: none; }
.img-wrap.img-failed::before {
  content: "ISUZU · KENDARAAN KOMERSIAL"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font: 600 13px/1 Inter, sans-serif; letter-spacing: .18em; color: #94A3B8;
  background-color: #0B1625;
  background-image: linear-gradient(rgba(148,163,184,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.08) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* Foto unit lokal berupa PNG transparan: tampilkan utuh dengan latar terang */
.img-contain { background: #F4F6F8; }
.img-contain > img { object-fit: contain; }

/* Brosur hero (portrait): tampilkan utuh dengan latar navy */
.img-hero { background: #0B1625; }
.img-hero > img { object-fit: contain; object-position: center; }

/* Vehicle cards */
.v-card { transition: border-color .3s ease, box-shadow .3s ease; }
.v-card:hover { border-color: rgba(230,0,18,.55); box-shadow: 0 18px 40px -24px rgba(7,17,31,.35); }
.v-card .img-wrap img { transition: transform .7s cubic-bezier(.22,1,.36,1); }
.v-card:hover .img-wrap img { transform: scale(1.035); }
.arrow-move { transition: transform .25s ease; }
a:hover .arrow-move, button:hover .arrow-move { transform: translateX(4px); }

/* Karoseri tiles */
.k-tile { position: relative; overflow: hidden; display: block; width: 100%; text-align: left; background: #0B1625; isolation: isolate; }
.k-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.22,1,.36,1); }
.k-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,17,31,0) 30%, rgba(7,17,31,.88) 100%); transition: background .4s ease; z-index: 1; }
.k-tile:hover::after, .k-tile:focus-visible::after { background: linear-gradient(180deg, rgba(7,17,31,.2) 0%, rgba(7,17,31,.92) 100%); }
.k-tile:hover img, .k-tile:focus-visible img { transform: scale(1.05); }
.k-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; transition: transform .45s cubic-bezier(.22,1,.36,1); }
.k-tile:hover .k-body, .k-tile:focus-visible .k-body { transform: translateY(-6px); }
.k-arrow { opacity: 0; transform: translateX(-6px); transition: opacity .3s ease, transform .3s ease; }
.k-tile:hover .k-arrow, .k-tile:focus-visible .k-arrow { opacity: 1; transform: translateX(0); }
.k-tile.img-failed img { display: none; }

/* Outline text */
.outline-text { color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.09); }
.city { transition: color .3s ease, -webkit-text-stroke-color .3s ease; color: transparent; -webkit-text-stroke: 1.2px #111827; }
.city:hover { color: #111827; }
.city.is-core { color: #111827; -webkit-text-stroke: 0; }

/* Sliders (hero banner, happy customer): native scroll-snap, driven by site.js */
.slider-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; scrollbar-width: none; }
.slider-track::-webkit-scrollbar { display: none; }
.slider-track > * { flex: 0 0 auto; scroll-snap-align: start; }
.slider-btn { position: absolute; top: 50%; z-index: 2; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9999px; background: rgba(255,255,255,.92); color: #07111F; box-shadow: 0 6px 20px rgba(7,17,31,.18); transform: translateY(-50%); transition: background-color .2s ease, color .2s ease; }
.slider-btn:hover { background: #E60012; color: #fff; }
.slider-dots button { width: 8px; height: 8px; border-radius: 9999px; background: rgba(255,255,255,.6); box-shadow: 0 0 0 1px rgba(7,17,31,.15); transition: width .3s ease, background-color .3s ease; }
.slider-dots button[aria-current="true"] { width: 24px; background: #E60012; }
.hero-slide { width: 100%; background: #07111F; }
.hero-slide img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; max-height: min(calc(100vh - 112px), 760px); max-height: min(calc(100svh - 112px), 760px); object-fit: contain; }
.hero-banner .slider-btn { display: none; top: calc(50% - 16px); }
.customer-slider .slider-track { gap: 12px; }
.customer-slide { width: calc((100% - 12px) / 2); }
.customer-slider .slider-btn { width: 40px; height: 40px; }
[data-slider] .slider-btn[hidden] { display: none; }
@media (max-width: 639px) {
  .hero-slide img { aspect-ratio: 2 / 3; }
}
@media (min-width: 640px) {
  .hero-banner .slider-btn { display: inline-flex; }
  .customer-slide { width: calc((100% - 24px) / 3); }
}
@media (min-width: 768px) {
  .customer-slide { width: calc((100% - 36px) / 4); }
}
@media (min-width: 1024px) {
  .customer-slider .slider-track { gap: 16px; }
  .customer-slide { width: calc((100% - 80px) / 6); }
}
@media (prefers-reduced-motion: reduce) {
  .slider-track { scroll-behavior: auto; }
}

/* Modal */
.modal { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal.is-open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4,9,17,.72); opacity: 0; transition: opacity .3s ease; }
.modal.is-visible .modal-backdrop { opacity: 1; }
.modal-panel { position: relative; width: 100%; max-height: 90vh; overflow-y: auto; overscroll-behavior: contain; opacity: 0; transform: translateY(16px); transition: opacity .35s ease, transform .4s cubic-bezier(.22,1,.36,1); }
.modal.is-visible .modal-panel { opacity: 1; transform: none; }
.modal-close { position: sticky; top: 0; z-index: 5; }
html.modal-lock, html.modal-lock body { overflow: hidden; }
.pricelist-panel { max-height: min(90vh, calc(100dvh - 32px)); overflow: hidden; }
.pricelist-table { border-collapse: collapse; font-variant-numeric: tabular-nums; }
.pricelist-table thead th { position: sticky; top: 0; z-index: 1; }
.pricelist-table th, .pricelist-table td { padding: .55rem .75rem; border-bottom: 1px solid #E5E7EB; white-space: nowrap; }
.pricelist-table thead th { background: #E60012; color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; text-align: left; }
.pricelist-table thead th.text-right, .pricelist-table td { text-align: right; }
.pricelist-table tbody th { text-align: left; font-weight: 600; color: #111827; background: #fff; }
.pricelist-table tbody td { color: #374151; }
.pricelist-table tbody tr:nth-child(even), .pricelist-table tbody tr:nth-child(even) th { background: #F9FAFB; }
/* The type column stays visible while the price columns scroll sideways on phones. */
.pricelist-table thead th:first-child, .pricelist-table tbody th { position: sticky; left: 0; }
.pricelist-table thead th:first-child { z-index: 2; }
@media (max-width: 639px) {
  .pricelist-table th, .pricelist-table td { padding: .5rem .5rem; font-size: .75rem; }
  .pricelist-table tbody th, .pricelist-table thead th:first-child { white-space: normal; min-width: 6.5rem; max-width: 8rem; line-height: 1.25; }
}
.vehicle-brochure-modal { padding: 10px; }
.vehicle-brochure-panel { display: flex; flex-direction: column; height: min(90vh, 900px); max-height: calc(100dvh - 20px); overflow: hidden; }
.vehicle-brochure-header, .vehicle-brochure-options { flex: 0 0 auto; }
.vehicle-brochure-options:empty { display: none; }
.vehicle-brochure-frame-wrap { position: relative; flex: 1 1 auto; min-height: 0; background: #0B1625; }
.vehicle-brochure-frame-wrap iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.vehicle-brochure-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #0B1625; color: #fff; text-align: center; transition: opacity .25s ease, visibility .25s ease; }
.vehicle-brochure-loading.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.vehicle-brochure-spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid rgba(255,255,255,.2); border-top-color: #E60012; animation: brochure-spin .8s linear infinite; }
@keyframes brochure-spin { to { transform: rotate(360deg); } }
.vehicle-brochure-options button[aria-pressed="true"] { border-color: #E60012; background: #E60012; color: #fff; }

/* Floating WA */
@keyframes nudge { 0%,100% { transform: translateY(0) } 30% { transform: translateY(-6px) } 55% { transform: translateY(0) } 75% { transform: translateY(-3px) } }
.nudge-once { animation: nudge 1.1s cubic-bezier(.22,1,.36,1) 1; }

/* Form */
.field { width: 100%; border: 1px solid #DCE1E6; background: #fff; border-radius: 10px; padding: 12px 14px; font-size: 16px; color: #111827; transition: border-color .2s ease, box-shadow .2s ease; min-height: 48px; }
.field:focus { outline: none; border-color: #07111F; box-shadow: 0 0 0 3px rgba(7,17,31,.12); }
.field[aria-invalid="true"] { border-color: #E60012; box-shadow: 0 0 0 3px rgba(230,0,18,.1); }
select.field { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%2364748B' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.err { display: none; }
.err.is-shown { display: block; }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* Toast */
#toast { transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity .3s ease, transform .35s ease; }
#toast.is-shown { transform: translate(-50%, 0); opacity: 1; }

/* Long-form text (privacy page) */
.rich-text p { margin-top: 1rem; color: #64748B; line-height: 1.75; }
.rich-text h2 { margin-top: 2.5rem; font-family: "Barlow Condensed", system-ui, sans-serif; font-weight: 700; font-size: 1.875rem; line-height: 1.1; text-transform: uppercase; color: #111827; }

@media (min-width: 1024px) {
  [data-parallax] > img { height: 110%; top: -5%; position: relative; }
  .vehicle-brochure-modal { padding: 16px; }
  .vehicle-brochure-panel { height: min(90vh, 900px); max-height: 90vh; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js-loading [data-hero] { visibility: visible; }
}
