/* ==========================================================================
   Malaysia Landing Page Collection — shared base
   Each design sets its own brand tokens on :root and adds page styles.
   Built to elayadesign landing-page-design standards.
   ========================================================================== */

:root {
  --primary: #0f766e;
  --primary-ink: #ffffff;
  --accent: #f59e0b;
  --accent-ink: #1a1a1a;
  --bg: #ffffff;
  --surface: #ffffff;
  --alt: #f6f7f8;
  --text: #16181d;
  --muted: #5b6270;
  --line: #e4e7ec;
  --field-bg: #ffffff;
  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 24px;
  --btn-radius: 999px;
  --shadow: 0 10px 30px -12px rgba(16, 24, 40, .18);
  --shadow-lg: 0 20px 45px -15px rgba(16, 24, 40, .22);
  --font-head: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --footer-bg: #111318;
  --footer-ink: #c9ced6;
  --nav-h: 64px;

  /* Strict Spacing Tokens */
  --sp-0: 0px;
  --sp-25: 2px;
  --sp-50: 4px;
  --sp-75: 8px;
  --sp-100: 12px;
  --sp-200: 16px;
  --sp-300: 24px;
  --sp-400: 32px;
  --sp-500: 40px;
  --sp-600: 48px;
  --sp-700: 64px;
  --sp-800: 80px;
  --sp-900: 96px;

  /* Motion Deceleration Curve */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-layout: 500ms;
  --dur-interaction: 300ms;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 24px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

/* Strict Typography Scale & Clean Wrap */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -.02em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.25rem, 5.5vw, 3.75rem); line-height: 1; } /* text-6xl (60px) */
h2 { font-size: clamp(1.875rem, 4.2vw, 3rem); line-height: 1; }    /* text-5xl (48px) */
h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); line-height: 1.15; } /* text-4xl (36px) */
h4 { font-size: 1.5rem; line-height: 1.2; }                        /* text-2xl (24px) */
p { margin: 0 0 1em; text-wrap: pretty; }
em { font-style: normal; } /* Zero italics per design skill rule */

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 32px); margin-inline: auto; }

/* ---------- Icons ---------- */
.ico { display: inline-flex; width: 1.25em; height: 1.25em; flex: none; vertical-align: middle; }
.ico svg { width: 100%; height: 100%; }

/* ---------- Photos ----------
   Images live in each design's own images/ folder. Every <img> uses
   onerror="this.remove()", so a missing file falls back to the CSS illustration. */
.photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.inline-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); margin-bottom: 24px; background: var(--alt); }
.banner-photo { border-radius: var(--radius); overflow: hidden; aspect-ratio: 21 / 9; margin-bottom: 32px; background: var(--alt); }
.banner-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Demo bar (portfolio only) ---------- */
.demo-bar {
  background: #0b0d12; color: #d6dae1; font: 500 13px/1.4 system-ui, sans-serif;
  padding: 8px 16px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 14px; text-align: center;
}
.demo-bar a { color: #fff; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; min-height: 28px; }
.demo-bar a:hover { text-decoration: underline; }

/* ---------- Navigation (Floating Frosted Glass Bar) ---------- */
.nav {
  position: sticky;
  top: 12px;
  z-index: 50;
  width: min(1160px, calc(100% - 24px));
  margin-inline: auto;
  border-radius: var(--radius);
  background: var(--nav-bg, color-mix(in srgb, var(--surface) 88%, transparent));
  color: var(--nav-ink, var(--text));
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border: 1px solid var(--nav-line, var(--line));
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, .07);
  transition: transform var(--dur-interaction) var(--ease-out), box-shadow var(--dur-interaction) var(--ease-out);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--nav-h); padding: 0 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; text-decoration: none; line-height: 1.1; min-width: 0; }
.logo small { display: block; font-family: var(--font-body); font-weight: 500; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.logo-mark { width: 38px; height: 38px; border-radius: 10px; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; flex: none; }
.logo-mark .ico { width: 20px; height: 20px; }
.nav-links { display: none; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-weight: 600; font-size: 0.95rem; opacity: .85; display: inline-flex; align-items: center; min-height: 44px; transition: opacity var(--dur-interaction) var(--ease-out), color var(--dur-interaction) var(--ease-out); }
.nav-links a:hover { opacity: 1; color: var(--primary); }
.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-cta { display: none !important; }
.burger { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--nav-line, var(--line)); background: transparent; color: inherit; cursor: pointer; transition: background-color var(--dur-interaction) var(--ease-out); }
.burger:hover { background: var(--alt); }
.burger .ico { width: 22px; height: 22px; transition: transform var(--dur-interaction) var(--ease-out); }
.menu-only { display: block; }

/* Mobile Menu Panel (Full-height blurred drawer with staggered link entrance) */
.nav.open .nav-links {
  display: flex; flex-direction: column; gap: 8px;
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--menu-bg, color-mix(in srgb, var(--surface) 96%, transparent));
  color: var(--nav-ink, var(--text));
  padding: 20px 20px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--nav-line, var(--line));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 48px -12px rgba(0,0,0,.25);
  max-height: calc(100vh - var(--nav-h) - 32px);
  overflow-y: auto;
}
.nav.open .nav-links a:not(.btn) {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  width: 100%;
  opacity: 0;
  transform: translateY(24px);
  animation: navItemFadeIn 350ms var(--ease-out) forwards;
}
.nav.open .nav-links .btn {
  width: 100%;
  margin-top: 10px;
  opacity: 0;
  transform: translateY(24px);
  animation: navItemFadeIn 350ms var(--ease-out) forwards;
}
.nav.open .nav-links > *:nth-child(1) { animation-delay: 40ms; }
.nav.open .nav-links > *:nth-child(2) { animation-delay: 100ms; }
.nav.open .nav-links > *:nth-child(3) { animation-delay: 160ms; }
.nav.open .nav-links > *:nth-child(4) { animation-delay: 220ms; }
.nav.open .nav-links > *:nth-child(5) { animation-delay: 280ms; }
.nav.open .nav-links > *:nth-child(6) { animation-delay: 340ms; }

@keyframes navItemFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 640px) { .nav-cta { display: inline-flex !important; } }
@media (min-width: 960px) {
  .nav-links { display: flex; align-items: center; gap: 26px; }
  .burger, .menu-only { display: none !important; }
}

/* ---------- Buttons (Strict Padding & Deceleration Motion) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 8px 14px; border-radius: var(--btn-radius);
  font: inherit; font-weight: 600; font-size: .95rem; line-height: 1.25; text-decoration: none; text-align: center;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform var(--dur-interaction) var(--ease-out),
              box-shadow var(--dur-interaction) var(--ease-out),
              background-color var(--dur-interaction) var(--ease-out),
              border-color var(--dur-interaction) var(--ease-out),
              color var(--dur-interaction) var(--ease-out);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-outline { background: transparent; color: inherit; border-color: currentColor; }
.btn-light { background: #fff; color: #111; }
.btn-sm { min-height: 38px; padding: 6px 12px; font-size: .88rem; }
.btn-block { width: 100%; }
.btn .ico { width: 18px; height: 18px; }

/* ---------- Layout helpers ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section.alt { background: var(--alt); }
.section-head { max-width: 680px; margin: 0 auto clamp(36px, 5vw, 56px); text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.eyebrow { display: inline-block; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--eyebrow, var(--primary)); margin-bottom: 12px; }
.lead { font-size: clamp(1.02rem, 2vw, 1.15rem); color: var(--muted); }
.muted { color: var(--muted); }
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid-sm { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.split { display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1.05fr 1fr; }
  .split.rev > :first-child { order: 2; }
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
@media (max-width: 479px) { .hero-actions .btn { flex: 1 1 100%; } }
.trust-row { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 26px; font-size: .92rem; color: var(--muted); }
.trust-row span { display: inline-flex; align-items: center; gap: 8px; }
.trust-row .ico { color: var(--primary); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3vw, 30px); }
.card p:last-child { margin-bottom: 0; }
.card.hover { transition: transform var(--dur-layout) var(--ease-out), box-shadow var(--dur-layout) var(--ease-out), border-color var(--dur-interaction) var(--ease-out); }
.card.hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.icon-box { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); margin-bottom: 18px; }
.icon-box .ico { width: 26px; height: 26px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600; background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary); }
.badge { display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: var(--accent); color: var(--accent-ink); }

/* ---------- Check list ---------- */
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list .ico { color: var(--primary); margin-top: 3px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat strong { display: block; font-family: var(--font-head); font-size: clamp(1.8rem, 4.5vw, 2.7rem); line-height: 1.1; color: var(--stat-ink, var(--primary)); }
.stat span { font-size: .92rem; color: var(--muted); }

/* ---------- Pricing ---------- */
.price-card { display: flex; flex-direction: column; position: relative; }
.price-card .price { font-family: var(--font-head); font-size: clamp(2rem, 4vw, 2.5rem); font-weight: 800; line-height: 1; margin: 12px 0 4px; }
.price-card .price small { font-size: .95rem; font-weight: 600; color: var(--muted); }
.price-card .check-list { margin: 22px 0 26px; flex: 1; }
.price-card.featured { border: 2px solid var(--primary); box-shadow: var(--shadow); }
.price-card .badge { position: absolute; top: -13px; left: 24px; }

/* ---------- Testimonials ---------- */
.stars { display: flex; gap: 2px; color: #f5b301; margin-bottom: 14px; }
.stars .ico { width: 18px; height: 18px; }
.quote { font-size: 1.02rem; }
.person { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: color-mix(in srgb, var(--primary) 16%, transparent); color: var(--primary); flex: none; }
.person strong { display: block; line-height: 1.2; }
.person span { font-size: .85rem; color: var(--muted); }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.step { position: relative; padding-top: 8px; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: block; font-family: var(--font-head); font-weight: 800; font-size: 2.2rem; line-height: 1; color: var(--primary); opacity: .9; margin-bottom: 10px;
}

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) * .7); padding: 0 20px; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 60px; padding: 14px 0; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; font-weight: 400; line-height: 1; color: var(--primary); flex: none; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 18px; color: var(--muted); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; }
.form-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; font: inherit; font-size: 16px;
  color: var(--field-ink, var(--text)); background: var(--field-bg);
  border: 1px solid var(--field-line, var(--line)); border-radius: calc(var(--radius) * .55);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
.form-note { font-size: .8rem; color: var(--muted); margin: 0; }

/* ---------- Contact info ---------- */
.info-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.info-list li { display: flex; gap: 14px; align-items: flex-start; }
.info-list .icon-box { margin: 0; width: 46px; height: 46px; border-radius: 12px; }
.info-list .icon-box .ico { width: 22px; height: 22px; }
.info-list strong { display: block; }
.map-box {
  border-radius: var(--radius); min-height: 220px; position: relative; overflow: hidden;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--primary) 10%, transparent) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(color-mix(in srgb, var(--primary) 10%, transparent) 1px, transparent 1px) 0 0 / 32px 32px,
    color-mix(in srgb, var(--primary) 5%, var(--surface));
  display: grid; place-items: center; border: 1px solid var(--line);
}
.map-box .pin { display: grid; place-items: center; gap: 10px; text-align: center; padding: 20px; }
.map-box .pin .ico { width: 40px; height: 40px; color: var(--primary); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--primary); color: var(--primary-ink); border-radius: calc(var(--radius) * 1.3); padding: clamp(36px, 6vw, 68px) clamp(22px, 5vw, 64px); text-align: center; position: relative; overflow: hidden; }
.cta-band p { opacity: .9; max-width: 620px; margin-inline: auto; }
.cta-band .hero-actions { justify-content: center; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 520px; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); }
th { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--alt); }
tr:last-child td { border-bottom: 0; }

/* ---------- Footer ---------- */
.footer { background: var(--footer-bg); color: var(--footer-ink); padding: 60px 0 28px; font-size: .95rem; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.footer h4 { font-size: 1rem; color: #fff; margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.footer a { text-decoration: none; opacity: .85; display: inline-flex; align-items: center; min-height: 32px; }
.footer a:hover { opacity: 1; text-decoration: underline; }
.footer .logo { color: #fff; margin-bottom: 14px; }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; font-size: .85rem; opacity: .75; }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff;
  display: grid; place-items: center; box-shadow: 0 12px 28px -8px rgba(37, 211, 102, .6);
  text-decoration: none; transition: transform .2s ease;
}
.wa-float:hover { transform: scale(1.06); }
.wa-float .ico { width: 28px; height: 28px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 90px; z-index: 100;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  background: #111318; color: #fff; padding: 12px 20px; border-radius: var(--radius-sm);
  font: 500 15px/1.45 var(--font-body); width: max-content; max-width: calc(100% - 32px);
  box-shadow: var(--shadow-lg); transition: opacity var(--dur-interaction) var(--ease-out), transform var(--dur-interaction) var(--ease-out);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Reveal on scroll (Decelerated Entrance) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  will-change: transform, opacity;
}
.js .reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; }
}
