/* ============================================================
   Hanart — Malaysia (Bahasa Melayu) regional theme layer
   Additive only. Loaded AFTER css/styles.css. Never edits base CSS.
   Direction: Malaysian heavy-industry B2B (navy / charcoal + restrained
   Malaysia red & gold accents), long Malay words handled safely.
   ============================================================ */

:root {
  /* --- palette: Malaysian corporate navy + Jalur Gemilang accents --- */
  --navy: #0b2545;
  --navy-deep: #06182b;
  --navy-mid: #123a63;
  --steel: #24455f;

  --accent: #c8102e;              /* Malaysia red — CTA / links */
  --accent-dark: #a30c24;
  --accent-strong: #7d0a1d;
  --accent-soft: #f3c3ca;         /* highlight on dark hero */
  --accent-on-dark: #f6b8c2;
  --accent-light: #fdeff1;
  --tint-warm: #f8e6e9;

  --primary: #0b2545;
  --gold: #c39b3d;                /* small marks only */
  --line: #dfe5ea;
  --paper: #ffffff;
  --mist: #f7f8fa;
  --bg-soft: #f4f6f8;
  --night: #06182b;
  --whatsapp: #0b2545;
  --whatsapp-hover: #06182b;
  --divider-on-dark: #3d5a77;

  --radius: 2px;
  --radius-lg: 3px;

  /* --- type: Malay needs slightly larger x-height tolerance & looser leading --- */
  --font-body: "Inter", "Segoe UI", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --font-head: "Inter", "Segoe UI", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --header-h: 80px;
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-size: 16.5px;
  line-height: 1.75;
  color: #111a23;
  letter-spacing: 0;
}

h1, h2, h3, h4, h5 {
  line-height: 1.24;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
  hyphens: auto;
}

p, li, .section-sub, .card p, .prod-card-body p, .ind-tile-body p {
  line-height: 1.78;
}

/* Malay words run long — never let them punch through a container */
.hero-title, .section-title, .card-title, .capability-title, .footer-title,
.faq-q, .accordion-header, .btn, .badge, .topbar-item, .lang-dropdown a,
.stat-label, .timeline-label, .price, .meta, .tag, .pill {
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}

/* --- hero: stronger scrim so white Malay headlines stay crisp --- */
.hero-bg::before {
  background: linear-gradient(90deg,
    rgba(6, 24, 43, .97) 0%,
    rgba(6, 24, 43, .90) 46%,
    rgba(6, 24, 43, .58) 100%);
}
.hero-bg::after {
  background: linear-gradient(180deg,
    rgba(6, 24, 43, .40) 0%,
    rgba(6, 24, 43, 0) 34%,
    rgba(6, 24, 43, 0) 60%,
    rgba(6, 24, 43, .62) 100%);
}

/* Slightly wider headline measure — Malay phrases are longer than English */
.hero-title { max-width: 19ch; line-height: 1.14; }
.hero-sub  { max-width: 60ch; }

/* --- navigation: longer Malay labels, keep one line on desktop --- */
.nav-links--wide > li > a {
  font-size: .86rem;
  letter-spacing: -.012em;
  padding-left: 11px;
  padding-right: 11px;
}
.nav-secondary a { letter-spacing: 0; }

@media (max-width: 1280px) {
  .nav-links--wide > li > a { font-size: .8rem; padding-left: 8px; padding-right: 8px; }
}

/* --- buttons: allow two-line Malay CTAs without clipping --- */
.btn {
  white-space: normal;
  text-align: center;
  line-height: 1.32;
  padding-top: .72em;
  padding-bottom: .72em;
}

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

/* --- links & focus kept readable on white paper --- */
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --- section rhythm: Malaysian B2B pages read denser, add air --- */
.section-sub { max-width: 64ch; }
.section-title { max-width: 30ch; }

/* --- legacy inline blue (#3182ce) is only 3.9:1 on white; lift to AA --- */
[style*="#3182ce"] { color: #1f5f9b !important; }

/* --- tables / spec blocks: avoid squeezed Malay cell text --- */
table td, table th, .spec td, .spec th {
  line-height: 1.6;
  overflow-wrap: break-word;
}

/* --- mobile safety: no sideways scroll from long words --- */
@media (max-width: 720px) {
  body { font-size: 16px; }
  h1 { font-size: 1.9rem; line-height: 1.28; }
  h2 { font-size: 1.5rem; }
  .hero-title { max-width: 100%; }
  .btn { width: 100%; }
  /* narrow crops of the hero photo are lighter — deepen the scrim */
  .hero-bg::before {
    background: linear-gradient(180deg,
      rgba(6, 24, 43, .95) 0%,
      rgba(6, 24, 43, .90) 55%,
      rgba(6, 24, 43, .86) 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
