/* ===========================
   Base: variables, resets, typography, layout
   Brand: CA TAX HUB (Light-only)
   =========================== */

/* ---------- CSS Variables ---------- */
:root{
  --brand:#0A3871;               /* Primary */
  --accent:#F47C26;              /* Accent / CTA */
  --ink:#0F172A;                 /* Primary text */
  --muted:#334155;               /* Secondary text */
  --line:#E2E8F0;                /* Borders/dividers */
  --bg:#F8FAFC;                  /* Page background */
  --card:#ffffff;                /* Card background */
  --radius:14px;                 /* Global radius */
  --radius-sm:12px;
  --radius-lg:16px;
  --shadow:0 6px 18px rgba(2,6,23,.08);
  --shadow-sm:0 3px 10px rgba(2,6,23,.06);
  --focus:2px solid #0A3871;
  --focus-offset:2px;
  --header-h:76px;               /* Default header height */
  --container:1120px;            /* Max content width */
  --trans-fast:.18s cubic-bezier(.2,.6,.2,1);
  --trans-slow:.32s cubic-bezier(.2,.6,.2,1);
  --ring: 0 0 0 3px rgba(10,56,113,.15);
}

html{ color-scheme: light; } /* lock to light */

/* ---------- Reset / Normalise ---------- */
*,
*::before,
*::after{ box-sizing:border-box }

html{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
  scroll-behavior:smooth;
}

body{
  margin:0;
  font:400 16px/1.6 Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--ink);
  background:var(--bg);
}

/* Typography */
h1,h2,h3,h4,h5,h6{
  font-family: "Playfair Display", Georgia, Cambria, "Times New Roman", Times, serif;
  color:var(--ink);
  line-height:1.22;
  margin:0 0 .5em;
  letter-spacing:.2px;
}
h1{ font-size: clamp(28px, 4vw, 40px); }
h2{ font-size: clamp(22px, 3vw, 28px); }
h3{ font-size: clamp(18px, 2.2vw, 22px); }
h4{ font-size: 18px; }

p{ margin:0 0 1em; }
small, .small{ font-size:.875rem; }
.muted{ color:var(--muted); }

a{
  color:var(--brand);
  text-decoration:none;
  transition: color var(--trans-fast);
}
a:hover{ color:#07264a; }

/* Lists */
ul,ol{ margin:0 0 1em 1.25em; }
li{ margin:.25em 0; }

/* Images */
img, picture{
  max-width:100%;
  height:auto;
  border:0;
  display:block;
}

/* Forms - base */
label{ display:block; font-weight:600; margin:0 0 .35rem; color:var(--ink); }
input, select, textarea{
  width:100%;
  background:var(--card);
  color:var(--ink);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:.7rem .9rem;
  outline:none;
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast), background var(--trans-fast), color var(--trans-fast);
  box-shadow:none;
}
input::placeholder, textarea::placeholder{ color:#94a3b8; }
input:focus, select:focus, textarea:focus{
  border-color:var(--brand);
  box-shadow: var(--ring);
}
select{
  appearance:none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(1em + 2px),
    calc(100% - 13px) calc(1em + 2px);
  background-size:5px 5px, 5px 5px;
  background-repeat:no-repeat;
}

/* Buttons */
button, .btn{
  --btn-bg:var(--brand);
  --btn-fg:#fff;
  display:inline-flex; align-items:center; justify-content:center;
  gap:.5rem;
  border:1px solid transparent;
  background:var(--btn-bg);
  color:var(--btn-fg);
  padding:.7rem 1rem;
  border-radius:var(--radius-sm);
  cursor:pointer;
  transition: transform var(--trans-fast), box-shadow var(--trans-fast), background var(--trans-fast), color var(--trans-fast), border-color var(--trans-fast);
  text-decoration:none; font-weight:600;
  box-shadow: var(--shadow-sm);
}
.btn:hover{ transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active{ transform: translateY(0); }

.btn-primary{ --btn-bg:var(--brand); --btn-fg:#fff; }
.btn-outline{ --btn-bg:transparent; --btn-fg:var(--brand); border-color:var(--brand); }
.btn-ghost{ --btn-bg:transparent; --btn-fg:var(--ink); border-color:transparent; }
.btn-ghost:hover{ background:rgba(2,6,23,.05); }
.btn-danger{ --btn-bg:#c62828; }

.icon-btn{
  display:inline-flex; align-items:center; justify-content:center;
  width:40px; height:40px; border-radius:12px;
  background:var(--card); border:1px solid var(--line); color:var(--ink);
  box-shadow:var(--shadow-sm);
}
.icon-btn:hover{ box-shadow:var(--shadow); }

/* Chips (filters/tags) */
.chip{
  display:inline-flex; align-items:center; justify-content:center;
  padding:.45rem .8rem; border-radius:999px;
  border:1px solid var(--line); background:var(--card); color:var(--ink);
  transition: background var(--trans-fast), color var(--trans-fast), border-color var(--trans-fast), transform var(--trans-fast);
}
.chip:hover{ transform: translateY(-1px); }
.chip.is-active{ background:var(--brand); border-color:var(--brand); color:#fff; }

/* Cards */
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:1.1rem 1.1rem;
  box-shadow:var(--shadow-sm);
}
.card h3{ margin-top:.2rem; }

/* Grid & Layout */
.container{ width:min(100%, calc(var(--container) + 2rem)); margin-inline:auto; padding-inline:1rem; }
.grid-2{ display:grid; grid-template-columns:1fr; gap:1.25rem; }
.grid-3{ display:grid; grid-template-columns:1fr; gap:1.25rem; }
.grid-4{ display:grid; grid-template-columns:1fr; gap:1.25rem; }

@media (min-width:720px){
  .grid-2{ grid-template-columns:1.1fr .9fr; gap:1.5rem; }
  .grid-3{ grid-template-columns:repeat(3,1fr); gap:1.25rem; }
  .grid-4{ grid-template-columns:repeat(4,1fr); gap:1.25rem; }
}

/* Sections */
.section{ padding: clamp(36px, 6vw, 72px) 0; }
.section.alt{ background: linear-gradient(180deg, rgba(2,6,23,.02), rgba(2,6,23,0)); }
.section-title{ margin:0 0 .6rem; }

/* Page hero */
.page-hero{
  padding: clamp(40px, 7vw, 96px) 0 28px;
  background:
    radial-gradient(1200px 400px at 20% -10%, rgba(10,56,113,.12), transparent 70%),
    radial-gradient(600px 280px at 80% -20%, rgba(244,124,38,.12), transparent 70%);
  border-bottom:1px solid var(--line);
}
.page-hero h1{ margin-bottom:.25rem; }
.page{ padding-bottom:20px; }

/* Header */
.skip-link{
  position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.skip-link:focus{
  left:16px; top:16px; width:auto; height:auto; padding:.6rem .8rem;
  background:#fff; color:#000; border-radius:10px; z-index:9999; box-shadow:var(--shadow);
}

.site-header{
  position:sticky; top:0; z-index:1000;
  background:rgba(248,250,252,.90);
  backdrop-filter: saturate(160%) blur(6px);
  border-bottom:1px solid var(--line);
  transition: height var(--trans-fast), transform var(--trans-fast), background var(--trans-fast), border-color var(--trans-fast);
}
.site-header .header-inner{
  height:var(--header-h);
  display:flex; align-items:center; justify-content:space-between; gap:.8rem;
}
html.scrolled .site-header{ background:rgba(248,250,252,.98); }
html.scrolled .site-header .header-inner{ height:64px; }

.brand{ display:flex; align-items:center; gap:.7rem; color:inherit; }
.brand img{ width:36px; height:36px; border-radius:8px; background:#e2e8f0; }
.brand .brand-text{ display:flex; flex-direction:column; line-height:1.2; }
.brand .brand-text small{ color:var(--muted); font-weight:500; }

/* Nav */
.nav{ display:flex; align-items:center; gap:.8rem; }
.nav .desktop{ display:none; list-style:none; margin:0; padding:0; gap:.5rem; }
.nav .desktop > li{ position:relative; }
.nav .desktop a{ padding:.5rem .7rem; display:inline-flex; }
.nav .nav-toggle{ display:inline-flex; }
.nav .callback-form{ display:none; }

@media (min-width:1000px){
  .nav .desktop{ display:flex; }
  .nav .nav-toggle{ display:none; }
  .nav .callback-form{ display:flex; gap:.4rem; align-items:center; }
  .nav .callback-form input{ width:240px; }
}

/* Mega menu base */
.has-mega > .mega-trigger{
  display:inline-flex; align-items:center; gap:.35rem; padding:.5rem .7rem; border-radius:10px; border:1px solid transparent; background:transparent;
}
.has-mega:focus-within .mega,
.has-mega:hover .mega{ opacity:1; transform:translateY(0); pointer-events:auto; }
.mega{
  position:absolute; left:50%; top:calc(100% + 12px); transform:translate(-50%, -6px);
  width: min(880px, 92vw);
  display:grid; grid-template-columns:repeat(3,1fr) 240px; gap:1rem;
  background:var(--card); border:1px solid var(--line); border-radius:16px; padding:1rem;
  box-shadow: var(--shadow);
  opacity:0; pointer-events:none; transition: opacity var(--trans-fast), transform var(--trans-fast);
}
.mega-col h4{ margin:.25rem 0 .25rem; }
.mega-col ul{ list-style:none; margin:0; padding:0; }
.mega-col li{ margin:.2rem 0; }
.mega-col a{ display:inline-block; padding:.35rem 0; }
.mega-cta{ display:flex; flex-direction:column; justify-content:center; align-items:flex-start; background:linear-gradient(180deg, rgba(10,56,113,.06), transparent); border-radius:12px; padding:1rem; }

/* Drawer (mobile menu) */
.drawer{
  position:fixed; inset:0 0 0 auto; width:min(86vw, 360px);
  background:var(--card); border-left:1px solid var(--line); transform:translateX(100%);
  transition: transform var(--trans-slow); z-index:1200; display:flex; flex-direction:column;
}
.drawer[aria-hidden="false"]{ transform:translateX(0); }
.drawer-head{ display:flex; align-items:center; justify-content:space-between; padding:1rem; border-bottom:1px solid var(--line); }
.drawer-body{ padding:1rem; display:flex; flex-direction:column; gap:.6rem; overflow:auto; }
.drawer-body .drawer-links{ list-style:none; padding-left:0; margin:.3rem 0 1rem; }
.drawer-body a{ padding:.45rem .2rem; border-radius:8px; }
.drawer-body a:hover{ background:rgba(2,6,23,.05); }
.drawer-foot{ margin-top:auto; padding:1rem; border-top:1px solid var(--line); display:flex; flex-direction:column; gap:.4rem; }

/* Hero */
.hero{
  position:relative;
  padding: clamp(48px, 8vw, 120px) 0 clamp(20px, 4vw, 40px);
  background:
    radial-gradient(1200px 400px at 15% -10%, rgba(10,56,113,.14), transparent 70%),
    radial-gradient(800px 360px at 95% -20%, rgba(244,124,38,.14), transparent 70%);
  border-bottom:1px solid var(--line);
}
.hero-grid{ display:grid; grid-template-columns:1fr; gap:1.25rem; align-items:center; }
.hero-copy .hero-ctas{ display:flex; gap:.6rem; margin:.8rem 0 1rem; flex-wrap:wrap; }
.hero .trust{ list-style:none; padding:0; margin:1rem 0 0; display:flex; gap:1rem; flex-wrap:wrap; color:var(--muted); }
.hero-art{ position:relative; }
.hero .glass.stat{
  position:absolute; right:10px; bottom:10px; padding:.45rem .65rem; border-radius:12px;
  background: rgba(255,255,255,.55); border:1px solid var(--line); backdrop-filter: blur(8px) saturate(150%); display:inline-flex; align-items:center; gap:.4rem;
  font-weight:600; color:#0a2540;
}

/* Lists: ticks, steps, kv */
.ticks{ list-style:none; padding-left:0; }
.ticks li{
  position:relative; padding-left:28px; margin:.45rem 0;
}
.ticks li::before{
  content:""; position:absolute; left:0; top:.2rem; width:18px; height:18px;
  border-radius:50%; background:conic-gradient(from 0deg, var(--brand), var(--brand)); mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/contain no-repeat;
}

.steps{ list-style:none; padding-left:0; counter-reset: step; display:grid; gap:.6rem; }
.steps li{ counter-increment: step; padding-left:36px; position:relative; }
.steps li strong{ display:inline-block; margin-right:.15rem; }
.steps li::before{
  content: counter(step); position:absolute; left:0; top:.2rem; width:28px; height:28px; border-radius:10px;
  background:var(--brand); color:#fff; display:grid; place-items:center; font-weight:700;
}
.steps.small li::before{ width:24px; height:24px; font-size:.85rem; }

/* Key/Value list */
.kv{ list-style:none; padding-left:0; }
.kv li{ display:flex; justify-content:space-between; gap:1rem; padding:.4rem 0; border-bottom:1px dashed var(--line); }
.kv li span{ color:var(--muted); }
.kv li strong{ color:var(--ink); }

/* Timeline */
.timeline{ list-style:none; padding-left:0; display:grid; gap:1rem; }
.timeline li{ display:grid; grid-template-columns:36px 1fr; gap:.8rem; align-items:start; }
.timeline li span{
  display:grid; place-items:center; width:36px; height:36px; border-radius:12px; background:var(--brand); color:#fff; font-weight:700; box-shadow:var(--shadow-sm);
}

/* Footer */
.site-footer{
  border-top:1px solid var(--line);
  background:linear-gradient(0deg, rgba(2,6,23,.02), transparent);
  padding-top:28px;
}
.footer-grid{ display:grid; grid-template-columns:1fr; gap:1.25rem; }
.footer-grid h4{ margin-bottom:.4rem; }
.footer-grid ul{ list-style:none; padding-left:0; margin:0; }
.footer-grid li{ margin:.35rem 0; }
.brand.-footer img{ width:36px; height:36px; }
.social{ display:flex; gap:.6rem; margin-top:.6rem; }
.social a{ width:36px; height:36px; display:grid; place-items:center; border:1px solid var(--line); border-radius:10px; background:var(--card); }
.foot-note{ border-top:1px solid var(--line); padding:12px 0; margin-top:14px; display:flex; align-items:center; justify-content:space-between; }

/* Utilities */
.center{ text-align:center; }
.mt-l{ margin-top:1.25rem; }
.mt-m{ margin-top:.8rem; }
.mt-s{ margin-top:.5rem; }
.w-full{ width:100%; }
.link{ color:var(--brand); font-weight:600; }
.alt-note{ font-style:italic; color:var(--muted); }

/* SVG icon utility */
.i{ width:1.1em; height:1.1em; fill:currentColor; }
.i.xl{ width:28px; height:28px; }

/* Toast container (messages area used by forms/app) */
.toasts{
  position: fixed; inset: 16px 16px auto auto; z-index: 1500;
  display:flex; flex-direction:column; gap:.5rem;
}
.toast{
  background:var(--card); color:var(--ink); border:1px solid var(--line); border-radius:12px; padding:.6rem .8rem; box-shadow:var(--shadow-sm);
}
.toast.success{ border-color:#1e9e57; }
.toast.error{ border-color:#c62828; }

/* FAB (WhatsApp) */
.fab{
  position:fixed; right:16px; bottom:16px; z-index:1200;
  width:56px; height:56px; border-radius:18px; display:grid; place-items:center;
  background:linear-gradient(135deg, #25D366, #22b357); color:#fff; box-shadow:var(--shadow);
}
.fab:hover{ transform:translateY(-1px); }

/* Map placeholder */
.map{ overflow:hidden; }
.map-embed img{ width:100%; height:auto; border-radius:12px; }

/* Accessibility */
.sr-only{
  position:absolute !important;
  width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}
:focus-visible{
  outline:var(--focus);
  outline-offset:var(--focus-offset);
  border-radius:10px;
}

/* Animations & motion preferences */
@keyframes reveal-up{
  from{ opacity:0; transform:translateY(10px); }
  to{ opacity:1; transform:translateY(0); }
}
.reveal{ animation: reveal-up .5s var(--trans-fast) both; }
@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; scroll-behavior:auto !important; }
}

/* Media queries */
@media (min-width:900px){
  .hero-grid{ grid-template-columns:1.1fr .9fr; gap:1.5rem; }
  .footer-grid{ grid-template-columns:1.2fr 1fr 1fr 1fr; gap:1.25rem; }
}

/* Print tweaks */
@media print{
  .site-header, .site-footer, .fab{ display:none !important; }
  a::after{ content:" (" attr(href) ")"; font-size:.85em; color:#666; }
}

/* Helper classes used across pages/components (minimal) */
.list-docs{ list-style:none; padding-left:0; }
.list-docs li{ display:flex; align-items:center; gap:.45rem; padding:.35rem 0; }
.list-docs a{ font-weight:600; }

.result{
  margin-top:.7rem;
  border:1px dashed var(--line);
  border-radius:12px;
  padding:.7rem .8rem;
  background:linear-gradient(180deg, rgba(10,56,113,.04), transparent);
}

/* Newsletter form within footer */
.newsletter{ display:flex; gap:.4rem; margin-top:.6rem; }
.newsletter input{ flex:1; min-width:160px; }

/* Desktop-only visibility helpers */
.only-desktop{ display:none; }
@media (min-width:1000px){ .only-desktop{ display:initial; } }

/* Tables */
table{ width:100%; border-collapse:collapse; margin:.8rem 0; }
th, td{ border:1px solid var(--line); padding:.6rem .5rem; text-align:left; }
th{ background:rgba(2,6,23,.04); }

/* End of base.css */
