/* ChristopherDLynn.com design tokens and base layout
 *
 * Locked names from Linear CHR-74 / project ChristopherDLynn.com:
 *   pine  → --accent-primary   (Systems path)
 *   brass → --accent-secondary (Dads path)
 *   focus → --border-focus
 * Theme is switched only via html[data-theme="light"|"dark"].
 */

:root {
  --font-heading: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --font-body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "Cascadia Code", Menlo, Consolas,
    monospace;
  --content-max: 45rem; /* 720px at 16px root — primary text blocks */
  --page-gutter: 1.25rem;
  --section-gap: 5rem; /* 80px desktop, generous; minimum 64px */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-xxl: 4rem;
  --focus-ring-width: 2px;
  --path-border-width: 4px;
}

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/geist-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/geist-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/geist-mono-latin-400.woff2") format("woff2");
}

@font-face {
  font-family: "Libre Baskerville";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/libre-baskerville-latin-400.woff2") format("woff2");
}

@font-face {
  font-family: "Libre Baskerville";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/libre-baskerville-latin-400-italic.woff2") format("woff2");
}

@font-face {
  font-family: "Libre Baskerville";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/libre-baskerville-latin-700.woff2") format("woff2");
}

@media (max-width: 767px) {
  :root {
    --section-gap: 3rem;
    --page-gutter: 1rem;
  }
}

/* -------------------------------------------------------------------------- */
/* Light theme                                                                */
/* -------------------------------------------------------------------------- */
:root,
[data-theme="light"] {
  color-scheme: light;

  --background: #f6f3ec;
  --surface: #efebe2;
  --surface-elevated: #fffdf8;
  --text-primary: #1b1a17;
  --text-secondary: #5a564c;
  --text-muted: #8a8578;
  --border: #d8d2c4;
  --border-focus: #2f4f3e;
  --accent-primary: #2f4f3e; /* pine */
  --accent-secondary: #a67c2d; /* brass */
  --accent-primary-soft: rgba(47, 79, 62, 0.1);
  --accent-secondary-soft: rgba(166, 124, 45, 0.12);
  --on-accent: #f6f3ec;
  --shadow: 0 1px 0 rgba(27, 26, 23, 0.04);
}

/* -------------------------------------------------------------------------- */
/* Dark theme                                                                 */
/* -------------------------------------------------------------------------- */
[data-theme="dark"] {
  color-scheme: dark;

  --background: #121411;
  --surface: #1c1f1a;
  --surface-elevated: #262a24;
  --text-primary: #f1ece3;
  --text-secondary: #b7b2a6;
  --text-muted: #8a8578;
  --border: #3a3e36;
  --border-focus: #a8c4b0;
  --accent-primary: #a8c4b0; /* pine, lifted for contrast */
  --accent-secondary: #c9a24a; /* brass, lifted for contrast */
  --accent-primary-soft: rgba(168, 196, 176, 0.12);
  --accent-secondary-soft: rgba(201, 162, 74, 0.14);
  --on-accent: #121411;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

/* -------------------------------------------------------------------------- */
/* Reset and type                                                             */
/* -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--text-primary);
  font-family: var(--font-body), system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.7;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Beat the default 404 body { color; background } injection. */
html[data-theme="light"] body,
html[data-theme="dark"] body {
  background: var(--background);
  color: var(--text-primary);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading), Georgia, "Times New Roman", serif;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

h2 {
  font-size: clamp(1.5rem, 2.5vw, 1.875rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  color: var(--text-secondary);
  max-width: 65ch;
}

p + p {
  margin-top: var(--space-md);
}

a {
  color: var(--accent-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--text-primary);
}

button,
input,
select,
textarea {
  font-family: var(--font-body);
  font-size: 1rem;
}

code,
kbd,
samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

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

/* -------------------------------------------------------------------------- */
/* Focus-visible — locked to --border-focus                                   */
/* -------------------------------------------------------------------------- */
:focus {
  outline: none;
}

:focus-visible {
  outline: var(--focus-ring-width) solid var(--border-focus);
  outline-offset: 3px;
}

/* -------------------------------------------------------------------------- */
/* Base layout                                                                */
/* -------------------------------------------------------------------------- */
.site {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.skip-link {
  position: absolute;
  left: var(--page-gutter);
  top: var(--space-sm);
  z-index: 20;
  background: var(--surface-elevated);
  color: var(--text-primary);
  padding: var(--space-sm) var(--space-md);
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: none;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "name toggle"
    "nav nav";
  align-items: center;
  column-gap: var(--space-md);
  row-gap: var(--space-sm);
  width: min(var(--content-max), calc(100% - 2 * var(--page-gutter)));
  margin-inline: auto;
  padding-block: var(--space-lg);
  min-width: 0;
}

.site-name {
  grid-area: name;
  min-width: 0;
  min-height: 44px;
  display: inline-grid;
  align-items: center;
  text-decoration: none;
  color: var(--text-primary);
}

.site-name:hover {
  opacity: 0.82;
}

.site-wordmark {
  grid-area: 1 / 1;
  display: block;
  height: 2.5rem;
  width: auto;
  max-width: min(16.5rem, 100%);
  object-fit: contain;
  object-position: left center;
}

.site-wordmark-dark {
  visibility: hidden;
}

[data-theme="dark"] .site-wordmark-light {
  visibility: hidden;
}

[data-theme="dark"] .site-wordmark-dark {
  visibility: visible;
}

.site-nav {
  grid-area: nav;
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
}

.site-nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1rem;
  min-width: 44px;
  min-height: 44px;
  padding-inline: var(--space-xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-nav-link:hover {
  color: var(--text-primary);
}

.site-nav-link.is-active {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
}

.theme-toggle {
  grid-area: toggle;
  justify-self: end;
  display: inline-grid;
  justify-items: center;
  align-items: center;
  appearance: none;
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0;
  min-height: 44px;
  min-width: 44px;
  cursor: pointer;
  line-height: 1;
}

.theme-toggle-icon {
  grid-area: 1 / 1;
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  pointer-events: none;
}

.theme-toggle-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.theme-toggle-icon[data-for="dark"] {
  visibility: hidden;
}

[data-theme="dark"] .theme-toggle-icon[data-for="light"] {
  visibility: hidden;
}

[data-theme="dark"] .theme-toggle-icon[data-for="dark"] {
  visibility: visible;
}

.theme-toggle:hover {
  background: var(--surface-elevated);
}

@media (min-width: 640px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "name nav toggle";
  }

  .site-nav ul {
    justify-content: flex-end;
  }

  .site-wordmark {
    height: 2.75rem;
  }
}

.site-main {
  flex: 1;
  width: min(var(--content-max), calc(100% - 2 * var(--page-gutter)));
  margin-inline: auto;
  padding-bottom: var(--section-gap);
  min-width: 0;
}

.site-footer {
  width: min(var(--content-max), calc(100% - 2 * var(--page-gutter)));
  margin-inline: auto;
  padding-block: var(--space-xl);
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md) var(--space-lg);
}

.site-footer p {
  /* --text-muted fails WCAG AA for small text on the light background. */
  color: var(--text-secondary);
  font-size: 0.875rem;
  max-width: none;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.social-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 4px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 140ms ease, background-color 140ms ease;
}

.social-icon-link:hover {
  color: var(--accent-primary);
  background: var(--surface);
}

.social-icon-link svg {
  width: 1.125rem;
  height: 1.125rem;
  fill: currentColor;
}

.section + .section {
  margin-top: var(--section-gap);
}

.text-block {
  width: 100%;
  max-width: var(--content-max);
}

.path-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left-width: var(--path-border-width);
  padding: var(--space-lg);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
}

a.path-card:hover {
  background: var(--surface-elevated);
  color: inherit;
}

a.path-card:hover p {
  color: var(--text-secondary);
}

.path-systems {
  border-left-color: var(--accent-primary);
}

.path-dads {
  border-left-color: var(--accent-secondary);
}

.path-card h1,
.path-card h2,
.path-card h3 {
  margin-bottom: var(--space-sm);
}

.path-card .lead {
  margin-top: var(--space-md);
}

.path-card p {
  flex: 1;
}

h2 + p,
h3 + p,
h2 + [data-placeholder] > p:first-child,
h3 + [data-placeholder] > p:first-child {
  margin-top: var(--space-md);
}

.path-cta {
  display: inline-block;
  margin-top: var(--space-md);
  color: var(--accent-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a.path-card:hover .path-cta {
  color: var(--text-primary);
}

/* -------------------------------------------------------------------------- */
/* Buttons — Strategy Session and other primary actions                       */
/* -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  max-width: 100%;
  padding: 0.7rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--on-accent);
}

a.btn-primary,
a.btn-primary:hover,
a.btn-primary:focus-visible {
  color: var(--on-accent);
  text-decoration: none;
}

a.btn-primary:hover {
  opacity: 0.92;
}

.path-card .btn {
  align-self: flex-start;
}

/* -------------------------------------------------------------------------- */
/* Booking page                                                               */
/* -------------------------------------------------------------------------- */
.booking-embed {
  width: 100%;
  max-width: 100%;
  margin-top: var(--space-lg);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}

.booking-frame {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 38rem;
  border: 0;
}

@media (max-width: 767px) {
  .booking-frame {
    height: 52rem;
  }
}

.booking-fallback {
  margin-top: var(--space-md);
}

/* -------------------------------------------------------------------------- */
/* Home page                                                                  */
/* -------------------------------------------------------------------------- */
.portrait-block {
  width: 100%;
}

.portrait {
  /* Match TheSystemsDad.com circular headshot: 240px frame, no leftover rectangular pixels. */
  width: min(15rem, 100%);
  aspect-ratio: 1;
  margin: 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--background);
  border: 4px solid var(--surface-elevated);
  box-shadow: 0 14px 32px rgba(27, 26, 23, 0.14);
}

[data-theme="dark"] .portrait {
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4);
}

.portrait-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 14%;
  border-radius: 50%;
  background: var(--surface);
  /* Scale past the clip so JPEG/anti-alias pixels do not form a rim. */
  transform: scale(1.04);
}

.path-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (max-width: 767px) {
  .path-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) {
  .path-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.path-audience {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.path-card h2 a {
  color: inherit;
  text-decoration: none;
}

.path-card h2 a:hover {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.path-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  margin-top: var(--space-md);
  align-items: baseline;
}

.path-actions .path-cta {
  margin-top: 0;
  font-weight: 500;
}

.path-link-secondary {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.path-link-secondary:hover {
  color: var(--text-primary);
}

.swatches {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.swatch {
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface-elevated);
}

.swatch-chip {
  height: 3rem;
}

.swatch figcaption {
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding: var(--space-sm);
  font-family: var(--font-body);
}

.lead {
  margin-top: var(--space-lg);
}

/* -------------------------------------------------------------------------- */
/* About page readability, pull quote, and closing choices (CHR-107)          */
/* -------------------------------------------------------------------------- */
.about-story p {
  color: var(--text-primary);
}

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

.about-story .lead {
  font-size: 1.25rem;
  line-height: 1.6;
}

.about-portrait {
  margin-bottom: var(--space-xl);
}

.about-portrait .portrait {
  width: min(11rem, 100%);
}

.pull-quote {
  margin-block: var(--space-xl);
  padding: var(--space-md) var(--space-lg);
  border-left: var(--path-border-width) solid var(--accent-secondary);
  background: var(--surface);
  font-family: var(--font-heading), Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  line-height: 1.55;
  color: var(--text-primary);
}

.about-choice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.about-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left-width: var(--path-border-width);
  padding: var(--space-lg);
  color: inherit;
  text-decoration: none;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.about-choice:hover {
  background: var(--surface-elevated);
}

.about-choice-systems {
  border-left-color: var(--accent-primary);
}

.about-choice-dads {
  border-left-color: var(--accent-secondary);
}

.about-choice h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  margin-bottom: var(--space-sm);
}

.about-choice p {
  color: var(--text-secondary);
}

.about-choice:hover .path-cta {
  color: var(--text-primary);
}

/* -------------------------------------------------------------------------- */
/* How I Work / Approach list (CHR-115)                                       */
/* -------------------------------------------------------------------------- */
.approach-list {
  margin-top: var(--space-lg);
  padding-left: 1.35rem;
  color: var(--text-secondary);
}

.approach-list li + li {
  margin-top: var(--space-md);
}

.approach-list strong {
  color: var(--text-primary);
}

/* -------------------------------------------------------------------------- */
/* Proof of Capability & Local Business Callout (CHR-116)                     */
/* -------------------------------------------------------------------------- */
.proof-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

@media (min-width: 768px) {
  .proof-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.proof-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: var(--path-border-width) solid var(--accent-primary);
  padding: var(--space-lg);
}

.proof-card h3 {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  margin-bottom: var(--space-sm);
}

.proof-card p {
  color: var(--text-secondary);
}

.callout-banner {
  margin-top: var(--space-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: var(--path-border-width) solid var(--accent-primary);
  padding: var(--space-lg);
}

.callout-banner p {
  color: var(--text-secondary);
}

.callout-banner .btn {
  margin-top: var(--space-md);
}

/* -------------------------------------------------------------------------- */
/* Placeholder copy (CHR-79)                                                  */
/* -------------------------------------------------------------------------- */
/*
 * Body copy marked data-placeholder="true" is stand-in text of realistic
 * length. Replace the inner HTML of that element. Keep data-content-key
 * until final copy lands, then remove both attributes.
 * Keys are listed in scripts/check-placeholders.mjs.
 */
