/* ============================================================
   PT. Duta Listrik Niaga (DLN) — Company Profile
   Custom styles (Tailwind utilities handle the rest)
   ============================================================ */

:root {
  --brand-blue: #1B3A8F;
  --brand-blue-dark: #122A6B;
  --brand-red: #E30613;
  --brand-red-dark: #B5040F;
}

html { scroll-padding-top: 9rem; } /* offset for sticky header on anchor jumps */
body { overflow-x: hidden; }

/* ---------- Header ---------- */
#header { transition: box-shadow 0.25s; }
#header.scrolled { box-shadow: 0 6px 22px rgba(15, 23, 42, 0.08); }

/* ---------- Navigation ---------- */
.nav-link {
  position: relative;
  font-weight: 600;
  font-size: 0.95rem;
  color: #64748b;
  padding: 0.25rem 0;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--brand-blue); }
.nav-link.active { color: var(--brand-red); }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -0.35rem;
  height: 3px;
  border-radius: 3px;
  background: var(--brand-red);
}

.mobile-link {
  display: block;
  padding: 0.7rem 0.9rem;
  border-radius: 0.6rem;
  font-weight: 600;
  color: #334155;
}
.mobile-link:hover { background: #f1f5f9; color: var(--brand-blue); }

/* Language toggle */
.lang-btn { color: #64748b; transition: all 0.2s; }
.lang-btn.active { background: var(--brand-blue); color: #fff; }

/* ---------- Buttons ---------- */
.btn-primary,
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 9999px;
  padding: 0.8rem 1.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-primary {
  background: var(--brand-red);
  color: #fff;
  box-shadow: 0 10px 24px rgba(227, 6, 19, 0.22);
}
.btn-primary:hover { background: var(--brand-red-dark); }
.btn-outline {
  border: 1.5px solid var(--brand-blue);
  color: var(--brand-blue);
}
.btn-outline:hover { background: var(--brand-blue); color: #fff; }

/* ---------- Section helpers ---------- */
.section-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-red);
}
.section-title {
  margin-top: 0.4rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: clamp(1.55rem, 1rem + 2vw, 2.25rem);
  line-height: 1.2;
  color: var(--brand-blue);
}

/* ---------- Placeholder image blocks ---------- */
.placeholder-img {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.5;
  border: 1px solid #d3dbe6;
  overflow: hidden;
}
.placeholder-img span { padding: 0.75rem 1rem; }

/* ---------- Brand trust strip ---------- */
.brand-strip-logo {
  height: 2.75rem;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.65;
  transition: filter 0.25s, opacity 0.25s;
}
.brand-strip-logo:hover { filter: grayscale(0); opacity: 1; }

/* ---------- Authorized dealer cards (embossed) ---------- */
.brand-card {
  display: block;
  width: 100%;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  background: linear-gradient(145deg, #ffffff, #eaeef5);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  box-shadow:
    10px 10px 26px rgba(15, 23, 42, 0.12),
    -8px -8px 20px rgba(255, 255, 255, 0.95);
  transition: transform 0.25s, box-shadow 0.25s;
}
.brand-card:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 3px;
}

.brand-card-link {
  display: inline-block;
  margin-top: 1.1rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-red);
}
.brand-card:hover .brand-card-link { text-decoration: underline; }
.brand-card:hover {
  transform: translateY(-5px);
  box-shadow:
    14px 14px 34px rgba(15, 23, 42, 0.16),
    -8px -8px 20px rgba(255, 255, 255, 0.95);
}
.brand-card-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 5rem;
}
.brand-card-logo img {
  max-height: 3.5rem;
  max-width: 80%;
  width: auto;
  object-fit: contain;
}
.brand-card-meta {
  margin-top: 1.1rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-blue);
}
.brand-card-desc {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.6;
}

/* ---------- Product / catalogue cards ---------- */
.product-card {
  background: #fff;
  border: 1px solid #e8ecf2;
  border-radius: 1rem;
  overflow: hidden;
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(27, 58, 143, 0.12);
  border-color: rgba(27, 58, 143, 0.18);
}
.product-tag {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-blue);
  background: rgba(27, 58, 143, 0.09);
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
}
.product-tag.tag-mv {
  color: var(--brand-red);
  background: rgba(227, 6, 19, 0.08);
}
.product-tag.tag-both {
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.1);
}
.product-title {
  margin-top: 0.5rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--brand-blue);
  line-height: 1.3;
}
.product-text {
  margin-top: 0.3rem;
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.55;
}

/* Brand tags on product cards */
.product-brands {
  margin-top: 0.75rem;
  padding-top: 0.7rem;
  border-top: 1px solid #f1f5f9;
}
.product-brands-label {
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 0.35rem;
}
.brand-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--brand-blue);
  background: #eef2fb;
  border: 1px solid #dbe3f5;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  margin: 0.15rem 0.2rem 0 0;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.brand-pill:hover { background: var(--brand-blue); color: #fff; }

/* ---------- Contact ---------- */
.contact-item {
  display: flex;
  gap: 1rem;
  background: #fff;
  border: 1px solid #e8ecf2;
  border-radius: 1rem;
  padding: 1.1rem 1.25rem;
}
.contact-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.85rem;
  background: rgba(27, 58, 143, 0.08);
  color: var(--brand-blue);
}
.contact-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}
.contact-value { font-weight: 600; color: #1e293b; }

/* ---------- Form ---------- */
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.35rem;
}
.form-input {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.7rem;
  padding: 0.65rem 0.9rem;
  font-size: 0.95rem;
  color: #1e293b;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(27, 58, 143, 0.12);
}
.form-input.invalid { border-color: var(--brand-red); }

/* ---------- Footer ---------- */
.footer-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: rgba(255, 255, 255, 0.92);
  transition: color 0.2s;
}
.footer-item:hover { color: #fff; text-decoration: underline; }

/* ---------- Brand detail page ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #64748b;
  transition: color 0.2s;
}
.back-link:hover { color: var(--brand-blue); }

.brand-hero-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 5.5rem;
  margin-bottom: 1.25rem;
}
.brand-hero-logo img { max-height: 4rem; max-width: 60%; object-fit: contain; }

.brand-hero-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem);
  color: var(--brand-blue);
}
.brand-hero-meta {
  margin-top: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-red);
}
.brand-hero-desc {
  margin-top: 1rem;
  font-size: 0.98rem;
  color: #475569;
  line-height: 1.7;
}
.brand-products-box {
  margin-top: 1.75rem;
  background: #f8fafc;
  border: 1px solid #eef1f6;
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: left;
}
.brand-products-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--brand-blue);
}
.brand-products-list {
  margin-top: 0.5rem;
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.7;
}

/* Official distributor cards */
.dist-group { margin-top: 2.5rem; }
.dist-group-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--brand-blue);
  padding-bottom: 0.6rem;
  border-bottom: 2px solid #e2e8f0;
}
.dist-area { color: #94a3b8; font-weight: 600; font-size: 0.85rem; }

.dist-card {
  background: #fff;
  border: 1px solid #e8ecf2;
  border-radius: 0.9rem;
  padding: 1.25rem 1.35rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.dist-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(27, 58, 143, 0.1);
}
.dist-region {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-blue);
  background: rgba(27, 58, 143, 0.08);
  padding: 0.18rem 0.55rem;
  border-radius: 9999px;
}
.dist-name {
  margin-top: 0.55rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #1e293b;
  line-height: 1.35;
}
.dist-addr {
  margin-top: 0.5rem;
  font-size: 0.84rem;
  color: #64748b;
  line-height: 1.5;
}
.dist-phone {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-blue);
}
.dist-none {
  margin-top: 1.5rem;
  text-align: center;
  color: #64748b;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 1rem;
  padding: 2rem 1.5rem;
  line-height: 1.6;
}

/* ---------- Reveal on scroll ----------
   Hidden state applies only when JS is active (.js on <html>),
   so the page stays fully visible if JavaScript is disabled. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.js [data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Back to top ---------- */
#to-top.visible { opacity: 1; pointer-events: auto; }
