/* The Clinician's Enneagram, shared styles
   Type: Source Serif 4 (display) + IBM Plex Sans (text)
   Palette: cool clinical neutrals, one tempered teal */

:root {
  --paper: #f6f8fa;
  --white: #ffffff;
  --ink: #1b2531;
  --ink-2: #4b5765;
  --ink-3: #7c8794;
  --rule: #d6dee6;
  --mist: #e6eef3;
  --teal: #2a6b86;
  --teal-deep: #1d4e63;
  --teal-tint: #d9e8ef;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 62ch;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "ss01";
}
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.08; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.2; }
h3 { font-size: 1.3rem; line-height: 1.3; }
p { margin: 0 0 1.1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }
a { color: var(--teal-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--teal); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 2px; }
strong { font-weight: 600; }
ul, ol { padding-left: 1.2em; }
.wrap { width: min(var(--max), 100% - 2.5rem); margin-inline: auto; }
.lede { font-size: 1.25rem; line-height: 1.5; color: var(--ink-2); }
.muted { color: var(--ink-3); font-size: 0.95rem; }

/* Header */
.site-head { background: var(--white); border-bottom: 1px solid var(--rule); }
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding: 1.1rem 0; flex-wrap: wrap;
}
.wordmark {
  font-family: var(--serif); font-size: 1.25rem; color: var(--ink);
  text-decoration: none; display: inline-flex; align-items: center; gap: 0.6rem; white-space: nowrap;
}
.wordmark svg { width: 26px; height: 26px; }
.nav { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 0.98rem; padding: 0.2rem 0; border-bottom: 1px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

/* Buttons */
.btn {
  display: inline-block; padding: 0.8rem 1.4rem; border-radius: 4px;
  background: var(--teal); color: var(--white); text-decoration: none;
  font-weight: 500; font-size: 1rem; line-height: 1.3; border: 1px solid var(--teal);
  transition: background 120ms ease;
}
.btn:hover { background: var(--teal-deep); border-color: var(--teal-deep); color: var(--white); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn-lg { padding: 1.05rem 1.9rem; font-size: 1.1rem; }
.actions { display: flex; gap: 0.9rem; flex-wrap: wrap; align-items: center; margin-top: 2rem; }

/* Sections */
.section { padding: 5.5rem 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section h2 { max-width: 24ch; margin-bottom: 1.4rem; }

/* Hero (home page) */
.hero { padding: 5rem 0 5.5rem; background: var(--white); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 3rem; align-items: center; }
.hero h1 { max-width: 16ch; }
.hero .lede { margin-top: 1.5rem; }
.hero-welcome .wrap { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); align-items: start; }
.hero-welcome h1 { font-size: clamp(2rem, 4.2vw, 3rem); max-width: 22ch; }
.hero-welcome .figure { max-width: 340px; margin-top: 1rem; }

/* Enneagram figure */
.figure { width: 100%; max-width: 460px; margin-inline: auto; display: block; }
.figure .ring { fill: none; stroke: var(--rule); stroke-width: 1.5; }
.figure .tri { fill: none; stroke: var(--ink); stroke-width: 1.75; stroke-linejoin: round; }
.figure .hex { fill: none; stroke: var(--teal); stroke-width: 1.75; stroke-linejoin: round; }
.figure .pt { fill: var(--white); stroke: var(--ink); stroke-width: 1.5; }
.figure .lbl { font-family: var(--sans); font-size: 15px; fill: var(--ink-2); text-anchor: middle; dominant-baseline: middle; }
.figure .tri, .figure .hex { stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: draw 1.6s cubic-bezier(.4,0,.2,1) forwards; }
.figure .hex { animation-delay: 0.35s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .figure .tri, .figure .hex { animation: none; stroke-dashoffset: 0; }
  html { scroll-behavior: auto; }
}

/* Page header (interior pages) */
.page-head { background: var(--white); padding: 4.5rem 0 3.5rem; border-bottom: 1px solid var(--rule); }
.page-head h1 { max-width: 18ch; }
.page-head .lede { margin-top: 1.2rem; }

/* The three certification choices */
.choices { list-style: none; padding: 0; margin: 2.5rem 0 0; display: grid; gap: 1rem; max-width: 46rem; }
.choice { display: block; background: var(--white); border: 1px solid var(--rule); border-left: 4px solid var(--teal); border-radius: 4px; padding: 1.5rem 1.75rem; text-decoration: none; color: var(--ink); transition: border-color 120ms ease, background 120ms ease; }
.choice:hover { border-color: var(--teal); background: var(--teal-tint); color: var(--ink); }
.choice strong { display: block; font-weight: 600; font-size: 1.1rem; line-height: 1.4; }
.choice span { display: block; color: var(--ink-2); font-size: 0.98rem; margin-top: 0.5rem; max-width: none; }
.choice em { display: block; font-style: normal; color: var(--teal-deep); font-weight: 500; margin-top: 0.8rem; }

/* Pop-up (index-popup-version.html and popup.html only) */
.gate { border: 0; padding: 0; width: min(44rem, calc(100% - 2rem)); background: var(--paper); color: var(--ink); border-radius: 6px; box-shadow: 0 24px 60px rgba(27,37,49,0.3); }
.gate::backdrop { background: rgba(27,37,49,0.7); }
.gate-inner { padding: 2.25rem; }
.gate h2 { font-size: 1.5rem; }
.gate-choices { margin-top: 1.4rem; max-width: none; }

/* Body copy on interior pages */
.prose { max-width: var(--measure); }
.prose h2 { margin-top: 3rem; margin-bottom: 1rem; font-size: 1.7rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.1em; }
.prose li { margin-bottom: 0.5em; }
.sources { padding-left: 1.3em; margin: 1.2rem 0 1.6rem; max-width: var(--measure); }
.sources li { margin-bottom: 0.5em; }
.callout { border-left: 3px solid var(--teal); padding: 0.2rem 0 0.2rem 1.3rem; margin: 2rem 0; color: var(--ink-2); }
.start { margin-top: 3rem; padding: 2.5rem; background: var(--white); border: 1px solid var(--rule); border-radius: 6px; max-width: 40rem; }
.start h2 { font-size: 1.6rem; margin-bottom: 0.6rem; }
.start .btn { margin-top: 1.4rem; }
.start .muted { margin-top: 1.1rem; }

/* Yellow highlight marking text that still needs to be supplied. Delete this
   rule once every placeholder has been replaced. */
.placeholder { background: #fff6d8; padding: 0 0.25em; border-radius: 2px; }

/* Footer */
.site-foot { background: var(--white); border-top: 1px solid var(--rule); padding: 3rem 0 2.5rem; font-size: 0.95rem; color: var(--ink-2); }
.site-foot .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2rem 4rem; }
.site-foot .nav { gap: 1.2rem; }
.site-foot .nav a { font-size: 0.95rem; }
.site-foot .fine { margin-top: 1.5rem; font-size: 0.875rem; color: var(--ink-3); max-width: 52ch; }

/* Responsive */
@media (max-width: 880px) {
  .hero .wrap, .site-foot .wrap { grid-template-columns: 1fr; }
  .hero { padding: 3.5rem 0 4rem; }
  .hero-welcome .figure { display: none; }
  .figure { max-width: 340px; }
  .section { padding: 4rem 0; }
}
@media (max-width: 600px) {
  body { font-size: 1rem; }
  .site-head .wrap { justify-content: center; text-align: center; }
  .nav { justify-content: center; gap: 1rem; }
  .start { padding: 1.6rem; }
  .gate-inner { padding: 1.4rem; }
}
