/* Sketch theme: shared look of all pages in the style of the tldraw drawings */

:root {
  --paper: #fbfaf6;
  --paper-bright: #fffefb;
  --ink: #1d1d1d;
  --ink-soft: #3a3a37;
  --muted: #5e5e59;
  --faint: #8a8a83;
  --white: #fffefb;
  --line: #d9d6cb;
  --line-dark: #3d3d3a;
  --dark-muted: #bdbbb2;
  --shadow: rgba(29, 29, 29, 0.14);

  /* Accent: dark orange stays readable on light backgrounds, even in small text */
  --blue: #b84e0b;
  --blue-bright: #e16919;
  --sk-orange: #e16919;
  --sk-yellow: #f1ac4b;

  --board: #fbfaf6;
  --board-dot: #dcdad0;
  --board-warm: #f5efe2;
  --board-warm-dot: #e1d9c6;
  --header-bg: rgba(251, 250, 246, 0.9);

  --wobble: 255px 18px 225px 18px / 18px 225px 18px 255px;
  --wobble-soft: 16px 220px 14px 200px / 200px 14px 220px 16px;
  --wobble-round: 58% 42% 55% 45% / 45% 58% 42% 55%;
  --tile: var(--blue);

  /* Type scale: every heading uses one of these sizes */
  --title-page: clamp(40px, 5vw, 72px);
  --title-section: clamp(28px, 3.2vw, 46px);
  --title-closing: clamp(36px, 4.45vw, 64px);
  --title-sub: clamp(22px, 1.95vw, 28px);
  --title-hand: clamp(20px, 1.55vw, 22px);
}

body {
  background-color: var(--board);
  background-image: radial-gradient(circle, var(--board-dot) 1.1px, transparent 1.3px);
  background-size: 26px 26px;
}

.section--bright,
.page-hero {
  background: transparent;
}

/* Typography */
.section-label,
.hero-kicker {
  color: var(--blue);
  font-family: var(--font-sketch);
  font-size: 19px;
  letter-spacing: 0;
}

.section-label::before,
.hero-kicker::before {
  display: none;
}

.section--ink .section-label,
.statement .section-label {
  color: var(--sk-yellow);
}

.page-title {
  line-height: 1.06;
  max-width: 14ch;
}

.page-title span {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 20' preserveAspectRatio='none'%3E%3Cpath d='M3 13C50 6 96 16 150 10S250 5 297 12' fill='none' stroke='%23f1ac4b' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 0 100% / 100% 0.16em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  color: var(--sk-orange);
  font-family: var(--font-sketch);
  font-weight: 400;
  letter-spacing: -0.02em;
  padding-bottom: 0.06em;
}

.big-cta h2 {
  line-height: 1.06;
  max-width: 15ch;
}

/* Buttons */
.button {
  background: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--wobble);
  clip-path: none;
  color: var(--white);
  font-family: var(--font-sketch);
  font-size: 18px;
  font-weight: 400;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.2s ease;
}

.button:hover,
.button:focus-visible {
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: 4px 4px 0 var(--sk-orange);
  transform: translate(-2px, -2px) rotate(-0.4deg);
}

.button:active {
  box-shadow: none;
  transform: none;
}

.button--ghost {
  background: var(--paper-bright);
  color: var(--ink);
}

.button--ghost:hover,
.button--ghost:focus-visible {
  background: var(--paper-bright);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
}

.button--lime,
.button--lime:hover,
.button--lime:focus-visible {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.big-cta .button:hover,
.big-cta .button:focus-visible {
  box-shadow: 4px 4px 0 var(--paper-bright);
}

.button--small {
  font-size: 16px;
}

.button[disabled] {
  background: var(--line);
  border-color: var(--line);
  box-shadow: none;
  color: var(--muted);
}

.nav-mobile summary {
  border-radius: var(--wobble);
  border-width: 2px;
  font-family: var(--font-sketch);
}

/* Large areas */
.big-cta {
  background: var(--sk-yellow);
  color: var(--ink);
}

.big-cta::after {
  display: none;
}

.big-cta .section-label {
  color: var(--ink);
}

.about-manifesto {
  background: var(--ink);
}

.about-manifesto blockquote {
  color: var(--sk-yellow);
  font-family: var(--font-sketch);
  font-weight: 400;
  letter-spacing: -0.02em;
}

/* Testimonials on a light whiteboard */
.references {
  background-color: var(--board-warm);
  background-image: radial-gradient(circle, var(--board-warm-dot) 1.1px, transparent 1.3px);
  background-size: 26px 26px;
  color: var(--ink);
}

.references .section-label {
  color: var(--blue);
}

.references .section-topline {
  align-items: flex-start;
  gap: 20px;
}

.references-title {
  line-height: 1.1;
  max-width: 22ch;
}

.quote-controls {
  flex-shrink: 0;
}

.references :focus-visible {
  outline-color: var(--blue-bright);
}

.quote-count {
  color: var(--muted);
  font-family: var(--font-sketch);
  font-size: 15px;
}

.icon-button {
  border: 2px solid var(--ink);
  border-radius: var(--wobble-round);
  color: var(--ink);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.2s ease;
}

.icon-button:hover {
  background: var(--paper-bright);
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
  transform: translate(-1px, -1px);
}

.icon-button:active {
  background: var(--sk-yellow);
  box-shadow: none;
  color: var(--ink);
  transform: none;
}

/* Keeps the next slide's photo ring from peeking in at the clip edge */
.quote-person {
  padding-left: 3px;
}

.quote-person img {
  border: 3px solid var(--sk-orange);
  border-radius: var(--wobble-round);
  filter: none;
}

.quote-mark {
  color: var(--sk-orange);
  font-size: 1.25em;
  line-height: 0;
}

.quote-person figcaption,
.quote-context {
  color: var(--muted);
}

.quote-person strong {
  color: var(--ink);
}

.quote-body {
  border-top: 2px dashed var(--line);
}

.quote-body blockquote {
  font-family: var(--font-sketch);
  font-weight: 400;
  letter-spacing: -0.015em;
}

/* Home: text first, then the portrait */
.home-about-grid .about-image {
  justify-self: center;
  max-width: 475px;
  order: 2;
  width: 82%;
}

@media (min-width: 961px) {
  .home-about-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }
}

/* Portraits */
.portrait-circle::before,
.about-hero-photo::after {
  border-color: var(--line);
}

.portrait-circle::after,
.about-hero-photo::before {
  border: 3px solid var(--sk-orange);
  border-radius: var(--wobble-round);
}

.about-hero-photo figcaption {
  border: 2px solid var(--ink);
  border-radius: var(--wobble);
}

.about-hero-photo figcaption strong {
  font-family: var(--font-sketch);
  font-weight: 400;
}

.about-values li::before {
  content: '✓';
  font-family: var(--font-sketch);
  font-size: 18px;
  font-weight: 400;
}

.principle-number,
.method-step__number {
  font-family: var(--font-sketch);
  font-size: 20px;
  font-weight: 400;
}

/* Services: topic tiles */
.page-hero-aside {
  border-top: 0;
  padding-top: 0;
}

.page-index {
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.page-index a {
  background: var(--paper-bright);
  border: 2px solid currentColor;
  border-radius: var(--wobble);
  color: var(--tile);
  font-family: var(--font-sketch);
  font-size: 18px;
  line-height: 1.2;
  padding: 11px 15px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.page-index a:hover,
.page-index a:focus-visible {
  box-shadow: 4px 4px 0 currentColor;
  color: var(--tile);
  transform: translate(-2px, -2px) rotate(-0.5deg);
}

.page-index a span {
  font-size: 15px;
  margin-left: 8px;
  opacity: 0.75;
}

/* Contact page: direct contact prominent, single-column form */
.page-hero-aside:has(a[href^="tel:"]) > p {
  color: var(--ink);
  font-family: var(--font-sketch);
  font-size: clamp(24px, 2.2vw, 30px);
  margin-bottom: 14px;
}

.sk-perdu {
  color: var(--blue);
  display: inline-block;
  margin-left: 8px;
  transform: rotate(-2deg);
  white-space: nowrap;
}

.page-index:has(a[href^="tel:"]) a {
  font-size: 22px;
  padding: 15px 20px;
}

.contact-layout {
  grid-template-columns: minmax(0, 1fr);
}

.contact-form {
  max-width: 820px;
}

/* Contact page: phone and e-mail need the full width */
.page-index:has(a[href^="tel:"]) {
  grid-template-columns: minmax(0, 1fr);
}

.page-index:has(a[href^="tel:"]) a span {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  opacity: 1;
  white-space: nowrap;
}

.page-index a:nth-child(7n + 1),
.chapter:nth-of-type(7n + 1),
.chapter-nav a:nth-child(7n + 1) { --tile: #2672bd; }
.page-index a:nth-child(7n + 2),
.chapter:nth-of-type(7n + 2),
.chapter-nav a:nth-child(7n + 2) { --tile: #b84e0b; }
.page-index a:nth-child(7n + 3),
.chapter:nth-of-type(7n + 3),
.chapter-nav a:nth-child(7n + 3) { --tile: #2a7d43; }
.page-index a:nth-child(7n + 4),
.chapter:nth-of-type(7n + 4),
.chapter-nav a:nth-child(7n + 4) { --tile: #9c35b5; }
.page-index a:nth-child(7n + 5),
.chapter:nth-of-type(7n + 5),
.chapter-nav a:nth-child(7n + 5) { --tile: #c92a2a; }
.page-index a:nth-child(7n + 6),
.chapter:nth-of-type(7n + 6),
.chapter-nav a:nth-child(7n + 6) { --tile: #4465e9; }
.page-index a:nth-child(7n + 7),
.chapter:nth-of-type(7n + 7),
.chapter-nav a:nth-child(7n + 7) { --tile: #0f7f8a; }

.page-index a:nth-child(8),
.chapter:nth-of-type(8),
.chapter-nav a:nth-child(8) { --tile: #a8590a; }

/* Services: topic bar */
.chapter-nav-wrap {
  border-bottom: 2px dashed var(--line);
  border-top: 0;
}

.chapter-nav {
  gap: 8px;
  padding-block: 10px;
}

.chapter-nav a,
.chapter-nav a:first-child {
  border: 2px solid var(--tile);
  border-radius: var(--wobble);
  color: var(--tile);
  font-family: var(--font-sketch);
  font-size: 16px;
  line-height: 1.2;
  padding: 7px 15px;
}

.chapter-nav a:hover,
.chapter-nav a[aria-current='location'] {
  background: var(--tile);
  color: var(--white);
}

/* Services: chapters */
.chapter {
  scroll-margin-top: 12px;
}

.chapter-number {
  color: var(--tile);
  font-family: var(--font-sketch);
  font-size: 18px;
  font-weight: 400;
  white-space: nowrap;
}

.chapter-icon {
  color: var(--tile);
  filter: url(#sk-rough);
}

.chapter-icon .accent {
  color: var(--tile);
  fill: var(--tile);
  stroke: var(--tile);
}

.chapter-icon .line {
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.chapter-icon .soft {
  opacity: 0.45;
  stroke-width: 1.6;
}

.detail-block,
.detail-block--solution {
  background: var(--paper-bright);
  border: 2px solid var(--line);
  border-radius: var(--wobble-soft);
  padding: 22px 24px;
}

.detail-block--solution {
  border-color: var(--tile);
}

.detail-block h3 {
  font-family: var(--font-sketch);
  font-size: var(--title-hand);
  font-weight: 400;
}

.detail-block--solution h3 {
  color: var(--tile);
}

.detail-block--solution li::before {
  background: none;
  color: var(--tile);
  content: '✓';
  font-family: var(--font-sketch);
  font-size: 17px;
  height: auto;
  line-height: 1.3;
  margin-top: 0;
  width: auto;
}

.tag {
  background: var(--paper-bright);
  border: 2px solid var(--line);
  border-radius: var(--wobble);
  font-family: var(--font-sketch);
  font-size: 15px;
  padding: 4px 13px;
}

.training-notes div {
  background: var(--paper-bright);
  border: 2px solid var(--tile);
  border-radius: var(--wobble-soft);
  padding: 14px 16px;
}

.training-notes strong {
  color: var(--tile);
  font-family: var(--font-sketch);
  font-size: 18px;
  font-weight: 400;
}

/* Form */
.field label {
  font-family: var(--font-sketch);
  font-size: 17px;
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  border: 2px solid var(--ink);
  border-radius: var(--wobble-soft);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--sk-orange);
  box-shadow: 3px 3px 0 var(--sk-yellow);
}

.cf-turnstile {
  margin-top: 8px;
  min-height: 65px;
}

.button[disabled] {
  cursor: not-allowed;
}

.form-status[data-state='blocked'],
.form-status[data-state='error'] {
  color: var(--error);
  font-size: 14px;
}

.form-status[data-state='success'] {
  color: var(--success);
  font-size: 14px;
}

.direct-note {
  border-radius: var(--wobble-soft);
  transform: rotate(-0.6deg);
}

/* Legal */
.legal-box {
  border: 2px solid var(--ink);
  border-radius: var(--wobble-soft);
}

.prose h2 {
  font-family: var(--font-sketch);
  font-size: var(--title-hand);
  font-weight: 400;
  letter-spacing: 0;
}

.prose li {
  list-style: disc;
}

@media (max-width: 1100px) {
  .page-index:not(:has(a[href^="tel:"])) a span {
    display: none;
  }
}

@media (max-width: 680px) and (max-height: 700px) {
  .quote-context {
    display: none;
  }
}

@media (max-width: 680px) {
  /* One testimonial per screen */
  .references {
    padding-block: 36px;
  }

  .references .section-topline {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
  }

  .references-title {
    max-width: none;
  }

  .icon-button {
    height: 40px;
    width: 40px;
  }

  .quote-count {
    margin-right: 8px;
  }

  .quote-slide {
    gap: 14px;
  }

  .quote-person {
    align-items: center;
    display: flex;
    gap: 14px;
  }

  .quote-person img {
    height: 64px;
    width: 64px;
  }

  .quote-body {
    border-top: 0;
    gap: 12px;
    padding-top: 0;
  }

  .quote-body blockquote {
    font-size: clamp(19px, 5.4vw, 22px);
    line-height: 1.3;
    max-width: none;
  }

  .quote-context {
    font-size: 14px;
    line-height: 1.5;
  }

  .quote-slide,
  .quote-body {
    align-content: start;
  }

  .page-index a {
    font-size: 15px;
    padding: 9px 11px;
  }

  .page-index:not(:has(a[href^="tel:"])) a span {
    display: none;
  }

  .page-index:has(a[href^="tel:"]) a {
    align-items: flex-start;
    flex-direction: column;
    font-size: 20px;
    gap: 2px;
    padding: 12px 18px;
  }

  .page-index:has(a[href^="tel:"]) a span {
    font-size: 15px;
    margin-left: 0;
  }
}

/* Type scale assignments, kept last so they win over older page rules */
.page-title,
.legal-hero h1,
.sk-h1 {
  font-size: var(--title-page);
}

.section-heading,
.method-title,
.chapter-heading,
.about-copy h2,
.bio-aside h2,
.references-title,
.sk-h2 {
  font-size: var(--title-section);
}

.big-cta h2 {
  font-size: var(--title-closing);
}

.page-title,
.legal-hero h1,
.sk-h1,
.section-heading,
.method-title,
.chapter-heading,
.about-copy h2,
.bio-aside h2,
.references-title,
.sk-h2,
.big-cta h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.principle h3,
.method-step h3 {
  font-family: var(--font-display);
  font-size: var(--title-sub);
  font-weight: 700;
  letter-spacing: -0.025em;
}
