/* ===========================================================
   PALMETTO GROUP — DESIGN SYSTEM
   Manrope + JetBrains Mono · White / Light Gray / Green
   =========================================================== */

:root {
  /* Color tokens */
  --bg: #FFFFFF;
  --bg-alt: #F8F9FA;
  --bg-hover: #F0FDF4;
  --border: #E5E7EB;
  --border-strong: #D1D5DB;
  --text: #111827;
  --text-muted: #6B7280;
  --text-dim: #9CA3AF;
  --accent: #16A34A;
  --accent-hover: #15803D;
  --accent-soft: #F0FDF4;

  /* Type tokens */
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* ============ RESET ============ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

/* ============ LAYOUT ============ */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}
.container-narrow {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 768px) {
  .container, .container-narrow { padding: 0 20px; }
}

/* Sections */
section {
  padding: 120px 0;
  border-bottom: 1px solid var(--border);
}
section.tight { padding: 80px 0; }
section.alt { background: var(--bg-alt); }

/* Section meta */
.section-marker {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  font-weight: 500;
}
.section-marker::before { content: '/ '; color: var(--accent); }
.section-title {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin-bottom: 20px;
  max-width: 720px;
}
.section-title .accent { color: var(--accent); }
.section-intro {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 600px;
  margin-bottom: 64px;
  line-height: 1.6;
}

/* ============ NAV ============ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 6px;
  text-decoration: none;
  color: var(--text);
}
.brand-name {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.brand-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin-left: 2px;
  align-self: center;
  margin-bottom: 1px;
  display: inline-block;
}
.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.is-current { color: var(--text); }
.nav-cta {
  background: var(--accent);
  color: var(--bg) !important;
  padding: 9px 20px;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--accent-hover); }
@media (max-width: 768px) {
  .nav-links { gap: 16px; }
  .nav-links a:not(.nav-cta) { display: none; }
}

/* ============ BUTTONS ============ */
.btn-primary, .btn-secondary {
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: var(--font-sans);
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
}
.btn-secondary {
  color: var(--text);
  border-color: var(--border-strong);
  background: transparent;
}
.btn-secondary:hover {
  background: var(--bg-alt);
  border-color: var(--text);
}

/* ============ HERO (homepage) ============ */
.hero {
  padding: 140px 0 120px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.hero-content { max-width: 880px; }
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 32px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}
.hero-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.hero h1 {
  font-size: clamp(48px, 7.5vw, 88px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin-bottom: 32px;
}
.hero h1 .accent { color: var(--accent); font-weight: 700; }
.hero-sub {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 620px;
  line-height: 1.55;
  margin-bottom: 48px;
  font-weight: 400;
}
.hero-cta {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

/* ============ PAGE HEADER (interior pages) ============ */
.page-header {
  padding: 100px 0 80px;
  border-bottom: 1px solid var(--border);
}
.page-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
  font-weight: 500;
}
.page-header h1 {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin-bottom: 24px;
  max-width: 880px;
}
.page-header h1 .accent { color: var(--accent); }
.page-header .lede {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 680px;
  line-height: 1.55;
  font-weight: 400;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  margin-bottom: 32px;
  text-transform: uppercase;
  font-weight: 500;
  flex-wrap: wrap;
}
.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { color: var(--text-dim); }

/* ============ TYPOGRAPHY (prose blocks) ============ */
.prose h2 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-top: 64px;
  margin-bottom: 20px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-top: 40px;
  margin-bottom: 16px;
}
.prose p {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 20px;
  color: var(--text);
}
.prose p.muted { color: var(--text-muted); }
.prose ul, .prose ol {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 20px;
  padding-left: 24px;
}
.prose li { margin-bottom: 8px; }
.prose strong { font-weight: 700; }
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(22, 163, 74, 0.4);
  transition: text-decoration-color 0.2s;
}
.prose a:hover { text-decoration-color: var(--accent); }
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 8px 0 8px 24px;
  margin: 32px 0;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text);
  letter-spacing: -0.01em;
}
.prose code {
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text);
}

/* ============ SERVICE CARDS GRID ============ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
@media (max-width: 768px) {
  .services-grid { grid-template-columns: 1fr; }
}
.service {
  background: var(--bg);
  padding: 44px 36px;
  transition: background 0.3s;
  text-decoration: none;
  color: var(--text);
  display: block;
}
.service:hover { background: var(--bg-hover); }
.service-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 24px;
  letter-spacing: 0.05em;
  font-weight: 500;
}
.service h3 {
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin-bottom: 16px;
}
.service p {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 28px;
  line-height: 1.6;
}
.service-arrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.2s;
  font-weight: 500;
}
.service:hover .service-arrow { gap: 14px; }

/* ============ HOW WE WORK ============ */
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin-top: 48px;
}
@media (max-width: 768px) {
  .how-grid { grid-template-columns: 1fr; gap: 40px; }
}
.how-step {
  border-top: 2px solid var(--accent);
  padding-top: 24px;
}
.how-step-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
  font-weight: 500;
}
.how-step h4 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.how-step p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
}

/* Pull quote callout */
.callout {
  margin-top: 80px;
  padding: 36px 40px;
  border-left: 3px solid var(--accent);
  background: var(--bg-alt);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text);
  max-width: 760px;
  border-radius: 0 8px 8px 0;
  letter-spacing: -0.01em;
}

/* ============ PROOF / CASE CARDS ============ */
.proof-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-top: 64px;
}
@media (max-width: 900px) {
  .proof-grid { grid-template-columns: 1fr; gap: 32px; }
}
.proof-stat-wrap {
  background: var(--bg-alt);
  padding: 56px 48px;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.proof-stat {
  font-size: clamp(72px, 10vw, 120px);
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.04em;
  font-weight: 800;
}
.proof-stat-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}
.proof-text h3 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.proof-text p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.65;
  margin-bottom: 28px;
}
.proof-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

/* Case card grid (used on /case-studies index) */
.case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 768px) {
  .case-grid { grid-template-columns: 1fr; }
}
.case-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px 32px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
  display: block;
}
.case-card:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
  transform: translateY(-2px);
}
.case-card-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  font-weight: 500;
}
.case-card-stat {
  font-size: 56px;
  line-height: 1;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.case-card-stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 24px;
  font-weight: 500;
}
.case-card h3 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.case-card p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

/* ============ ABOUT TEASER (homepage) ============ */
.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 80px;
  align-items: start;
}
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
}
.about-portrait {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  color: var(--accent);
  position: relative;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.about-portrait::after {
  content: 'placeholder';
  position: absolute;
  bottom: 12px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  font-weight: 500;
}
.about-text { max-width: 640px; }
.about-text h2 {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}
.about-text p {
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.65;
  margin-bottom: 20px;
}
.about-name { color: var(--accent); font-weight: 700; }
.about-link {
  margin-top: 32px;
  color: var(--accent);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--accent);
  transition: gap 0.2s;
  font-weight: 500;
}
.about-link:hover { gap: 14px; }

/* ============ FINAL CTA ============ */
.final-cta {
  text-align: center;
  padding: 140px 0;
}
.final-cta h2 {
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}
.final-cta h2 .accent { color: var(--accent); }
.final-cta p {
  color: var(--text-muted);
  font-size: 18px;
  max-width: 560px;
  margin: 0 auto 40px;
}

/* ============ FORMS ============ */
.form-row {
  margin-bottom: 24px;
}
.form-row label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.005em;
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-size: 15px;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-row textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.5;
}
.form-row .hint {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 6px;
}
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 600px) {
  .form-grid-2 { grid-template-columns: 1fr; }
}
.form-message {
  padding: 16px 20px;
  border-radius: 8px;
  margin-top: 16px;
  font-size: 15px;
  display: none;
}
.form-message.success {
  background: var(--accent-soft);
  color: var(--accent-hover);
  border: 1px solid #BBF7D0;
}
.form-message.error {
  background: #FEF2F2;
  color: #B91C1C;
  border: 1px solid #FECACA;
}
.form-message.is-visible { display: block; }

/* ============ TWO-COL LAYOUT (e.g., insights, sidebar pages) ============ */
.col-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 80px;
}
@media (max-width: 900px) {
  .col-grid { grid-template-columns: 1fr; gap: 48px; }
}
.col-side {
  position: sticky;
  top: 100px;
  align-self: start;
}
.col-side h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  font-weight: 500;
}
.col-side ul { list-style: none; padding: 0; }
.col-side li { margin-bottom: 8px; font-size: 14px; }
.col-side a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.col-side a:hover, .col-side a.is-current { color: var(--accent); }

/* Insights / blog list */
.post-list { display: flex; flex-direction: column; gap: 32px; }
.post-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  transition: padding 0.2s;
}
.post-card:hover { padding-left: 8px; }
.post-card-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  text-transform: uppercase;
  font-weight: 500;
}
.post-card h3 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.025em;
  transition: color 0.2s;
}
.post-card:hover h3 { color: var(--accent); }
.post-card p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
  max-width: 720px;
}

/* ============ FAQ accordion ============ */
.faq { border-top: 1px solid var(--border); }
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-question {
  width: 100%;
  background: transparent;
  border: 0;
  padding: 28px 0;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  transition: color 0.2s;
}
.faq-question:hover { color: var(--accent); }
.faq-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 18px;
  transition: transform 0.2s;
}
.faq-item[open] .faq-icon { transform: rotate(45deg); }
.faq-answer {
  padding: 0 0 28px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
  max-width: 800px;
}
.faq-answer p { margin-bottom: 12px; }

/* ============ FOOTER ============ */
.site-footer {
  background: var(--text);
  color: var(--bg);
  padding: 80px 0 32px;
}
.site-footer .brand-name { color: var(--bg); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
.footer-brand p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  max-width: 280px;
  margin-top: 20px;
  line-height: 1.6;
}
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  font-weight: 500;
}
.footer-col a {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 12px;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--bg); }
.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom-meta { font-family: var(--font-mono); }

/* ============ ANIMATIONS ============ */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up-1 { animation: fade-up 0.6s ease-out 0.1s both; }
.fade-up-2 { animation: fade-up 0.7s ease-out 0.2s both; }
.fade-up-3 { animation: fade-up 0.7s ease-out 0.4s both; }
.fade-up-4 { animation: fade-up 0.7s ease-out 0.55s both; }

@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;
  }
}

/* ============ ACCESSIBILITY ============ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  background: var(--accent);
  color: var(--bg);
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  z-index: 200;
}
.skip-link:focus { top: 8px; }
