/* Yves Fondze: public site. Minimal: white, one accent, two typefaces. */

:root {
  --bg: #ffffff;
  --surface: #f6f6f3;
  --ink: #16181d;
  --muted: #5d636d;
  --line: #e6e5e0;
  --accent: #1f5ce0;
  --accent-soft: color-mix(in srgb, var(--accent) 9%, var(--bg));
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 16px;
  --shell: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  z-index: 100;
  top: 8px;
  left: 8px;
  transform: translateY(-200%);
  border-radius: 8px;
  background: var(--ink);
  padding: 0.6rem 0.9rem;
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  transform: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.shell {
  width: min(var(--shell), calc(100% - 48px));
  margin-inline: auto;
}

/* ---------- Buttons & links ---------- */

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, opacity 150ms ease;
}

.button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.button-primary {
  background: var(--accent);
  color: #fff;
}

.button-primary:hover {
  background: color-mix(in srgb, var(--accent) 85%, #000);
}

.button-secondary {
  background: var(--surface);
  color: var(--ink);
}

.button-secondary:hover {
  background: color-mix(in srgb, var(--surface) 90%, var(--ink));
}

.button-small {
  min-height: 38px;
  padding: 0.45rem 1.1rem;
  font-size: 0.88rem;
}

.button-block {
  width: 100%;
}

.text-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.header-inner {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.02rem;
  font-weight: 700;
  text-decoration: none;
}

.brand-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.site-nav a:not(.button) {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:not(.button):hover,
.site-nav a.is-current {
  color: var(--ink);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 150ms ease;
}

.nav-open .menu-toggle span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav-open .menu-toggle span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(56px, 9vw, 112px) clamp(56px, 8vw, 96px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  align-items: center;
  gap: 48px;
}

.hero-role {
  color: var(--accent);
  font-size: 0.98rem;
  font-weight: 700;
}

.hero h1 {
  max-width: 13ch;
  margin-top: 0.75rem;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 5.4vw, 4.1rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.06;
}

.hero-intro {
  max-width: 46ch;
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero-actions .button {
  min-width: 168px;
}

.hero-actions-center {
  justify-content: center;
}

.hero-portrait {
  position: relative;
  display: grid;
  width: min(320px, 100%);
  aspect-ratio: 1;
  justify-self: end;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--surface);
}

.hero-portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-monogram {
  color: color-mix(in srgb, var(--ink) 35%, var(--surface));
  font-family: var(--serif);
  font-size: clamp(4rem, 9vw, 6rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}

/* ---------- Tools strip & stats ---------- */

.tools-strip {
  border-top: 1px solid var(--line);
}

.tools-strip ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 2.25rem;
  padding-block: 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.stats-band {
  background: var(--surface);
  padding-block: 40px;
}

.stats-card {
  display: grid;
  max-width: 760px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-inline: auto;
  border-radius: var(--radius);
  background: var(--bg);
  padding: 1.25rem 0.5rem;
}

.stat {
  padding: 0.25rem 1.25rem;
}

.stat + .stat {
  border-left: 1px solid var(--line);
}

.stat strong {
  display: block;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.2;
}

.stat span {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(64px, 9vw, 104px);
}

.section-tight {
  padding-top: 0;
}

.section-alt {
  background: var(--surface);
}

.section-title {
  margin-bottom: 2.5rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.6vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.15;
  text-align: center;
}

.section-sub {
  max-width: 52ch;
  margin: -1.5rem auto 2rem;
  color: var(--muted);
  text-align: center;
}

.section-sub + .section-sub {
  margin-top: -1.25rem;
}

.section-more {
  margin-top: 2.25rem;
  text-align: center;
}

/* Services */

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}

.service-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
}

.service-card > p {
  color: var(--muted);
}

.check-list {
  display: grid;
  gap: 0.45rem;
}

.check-list li {
  position: relative;
  padding-left: 1.4rem;
  font-weight: 600;
  line-height: 1.45;
}

.check-list li::before {
  position: absolute;
  top: 0.55em;
  left: 0.2rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.service-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.service-card .card-foot {
  margin-top: auto;
  padding-top: 0.5rem;
}

.service-price {
  margin-top: -0.6rem;
}

.also {
  margin-top: 2rem;
  color: var(--muted);
  text-align: center;
}

.also a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
}

.also a:hover {
  text-decoration-color: currentColor;
}

/* Cards (projects) */

/* Flex rather than grid so a short last row stays centred. */
.card-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.card-grid > * {
  flex: 0 1 356px;
  min-width: 0;
}

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.project-media {
  display: grid;
  aspect-ratio: 16 / 10;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.section-alt .project-media {
  background: color-mix(in srgb, var(--surface) 55%, var(--bg));
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.project-media span {
  padding: 1rem;
  color: color-mix(in srgb, var(--ink) 45%, transparent);
  font-family: var(--serif);
  font-size: 1.6rem;
  text-align: center;
}

.project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.1rem 1.25rem 1.25rem;
}

.project-body h3 {
  font-size: 1.08rem;
  font-weight: 700;
}

.project-body p {
  color: var(--muted);
  font-size: 0.95rem;
}

.project-body .check-list {
  margin-top: 0.4rem;
  font-size: 0.92rem;
}

.tag-line {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.card-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 0.75rem;
}

.card-foot .text-link {
  flex: none;
  white-space: nowrap;
}

/* Courses */

.course-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 1.4rem;
}

.course-card small {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
}

.course-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.35;
}

.course-card > p:not(.tag-line) {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Rows (research) */

.row-list {
  max-width: 820px;
  margin-inline: auto;
  border-top: 1px solid var(--line);
}

.row-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 0.35rem 2rem;
  border-bottom: 1px solid var(--line);
  padding-block: 1.15rem;
}

.row-item h3 {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.4;
}

.row-item p {
  color: var(--muted);
  font-size: 0.92rem;
}

.row-item .row-summary {
  grid-column: 1 / -1;
}

/* Books */

.book-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
}

.book {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.book-cover {
  margin-bottom: 0.5rem;
  border-radius: 8px;
  box-shadow: 0 10px 24px -14px rgb(0 0 0 / 0.45);
  aspect-ratio: 620 / 877;
  object-fit: cover;
}

.book h3 {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
}

.book small {
  color: var(--muted);
  font-size: 0.85rem;
}

.book .text-link {
  margin-top: 0.15rem;
  font-size: 0.9rem;
}

.book-list {
  display: grid;
  gap: 0;
  max-width: 920px;
  margin-inline: auto;
  border-top: 1px solid var(--line);
}

.book-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 2rem;
  border-bottom: 1px solid var(--line);
  padding-block: 2rem;
}

.book-row .book-cover {
  margin: 0;
}

.book-row small {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.book-row h3 {
  margin-top: 0.2rem;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.2;
}

.book-row .book-subtitle {
  margin-top: 0.35rem;
  font-family: var(--serif);
  font-size: 1.12rem;
  font-style: italic;
}

.book-row .book-description {
  margin-top: 0.75rem;
  color: var(--muted);
}

.book-row .tag-line {
  margin-top: 0.75rem;
}

.book-row .button {
  margin-top: 1.1rem;
}

/* Contact */

.contact-card {
  display: grid;
  max-width: 920px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  margin-inline: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 1.25rem;
}

.contact-side {
  display: grid;
  align-content: start;
  gap: 0.75rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field > span:not(.visually-hidden):not(.field-error),
.field legend {
  font-size: 0.92rem;
  font-weight: 700;
}

fieldset.field {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.field legend {
  margin-bottom: 0.5rem;
  padding: 0;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--surface);
  padding: 0.7rem 0.9rem;
  font-size: 1rem;
}

.field textarea {
  resize: vertical;
}

.field-message textarea {
  height: 100%;
  min-height: 220px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  background: var(--bg);
  outline: none;
}

.field-error {
  color: #b42318;
  font-size: 0.86rem;
  font-weight: 600;
}

.field-error:empty {
  display: none;
}

.form-status {
  font-size: 0.92rem;
  font-weight: 600;
}

.form-status:empty {
  display: none;
}

.form-status[data-tone="success"] {
  color: #12703f;
}

.form-status[data-tone="error"] {
  color: #b42318;
}

/* ---------- Inner pages ---------- */

.page-head {
  padding-block: clamp(48px, 8vw, 88px) clamp(32px, 5vw, 56px);
  text-align: center;
}

.page-head h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.page-head p {
  max-width: 56ch;
  margin: 1rem auto 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.page-head .button {
  margin-top: 0.5rem;
}

.prose-block {
  max-width: 720px;
}

.block-title {
  margin-bottom: 1rem;
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.2;
}

.prose {
  color: var(--muted);
  font-size: 1.05rem;
}

.prose p + p {
  margin-top: 1rem;
}

.tool-line {
  margin-top: 1.5rem;
  font-weight: 600;
}

.tool-line:empty {
  display: none;
}

/* Planner */

.planner-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: 32px;
}

.planner {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.planner-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 1.75rem;
}

.planner-progress li {
  border-top: 3px solid var(--line);
  padding-top: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.planner-progress li.is-active {
  border-color: var(--accent);
  color: var(--ink);
}

.planner-step {
  display: none;
}

.planner-step.is-active {
  display: block;
}

.planner-step h2 {
  margin-bottom: 1.25rem;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
}

.planner-step h2:focus {
  outline: none;
}

.planner-note {
  margin: -0.75rem 0 1.25rem;
  color: var(--muted);
}

.planner-fields,
.planner-fields > div {
  display: grid;
  gap: 1.25rem;
}

.field-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.choice {
  position: relative;
  display: block;
}

.choice input,
.pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-card {
  display: grid;
  height: 100%;
  gap: 0.25rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  cursor: pointer;
}

.choice-card strong {
  font-weight: 700;
}

.choice-card small {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.choice input:checked + .choice-card {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.choice input:focus-visible + .choice-card,
.pill input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill {
  position: relative;
}

.pill span {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

.pill input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.planner-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.75rem;
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}

.planner-nav [data-next],
.planner-nav [data-edit] {
  margin-left: auto;
}

.summary-list {
  border: 1px solid var(--line);
  border-radius: 12px;
}

.summary-list div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
}

.summary-list div:first-child {
  border-top: 0;
}

.summary-list dt {
  color: var(--muted);
}

.summary-list dd {
  font-weight: 600;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.send-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.send-actions + .form-status {
  margin-top: 0.75rem;
}

.planner-aside {
  position: sticky;
  top: 88px;
}

.aside-card {
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.4rem;
}

.aside-card h2 {
  font-size: 1.05rem;
  font-weight: 700;
}

.step-list {
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
  counter-reset: step;
}

.step-list li {
  position: relative;
  padding-left: 2.1rem;
  font-size: 0.92rem;
  counter-increment: step;
}

.step-list li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 1.5rem;
  height: 1.5rem;
  place-items: center;
  border-radius: 50%;
  background: var(--bg);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  content: counter(step);
}

.step-list strong {
  display: block;
}

.step-list span {
  color: var(--muted);
}

/* FAQ */

.faq-wrap {
  max-width: 820px;
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list details:first-child {
  border-top: 1px solid var(--line);
}

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.1rem;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  flex: none;
  color: var(--muted);
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1;
  content: "+";
}

.faq-list details[open] summary::after {
  content: "–";
}

.faq-list details p {
  padding-bottom: 1.1rem;
  color: var(--muted);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 56px 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.footer-brand p {
  max-width: 34ch;
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-col h2 {
  margin-bottom: 0.75rem;
  font-size: 0.92rem;
  font-weight: 700;
}

.footer-col a {
  display: block;
  padding-block: 0.22rem;
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.footer-col a:hover {
  color: var(--ink);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-top: 40px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .book-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .planner-layout {
    grid-template-columns: 1fr;
  }

  .planner-aside {
    position: static;
  }

  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .menu-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 64px;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    padding: 0.5rem 24px 1.25rem;
  }

  .nav-open .site-nav {
    display: flex;
  }

  .site-nav a:not(.button) {
    border-bottom: 1px solid var(--line);
    padding-block: 0.85rem;
    color: var(--ink);
    font-size: 1.05rem;
  }

  .site-nav .button {
    margin-top: 1rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-portrait {
    width: min(240px, 70%);
    justify-self: start;
    order: -1;
  }

  .contact-card {
    grid-template-columns: 1fr;
  }

  .field-message textarea {
    min-height: 160px;
  }

  .row-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .shell {
    width: calc(100% - 32px);
  }

  .site-nav {
    padding-inline: 16px;
  }

  .hero-actions .button {
    flex: 1 1 100%;
  }

  .stats-card {
    grid-template-columns: 1fr;
    padding: 0.5rem 0;
  }

  .stat {
    padding-block: 0.75rem;
  }

  .stat + .stat {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .book-row {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 1.1rem;
  }

  .book-row h3 {
    font-size: 1.3rem;
  }

  .choice-grid,
  .field-pair {
    grid-template-columns: 1fr;
  }

  .summary-list div {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }

  .send-actions .button,
  .planner-nav .button {
    flex: 1 1 auto;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* =====================================================================
   Signature details: hero chips, stack marquee, Build · Analyse · Teach
   tabs, bento work grid, course catalogue, testimonials, motion layer.
   ===================================================================== */

/* Hero chips */
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.4rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  padding: 0.3rem 0.8rem;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.chip-status {
  color: var(--ink);
}

.pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1f9d5f;
}

.pulse::after {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #1f9d5f;
  content: "";
}

.arrow {
  display: inline-block;
  transition: transform 200ms ease;
}

a:hover > .arrow,
button:hover > .arrow {
  transform: translateX(3px);
}

/* Stack marquee */
.stack {
  display: grid;
  gap: 0.6rem;
  overflow: hidden;
  border-top: 1px solid var(--line);
  padding-block: 1.25rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee {
  display: flex;
  width: max-content;
  gap: 0.6rem;
}

.marquee-track {
  display: flex;
  flex: none;
  gap: 0.6rem;
}

.tool {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  padding: 0.4rem 0.9rem 0.4rem 0.55rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 200ms ease, border-color 200ms ease;
}

.tool img,
.tool .tool-badge {
  width: 20px;
  height: 20px;
  flex: none;
  filter: grayscale(1);
  opacity: 0.7;
  transition: filter 200ms ease, opacity 200ms ease;
}

.tool:hover {
  border-color: #d5d4ce;
  color: var(--ink);
}

.tool:hover img,
.tool:hover .tool-badge {
  filter: none;
  opacity: 1;
}

.tool-badge {
  display: inline-grid;
  place-items: center;
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Build · Analyse · Teach */
.modes {
  max-width: 1000px;
  margin-inline: auto;
}

.mode-tabs {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 6px;
  border-radius: 18px;
  background: var(--surface);
  padding: 6px;
}

.mode-tab {
  display: grid;
  gap: 0.1rem;
  justify-items: center;
  border: 0;
  border-radius: 13px;
  background: transparent;
  padding: 0.75rem 0.5rem;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
}

.mode-tab:hover {
  color: var(--ink);
}

.mode-tab.is-active {
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 6px 16px -10px rgb(0 0 0 / 0.25);
}

.mode-verb {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.15;
}

.mode-tab.is-active .mode-verb {
  color: var(--accent);
}

.mode-name {
  font-size: 0.82rem;
  font-weight: 600;
}

.mode-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
}

.mode-main h3 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.mode-main > p {
  margin-top: 0.75rem;
  color: var(--muted);
}

.mode-main .check-list {
  margin-top: 1.25rem;
}

.mode-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 1.75rem;
}

.mode-proof {
  border-radius: 14px;
  background: var(--surface);
  padding: 1.25rem;
}

.proof-label {
  margin-bottom: 0.6rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.proof-label:not(:first-child) {
  margin-top: 1.4rem;
}

.proof-list {
  display: grid;
  gap: 0.2rem;
}

.proof-list a {
  display: grid;
  gap: 0.05rem;
  border-radius: 10px;
  margin-inline: -0.6rem;
  padding: 0.5rem 0.6rem;
  text-decoration: none;
  transition: background-color 180ms ease;
}

.proof-list a:hover {
  background: var(--bg);
}

.proof-list strong {
  font-size: 0.95rem;
}

.proof-list span {
  color: var(--muted);
  font-size: 0.85rem;
}

.proof-more {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.9rem;
}

.tool-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tool-chips li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  background: var(--bg);
  padding: 0.3rem 0.7rem 0.3rem 0.4rem;
  font-size: 0.84rem;
  font-weight: 600;
}

.tool-chips img,
.tool-chips .tool-badge {
  width: 16px;
  height: 16px;
}

/* Bento work grid */
.bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.bento .project-card.is-wide {
  grid-column: span 2;
  flex-direction: row;
}

.bento .is-wide .project-media {
  flex: 1.35;
  aspect-ratio: auto;
  min-height: 100%;
  border-right: 1px solid var(--line);
  border-bottom: 0;
}

.bento .is-wide .project-body {
  flex: 1;
  justify-content: center;
  padding: 1.75rem;
}

.bento .is-wide .project-media img {
  object-position: left top;
}

.bento .is-wide h3 {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 500;
}

.kicker {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.project-card,
.course-card,
.service-card,
.quote {
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 260ms ease, border-color 260ms ease;
}

.project-card:hover,
.course-card:hover {
  border-color: color-mix(in srgb, var(--accent) 25%, var(--line));
  box-shadow: 0 18px 40px -26px rgb(0 0 0 / 0.35);
  transform: translateY(-4px);
}

.project-media img {
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.project-card:hover .project-media img {
  transform: scale(1.035);
}

.book-cover {
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 300ms ease;
}

.book:hover .book-cover {
  box-shadow: 0 22px 34px -18px rgb(0 0 0 / 0.5);
  transform: translateY(-6px) rotate(-1deg);
}

/* Course catalogue (homepage) */
/* Balanced columns, so short and long groups pack together. */
.catalogue {
  columns: 3 280px;
  column-gap: 20px;
}

.catalogue-group {
  margin-bottom: 20px;
  break-inside: avoid;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
}

.catalogue-group h3 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.catalogue-group h3 img,
.catalogue-group h3 .tool-badge {
  width: 22px;
  height: 22px;
}

.catalogue-group h3 small {
  margin-left: auto;
  border-radius: 999px;
  background: var(--surface);
  padding: 0.05rem 0.55rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.catalogue-group li {
  display: grid;
  border-top: 1px solid var(--line);
  padding-block: 0.6rem;
}

.catalogue-group li a {
  font-weight: 600;
  text-decoration: none;
}

.catalogue-group li a:hover {
  color: var(--accent);
}

.catalogue-group li small {
  color: var(--muted);
  font-size: 0.84rem;
}

/* Course cards */
.course-top {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
}

.course-top img,
.course-top .tool-badge {
  width: 18px;
  height: 18px;
}

.course-top small {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  padding: 0.45rem 0.95rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.filter-chip img,
.filter-chip .tool-badge {
  width: 16px;
  height: 16px;
}

.filter-chip .count {
  color: var(--muted);
}

.filter-chip[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.filter-chip[aria-pressed="true"] .count {
  color: inherit;
  opacity: 0.7;
}

.cta-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.5rem;
  margin-top: 3rem;
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.5rem;
  text-align: center;
}

.cta-strip p {
  font-weight: 600;
}

/* Testimonials */
.quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.quote {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.quote blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.5;
}

.quote figcaption {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.quote figcaption img,
.quote-initials {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
}

.quote-initials {
  display: grid;
  place-items: center;
  background: var(--surface);
  font-weight: 700;
}

.quote figcaption small {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- Motion (only when the visitor allows it) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *,
  .hero-portrait {
    animation: rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .hero-copy > :nth-child(2) { animation-delay: 70ms; }
  .hero-copy > :nth-child(3) { animation-delay: 140ms; }
  .hero-copy > :nth-child(4) { animation-delay: 210ms; }
  .hero-copy > :nth-child(5) { animation-delay: 280ms; }

  .hero-portrait {
    animation-name: settle;
    animation-delay: 160ms;
  }

  .pulse::after {
    animation: ping 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
  }

  .marquee {
    animation: scroll-left var(--duration, 60s) linear infinite;
  }

  .marquee-reverse {
    animation-direction: reverse;
  }

  .stack:hover .marquee {
    animation-play-state: paused;
  }

  .motion.content-ready [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1), transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .motion.content-ready [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }

  /* Once revealed, cards go back to a quick hover lift. */
  .motion.content-ready .project-card.is-visible,
  .motion.content-ready .course-card.is-visible {
    transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1), transform 260ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 260ms ease, border-color 260ms ease;
    transition-delay: 0ms !important;
  }

  .mode-panel.is-active {
    animation: fade-in 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .course-card.is-filtered-in {
    animation: fade-in 360ms ease both;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee {
    width: auto;
    flex-wrap: wrap;
    justify-content: center;
  }

  .marquee-track {
    flex-wrap: wrap;
    justify-content: center;
  }

  .marquee-track[aria-hidden="true"] {
    display: none;
  }

  .stack {
    -webkit-mask-image: none;
    mask-image: none;
    padding-inline: 16px;
  }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes settle {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: none; }
}

@keyframes ping {
  75%, 100% { opacity: 0; transform: scale(2.4); }
}

@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 0.3rem)); }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Responsive for the new pieces ---------- */

@media (max-width: 960px) {
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 760px) {
  .mode-panel {
    grid-template-columns: 1fr;
  }

  .mode-verb {
    font-size: 1.2rem;
  }

  .mode-name {
    font-size: 0.72rem;
    text-align: center;
  }

  .bento {
    grid-template-columns: 1fr;
  }

  .bento .project-card.is-wide {
    grid-column: auto;
    flex-direction: column;
  }

  .bento .is-wide .project-media {
    aspect-ratio: 16 / 10;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .bento .is-wide .project-body {
    padding: 1.1rem 1.25rem 1.25rem;
  }

  .bento .is-wide h3 {
    font-family: var(--sans);
    font-size: 1.08rem;
    font-weight: 700;
  }

}
