/* ==========================================================================
   Mark Hookham — Coach & Consultant
   Palette: ivory paper · pine · marigold
   Type: Fraunces (display) · Public Sans (text)
   ========================================================================== */

:root {
  --paper:      #faf7f0;
  --paper-2:    #f3eee2;
  --card:       #fffdf8;
  --ink:        #17201c;
  --ink-soft:   #3d4a43;
  --muted:      #6d7871;
  --pine:       #1c4034;
  --pine-deep:  #122b23;
  --marigold:   #c8871f;
  --rule:       #e2dbcb;
  --rule-soft:  #ece6d8;

  --maxw: 1120px;
  --measure: 68ch;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 .6em;
  font-variation-settings: "SOFT" 0, "WONK" 0;
}

h1 { font-size: clamp(2.6rem, 7vw, 5.1rem); }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.9rem); letter-spacing: -0.025em; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); letter-spacing: -0.015em; }
h4 { font-size: 1.0625rem; letter-spacing: 0; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a { color: var(--pine); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--marigold); }

strong { font-weight: 600; color: var(--ink); }

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 4vw, 2.5rem);
}

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }

.eyebrow {
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--marigold);
  margin: 0 0 1.1rem;
  display: flex;
  align-items: center;
  gap: .7rem;
}

.eyebrow::after {
  content: "";
  height: 1px;
  flex: 0 0 clamp(1.5rem, 6vw, 3.5rem);
  background: currentColor;
  opacity: .45;
}

.lede {
  font-size: clamp(1.1rem, 1.7vw, 1.3rem);
  line-height: 1.62;
  color: var(--ink-soft);
  max-width: 46ch;
}

/* ---------- Header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 240, .93);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.site-head__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.25rem;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.brand__dot { color: var(--marigold); }

.brand:hover { color: var(--pine); }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(.85rem, 2vw, 1.9rem);
  font-size: .855rem;
  font-weight: 500;
  letter-spacing: .015em;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding-block: .35rem;
  border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}

.nav a:hover { color: var(--pine); border-bottom-color: var(--marigold); }

.nav__call {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem .95rem;
  border: 1px solid var(--pine);
  border-radius: 2rem;
  color: var(--pine);
  font-variant-numeric: tabular-nums;
  transition: background .18s ease, color .18s ease;
}

.nav__call:hover {
  background: var(--pine);
  color: var(--paper);
  border-bottom-color: transparent;
}

@media (max-width: 760px) {
  /* hide page links; the call button stays */
  .nav a:not(.nav__call) { display: none; }
}

/* ---------- Hero ---------- */

.hero { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3rem, 6vw, 4.5rem); }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: end;
}

.hero h1 { margin-bottom: .35em; }

.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--pine);
}

.hero__role {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--pine);
  margin: 0 0 1.4rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 2rem;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .8rem 1.5rem;
  border-radius: 2rem;
  border: 1px solid transparent;
  font-size: .93rem;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  color: var(--paper);
  background: var(--pine);
  transition: transform .18s ease, background .18s ease, color .18s ease;
}

.btn:hover {
  background: var(--pine-deep);
  color: var(--paper);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--pine);
  border-color: var(--rule);
}

.btn--ghost:hover {
  background: var(--paper-2);
  color: var(--pine);
  border-color: var(--pine);
}

/* Buttons must survive prose link styling (specificity guard) */
.prose a.btn,
.prose a.btn:visited { color: var(--paper); text-decoration: none; }
.prose a.btn--ghost,
.prose a.btn--ghost:visited { color: var(--pine); text-decoration: none; }
.prose a.btn:hover { color: var(--paper); }
.prose a.btn--ghost:hover { color: var(--pine); }

/* ---------- Contact card ---------- */

.factcard {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: clamp(1.35rem, 2.5vw, 1.9rem);
  box-shadow: 0 1px 0 rgba(23, 32, 28, .03);
}

.factcard__label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
}

.factcard dl { margin: 0; }

.factcard dt {
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 1.05rem;
}

.factcard dt:first-child { margin-top: 0; }

.factcard dd {
  margin: .18rem 0 0;
  font-size: .98rem;
  color: var(--ink);
  word-break: break-word;
}

.factcard dd a { text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--rule); }
.factcard dd a:hover { color: var(--marigold); border-bottom-color: var(--marigold); }

/* ---------- Rules / section heads ---------- */

.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 0;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(0, 1.35fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.split__aside { position: sticky; top: 6rem; }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; align-items: start; }
  .split { grid-template-columns: 1fr; }
  .split__aside { position: static; }
}

/* ---------- Focus list ---------- */

.focus {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.focus li {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: .96rem;
  color: var(--ink-soft);
}

.focus li span {
  font-family: var(--font-display);
  font-size: .8rem;
  color: var(--marigold);
  font-variant-numeric: tabular-nums;
  flex: 0 0 1.9rem;
}

/* ---------- Possibilities band ---------- */

.band {
  background: var(--pine);
  color: #eef3ee;
}

.band h2, .band h3 { color: #fdfbf5; }
.band .eyebrow { color: #e2b566; }

.band p { color: #cfd9d0; }

.band__lead {
  max-width: var(--measure);
  font-size: clamp(1.02rem, 1.5vw, 1.15rem);
  line-height: 1.72;
}

.ai-card {
  margin-top: clamp(2rem, 4vw, 3rem);
  background: rgba(255, 253, 248, .055);
  border: 1px solid rgba(226, 181, 102, .32);
  border-radius: 4px;
  padding: clamp(1.4rem, 3vw, 2.2rem);
}

.ai-card h3 { margin-bottom: .7rem; }

.ai-card p { margin: 0; max-width: 62ch; }

.ai-card__tag {
  display: inline-block;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: #e2b566;
  margin-bottom: .85rem;
}

/* ---------- Post cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  margin-top: 2.4rem;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.5rem 1.5rem 1.35rem;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.card:hover {
  border-color: #cfc5ad;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -22px rgba(23, 32, 28, .5);
}

.card__date {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .75rem;
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.16rem;
  line-height: 1.24;
  letter-spacing: -0.012em;
  margin: 0 0 .6rem;
}

.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--pine); }

.card__excerpt {
  font-size: .92rem;
  line-height: 1.62;
  color: var(--muted);
  margin: 0 0 1.2rem;
}

.card__more {
  margin-top: auto;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--pine);
  text-decoration: none;
}

.card__more::after { content: " →"; transition: margin .18s ease; }
.card__more:hover::after { margin-left: .25rem; }

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
  margin-top: 2.5rem;
}

.contact-item h4 {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .4rem;
  font-family: var(--font-body);
}

.contact-item p,
.contact-item a {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  margin: 0;
}

.contact-item a { border-bottom: 1px solid var(--marigold); }
.contact-item a:hover { color: var(--marigold); }

/* ---------- Article / prose ---------- */

.article-head {
  padding-block: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--rule);
}

.article-head h1 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  max-width: 22ch;
  margin-bottom: .5rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.1rem;
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.prose {
  max-width: var(--measure);
  padding-block: clamp(2rem, 4vw, 3rem) clamp(3rem, 6vw, 5rem);
  font-size: 1.0625rem;
  line-height: 1.78;
  color: var(--ink-soft);
}

.prose > * + * { margin-top: 1.15em; }

.prose h2 {
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
  margin-top: 2.2em;
  margin-bottom: .5em;
  color: var(--ink);
}

.prose h3 {
  font-size: clamp(1.15rem, 1.9vw, 1.35rem);
  margin-top: 1.9em;
  margin-bottom: .4em;
  color: var(--ink);
}

.prose h2 + p, .prose h3 + p { margin-top: 0; }

.prose a { color: var(--pine); }

.prose ul, .prose ol { padding-left: 1.35em; margin: 0; }
.prose li { margin-bottom: .5em; }
.prose li:last-child { margin-bottom: 0; }

.prose blockquote {
  margin: 1.9em 0;
  padding: .2em 0 .2em 1.4em;
  border-left: 3px solid var(--marigold);
  font-family: var(--font-display);
  font-size: 1.16rem;
  line-height: 1.55;
  color: var(--pine);
}

.prose blockquote p { margin: 0; }

.prose hr {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 2.4em 0;
}

.prose strong { color: var(--ink); }

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  margin: 1.8em 0;
  display: block;
  overflow-x: auto;
  white-space: nowrap;
}

.prose th, .prose td {
  border: 1px solid var(--rule);
  padding: .6rem .8rem;
  text-align: left;
  vertical-align: top;
}

.prose th { background: var(--paper-2); font-weight: 600; color: var(--ink); }

.table-scroll { overflow-x: auto; margin: 1.8em 0; }
.table-scroll table { margin: 0; }

/* ---------- Footer ---------- */

.site-foot {
  border-top: 1px solid var(--rule);
  padding-block: clamp(2rem, 4vw, 3rem);
  background: var(--paper-2);
}

.site-foot__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: baseline;
  justify-content: space-between;
  font-size: .85rem;
  color: var(--muted);
}

.site-foot a { color: var(--ink-soft); text-decoration: none; }
.site-foot a:hover { color: var(--pine); }

.site-foot__links { display: flex; flex-wrap: wrap; gap: 1.25rem; }

/* ---------- Back link ---------- */

.backlink {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  margin-bottom: 1.6rem;
}

.backlink:hover { color: var(--pine); }
.backlink::before { content: "←"; }

/* ---------- 404 ---------- */

.notfound {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 5rem;
}

.notfound h1 { font-size: clamp(2.2rem, 6vw, 4rem); max-width: 20ch; }

/* ---------- Skip link ---------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--pine);
  color: var(--paper);
  padding: .7rem 1.1rem;
  z-index: 100;
  border-radius: 0 0 4px 0;
}

.skip:focus { left: 0; color: var(--paper); }

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

/* ---------- Print ---------- */

@media print {
  .site-head, .site-foot, .hero__actions, .backlink { display: none; }
  body { background: #fff; color: #000; }
  .band { background: #fff; color: #000; }
  .band h2, .band h3, .band p { color: #000; }
}
