/* UBlok Malaysia — Design System (Hebel-aligned) */

:root {
  --primary: #243588;
  --primary-dark: #1a2766;
  --primary-light: #E8EBF5;
  --navy: #243588;
  --navy-mid: #2d3f9a;
  --sky: #2EA3F2;
  --sky-light: #E8F2FA;
  --accent: #B8C0DE;
  --warm: #E6E1DA;
  --text: #282829;
  --text-muted: #666666;
  --text-soft: #727275;
  --bg-light: #FFFFFF;
  --bg-soft: #F7F7F8;
  --border: #E5E5E6;
  --white: #FFFFFF;
}

/* ===== Base ===== */
html { scroll-behavior: smooth; }

body {
  font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background: var(--bg-light);
}

/* ===== Display font for headings ===== */
.font-display {
  font-family: 'Figtree', 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Figtree', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* Headings on dark surfaces inherit light color */
.bg-primary h1, .bg-primary h2, .bg-primary h3, .bg-primary h4, .bg-primary h5, .bg-primary h6,
.hero-gradient h1, .hero-gradient h2, .hero-gradient h3, .hero-gradient h4, .hero-gradient h5, .hero-gradient h6,
.bg-ink h1, .bg-ink h2, .bg-ink h3, .bg-ink h4, .bg-ink h5, .bg-ink h6,
.text-white h1, .text-white h2, .text-white h3, .text-white h4, .text-white h5, .text-white h6 {
  color: #fff;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: 0 2px 16px rgba(36, 53, 136, 0.06);
}

.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link:hover { color: var(--primary); }

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 50%; right: 50%;
  height: 2px;
  background: var(--primary);
  transition: left 0.25s ease, right 0.25s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  left: 0; right: 0;
}

/* ===== Mobile Menu ===== */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu.open { transform: translateX(0); }

/* ===== Buttons — soft, rounded, sentence case ===== */
.btn-primary {
  background: var(--primary);
  color: var(--white);
  padding: 14px 28px;
  border-radius: 4px;
  font-family: 'Figtree', sans-serif;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-ghost {
  border: 1px solid rgba(255,255,255,0.4);
  color: var(--white);
  padding: 13px 28px;
  border-radius: 4px;
  font-family: 'Figtree', sans-serif;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-outline {
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 13px 28px;
  border-radius: 4px;
  background: transparent;
  font-family: 'Figtree', sans-serif;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-sky {
  background: var(--sky);
  color: var(--white);
  padding: 14px 28px;
  border-radius: 4px;
  font-family: 'Figtree', sans-serif;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-sky:hover {
  background: #1d8fd6;
}

/* Back-compat: btn-gold now maps to sky accent */
.btn-gold {
  background: var(--sky);
  color: var(--white);
  padding: 14px 28px;
  border-radius: 4px;
  font-family: 'Figtree', sans-serif;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-gold:hover { background: #1d8fd6; }

/* ===== Section Tag ===== */
.section-tag {
  display: block;
  font-family: 'Figtree', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--sky);
  margin-bottom: 14px;
}

/* ===== Section heading underline bar ===== */
.heading-bar {
  width: 48px;
  height: 2px;
  background: var(--sky);
  margin: 16px auto 0;
}

/* ===== Cards — softer corners ===== */
.card {
  background: var(--white);
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 8px 32px rgba(36, 53, 136, 0.08);
}

.card-flat {
  background: var(--white);
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.card-flat:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(36, 53, 136, 0.06);
}

/* ===== Placeholder Images ===== */
.ph {
  background: linear-gradient(135deg, #E8EBF5 0%, #D4DAEB 50%, #C4CCDE 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  border-radius: 8px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.ph::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(36,53,136,0.03) 20px, rgba(36,53,136,0.03) 40px);
}

.ph span { position: relative; z-index: 1; opacity: 0.7; }

.ph-dark {
  background: linear-gradient(135deg, #1a2766 0%, #243588 50%, #2d3f9a 100%);
  color: rgba(255,255,255,0.7);
}

.ph-dark::before {
  background: repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(255,255,255,0.04) 20px, rgba(255,255,255,0.04) 40px);
}

/* ===== Icon Boxes ===== */
.icon-box {
  width: 52px; height: 52px;
  background: var(--primary-light);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.icon-box svg { width: 24px; height: 24px; stroke: var(--primary); }

.icon-box-lg {
  width: 64px; height: 64px;
  background: var(--primary-light);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.icon-box-lg svg { width: 30px; height: 30px; stroke: var(--primary); }

.icon-box-gold {
  width: 52px; height: 52px;
  background: var(--sky-light);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.icon-box-gold svg { width: 24px; height: 24px; stroke: var(--sky); }

/* ===== Decorative ===== */
.dot-grid {
  background-image: radial-gradient(circle, var(--accent) 1px, transparent 1px);
  background-size: 24px 24px;
}

.gold-bar {
  width: 48px; height: 3px;
  background: var(--sky);
  display: block;
}

/* ===== Hero gradient ===== */
.hero-gradient {
  background: linear-gradient(135deg, #243588 0%, #2d3f9a 60%, #3a4db0 100%);
}

/* ===== Soft brand wash (intro / advantages sections) ===== */
.intro-soft-bg {
  background:
    radial-gradient(60% 90% at 12% 0%, rgba(46,163,242,0.14) 0%, rgba(46,163,242,0) 60%),
    radial-gradient(55% 85% at 100% 100%, rgba(36,53,136,0.10) 0%, rgba(36,53,136,0) 55%),
    linear-gradient(180deg, #F2F8FD 0%, #F7F7F8 100%);
}

/* ===== Hero cover (Hebel pattern) ===== */
.hero-cover {
  position: relative;
  overflow: hidden;
}
.hero-cover-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}
.hero-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(36,53,136,0.55) 0%, rgba(36,53,136,0.35) 40%, rgba(0,0,0,0.45) 100%);
  z-index: 1;
}

.hero-card-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: rgba(255,255,255,0.12);
  padding: 0;
}
@media (min-width: 768px) {
  .hero-card-strip {
    grid-template-columns: repeat(4, 1fr);
  }
}

.hero-card {
  display: block;
  padding: 28px 32px;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(2px);
  color: #fff;
  text-decoration: none;
  transition: background 0.2s ease;
}
.hero-card:hover {
  background: rgba(36,53,136,0.75);
}
.hero-card-title {
  font-family: 'Figtree', sans-serif;
  color: #fff;
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.hero-card-sub {
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
}

/* ===== Persona tabs (Hebel pattern) ===== */
.persona-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  border-bottom: 1px solid var(--border);
}
.persona-tab {
  background: none;
  border: none;
  padding: 12px 0;
  font-family: 'Figtree', sans-serif;
  font-size: 18px;
  color: var(--text-soft);
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}
.persona-tab:hover { color: var(--text); }
.persona-tab.active {
  color: var(--primary);
  font-weight: 600;
}
.persona-tab.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--primary);
}

.persona-panel { display: none; }
.persona-panel.active { display: block; }

.persona-icon {
  font-size: 44px !important;
  color: var(--text) !important;
  font-variation-settings: 'FILL' 0, 'wght' 200, 'GRAD' 0, 'opsz' 24;
  margin-bottom: 20px;
  display: block;
}
.persona-h3 {
  font-family: 'Figtree', sans-serif;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}
.persona-body {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
}

/* ===== Scroll Reveal ===== */
.reveal {
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.animate-in {
  animation: revealUp 0.6s ease both;
}
@keyframes revealUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Stagger: each child animates in sequence */
.reveal-stagger.animate-in > * {
  animation: revealUp 0.6s ease both;
}
.reveal-stagger.animate-in > *:nth-child(2) { animation-delay: 0.1s; }
.reveal-stagger.animate-in > *:nth-child(3) { animation-delay: 0.2s; }
.reveal-stagger.animate-in > *:nth-child(4) { animation-delay: 0.3s; }
.reveal-stagger.animate-in > *:nth-child(5) { animation-delay: 0.4s; }
.reveal-stagger.animate-in > *:nth-child(6) { animation-delay: 0.5s; }

/* ===== Hero Entrance ===== */
@keyframes heroEnter {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-enter {
  animation: heroEnter 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero-enter-1 { animation-delay: 0.1s; }
.hero-enter-2 { animation-delay: 0.35s; }
.hero-enter-3 { animation-delay: 0.55s; }
.hero-enter-4 { animation-delay: 0.70s; }
.hero-enter-5 { animation-delay: 0.85s; }
.hero-enter-6 { animation-delay: 1.00s; }

/* ===== Split-direction reveals ===== */
@keyframes revealFromLeft {
  from { opacity: 0; transform: translateX(-48px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes revealFromRight {
  from { opacity: 0; transform: translateX(48px); }
  to   { opacity: 1; transform: translateX(0); }
}
.reveal-left.animate-in  { animation: revealFromLeft  0.75s cubic-bezier(0.22, 1, 0.36, 1) both; }
.reveal-right.animate-in { animation: revealFromRight 0.75s cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: 0.1s; }

/* ===== Heading bar grow ===== */
@keyframes barGrow {
  from { width: 0; opacity: 0; }
  to   { width: 48px; opacity: 1; }
}
.animate-in .heading-bar,
.animate-in .gold-bar {
  animation: barGrow 0.5s ease both;
  animation-delay: 0.35s;
}

/* ===== Persona panel — staggered card entrance ===== */
@keyframes cardEnter {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes iconPop {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

.persona-panel.panel-enter > .grid > div {
  animation: cardEnter 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.persona-panel.panel-enter > .grid > div:nth-child(1) { animation-delay: 0s; }
.persona-panel.panel-enter > .grid > div:nth-child(2) { animation-delay: 0.08s; }
.persona-panel.panel-enter > .grid > div:nth-child(3) { animation-delay: 0.16s; }
.persona-panel.panel-enter > .grid > div:nth-child(4) { animation-delay: 0.24s; }

.persona-panel.panel-enter > .grid > div .persona-icon {
  animation: iconPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.persona-panel.panel-enter > .grid > div:nth-child(1) .persona-icon { animation-delay: 0.05s; }
.persona-panel.panel-enter > .grid > div:nth-child(2) .persona-icon { animation-delay: 0.13s; }
.persona-panel.panel-enter > .grid > div:nth-child(3) .persona-icon { animation-delay: 0.21s; }
.persona-panel.panel-enter > .grid > div:nth-child(4) .persona-icon { animation-delay: 0.29s; }

/* ===== Specs Table ===== */
.specs-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.specs-table {
  min-width: 640px; width: 100%;
  border-collapse: collapse;
}

.specs-table th {
  background: var(--primary);
  color: var(--white);
  font-family: 'Figtree', sans-serif;
  font-weight: 500;
  font-size: 13px;
  padding: 16px 20px;
  text-align: left;
  white-space: nowrap;
}

.specs-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-muted);
}

.specs-table tbody tr { transition: background 0.15s ease; }
.specs-table tbody tr:hover { background: var(--bg-soft); }
.specs-table tbody tr:last-child td { border-bottom: none; }
.specs-table tbody tr td:first-child { font-weight: 600; color: var(--text); }

/* ===== Form ===== */
.form-input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  background: var(--white);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(36, 53, 136, 0.1);
}

/* ===== Footer ===== */
.site-footer a { transition: color 0.2s ease; }
.site-footer a:hover { color: white !important; }
.wp-block-template-part, .site-footer { margin-top: 0 !important; margin-block-start: 0 !important; }
:where(.wp-site-blocks) > * { margin-block-start: 0 !important; }

/* ===== Stats ===== */
.stat-number { font-variant-numeric: tabular-nums; }

.number-xl {
  font-family: 'Figtree', sans-serif;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ===== ZH home (page 37) core-block image sizing =====
   Core wp:image won't keep Tailwind utilities on the <img>, so sizing/hover
   that used to be inline (h-[Npx] object-cover, group-hover:scale-105) lives here. */
.home-hero-img img,
.home-facility-img img,
.home-product-img img { width: 100%; object-fit: cover; display: block; }
.home-hero-img img { height: 500px; }
.home-facility-img img { height: 400px; }
.home-product-img img { height: 450px; transition: transform 0.5s ease; }
.group:hover .home-product-img img { transform: scale(1.05); }
