/* ─────────────────────────────────────────────
   TOKENS
   ───────────────────────────────────────────── */
:root {
  --bg-base:        #0A0A0F;
  --bg-surface:     #111118;
  --bg-elevated:    #18181F;
  --bg-overlay:     rgba(10, 10, 15, 0.92);
  --cta-bg:         #0A0A0F;

  --text-primary:   #F0EEE9;
  --text-secondary: #9997A0;
  --text-muted:     #5C5A64;

  --accent:         #C8B89A;
  --accent-hover:   #D9CCB4;

  --border:         #2A2930;
  --border-subtle:  #1E1D24;

  --error:          #D4614A;

  --max-content:    860px;
  --max-narrow:     720px;

  --section-pad-v:  clamp(6rem, 10vw, 9rem);
  --section-pad-h:  clamp(1.5rem, 4vw, 3rem);
}

/* ─────────────────────────────────────────────
   RESET & BASE
   ───────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol { list-style: none; }

/* ─────────────────────────────────────────────
   FOCUS VISIBLE
   ───────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ─────────────────────────────────────────────
   TYPOGRAPHY SCALE
   ───────────────────────────────────────────── */
.t-h1 {
  font-size: clamp(2.75rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.t-h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.t-h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.t-body {
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--text-primary);
}

.t-lead {
  font-size: 1.1875rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-primary);
}

.t-caption {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.t-eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.t-proof-figure {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent);
}

/* ─────────────────────────────────────────────
   SECTION HEADING UNIT
   (eyebrow + H2 + accent rule)
   ───────────────────────────────────────────── */
.section-heading {
  margin-bottom: 2.5rem;
}

.section-heading .eyebrow {
  margin-bottom: 8px;
}

.section-heading .h2 {
  /* inherits .t-h2 */
}

.section-heading .accent-rule {
  display: block;
  width: 32px;
  height: 2px;
  background: var(--accent);
  margin-top: 16px;
  border: none;
  aria-hidden: true;
}

/* ─────────────────────────────────────────────
   LAYOUT HELPERS
   ───────────────────────────────────────────── */
.content-wrap {
  width: 100%;
  max-width: var(--max-content);
  padding-left: var(--section-pad-h);
  padding-right: var(--section-pad-h);
  margin-left: auto;
  margin-right: auto;
}

.content-narrow {
  max-width: var(--max-narrow);
  margin-left: auto;
  margin-right: auto;
}

section {
  padding-top: var(--section-pad-v);
  padding-bottom: var(--section-pad-v);
}

/* ─────────────────────────────────────────────
   SCROLL REVEAL (set on JS init)
   ───────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ─────────────────────────────────────────────
   CTA BUTTON
   ───────────────────────────────────────────── */
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px;
  background: var(--accent);
  color: var(--cta-bg);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease;
  white-space: nowrap;
}

.btn-cta:hover,
.btn-cta:focus-visible {
  background: var(--accent-hover);
  outline-color: var(--accent-hover);
}

.btn-cta .arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.btn-cta:hover .arrow,
.btn-cta:focus-visible .arrow {
  transform: translateX(4px);
}

/* ─────────────────────────────────────────────
   NAVIGATION
   ───────────────────────────────────────────── */
#site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  z-index: 1000;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, height 0.3s ease;
}

#site-nav.scrolled {
  height: 52px;
  background: var(--bg-overlay);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border-bottom-color: var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1200px;
  padding-left: clamp(2rem, 5vw, 4rem);
  padding-right: clamp(2rem, 5vw, 4rem);
  margin-left: auto;
  margin-right: auto;
}

.nav-wordmark {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.01em;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  cursor: pointer;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-cta {
  flex-shrink: 0;
}

.nav-cta .btn-cta {
  height: 36px;
  padding: 0 16px;
  font-size: 0.875rem;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 11px 11px 11px 0;
  margin-left: auto;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 1px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Mobile overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(10, 10, 15, 0.97);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.nav-overlay-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.nav-overlay-links a {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  min-height: 48px;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

.nav-overlay-links a:hover {
  color: var(--accent);
}

.nav-overlay-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.nav-overlay-close:hover { color: var(--text-primary); }

.nav-overlay .btn-cta {
  width: 100%;
  max-width: 280px;
  justify-content: center;
  height: 52px;
}

/* ─────────────────────────────────────────────
   SCROLL MARKER
   ───────────────────────────────────────────── */
.scroll-marker {
  position: fixed;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 80px;
  background: var(--border);
  border-radius: 1px;
  z-index: 10;
  pointer-events: none;
}

@media (max-width: 768px) {
  .scroll-marker { display: none; }
}

/* ─────────────────────────────────────────────
   HERO SECTION
   ───────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: calc(42vh - 6rem);
  padding-bottom: 0;
  scroll-margin-top: 0;
  position: relative;
}

.hero-content {
  width: 100%;
  max-width: var(--max-content);
  padding-left: var(--section-pad-h);
  padding-right: var(--section-pad-h);
  margin-left: auto;
  margin-right: auto;
}

.hero-eyebrow {
  margin-bottom: 16px;
}

.hero-h1 {
  max-width: 860px;
}

.hero-h2 {
  max-width: 640px;
  margin-top: 1.75rem;
  color: rgba(240, 238, 233, 0.8);
  font-size: 1.1875rem;
  font-weight: 400;
  line-height: 1.7;
}

.hero-cta {
  margin-top: 2.25rem;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 40px;
  background: var(--border);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.2; }
  50%       { opacity: 0.6; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll-indicator { animation: none; opacity: 0.4; }
}

/* ─────────────────────────────────────────────
   SECTION DIVIDER
   ───────────────────────────────────────────── */
.section-rule {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--border);
  border: none;
  margin-top: 3rem;
}

/* ─────────────────────────────────────────────
   THE PROBLEM
   ───────────────────────────────────────────── */
#problem {
  scroll-margin-top: 72px;
}

.problem-paragraphs p {
  margin-bottom: 1.25rem;
}

.problem-paragraphs p:last-child {
  margin-bottom: 0;
}

/* ─────────────────────────────────────────────
   WHY EXISTING SOLUTIONS FALL SHORT
   ───────────────────────────────────────────── */
#solutions {
  scroll-margin-top: 72px;
}

.solutions-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 1.75rem;
}

.solution-item {
  padding: 1.25rem 1.5rem;
  border-left: 2px solid var(--border);
  margin-bottom: 1rem;
}

.solution-item:last-child { margin-bottom: 0; }

.solution-label {
  margin-bottom: 0.375rem;
}

.solution-body {
  color: var(--text-primary);
}

.solutions-closing {
  margin-top: 1.75rem;
}

.solutions-closing p {
  margin-bottom: 1.25rem;
}

.solutions-closing p:last-child { margin-bottom: 0; }

/* ─────────────────────────────────────────────
   THE SHIFT
   ───────────────────────────────────────────── */
#shift {
  background-color: var(--bg-surface);
  scroll-margin-top: 72px;
}

.shift-paragraphs p {
  line-height: 1.85;
  margin-bottom: 1.25rem;
}

.shift-paragraphs p:last-child { margin-bottom: 0; }

.shift-thesis {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 1.75rem;
}

/* ─────────────────────────────────────────────
   WHAT I DO
   ───────────────────────────────────────────── */
#model {
  scroll-margin-top: 72px;
}

.model-intro p {
  margin-bottom: 1.25rem;
}

.model-intro p:last-child { margin-bottom: 0; }

.model-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 2rem;
  position: relative;
}

.model-grid::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
  transform: translateX(-50%);
  pointer-events: none;
  aria-hidden: true;
}

.model-col-heading {
  margin-bottom: 1rem;
}

.model-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.model-list li {
  display: flex;
  gap: 0.625rem;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.6;
}

.model-list li::before {
  content: '—';
  color: var(--accent);
  flex-shrink: 0;
  font-weight: 400;
}

.model-closing {
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
}

/* ─────────────────────────────────────────────
   THE PROOF
   ───────────────────────────────────────────── */
#proof {
  background-color: var(--bg-surface);
  scroll-margin-top: 72px;
}

.proof-intro {
  margin-bottom: 2.5rem;
}

.proof-results-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
  position: relative;
}

.proof-result-col {
  padding: 0 2rem;
  position: relative;
}

.proof-result-col:first-child {
  padding-left: 0;
}

.proof-result-col:last-child {
  padding-right: 0;
}

.proof-result-col + .proof-result-col::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.proof-figure {
  display: block;
  margin-bottom: 0.5rem;
}

.proof-figure-label {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.proof-case-study {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
  margin-bottom: 2rem;
}

.proof-block-label {
  margin-bottom: 0.375rem;
}

.proof-block-body { }

.proof-closing {
  margin-top: 0.5rem;
}

/* ─────────────────────────────────────────────
   PRICING SIGNAL
   ───────────────────────────────────────────── */
#pricing {
  scroll-margin-top: 72px;
}

.pricing-body p {
  margin-bottom: 1.25rem;
}

.pricing-body p:last-child { margin-bottom: 0; }

.pricing-thesis {
  font-weight: 500;
}

/* ─────────────────────────────────────────────
   THE AI TEAM
   ───────────────────────────────────────────── */
#team {
  scroll-margin-top: 72px;
}

.team-body p {
  margin-bottom: 1.25rem;
}

.team-body p:last-child { margin-bottom: 0; }

/* ─────────────────────────────────────────────
   CTA / CONTACT
   ───────────────────────────────────────────── */
#contact {
  background-color: var(--bg-surface);
  scroll-margin-top: 72px;
}

.contact-body p {
  margin-bottom: 1.25rem;
}

.contact-body p:last-child { margin-bottom: 0; }

.contact-cta {
  margin-top: 2.5rem;
}

.contact-email {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-email:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.contact-footer-rule {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--border);
  border: none;
  margin-top: 4rem;
}

footer {
  padding: 1.5rem 0;
  background-color: var(--bg-surface);
}

.footer-inner {
  max-width: var(--max-content);
  padding-left: var(--section-pad-h);
  padding-right: var(--section-pad-h);
  margin-left: auto;
  margin-right: auto;
}

.footer-copy {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* ─────────────────────────────────────────────
   MOBILE — ≤767px
   ───────────────────────────────────────────── */
@media (max-width: 767px) {

  :root {
    --section-pad-h: 1.25rem;
  }

  /* Nav */
  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .nav-overlay {
    display: flex;
  }

  /* Hero */
  #hero {
    padding-top: max(30vh, 7rem);
    min-height: 100dvh;
  }

  .hero-h1 {
    font-size: clamp(2.25rem, 8vw, 2.75rem);
  }

  .hero-h2 {
    font-size: 1.0625rem;
  }

  .hero-cta .btn-cta {
    width: 100%;
    justify-content: center;
    height: 52px;
  }

  /* Eyebrow on mobile */
  .t-eyebrow {
    font-size: 0.6875rem;
  }

  /* What I Do grid — stack */
  .model-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .model-grid::after {
    display: none;
  }

  /* Proof results — keep 3-col but reduce font */
  .proof-results-row {
    gap: 0;
  }

  .proof-result-col {
    padding: 0 0.75rem;
  }

  .proof-result-col:first-child { padding-left: 0; }
  .proof-result-col:last-child  { padding-right: 0; }

  .t-proof-figure {
    font-size: clamp(1.25rem, 5vw, 2rem);
  }

  /* Contact CTA full width */
  #contact .btn-cta {
    width: 100%;
    justify-content: center;
    height: 52px;
  }
}

/* ─────────────────────────────────────────────
   TABLET — 768–1023px
   ───────────────────────────────────────────── */
/* --section-pad-h: clamp(1.5rem, 4vw, 3rem) is fluid across all breakpoints — no override needed */

/* ─────────────────────────────────────────────
   VERY SMALL — ≤360px  (proof stack)
   ───────────────────────────────────────────── */
@media (max-width: 360px) {
  .proof-results-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .proof-result-col {
    padding: 0;
  }

  .proof-result-col + .proof-result-col::before {
    display: none;
  }
}

/* ─────────────────────────────────────────────
   ORG CHART
   ───────────────────────────────────────────── */
.org-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 3rem 0 3.5rem;
}

.org-chart-jim {
  background: var(--bg-elevated);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 1rem 2rem;
  text-align: center;
  position: relative;
  min-width: 180px;
}

.org-chart-jim::after {
  content: '';
  position: absolute;
  bottom: -2.5rem;
  left: 50%;
  width: 1px;
  height: 2.5rem;
  background: var(--accent);
  transform: translateX(-50%);
}

.org-chart-jim .org-node-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.org-chart-jim .org-node-role {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 3px;
}

.org-chart-team-wrapper {
  width: 100%;
  position: relative;
  padding-top: 2.5rem;
}

.org-chart-team-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}

.org-chart-team {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}

.org-node {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.875rem 0.75rem;
  text-align: center;
  position: relative;
}

.org-node::before {
  content: '';
  position: absolute;
  top: -2.5rem;
  left: 50%;
  width: 1px;
  height: 2.5rem;
  background: var(--accent);
  opacity: 0.5;
  transform: translateX(-50%);
}

.org-node-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.3;
}

.org-node-sub {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 4px;
}

@media (max-width: 768px) {
  .org-chart-team {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .org-chart-team-wrapper::before {
    left: 25%;
    right: 25%;
  }

  .org-chart-team .org-node:nth-child(5) {
    grid-column: 1 / -1;
    max-width: 180px;
    margin: 0 auto;
  }
}

/* ─────────────────────────────────────────────
   ABOUT JIM
   ───────────────────────────────────────────── */
#about-jim {
  background: var(--bg-surface);
}

.about-jim-inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 4rem;
  align-items: center;
}

.about-jim-image img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center top;
  border-radius: 4px;
}

.about-jim-text p + p {
  margin-top: 1.25rem;
}

@media (max-width: 768px) {
  .about-jim-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-jim-image {
    max-width: 200px;
    margin: 0 auto;
  }

  .about-jim-image img {
    aspect-ratio: auto;
  }
}
