/* ACCOUNTING FOR BUSINESS — STYLES
   Search the numbered headings below to find a section.
   CSS applies top to bottom; later matching rules override earlier ones.
   Class selectors start with a dot; id selectors start with #.
*/

/* 01. GLOBAL THEME — edit these color variables to recolor the site. rem sizes scale with browser text settings. */
:root {
  --green: #087e50;
  --bright: #15a76a;
  --ink: #242526;
  --gray: #65686a;
  --line: #e2e6e3;
  --pale: #f0f8f3;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: white;
  font-synthesis: none;
}

/* 02. BASIC RULES — sizing, links, typography, and keyboard focus outlines. */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
summary {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 5px;
}

button {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  letter-spacing: -0.055em;
  line-height: 1.08;
}

h1 {
  font-size: clamp(2.8rem, 5.2vw, 5rem);
  margin-bottom: 25px;
}

h2 {
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  margin-bottom: 22px;
}

h3 {
  font-size: 1.5rem;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.skip {
  position: fixed;
  top: -100px;
  background: white;
  padding: 12px;
  z-index: 10;
}

.skip:focus {
  top: 0;
}

/* 03. HEADER AND NAVIGATION — logo, desktop links, dropdowns, and mobile menu. */
.header {
  height: 102px;
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
  position: relative;
  z-index: 5;
}

.brand {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* BRAND IMAGE: keep height automatic so the uploaded logo is never stretched. */
.brand {
  flex-shrink: 0;
}
.brand-logo {
  display: block;
  width: 235px;
  max-width: 100%;
  height: auto;
}
footer .brand-logo {
  width: 210px;
}

nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 0.875rem;
  font-weight: 600;
}

nav a:hover,
summary:hover {
  color: var(--green);
}

summary {
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary:after {
  content: "⌄";
  padding-left: 8px;
}

nav details {
  position: relative;
}

.dropdown {
  position: absolute;
  left: -18px;
  top: 30px;
  min-width: 225px;
  padding: 10px;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 8px 25px #0000000d;
}

.dropdown a {
  display: block;
  padding: 12px 8px;
}

.nav-contact {
  border-bottom: 2px solid var(--green);
  padding: 10px 0;
}

.nav-contact span {
  margin-left: 10px;
}

.menu-toggle {
  display: none;
}

/* 04. HERO — headline, green underline, introduction, and contact button. */
.hero {
  position: relative;
  text-align: center;
  overflow: hidden;
  padding-top: 66px;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  line-height: 1.5;
  margin-bottom: 20px;
}

.highlight {
  position: relative;
  white-space: nowrap;
}

.highlight:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 7px;
  background: #64daa4;
  z-index: -1;
  transform: rotate(-1deg);
}

.hero-description {
  font-size: 1.25rem;
  color: var(--gray);
  line-height: 1.55;
  margin-bottom: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background: var(--green);
  color: #fff;
  border: 2px solid var(--green);
  padding: 18px 25px;
  border-radius: 3px;
  font-size: 0.94rem;
  font-weight: 700;
  box-shadow: 0 5px 0 #05673f;
  transition:
    background 0.2s,
    transform 0.2s;
}

.button:hover {
  background: #06613d;
  transform: translateY(-2px);
}

.button span {
  font-size: 1.3rem;
  line-height: 1;
}

.cta-note {
  font-size: 0.8rem;
  color: var(--gray);
  margin: 19px 0 0;
}

/* 05. ILLUSTRATION AND WALKERS — background artwork and the four-frame character sprite. */
.neighborhood {
  position: relative;
  max-width: 1450px;
  height: 300px;
  margin: -5px auto 0;
  overflow: hidden;
  margin-bottom: 0;
}

.scene {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  left: 0;
  bottom: 0;
}

.walker-track {
  position: absolute;
  bottom: 0;
  left: -120px;
  width: calc(100% + 240px);
  animation: stroll 33s linear infinite;
}

.walker {
  width: 99px;
  height: 132px;
  background: url("assets/walk-cycle.png") 0 0 / 400% 100% no-repeat;
  animation: walk 0.8s steps(4) infinite;
  mix-blend-mode: multiply;
}

.motion-toggle {
  position: absolute;
  bottom: 16px;
  right: 24px;
  border: 1px solid #dce2df;
  border-radius: 20px;
  padding: 8px 13px;
  background: #fffffff2;
  font-size: 0.75rem;
  z-index: 3;
}

.motion-toggle span {
  margin-left: 8px;
}

.paused .walker,
.paused .walker-track {
  animation-play-state: paused;
}

/* WALK CYCLE: four frames in one horizontal image. The 133.333% endpoint works with steps(4) to show frames 0, 1, 2, 3. */
@keyframes walk {
  to {
    background-position: 133.333% 0;
  }
}

/* TRAVEL: moves each character across the scene. Edit WALK_SETTINGS in app.js to change speed. */
@keyframes stroll {
  to {
    transform: translateX(100%);
  }
}

/* 06. PAGE SECTIONS — shared spacing, business category tabs, and dynamic content panel. */
.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 95px 25px;
}

.audiences {
  text-align: center;
}

.section-intro {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--gray);
  margin-bottom: 36px;
}

.category-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 38px 0 0;
}

.category-tabs button {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  background: #fff;
  border: 1px solid #d6dcd8;
  padding: 26px 24px;
  font-size: 1.15rem;
  font-weight: 700;
  transition:
    background 0.2s,
    border 0.2s;
  border-radius: 3px;
}

.category-number {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--gray);
}

.tab-arrow {
  margin-left: auto;
  color: var(--green);
}

.category-tabs button:hover {
  border-color: var(--green);
}

.category-tabs button[aria-selected="true"] {
  background: var(--pale);
  border: 2px solid var(--green);
  padding: 25px 23px;
}

#business-panel {
  text-align: left;
  background: var(--pale);
  padding: 42px 45px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 70px;
  margin-top: 20px;
  border-radius: 3px;
}

#business-panel .eyebrow {
  color: var(--green);
  margin-bottom: 12px;
}

#business-panel h3 {
  margin-bottom: 14px;
}

#panel-description {
  line-height: 1.7;
  color: var(--gray);
  max-width: 430px;
}

.text-link {
  display: inline-block;
  font-weight: 700;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--green);
  padding-bottom: 7px;
  margin-top: 10px;
}

.text-link span {
  padding-left: 16px;
}

#panel-list {
  padding: 6px 0 0;
  list-style: none;
  margin: 0;
}

#panel-list li {
  padding: 16px 0;
  border-bottom: 1px solid #d8e5dc;
  font-size: 0.95rem;
}

#panel-list li:before {
  content: "✓";
  color: var(--green);
  margin-right: 14px;
}

/* 07. SERVICES SECTION — two-column desktop layout. */
.support {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 75px;
  padding-top: 70px;
  padding-bottom: 75px;
}

.support-heading h2 {
  font-size: 2.9rem;
}

.support-heading h2 span {
  color: var(--green);
}

.service-list article {
  display: flex;
  gap: 24px;
  margin-bottom: 27px;
}

.service-list article > span {
  font-size: 0.8rem;
  color: var(--green);
  padding-top: 6px;
  white-space: nowrap;
}

.service-list h3 {
  font-size: 1.3rem;
  margin-bottom: 9px;
}

.service-list p {
  color: var(--gray);
  line-height: 1.7;
  font-size: 1rem;
}

/* 08. FINAL CONTACT SECTION AND FOOTER. */
.closing {
  text-align: center;
  background: var(--pale);
  padding: 80px 24px 90px;
}

.closing h2 {
  font-size: clamp(2.8rem, 5vw, 4.2rem);
}

footer {
  display: flex;
  align-items: center;
  gap: 35px;
  padding: 45px 5%;
  font-size: 0.8rem;
}

footer p {
  color: var(--gray);
  margin: 9px 0;
  line-height: 1.5;
}

footer strong {
  font-size: 0.85rem;
}

footer a[href^="mailto"] {
  color: var(--green);
}

.copyright {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--gray);
}

/* 09. PLACEHOLDER PAGES — shown when an unfinished navigation page is selected. */
.placeholder {
  min-height: 65vh;
  text-align: center;
  padding-top: 110px;
}

.placeholder p {
  line-height: 1.7;
}

.placeholder .text-link {
  display: table;
  margin: 28px auto;
}

[hidden] {
  display: none !important;
}

/* 10. RESPONSIVE LAYOUTS — rules below override earlier rules at matching screen sizes. */
@media (min-width: 1500px) {
  @keyframes stroll {
    to {
      transform: translateX(100%);
    }
  }
}

/* TABLET: reduce navigation gaps and illustration height. */
@media (max-width: 1050px) {
  nav {
    gap: 18px;
  }

  .header .brand-logo {
    width: 200px;
  }

  .neighborhood {
    height: 240px;
  }

  .hero {
    padding-top: 55px;
  }

  .support {
    gap: 30px;
  }
}

/* PHONE: collapse navigation and stack page sections. Edit mobile sizes here. */
@media (max-width: 720px) {
  .header {
    height: 80px;
    padding: 0 22px;
  }

  .header .brand-logo {
    width: 185px;
  }

  .menu-toggle {
    display: block;
    background: white;
    border: 0;
    font-size: 0.9rem;
  }

  .menu-toggle span {
    margin-left: 10px;
  }

  nav {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: white;
    padding: 20px 25px;
    box-shadow: 0 8px 15px #0001;
    align-items: stretch;
    gap: 22px;
  }

  nav.open {
    display: flex;
    flex-direction: column;
  }

  .dropdown {
    position: static;
    box-shadow: none;
    margin-top: 12px;
    border: 0;
    border-left: 2px solid var(--green);
  }

  .nav-contact {
    align-self: flex-start;
  }

  .hero {
    padding-top: 47px;
  }

  h1 {
    font-size: clamp(2.3rem, 7.5vw, 3.4rem);
    letter-spacing: -0.055em;
  }

  .hero .eyebrow {
    font-size: 0.59rem;
    letter-spacing: 0.12em;
  }

  .hero-description {
    font-size: 1.05rem;
  }

  .hero-copy {
    padding: 0 18px;
  }

  .neighborhood {
    height: 210px;
    width: 850px;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 22px;
  }

  .walker {
    height: 104px;
    width: 78px;
  }

  .motion-toggle {
    right: 14px;
    bottom: 10px;
    font-size: 0.68rem;
  }

  .section {
    padding: 65px 22px;
  }

  .category-tabs {
    gap: 8px;
  }

  .category-tabs button {
    padding: 18px 9px;
    gap: 6px;
    flex-direction: column;
    font-size: 0.95rem;
    text-align: center;
  }

  .category-tabs button[aria-selected="true"] {
    padding: 17px 8px;
  }

  .tab-arrow {
    display: none;
  }

  .category-number {
    font-size: 0.7rem;
  }

  #business-panel {
    padding: 28px 23px;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #panel-list li {
    font-size: 0.88rem;
  }

  .support {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .support-heading h2 {
    font-size: 2.5rem;
  }

  footer {
    flex-wrap: wrap;
    padding: 35px 24px;
    gap: 22px;
  }

  footer .copyright {
    width: 100%;
    margin-left: 0;
  }

  .closing {
    padding: 65px 22px;
  }

  .eyebrow {
    font-size: 0.65rem;
  }
}

/* ACCESSIBILITY: respect the visitor’s reduced-motion setting and hide the unnecessary pause button. */
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }

  .walker-track {
    left: 65%;
  }

  .motion-toggle {
    display: none;
  }
}

/* 11. TWO-WAY WALKING — reverse the track, then mirror its character to face left.
   The woman uses a separate four-frame sheet with the same CSS frame layout. */
.walker.woman {
  background-image: url("assets/walk-cycle-woman.png");
}
.walker-track.reverse {
  animation-direction: reverse;
}
.walker-track.reverse .walker {
  transform: scaleX(-1);
}

/* 12. TALK TO AN EXPERT — visible labels and responsive contact form. */
.contact-page h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}
.contact-copy p,
.contact-card p {
  line-height: 1.7;
  color: var(--gray);
}
.contact-location {
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding-top: 25px;
}
.contact-location h2,
.contact-card h2 {
  font-size: 1.7rem;
  letter-spacing: -0.035em;
}
.contact-location p {
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}
.contact-location a,
.form-note a {
  color: var(--green);
  text-decoration: underline;
}
.contact-card {
  padding: 32px;
  background: var(--pale);
  border-radius: 5px;
}
.contact-card .form-note {
  font-size: 0.875rem;
}
#expert-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#expert-form label {
  margin-top: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}
#expert-form input,
#expert-form select,
#expert-form textarea {
  width: 100%;
  padding: 13px;
  border: 1px solid #aab8ae;
  border-radius: 3px;
  background: white;
  color: var(--ink);
  font: inherit;
  min-width: 0;
}
#expert-form textarea {
  resize: vertical;
}
#expert-form :is(input, select, textarea):focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}
#expert-form .button {
  margin-top: 12px;
  align-self: flex-start;
}
#contact-status:empty {
  display: none;
}
@media (max-width: 720px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .contact-card {
    padding: 24px 20px;
  }
}

/* 13. CONTACT ACTIONS — online delivery and a separate email option. */
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.button-secondary {
  background: white;
  color: var(--green);
  box-shadow: none;
}
.button-secondary:hover {
  background: #e2f1e8;
}
.button:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

/* 14. HOMEPAGE REFINEMENTS — restrained type and a wider illustration. */
.hero {
  padding-top: 52px;
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}
.hero .eyebrow {
  text-transform: none;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}
.hero-description {
  font-size: 1.1rem;
}
.neighborhood {
  max-width: 1600px;
  height: 350px;
  margin-top: 5px;
}
.scene {
  object-fit: contain;
}
.audiences h2,
.purpose h2 {
  font-size: clamp(2rem, 3.3vw, 3rem);
}
.closing h2 {
  font-size: clamp(2.4rem, 4vw, 3.6rem);
}
/* Keep the Explore link below and left-aligned with the right-column list. */
.category-details {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.category-learn {
  align-self: flex-start;
  margin-top: 22px;
  text-align: left;
}
.category-learn #panel-learn-label {
  padding-left: 0;
}
.purpose {
  border-top: 1px solid var(--line);
}
.purpose-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 35px;
  margin-top: 36px;
}
.purpose-grid article {
  border-top: 2px solid var(--green);
  padding-top: 22px;
}
.purpose-grid p:not(.eyebrow) {
  color: var(--gray);
  line-height: 1.75;
}
.purpose-grid h3 {
  font-size: 1.3rem;
}
.purpose-grid .eyebrow {
  color: var(--green);
}
nav a[aria-current="page"] {
  color: var(--green);
}

/* 15. WALKER SCHEDULER — travel ends once; JavaScript removes the finished walker. */
#walkers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.walker-track {
  animation-iteration-count: 1;
  animation-fill-mode: both;
}
.walker {
  width: 99px;
  height: 132px;
}
.walker.woman {
  width: 99px;
  height: 132px;
}

/* 16. INNER PAGE TEMPLATES — shared typography for page content. */
.detail-hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 55px;
  padding-bottom: 55px;
}
.detail-hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
}
.page-note {
  display: inline-block;
  font-size: 0.75rem;
  color: #4e5b53;
  border: 1px dashed #97ada0;
  padding: 6px 10px;
  border-radius: 3px;
}
.page-art {
  width: 100%;
  height: auto;
  object-fit: contain;
  animation: art-arrival 0.8s ease-out both;
}
@keyframes art-arrival {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.detail-body {
  padding-top: 45px;
  border-top: 1px solid var(--line);
}
.detail-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}
.detail-intro h2 {
  font-size: 2.3rem;
}
.detail-intro p,
.detail-card p,
.detail-callout p {
  color: var(--gray);
  line-height: 1.8;
}
.detail-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 30px;
}
.detail-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.detail-card h3 {
  font-size: 1.3rem;
}
.detail-callout {
  margin-top: 55px;
  padding: 38px;
  background: var(--pale);
  text-align: center;
}
.detail-callout h2 {
  font-size: 2.1rem;
}
.resource-page > h1 {
  font-size: clamp(2.5rem, 4.8vw, 4rem);
}
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: 40px;
}
.resource-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.resource-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
}
.resource-card a > div {
  padding: 25px;
}
.resource-card h2 {
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  line-height: 1.25;
}
.resource-card .eyebrow {
  font-size: 0.7rem;
}
.resource-card:hover {
  border-color: var(--green);
}
.article-page {
  max-width: 900px;
}
.article-page h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
}
.article-date {
  margin-top: 32px;
  color: var(--green);
}
.article-art {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  margin-bottom: 35px;
}
.article-copy {
  font-size: 1.05rem;
  line-height: 1.85;
}
.article-copy h2 {
  font-size: 1.8rem;
  letter-spacing: -0.03em;
  margin: 35px 0 18px;
}
.article-copy a {
  color: var(--green);
  text-decoration: underline;
}
.article-copy li {
  margin-bottom: 10px;
}
@media (max-width: 720px) {
  .neighborhood {
    width: 950px;
    height: 270px;
  }
  .hero {
    padding-top: 40px;
  }
  .hero .eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.03em;
  }
  .hero h1 {
    font-size: clamp(2rem, 7vw, 2.8rem);
  }
  .walker,
  .walker.woman {
    width: 78px;
    height: 104px;
  }
  .purpose-grid,
  .detail-cards,
  .resource-grid {
    grid-template-columns: 1fr;
  }
  .detail-hero,
  .detail-intro {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .detail-hero .page-art {
    max-height: 260px;
  }
  .detail-callout {
    padding: 28px 20px;
  }
  .resource-card img {
    height: 220px;
  }
}

/* 18. ILLUSTRATED WALKERS — four poses and a corrected case layer. */
.walker.sprite {
  /* Keep the people secondary to the scene and homepage text. */
  position: relative;
  opacity: 1;
  filter: saturate(0.72);
  width: calc(84px * var(--person-size, 1));
  height: calc(112px * var(--person-size, 1));
  background: none;
  animation: stride-rise calc(var(--stride-duration) / 2) ease-in-out infinite;
  mix-blend-mode: normal;
}

.walker.sprite::before,
.walker.sprite::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--sprite-sheet) 0 0 / 400% 100% no-repeat;
  animation-duration: var(--stride-duration);
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
  animation-play-state: inherit;
}

/* At the alternate stride, use the original case on the rear hand. */
.walker.sprite::before { animation-name: stride-poses; }
.walker.sprite::after {
  clip-path: var(--rear-case);
  animation-name: stride-case;
}

@keyframes stride-poses {
  0% { background-position: 0 0; clip-path: none; }
  25% { background-position: 33.333333% 0; clip-path: none; }
  50% { background-position: 66.666667% 0; clip-path: var(--front-cut); }
  75%, 100% { background-position: 100% 0; clip-path: none; }
}
@keyframes stride-case {
  0%, 75%, 100% { opacity: 0; }
  50% { opacity: 1; }
}
@keyframes stride-rise {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -1px; }
}
.paused .walker.sprite { animation-play-state: paused; }

@media (max-width: 720px) {
  .walker.sprite {
    width: calc(66px * var(--person-size, 1));
    height: calc(88px * var(--person-size, 1));
  }
}
