/* ═══════════════════════════════════════════════
   HowLah.my — Design System
   Malaysian Business Compliance Guide
   ═══════════════════════════════════════════════ */

/* ─── VARIABLES ─── */
:root {
  --bg: #FAFAF7;
  --ink: #1A1A18;
  --accent: #C8102E;
  --accent2: #003DA5;
  --gold: #F4C430;
  --muted: #6B6B63;
  --card: #FFFFFF;
  --border: #E5E5DF;
  --section-alt: #F0F0EB;
  --radius: 12px;
  --max-w: 1100px;
  --nav-h: 64px;
}

/* ─── RESET ─── */
*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ─── NAV ─── */
.nav {
  position: fixed; top:0; left:0; right:0; z-index:100;
  background: rgba(250,250,247,.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
}
.nav .logo {
  font-family: 'Instrument Serif', serif;
  font-size: 1.6rem;
  color: var(--accent);
  font-weight: 400;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.nav .logo span { color: var(--accent2); }
.nav ul { list-style:none; display:flex; gap: 1.75rem; }
.nav ul li a {
  text-decoration:none; color: var(--muted);
  font-size: .85rem; font-weight: 500;
  transition: color .2s;
}
.nav ul li a:hover { color: var(--ink); text-decoration: none; }
.nav .cta-nav {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: .5rem 1.25rem;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.nav .cta-nav:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(200,16,46,.25); text-decoration:none; }
.hamburger { display:none; background:none; border:none; cursor:pointer; }
.hamburger span { display:block; width:24px; height:2px; background:var(--ink); margin:5px 0; transition:.3s; }

/* ─── LAYOUT ─── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 2rem; }
.page-top { margin-top: var(--nav-h); }
section { padding: 5rem 2rem; }
.section-alt { background: var(--section-alt); }
.section-header { text-align: center; max-width: 640px; margin: 0 auto 3rem; }
.section-header h2 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: .75rem;
}
.section-header p { color: var(--muted); font-size: 1rem; }

/* ─── BREADCRUMBS ─── */
.breadcrumbs {
  margin-top: var(--nav-h);
  padding: 1rem 2rem;
  font-size: .82rem;
  color: var(--muted);
  background: var(--section-alt);
  border-bottom: 1px solid var(--border);
}
.breadcrumbs a { color: var(--accent2); font-weight: 500; }
.breadcrumbs span { margin: 0 .4rem; opacity: .5; }

/* ─── GUIDE PAGE LAYOUT ─── */
.guide-layout {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}
.guide-content { min-width: 0; }
.guide-sidebar { position: sticky; top: 80px; }

.guide-content h1 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: .75rem;
}
.guide-content .guide-meta {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.guide-content h2 {
  font-family: 'Instrument Serif', serif;
  font-size: 1.6rem;
  font-weight: 400;
  margin: 2.5rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.guide-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.75rem 0 .75rem;
}
.guide-content p { margin-bottom: 1rem; font-size: .95rem; }
.guide-content ul, .guide-content ol {
  margin: .75rem 0 1.25rem 1.5rem;
  font-size: .95rem;
}
.guide-content li { margin-bottom: .5rem; }

/* ─── INFO BOXES ─── */
.info-box {
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
  font-size: .9rem;
  line-height: 1.7;
}
.info-box.blue {
  background: rgba(0,61,165,.05);
  border: 1px solid rgba(0,61,165,.15);
}
.info-box.red {
  background: rgba(200,16,46,.05);
  border: 1px solid rgba(200,16,46,.15);
}
.info-box.green {
  background: rgba(43,147,72,.05);
  border: 1px solid rgba(43,147,72,.15);
}
.info-box.gold {
  background: rgba(244,196,48,.1);
  border: 1px solid rgba(244,196,48,.3);
}
.info-box strong { display: block; margin-bottom: .35rem; }

/* ─── STEP BLOCKS ─── */
.step-block {
  display: flex;
  gap: 1.25rem;
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.step-num {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent2);
  color: #fff;
  display: flex; align-items:center; justify-content:center;
  font-weight: 700;
  font-size: .95rem;
  flex-shrink: 0;
}
.step-body h4 { font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.step-body p { font-size: .9rem; color: var(--muted); margin: 0; }
.step-body a { font-weight: 600; }

/* ─── TABLES ─── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
  margin: 1.25rem 0;
}
.data-table thead { background: var(--accent2); color: #fff; }
.data-table th {
  padding: .75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.data-table td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.data-table tbody tr:hover { background: var(--section-alt); }

/* ─── SIDEBAR ─── */
.sidebar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.sidebar-card h4 {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: .75rem;
  color: var(--accent2);
}
.sidebar-card ul { list-style: none; }
.sidebar-card li {
  padding: .4rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
}
.sidebar-card li:last-child { border-bottom: none; }
.sidebar-card li a { font-weight: 500; }

/* Sidebar TOC */
.toc-link {
  display: block;
  padding: .35rem 0;
  font-size: .82rem;
  color: var(--muted);
  border-left: 2px solid var(--border);
  padding-left: .75rem;
  margin-bottom: .25rem;
  transition: all .15s;
}
.toc-link:hover { color: var(--accent2); border-left-color: var(--accent2); text-decoration: none; }

/* ─── CARDS GRID ─── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform .2s, box-shadow .2s;
  text-decoration: none;
  color: var(--ink);
  display: block;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,.06);
  text-decoration: none;
}
.card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: .5rem; }
.card p { font-size: .88rem; color: var(--muted); margin-bottom: .75rem; }
.tag {
  display: inline-block;
  font-size: .73rem;
  padding: .2rem .55rem;
  border-radius: 6px;
  font-weight: 500;
  margin-right: .3rem;
}
.tag-time { background: rgba(0,61,165,.08); color: var(--accent2); }
.tag-cost { background: rgba(244,196,48,.2); color: #9B7B00; }
.tag-agency { background: rgba(200,16,46,.08); color: var(--accent); }

/* ─── AD SLOTS ─── */
.ad-slot { max-width: var(--max-w); margin: 1rem auto; padding: 0 2rem; }

/* ─── NEWSLETTER ─── */
.newsletter {
  background: var(--accent2);
  color: #fff;
  text-align: center;
  padding: 4rem 2rem;
}
.newsletter h2 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 400;
  margin-bottom: .75rem;
}
.newsletter p { opacity: .8; margin-bottom: 1.5rem; font-size: .95rem; }
.newsletter-form {
  display: flex;
  gap: .5rem;
  max-width: 460px;
  margin: 0 auto;
}
.newsletter-form input {
  flex:1;
  padding: .85rem 1.25rem;
  border: 2px solid rgba(255,255,255,.25);
  border-radius: 10px;
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: .95rem;
  font-family: inherit;
  outline: none;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,.5); }
.newsletter-form input:focus { border-color: var(--gold); }
.newsletter-form button {
  padding: .85rem 1.5rem;
  background: var(--gold);
  color: var(--ink);
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
}

/* ─── FOOTER ─── */
.footer {
  padding: 3rem 2rem 2rem;
  text-align: center;
  font-size: .82rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
.footer a { color: var(--accent2); text-decoration: none; }
.footer-logo {
  font-family: 'Instrument Serif', serif;
  font-size: 1.2rem;
  color: var(--accent);
  margin-bottom: .5rem;
}
.footer-logo span { color: var(--accent2); }

/* ─── CTA BUTTON ─── */
.btn {
  display: inline-block;
  padding: .7rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
  transition: transform .15s;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-secondary { background: var(--accent2); color: #fff; }

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity:0; transform:translateY(24px); }
  to { opacity:1; transform:translateY(0); }
}
.fade-up { opacity: 0; animation: fadeUp .6s ease forwards; }
.fade-up:nth-child(2) { animation-delay: .1s; }
.fade-up:nth-child(3) { animation-delay: .2s; }
.fade-up:nth-child(4) { animation-delay: .3s; }
.reveal { opacity:0; transform:translateY(30px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity:1; transform:translateY(0); }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .guide-layout { grid-template-columns: 1fr; }
  .guide-sidebar { position: static; }
}
@media (max-width: 768px) {
  .nav ul { display:none; }
  .hamburger { display:block; }
  section { padding: 3.5rem 1.25rem; }
  .guide-layout { padding: 2rem 1.25rem 3rem; }
  .newsletter-form { flex-direction: column; }
  .cards-grid { grid-template-columns: 1fr; }
}
