/* Fifth Management & Consulting — corporate site.
   FMC brand tokens shared with the 16 community sites. Display face Fraunces,
   body Inter — both self-hosted variable latin subsets.
   Every text/background pair below clears WCAG AA (4.5:1 normal / 3:1 large). */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* FMC green system — same tokens as the 16 property sites */
  --green: #3E5C45;
  --green-dark: #2C3E2D;
  --green-hover: #4C7053;
  --deep: #0D542B;
  --panel: #E8F0E9;        /* pale green section background */
  --panel-soft: #F2F7F2;   /* even lighter tint for cards on panel */
  --ink: #2C3E2D;
  --ink-soft: #566A5C;
  --line: #C8DFC9;
  --line-strong: #A9C4AB;
  --white: #FFFFFF;
  --focus: #C86A34;
  --footer-ink: #E8F0E9;
  --footer-soft: #B9CDBA;  /* 6.8:1 on --green-dark */

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --maxw: 1100px;
  --maxw-wide: 1216px;

  --radius: 8px;
  --radius-btn: 10px;
  --radius-card: 14px;
  --radius-pill: 100px;

  --shadow-card: 0 1px 2px rgba(44, 62, 45, 0.06), 0 6px 18px rgba(44, 62, 45, 0.07);
  --shadow-lift: 0 2px 4px rgba(44, 62, 45, 0.08), 0 12px 28px rgba(44, 62, 45, 0.12);
}

/* ---------- Base ---------- */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem; /* 17px floor, matching the property sites */
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--green-dark);
  margin: 0 0 0.6rem;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.35rem; }
h4 { font-family: var(--font-body); font-size: 1.05rem; margin: 0 0 0.35rem; color: var(--green-dark); }

p { margin: 0 0 1rem; max-width: 70ch; }
ul { max-width: 70ch; }
li { margin: 0.3rem 0; }

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

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--green-dark);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; color: #fff; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.wrap--wide { max-width: var(--maxw-wide); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 0.75rem;
}

.lede { font-size: 1.15rem; color: var(--ink-soft); }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-btn);
  border: 2px solid transparent;
  background: var(--green);
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { background: var(--green-hover); color: #fff; }
.btn--outline {
  background: transparent;
  border-color: var(--green);
  color: var(--green);
}
.btn--outline:hover { background: var(--panel); color: var(--green-dark); }
.btn--light {
  background: #fff;
  color: var(--green-dark);
}
.btn--light:hover { background: var(--panel); color: var(--green-dark); }
.btn--ghost-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}
.btn--ghost-light:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.btn--sm { min-height: 40px; padding: 0.4rem 1rem; font-size: 0.95rem; }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--green);
  text-decoration: none;
}
.arrow-link:hover { color: var(--green-hover); text-decoration: underline; }
.arrow-link svg { transition: transform 0.15s ease; }
.arrow-link:hover svg { transform: translateX(3px); }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-bar {
  max-width: var(--maxw-wide);
  margin: 0 auto;
  padding: 0.55rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { width: 84px; height: 71px; }

.primary-nav { margin-left: auto; margin-right: auto; }
.primary-nav ul {
  display: flex;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.primary-nav a:hover { background: var(--panel); color: var(--green-dark); }
.primary-nav a[aria-current="page"] { background: var(--panel); color: var(--green-dark); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-btn);
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  color: var(--green-dark);
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  background: #fff;
}
.mobile-menu.is-open { display: block; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0.5rem 0; }
.mobile-menu a {
  display: block;
  padding: 0.85rem 1.5rem;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}
.mobile-menu a:hover { background: var(--panel); }
.mobile-menu .mm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.75rem 1.5rem 1.1rem;
}
/* .mobile-menu a outranks .btn (0,1,1 vs 0,1,0) — restore button colors */
.mobile-menu a.btn { color: #fff; padding: 0.4rem 1rem; }
.mobile-menu a.btn--outline { color: var(--green); }

@media (max-width: 920px) {
  .primary-nav, .header-actions { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; gap: 0.5rem; }
}

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

.hero {
  position: relative;
  background: var(--panel);
  overflow: hidden;
}
.hero--image { background: var(--green-dark); }
.hero--image .hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 70%;
}
.hero--image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(250, 252, 250, 0.97) 0%, rgba(250, 252, 250, 0.94) 46%, rgba(250, 252, 250, 0.55) 68%, rgba(250, 252, 250, 0.18) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) 1.25rem;
}
.hero-inner .lede { max-width: 34rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.6rem; }

/* ---------- Sections ---------- */

.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section--panel { background: var(--panel); }
.section-head { max-width: 44rem; margin-bottom: 2rem; }

/* Stat strip */
.statrow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 1.1rem 1.3rem;
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--green-dark);
  font-variant-numeric: tabular-nums;
}
.stat span { color: var(--ink-soft); font-size: 0.95rem; }

/* Split (who we are) */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* Value cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 1.4rem 1.4rem 1.2rem;
  box-shadow: var(--shadow-card);
}
.card .icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--panel);
  color: var(--green);
  margin-bottom: 0.9rem;
}
.card h3 { font-size: 1.2rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }

/* Community / featured cards */
.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
}
.community-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.community-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); color: var(--ink); }
.community-card img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.community-card .cc-noimg {
  aspect-ratio: 3 / 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--panel) 0%, #D6E5D8 100%);
}
.community-card .cc-noimg span {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 600;
  color: var(--line-strong);
  letter-spacing: 0.05em;
}
.community-card .cc-body { padding: 1rem 1.15rem 1.15rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.community-card h3 { font-size: 1.22rem; margin: 0; }
.community-card .cc-town { color: var(--ink-soft); font-size: 0.95rem; }
.community-card .cc-desc { color: var(--ink-soft); font-size: 0.93rem; margin: 0.15rem 0 0.4rem; }
.community-card .cc-visit {
  margin-top: auto;
  font-weight: 600;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.community-card:hover .cc-visit { text-decoration: underline; }

.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--green-dark);
  background: var(--panel);
  border-radius: var(--radius-pill);
  padding: 0.14rem 0.6rem;
}
.chip--accent { background: var(--green-dark); color: #fff; }

.county-group { margin-bottom: 2.4rem; }
.county-group > h2 {
  font-size: 1.35rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--line);
  margin-bottom: 1.1rem;
}

/* Dark band (hiring) */
.band {
  background: var(--green-dark);
  color: var(--footer-ink);
  padding: clamp(3rem, 6vw, 4.5rem) 0;
}
.band .band-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 2rem;
  align-items: center;
}
@media (max-width: 820px) { .band .band-grid { grid-template-columns: 1fr; } }
.band h2 { color: #fff; }
.band p { color: var(--footer-ink); }
.band .band-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: flex-end; }
@media (max-width: 820px) { .band .band-actions { justify-content: flex-start; } }

/* Quicklink cards */
.quicklinks { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.quicklink {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 1.4rem;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.quicklink:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); color: var(--ink); }
.quicklink h3 { font-size: 1.25rem; }
.quicklink p { color: var(--ink-soft); font-size: 0.97rem; margin-bottom: 0.8rem; }

/* ---------- Careers ---------- */

.job-list { display: flex; flex-direction: column; gap: 0.9rem; }
.job-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 1.2rem 1.4rem;
  box-shadow: var(--shadow-card);
}
.job-row .job-meta { display: flex; flex-wrap: wrap; gap: 1rem; color: var(--ink-soft); font-size: 0.95rem; }
.job-row .job-meta span { display: inline-flex; align-items: center; gap: 0.4rem; }
.job-row .job-cta { margin-left: auto; }
@media (max-width: 640px) { .job-row .job-cta { margin-left: 0; } }
.job-row h3 { margin: 0 0 0.25rem; font-size: 1.3rem; }

.job-layout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 820px) { .job-layout { grid-template-columns: 1fr; } }
.job-body h2 { font-size: 1.5rem; margin-top: 2rem; }
.job-side { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 96px; }
.side-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow-card);
}
.side-card h2 { font-size: 1.25rem; margin-bottom: 0.6rem; }
.glance { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.glance td { padding: 0.4rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.glance tr:last-child td { border-bottom: 0; }
.glance td:first-child { color: var(--ink-soft); padding-right: 1rem; white-space: nowrap; }
.glance td:last-child { font-weight: 600; text-align: right; }

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

.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }
.team-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 1.4rem;
  box-shadow: var(--shadow-card);
}
.team-card .tc-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--panel);
  color: var(--green-dark);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.9rem;
}
.team-card h3 { font-size: 1.25rem; margin-bottom: 0.1rem; }
.team-card .tc-title { color: var(--green); font-weight: 600; font-size: 0.92rem; text-transform: uppercase; letter-spacing: 0.06em; }
.team-card p { color: var(--ink-soft); font-size: 0.95rem; margin: 0.7rem 0 0; }

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

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
@media (max-width: 820px) { .contact-layout { grid-template-columns: 1fr; } }

.info-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.1rem; }
.info-list li { display: flex; gap: 0.9rem; margin: 0; }
.info-list .icon-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--panel);
  color: var(--green);
}
.info-list b { display: block; color: var(--green-dark); }
.info-list span, .info-list a { color: var(--ink-soft); }

.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: clamp(1.4rem, 3vw, 2rem);
  box-shadow: var(--shadow-card);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 0.3rem; color: var(--green-dark); }
label .req { color: #A8511F; } /* 5:1 on white */
input, textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid #6E8A73; /* 3.1:1 on white — SC 1.4.11 field boundary */
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
}
input:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
textarea { min-height: 9rem; resize: vertical; }

.form-status { margin-top: 1rem; font-weight: 600; }
.form-status[data-state="error"] { color: #8C2F1B; }
.form-status[data-state="ok"] { color: var(--deep); }

.routing-note {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
}
.routing-note p { margin: 0; }

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

.site-footer {
  background: var(--green-dark);
  color: var(--footer-ink);
  padding: 3.5rem 0 2rem;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr 1fr;
  gap: 2rem;
}
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 {
  color: #fff;
  font-size: 1.05rem;
  font-family: var(--font-display);
  margin-bottom: 0.8rem;
}
.site-footer .f-brand img { width: 96px; margin-bottom: 0.9rem; }
.site-footer p, .site-footer li, .site-footer address { color: var(--footer-soft); font-size: 0.95rem; font-style: normal; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.35rem 0; }
.site-footer a { color: var(--footer-ink); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-legal {
  border-top: 1px solid rgba(232, 240, 233, 0.25);
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--footer-soft);
}
.eho {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  margin-top: 1.6rem;
}
.eho svg { flex-shrink: 0; margin-top: 0.2rem; }
.eho p { font-size: 0.85rem; color: var(--footer-soft); margin: 0; max-width: 75ch; }

/* ---------- Misc ---------- */

.center { text-align: center; }
.mt-2 { margin-top: 2rem; }

.notfound { text-align: center; padding: 5rem 1.25rem; }
.notfound h1 { font-size: clamp(2.5rem, 6vw, 4rem); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header, .site-footer, .hero-ctas, .form-card, .nav-toggle { display: none !important; }
  body { font-size: 12pt; }
}
