/* TreasuryFlows — shared styles */

:root {
  --ink: #14273f;
  --ink-2: #1e3654;
  --ink-soft: #3d5975;
  --cream: #faf7f1;
  --cream-2: #f1ead9;
  --paper: #ffffff;
  --copper: #b6754a;
  --copper-dark: #93582f;
  --sage: #64826b;
  --text: #26303c;
  --text-muted: #5c6773;
  --border: #e7ded0;
  --border-soft: #eee7da;
  --max-width: 1080px;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(20, 39, 63, 0.06);
  --shadow-md: 0 12px 32px -16px rgba(20, 39, 63, 0.28);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ink);
  text-decoration: none;
}

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

.font-display {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
}

/* Reveal-on-scroll */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger.is-visible > * {
  transition-delay: calc(var(--stagger-i, 0) * 80ms);
}

/* Header / nav */

header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 241, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

header.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.15rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 0.85rem;
  flex-shrink: 0;
}

nav.site-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

nav.site-nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding-bottom: 3px;
}

nav.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--copper);
  transition: right 0.25s var(--ease);
}

nav.site-nav a:hover::after,
nav.site-nav a.active::after {
  right: 0;
}

nav.site-nav a.active {
  color: var(--ink);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--paper);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  position: relative;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

.nav-toggle span::before {
  position: absolute;
  top: -6px;
}

.nav-toggle span::after {
  position: absolute;
  top: 6px;
}

header.site-header.nav-open .nav-toggle span {
  background: transparent;
}

header.site-header.nav-open .nav-toggle span::before {
  top: 0;
  transform: rotate(45deg);
}

header.site-header.nav-open .nav-toggle span::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Main layout */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4.5rem 0;
}

.section-tight {
  padding: 2.5rem 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 2.5rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--copper-dark);
  margin: 0 0 0.9rem;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--copper);
  display: inline-block;
}

h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  line-height: 1.12;
  margin: 0 0 1.1rem;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
}

h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  margin: 0 0 0.6rem;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
}

h3 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
  color: var(--ink);
  font-weight: 600;
}

p {
  margin: 0 0 1rem;
  color: var(--text);
}

.lede {
  font-size: 1.13rem;
  color: var(--text-muted);
  max-width: 620px;
}

.section-head p {
  color: var(--text-muted);
}

/* Hero */

.hero {
  position: relative;
  padding: 5rem 0 4rem;
  overflow: hidden;
}

.hero-flows {
  position: absolute;
  top: -10%;
  right: -8%;
  width: 620px;
  max-width: 65vw;
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.hero-flows path {
  stroke-dasharray: 6 10;
  animation: flow 26s linear infinite;
}

.hero-flows path:nth-child(2) {
  animation-duration: 32s;
  animation-direction: reverse;
}

.hero-flows path:nth-child(3) {
  animation-duration: 20s;
}

@keyframes flow {
  to {
    stroke-dashoffset: -400;
  }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.hero .lede {
  margin-bottom: 2rem;
}

.cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Stats */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat-num {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2rem, 3.6vw, 2.6rem);
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}

.stat-num .suffix {
  font-size: 0.55em;
  color: var(--copper-dark);
}

.stat p {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Card grid / service highlights */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.35rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-soft);
}

.card-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--cream-2);
  color: var(--copper-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.9rem;
}

.card-icon svg {
  width: 19px;
  height: 19px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.94rem;
  margin-bottom: 0;
}

.card ul {
  margin: 0;
  padding-left: 1.05rem;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.card li {
  margin-bottom: 0.35rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.9rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}

.card-link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.25s var(--ease);
}

.card-link:hover svg {
  transform: translateX(3px);
}

/* Client strip */

.client-strip {
  padding: 2.75rem 0;
}

.client-strip .eyebrow {
  margin-bottom: 1.25rem;
}

.client-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.client-list li {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.15rem;
  color: var(--ink-soft);
  padding: 0.4rem 0;
}

.client-list li:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border);
  margin-left: 1rem;
  vertical-align: middle;
}

/* Buttons / CTA */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--ink);
  color: var(--cream);
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--ink);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.btn:hover {
  background: var(--ink-2);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--paper);
  border-color: var(--ink);
}

/* CTA banner */

.cta-banner {
  background: var(--ink);
  color: var(--cream);
  border-radius: 16px;
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}

.cta-banner h2 {
  color: var(--cream);
  margin-bottom: 0.4rem;
}

.cta-banner p {
  color: #cdd8e3;
  margin-bottom: 0;
  max-width: 440px;
}

.cta-banner .btn {
  background: var(--copper);
  border-color: var(--copper);
  color: #fff;
}

.cta-banner .btn:hover {
  background: var(--copper-dark);
  border-color: var(--copper-dark);
}

/* Timeline (About) */

.timeline {
  position: relative;
  border-left: 2px solid var(--border);
  padding-left: 2rem;
  margin-left: 0.4rem;
}

.timeline-item {
  position: relative;
  padding-bottom: 2.4rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.44rem;
  top: 0.3rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--cream);
  border: 2px solid var(--copper);
}

.timeline-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}

.timeline-item h3 {
  margin-bottom: 0.15rem;
}

.timeline-org {
  color: var(--copper-dark);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.timeline-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.timeline-item ul {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.timeline-item li {
  margin-bottom: 0.3rem;
}

.timeline-divider {
  margin: 0.5rem 0 2rem;
  padding-left: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.6rem;
}

/* Pills */

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pill-list li {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.88rem;
  color: var(--text);
}

/* Skill callout */

.skill-callout {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: flex-start;
}

.skill-callout-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--cream-2);
  color: var(--copper-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.skill-callout-icon svg {
  width: 22px;
  height: 22px;
}

.skill-callout p:last-child {
  margin-bottom: 0;
}

.skill-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.7rem 0 0.5rem;
}

.skill-tags span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--sage);
  background: #eef2ec;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
}

/* Credentials grid (About) */

.credentials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.credentials-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.credentials-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.96rem;
}

.credentials-list li:last-child {
  border-bottom: none;
}

.credentials-list .cred-label {
  color: var(--text-muted);
  font-size: 0.84rem;
  display: block;
}

/* Contact page */

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: start;
}

.contact-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.contact-details {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-details li {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.contact-details li:last-child {
  border-bottom: none;
}

.contact-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--cream-2);
  color: var(--copper-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 17px;
  height: 17px;
}

.contact-details .label {
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 0.1rem;
}

.contact-details a {
  font-weight: 600;
}

.availability {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--sage);
  background: #eef2ec;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  margin-bottom: 1.5rem;
}

.availability::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage);
}

.availability.is-busy {
  color: var(--copper-dark);
  background: var(--cream-2);
}

.availability.is-busy::before {
  background: var(--copper);
}

/* Footer */

footer.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-inner p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--ink);
}

/* Responsive */

@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }

  nav.site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s var(--ease);
  }

  header.site-header.nav-open nav.site-nav {
    max-height: 320px;
  }

  nav.site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.5rem 1.25rem;
  }

  nav.site-nav a {
    display: block;
    padding: 0.7rem 0;
  }

  nav.site-nav a::after {
    display: none;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .cta-banner {
    padding: 2.25rem 1.75rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-flows {
    opacity: 0.35;
  }
}

@media (max-width: 560px) {
  main {
    padding: 0 1.25rem;
  }

  .section {
    padding: 3rem 0;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
  }

  .skill-callout {
    grid-template-columns: 1fr;
  }
}
