/* =========================================================================
   PROSPENSITY — Site-wide styles (nav, footer, shared page chrome)
   Depends on: colors-and-type.css, components.css
   ========================================================================= */

/* Page reset / base ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
img, svg { max-width: 100%; display: block; }

/* Skip link ------------------------------------------------------------ */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink-900); color: var(--paper);
  padding: 10px 16px; border-radius: var(--r-md);
  z-index: 100;
}
.skip-link:focus { left: 16px; top: 16px; }

/* Nav ------------------------------------------------------------------ */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease-out);
}
.site-nav.scrolled { border-bottom-color: var(--border); }
.site-nav-inner {
  max-width: var(--container-lg);
  margin: 0 auto;
  padding: 18px 32px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.site-nav-logo { display: block; }
.site-nav-logo img { height: 44px; display: block; }
.site-nav-links {
  display: flex; gap: 32px; align-items: center;
}
.site-nav-link {
  font-family: var(--font-sans);
  font-size: 14px; font-weight: 500;
  color: var(--ink-800); text-decoration: none;
  letter-spacing: -0.005em;
  transition: color var(--dur-fast) var(--ease-out);
}
.site-nav-link:hover { color: var(--tide-700); }
.site-nav-link.is-active { color: var(--tide-700); }
.site-nav-cta {
  background: var(--ink-900); color: var(--paper);
  padding: 8px 16px; border-radius: var(--r-md);
}
.site-nav-cta:hover { background: var(--ink-800); color: var(--paper); }

/* Mobile nav toggle */
.site-nav-toggle {
  display: none;
  background: transparent; border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 8px 10px;
  cursor: pointer;
  color: var(--ink-800);
}

@media (max-width: 760px) {
  .site-nav-toggle { display: inline-flex; }
  .site-nav-logo img { height: 36px; }
  .site-nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch;
    gap: 0;
    padding: 8px 0;
    display: none;
  }
  .site-nav-links.is-open { display: flex; }
  .site-nav-link {
    padding: 14px 32px;
  }
  .site-nav-cta {
    margin: 8px 32px;
    text-align: center;
    justify-content: center;
  }
}

/* Footer --------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 64px 32px 40px;
  margin-top: 96px;
}
.site-footer-inner { max-width: var(--container-lg); margin: 0 auto; }
.site-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
.site-footer .tagline {
  font-size: 14px; color: var(--fg-muted);
  max-width: 320px; line-height: 1.55; margin: 0;
}
.site-footer ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.site-footer ul a {
  color: var(--ink-800); text-decoration: none; font-size: 14px;
}
.site-footer ul a:hover { color: var(--tide-700); }
.site-footer-bottom {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 24px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--fg-subtle);
  gap: 24px; flex-wrap: wrap;
}
.site-footer-logo { height: 28px; margin-bottom: 16px; display: block; }

@media (max-width: 760px) {
  .site-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .site-footer-grid > :first-child { grid-column: span 2; }
}

/* Shared page header (used on Services / Approach / About / Contact) --- */
.page-header {
  padding: 96px 32px 64px;
  border-bottom: 1px solid var(--border);
}
.page-header-inner {
  max-width: var(--container-lg);
  margin: 0 auto;
}
.page-header .eyebrow { margin: 0 0 20px; }
.page-header h1 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(40px, 5.5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  max-width: 820px;
}
.page-header .lead {
  max-width: 640px;
  margin: 0;
}

/* Sections ------------------------------------------------------------- */
.section {
  padding: 96px 32px;
}
.section-inner {
  max-width: var(--container-lg);
  margin: 0 auto;
}
.section--narrow .section-inner { max-width: var(--container-md); }
.section--paper-2 { background: var(--paper-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section--ink {
  background: var(--ink-900);
  color: var(--paper);
  border-top: 1px solid var(--ink-800);
  border-bottom: 1px solid var(--ink-800);
}
.section--ink h2,
.section--ink h3,
.section--ink p { color: var(--paper); }
.section--ink .eyebrow { color: var(--stone-300); }
.section--ink .lead { color: var(--bone); }
.section--ink a { color: var(--tide-200); }
.section--ink a:hover { color: var(--paper); }

.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 24px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(28px, 3.5vw, 38px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}

/* Flourish helpers ----------------------------------------------------- */
.flourish-tide { color: var(--tide-700); }
.flourish-mist { color: var(--mist-600); }
.flourish-sage { color: var(--sage-600); }

.flourish-wrap { position: relative; display: inline-block; }
.flourish-wrap .underline-mark {
  position: absolute; left: -4px; right: -4px; bottom: -8px;
  width: calc(100% + 8px);
  pointer-events: none;
  opacity: 0.7;
}

/* Generic grids -------------------------------------------------------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .grid-3 { grid-template-columns: 1fr; gap: 32px; }
  .grid-2 { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 600px) {
  .grid-4 { grid-template-columns: 1fr; gap: 16px; }
}

/* Service teaser card (used on Home) ----------------------------------- */
.service-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.service-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.service-card .service-card-icon {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-md);
  background: var(--tide-50);
  color: var(--tide-700);
  margin-bottom: 20px;
}
.service-card .service-card-icon.tone-mist { background: var(--mist-50); color: var(--mist-700); }
.service-card .service-card-icon.tone-sage { background: var(--sage-50); color: var(--sage-700); }
.service-card h3 {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
.service-card p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-muted);
  margin: 0 0 18px;
}
.service-card .service-card-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--tide-700);
}

/* Service detail block (used on Services page) ------------------------- */
.service-block {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 64px;
  padding: 64px 0;
  border-top: 1px solid var(--border);
}
.service-block:first-of-type { border-top: 0; padding-top: 16px; }
.service-block-aside .eyebrow { margin: 0 0 10px; }
.service-block-aside h2 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 30px;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 16px;
}
.service-block-aside .anchor-id {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-subtle);
  letter-spacing: 0.04em;
}
.service-block-body dl {
  margin: 0;
  display: flex; flex-direction: column; gap: 22px;
}
.service-block-body dt {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 6px;
}
.service-block-body dd {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-800);
  text-wrap: pretty;
}
.service-block-body ul {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  display: flex; flex-direction: column; gap: 8px;
}
.service-block-body ul li {
  position: relative;
  padding-left: 18px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-800);
}
.service-block-body ul li::before {
  content: "";
  position: absolute; left: 0; top: 10px;
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--sage-400);
}

@media (max-width: 880px) {
  .service-block { grid-template-columns: 1fr; gap: 24px; padding: 48px 0; }
}

/* Jump nav (Services page) -------------------------------------------- */
.jump-nav {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 16px;
}
.jump-nav a {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-800);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg-elev-2);
  transition: all var(--dur-fast) var(--ease-out);
}
.jump-nav a:hover { border-color: var(--tide-300); color: var(--tide-700); background: var(--tide-50); }

/* Approach process steps ---------------------------------------------- */
.process-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 4px;
  counter-reset: process;
}
.process-list li {
  counter-increment: process;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-top: 1px solid var(--border);
}
.process-list li:first-child { border-top: 0; }
.process-list .step-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-subtle);
  letter-spacing: 0.04em;
}
.process-list .step-num::before { content: "0" counter(process) " · "; }
.process-list h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.process-list p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg-muted);
  margin: 0;
}
@media (max-width: 760px) {
  .process-list li { grid-template-columns: 1fr; gap: 8px; padding: 24px 0; }
}

/* Two-column comparison (human / AI) ---------------------------------- */
.split-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-elev-2);
}
.split-card > div { padding: 32px; }
.split-card > div + div { border-left: 1px solid var(--border); }
.split-card .eyebrow { margin: 0 0 16px; }
.split-card h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.split-card ul {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 10px;
}
.split-card ul li {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-800);
}
@media (max-width: 760px) {
  .split-card { grid-template-columns: 1fr; }
  .split-card > div + div { border-left: 0; border-top: 1px solid var(--border); }
}

/* Currents (Approach) -------------------------------------------------- */
.currents-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.current-card {
  background: var(--bg-elev-2);
  padding: 24px;
  display: flex; flex-direction: column; gap: 8px;
}
.current-card .eyebrow { margin: 0; }
.current-card h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.005em;
  margin: 0;
}
.current-card p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--fg-muted);
  margin: 0;
}
@media (max-width: 880px) {
  .currents-grid { grid-template-columns: 1fr; }
}

/* About page ----------------------------------------------------------- */
.about-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: start;
}
.about-logomark {
  background: linear-gradient(135deg, var(--tide-100), var(--mist-100));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  aspect-ratio: 3 / 4;
  display: flex; align-items: center; justify-content: center;
}
.about-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.value-block .eyebrow { margin: 0 0 8px; }
.value-block h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 18px;
  margin: 0 0 8px;
}
.value-block p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg-muted);
  margin: 0;
}
@media (max-width: 880px) {
  .about-hero { grid-template-columns: 1fr; }
  .about-logomark { aspect-ratio: 4 / 3; max-width: 360px; }
  .about-values { grid-template-columns: 1fr; }
}

/* Contact page --------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 880px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-form {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 20px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-800);
  letter-spacing: -0.005em;
}
.field .field-hint {
  font-size: 12px;
  color: var(--fg-subtle);
}
.field input,
.field select,
.field textarea {
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--paper);
  color: var(--ink-900);
  outline: none;
  width: 100%;
  box-sizing: border-box;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--tide-500);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--tide-300) 35%, transparent);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
.form-foot {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
  margin-top: 4px;
}
.form-foot .small { margin: 0; }

.contact-aside {
  display: flex; flex-direction: column; gap: 28px;
}
.contact-aside h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.005em;
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--fg-muted);
}
.contact-aside p, .contact-aside a {
  font-size: 16px;
  color: var(--ink-800);
  text-decoration: none;
  margin: 0;
  line-height: 1.55;
}
.contact-aside a:hover { color: var(--tide-700); }

/* Home thesis block ---------------------------------------------------- */
.thesis-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.thesis-block h2 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(28px, 3.5vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
.thesis-block p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--fg-muted);
  margin: 0 0 16px;
}
@media (max-width: 880px) {
  .thesis-block { grid-template-columns: 1fr; gap: 24px; }
}

/* Hero (home) ---------------------------------------------------------- */
.home-hero { padding: 96px 32px 120px; }
.home-hero-inner { max-width: var(--container-lg); margin: 0 auto; }
.home-hero h1 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(44px, 6.5vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0 0 28px;
  max-width: 920px;
  text-wrap: balance;
}
.home-hero .lead {
  font-size: 22px;
  line-height: 1.55;
  color: var(--stone-700);
  max-width: 620px;
  margin: 0 0 40px;
}
.home-hero .eyebrow { margin: 0 0 24px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 760px) {
  .home-hero { padding: 64px 24px 80px; }
  .section { padding: 64px 24px; }
  .page-header { padding: 64px 24px 48px; }
  .site-nav-inner { padding: 16px 24px; }
  .site-footer { padding: 48px 24px 32px; }
}
