:root{
  --brand-purple:#5B21B6;
  --brand-silver:#C0C0C0;
  --brand-bg:#F7FAFC;
  --brand-ink:#2D3748;
  --maxw:1120px;
  --radius:16px;
  --shadow:0 10px 30px rgba(0,0,0,.08);
}

*{box-sizing:border-box}
html,body{margin:0;color:var(--brand-ink);font:16px/1.6 "atpos",sans-serif}

.skip{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}
.skip:focus{position:static;width:auto;height:auto;background:#fff;color:#000;padding:.5rem}

.container{max-width:var(--maxw);padding:0 20px;margin:0 auto}

.site-header{position:sticky;top:0;background:#fff;border-bottom:1px solid rgba(0,0,0,.06);z-index:1000}
.site-header .container{display:flex;align-items:center;justify-content:center;height:64px;position:relative}
nav{display:flex;align-items:center;justify-content:center;width:100%}
nav a{margin:0 10px;text-decoration:none;color:var(--brand-purple);font-weight:500;transition:color .2s ease}
nav a:hover{color:#4C1D95}
.mobile-menu-toggle{display:none;position:absolute;right:0}

/* Standardise CTA buttons */
.button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;

  /* exact size – adjust if needed */
  width: 220px;
  height: 44px;

  /* keep existing look */
  padding: 0;                 /* height controls vertical size */
  white-space: nowrap;        /* prevent wrapping */
  text-align: center;
  font-weight: 700;           /* match your current style */
  
  border-radius:999px;
  border:1px solid var(--brand-purple);
  color:#fff;
  background:var(--brand-purple);
  text-decoration:none;
  transition:all .2s ease;
  cursor:pointer;
  font-size:.95rem;
}
.btn:hover{background:#4C1D95;border-color:#4C1D95;transform:translateY(-1px)}
.btn-primary{background:var(--brand-purple);border-color:var(--brand-purple);color:#fff}

.hero{position:relative;min-height:72vh;display:grid;align-items:center}
.hero-bg{position:absolute;inset:0;background:url('../images/hero-gradient.svg') center/cover no-repeat}
.hero .hero-inner{position:relative;padding:32px 0;color:#fff;text-align:center}
.hero-logo{height:clamp(50px,8vw,80px);width:auto;margin:0 auto 24px;display:block}
.hero h1{font-size:clamp(28px,6vw,56px);line-height:1.2;margin:0 0 .5rem;font-weight:700;word-wrap:break-word;hyphens:auto}
.hero p{font-size:clamp(18px,2.4vw,22px);max-width:48ch;margin:0 auto 1rem}
.hero-buttons{display:flex;gap:1rem;justify-content:center;flex-wrap:wrap}

.section{padding:clamp(24px,4vw,48px) 0}
.has-bg{position:relative;overflow:hidden}
.bg{position:absolute;inset:0;opacity:.25;pointer-events:none}
.about-bg{background:url('../images/about-texture-grid.svg') center/cover no-repeat}
.about-dots{background:url('../images/divider-dots.svg') center/cover no-repeat;position:absolute;inset:0;opacity:.3}
.principal-bg{background:url('../images/who-we-are-arcs.svg') left bottom/cover no-repeat}

.divider{height:60px;background:url('../images/divider-dots.svg') center/contain repeat-x;opacity:.5}


/* Services section heading color override */
#services h2{color:#E2E8F0}

h2{font-size:clamp(24px,4vw,36px);margin:0 0 1rem;font-weight:700;color:var(--brand-ink)}
h3{font-size:clamp(18px,3vw,24px);margin:0 0 1rem;font-weight:600;color:var(--brand-ink)}

/* Services section with charcoal background */
.services{background:var(--brand-ink);color:#fff}
.services h2{color:#fff}

/* Keep card content dark on white cards */
.services .card{color:var(--brand-ink)}
.services .card h3{color:var(--brand-ink)}
.services .card li{color:var(--brand-ink)}

.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:20px;margin-top:1.5rem}
.card{position:relative;background:#E2E8F0;border:1px solid rgba(45,55,72,.08);border-radius:var(--radius);box-shadow:var(--shadow);padding:20px;overflow:hidden;transition:transform .2s ease,box-shadow .2s ease}
.card:hover{transform:translateY(-2px);box-shadow:0 15px 40px rgba(0,0,0,.12)}
.card-bg{position:absolute;left:0;right:0;bottom:0;height:45%;opacity:.18;pointer-events:none}
.card-bg.tax{background:url('../images/services-tax-grid.svg') center/cover no-repeat}
.card-bg.advisory{background:url('../images/services-advisory-arc.svg') center/cover no-repeat}
.card ul{list-style:disc;padding:0 0 0 20px;margin:0}
.card li{padding:.25rem 0;border-bottom:1px solid rgba(45,55,72,.05)}
.card li:last-child{border-bottom:none}

.hp{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}

.site-footer{padding:24px 0;background:var(--brand-purple);margin-top:0}
.footer-content{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:20px}
.footer-brand .footer-logo{height:32px;width:auto}
.footer-nav{display:flex;gap:24px}
.footer-nav a{color:#fff;text-decoration:none;font-weight:500;transition:opacity .2s ease}
.footer-nav a:hover{opacity:.8}
.footer-copyright small{color:#fff;opacity:.9}

@media (max-width: 768px) {
  .footer-content{flex-direction:column;text-align:center;gap:16px}
  .footer-nav{gap:20px;flex-wrap:wrap;justify-content:center}
}

/* Defensive: About section never covered by its own backgrounds */
#about { position: relative; z-index: 100; isolation: isolate; }
#about .bg { position: absolute; inset: 0; pointer-events: none; opacity: .25; z-index: -1; }

/* ===== Mobile nav: hidden by default, only paints when opened ===== */
@media (max-width: 768px) {
  .hero-buttons{flex-direction:column;align-items:center}
  .hero-buttons .btn{width:100%;max-width:280px;text-align:center}
  
  .mobile-menu-toggle{display:block;background:none;border:none;font-size:1.5rem;color:var(--brand-purple);cursor:pointer;padding:0.5rem}
  
  /* Base: hide nav so it cannot paint a white block */
  .site-header .container > #primary-nav {
    display: none; /* no paint, no layout */
  }

  /* Visible state only when toggled */
  .site-header .container > #primary-nav.nav-visible {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff; /* panel background shows ONLY when visible */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 1rem;
  }

  /* Vertical layout for links when open */
  #primary-nav.nav-visible a {
    display: block;
    margin: 0.5rem 0;
    text-align: center;
  }
  
  /* Ensure CTA button is properly centered in mobile menu */
  #primary-nav.nav-visible .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.5rem auto;
    text-align: center;
  }

  /* Ensure header is sticky above content */
  .site-header { position: sticky; top: 0; z-index: 1010; background: #fff; }
  
  .site-header .container{justify-content:space-between}
  .cards{grid-template-columns:1fr}

  /* Keep the dots constrained on small screens */
  #about .about-dots { left: auto; right: 0; width: 50%; }
}

@media (max-width: 480px) {
  .container{padding:0 16px}
  .hero .hero-inner{padding:24px 0}
  .hero-logo{margin-bottom:16px}
  .hero h1{line-height:1.3;margin-bottom:1rem}
  .hero p{margin-bottom:1.5rem}
  .section{padding:clamp(16px,4vw,32px) 0}
}

/* Focus management for accessibility */
:focus-visible{outline:2px solid var(--brand-purple);outline-offset:2px}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,::before,::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}
  .hero-bg{background-attachment:scroll}
}

/* Contact section */
.contact-section.has-bg{position:relative;overflow:hidden}
.contact-bg{position:absolute;inset:0;background:url('../images/hero-gradient-flip.svg') center/cover no-repeat;opacity:1;pointer-events:none}
.contact-section .container{position:relative;z-index:1}

.contact-wrap{display:block}
.contact-title{margin:0 0 24px;font-size:clamp(24px,4vw,32px);font-weight:700;color:#fff}

/* New 2-column form layout */
.contact-form{display:flex;flex-direction:column;gap:24px}

.form-row{
  display:flex;
  gap:32px;
}

.form-left, .form-right{
  flex:1;
  display:flex;
  flex-direction:column;
}

.form-left label, .form-right label{
  display:block;
  color:#fff;
  font-weight:600;
  font-size:.95rem;
  margin:8px 0 4px;
}

/* First label in each column should not have top margin */
.form-left label:first-child, .form-right label:first-child{
  margin-top:0;
}

.form-left input, .form-right textarea{
  width:100%;
  padding:.55rem .8rem;
  border:1px solid rgba(255,255,255,.35);
  border-radius:6px;
  background:#fff;
  color:#2D3748;
  font-size:1rem;
  box-sizing:border-box;
  margin-bottom:12px;
}

.form-left input:focus, .form-right textarea:focus{
  border-color:#5B21B6;
  box-shadow:0 0 0 2px rgba(91,33,182,.2);
}

/* Make textarea expand to fill remaining space */
.form-right textarea{
  flex:1;
  resize:vertical;
}

.form-submit{
  display:flex;
  align-items:center;
  gap:16px;
}

.status{
  color:#fff;
  min-height:1.2em;
  margin:0;
}

input:invalid,textarea:invalid{
  border-color:rgba(255,255,255,.35)!important;
  box-shadow:none!important;
}

/* Location section */
.location-section{
  margin-top:48px;
  padding-top:24px;
  border-top:1px solid rgba(255,255,255,.2);
}

.location-title{
  margin:0 0 16px;
  font-size:clamp(20px,3vw,28px);
  font-weight:700;
  color:#fff;
}

.location-info{
  color:#fff;
  font-size:1.05rem;
  line-height:1.5;
  margin-bottom:24px;
}

.location-cta{
  margin-top:0;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .form-row{
    grid-template-columns: 1fr;
    gap:16px;
  }
  
  .form-submit{
    flex-direction:column;
    align-items:flex-start;
    gap:12px;
  }
  
  .location-section{
    margin-top:32px;
  }
}

