/* Copeland Tax — editorial adviser-led redesign */
:root {
  --navy: #202a72;
  --navy-deep: #171f52;
  --navy-ink: #10163d;
  --green: #39b54a;
  --green-bright: #61d16f;
  --ink: #151934;
  --body: #51576c;
  --muted: #74798b;
  --line: #dce0ea;
  --pale: #f2f4fb;
  --pale-blue: #e8edff;
  --white: #ffffff;
  --font-display: "Source Serif 4", Georgia, serif;
  --font-body: "DM Sans", "Segoe UI", system-ui, sans-serif;
  --wrap: 1180px;
  --header-h: 82px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 14px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--navy); text-underline-offset: 4px; }
button { font: inherit; }
address { font-style: normal; }
ul, ol, dl { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 1rem; }
h1, h2, h3 { margin: 0; color: var(--ink); font-weight: 600; line-height: 1.08; }
h1, h2 { font-family: var(--font-display); letter-spacing: -.035em; }
h3 { letter-spacing: -.02em; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.wrap { width: min(var(--wrap), calc(100% - 3rem)); margin-inline: auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 300;
  padding: .7rem 1rem; background: var(--navy-deep); color: var(--white);
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 0; }
:where(a, button):focus-visible { outline: 3px solid var(--green); outline-offset: 4px; }

.eyebrow {
  display: flex; align-items: center; gap: .65rem;
  margin: 0 0 1rem; color: var(--navy); font-size: .77rem;
  font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.eyebrow > span { width: 22px; height: 1px; background: currentColor; }
.eyebrow-light { color: var(--green-bright); }
.section { padding: clamp(5rem, 9vw, 8rem) 0; }
.section h2 { font-size: clamp(2.45rem, 4.8vw, 4.25rem); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 1.1rem;
  min-height: 52px; padding: .85rem 1.25rem; border: 0;
  font-size: .93rem; font-weight: 700; text-decoration: none;
  transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--navy); color: var(--white); box-shadow: 8px 8px 0 var(--green); }
.btn-primary:hover { background: var(--navy-deep); box-shadow: 5px 5px 0 var(--green); }
.btn-accent { background: var(--green); color: #071d0b; }
.btn-accent:hover { background: var(--green-bright); }
.text-link { font-weight: 700; text-decoration-color: var(--green); text-decoration-thickness: 2px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.header-inner { min-height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand img { width: 54px; }
.brand-text { display: grid; line-height: 1.15; }
.brand-text strong { color: var(--navy); font-size: 1.04rem; letter-spacing: -.015em; }
.brand-text small { margin-top: .22rem; color: var(--muted); font-size: .72rem; letter-spacing: .045em; }
.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav ul { display: flex; align-items: center; gap: 1.7rem; }
.site-nav ul a { color: var(--ink); font-size: .9rem; font-weight: 600; text-decoration: none; }
.site-nav ul a:hover { color: var(--navy); text-decoration: underline; text-decoration-color: var(--green); }
.nav-contact, .nav-cta {
  display: inline-flex; align-items: center; gap: .75rem; padding: .7rem 1rem;
  background: var(--navy-deep); color: var(--white); font-size: .87rem; font-weight: 700; text-decoration: none;
}
.nav-contact:hover, .nav-cta:hover { background: var(--navy); }
.nav-toggle {
  display: none; width: 46px; height: 46px; place-items: center;
  padding: 0; border: 1px solid var(--line); background: var(--white); cursor: pointer;
}
.nav-toggle-bars { width: 22px; display: grid; gap: 5px; }
.nav-toggle-bars span { height: 2px; background: var(--navy); transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero { overflow: hidden; background: var(--pale); border-bottom: 1px solid var(--line); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(340px, .82fr);
  align-items: center; gap: clamp(3rem, 7vw, 7rem);
  min-height: calc(100vh - var(--header-h)); padding: clamp(4rem, 8vw, 7rem) 0;
}
.hero-copy { position: relative; z-index: 1; }
.hero h1 { max-width: 12ch; font-size: clamp(3.7rem, 7.2vw, 6.6rem); }
.hero h1 em { color: var(--navy); font-weight: 500; }
.hero .lede { max-width: 59ch; margin: 1.7rem 0 2rem; font-size: 1.12rem; line-height: 1.75; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1.8rem; }
.credentials {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  max-width: 660px; margin-top: 4rem; border-top: 1px solid #cbd0dc;
}
.credentials div { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .8rem; padding: 1.25rem 1.1rem 0 0; }
.credentials div + div { padding-left: 1.1rem; border-left: 1px solid #cbd0dc; }
.credentials dt { color: var(--navy); font-family: var(--font-display); font-size: 2.1rem; font-weight: 600; line-height: 1; }
.credentials dd { margin: 0; color: var(--muted); font-size: .78rem; font-weight: 600; line-height: 1.3; }
.hero-figure { position: relative; margin: 0; }
.hero-figure::before {
  content: ""; position: absolute; width: 125%; height: 112%; top: -6%; left: 9%;
  background: var(--navy-deep); transform: rotate(3deg);
}
.hero-figure::after {
  content: "PERSONAL TAX"; position: absolute; z-index: 2; right: -1.6rem; top: 1.5rem;
  color: var(--green-bright); font-size: .68rem; font-weight: 700; letter-spacing: .26em;
  writing-mode: vertical-rl;
}
.portrait-frame { position: relative; z-index: 1; overflow: hidden; margin-right: 2.4rem; }
.portrait-frame img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 19%; }
.hero-figure figcaption {
  position: relative; z-index: 3; display: grid; width: max-content; max-width: calc(100% - 1rem);
  margin: -3rem 0 0 -2rem; padding: 1rem 1.35rem; background: var(--green); color: #0a260f;
}
.hero-figure figcaption strong { font-size: .9rem; }
.hero-figure figcaption span { font-size: .75rem; }

/* Services */
.services { background: var(--white); }
.services-layout { display: grid; grid-template-columns: .76fr 1.24fr; gap: clamp(4rem, 8vw, 8rem); align-items: start; }
.section-intro { position: sticky; top: calc(var(--header-h) + 2rem); }
.section-intro h2 { max-width: 9ch; }
.section-intro > p:not(.eyebrow) { max-width: 44ch; margin-top: 1.5rem; }
.service-image { margin: 2.6rem 0 0; overflow: hidden; }
.service-image img { width: 100%; aspect-ratio: 7 / 4; object-fit: cover; transition: transform .6s ease; }
.service-image:hover img { transform: scale(1.025); }
.service-list { border-top: 1px solid var(--line); }
.service-list li {
  display: grid; grid-template-columns: 46px 1fr 30px; gap: 1.4rem;
  padding: 2.35rem 0; border-bottom: 1px solid var(--line);
}
.service-no { color: var(--green); font-size: .8rem; font-weight: 700; letter-spacing: .08em; }
.service-list h3 { margin-bottom: .8rem; font-size: clamp(1.35rem, 2vw, 1.7rem); }
.service-list p { max-width: 56ch; margin: 0; }
.service-mark { align-self: start; color: var(--navy); font-size: 1.4rem; }

/* Clients */
.clients { background: var(--navy-deep); color: #cad0e8; }
.clients h2, .clients h3 { color: var(--white); }
.clients-head { display: grid; grid-template-columns: 1.4fr .6fr; gap: 4rem; align-items: end; margin-bottom: 4rem; }
.clients-head h2 { max-width: 13ch; }
.clients-head > p { max-width: 32ch; margin: 0 0 .5rem; }
.client-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.16); border-left: 1px solid rgba(255,255,255,.16); }
.client-grid li { min-height: 235px; padding: 1.65rem; border-right: 1px solid rgba(255,255,255,.16); border-bottom: 1px solid rgba(255,255,255,.16); }
.client-grid span { display: block; margin-bottom: 2.7rem; color: var(--green-bright); font-size: .75rem; font-weight: 700; }
.client-grid h3 { margin-bottom: .65rem; font-size: 1.2rem; }
.client-grid p { margin: 0; color: #aeb6d5; font-size: .95rem; }

/* Approach */
.approach { background: var(--pale); }
.approach-head { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 4rem; align-items: end; margin-bottom: 4rem; }
.approach-head .eyebrow { grid-column: 1 / -1; }
.approach-head h2 { max-width: 11ch; }
.approach-head > p:last-child { max-width: 38ch; justify-self: end; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--navy); }
.steps li { position: relative; padding: 2rem 1.5rem 0 0; }
.steps li + li { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.steps span {
  position: absolute; top: -16px; left: 0; display: grid; place-items: center;
  width: 32px; height: 32px; background: var(--navy); color: var(--white); font-size: .7rem; font-weight: 700;
}
.steps li + li span { left: 1.5rem; }
.steps h3 { min-height: 2.6em; margin: 1rem 0 .8rem; font-size: 1.12rem; }
.steps p { margin: 0; color: var(--muted); font-size: .93rem; }

/* About */
.about { overflow: hidden; }
.about-grid { display: grid; grid-template-columns: 1fr .85fr; gap: clamp(4rem, 8vw, 8rem); align-items: center; }
.about-figure { position: relative; margin: 0; }
.about-figure::before { content: ""; position: absolute; inset: 2rem -2rem -2rem 2rem; background: var(--pale-blue); }
.about-figure img { position: relative; width: 100%; aspect-ratio: 6 / 5; object-fit: cover; object-position: center 35%; }
.about-copy h2 { max-width: 13ch; font-size: clamp(2.7rem, 4.3vw, 3.8rem); }
.about-copy > p:not(.eyebrow):not(.signature) { max-width: 46ch; }
.about-lede { margin-top: 1.6rem; color: var(--ink); font-size: 1.15rem; font-weight: 500; }
.signature { display: grid; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.signature strong { color: var(--navy); }
.signature span { color: var(--muted); font-size: .82rem; }

/* Contact */
.contact { padding: 0 0 clamp(4rem, 8vw, 7rem); }
.contact-panel {
  position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 4rem;
  padding: clamp(3rem, 7vw, 6rem); background: var(--navy-ink); color: #bec5e1; overflow: hidden;
}
.contact-panel::after {
  content: ""; position: absolute; right: -110px; bottom: -110px;
  width: 290px; height: 290px; border: 58px solid rgba(57,181,74,.12); border-radius: 50%;
}
.contact-primary { position: relative; z-index: 1; }
.contact h2 { max-width: 10ch; color: var(--white); font-size: clamp(2.7rem, 5vw, 4.5rem); }
.contact-primary > p:not(.eyebrow) { max-width: 48ch; margin: 1.4rem 0 2rem; }
.contact-details { position: relative; z-index: 1; display: grid; border-top: 1px solid rgba(255,255,255,.16); }
.contact-details > div { padding: 1.35rem 0; border-bottom: 1px solid rgba(255,255,255,.16); }
.contact-details span { display: block; margin-bottom: .35rem; color: #7f89b3; font-size: .72rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.contact-details a { color: var(--white); font-weight: 600; text-decoration-color: rgba(97,209,111,.7); }
.contact-details p { display: flex; gap: 1.2rem; margin: 0; }

/* Footer */
.site-footer { background: var(--white); color: var(--muted); }
.footer-main { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 2.5rem 0; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .75rem 1.5rem; }
.footer-nav a { color: var(--ink); font-size: .87rem; font-weight: 600; text-decoration: none; }
.footer-nav a:hover { color: var(--navy); text-decoration: underline; text-decoration-color: var(--green); }
.footer-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem;
  padding: 1.4rem 0; border-top: 1px solid var(--line); font-size: .78rem;
}
.footer-base p { margin: 0; }
.built-by a { color: var(--navy); }

/* Privacy page and legacy footer compatibility */
.page-head { padding: clamp(4rem, 8vw, 7rem) 0; background: var(--pale); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(3.2rem, 7vw, 5.5rem); }
.page-head p:last-child { margin: 1rem 0 0; }
.prose { max-width: 72ch; padding: clamp(4rem, 8vw, 7rem) 0; }
.prose h2 { margin: 2.7rem 0 .8rem; font-family: var(--font-body); font-size: 1.28rem; letter-spacing: -.02em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { list-style: disc; padding-left: 1.25rem; margin-bottom: 1rem; }
.prose li { margin-bottom: .55rem; }
.prose .back { display: inline-block; margin-top: 2.5rem; font-weight: 700; }
.footer-inner { display: grid; grid-template-columns: 1.3fr .7fr 1fr; gap: 3rem; padding: 3rem 0; border-top: 1px solid var(--line); }
.footer-inner .footer-brand { display: block; }
.footer-inner .footer-brand img { width: 72px; margin-bottom: .8rem; }
.footer-inner .footer-brand p { max-width: 30ch; }
.footer-inner h2 { margin-bottom: .8rem; font-family: var(--font-body); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
.footer-inner ul { display: grid; gap: .4rem; }
.footer-inner a { color: var(--ink); }
.footer-contact address { line-height: 1.8; }
.footer-social { display: flex; gap: 1rem; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr 360px; gap: 3rem; }
  .hero h1 { font-size: clamp(3.35rem, 7vw, 5rem); }
  .credentials { margin-top: 3rem; }
  .services-layout { grid-template-columns: .85fr 1.15fr; gap: 4rem; }
  .client-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 3rem; }
  .about-grid { gap: 4rem; }
}

@media (max-width: 840px) {
  :root { --header-h: 70px; }
  .wrap { width: min(var(--wrap), calc(100% - 2rem)); }
  .nav-toggle { display: grid; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto; display: none;
    padding: .6rem 1rem 1.2rem; background: var(--white); border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(16,22,61,.12);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { display: grid; }
  .site-nav li { border-bottom: 1px solid var(--line); }
  .site-nav ul a { display: block; padding: .85rem .25rem; font-size: 1rem; }
  .nav-contact, .nav-cta { justify-content: center; margin-top: 1rem; }

  .hero-grid { grid-template-columns: 1fr; min-height: 0; padding: 4.5rem 0 5rem; }
  .hero h1 { max-width: 10ch; }
  .hero-figure { width: min(560px, 92%); margin: 2rem 0 0 auto; }
  .portrait-frame { margin-right: 1.8rem; }
  .hero-figure figcaption { margin-left: -1rem; }
  .hero-figure::after { right: -.8rem; }

  .services-layout, .about-grid, .contact-panel { grid-template-columns: 1fr; }
  .section-intro { position: static; }
  .section-intro h2 { max-width: 11ch; }
  .service-image { max-width: 580px; }
  .clients-head, .approach-head { grid-template-columns: 1fr; gap: 1.3rem; }
  .clients-head > p, .approach-head > p:last-child { justify-self: start; }
  .about-figure { max-width: 620px; }
  .contact-panel { gap: 3rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-inner .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .brand img { width: 48px; }
  .brand-text small { display: none; }
  .section { padding: 4.5rem 0; }
  .section h2 { font-size: clamp(2.5rem, 12vw, 3.45rem); }
  .hero h1 { font-size: clamp(3.15rem, 15vw, 4.5rem); }
  .hero .lede { font-size: 1rem; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 1.3rem; }
  .credentials { grid-template-columns: 1fr; }
  .credentials div { padding: 1rem 0; }
  .credentials div + div { padding-left: 0; border-left: 0; border-top: 1px solid #cbd0dc; }
  .credentials dd { font-size: .82rem; }
  .hero-figure { width: 94%; }
  .hero-figure::before { left: 5%; }
  .hero-figure figcaption { margin-top: -2.3rem; }
  .service-list li { grid-template-columns: 34px 1fr; gap: 1rem; }
  .service-mark { display: none; }
  .client-grid { grid-template-columns: 1fr; }
  .client-grid li { min-height: 0; }
  .client-grid span { margin-bottom: 1.5rem; }
  .steps { grid-template-columns: 1fr; border-top: 0; row-gap: 0; }
  .steps li, .steps li + li { padding: 1.6rem 0 1.6rem 3rem; border-top: 1px solid var(--line); border-left: 0; }
  .steps span, .steps li + li span { top: 1.55rem; left: 0; }
  .steps h3 { min-height: 0; margin: 0 0 .55rem; }
  .about-figure::before { inset: 1rem -1rem -1rem 1rem; }
  .about-copy h2 { max-width: none; font-size: 2.75rem; }
  .contact { padding-bottom: 3rem; }
  .contact-panel { width: 100%; padding: 3rem 1.2rem; }
  .contact h2 { font-size: clamp(2.65rem, 13vw, 3.6rem); }
  .contact-primary .btn { width: 100%; gap: .7rem; font-size: .86rem; }
  .footer-main { align-items: flex-start; flex-direction: column; }
  .footer-nav { justify-content: flex-start; }
  .footer-base { justify-content: flex-start; }
  .footer-inner { grid-template-columns: 1fr; }
}
