/* John Wills Psychology — 2026 refresh
   Palette: slate ink, warm sand, sea-glass teal. */

:root {
  --ink:        #16242b;
  --ink-soft:   #3f5560;
  --ink-faint:  #6f838d;
  --teal:       #2b7f8c;
  --teal-deep:  #1d5f6a;
  --teal-pale:  #e6f1f2;
  --sand:       #f6f2ea;
  --paper:      #ffffff;
  --line:       #e3ddd2;
  --focus:      #b4531f;

  --font-head: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --measure: 34rem;
  --wrap: 68rem;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(22, 36, 43, .05), 0 8px 28px rgba(22, 36, 43, .07);
}

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

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

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

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

a { color: var(--teal-deep); text-underline-offset: 3px; }
a:hover { color: var(--focus); }

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

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2rem, 5vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 3.2vw, 1.85rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1.1em; }
p, li { max-width: var(--measure); }

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.skip-link {
  position: absolute; left: -9999px;
  background: var(--ink); color: #fff;
  padding: .7rem 1.1rem; z-index: 100; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; top: 0; }

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .93);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}

.brand {
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: .01em;
  white-space: nowrap;
}
.brand span { color: var(--teal); }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .5rem .8rem;
  font: inherit; font-size: .9rem;
  color: var(--ink); cursor: pointer;
}

.nav ul {
  display: flex; gap: .25rem;
  list-style: none; margin: 0; padding: 0;
  flex-wrap: wrap;
}
.nav li { max-width: none; }

.nav a {
  display: block;
  padding: .5rem .75rem;
  font-size: .875rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: var(--radius);
}
.nav a:hover { background: var(--teal-pale); color: var(--teal-deep); }
.nav a[aria-current="page"] {
  color: var(--teal-deep);
  background: var(--teal-pale);
  font-weight: 600;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: .5rem 1.25rem 1rem;
  }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a { padding: .85rem .5rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav li:last-child a { border-bottom: 0; }
}

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

.hero {
  position: relative;
  background: var(--sand);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero-media {
  position: absolute; inset: 0;
}
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
}
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg,
    rgba(255, 255, 255, .96) 0%,
    rgba(255, 255, 255, .90) 42%,
    rgba(255, 255, 255, .55) 70%,
    rgba(255, 255, 255, .25) 100%);
}

.hero-inner {
  position: relative;
  padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(3.5rem, 8vw, 5.5rem);
}

.hero h1 { margin-bottom: .35em; }
.hero .lede {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 30rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .78rem;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 1rem;
}

@media (max-width: 640px) {
  .hero-media::after {
    background: linear-gradient(180deg,
      rgba(255, 255, 255, .95) 0%,
      rgba(255, 255, 255, .88) 60%,
      rgba(255, 255, 255, .7) 100%);
  }
}

/* ---------- Page header (interior pages) ---------- */

.page-head {
  background: var(--sand);
  border-bottom: 1px solid var(--line);
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2rem, 5vw, 3rem);
}
.page-head p { color: var(--ink-soft); margin-bottom: 0; }

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

.btn {
  display: inline-block;
  padding: .8rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .98rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--teal-deep); color: #fff; }
.btn-primary:hover { background: var(--ink); color: #fff; }
.btn-ghost { border-color: var(--teal-deep); color: var(--teal-deep); background: transparent; }
.btn-ghost:hover { background: var(--teal-pale); color: var(--teal-deep); }

.btn-row {
  display: flex; flex-wrap: wrap; gap: .75rem;
  margin-top: 1.75rem;
}

/* ---------- Sections ---------- */

.section { padding: clamp(3rem, 7vw, 4.75rem) 0; }
.section-alt { background: var(--sand); }
.section > .wrap > h2 { margin-bottom: 1rem; }

.section-intro { color: var(--ink-soft); max-width: var(--measure); }

/* ---------- Card grid ---------- */

.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  margin-top: 2rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .4rem; color: var(--teal-deep); }
.card p { color: var(--ink-soft); margin-bottom: 0; font-size: .97rem; max-width: none; }

/* ---------- Lists ---------- */

.tick-list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: .55rem;
}
.tick-list li {
  position: relative;
  padding-left: 1.9rem;
  max-width: var(--measure);
}
.tick-list li::before {
  content: "";
  position: absolute; left: .1rem; top: .55em;
  width: .8rem; height: .45rem;
  border-left: 2.5px solid var(--teal);
  border-bottom: 2.5px solid var(--teal);
  transform: rotate(-45deg);
}

.plain-list { list-style: none; margin: 1.25rem 0 0; padding: 0; }
.plain-list li {
  padding: .8rem 0 .8rem 1.4rem;
  border-bottom: 1px solid var(--line);
  position: relative;
  max-width: 46rem;
}
.plain-list li::before {
  content: "";
  position: absolute; left: 0; top: 1.35em;
  width: .5rem; height: .5rem;
  background: var(--teal);
  border-radius: 50%;
}
.plain-list li:last-child { border-bottom: 0; }

.tag-row {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin: 1.5rem 0 0; padding: 0; list-style: none;
}
.tag-row li {
  max-width: none;
  background: var(--teal-pale);
  color: var(--teal-deep);
  border-radius: 999px;
  padding: .4rem 1rem;
  font-size: .92rem;
  font-weight: 600;
}

/* ---------- Two-column media block ---------- */

.split {
  display: grid;
  gap: clamp(1.75rem, 5vw, 3.5rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
@media (min-width: 820px) {
  .split { grid-template-columns: 260px minmax(0, 1fr); }
  .split.reverse { grid-template-columns: minmax(0, 1fr) 300px; }
}

.portrait {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 260px;
}
.portrait-caption {
  font-size: .88rem;
  color: var(--ink-faint);
  margin-top: .75rem;
}

.figure img { border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- Fact panel ---------- */

.panel {
  background: var(--teal-pale);
  border: 1px solid #cfe3e5;
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0 0;
}
.panel h3 { margin-bottom: .4rem; }
.panel p:last-child { margin-bottom: 0; }

.note {
  font-size: .95rem;
  color: var(--ink-soft);
  border-left: 3px solid var(--line);
  padding-left: 1.1rem;
  margin-top: 2rem;
}

.price {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 6vw, 3rem);
  color: var(--teal-deep);
  line-height: 1;
  display: block;
  margin-bottom: .25rem;
}
.price small {
  display: block;
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--ink-soft);
  margin-top: .5rem;
}

/* ---------- Definition-style detail rows ---------- */

.detail-list { margin: 1.5rem 0 0; }
.detail-list dt {
  font-weight: 600;
  color: var(--teal-deep);
  margin-top: 1.25rem;
}
.detail-list dd {
  margin: .25rem 0 0;
  color: var(--ink-soft);
  max-width: var(--measure);
}

/* ---------- CTA band ---------- */

.cta {
  background: var(--ink);
  color: #dfe8ea;
  padding: clamp(3rem, 7vw, 4.5rem) 0;
}
.cta h2 { color: #fff; }
.cta p { color: #b9cbd0; max-width: var(--measure); }
.cta a.btn-primary { background: var(--teal); color: #fff; }
.cta a.btn-primary:hover { background: #fff; color: var(--ink); }
.cta a.btn-ghost { border-color: #6d858c; color: #dfe8ea; }
.cta a.btn-ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }

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

.site-footer {
  background: var(--sand);
  border-top: 1px solid var(--line);
  padding: 3rem 0 2rem;
  font-size: .95rem;
  color: var(--ink-soft);
}
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.site-footer h3 {
  font-family: var(--font-body);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-faint);
  margin-bottom: .75rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--focus); text-decoration: underline; }

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: .87rem;
  color: var(--ink-faint);
}
.footer-bottom p { max-width: 50rem; margin-bottom: .5rem; }

/* ---------- Crisis / safety notice ---------- */

.safety {
  background: #fff8ef;
  border: 1px solid #f0dcc2;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-top: 2rem;
  font-size: .95rem;
}
.safety strong { color: #8a4b12; }
.safety p { margin-bottom: 0; max-width: none; }
