/* ==========================================================================
   Nexus Tax Services — design system
   Brand: sky blue #2CB8F4 / #2293D2, vivid blue #0080FF, charcoal #232323
   Fonts: Roboto Slab (display), Roboto (body) — self-hosted, see fonts.css
   ========================================================================== */

:root {
  --blue: #2cb8f4;
  /* Darkened from the brand's #2293d2 so text/links hit WCAG AA (5.09:1 on
     white); #2cb8f4 stays for accents on dark surfaces where it passes. */
  --blue-deep: #0d72b9;
  --blue-mid: #0066cc;   /* gradient/button base — white text = 5.57:1 */
  --blue-hover: #0a5c99;
  --blue-vivid: #0080ff; /* original brand vivid blue — decorative glows only */
  --charcoal: #232323;
  --charcoal-2: #2c2f33;
  /* Flat, high-contrast palette: pure black text on light surfaces, pure
     white on dark — no greys (client preference). Hierarchy comes from
     size/weight, not color. */
  --ink: #000000;
  --body: #000000;
  --muted: #000000;
  --line: #e5e9ed;
  --bg-soft: #f5f8fa;
  --white: #ffffff;

  --font-display: 'Roboto Slab', 'Roboto', Georgia, serif;
  --font-body: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  --container: 1140px;
  --radius: 16px;
}

/* ---- Reset-lite ---------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--body);
  background: var(--white);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

figure {
  margin: 0;
}

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}

::selection {
  background: var(--blue);
  color: #000;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--blue-deep);
  text-decoration: none;
}

a:hover {
  color: var(--blue-hover);
}

ul {
  margin: 0;
  padding: 0;
}

:focus-visible {
  outline: 3px solid var(--blue-deep);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Dark surfaces need the light ring; the blue band needs white. */
.site-header :focus-visible,
.site-footer :focus-visible,
.on-dark :focus-visible {
  outline-color: var(--blue);
}

.band :focus-visible {
  outline-color: #fff;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--blue-mid);
  color: var(--white);
  border-radius: 0 0 8px 8px;
  font-weight: 500;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
  color: var(--white);
}

/* ---- Layout -------------------------------------------------------------- */

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

.section {
  padding: 96px 0;
}

.section--soft {
  background: var(--bg-soft);
}

.section-head {
  max-width: 720px;
  margin-bottom: 56px;
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.kicker {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-deep);
}

.section-head h2 {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.75rem);
}

.section-head p {
  margin: 0;
  font-size: 1.125rem;
  color: var(--muted);
}

/* On-dark variants — pure white text, no greys */
.on-dark .kicker { color: var(--blue); }
.on-dark h1, .on-dark h2, .on-dark h3 { color: var(--white); }
.on-dark p { color: var(--white); }

/* ---- Buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn svg {
  flex: none;
}

.btn--primary {
  background: linear-gradient(135deg, var(--blue-mid), var(--blue-deep));
  color: var(--white);
}

.btn--primary:hover {
  color: var(--white);
  transform: translateY(-2px);
  filter: brightness(0.92);
}

.btn--ghost {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--white);
}

.btn--ghost:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.btn--white {
  background: var(--white);
  color: var(--blue-deep);
}

.btn--white:hover {
  color: var(--blue-hover);
  transform: translateY(-2px);
}

/* ---- Header -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(35, 35, 35, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 3px solid var(--blue);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s;
}

.site-header.is-scrolled {
  border-bottom-color: rgba(255, 255, 255, 0.14);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
}

.brand img {
  width: 168px;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
}

.site-nav a:not(.btn) {
  position: relative;
  padding: 6px 0;
  color: var(--white);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.site-nav a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--blue);
  transition: right 0.22s ease;
}

.site-nav a:not(.btn):hover {
  color: var(--blue);
}

.site-nav a:not(.btn):hover::after {
  right: 0;
}

.site-nav .btn {
  padding: 11px 24px;
  font-size: 0.9375rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 11px;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- Hero ---------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(1100px 520px at 82% -10%, rgba(0, 128, 255, 0.32), transparent 60%),
              radial-gradient(700px 420px at -8% 110%, rgba(44, 184, 244, 0.16), transparent 55%),
              linear-gradient(180deg, #1d1f22, var(--charcoal));
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(760px 480px at 70% 20%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(760px 480px at 70% 20%, #000 30%, transparent 75%);
}

.hero .container {
  position: relative;
  padding-top: 110px;
  padding-bottom: 120px;
  max-width: 900px;
  text-align: center;
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(2.5rem, 1.6rem + 3.9vw, 4.35rem);
  color: var(--white);
}

.hero h1 em {
  font-style: normal;
  color: var(--blue);
}

.hero .lede {
  max-width: 640px;
  margin: 0 auto 36px;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  color: var(--white);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 52px;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 12px;
  padding: 0;
  list-style: none;
}

.hero-chips li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 500;
}

.hero-chips svg {
  color: var(--blue);
  flex: none;
}

/* ---- Services ------------------------------------------------------------ */

.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-card {
  display: flex;
  flex-direction: column;
  padding: 38px 32px 34px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--blue);
}

.service-card .icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 22px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0, 128, 255, 0.12), rgba(44, 184, 244, 0.16));
  color: var(--blue-deep);
}

.service-card h3 {
  font-size: 1.375rem;
}

.service-card > p {
  margin-bottom: 20px;
  color: var(--muted);
}

.check-list {
  margin-top: auto;
  list-style: none;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.check-list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 6px 0;
  font-weight: 500;
  color: var(--ink);
}

.check-list svg {
  flex: none;
  color: var(--blue-deep);
  transform: translateY(2px);
}

/* ---- Blue CTA band ------------------------------------------------------- */

.band {
  background: linear-gradient(120deg, var(--blue-mid), var(--blue-deep));
  color: var(--white);
}

.band .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-top: 72px;
  padding-bottom: 72px;
}

.band h2 {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem);
  color: var(--white);
}

.band p {
  margin: 0;
  max-width: 560px;
  color: var(--white);
  font-size: 1.125rem;
}

/* ---- About --------------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: start;
}

.about-copy p + p {
  margin-top: 1.1em;
}

.about-aside {
  display: grid;
  gap: 18px;
}

.feature {
  display: flex;
  gap: 18px;
  padding: 22px 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.feature .icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 128, 255, 0.12), rgba(44, 184, 244, 0.16));
  color: var(--blue-deep);
}

.feature h3 {
  margin: 2px 0 4px;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 700;
}

.feature p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* ---- Team ---------------------------------------------------------------- */

.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.team-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* QuickBooks ProAdvisor badge, pinned to each card's top-right corner */
.team-card__badge {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 64px;
  height: auto;
}

.team-card__head {
  display: flex;
  align-items: center;
  gap: 22px;
  /* right padding clears the pinned badge */
  padding: 26px 112px 0 28px;
}

/* 3:4 frame matches the source headshots, so faces aren't cropped */
.team-card__photo {
  flex: none;
  width: 132px;
  height: 176px;
  border-radius: 18px;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--blue);
}

.team-card__photo--initials {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--blue-deep), var(--blue));
  color: var(--white);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
}

.team-card h3 {
  margin: 0 0 2px;
  font-size: 1.3125rem;
}

.team-card .role {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-deep);
}

.team-card__body {
  padding: 18px 28px 26px;
}

.team-card__body p {
  font-size: 0.9688rem;
  color: var(--body);
}

.team-card__body p:last-child {
  margin-bottom: 0;
}

.linkedin-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  font-size: 0.875rem;
  font-weight: 500;
}

/* ---- Testimonials -------------------------------------------------------- */

.quote-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.quote-card {
  display: flex;
  flex-direction: column;
  padding: 36px 34px 30px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.quote-card blockquote {
  margin: 0 0 26px;
  font-size: 1.0625rem;
  color: var(--body);
}

.quote-card .quote-mark {
  display: block;
  margin-bottom: 14px;
  color: var(--blue);
}

.quote-card figcaption {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.quote-card figcaption img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}

.quote-card figcaption strong {
  display: block;
  font-size: 1rem;
  color: var(--ink);
}

.quote-card figcaption span {
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---- Insights / blog cards ----------------------------------------------- */

.post-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.post-card {
  display: flex;
  flex-direction: column;
  padding: 34px 32px 30px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--blue);
}

.post-card time {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-deep);
}

.post-card h3 {
  margin: 10px 0 10px;
  font-size: 1.375rem;
}

.post-card h3 a {
  color: inherit;
}

.post-card h3 a:hover {
  color: var(--blue-deep);
}

.post-card p {
  margin-bottom: 22px;
  color: var(--muted);
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  font-weight: 700;
  font-size: 0.9375rem;
}

.read-more svg {
  transition: transform 0.2s;
}

.read-more:hover svg {
  transform: translateX(4px);
}

/* ---- Contact ------------------------------------------------------------- */

.contact {
  background: radial-gradient(900px 420px at 50% -20%, rgba(0, 128, 255, 0.25), transparent 60%),
              var(--charcoal);
}

.contact .container {
  max-width: 820px;
  text-align: center;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
}

/* ---- Footer -------------------------------------------------------------- */

.site-footer {
  background: var(--charcoal);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--white);
  font-size: 0.9375rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.8fr;
  gap: 48px;
  padding: 64px 0 48px;
}

.site-footer h3 {
  margin-bottom: 16px;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
}

.site-footer img {
  width: 160px;
  margin-bottom: 18px;
}

.site-footer p {
  margin: 0 0 8px;
}

.site-footer ul {
  list-style: none;
  display: grid;
  gap: 9px;
}

.site-footer a {
  color: var(--white);
}

.site-footer a:hover {
  color: var(--blue);
}

.footer-contact a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--white);
  font-weight: 500;
}

.footer-contact a:hover {
  color: var(--blue);
}

.footer-contact svg {
  color: var(--blue);
  flex: none;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.875rem;
  color: var(--white);
}

/* ---- Article / blog pages ------------------------------------------------ */

.page-hero {
  background: radial-gradient(900px 420px at 80% -30%, rgba(0, 128, 255, 0.28), transparent 60%),
              linear-gradient(180deg, #1d1f22, var(--charcoal));
}

.page-hero .container {
  max-width: 860px;
  padding-top: 72px;
  padding-bottom: 72px;
}

.page-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.9rem, 1.4rem + 2.4vw, 3rem);
  color: var(--white);
}

.page-hero .meta {
  color: var(--white);
  font-size: 0.9375rem;
}

.article .container {
  max-width: 760px;
  padding-top: 64px;
  padding-bottom: 80px;
}

.article h2 {
  margin: 1.8em 0 0.6em;
  font-size: 1.55rem;
}

.article ul {
  margin: 0 0 1.2em;
  padding-left: 1.35em;
  display: grid;
  gap: 10px;
}

.article li::marker {
  color: var(--blue-deep);
}

.article .callout {
  margin: 1.4em 0;
  padding: 20px 24px;
  background: var(--bg-soft);
  border-left: 4px solid var(--blue);
  border-radius: 0 10px 10px 0;
}

.article .callout p:last-child {
  margin-bottom: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  font-weight: 500;
  font-size: 0.9375rem;
}

.article-footer {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--muted);
}

/* ---- Reveal animation ---------------------------------------------------- */

/* Hidden state applies only after main.js adds .js-reveal to <html>, so if the
   script is blocked or fails to load, every section stays visible. */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js-reveal .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js-reveal .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn,
  .service-card,
  .post-card {
    transition: none;
  }
}

/* ---- Responsive ---------------------------------------------------------- */

@media (max-width: 980px) {
  .cards-3 {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin: 0 auto;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .team-grid,
  .quote-grid,
  .post-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .band .container {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 920px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 24px 24px;
    background: var(--charcoal);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    display: none;
    max-height: calc(100vh - 76px);
    max-height: calc(100dvh - 76px);
    overflow-y: auto;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav ul a:not(.btn) {
    display: block;
    padding: 13px 4px;
    font-size: 1.0625rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }

  .site-nav .btn {
    margin-top: 18px;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 72px 0;
  }

  .hero .container {
    padding-top: 76px;
    padding-bottom: 84px;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .team-card__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding-right: 28px;
  }

  .contact-actions .btn {
    width: 100%;
    justify-content: center;
  }
}
