/* The Compass Connection — site styles
   Brand anchor: logo navy. Setting: Sonoran desert neutrals. */

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-wght-italic.woff2") format("woff2");
  font-weight: 300 800; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-latin-wght-italic.woff2") format("woff2");
  font-weight: 300 800; font-style: italic; font-display: swap;
}

:root {
  /* brand */
  --navy: #23408A;
  --navy-dark: #1A3170;
  --compass-gray: #838172;
  /* desert palette (Nancy's proposal) */
  --sand: #F4EFE5;
  --sand-2: #EBE3D3;
  --stone: #C5B396;
  --sage: #79866C;
  --sage-text: #5E6A52;
  --creosote: #46543E;
  --creosote-dark: #2E3829;
  --terracotta: #AD7457;
  --terracotta-text: #8A553B;
  --charcoal: #333832;
  --white: #FFFFFF;

  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;

  --max: 1180px;
  --narrow: 760px;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(46,56,41,.06), 0 8px 24px rgba(46,56,41,.08);
  --space: clamp(4rem, 8vw, 7rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--sand);
  color: var(--charcoal);
  font-family: var(--font-sans);
  font-size: 1.125rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--navy); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--navy-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  color: var(--creosote-dark);
  margin: 0 0 .6em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.55rem); }
p { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.2em; margin: 0 0 1.1em; }
li { margin-bottom: .35em; }

.skip-link {
  position: absolute; left: -9999px; top: .5rem;
  background: var(--navy); color: var(--white); padding: .6rem 1rem; z-index: 100;
}
.skip-link:focus { left: .5rem; }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.narrow { width: min(100% - 2.5rem, var(--narrow)); margin-inline: auto; }
.section { padding-block: var(--space); }
.section--alt { background: var(--sand-2); }
.section--dark { background: var(--creosote-dark); color: var(--sand); }
.section--dark h2, .section--dark h3 { color: var(--sand); }
.section--dark a { color: var(--white); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: .8rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--terracotta-text);
  margin-bottom: .9rem;
}
.section--dark .eyebrow { color: var(--stone); }
.lead { font-size: clamp(1.2rem, 2vw, 1.4rem); line-height: 1.55; color: var(--creosote); }
.muted { color: var(--sage-text); }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-sans); font-weight: 600; font-size: 1rem;
  padding: .85rem 1.5rem; border-radius: 999px;
  text-decoration: none; border: 2px solid transparent;
  transition: background-color .2s, color .2s, border-color .2s;
  cursor: pointer;
}
.btn--primary { background: var(--navy); color: var(--white); }
.btn--primary:hover { background: var(--navy-dark); color: var(--white); text-decoration: none; }
.btn--outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn--outline:hover { background: var(--navy); color: var(--white); text-decoration: none; }
.btn--light { background: var(--sand); color: var(--creosote-dark); }
.btn--light:hover { background: var(--white); color: var(--creosote-dark); text-decoration: none; }
.btn--ghost-light { border-color: rgba(255,255,255,.85); color: var(--white); }
.btn--ghost-light:hover { background: rgba(255,255,255,.15); color: var(--white); text-decoration: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .9rem; }
.text-link { font-weight: 600; text-decoration: none; }
.text-link::after { content: " \2192"; }
.text-link:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244,239,229,.96);
  backdrop-filter: saturate(1.2) blur(6px);
  border-bottom: 1px solid rgba(70,84,62,.12);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 76px; }
.brand { display: flex; flex-direction: column; text-decoration: none; }
.brand img { width: 148px; height: auto; }
.brand-tagline { font-size: .72rem; letter-spacing: .08em; color: var(--sage-text); margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav ul { list-style: none; display: flex; gap: 1.4rem; margin: 0; padding: 0; }
.nav li { margin: 0; }
.nav a { color: var(--charcoal); text-decoration: none; font-weight: 500; font-size: 1rem; padding: .3rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--navy); border-bottom-color: var(--stone); }
.nav a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--navy); }
.nav .btn { padding: .6rem 1.15rem; font-size: .95rem; border-bottom: 0; }
.nav .btn:hover, .nav .btn[aria-current="page"] { color: var(--white); }
.nav-toggle { display: none; }

@media (max-width: 1040px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: .5rem;
    background: none; border: 1px solid rgba(70,84,62,.35); border-radius: 999px;
    padding: .5rem .95rem; font: 600 .95rem var(--font-sans); color: var(--creosote-dark); cursor: pointer;
  }
  .nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
    display: block; width: 18px; height: 2px; background: currentColor; position: relative; content: "";
  }
  .nav-toggle .bars::before { position: absolute; top: -6px; }
  .nav-toggle .bars::after { position: absolute; top: 6px; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--sand); border-bottom: 1px solid rgba(70,84,62,.15);
    padding: .5rem 1.25rem 1.5rem; display: none;
    box-shadow: 0 12px 24px rgba(46,56,41,.12);
  }
  .nav.is-open { display: flex; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav ul a { display: block; padding: .85rem 0; border-bottom: 1px solid rgba(70,84,62,.12); }
  .nav ul a[aria-current="page"] { border-bottom-color: rgba(70,84,62,.12); }
  .nav .btn { justify-content: center; margin-top: 1.1rem; padding: .85rem 1.2rem; }
  .brand img { width: 128px; }
}
.no-js .nav { display: flex; position: static; box-shadow: none; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(86vh, 760px); display: grid; align-items: end; color: var(--white); overflow: hidden; }
.hero picture, .hero > img { position: absolute; inset: 0; }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,26,18,.05) 0%, rgba(20,26,18,.25) 40%, rgba(20,26,18,.78) 100%);
}
.hero-content { position: relative; z-index: 1; padding-block: 6rem 4.5rem; max-width: 760px; }
.hero h1 { color: var(--white); margin-bottom: .35em; text-shadow: 0 2px 18px rgba(0,0,0,.25); }
.hero p { font-size: clamp(1.15rem, 2vw, 1.35rem); max-width: 40ch; margin-bottom: 1.8rem; color: rgba(255,255,255,.95); }
.hero .eyebrow { color: var(--sand); }

.page-hero { position: relative; color: var(--white); min-height: 380px; display: grid; align-items: end; overflow: hidden; }
.page-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,26,18,.1), rgba(20,26,18,.72)); }
.page-hero .container { position: relative; z-index: 1; padding-block: 5rem 3rem; }
.page-hero h1 { color: var(--white); margin-bottom: .2em; }
.page-hero p { font-size: 1.25rem; max-width: 46ch; margin: 0; color: rgba(255,255,255,.95); }
.page-hero .eyebrow { color: var(--sand); }

.page-header { padding-block: clamp(3.5rem, 7vw, 5.5rem) 2rem; }
.page-header p { max-width: 60ch; }

/* ---------- Layout helpers ---------- */
.split { display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--wide-text { grid-template-columns: 1.15fr .85fr; }
  .split--reverse > :first-child { order: 2; }
}
.photo { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--sand-2); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo--tall { aspect-ratio: 4 / 5; }
.photo--wide { aspect-ratio: 3 / 2; }
.photo--square { aspect-ratio: 1; }
figure { margin: 0; }
figcaption { font-size: .9rem; color: var(--sage-text); margin-top: .6rem; }

.grid { display: grid; gap: 1.75rem; }
@media (min-width: 720px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Cards ---------- */
.card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card .photo { border-radius: 0; box-shadow: none; aspect-ratio: 4 / 3; }
.card-body { padding: 1.5rem 1.6rem 1.8rem; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin-bottom: .35em; }
.card-body p:last-of-type { flex: 1; }
.card-body .text-link { margin-top: .4rem; }
.card--plain { background: transparent; box-shadow: none; }
.card a.card-cover { color: inherit; text-decoration: none; display: block; }

.path-card { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 420px; display: grid; align-items: end; color: var(--white); text-decoration: none; box-shadow: var(--shadow); }
.path-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.path-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,26,18,0) 30%, rgba(20,26,18,.82) 100%); }
.path-card:hover img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .path-card img { transition: none; } .path-card:hover img { transform: none; } }
.path-card .inner { position: relative; z-index: 1; padding: 2rem; }
.path-card h3 { color: var(--white); font-size: clamp(1.6rem, 2.6vw, 2rem); }
.path-card p { color: rgba(255,255,255,.95); margin-bottom: .8rem; }
.path-card .text-link { color: var(--white); }
.path-card:hover { color: var(--white); }

.theme-card { text-align: left; }
.theme-card .photo { aspect-ratio: 4 / 5; margin-bottom: 1.2rem; }
.theme-card h3 { margin-bottom: .2em; }
.theme-card p { color: var(--sage-text); margin: 0; }

.placeholder {
  display: grid; place-items: center; text-align: center;
  background: repeating-linear-gradient(135deg, var(--sand-2) 0 14px, #E4DAC6 14px 28px);
  color: var(--sage-text); font-size: .95rem; padding: 1.5rem;
}

/* ---------- Before / After ---------- */
.ba { display: grid; gap: 1rem; }
@media (min-width: 700px) { .ba { grid-template-columns: 1fr 1fr; } }
.ba figure { position: relative; }
.ba .tag {
  position: absolute; top: .9rem; left: .9rem; z-index: 1;
  background: rgba(46,56,41,.85); color: var(--sand);
  font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: .35rem .7rem; border-radius: 999px;
}
.ba .photo { aspect-ratio: 4 / 3; }

/* ---------- Process steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; background: var(--white); border-radius: var(--radius); padding: 1.6rem 1.6rem 1.4rem; box-shadow: var(--shadow); margin: 0; position: relative; }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--navy); color: var(--white); font-family: var(--font-serif); font-weight: 600; margin-bottom: .9rem;
}
.steps h3 { margin-bottom: .25em; font-size: 1.3rem; }
.steps p { margin: 0; color: var(--charcoal); }

/* ---------- Services ---------- */
.service { background: var(--white); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow); border-top: 4px solid var(--sage); }
.service:nth-child(3n+2) { border-top-color: var(--terracotta); }
.service:nth-child(3n+3) { border-top-color: var(--navy); }
.service h3 { margin-bottom: .6em; }
.service ul { margin: 0; padding-left: 1.1em; }
.service li { margin-bottom: .3em; }

.pill-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.pill-list li { margin: 0; background: var(--white); border: 1px solid rgba(70,84,62,.18); border-radius: 999px; padding: .45rem 1rem; font-size: .98rem; }

.callout { background: var(--white); border-left: 4px solid var(--terracotta); border-radius: var(--radius); padding: 1.4rem 1.6rem; box-shadow: var(--shadow); }
.callout p:last-child { margin-bottom: 0; }

.quote {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.3; color: var(--creosote-dark);
  margin: 0; max-width: 28ch;
}
.section--dark .quote { color: var(--sand); }

/* ---------- Journal ---------- */
.post-meta { font-size: .9rem; color: var(--sage-text); margin-bottom: .6rem; }
.post-meta .cat { color: var(--terracotta-text); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; }
.article { padding-block: 3rem var(--space); }
.article h1 { font-size: clamp(2.2rem, 4.4vw, 3.2rem); }
.article .lead { margin-bottom: 2rem; }
.article h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); margin-top: 2.2em; }
.article figure { margin: 2.2rem 0; }
.article figure .photo { box-shadow: none; }
.article-wide { width: min(100% - 2.5rem, 1000px); margin: 2.4rem auto; }
.draft-flag {
  display: inline-block; background: #FFF3C4; color: #5B4A00; border: 1px solid #E5CF73;
  font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: .3rem .7rem; border-radius: 999px; margin-bottom: 1rem;
}
.back-link { display: inline-block; margin-bottom: 1.5rem; text-decoration: none; font-weight: 600; }
.back-link::before { content: "\2190  "; }

/* ---------- Resources ---------- */
.topic { background: var(--white); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); }
.topic h3 { margin-bottom: .3em; }
.topic p { color: var(--charcoal); }
.topic .links { list-style: none; padding: 0; margin: .6rem 0 0; font-size: 1rem; }
.topic .links li { margin-bottom: .2rem; }
.topic .soon { font-size: .92rem; color: var(--sage-text); font-style: italic; margin: 0; }

/* ---------- Contact ---------- */
.contact-box { background: var(--white); border-radius: var(--radius); padding: clamp(1.8rem, 4vw, 2.8rem); box-shadow: var(--shadow); }
.contact-box .email { font-family: var(--font-serif); font-size: clamp(1.25rem, 2.6vw, 1.7rem); word-break: break-word; }
.checklist { list-style: none; padding: 0; }
.checklist li { padding-left: 1.8rem; position: relative; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .55em; width: .8rem; height: .8rem; border-radius: 50%; border: 2px solid var(--sage); }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; color: var(--white); text-align: center; }
.cta-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cta-band::after { content: ""; position: absolute; inset: 0; background: rgba(26,35,24,.68); }
.cta-band .inner { position: relative; z-index: 1; padding-block: clamp(5rem, 10vw, 8rem); }
.cta-band h2 { color: var(--white); }
.cta-band p { max-width: 46ch; margin: 0 auto 2rem; font-size: 1.2rem; color: rgba(255,255,255,.95); }
.cta-band .btn-row { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--creosote-dark); color: var(--sand); padding-block: 4rem 2rem; font-size: 1rem; }
.site-footer a { color: var(--sand); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: var(--white); }
.footer-grid { display: grid; gap: 2.5rem; }
@media (min-width: 820px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-brand .badge { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem; }
.footer-brand .badge img { width: 52px; height: 52px; }
.footer-brand .name { font-family: var(--font-serif); font-size: 1.4rem; line-height: 1.2; color: var(--white); }
.footer-brand p { color: var(--stone); margin-bottom: .4rem; }
.site-footer h2 { font-family: var(--font-sans); font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--stone); margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5rem; }
.footer-bottom { border-top: 1px solid rgba(197,179,150,.25); margin-top: 3rem; padding-top: 1.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; color: var(--stone); font-size: .92rem; }

/* ---------- Fixes for link colour inheritance ---------- */
.nav .btn--primary, .nav .btn--primary:hover { color: var(--white); }
.section--dark .btn--light, .cta-band .btn--light { color: var(--creosote-dark); }
.section--dark .btn--light:hover, .cta-band .btn--light:hover { color: var(--creosote-dark); }
.card h3 a { color: var(--creosote-dark); text-decoration: none; }
.card h3 a:hover { color: var(--navy); text-decoration: underline; }
h1, h2, h3 { text-wrap: balance; }
.hero::after { background: linear-gradient(180deg, rgba(20,26,18,.15) 0%, rgba(20,26,18,.35) 40%, rgba(20,26,18,.8) 100%); }
@media (max-width: 700px) { .hero::after { background: linear-gradient(180deg, rgba(20,26,18,.35), rgba(20,26,18,.75)); } }
.article figure.article-wide, .article .article-wide { margin: 2.4rem auto; }
.article .article-wide figure { margin: 0; }
