/* Method page. Tokens and shared pieces live in site.css. */

#company-brain, #training, #safety, #ninety-days, #tools { scroll-margin-top: 88px; }
.mt-penline { opacity: 0.4; }

/* ---------- hero: heading and lede beside the intro drawing ---------- */
.mt-hero__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; column-gap: clamp(24px, 4vw, 64px); }
.mt-hero__text { display: grid; gap: var(--s-5); justify-items: start; }
.mt-hero__art { width: 100%; max-width: 640px; justify-self: end; }
@media (max-width: 899px) {
  .mt-hero__grid { grid-template-columns: minmax(0, 1fr); }
  .mt-hero__art { justify-self: center; max-width: 560px; }
}

/* ---------- the 90 days: a ruled vertical sequence on one ink rail (no pinning) ---------- */
.mt-seq { position: relative; --mark: clamp(56px, 8vw, 112px); }
.mt-seq::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--mark) / 2); width: 1px;
  background: var(--warm-gray);
}
.mt-step {
  position: relative;
  display: grid; grid-template-columns: var(--mark) minmax(0, 4fr) minmax(0, 7fr); column-gap: clamp(20px, 2.4vw, 32px);
  padding-block: clamp(28px, 3.5vw, 48px);
}
.mt-step + .mt-step::after {
  content: ""; position: absolute; top: 0; right: 0; left: calc(var(--mark) + clamp(20px, 2.4vw, 32px));
  height: 1px; background: var(--warm-gray);
}
.mt-step__num {
  justify-self: center; align-self: start;
  padding-block: 4px; background: var(--ivory);
  font-family: var(--font-display); font-weight: 500; font-size: clamp(3rem, 6vw, 5rem); line-height: 0.9;
  color: var(--bronze); font-variant-numeric: lining-nums;
}
.mt-step__days { font-size: var(--t-eyebrow); font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--bronze-text); }
.mt-step__title { margin-top: var(--s-2); font-family: var(--font-display); font-weight: 500; font-size: clamp(2rem, 3.4vw, 2.75rem); line-height: 1.05; letter-spacing: -0.01em; }
.mt-step__lines { border-top: var(--rule); }
.mt-step__lines li { padding-block: var(--s-3); border-bottom: var(--rule); color: var(--ink-soft); }
.mt-after {
  display: grid; grid-template-columns: var(--mark, clamp(56px, 8vw, 112px)) minmax(0, 1fr); column-gap: clamp(20px, 2.4vw, 32px);
  --mark: clamp(56px, 8vw, 112px);
  padding-top: clamp(28px, 3.5vw, 48px); border-top: 1px solid var(--ink);
}
.mt-after__mark { justify-self: center; color: var(--bronze); padding-top: 2px; }
.mt-after__mark .ornament { width: 48px; height: 12px; }
.mt-after__text { margin-top: var(--s-3); font-family: var(--font-display); font-weight: 500; font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.25; max-width: 30em; text-wrap: pretty; }
@media (max-width: 767px) {
  .mt-step { grid-template-columns: var(--mark) minmax(0, 1fr); row-gap: var(--s-4); }
  .mt-step__lines { grid-column: 2; }
}

/* ---------- infrastructure: copy beside its drawing, then the wide strings drawing with the tool marks set inside its circles ---------- */
.mt-tools__intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; column-gap: clamp(24px, 4vw, 64px); }
.mt-tools__intro .section__head { margin-bottom: 0; }
.mt-tools__infra { width: 100%; max-width: 600px; justify-self: end; }
@media (max-width: 899px) {
  .mt-tools__intro { grid-template-columns: minmax(0, 1fr); row-gap: var(--s-6); }
  .mt-tools__infra { justify-self: center; max-width: 520px; }
}
.mt-tools__row { margin-top: clamp(32px, 4vw, 56px); }
.mt-tools__figure { margin: clamp(32px, 5vw, 64px) auto -4%; max-width: 1120px; }   /* the drawing's paper runs empty below the circles */
/* phones: let the drawing run to the screen edges and trim its empty paper at the sides, so circles and marks stay legible */
@media (max-width: 599px) {
  .mt-tools__figure { margin-inline: calc(-1 * var(--gutter)); overflow: hidden; }
  .mt-tools__art { width: 120%; margin-left: -10%; }
}
/* the wrapper keeps the drawing's 16:9 ratio, so the marks (placed in % of it) stay inside their circles at every width */
.mt-tools__art { position: relative; aspect-ratio: 1280 / 720; }
.mt-tools__art img { display: block; width: 100%; height: auto; }
.mt-marks { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
/* circle centres and inner diameters measured on the 1280x720 source (left %, top %, diameter as % of width) */
.mt-mark { position: absolute; left: var(--x); top: var(--y); width: calc(var(--d) * 0.5); aspect-ratio: 1; transform: translate(-50%, -50%); }
.mt-mark img { width: 100%; height: 100%; }
.mt-mark--1 { --x: 16.99%; --y: 56.88%; --d: 8.67%; }
.mt-mark--2 { --x: 29.96%; --y: 74.44%; --d: 8.52%; }
.mt-mark--3 { --x: 45.27%; --y: 82.01%; --d: 8.83%; }
.mt-mark--4 { --x: 62.07%; --y: 81.46%; --d: 8.52%; }
.mt-mark--5 { --x: 74.10%; --y: 72.85%; --d: 8.52%; }
.mt-mark--6 { --x: 85.12%; --y: 58.26%; --d: 8.36%; }
.mt-mark--7 { --x: 77.97%; --y: 37.92%; --d: 8.30%; }
.mt-mark--8 { --x: 65.00%; --y: 27.08%; --d: 8.30%; }

/* ---------- company brain: text beside one ink diagram ---------- */
.mt-brain__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(20px, 2.4vw, 32px); align-items: center; }
.mt-brain__grid > .chapter { grid-column: 1 / -1; }
.mt-brain__text { grid-column: 1 / span 6; display: grid; gap: var(--s-4); }
.mt-brain__text > p:not(.eyebrow):not(.lead) { color: var(--ink-soft); max-width: 34em; }
.mt-brain__figure { grid-column: 8 / -1; margin: 0; }
.mt-diagram { width: 100%; height: auto; overflow: visible; }
.mt-diagram .bd-ink, .mt-diagram .bd-ink * { fill: none; stroke: var(--ink); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.mt-diagram .bd-flow path { fill: none; stroke: var(--bronze); stroke-width: 1.4; stroke-linecap: round; }
.mt-diagram .bd-label { fill: var(--ink); font-family: var(--font-body); font-size: 21px; font-weight: 500; }
.mt-diagram .bd-name { font-family: var(--font-display); font-size: 34px; font-weight: 600; }
.mt-diagram .bd-sub { fill: var(--gray-text); font-size: 21px; font-weight: 400; font-style: italic; }
@media (max-width: 899px) {
  .mt-brain__text, .mt-brain__figure { grid-column: 1 / -1; }
  .mt-brain__figure { margin-top: var(--s-7); max-width: 520px; }
}
/* phones: the drawing shrinks to about 0.57x, so its labels are set larger in drawing units to stay at 14px or more on screen */
@media (max-width: 599px) {
  .mt-brain__figure { margin-inline: auto; }
  .mt-diagram .bd-label { font-size: 26px; }
  .mt-diagram .bd-name { font-size: 38px; }
  .mt-diagram .bd-sub { font-size: 26px; }
}

/* ---------- more than a knowledge base / why agents need one: two accordions (shared .acc in site.css) ---------- */
.mt-why { grid-column: 1 / span 8; margin-top: clamp(56px, 7vw, 96px); }
.mt-why__intro { color: var(--ink-soft); max-width: 36em; text-wrap: pretty; }
.mt-why__list { border-top: 1px solid color-mix(in srgb, var(--gray-text) 60%, transparent); }
.mt-why__list li { padding-block: var(--s-3); border-bottom: 1px solid color-mix(in srgb, var(--gray-text) 35%, transparent); color: var(--ink-soft); text-wrap: pretty; }
.mt-why__list li:last-child { border-bottom: 0; }
.mt-why__list strong { font-weight: 600; color: var(--ink); }
@media (max-width: 1099px) { .mt-why { grid-column: 1 / -1; } }

/* ---------- training: heading beside its drawing, then three skills in one ruled list (number, name, how) ---------- */
.mt-train__intro { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: center; column-gap: clamp(24px, 4vw, 64px); }
.mt-train__art { width: 100%; max-width: 500px; justify-self: end; }
@media (max-width: 899px) {
  .mt-train__intro { grid-template-columns: minmax(0, 1fr); }
  .mt-train__art { justify-self: center; max-width: 440px; margin-bottom: var(--s-6); }
}
.mt-skills { border-top: 1px solid var(--ink); }
.mt-skill {
  display: grid; grid-template-columns: 3rem minmax(0, 4fr) minmax(0, 7fr); column-gap: clamp(20px, 2.4vw, 32px); align-items: baseline;
  padding-block: var(--s-6); border-bottom: 1px solid color-mix(in srgb, var(--gray-text) 60%, transparent);
}
.mt-skill__num { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 2rem; line-height: 1; color: var(--bronze); }
.mt-skill__name { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 2.2vw, 1.875rem); line-height: 1.2; }
.mt-skill p { color: var(--ink-soft); max-width: 34em; text-wrap: pretty; }
@media (max-width: 767px) {
  .mt-skill { grid-template-columns: 2.5rem minmax(0, 1fr); row-gap: var(--s-2); }
  .mt-skill p { grid-column: 2; }
}

/* ---------- how we work: a short, light four-line list ---------- */
.mt-safe__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: clamp(24px, 4vw, 64px); align-items: start; }
.mt-safe__grid > .chapter { grid-column: 1 / -1; }
.mt-rules { border-top: 1px solid var(--ink); }
.mt-rules li { padding-block: var(--s-4); border-bottom: 1px solid color-mix(in srgb, var(--gray-text) 60%, transparent); color: var(--ink-soft); text-wrap: pretty; }
.mt-rules strong { font-weight: 600; color: var(--ink); }
@media (max-width: 767px) {
  .mt-safe__grid { grid-template-columns: minmax(0, 1fr); row-gap: var(--s-5); }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* the company brain builds node by node: three sources, their lines in, the library, lines out, then the readers */
  .js .mt-brain__figure .bd-node { opacity: 0; transform: translateY(8px); transition: opacity 520ms var(--ease-out), transform 520ms var(--ease-out); }
  .js .mt-brain__figure .bd-draw { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 900ms var(--ease-out); }
  .js .mt-brain__figure.is-in .bd-node { opacity: 1; transform: none; }
  .js .mt-brain__figure.is-in .bd-draw { stroke-dashoffset: 0; }
  .js .mt-brain__figure.is-in .bd-node--1 { transition-delay: 150ms; }
  .js .mt-brain__figure.is-in .bd-node--2 { transition-delay: 330ms; }
  .js .mt-brain__figure.is-in .bd-node--3 { transition-delay: 510ms; }
  .js .mt-brain__figure.is-in .bd-flow--in .bd-draw { transition-delay: 720ms; }
  .js .mt-brain__figure.is-in .bd-flow--in .bd-draw:nth-child(2) { transition-delay: 820ms; }
  .js .mt-brain__figure.is-in .bd-flow--in .bd-draw:nth-child(3) { transition-delay: 920ms; }
  .js .mt-brain__figure.is-in .bd-node--4 { transition-delay: 1450ms; }
  .js .mt-brain__figure.is-in .bd-flow--out .bd-draw { transition-delay: 1900ms; }
  .js .mt-brain__figure.is-in .bd-node--5 { transition-delay: 2550ms; }
  .js .mt-brain__figure.is-in .bd-node--6 { transition-delay: 2700ms; }

  /* the tool marks bob 2 to 3px, slowly and out of phase, like things held on strings */
  .mt-mark img { animation: mt-bob 5.6s ease-in-out infinite; animation-delay: calc(var(--phase, 0) * -0.7s); }
  .mt-mark--2 { --phase: 3; } .mt-mark--3 { --phase: 6; } .mt-mark--4 { --phase: 1; }
  .mt-mark--5 { --phase: 4; } .mt-mark--6 { --phase: 7; } .mt-mark--7 { --phase: 2; } .mt-mark--8 { --phase: 5; }
  @keyframes mt-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }

}

/* ---------- Phase G: the Curator explainer, between the two company-brain accordions ---------- */
.mt-curator { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); column-gap: clamp(32px, 5vw, 80px); row-gap: var(--s-6); align-items: center; padding-block: clamp(32px, 4vw, 56px); border-top: var(--rule); }
.mt-curator__text { display: grid; gap: var(--s-4); }
.mt-curator__title { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.625rem, 2.6vw, 2.25rem); line-height: 1.15; text-wrap: balance; }
.mt-curator__text p { font-size: var(--t-lead); line-height: 1.6; color: var(--ink-soft); max-width: 36em; text-wrap: pretty; }
.mt-curator__art { max-width: 400px; width: 100%; justify-self: end; }
@media (max-width: 899px) { .mt-curator { grid-template-columns: 1fr; } .mt-curator__art { justify-self: start; } }
