/**
 * Khairul Mazlan — Master Impact Maker
 * Shared Stylesheet (Multi-page)
 * Palette: Warm Charcoal (#1a1612) + Gold (#d4922a) + Deep Teal (#1a5f5f)
 */

@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Playfair+Display:wght@400;700;900&display=swap");

:root {
  /* Primary Palette — Warm Charcoal */
  --charcoal: #1a1612;
  --charcoal-deep: #14100e;
  --charcoal-light: #221c17;
  /* Gold */
  --gold: #d4922a;
  --gold-hover: #e8a52f;
  --gold-active: #c08526;
  --gold-90: rgba(212,146,42,0.9);
  /* Deep Teal — Malay Accent */
  --teal: #1a5f5f;
  --teal-hover: #237a7a;
  --teal-bright: #55d1c7;
  --teal-soft: rgba(26,95,95,0.15);
  /* Text */
  --text-heading: #f7f1e7;
  --text-body: #f0ebe0;
  --text-bright: rgba(240,235,224,0.92);
  --text-emphasis: rgba(240,235,224,0.86);
  --text-90: rgba(240,235,224,0.9);
  --text-80: rgba(240,235,224,0.8);
  --text-70: rgba(240,235,224,0.7);
  --text-50: rgba(240,235,224,0.52);
  --text-body-75: rgba(240,235,224,0.76);
  --muted: rgba(240,235,224,0.62);
  --text-dim-65: rgba(240,235,224,0.66);
  --text-dim-55: rgba(240,235,224,0.56);
  /* Gold Alphas */
  --gold-alpha-025: rgba(212,146,42,0.025);
  --gold-alpha-03: rgba(212,146,42,0.03);
  --gold-alpha-04: rgba(212,146,42,0.04);
  --gold-alpha-06: rgba(212,146,42,0.06);
  --gold-alpha-08: rgba(212,146,42,0.08);
  --gold-alpha-10: rgba(212,146,42,0.10);
  --gold-alpha-14: rgba(212,146,42,0.14);
  --gold-alpha-20: rgba(212,146,42,0.20);
  --gold-alpha-30: rgba(212,146,42,0.30);
  --gold-alpha-35: rgba(212,146,42,0.35);
  --gold-alpha-40: rgba(212,146,42,0.40);
  /* Borders */
  --border-subtle: rgba(212,146,42,0.12);
  --border-medium: rgba(212,146,42,0.15);
  --border-strong: rgba(212,146,42,0.25);
  /* Shadows */
  --shadow-hover: rgba(212,146,42,0.15);
  --shadow-nav: rgba(0,0,0,0.4);
  /* Layout */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-pill: 2rem;
  --radius-full: 50%;
  --max: 1100px;
  /* Motion */
  --motion-fast: 150ms;
  --motion-state: 220ms;
  --motion-reveal: 420ms;
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  /* Teal Alphas */
  --teal-alpha-06: rgba(26,95,95,0.06);
  --teal-alpha-10: rgba(26,95,95,0.10);
  --teal-alpha-14: rgba(70,190,180,0.14);
  --teal-alpha-20: rgba(26,95,95,0.20);
  --teal-alpha-30: rgba(70,190,180,0.30);
  /* Utility */
  --bg-card: rgba(255,255,255,0.04);
  --bg-section-light: rgba(255,255,255,0.015);
  --bg-testimonials: rgba(20,16,14,0.62);
  --border-light: rgba(255,255,255,0.06);
  --border-lighter: rgba(255,255,255,0.04);
  --border-faint: rgba(255,255,255,0.08);
  --whatsapp: #25D366;
  --whatsapp-hover: #1ebe5d;
  --z-nav: 1000;
  --z-dropdown: 999;
  --z-fab: 100;
  --z-content: 1;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: radial-gradient(circle at 15% 0%, rgba(212,146,42,0.08), transparent 30rem), linear-gradient(180deg, var(--charcoal), var(--charcoal-deep)); color: var(--text-body); font-family: 'DM Sans', sans-serif; font-size: 16px; line-height: 1.72; letter-spacing: 0; font-kerning: normal; text-rendering: optimizeLegibility; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
section { padding: 4rem 2rem; }
.container { max-width: var(--max); margin: 0 auto; }
.section-label { color: var(--gold); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 0.75rem; }
.section-heading { font-family: 'Playfair Display', serif; font-size: 2.6rem; font-weight: 700; color: var(--text-heading); margin-bottom: 0.75rem; text-wrap: balance; line-height: 1.12; }
.section-subtitle-ms { color: var(--teal-bright); font-size: 0.98rem; font-weight: 600; margin: -0.25rem 0 1rem; max-width: 62ch; }
.section-divider { width: 50px; height: 2px; background: var(--gold); margin-bottom: 2.5rem; }
.section-divider--teal { background: var(--teal-bright); }
.copy-ms { color: var(--text-80); font-weight: 500; }
.copy-pair { display: grid; gap: 0.45rem; margin-bottom: 1.25rem; }
.copy-pair p { margin-bottom: 0 !important; }
.copy-pair .ms { color: var(--text-80); font-weight: 500; }

/* Skip Nav */
.skip-nav { position: absolute; top: -40px; left: 0; background: var(--gold); color: white; padding: 8px; z-index: var(--z-fab); transition: top 0.2s; }
.skip-nav:focus { top: 0; }

/* NAV */
#navbar { position: fixed; top: 0; left: 0; width: 100%; z-index: var(--z-nav); background: rgba(26,22,18,0.96); backdrop-filter: blur(10px); border-bottom: 1px solid var(--gold-alpha-10); }
#navbar.scrolled { border-bottom-color: var(--border-strong); box-shadow: 0 2px 20px var(--shadow-nav); }
.nav-inner { max-width: var(--max); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 1rem 2rem; position: relative; }
.nav-logo { font-family: 'Playfair Display', serif; font-size: 1.5rem; color: var(--gold); font-weight: 700; }
.nav-links { list-style: none; display: flex; gap: 2rem; }
.nav-links a { color: var(--text-body-75); font-size: 0.875rem; transition: color 0.2s; position: relative; }
.nav-links a::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 100%; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: right; transition: transform 0.25s var(--ease-out-expo); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); transform-origin: left; }
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-cta { background: var(--gold); color: var(--charcoal) !important; padding: 0.5rem 1.25rem; border-radius: var(--radius-sm); font-weight: 600; }
.nav-cta:hover { background: var(--gold-active); transform: translateY(-1px); box-shadow: 0 4px 12px var(--gold-alpha-30); }
.nav-hamburger { display: none; }
@media (max-width: 767px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
  .nav-hamburger span { display: block; width: 24px; height: 2px; background: var(--text-heading); transition: all 0.25s; }
  .nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .nav-hamburger.open span:nth-child(2) { opacity: 0; }
  .nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
  .nav-links.mobile-open { display: flex !important; flex-direction: column; position: absolute; top: 100%; left: 0; width: 100%; background: rgba(20,16,14,0.98); padding: 1.25rem 1.5rem 1.5rem; gap: 0.5rem; border-bottom: 1px solid var(--gold-alpha-20); box-shadow: 0 18px 40px rgba(0,0,0,0.38); z-index: var(--z-dropdown); }
  .nav-links.mobile-open a { font-size: 1rem; padding: 0.6rem 0; min-height: 44px; display: flex; align-items: center; }
  .nav-links.mobile-open .nav-cta { justify-content: center; margin-top: 0.5rem; }
}

/* Buttons */
.btn-primary { background: var(--gold); color: var(--charcoal); padding: 0.9rem 2rem; min-height: 44px; border-radius: var(--radius-sm); font-weight: 700; font-size: 0.95rem; transition: background-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s; display: inline-block; text-align: center; }
.btn-primary:hover { background: var(--gold-hover); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); background: var(--gold-active); }
.btn-secondary { border: 2px solid var(--gold); color: var(--gold-hover); background: var(--gold-alpha-025); padding: 0.9rem 2rem; min-height: 44px; border-radius: var(--radius-sm); font-weight: 700; font-size: 0.95rem; transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.15s; display: inline-block; text-align: center; }
.btn-secondary:hover { background: var(--gold-alpha-10); color: #f4c36b; transform: translateY(-1px); }
.btn-secondary:active { transform: translateY(0); background: rgba(212,146,42,0.15); }
.btn-teal { background: var(--teal); color: white; padding: 0.9rem 2rem; min-height: 44px; border-radius: var(--radius-sm); font-weight: 700; font-size: 0.95rem; transition: background-color 0.2s, transform 0.15s; display: inline-block; text-align: center; }
.btn-teal:hover { background: var(--teal-hover); transform: translateY(-1px); }
.btn-whatsapp { display: inline-flex; align-items: center; justify-content: center; gap: 0.75rem; background: var(--whatsapp); color: white; padding: 1rem 2rem; border-radius: var(--radius-md); font-weight: 700; font-size: 1rem; min-height: 44px; transition: background 0.2s, transform 0.15s; }
.btn-whatsapp:hover { background: var(--whatsapp-hover); transform: translateY(-1px); }
.btn-whatsapp:active { transform: translateY(0); background: #1da851; }

/* Reveal Animations */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.65s var(--ease-out-expo), transform 0.65s var(--ease-out-expo); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-stagger { opacity: 0; transform: translateY(20px); transition: opacity 0.45s var(--ease-out-expo), transform 0.45s var(--ease-out-expo); }
.reveal-stagger.visible { opacity: 1; transform: translateY(0); }
body:not(.js-loaded) .reveal, body:not(.js-loaded) .reveal-stagger { opacity: 1 !important; transform: none !important; }
@media (prefers-reduced-motion: reduce) { .reveal, .reveal-stagger { opacity: 1 !important; transform: none !important; transition: none !important; } }

@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Focus Indicators */
:focus:not(:focus-visible) { outline: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible, summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: var(--radius-sm); }
.btn-whatsapp:focus-visible { border-radius: var(--radius-md); }

/* Program Cards */
.program-card { background: var(--bg-card); border: 1px solid var(--border-medium); border-top: 2px solid var(--gold); border-left: 3px solid var(--gold-alpha-40); border-radius: var(--radius-md); padding: 2rem; transition: opacity 0.45s var(--ease-out-quart), transform 0.45s var(--ease-out-quart), box-shadow 0.2s; }
.program-card:hover { transform: translateY(-6px); box-shadow: 0 8px 30px var(--shadow-hover); }
.program-card--teal { border-top-color: var(--teal); border-left-color: var(--teal-alpha-20); }
.program-card--teal:hover { box-shadow: 0 8px 30px var(--teal-alpha-20); }
.program-card-title { font-family: 'Playfair Display', serif; font-size: 1.45rem; color: var(--gold); margin-bottom: 0.5rem; line-height: 1.18; overflow-wrap: break-word; }
.program-card-title--teal { color: var(--teal-bright); }
.program-card-subtitle { color: var(--text-70); font-size: 0.92rem; margin-bottom: 1rem; overflow-wrap: break-word; }
.program-card-subtitle-ms { color: var(--text-80); font-size: 0.88rem; font-weight: 500; margin: -0.45rem 0 1rem; }
.program-list { list-style: none; margin-top: 1rem; }
.program-list li { padding: 0.4rem 0; color: var(--text-80); font-size: 0.92rem; border-bottom: 1px solid var(--border-light); }
.program-list li::before { content: "▸"; color: var(--gold); margin-right: 0.5rem; }
.program-list--teal li::before { color: var(--teal-bright); }
.prog-badge { color: var(--gold); font-size: 0.75rem; }
.prog-badge--teal { color: var(--teal-bright); }
.prog-desc { font-size: 0.9rem; color: var(--text-80); }
.prog-framework { font-size: 0.82rem; color: var(--text-dim-65); }

/* Testimonial Cards */
.testimonial-card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 1.75rem; transition: opacity 0.45s var(--ease-out-expo), transform 0.45s var(--ease-out-expo), border-color 0.3s, box-shadow 0.3s; }
.testimonial-card:hover { border-color: var(--gold-alpha-35); box-shadow: 0 4px 24px var(--gold-alpha-06); }
.testimonial-quote { color: var(--text-emphasis); font-size: 1rem; line-height: 1.75; font-style: italic; margin-bottom: 1.25rem; max-width: 60ch; }
.testimonial-quote::before { content: '\201C'; color: var(--gold); font-size: 2rem; line-height: 0; vertical-align: -0.5rem; margin-right: 0.2rem; font-style: normal; }
.testimonial-name { color: var(--gold); font-weight: 700; font-size: 0.875rem; }
.testimonial-title { color: var(--text-70); font-size: 0.875rem; margin-top: 0.2rem; overflow-wrap: break-word; }

/* Client Chips */
.client-chip { background: linear-gradient(135deg, var(--gold-alpha-08), rgba(70,190,180,0.045)); border: 1px solid var(--border-strong); color: var(--text-emphasis); padding: 0.35rem 0.75rem; border-radius: var(--radius-pill); font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; min-width: 0; }

/* Credentials */
.credentials-grid { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 1.5rem; row-gap: 0; }
.credential-item { padding: 0.5rem 0; display: flex; align-items: baseline; gap: 0.5rem; border-bottom: 1px solid var(--border-lighter); }
.credential-dot { width: 5px; height: 5px; border-radius: var(--radius-full); background: var(--gold); flex-shrink: 0; margin-top: 0.35rem; }
.credential-text { font-size: 0.875rem; color: var(--text-emphasis); line-height: 1.45; overflow-wrap: break-word; }
@media (max-width: 1023px) { .credentials-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .credentials-grid { grid-template-columns: 1fr; } }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border-faint); padding: 1.25rem 0; }
.faq-item:last-child { border-bottom: none; padding-bottom: 0; }
.faq-q { font-weight: 600; color: var(--text-body); cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 0.25rem 0; min-height: 44px; }
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after { content: '+'; font-size: 1.25rem; color: var(--gold); flex-shrink: 0; margin-left: 1rem; transition: transform 0.2s; }
details[open] .faq-q::after { content: '\2212'; }
.faq-a { color: var(--text-70); font-size: 1rem; line-height: 1.72; margin-top: 0.6rem; max-width: 65ch; overflow-wrap: break-word; }
.faq-a-ms { color: var(--text-80); font-weight: 500; margin-top: 0.4rem; }
@keyframes faqReveal { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
details[open] .faq-a { animation: faqReveal 0.3s var(--ease-out-expo); }

/* Contact */
.contact-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; justify-content: center; }
.contact-row a { color: var(--text-emphasis); font-size: 1rem; transition: color 0.2s; }
.contact-row a:hover { color: var(--gold); }
.contact-icon { color: var(--gold); font-size: 1.25rem; flex-shrink: 0; }

/* Footer */
footer { background: var(--charcoal-deep); padding: 1.5rem 2rem; text-align: center; }
.footer-name { color: var(--gold); font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 700; margin-bottom: 0.25rem; }
.footer-title { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.5rem; }
.footer-socials { margin-bottom: 1.5rem; display: flex; justify-content: center; gap: 1rem; align-items: center; }
.footer-socials a { color: var(--gold); font-size: 1.4rem; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
.footer-copy { font-size: 0.75rem; color: rgba(255,255,255,0.55); }

/* Malay Cultural Touches */
.malay-accent { color: var(--teal-bright); }
.malay-quote { border-left: 3px solid var(--teal-bright); padding-left: 1rem; font-style: italic; color: var(--text-bright); }
.tagline-bm { font-family: 'Playfair Display', serif; color: var(--teal-bright); font-size: 1.1rem; margin-top: 0.5rem; }

/* Back to Top */
.back-to-top { position: fixed; bottom: 2rem; right: 2rem; background: var(--gold-90); color: var(--charcoal); width: 44px; height: 44px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; text-decoration: none; opacity: 0; transform: translateY(20px); transition: opacity 0.3s, transform 0.3s, background 0.2s; pointer-events: none; z-index: var(--z-fab); }
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { background: var(--gold-hover); }

/* Print */
@media print {
  body { background: #fff; color: var(--charcoal); }
  section, footer { background: #fff !important; color: var(--charcoal) !important; }
  .section-heading, .program-card-title { color: var(--charcoal) !important; }
  .section-label { color: #8a5e1a !important; }
  #navbar, .back-to-top { display: none !important; }
  a { color: var(--charcoal) !important; text-decoration: underline; }
}

/* Mobile */
@media (max-width: 767px) {
  section { padding: 3rem 1.25rem; }
  .section-heading { font-size: 2rem; line-height: 1.14; }
  .section-subtitle-ms { font-size: 0.96rem; }
  .btn-primary, .btn-secondary, .btn-teal, .btn-whatsapp { width: 100%; max-width: 360px; }
  .client-chip { white-space: normal; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .section-heading { font-size: 2.3rem; }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* NoScript */
noscript style { .reveal, .reveal-stagger { opacity: 1 !important; transform: none !important; } }
