/* ===========================================================
   MSY Accountants — clone stylesheet
   Faithful recreation of the original layout & branding.
   =========================================================== */

:root {
  /* Palette: 9F3942 red · D7DFE6 light blue-grey · 428AB5 blue · FFFFFF white */
  --navy:      #235a78;   /* deep blue (darkened 428AB5) — headings, page-title, white-text surfaces */
  --navy-dark: #1b4a64;   /* darker blue — top bar, footer */
  --blue:      #428ab5;   /* palette brand blue — hero, accents, focus, icons */
  --blue-light:#d7dfe6;   /* palette light blue-grey — surface tints */
  --red:       #9f3942;   /* palette red — primary calls to action */
  --red-dark:  #863139;   /* red hover */
  --ink:       #2e3a44;   /* body text */
  --muted:     #5b646f;
  --line:      #dce3e9;   /* palette-tinted hairline */
  --bg:        #ffffff;   /* white */
  --bg-alt:    #eef2f6;   /* very light blue-grey section bg */
  --top-bar:   #1b4a64;
  --max:       1160px;
  --radius:    4px;
  --shadow:    0 2px 14px rgba(27, 74, 100, .10);
  --font-display: "Spectral", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* ---------- Accessibility floor ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 200;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  transition: top .18s ease;
}
.skip-link:focus { top: 12px; color: #fff; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 2px;
}
/* Don't double up the ring on inputs that already get a custom focus glow */
.field input:focus-visible,
.field textarea:focus-visible { outline: none; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--navy); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--red); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 .6em;
}

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

.btn {
  display: inline-block;
  background: var(--red);
  color: #fff;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .3px;
  border: none;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--red-dark); color: #fff; transform: translateY(-1px); }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--top-bar);
  color: #cdd6e0;
  font-size: 13px;
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  min-height: 42px;
  flex-wrap: wrap;
}
.topbar a { color: #cdd6e0; }
.topbar a:hover { color: #fff; }
.topbar .contact-item { white-space: nowrap; }
.topbar .contact-item strong { color: #fff; font-weight: 600; }

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  gap: 20px;
}
.logo img { height: 56px; width: auto; }

.main-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
}
.main-nav a {
  display: block;
  padding: 10px 14px;
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .2px;
  border-radius: var(--radius);
}
.main-nav a:hover,
.main-nav a.active {
  background: var(--blue-light);
  color: var(--navy);
}

.nav-toggle {
  display: none;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 9px 14px;
  font-size: 18px;
  cursor: pointer;
}

/* ---------- Hero slider ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy-dark);
}
.slides {
  position: relative;
  height: 500px;
}
.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity .9s ease;
  display: flex;
  align-items: center;
}
.slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(27,74,100,.78) 0%, rgba(27,74,100,.45) 55%, rgba(27,74,100,.2) 100%);
}
.slide.active { opacity: 1; }
.slide-content {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 22px;
  width: 100%;
  color: #fff;
}
/* Stagger the active slide's content in (motion-safe) */
@media (prefers-reduced-motion: no-preference) {
  .slide.active .slide-content > * {
    animation: slideUp .7s cubic-bezier(.22,.61,.36,1) both;
  }
  .slide.active .slide-content > *:nth-child(2) { animation-delay: .12s; }
  .slide.active .slide-content > *:nth-child(3) { animation-delay: .24s; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.slide-content h2 {
  color: #fff;
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: 1px;
  margin-bottom: .35em;
}
.slide-content p {
  font-size: clamp(16px, 2vw, 20px);
  max-width: 560px;
  margin: 0 0 1.4em;
  color: #e4ecf4;
}

.slider-dots {
  position: absolute;
  bottom: 22px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  z-index: 3;
}
.slider-dots button {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.slider-dots button.active { background: #fff; }

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  width: 46px; height: 46px;
  font-size: 24px;
  cursor: pointer;
  border-radius: 50%;
  transition: background .15s ease;
}
.slider-arrow:hover { background: rgba(255,255,255,.3); }
.slider-arrow.prev { left: 18px; }
.slider-arrow.next { right: 18px; }

/* ---------- Section scaffolding ---------- */
.section { padding: 64px 0; }
.section.alt { background: var(--bg-alt); }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head h2 { font-size: 32px; }
.section-head .lead { color: var(--muted); max-width: 640px; margin: 0 auto; }

/* Eyebrow label — used above section headings */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 10px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 2px;
  background: var(--red);
  vertical-align: middle;
  margin-right: 10px;
  margin-bottom: 3px;
}

.page-title {
  background: var(--navy);
  color: #fff;
  padding: 52px 0;
}
.page-title h1 { color: #fff; margin: 0; font-size: clamp(28px, 4vw, 40px); }
.page-title .crumb { color: #b9c6d6; font-size: 14px; margin-top: 6px; }
.page-title .crumb a { color: #b9c6d6; }
.page-title .crumb a:hover { color: #fff; }

/* ---------- Service cards (home) ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}
.service-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(27,74,100,.14); }
.service-card .thumb { aspect-ratio: 4 / 3; overflow: hidden; }
.service-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.service-card:hover .thumb img { transform: scale(1.06); }
.service-card h3 {
  font-size: 18px;
  margin: 0;
  padding: 18px 14px;
}
.service-card h3 a { color: var(--navy); }
.service-card h3 a:hover { color: var(--red); }

/* ---------- Generic content ---------- */
.content { max-width: 860px; margin: 0 auto; }
.content p { margin: 0 0 1.1em; }
.content .figure { margin: 30px 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }

.callout {
  background: var(--blue-light);
  border: 1px solid #c2cfdb;
  padding: 18px 22px;
  border-radius: var(--radius);
  margin: 26px 0;
}

/* ---------- Services detail blocks ---------- */
.service-block {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 40px;
  align-items: start;
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
}
.service-block:last-child { border-bottom: none; }
.service-block:nth-child(even) .media { order: 2; }
.service-block .media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.service-block h3 { font-size: 24px; }
.service-block ul { margin: 0; padding-left: 20px; }
.service-block li { margin-bottom: 7px; }
.service-block .sub { font-weight: 600; color: var(--navy); margin: 16px 0 6px; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: start;
}
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.info-list .label { font-family: var(--font-display); font-weight: 700; color: var(--navy); min-width: 110px; }

.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; color: var(--navy); }
.field input, .field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  background: var(--bg-alt);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(66,138,181,.20);
}
.field textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: 13px; color: var(--muted); margin-top: 4px; }
.form-status { margin-top: 14px; font-weight: 600; }

/* ---------- Links list ---------- */
.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.link-list li a {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-weight: 600;
  color: var(--navy);
  box-shadow: var(--shadow);
  transition: border-color .15s ease, color .15s ease;
}
.link-list li a:hover { border-color: var(--red); color: var(--red); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-dark);
  color: #aeb9c6;
  padding: 28px 0;
  font-size: 13.5px;
}
.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer a { color: #cdd6e0; }
.site-footer a:hover { color: #fff; }
.footer-links { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-links span { color: #5d6f84; }

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  background: var(--blue);
  color: #fff;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow);
  cursor: pointer;
  border: none;
  z-index: 60;
}
.back-to-top.show { display: flex; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .service-block { grid-template-columns: 1fr; gap: 20px; }
  .service-block:nth-child(even) .media { order: 0; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 780px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 8px; }
  .main-nav a { padding: 12px 14px; border-radius: var(--radius); }
  .slides { height: 420px; }
  .topbar .container { justify-content: center; gap: 14px; }
}

@media (max-width: 520px) {
  .services-grid { grid-template-columns: 1fr; }
  .section { padding: 44px 0; }
  .topbar .fax { display: none; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
  .slide { transition: opacity .01s linear; }
}
