/* ============================================================
   JW Tax & Consulting — 2026 redesign
   Palette: deep navy ink · emerald growth · warm gold · ivory
   ============================================================ */

:root {
  --ink: #0c1e2e;
  --ink-2: #0a1622;
  --navy: #11324a;
  --emerald: #0fae7a;
  --emerald-bright: #16d490;
  --gold: #d8b35e;
  --ivory: #f6f4ee;
  --paper: #ffffff;
  --surface: #ffffff;
  --surface-2: #f3f1ea;
  --line: #e3e0d6;
  --text: #15212b;
  --text-2: #51616d;
  --text-3: #7c8a94;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(12,30,46,.06), 0 2px 8px rgba(12,30,46,.05);
  --shadow: 0 8px 30px rgba(12,30,46,.10);
  --shadow-lg: 0 24px 60px rgba(12,30,46,.18);
  --maxw: 1180px;
  --font-sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
}

[data-theme="dark"] {
  --surface: #0e1f2d;
  --surface-2: #122636;
  --line: #1d3346;
  --text: #e9eef2;
  --text-2: #a8b6c1;
  --text-3: #74879a;
  --ivory: #0a1622;
  --paper: #0c1e2e;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow: 0 10px 34px rgba(0,0,0,.4);
  --shadow-lg: 0 28px 70px rgba(0,0,0,.55);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--ivory);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; letter-spacing: -.01em; color: var(--text); margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

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

.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 200; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-sans); font-weight: 600; font-size: 15px;
  padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap; text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn.full { width: 100%; justify-content: center; }
.btn-primary { background: var(--emerald); color: #042b1f; box-shadow: 0 6px 18px rgba(15,174,122,.35); }
.btn-primary:hover { background: var(--emerald-bright); box-shadow: 0 10px 26px rgba(22,212,144,.45); transform: translateY(-1px); }
.btn-outline { border-color: var(--line); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--emerald); color: var(--emerald); }
.btn-ghost { background: transparent; color: var(--text-2); padding: 9px 12px; }
.btn-ghost:hover { color: var(--text); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--ivory) 78%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s, box-shadow .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; gap: 18px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand-mark { width: 44px; height: 44px; border-radius: 12px; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--text); white-space: nowrap; }
.brand-name em { color: var(--emerald); font-style: normal; }
.brand-sub { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }

.primary-nav { display: flex; align-items: center; gap: 4px; }
.nav-link { font-size: 15px; font-weight: 500; color: var(--text-2); padding: 9px 14px; border-radius: 10px; background: none; border: none; cursor: pointer; font-family: var(--font-sans); transition: color .15s, background .15s; }
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-item { position: relative; }
.mega-menu {
  position: absolute; top: calc(100% + 8px); left: 0; width: 320px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px; display: grid; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: all .2s ease; z-index: 50;
}
.nav-item:hover .mega-menu, .nav-item:focus-within .mega-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.mega-menu a { display: flex; flex-direction: column; padding: 11px 13px; border-radius: 10px; transition: background .15s; }
.mega-menu a:hover { background: var(--surface-2); }
.mega-menu strong { font-size: 14px; color: var(--text); }
.mega-menu span { font-size: 12.5px; color: var(--text-3); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); cursor: pointer; transition: all .15s; }
.icon-btn:hover { color: var(--text); border-color: var(--text-3); }
.theme-toggle .i-moon { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-moon { display: block; }
.phone { font-variant-numeric: tabular-nums; }
.menu-toggle { display: none; }

.mobile-nav { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 64px 0 0; overflow: hidden; }
.hero-glow {
  position: absolute; inset: -20% -10% auto -10%; height: 620px; z-index: 0;
  background: radial-gradient(60% 80% at 75% 10%, rgba(15,174,122,.18), transparent 60%),
              radial-gradient(50% 70% at 15% 0%, rgba(216,179,94,.14), transparent 60%);
  pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding-bottom: 56px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; color: var(--text-2); background: var(--surface); border: 1px solid var(--line); padding: 7px 14px; border-radius: 999px; box-shadow: var(--shadow-sm); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 4px rgba(15,174,122,.18); }
.hero-copy h1 { font-size: clamp(40px, 6vw, 68px); margin: 22px 0 0; letter-spacing: -.02em; }
.grad { background: linear-gradient(100deg, var(--emerald), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: clamp(17px, 2vw, 19px); color: var(--text-2); margin-top: 22px; max-width: 36ch; }
.hero-cta { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 28px; margin-top: 36px; flex-wrap: wrap; }
.hero-trust div { display: flex; flex-direction: column; }
.hero-trust strong { font-family: var(--font-display); font-size: 19px; color: var(--text); }
.hero-trust span { font-size: 13px; color: var(--text-3); }

/* hero assistant card */
.hero-assistant { position: relative; }
.assistant-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 18px; position: relative; }
.assistant-card::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, rgba(15,174,122,.5), rgba(216,179,94,.4), transparent 60%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.ac-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.ac-avatar { width: 40px; height: 40px; border-radius: 11px; display: block; }
.ac-head strong { font-size: 15px; display: block; }
.ac-status { font-size: 12px; color: var(--text-3); display: inline-flex; align-items: center; gap: 6px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 0 rgba(15,174,122,.5); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(15,174,122,.5); } 70% { box-shadow: 0 0 0 8px rgba(15,174,122,0); } 100% { box-shadow: 0 0 0 0 rgba(15,174,122,0); } }
.ac-body { padding: 16px 2px; }
.bubble { font-size: 14px; padding: 11px 14px; border-radius: 14px; margin-bottom: 10px; max-width: 92%; }
.bubble.bot { background: var(--surface-2); color: var(--text); border-bottom-left-radius: 4px; }
.bubble.user { background: var(--emerald); color: #042b1f; margin-left: auto; border-bottom-right-radius: 4px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip { font-size: 12.5px; font-weight: 500; padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); cursor: pointer; transition: all .15s; font-family: var(--font-sans); }
.chip:hover { border-color: var(--emerald); color: var(--emerald); background: color-mix(in srgb, var(--emerald) 8%, var(--surface)); }
.ac-launch { margin-top: 8px; }
.ac-fine { font-size: 11px; color: var(--text-3); text-align: center; margin-top: 10px; }

/* marquee */
.marquee { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); overflow: hidden; padding: 14px 0; }
.marquee-track { display: flex; gap: 20px; white-space: nowrap; width: max-content; animation: scroll 34s linear infinite; }
.marquee-track span { font-family: var(--font-display); font-size: 16px; color: var(--text-3); font-weight: 500; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.kicker { font-size: 12.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--emerald); }
.kicker.light { color: var(--gold); }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); margin: 14px 0; }
.section-head p { color: var(--text-2); font-size: 17px; }

/* services */
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.service-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s; outline: none; }
.service-card:hover, .service-card:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--emerald) 40%, var(--line)); }
.service-card.featured { background: linear-gradient(180deg, var(--ink), var(--ink-2)); border-color: var(--navy); }
.service-card.featured h3, .service-card.featured p { color: #eaf1ee; }
.service-card.featured .svc-list li { color: #9fb4ad; }
.service-card.featured .svc-cta { color: var(--emerald-bright); }
.svc-flag { position: absolute; top: 14px; right: 14px; font-size: 11px; font-weight: 700; color: var(--gold); border: 1px solid rgba(216,179,94,.4); padding: 3px 9px; border-radius: 999px; }
.svc-icon { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--emerald) 12%, var(--surface)); color: var(--emerald); margin-bottom: 18px; }
.service-card.featured .svc-icon { background: rgba(15,174,122,.18); color: var(--emerald-bright); }
.service-card h3 { font-size: 21px; margin-bottom: 10px; }
.service-card p { font-size: 14.5px; color: var(--text-2); }
.svc-list { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 7px; }
.svc-list li { font-size: 13px; color: var(--text-2); padding-left: 20px; position: relative; }
.svc-list li::before { content: "✓"; position: absolute; left: 0; color: var(--emerald); font-weight: 700; }
.svc-cta { background: none; border: none; padding: 0; font-family: var(--font-sans); font-weight: 600; font-size: 14px; color: var(--emerald); cursor: pointer; transition: gap .15s; }
.svc-cta:hover { text-decoration: underline; }

/* AI feature */
.ai-feature { background: linear-gradient(160deg, var(--ink), var(--ink-2)); color: #eaf1ee; border-radius: 0; position: relative; overflow: hidden; }
.ai-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.ai-copy h2 { color: #fff; font-size: clamp(28px, 4vw, 44px); margin: 14px 0 18px; }
.ai-copy > p { color: #9fb4ad; font-size: 17px; }
.check-list { list-style: none; padding: 0; margin: 26px 0; display: grid; gap: 13px; }
.check-list li { position: relative; padding-left: 34px; color: #d6e2dd; font-size: 15.5px; }
.check-list li::before { content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 7px; background: rgba(15,174,122,.2); }
.check-list li::after { content: "✓"; position: absolute; left: 6px; top: 1px; color: var(--emerald-bright); font-weight: 700; font-size: 13px; }
.ai-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 28px; }
.ai-note { font-size: 13px; color: #7d9189; max-width: 24ch; }
.ai-visual { position: relative; display: grid; place-items: center; }
.ai-demo { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 16px; animation: float 7s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.ai-demo-head { display: flex; align-items: center; gap: 11px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.ai-demo-head strong { font-size: 15px; color: var(--text); display: block; }
.ai-demo-head span { font-size: 12px; color: var(--text-3); display: inline-flex; align-items: center; gap: 6px; }
.ai-demo-body { padding-top: 14px; display: flex; flex-direction: column; }
.ai-demo-body .bubble { max-width: 88%; }
.ai-demo-body .bubble.user { align-self: flex-end; }
.ai-demo-body .bubble.bot { align-self: flex-start; }
.ai-demo-body .bubble strong { color: inherit; }
.ai-demo-route { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding-top: 12px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.route-pill { font-size: 12.5px; font-weight: 700; color: var(--emerald); background: color-mix(in srgb, var(--emerald) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--emerald) 30%, var(--line)); padding: 6px 12px; border-radius: 999px; }
.route-cta { font-size: 12.5px; font-weight: 600; color: var(--gold); }

/* consulting */
.consult-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.consult-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; position: relative; transition: border-color .2s; }
.consult-item:hover { border-color: color-mix(in srgb, var(--gold) 50%, var(--line)); }
.ci-num { font-family: var(--font-display); font-size: 14px; color: var(--gold); font-weight: 700; }
.consult-item h3 { font-size: 22px; margin: 10px 0; }
.consult-item p { color: var(--text-2); font-size: 15px; }

/* process */
.process { background: var(--surface); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; counter-reset: s; }
.steps li { position: relative; padding-top: 14px; }
.step-n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--ink); color: var(--gold); font-family: var(--font-display); font-weight: 700; font-size: 18px; margin-bottom: 16px; }
.steps h3 { font-size: 19px; margin-bottom: 8px; }
.steps p { font-size: 14.5px; color: var(--text-2); }

/* about */
.about-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 56px; align-items: center; }
.about-copy h2 { font-size: clamp(28px,4vw,40px); margin: 14px 0 18px; }
.about-copy p { color: var(--text-2); font-size: 16px; margin-bottom: 14px; }
.quote { margin: 28px 0 0; padding: 22px 26px; background: var(--surface-2); border-left: 3px solid var(--emerald); border-radius: 0 14px 14px 0; }
.quote p { font-family: var(--font-display); font-size: 18px; color: var(--text); font-style: italic; }
.quote cite { display: block; margin-top: 10px; font-size: 13px; color: var(--text-3); font-style: normal; }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-align: center; }
.stat strong { display: block; font-family: var(--font-display); font-size: 34px; color: var(--emerald); }
.stat span { font-size: 13px; color: var(--text-2); }

/* contact */
.contact { background: linear-gradient(160deg, var(--ink), var(--ink-2)); color: #eaf1ee; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-copy h2 { color: #fff; font-size: clamp(28px,4vw,40px); margin: 14px 0 16px; }
.contact-copy > p { color: #9fb4ad; font-size: 17px; }
.contact-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
.cc { display: flex; align-items: center; gap: 13px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 15px; transition: background .15s, border-color .15s; }
a.cc:hover { background: rgba(15,174,122,.12); border-color: rgba(15,174,122,.4); }
.cc-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(216,179,94,.15); color: var(--gold); font-size: 16px; flex-shrink: 0; }
.cc span:last-child { display: flex; flex-direction: column; font-size: 14px; color: #cdd9d3; }
.cc strong { color: #fff; font-size: 13px; }

.contact-form { background: var(--surface); border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow-lg); }
.contact-form h3 { font-size: 22px; margin-bottom: 18px; }
.field { margin-bottom: 15px; display: flex; flex-direction: column; gap: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field .opt { color: var(--text-3); font-weight: 400; }
.field input, .field select, .field textarea {
  font-family: var(--font-sans); font-size: 15px; padding: 12px 14px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text); transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(15,174,122,.16); }
.field textarea { resize: vertical; }
.form-fine { font-size: 11.5px; color: var(--text-3); text-align: center; margin-top: 12px; }
.form-success { font-size: 14px; color: var(--emerald); font-weight: 600; text-align: center; margin-top: 12px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-2); color: #b6c4cd; padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 40px; }
.foot-brand .brand-mark { margin-bottom: 16px; }
.foot-tag { font-size: 14px; color: #8ba0ab; max-width: 30ch; }
.foot-social { display: inline-block; margin-top: 14px; font-size: 13px; color: var(--gold); }
.foot-col h4 { font-family: var(--font-sans); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: #fff; margin-bottom: 16px; }
.foot-col a, .foot-col p { display: block; font-size: 14px; color: #8ba0ab; margin-bottom: 9px; transition: color .15s; }
.foot-col a:hover { color: var(--emerald-bright); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12.5px; color: #6f8590; }
.foot-disc { flex: 1; min-width: 240px; }
.foot-built { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #8ba0ab; padding: 6px 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; transition: color .15s, border-color .15s; }
.foot-built:hover { color: var(--emerald-bright); border-color: rgba(22,212,144,.4); }
.foot-built::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: linear-gradient(135deg, var(--emerald-bright), var(--gold)); }

/* ---------- Floating assistant ---------- */
.assistant-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 120;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--emerald); color: #042b1f; border: none; cursor: pointer;
  padding: 14px 20px 14px 16px; border-radius: 999px; font-family: var(--font-sans); font-weight: 600; font-size: 15px;
  box-shadow: 0 10px 30px rgba(15,174,122,.45); transition: transform .2s, box-shadow .2s;
}
.assistant-fab:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(15,174,122,.55); }
.assistant-fab svg { stroke: #042b1f; }
.fab-label { white-space: nowrap; }

.assistant-panel {
  position: fixed; right: 22px; bottom: 22px; z-index: 130; width: 400px; max-width: calc(100vw - 32px);
  height: 600px; max-height: calc(100vh - 44px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden;
  animation: panelIn .28s cubic-bezier(.2,.8,.2,1);
}
.assistant-panel[hidden] { display: none; }
@keyframes panelIn { from { opacity: 0; transform: translateY(20px) scale(.97); } to { opacity: 1; transform: none; } }
.ap-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; background: linear-gradient(135deg, var(--ink), var(--navy)); color: #fff; }
.ap-id { display: flex; align-items: center; gap: 12px; }
.ap-head strong { font-size: 15px; display: block; }
.ap-head .ac-status { color: #9fb4ad; }
.ap-head .icon-btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.15); color: #fff; }
.ap-head .icon-btn:hover { background: rgba(255,255,255,.16); }
.ap-messages { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 4px; scroll-behavior: smooth; }
.ap-messages .bubble { max-width: 86%; }
.ap-messages .bubble.user { align-self: flex-end; }
.ap-messages .bubble.bot { align-self: flex-start; }
.ap-messages .bubble strong { font-weight: 700; }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: typing 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes typing { 0%,60%,100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }
.ap-cta { align-self: flex-start; margin: 4px 0 8px; }
.ap-quick { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 14px 8px; }
.ap-quick .chip { font-size: 12px; padding: 7px 11px; }
.ap-input { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
.ap-input input { flex: 1; min-width: 0; font-family: var(--font-sans); font-size: 14.5px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }
.ap-input input:focus { outline: none; border-color: var(--emerald); }
.icon-btn.send { background: var(--emerald); border-color: var(--emerald); color: #042b1f; width: 46px; }
.icon-btn.send svg { stroke: #042b1f; }
.icon-btn.send:hover { background: var(--emerald-bright); }
.ap-fine { font-size: 10.5px; color: var(--text-3); text-align: center; padding: 0 14px 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .primary-nav { display: none; }
  .menu-toggle { display: grid; }
  .phone { display: none; }
  .header-actions .btn-primary { display: none; } /* Ask JW handled by FAB + mobile menu */
  .header-inner { gap: 10px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-assistant { max-width: 460px; }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .ai-grid { grid-template-columns: 1fr; gap: 32px; }
  .ai-visual { height: auto; }
  .consult-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .mobile-nav.open { display: flex; flex-direction: column; gap: 4px; padding: 14px 24px 22px; border-top: 1px solid var(--line); background: var(--ivory); }
  .mobile-nav.open a { padding: 12px; font-size: 16px; font-weight: 500; color: var(--text); border-radius: 10px; }
  .mobile-nav.open a:hover { background: var(--surface-2); }
  .mobile-nav.open .btn { margin-top: 8px; }
}
/* Phone: JW chat goes full-screen, composer pinned to bottom */
@media (max-width: 600px) {
  .assistant-panel {
    top: 0; right: 0; bottom: 0; left: 0;
    width: 100%; max-width: 100%;
    height: 100vh; height: 100dvh; max-height: none;
    border: none; border-radius: 0; overflow-x: hidden;
  }
  .ap-head { padding-top: max(16px, env(safe-area-inset-top)); position: sticky; top: 0; z-index: 2; }
  .ap-head .icon-btn { width: 44px; height: 44px; }
  .ap-messages { flex: 1 1 auto; }
  .ap-input { position: sticky; bottom: 0; background: var(--surface); padding-bottom: 12px; }
  .ap-fine { background: var(--surface); padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .assistant-fab { right: 16px; bottom: 16px; }
}

@media (max-width: 560px) {
  .section { padding: 64px 0; }
  .hero-copy h1 { font-size: clamp(32px, 8.5vw, 42px); }
  .lede { font-size: 16px; max-width: none; }
  .hero-trust strong { font-size: 17px; }
  .brand-sub { display: none; }
  .brand-name { font-size: 17px; }
  .service-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .about-stats, .contact-cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .fab-label { display: none; }
  .assistant-fab { padding: 16px; }
  .hero-trust { gap: 18px; }
}
