/* ===========================================================
   Chestnut Street Labs — styles
   Palette: predominantly white, forest-green accents,
   warm chestnut-brown detail.
   =========================================================== */

:root {
  --green: #2E6B4E;
  --green-dark: #1F4D38;
  --green-deep: #163A2A;
  --green-tint: #E8F1EC;
  --green-tint-2: #F3F8F5;
  --chestnut: #8B5E3C;

  --ink: #18241D;
  --body: #3C4A42;
  --muted: #6A7771;
  --line: #E4EAE6;

  --white: #ffffff;
  --bg-soft: #F7FAF8;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(22, 58, 42, .06), 0 2px 8px rgba(22, 58, 42, .05);
  --shadow-md: 0 10px 30px rgba(22, 58, 42, .10);
  --shadow-lg: 0 24px 60px rgba(22, 58, 42, .14);

  --maxw: 1140px;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--body);
  background: var(--white);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden; /* safety net against any accidental horizontal scroll on mobile */
  -webkit-tap-highlight-color: rgba(46, 107, 78, .15);
}
img, svg { display: block; max-width: 100%; }
a { color: var(--green); text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; font-weight: 600; }

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

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--green); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; font-weight: 600; font-size: .98rem;
  padding: 13px 22px; border-radius: 999px;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  cursor: pointer; border: 1px solid transparent; white-space: nowrap;
}
.btn-primary { background: var(--green); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--green-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: #fff; color: var(--green-dark); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--green); transform: translateY(-1px); }
.btn-lg { padding: 16px 30px; font-size: 1.05rem; }

.eyebrow {
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--green); margin-bottom: 14px;
}

/* ===========================================================
   Header
   =========================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 74px; gap: 12px; padding-top: 8px; padding-bottom: 8px; }

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--green); }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-serif); font-weight: 600; font-size: 1.18rem; color: var(--ink); letter-spacing: -.01em; }
.brand-tag { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

.nav { display: flex; align-items: center; }
.nav-menu { display: flex; align-items: center; gap: 6px; }
.nav-menu a {
  display: inline-block; padding: 9px 14px; border-radius: 999px;
  color: var(--body); font-weight: 500; font-size: .96rem;
  transition: background .15s ease, color .15s ease;
}
.nav-menu a:hover { color: var(--green-dark); background: var(--green-tint); }
.nav-menu .nav-cta { background: var(--green); color: #fff; margin-left: 6px; }
.nav-menu .nav-cta:hover { background: var(--green-dark); color: #fff; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0;
  padding: 10px; cursor: pointer;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }

/* ===========================================================
   Hero
   =========================================================== */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 520px at 88% -10%, var(--green-tint) 0%, rgba(232,241,236,0) 60%),
    linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%);
}
.hero-inner {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center;
  padding: 84px 24px 92px;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.3rem, 4.6vw, 3.6rem);
  font-weight: 600; letter-spacing: -.02em; line-height: 1.08; margin-bottom: 22px;
}
.hero h1 .accent { color: var(--green); }
.lede { font-size: 1.16rem; color: var(--body); max-width: 36em; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }

.hero-points { display: flex; flex-wrap: wrap; gap: 18px 26px; color: var(--ink); font-weight: 500; font-size: .96rem; }
.hero-points li { display: inline-flex; align-items: center; gap: 9px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; box-shadow: 0 0 0 4px var(--green-tint); }

.hero-visual { display: flex; justify-content: center; }
.hero-card {
  width: 100%; max-width: 360px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 26px;
}
.hero-leaf { width: 76px; height: 76px; margin: 4px auto 20px; filter: drop-shadow(0 6px 14px rgba(46,107,78,.22)); }
.hero-card-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 13px 2px; border-top: 1px solid var(--line);
}
.hero-card-row:first-of-type { border-top: 0; }
.hero-card-row span { font-weight: 700; color: var(--ink); }
.hero-card-row em { font-style: normal; color: var(--muted); font-size: .9rem; text-align: right; }

/* ===========================================================
   Trust strip
   =========================================================== */
.trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.trust-item { padding: 30px 28px; border-left: 1px solid var(--line); }
.trust-item:first-child { border-left: 0; padding-left: 0; }
.trust-item strong { display: block; color: var(--green-dark); font-size: 1.02rem; margin-bottom: 6px; }
.trust-item span { font-size: .92rem; color: var(--muted); }

/* ===========================================================
   Sections
   =========================================================== */
.section { padding: 92px 0; }
.section-tint { background: var(--green-tint-2); }
.section-head { max-width: 720px; margin: 0 auto 52px; text-align: center; }
.section-head h2 {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem); letter-spacing: -.02em; margin-bottom: 14px;
}
.section-sub { color: var(--muted); font-size: 1.08rem; }

/* ---------- Service cards ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 780px; margin: 0 auto; }
.card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .25s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #D4E2DA; }
.card-icon {
  width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center;
  background: var(--green-tint); margin-bottom: 18px;
}
.card-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--green-dark); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.28rem; margin-bottom: 10px; }
.card p { color: var(--body); margin-bottom: 16px; }
.card-list { display: flex; flex-direction: column; gap: 8px; }
.card-list li { position: relative; padding-left: 22px; color: var(--muted); font-size: .94rem; }
.card-list li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 8px; height: 8px; border-radius: 2px; background: var(--green);
  transform: rotate(45deg);
}
.solution-meta {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: .8rem; font-weight: 700; letter-spacing: .06em;
  color: var(--green); text-transform: uppercase;
}
.card-proof {
  margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: .88rem; color: var(--body); line-height: 1.45;
}
.card-proof span {
  display: inline-block; margin-right: 8px; vertical-align: middle;
  font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--green-dark); background: var(--green-tint);
  padding: 3px 9px; border-radius: 999px;
}
/* In the side-by-side layout, reserve equal space for the proof block so the
   divider line above it sits the same distance from the bottom of every card. */
@media (min-width: 961px) {
  .card-proof { min-height: 80px; }
}

/* ---------- Split layout ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.split-copy h2 {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(1.8rem, 3.2vw, 2.4rem); letter-spacing: -.02em; margin-bottom: 18px;
}
.split-copy p { margin-bottom: 16px; color: var(--body); }
.link-arrow { display: inline-block; margin-top: 6px; font-weight: 600; color: var(--green); }
.link-arrow:hover { color: var(--green-dark); }

.value-list { display: flex; flex-direction: column; gap: 4px; }
.value-list li {
  background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--green);
  border-radius: var(--radius-sm); padding: 20px 22px; box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}
.value-list h4 { font-size: 1.08rem; margin-bottom: 4px; color: var(--green-dark); }
.value-list p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.step {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 24px;
}
.step-num {
  font-family: var(--font-serif); font-size: 1.6rem; font-weight: 600;
  color: var(--green); display: block; margin-bottom: 12px;
}
.step h3 { font-size: 1.18rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: .95rem; }

/* ---------- Tags ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; max-width: 860px; margin: 0 auto; }
.tags span {
  background: #fff; border: 1px solid var(--line); color: var(--ink);
  padding: 10px 18px; border-radius: 999px; font-weight: 500; font-size: .95rem;
  box-shadow: var(--shadow-sm);
}

/* ---------- About quote ---------- */
.about-quote {
  background: var(--green-deep); color: #fff; border-radius: var(--radius);
  padding: 40px 36px; box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.quote-leaf { width: 64px; height: 64px; opacity: .9; margin-bottom: 20px; }
.about-quote p { font-family: var(--font-serif); font-size: 1.35rem; line-height: 1.4; color: #fff; margin-bottom: 16px; }
.about-quote span { color: #BFD8CB; font-size: .92rem; font-weight: 500; }

/* ===========================================================
   CTA
   =========================================================== */
.cta {
  background:
    radial-gradient(700px 360px at 50% -30%, rgba(255,255,255,.14), rgba(255,255,255,0) 70%),
    linear-gradient(135deg, var(--green-dark), var(--green-deep));
  color: #fff; padding: 88px 0; text-align: center;
}
.cta-inner { max-width: 660px; }
.cta h2 { color: #fff; font-family: var(--font-serif); font-weight: 600; font-size: clamp(2rem, 3.6vw, 2.7rem); letter-spacing: -.02em; margin-bottom: 16px; }
.cta p { color: #D6E6DD; font-size: 1.12rem; margin-bottom: 28px; }
.cta .btn-primary { background: #fff; color: var(--green-dark); }
.cta .btn-primary:hover { background: var(--green-tint); }
.cta-note { font-size: .92rem; color: #AFC9BB; margin-top: 18px; }

/* ===========================================================
   Footer
   =========================================================== */
.site-footer { background: #fff; border-top: 1px solid var(--line); padding: 44px 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--green); font-family: var(--font-serif); font-weight: 600; font-size: 1.05rem; }
.footer-brand .brand-mark { width: 28px; height: 28px; }
.footer-brand span { color: var(--ink); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-nav a { color: var(--muted); font-size: .94rem; font-weight: 500; }
.footer-nav a:hover { color: var(--green-dark); }
.footer-copy { color: var(--muted); font-size: .88rem; width: 100%; padding-top: 18px; border-top: 1px solid var(--line); }

/* ===========================================================
   Reveal animation
   =========================================================== */
/* Elements only start hidden when JS is available to reveal them */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ===========================================================
   Responsive
   =========================================================== */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; padding: 60px 24px 70px; }
  .hero-visual { order: -1; }
  .hero-card { max-width: 420px; }
  .cards { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-item:nth-child(2) { border-left: 1px solid var(--line); }
  .trust-item:nth-child(3) { border-left: 0; padding-left: 0; }
  .trust-item { border-top: 1px solid var(--line); }
  .trust-item:nth-child(1), .trust-item:nth-child(2) { border-top: 0; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 14px 24px 22px; box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 12px 14px; }
  .nav-menu .nav-cta { margin-left: 0; text-align: center; margin-top: 6px; }
  .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); }

  .cards { grid-template-columns: 1fr; }
  .section { padding: 66px 0; }
  .brand-tag { display: none; }
}

@media (max-width: 400px) {
  .brand-mark { width: 34px; height: 34px; }
  .brand-name { font-size: 1.05rem; }
  .hero h1 { font-size: clamp(2rem, 8.5vw, 2.3rem); }
}

@media (max-width: 460px) {
  .trust-grid { grid-template-columns: 1fr; }
  .trust-item { border-left: 0 !important; padding-left: 0 !important; border-top: 1px solid var(--line); }
  .trust-item:first-child { border-top: 0; }
  .steps { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; }
}
