/* =============================================================
   Jason Plenty — site stylesheet
   One shared stylesheet. Design tokens live in :root.
   Direction: engineered, precise, calm, trustworthy.
   Palette: deep slate + a single quiet teal accent.
   Type: IBM Plex Serif (display) + IBM Plex Sans (body) —
   a coherent, disciplined superfamily; restraint is the flex.
   ============================================================= */

/* ---- Fonts (self-hosted, latin subset, ~112KB total) -------- */
@font-face {
  font-family: "Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/plex-sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/plex-sans-500.woff2") format("woff2");
}
@font-face {
  font-family: "Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/plex-sans-600.woff2") format("woff2");
}
@font-face {
  font-family: "Plex Serif";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/plex-serif-500.woff2") format("woff2");
}
@font-face {
  font-family: "Plex Serif";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/plex-serif-600.woff2") format("woff2");
}

/* ---- Design tokens ----------------------------------------- */
:root {
  /* Ink / text */
  --ink: #18242e;          /* primary text — deep slate */
  --ink-soft: #3b4a57;     /* secondary text */
  --muted: #5a6873;        /* labels, captions (AA on white) */

  /* Surfaces */
  --paper: #ffffff;        /* cards */
  --paper-2: #f5f7f8;      /* page background */
  --paper-3: #e9edf0;      /* subtle fills */

  /* Lines */
  --line: #dde2e6;
  --line-soft: #e9ecef;

  /* Accent — a single quiet teal-slate */
  --accent: #1f6f6b;       /* fills, hover */
  --accent-deep: #0f4d4a;  /* links, button base (AA on white) */
  --accent-bg: #e6efee;    /* focus tint, ghost-button hover */

  /* Type */
  --font-display: "Plex Serif", Georgia, "Times New Roman", serif;
  --font-body: "Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --maxw: 1000px;
  --gutter: 28px;

  /* Radius */
  --radius: 14px;
  --radius-sm: 9px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper-2);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (min-width: 720px) {
  body {
    font-size: 17px;
  }
}

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

a {
  color: var(--accent-deep);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Visible focus for every interactive element (keyboard a11y) */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Visually hidden but available to assistive tech / SEO */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
  text-decoration: none;
}

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

/* ---- Header ------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 11px;
  flex: none;
}
.brand:hover {
  text-decoration: none;
}
.brand .brand-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand .brand-tag {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  color: var(--ink);
  line-height: 1;
}
.nav-toggle .bars {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  position: relative;
}
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: currentColor;
}
.nav-toggle .bars::before { top: -6px; }
.nav-toggle .bars::after { top: 6px; }

.site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.site-nav a {
  font-size: 14.5px;
  color: var(--ink-soft);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.site-nav a:hover {
  color: var(--ink);
  background: var(--paper-3);
  text-decoration: none;
}
.site-nav a[aria-current="page"] {
  color: var(--accent-deep);
  font-weight: 500;
}

/* ---- Layout helpers ---------------------------------------- */
main {
  display: block;
}
.section {
  padding-top: 72px;
  padding-bottom: 64px;
}
.section--tight {
  padding-top: 56px;
  padding-bottom: 56px;
}

.eyebrow {
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 18px;
  font-weight: 500;
}

/* ---- Type scale -------------------------------------------- */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.4rem + 2.6vw, 2.85rem);
  line-height: 1.14;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 22px;
  max-width: 17ch;
  color: var(--ink);
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 1.3rem + 1.8vw, 2.2rem);
  line-height: 1.18;
  font-weight: 600;
  letter-spacing: -0.012em;
  margin: 0 0 16px;
  max-width: 22ch;
  color: var(--ink);
}

.lede {
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.2rem);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0;
}

h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 0 0 14px;
  color: var(--ink);
}
h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--ink);
}

p {
  margin: 0 0 16px;
}
.prose p {
  color: var(--ink-soft);
  max-width: 62ch;
}

.section-intro {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 60ch;
}
.section-intro p:last-child {
  margin-bottom: 0;
}

/* ---- The fork (home signature element) --------------------- */
.fork {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 40px;
}
.fork-panel {
  position: relative;
  background: var(--paper);
  padding: 32px 30px 30px;
  display: block;
  color: inherit;
  transition: background 0.18s ease;
}
.fork-panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.22s ease;
}
.fork-panel:hover,
.fork-panel:focus-visible {
  background: var(--paper-2);
  text-decoration: none;
}
.fork-panel:hover::before,
.fork-panel:focus-visible::before {
  transform: scaleY(1);
}
.fork-head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 16px;
}
.fork-icon {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-bg);
  color: var(--accent-deep);
}
.fork-icon svg {
  width: 18px;
  height: 18px;
}
.fork-aud {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.fork-panel h2 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}
.fork-panel p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 18px;
  max-width: 40ch;
}
.fork-go {
  font-size: 0.95rem;
  color: var(--accent-deep);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.fork-go .arrow {
  transition: transform 0.2s ease;
}
.fork-panel:hover .arrow,
.fork-panel:focus-visible .arrow {
  transform: translateX(4px);
}

/* ---- Credibility strip ------------------------------------- */
.cred {
  border-top: 1px solid var(--line);
  margin-top: 52px;
  padding-top: 38px;
  text-align: center;
}
.cred .cred-label {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
  font-weight: 500;
}
.cred-names {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px 30px;
}
.cred-names li {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: -0.01em;
}
.cred .cred-note {
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 50ch;
  margin: 20px auto 0;
}

/* ---- Cornerstones (Data & BI) ------------------------------ */
.cornerstones {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 34px 0 0;
}
.cornerstone {
  background: var(--paper);
  padding: 28px 30px;
}
.cornerstone-head {
  display: flex;
  align-items: baseline;
  gap: 13px;
  margin-bottom: 10px;
}
.cornerstone-num {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 600;
  flex: none;
}
.cornerstone h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0;
}
.cornerstone p {
  color: var(--ink-soft);
  margin-bottom: 12px;
  max-width: 64ch;
}
.cornerstone .tools {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}
.cornerstone .tools b {
  color: var(--ink-soft);
  font-weight: 600;
}

/* ---- Panels & callouts ------------------------------------- */
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 30px;
}
.panel h3,
.panel-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 14px;
}
.panel p {
  color: var(--ink-soft);
}
.panel p:last-child {
  margin-bottom: 0;
}

.pedigree {
  background: var(--paper-3);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
  padding: 24px 28px;
  margin-top: 32px;
}
.pedigree p {
  color: var(--ink-soft);
  margin: 0;
  max-width: 70ch;
}

/* ---- Clean list -------------------------------------------- */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}
.feature-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-soft);
  display: flex;
  gap: 13px;
  align-items: baseline;
}
.feature-list li:last-child {
  border-bottom: none;
}
.feature-list .tick {
  color: var(--accent);
  flex: none;
  font-weight: 600;
}

.subhead {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 36px 0 4px;
}

/* ---- Buttons / CTA ----------------------------------------- */
.cta-row {
  margin-top: 38px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid var(--accent-deep);
  background: var(--accent-deep);
  color: #fff;
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
}
.btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
  color: #fff;
}
.btn--ghost {
  background: transparent;
  color: var(--accent-deep);
}
.btn--ghost:hover {
  background: var(--accent-bg);
  color: var(--accent-deep);
  border-color: var(--accent-deep);
}
.cta-line {
  font-size: 1rem;
  color: var(--ink-soft);
  max-width: 44ch;
}

/* ---- About ------------------------------------------------- */
.about-intro {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin: 24px 0 8px;
}
.about-photo {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  border: 1px solid var(--line);
}
.about-photo--placeholder {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  flex: none;
  background: var(--paper-3);
  border: 1px dashed #c2913f;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 11px;
  color: #6b4a0e;
  line-height: 1.35;
  padding: 8px;
}
.about-photo-note {
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 34ch;
  margin: 0;
}
.about-body {
  max-width: 64ch;
  margin-top: 20px;
}
.about-body p {
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.about-body p.first {
  font-size: 1.1rem;
  color: var(--ink);
}
.creds-line {
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding-top: 18px;
  max-width: 64ch;
}

/* ---- Contact ----------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 44px;
  align-items: start;
  margin-top: 8px;
}
.field {
  margin-bottom: 18px;
}
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin: 0 0 6px;
}
input,
select,
textarea {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}
textarea {
  min-height: 130px;
  resize: vertical;
}
.required-mark {
  color: var(--accent-deep);
}

.contact-aside {
  border-left: 1px solid var(--line);
  padding-left: 32px;
}
.contact-aside .aside-row {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  margin-bottom: 20px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.contact-aside .aside-row:last-child {
  margin-bottom: 0;
}
.contact-aside .aside-icon {
  color: var(--accent-deep);
  flex: none;
  width: 22px;
  margin-top: 2px;
}
.contact-aside .aside-icon svg {
  width: 19px;
  height: 19px;
}
.contact-aside strong {
  color: var(--ink);
  font-weight: 600;
}

/* Form feedback */
.form-status {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}
.form-status[hidden] {
  display: none;
}
.form-status--success {
  background: var(--accent-bg);
  border: 1px solid var(--accent);
  color: var(--accent-deep);
}
.form-status--error {
  background: #fcecec;
  border: 1px solid #c0392b;
  color: #922018;
}

/* ---- Footer ------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
  margin-top: 40px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 28px 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.footer-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-nav a {
  color: var(--ink-soft);
}

/* ---- Placeholder flag (for unfilled brief values) ---------- */
.placeholder {
  color: #6b4a0e;
  background: #fbf3e3;
  border-radius: 4px;
  padding: 0 5px;
  font-size: 0.9em;
}

/* ---- Page load fade (respects reduced-motion) -------------- */
.js .page-fade {
  animation: fade-in 0.4s ease both;
}
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---- Responsive -------------------------------------------- */
@media (max-width: 760px) {
  .header-inner {
    min-height: 58px;
  }
  .nav-toggle {
    display: inline-flex;
  }
  /* No-JS: nav stays visible and wraps. JS: collapse behind toggle. */
  .js .site-nav {
    display: none;
    position: absolute;
    top: 58px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px 0;
  }
  .js .site-nav.open {
    display: flex;
  }
  .js .site-nav a {
    padding: 13px var(--gutter);
    border-radius: 0;
  }
  .site-header {
    position: relative;
  }

  .fork {
    grid-template-columns: 1fr;
    margin-top: 32px;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .contact-aside {
    border-left: none;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 28px;
  }
  .section {
    padding-top: 48px;
    padding-bottom: 44px;
  }
  .cta-row {
    gap: 14px;
  }
}

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