:root {
  --ink: #1a1c1a;
  --ink-soft: #4a4f4a;
  --paper: #f4f2ec;
  --paper-warm: #ebe7dc;
  --shell: #fbfaf6;
  --accent: #b7472a;        /* warm terracotta — the "cracked" warm yolk note */
  --accent-deep: #8f3520;
  --line: #d8d3c6;
  --max: 1080px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Spline Sans", -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* subtle paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, header, footer { position: relative; z-index: 1; }

/* HEADER */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem clamp(1.5rem, 5vw, 4rem);
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
  z-index: 100; /* lift header (and its dropdown menu) above main's z-index:1 context */
}
.wordmark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.logo-img {
  height: 48px;
  width: auto;
  display: block;
}
.nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.2rem); }
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav a:hover { color: var(--accent); }
.nav-cta {
  border: 1px solid var(--ink);
  border-radius: 100px;
  padding: 0.45rem 1.1rem;
  color: var(--ink) !important;
}
.nav-cta:hover { background: var(--ink); color: var(--shell) !important; }

/* Burger toggle — hidden on desktop */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 0.4rem 0.85rem 0.4rem 0.7rem;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.nav-toggle:hover { border-color: var(--ink); }
.nav-toggle-bars {
  position: relative;
  width: 18px;
  height: 14px;
  display: inline-block;
}
.nav-toggle-bars span {
  position: absolute;
  left: 0; right: 0;
  height: 1.5px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.25s ease, top 0.25s ease, opacity 0.2s ease;
}
.nav-toggle-bars span:nth-child(1) { top: 3px; }
.nav-toggle-bars span:nth-child(2) { top: 9px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) {
  top: 6px;
  transform: rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) {
  top: 6px;
  transform: rotate(-45deg);
}

/* Mobile-only nav behavior */
@media (max-width: 760px) {
  .site-header { padding: 1.1rem clamp(1.25rem, 5vw, 2rem); }
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute;
    top: 100%;
    right: clamp(1.25rem, 5vw, 2rem);
    left: clamp(1.25rem, 5vw, 2rem);
    background-color: #ffffff;
    /* Solid white so the drawer reads as a distinct surface against the warm-paper page,
       regardless of Mood (Editorial / Letterpress / Quiet shift the page bg slightly).   */
    border: 1px solid var(--ink);
    border-radius: 14px;
    box-shadow: 0 28px 64px -22px rgba(26,28,26,0.6), 0 2px 6px rgba(26,28,26,0.08);
    padding: 0.6rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    z-index: 50;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav a {
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-size: 1rem;
    text-align: left;
    color: var(--ink);
    font-weight: 500;
  }
  .nav a:hover, .nav a:focus { background: var(--paper-warm); color: var(--accent); }
  .nav .nav-cta {
    margin-top: 0.4rem;
    border-radius: 100px;
    text-align: center;
    padding: 0.7rem 1rem;
  }
}

/* HERO */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3rem, 9vw, 7rem) clamp(1.5rem, 5vw, 4rem) clamp(3rem, 7vw, 5rem);
}
.hero-inner { max-width: none; }

/* Side-by-side hero (text + portrait) */
.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero-portrait {
  position: relative;
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--shell);
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px -24px rgba(26, 28, 26, 0.5);
  aspect-ratio: 4 / 5;
  opacity: 0;
  animation: rise 0.7s ease 0.2s forwards;
}
.hero-portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 32%;
  display: block;
  filter: saturate(0.96) contrast(1.02);
}
.hero-portrait figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1rem 1.2rem;
  background: linear-gradient(to top, rgba(26,28,26,0.78) 0%, rgba(26,28,26,0) 100%);
  color: var(--paper);
  display: flex; flex-direction: column;
  font-family: var(--sans);
}
.cap-name { font-family: var(--serif); font-weight: 500; font-size: 1.1rem; }
.cap-role { font-size: 0.8rem; color: #c9c5ba; margin-top: 2px; }
@media (max-width: 820px) {
  .hero-split { grid-template-columns: 1fr; }
  .hero-portrait { max-width: 360px; margin: 0 auto; }
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1.4rem;
  opacity: 0;
  animation: rise 0.7s ease forwards;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.6rem;
  opacity: 0;
  animation: rise 0.7s ease 0.08s forwards;
}
.lede {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--ink-soft);
  max-width: none;
  margin-bottom: 2.2rem;
  opacity: 0;
  animation: rise 0.7s ease 0.16s forwards;
}
.lede strong { color: var(--ink); font-weight: 600; }
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: rise 0.7s ease 0.24s forwards;
}
.hero-meta {
  margin-top: 2.4rem;
  font-size: 0.85rem;
  color: var(--accent-deep);
  font-style: italic;
  opacity: 0;
  animation: rise 0.7s ease 0.32s forwards;
}

/* BUTTONS */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  padding: 0.85rem 1.7rem;
  border-radius: 100px;
  transition: transform 0.2s, background 0.2s, color 0.2s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-2px); }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

/* SECTION SHARED */
section { max-width: var(--max); margin: 0 auto; padding: clamp(3rem, 7vw, 5.5rem) clamp(1.5rem, 5vw, 4rem); }
.section-head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 2.6rem; }
.section-num {
  font-family: var(--serif);
  color: var(--accent);
  font-size: 1rem;
  font-weight: 600;
}
.section-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  letter-spacing: -0.015em;
}

/* APPROACH */
.approach { border-top: 1px solid var(--line); }
.approach-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.4rem;
}
.approach-item h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 0.7rem;
}
.approach-item p { color: var(--ink-soft); font-size: 0.98rem; }

/* SERVICES */
.services { border-top: 1px solid var(--line); }
.services-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}
.service {
  background: var(--shell);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.8rem;
  position: relative;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.service:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px -24px rgba(26,28,26,0.5);
  border-color: var(--accent);
}
.service h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  margin-bottom: 0.7rem;
}
.service p { color: var(--ink-soft); font-size: 0.96rem; }

/* Featured-service tag */
.service--featured { border-color: var(--accent); }
.service-tag {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #fff;
  background: var(--accent);
  padding: 0.3rem 0.7rem;
  border-radius: 100px;
  margin-bottom: 0.9rem;
}

/* AI */
.ai { border-top: 1px solid var(--line); }
.ai-lede {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.2rem, 2.6vw, 1.6rem);
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 1.4rem;
}
.ai-lede em { font-style: italic; color: var(--accent); }
.ai-body > p { color: var(--ink-soft); font-size: 1.05rem; margin-bottom: 2.4rem; }
.ai-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}
.ai-item {
  border-left: 2px solid var(--accent);
  padding: 0.2rem 0 0.2rem 1.2rem;
}
.ai-item h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.12rem;
  margin-bottom: 0.5rem;
}
.ai-item p { color: var(--ink-soft); font-size: 0.95rem; }

/* PROOF */
.proof { border-top: 1px solid var(--line); }
.proof-note { color: var(--accent-deep); font-style: italic; font-size: 0.85rem; margin-bottom: 1.8rem; }
.proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}
.proof-stat {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.proof-attribution {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  margin-bottom: 0.7rem;
}
.proof-item p:last-child { color: var(--ink-soft); font-size: 0.95rem; }
.proof-item--featured {
  grid-column: 1 / -1;
  background: var(--shell);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.8rem 2rem;
  position: relative;
}
.proof-item--featured::before {
  content: "";
  position: absolute;
  left: 0; top: 1.8rem; bottom: 1.8rem;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}
.proof-item--featured .proof-stat { font-size: 1.35rem; margin-bottom: 0.35rem; }
.proof-item--featured .proof-attribution { color: var(--accent-deep); }

/* ABOUT */
.about { border-top: 1px solid var(--line); }
.about-body { max-width: none; }
.about-body p { color: var(--ink-soft); font-size: 1.05rem; margin-bottom: 1.2rem; }

/* CONTACT */
.contact { border-top: 1px solid var(--line); }
.contact-inner { background: var(--ink); color: var(--paper); border-radius: 20px; padding: clamp(2.2rem, 5vw, 3.5rem); text-align: center; }
.contact-inner h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.6rem, 4vw, 2.3rem); margin-bottom: 1rem; }
.contact-inner p { color: #c9c5ba; max-width: 480px; margin: 0 auto 1.8rem; }
/* Two-button row inside the dark slab */
.contact-actions {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-ghost-inverse {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  padding: 0.85rem 1.7rem;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--paper);
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.btn-ghost-inverse:hover {
  border-color: var(--paper);
  background: rgba(255,255,255,0.06);
  transform: translateY(-2px);
}
.contact-note { font-size: 0.82rem; font-style: italic; color: #9a978d !important; margin-top: 1.6rem !important; }

/* Engagement process steps inside the dark slab */
.engagement-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  max-width: 640px;
  margin: 0 auto 2.4rem;
  padding: 1.8rem 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.engagement-steps li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0 1rem;
  border-right: 1px solid rgba(255,255,255,0.12);
}
.engagement-steps li:last-child { border-right: 0; }
.engagement-steps .step-num {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent);
  margin-bottom: 0.2rem;
}
.engagement-steps .step-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--paper);
  line-height: 1.25;
}
.engagement-steps .step-meta {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: #9a978d;
  font-style: italic;
}

/* FOOTER */
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.4rem clamp(1.5rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.footer-tag { font-family: var(--serif); }

/* RESPONSIVE: collapse multi-column grids on narrow screens */
@media (max-width: 760px) {
  .approach-grid,
  .services-list,
  .ai-grid,
  .proof-grid {
    grid-template-columns: 1fr;
  }
  .engagement-steps {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  .engagement-steps li { border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.12); padding-bottom: 1.2rem; }
  .engagement-steps li:last-child { border-bottom: 0; padding-bottom: 0; }

  /* Hero portrait: fill the column on phones rather than stay capped at 360px. */
  .hero-portrait { max-width: none; }

  /* The $1M featured proof card spans full width on desktop via grid-column:1/-1;
     on a single-column mobile grid that's redundant. Reset so its `::before`
     left rule aligns with the regular cards. */
  .proof-item--featured { padding: 1.5rem 1.2rem 1.5rem 1.5rem; }

  /* Two CTAs in the contact slab stack full-width on phones for thumb-friendliness. */
  .contact-actions { flex-direction: column; align-items: stretch; }
  .contact-actions .btn,
  .contact-actions .btn-ghost-inverse { width: 100%; text-align: center; }

  /* Slightly tighter contact slab padding on phones. */
  .contact-inner { padding: 2rem 1.2rem; border-radius: 14px; }

  /* Service-tag pill: prevent the long "MOST ENGAGEMENTS START HERE" from
     crowding the card edge on narrow phones. */
  .service-tag { font-size: 0.65rem; letter-spacing: 0.1em; padding: 0.28rem 0.6rem; }

  /* Tighter section spacing on phones — keep the rhythm without burning real estate. */
  section { padding-top: clamp(2.5rem, 8vw, 4rem); padding-bottom: clamp(2.5rem, 8vw, 4rem); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
