/* Max George: site styles */

:root {
  --white: #ffffff;
  --charcoal: #1a1a1a;
  --muted: #555b58;
  --hairline: #e3e3e3;
  --emerald: #00674f;
  --emerald-dark: #004d3a;
  --gold: #c5a367;
  --gold-straw: #e1c58e;
  --mint: #eef4f0;
  --on-dark: #ffffff;
  --on-dark-muted: rgba(255, 255, 255, 0.82);
  --on-dark-line: rgba(255, 255, 255, 0.28);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --container: 1160px;
  --gutter: 48px;
  --section: 96px;
  --nav-height: 72px;
  --ease: 150ms ease;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav-height); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--white);
  color: var(--charcoal);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

h1, h2, h3, h4 { font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0; }

a { color: var(--emerald); text-decoration: none; transition: color var(--ease), background-color var(--ease), border-color var(--ease); }
a:hover { color: var(--emerald-dark); text-decoration: underline; text-underline-offset: 3px; }

:focus-visible { outline: 2px solid var(--emerald); outline-offset: 3px; }

.container { max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--emerald); color: var(--white); padding: 10px 16px; font-weight: 500;
}
.skip-link:focus { top: 12px; color: var(--white); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--hairline);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: var(--nav-height); }
.wordmark { color: var(--charcoal); font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.005em; }
.wordmark:hover { color: var(--charcoal); text-decoration: none; }

.nav-list { display: flex; align-items: center; gap: 32px; list-style: none; margin: 0; padding: 0; font-size: 0.9375rem; }
.nav-list a:not(.btn) { color: var(--charcoal); }
.nav-list a:not(.btn):hover { color: var(--emerald); text-decoration: none; }
.nav-list a[aria-current="page"]:not(.btn) { color: var(--emerald); }

.nav-toggle {
  display: none; background: none; border: 0; padding: 8px; margin-right: -8px; cursor: pointer;
  color: var(--charcoal); font: inherit; font-size: 0.9375rem; font-weight: 500;
}

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-block;
  background: var(--emerald); color: var(--white);
  font-weight: 500; font-size: 0.9375rem; line-height: 1.2;
  padding: 14px 22px; border: 0; border-radius: 2px; cursor: pointer;
  font-family: inherit;
}
.btn:hover { background: var(--emerald-dark); color: var(--white); text-decoration: none; }
.btn-sm { padding: 10px 16px; font-size: 0.875rem; }
.nav-list a.btn[aria-current="page"] { background: var(--emerald-dark); }

.arrow-link { font-weight: 500; white-space: nowrap; }
.arrow-link::after { content: " \2192"; }
/* Links that jump within the page point down */
.arrow-link[href^="#"]::after { content: " \2193"; }

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
/* Back-to-back sections share one gap instead of stacking two */
.section + .section { padding-top: 0; }
/* A section heading that introduces the block right below it sits closer to it */
.section.section-lead { padding-bottom: 48px; }
.rule { border: 0; border-top: 1px solid var(--hairline); margin: 0; }
.rule-gold { border: 0; border-top: 1px solid var(--gold); margin: 0; }

.label {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--emerald); margin-bottom: 16px;
}
.muted { color: var(--muted); }

.statement { max-width: 780px; }
.statement h2 { font-size: 2.375rem; margin-bottom: 20px; }
.statement p:not(.label) { font-size: 1.0625rem; color: var(--muted); max-width: 60ch; }
.statement p:not(.label) + p { margin-top: 16px; }
.statement .arrow-link { display: inline-block; margin-top: 24px; }

/* ---------- Home: hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 72px; align-items: center; padding-block: 88px 96px; }
.hero-who { font-size: 0.9375rem; margin-bottom: 28px; }
.hero-who strong { font-weight: 600; }
.hero-who span { color: var(--muted); }
.hero h1 { font-size: 3.125rem; line-height: 1.1; margin-bottom: 24px; }
.hero-lede { font-size: 1.125rem; color: var(--muted); max-width: 42ch; margin-bottom: 36px; }
.hero-actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }

.portrait { aspect-ratio: 4 / 5; overflow: hidden; background: #ececec; }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }

/* ---------- Home: credibility strip ---------- */
.cred { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; margin: 0; padding: 22px 0 0; border-top: 1px solid var(--hairline); }
.cred li { padding: 6px 32px 6px 0; font-size: 0.9375rem; line-height: 1.5; }
.cred li + li { padding-left: 32px; border-left: 1px solid var(--hairline); }
.cred strong { display: block; font-weight: 500; }
.cred span { color: var(--muted); }

/* ---------- Expertise index (names left, detail panel right) ---------- */
.xp-index { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 48px; align-items: stretch; }
.xp-tabs { display: none; list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hairline); }
.xp-index.is-ready .xp-tabs { display: block; }
.xp-tabs button {
  all: unset; box-sizing: border-box; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  width: 100%; padding: 16px 0; border-bottom: 1px solid var(--hairline);
  font-size: 1.125rem; font-weight: 500; letter-spacing: -0.01em; color: #686e6b; transition: color var(--ease);
}
.xp-tabs button::after { content: "\2192"; color: var(--emerald); opacity: 0; transition: opacity var(--ease); }
.xp-tabs button:hover, .xp-tabs button[aria-selected="true"] { color: var(--charcoal); }
.xp-tabs button[aria-selected="true"]::after { opacity: 1; }
.xp-tabs button:focus-visible { outline: 2px solid var(--emerald); outline-offset: 2px; }
.xp-panels { display: grid; gap: 24px; align-content: stretch; }
/* Desktop: all panels share one cell, so the block is as tall as the longest panel.
   Hidden panels keep their space but are invisible; the list rows stretch to match,
   so the list and the green panel always end together and nothing jumps on click. */
.xp-index.is-ready .xp-panels { grid-template-areas: "stack"; }
.xp-index.is-ready .xp-panel { grid-area: stack; }
.xp-index.is-ready .xp-panel[hidden] { display: block; visibility: hidden; }
.xp-index.is-ready .xp-tabs { display: grid; grid-auto-rows: 1fr; }
.xp-index.is-ready .xp-tabs li { display: flex; }
.xp-index.is-ready .xp-tabs button { height: 100%; }
.xp-index:not(.is-ready) { grid-template-columns: 1fr; }
.xp-panel { background: var(--mint); padding: 40px 44px; }
.xp-panel h3 { font-size: 1.875rem; margin-bottom: 12px; }
.xp-panel > p { color: var(--muted); font-size: 1.0625rem; max-width: 48ch; margin-bottom: 24px; }
.service-points { margin: 0; padding-left: 18px; font-size: 0.9375rem; }
.service-points li + li { margin-top: 8px; }
.service-points li::marker { color: var(--gold); }

/* ---------- Partner pillars ---------- */
.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; margin: 56px 0 0; padding: 0; }
.pillars li { padding: 24px 24px 0 0; border-top: 1px solid var(--hairline); }
.pillars li + li { padding-left: 24px; }
.pillars h3 { font-size: 1.5rem; margin-bottom: 8px; }
.pillars p { color: var(--muted); font-size: 0.9375rem; }

/* ---------- Centered statement (green band) ---------- */
.statement-centered { text-align: center; margin-inline: auto; }
.statement-centered p:not(.label) { margin-inline: auto; }
.short-rule { display: block; width: 64px; border-top: 1px solid var(--gold-straw); margin: 0 auto 28px; }

/* ---------- Single-page sections ---------- */
.anchor-section { scroll-margin-top: 0; }
.section-tight { padding-bottom: var(--section); }
.two-col { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 48px; }
.section-title { font-size: 2.375rem; }
.intro-text { font-size: 1.1875rem; color: var(--muted); max-width: 52ch; padding-top: 30px; }

/* About */
.bio-text { padding-top: 30px; }
.bio-text p { max-width: 62ch; }
.bio-text p + p { margin-top: 20px; }


/* Dark green bands */
.band-dark { background: var(--emerald-dark); color: var(--on-dark); }
.band-dark .label { color: var(--gold-straw); }
.band-dark a { color: var(--on-dark); }
.band-dark a:hover { color: var(--gold-straw); }
.band-dark :focus-visible { outline-color: var(--gold-straw); }
.band-dark .statement p:not(.label) { color: var(--on-dark-muted); }

/* Contact band */
.contact-band { scroll-margin-top: var(--nav-height); }
.contact-intro { text-align: center; max-width: 780px; padding-block: 88px 56px; }
.contact-intro h2 { margin-bottom: 16px; }
/* Forced line break only where the headline is set wide; phones wrap naturally */
@media (max-width: 860px) { .br-wide { display: none; } }
.contact-intro p:not(.label) { color: var(--on-dark-muted); font-size: 1.125rem; }
.band-rule { border: 0; border-top: 1px solid var(--on-dark-line); margin: 0; }

/* ---------- Expertise ---------- */



.questions { list-style: none; margin: 0; padding: 0; max-width: 780px; }
.questions li { font-size: 1.25rem; line-height: 1.45; letter-spacing: -0.01em; padding-block: 20px; }
.questions li { position: relative; }
.questions li + li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; border-top: 1px solid var(--hairline); }
.questions li:first-child { padding-top: 0; }
.questions li:last-child { padding-bottom: 0; }



/* ---------- Contact links (on the dark band) ---------- */
.contact-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-block: 56px 96px; }
.contact-link { display: grid; justify-items: center; gap: 10px; padding: 24px 32px; text-align: center; color: var(--on-dark); }
.contact-link + .contact-link { border-left: 1px solid var(--on-dark-line); }
.contact-link .label { display: block; margin-bottom: 0; }
.contact-value { font-size: 1.75rem; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; overflow-wrap: anywhere; }
.contact-action { font-size: 0.9375rem; font-weight: 500; color: var(--on-dark-muted); transition: color var(--ease); }
.contact-action::after { content: " \2192"; }
.contact-action-external::after { content: " \2197"; }
.band-dark a.contact-link:hover { color: var(--on-dark); text-decoration: none; }
.contact-link:hover .contact-value { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.contact-link:hover .contact-action { color: var(--gold-straw); }

/* ---------- Motion (only when js/motion.js adds .motion to <html>) ---------- */
:root { --ease-out: cubic-bezier(0.16, 1, 0.3, 1); --ease-gentle: cubic-bezier(0.45, 0, 0.25, 1); }

/* Hero entrance */
.motion [data-emerge] { opacity: 0; transition: opacity 2000ms var(--ease-gentle), transform 2000ms var(--ease-gentle); }
.motion [data-emerge="left"] { transform: translateX(-56px); }
.motion [data-emerge="right"] { transform: translateX(56px); transition-delay: 250ms; }
.motion [data-emerge].is-in { opacity: 1; transform: none; }
@media (max-width: 1024px) {
  .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
  .pillars li:nth-child(3) { padding-left: 0; }
}

@media (max-width: 860px) {
  .xp-index, .xp-index.is-ready { grid-template-columns: 1fr; gap: 0; }
  .xp-index.is-ready .xp-tabs { display: none; }
  .xp-panel[hidden], .xp-index.is-ready .xp-panel[hidden] { display: block; visibility: visible; }
  .xp-index.is-ready .xp-panels { grid-template-areas: none; }
  .xp-index.is-ready .xp-panel { grid-area: auto; }
  .xp-panel { padding: 28px 24px; }
  .xp-panel h3 { font-size: 1.5rem; }
  .motion [data-emerge="left"], .motion [data-emerge="right"] { transform: translateY(24px); }
  .motion [data-emerge].is-in { transform: none; }
}

/* Fade and rise */
.motion [data-reveal],
.motion [data-reveal-stagger] > * { opacity: 0; transform: translateY(24px); transition: opacity 900ms ease, transform 900ms ease; }
.motion [data-reveal].is-in,
.motion [data-reveal-stagger].is-in > * { opacity: 1; transform: none; }

/* Questions: each slides in from the left while its divider draws across */
.motion .questions > li { transform: translateX(-32px); transition: opacity 800ms ease, transform 900ms var(--ease-out); }
.motion .questions > li::before { transform: scaleX(0); transform-origin: left center; transition: transform 1000ms var(--ease-out); transition-delay: inherit; }
.motion .questions.is-in > li { transform: none; }
.motion .questions.is-in > li::before { transform: scaleX(1); }


/* ---------- Footer ---------- */
.site-footer { border-top: 0; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 12px 28px; padding-block: 32px; font-size: 0.875rem; color: var(--muted); }
.site-footer p { margin-right: auto; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--emerald); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  :root { --gutter: 32px; }
  .hero { gap: 48px; }
  .hero h1 { font-size: 2.625rem; }
}

@media (max-width: 860px) {
  :root { --section: 72px; --gutter: 24px; --nav-height: 64px; }
  .nav-toggle { display: block; }
  .site-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--hairline); }
  .site-nav[hidden] { display: none; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 24px; }
  .nav-list li a:not(.btn) { display: block; padding-block: 14px; border-bottom: 1px solid var(--hairline); }
  .nav-list li:last-child { padding-top: 20px; }
  .nav-list .btn { display: block; text-align: center; }

  .hero { grid-template-columns: 1fr; gap: 40px; padding-block: 56px 72px; }
  .hero .portrait { max-width: 360px; order: -1; }
  .hero h1 { font-size: 2.375rem; }

  .cred { grid-template-columns: 1fr; }
  .cred li, .cred li + li { padding: 20px 0; border-left: 0; }
  .cred li + li { border-top: 1px solid var(--hairline); }

  .two-col { grid-template-columns: 1fr; gap: 24px; }
  .contact-links { grid-template-columns: 1fr; padding-block: 24px 64px; }
  .contact-link { padding: 28px 0; justify-items: start; text-align: left; }
  .contact-link + .contact-link { border-left: 0; border-top: 1px solid var(--on-dark-line); }
  .contact-value { font-size: 1.375rem; }
  .bio-text, .intro-text { padding-top: 0; }
  .section-title { font-size: 1.875rem; }
  .contact-intro { text-align: left; padding-block: 64px 40px; }
  .statement h2 { font-size: 1.875rem; }
  .questions li { font-size: 1.125rem; }
}

@media (max-width: 520px) {
  .pillars { grid-template-columns: 1fr; row-gap: 24px; }
  .pillars li, .pillars li + li { padding-left: 0; padding-right: 0; }
  :root { --gutter: 16px; --section: 56px; }
  .hero h1 { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
