/* ============================================================
   WNS Accounting Partners Inc. — Main Stylesheet
   Theme: Charcoal & Gold
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --charcoal:     #1c1f23;
  --charcoal-mid: #252930;
  --gold:         #c9a84c;
  --gold-dark:    #a8863a;
  --gold-light:   #faf5e8;
  --gold-border:  #e8d5a3;
  --white:        #ffffff;
  --bg:           #f8f7f4;
  --text:         #1a1a1e;
  --muted:        #64748b;
  --border:       #e2e0db;
  --shadow:       0 2px 12px rgba(28,31,35,0.10);
  --radius:       10px;
  --nav-h:        140px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { color: var(--gold-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* --- Typography --- */
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; line-height: 1.25; }
h3 { font-size: 1.2rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 600; }
p  { color: var(--muted); }

/* --- Utility --- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 80px 0; }
.section-alt { background: var(--white); }
.section-charcoal { background-color: var(--charcoal); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='51.96'%3E%3Cpath d='M0 0 L60 0 M0 25.98 L60 25.98' stroke='%23ffffff' stroke-opacity='0.07' stroke-width='1' fill='none'/%3E%3Cpath d='M0 51.96 L30 0 M30 51.96 L60 0' stroke='%23ffffff' stroke-opacity='0.07' stroke-width='1' fill='none'/%3E%3Cpath d='M0 0 L30 51.96 M30 0 L60 51.96' stroke='%23ffffff' stroke-opacity='0.07' stroke-width='1' fill='none'/%3E%3C/svg%3E"); background-repeat: repeat; }
.text-center { text-align: center; }
.text-white  { color: var(--white) !important; }
.text-muted-white { color: rgba(255,255,255,0.75) !important; }

.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-dark);
  background: var(--gold-light);
  border: 1px solid var(--gold-border);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.section-title { margin-bottom: 12px; color: var(--charcoal); }
.section-subtitle { color: var(--muted); max-width: 600px; margin: 0 auto 48px; }

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.15s;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); text-decoration: none; }
.btn-primary  { background: var(--gold); color: var(--charcoal); }
.btn-outline  { background: transparent; color: var(--white); border: 2px solid var(--gold); }
.btn-outline:hover { background: var(--gold); color: var(--charcoal); }
.btn-charcoal { background: var(--charcoal); color: var(--white); }
.btn-sm { padding: 8px 18px; font-size: 14px; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--charcoal); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='51.96'%3E%3Cpath d='M0 0 L60 0 M0 25.98 L60 25.98' stroke='%23ffffff' stroke-opacity='0.07' stroke-width='1' fill='none'/%3E%3Cpath d='M0 51.96 L30 0 M30 51.96 L60 0' stroke='%23ffffff' stroke-opacity='0.07' stroke-width='1' fill='none'/%3E%3Cpath d='M0 0 L30 51.96 M30 0 L60 51.96' stroke='%23ffffff' stroke-opacity='0.07' stroke-width='1' fill='none'/%3E%3C/svg%3E"); background-repeat: repeat;
  border-bottom: 1px solid rgba(201,168,76,0.20);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}
.logo-divider {
  width: 1px;
  height: 52px;
  background: rgba(201,168,76,0.35);
  flex-shrink: 0;
}
.logo-company-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
}
.logo-company-name .name-top {
  font-size: 17px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}
.logo-company-name .name-bottom {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
}
.logo-img {
  height: 100px;
  width: auto;
  display: block;
}
.footer-logo-img {
  height: 74px;
  width: auto;
  display: block;
  margin-bottom: 14px;
}
/* Fallback text logo if image not present */
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.logo-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.01em;
}
.logo-sub {
  font-size: 10px;
  font-weight: 500;
  color: rgba(201,168,76,0.65);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.80);
  transition: color 0.15s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--gold);
  text-decoration: none;
}
.nav-links .btn { margin-left: 8px; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: all 0.25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--charcoal);
  border-bottom: 1px solid rgba(201,168,76,0.20);
  padding: 20px 24px;
  z-index: 999;
  flex-direction: column;
  gap: 16px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-size: 16px;
  font-weight: 500;
  color: rgba(255,255,255,0.80);
  padding: 8px 0;
  border-bottom: 1px solid rgba(201,168,76,0.15);
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { color: var(--gold); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: linear-gradient(135deg, #111315 0%, #1c1f23 55%, #252930 100%);
  padding: 100px 0 90px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  left: -120px; bottom: -120px;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: rgba(201,168,76,0.06);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  right: -80px; top: -80px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(201,168,76,0.04);
  pointer-events: none;
}
.hero-content { max-width: 680px; position: relative; z-index: 1; }
.hero h1 { color: var(--white); margin-bottom: 20px; }
.hero h1 span { color: var(--gold); }
.hero p { color: rgba(255,255,255,0.75); font-size: 18px; margin-bottom: 36px; max-width: 520px; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .section-label {
  color: var(--gold);
  background: rgba(201,168,76,0.12);
  border: 1px solid rgba(201,168,76,0.25);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(28,31,35,0.12);
  border-color: var(--gold-border);
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ============================================================
   ICON BOXES
   ============================================================ */
.icon-box {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--gold-light);
  border: 1px solid var(--gold-border);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  font-size: 24px;
}

/* ============================================================
   SERVICES
   ============================================================ */
.service-card h3 { color: var(--charcoal); margin-bottom: 8px; }
.service-card p { font-size: 14px; }
.service-card a { color: var(--gold-dark); font-weight: 600; }

/* ============================================================
   TIPS
   ============================================================ */
.tip-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.tip-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(28,31,35,0.12);
  border-color: var(--gold-border);
}
.tip-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.tag-tax      { background: #fef3c7; color: #92400e; }
.tag-bookkeeping { background: #d1fae5; color: #065f46; }
.tag-gst      { background: #ede9fe; color: #5b21b6; }
.tag-payroll  { background: #fee2e2; color: #991b1b; }
.tag-general  { background: var(--gold-light); color: var(--gold-dark); border: 1px solid var(--gold-border); }

.tip-card h3 { color: var(--charcoal); margin-bottom: 10px; font-size: 1.1rem; }
.tip-card p  { font-size: 14px; line-height: 1.7; }

/* Filter bar */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }
.filter-btn {
  padding: 7px 18px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.filter-btn:hover, .filter-btn.active {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--charcoal);
}

/* ============================================================
   CONTACT FORM
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; color: var(--charcoal); margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
}
.form-group textarea { resize: vertical; min-height: 130px; }

.form-success {
  display: none;
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  border-radius: 8px;
  padding: 16px 20px;
  color: #065f46;
  font-weight: 600;
  margin-top: 16px;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}
.contact-info-item .icon { font-size: 22px; margin-top: 2px; }
.contact-info-item h4 { color: var(--charcoal); margin-bottom: 2px; }
.contact-info-item p  { font-size: 14px; margin: 0; }

/* ============================================================
   ABOUT
   ============================================================ */
.about-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.values-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.value-card { display: flex; gap: 16px; align-items: flex-start; }
.value-icon { font-size: 28px; flex-shrink: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background-color: #111315; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='51.96'%3E%3Cpath d='M0 0 L60 0 M0 25.98 L60 25.98' stroke='%23ffffff' stroke-opacity='0.07' stroke-width='1' fill='none'/%3E%3Cpath d='M0 51.96 L30 0 M30 51.96 L60 0' stroke='%23ffffff' stroke-opacity='0.07' stroke-width='1' fill='none'/%3E%3Cpath d='M0 0 L30 51.96 M30 0 L60 51.96' stroke='%23ffffff' stroke-opacity='0.07' stroke-width='1' fill='none'/%3E%3C/svg%3E"); background-repeat: repeat;
  color: rgba(255,255,255,0.65);
  padding: 60px 0 0;
  border-top: 1px solid rgba(201,168,76,0.20);
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-col h4 { color: var(--gold); margin-bottom: 16px; font-size: 15px; letter-spacing: 0.03em; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: rgba(255,255,255,0.60); font-size: 14px; transition: color 0.15s; }
.footer-col ul li a:hover { color: var(--gold); text-decoration: none; }
.footer-col p { font-size: 14px; color: rgba(255,255,255,0.60); }
.footer-logo-img { height: 60px; width: auto; margin-bottom: 14px; border-radius: 4px; }
.footer-logo-name { font-size: 18px; font-weight: 800; color: var(--gold); margin-bottom: 8px; }
.footer-bottom {
  border-top: 1px solid rgba(201,168,76,0.15);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom a { color: rgba(255,255,255,0.55); }
.footer-bottom a:hover { color: var(--gold); }

/* ============================================================
   PAGE HERO (inner pages)
   ============================================================ */
.page-hero {
  background: linear-gradient(135deg, #111315 0%, #1c1f23 100%);
  padding: 60px 0;
  text-align: center;
  border-bottom: 1px solid rgba(201,168,76,0.20);
}
.page-hero h1 { color: var(--white); font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 10px; }
.page-hero p  { color: rgba(255,255,255,0.65); max-width: 560px; margin: 0 auto; }

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
  background: linear-gradient(135deg, #1c1f23 0%, #252930 100%);
  border-top: 1px solid rgba(201,168,76,0.20);
  border-bottom: 1px solid rgba(201,168,76,0.20);
  padding: 64px 0;
  text-align: center;
}
.cta-banner h2 { color: var(--white); margin-bottom: 12px; }
.cta-banner p  { color: rgba(255,255,255,0.70); margin-bottom: 28px; }

/* ============================================================
   WHY US — Stats bar
   ============================================================ */
.stat-item { text-align: center; }
.stat-number { font-size: 2.4rem; font-weight: 800; color: var(--gold); line-height: 1; }
.stat-label  { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* ============================================================
   GOLD DIVIDER
   ============================================================ */
.gold-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border: none;
  margin: 48px 0;
}

/* ============================================================
   PRIVACY / TERMS
   ============================================================ */
.legal-content { max-width: 760px; margin: 0 auto; }
.legal-content h2 { color: var(--charcoal); margin: 40px 0 12px; font-size: 1.3rem; }
.legal-content h3 { color: var(--charcoal); margin: 24px 0 8px; font-size: 1.05rem; }
.legal-content p  { color: var(--muted); margin-bottom: 14px; }
.legal-content ul { padding-left: 20px; color: var(--muted); margin-bottom: 14px; }
.legal-content ul li { margin-bottom: 6px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .grid-3  { grid-template-columns: repeat(2, 1fr); }
  .grid-4  { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .about-intro { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  /* Services page two-col layout */
  .services-layout { grid-template-columns: 1fr !important; }
  .services-sticky { position: static !important; }
}

@media (max-width: 640px) {
  :root { --nav-h: 80px; }
  .section { padding: 48px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .hero { padding: 60px 0 50px; }
  .hero h1 { font-size: 32px; }
  .hero-btns { flex-direction: column; }
  .values-grid { grid-template-columns: 1fr; }

  /* Navbar logo */
  .logo-img { height: 60px; }
  .logo-divider { height: 36px; }
  .logo-company-name .name-top { font-size: 13px; }
  .logo-company-name .name-bottom { font-size: 10px; }

  /* Services page */
  .services-layout { grid-template-columns: 1fr !important; }
  .services-sticky { position: static !important; }

  /* Page hero */
  .page-hero h1 { font-size: 28px; }
  .page-hero p  { font-size: 15px; }

  /* Contact form */
  .contact-grid { gap: 40px; }

  /* Tips filter bar */
  .filter-bar { gap: 8px; }
  .filter-btn  { font-size: 13px; padding: 6px 12px; }

  /* CTA banner */
  .cta-banner h2 { font-size: 24px; }
  .cta-banner p  { font-size: 15px; }
}

/* ============================================================
   Chat Widget
   ============================================================ */
#wns-chat {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: 'Inter', -apple-system, sans-serif;
}
#chat-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gold);
  border: none;
  cursor: pointer;
  font-size: 22px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  transition: transform 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
#chat-toggle:hover { transform: scale(1.08); background: var(--gold-dark); }
#chat-popup {
  position: absolute;
  bottom: 68px;
  right: 0;
  width: 320px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.22);
  overflow: hidden;
}
#chat-header {
  background: var(--charcoal);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#chat-title { font-weight: 700; font-size: 14px; color: var(--gold); }
#chat-subtitle { font-size: 11px; color: rgba(255,255,255,0.55); margin-top: 2px; }
#chat-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  font-size: 16px;
  padding: 2px 6px;
}
#chat-close:hover { color: #fff; }
#chat-body { padding: 14px; }
#chat-messages { margin-bottom: 12px; }
.chat-msg-bot {
  background: #f1f5f9;
  padding: 10px 13px;
  border-radius: 12px 12px 12px 3px;
  font-size: 13px;
  color: #1a1a1e;
  line-height: 1.5;
  margin-bottom: 8px;
}
#chat-form-area { display: flex; flex-direction: column; gap: 8px; }
#chat-name, #chat-email, #chat-input {
  padding: 9px 12px;
  border: 1px solid #e2e0db;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  color: #1a1a1e;
  transition: border-color 0.2s;
}
#chat-name:focus, #chat-email:focus, #chat-input:focus { border-color: var(--gold); }
#chat-input { resize: none; }
#chat-send {
  background: var(--gold);
  color: var(--charcoal);
  border: none;
  padding: 10px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
}
#chat-send:hover { background: var(--gold-dark); }
#chat-thanks { text-align: center; padding: 8px 0; }
