/* ==========================================================================
   How We Work: the original layout is kept (user's call, 15 Oct 2026). This file only fixes type and buttons.
   - DM Sans everywhere, with smaller, shorter headings (they were too tall)
   - FAQ heading sits above the questions, not beside them
   - solid violet buttons, no outline buttons, readable closing button (WEB-DESIGN-PRINCIPLES-REVIEW.md)
   Loads last on how-we-work.html only.
   ========================================================================== */
:root { --serif: var(--sans); }
body { font-family: var(--sans); }

/* ---------- headings ---------- */
.hero-title, .hero--inner .hero-title { margin-bottom: 20px; font: 500 clamp(32px, 3.6vw, 48px)/1.12 var(--sans); letter-spacing: -.02em; }
.h2, .flow-title { margin-bottom: 14px; font: 600 clamp(24px, 2.4vw, 32px)/1.2 var(--sans); letter-spacing: -.015em; }
.jtext h3 { margin-bottom: 6px; font: 600 clamp(19px, 1.6vw, 22px)/1.3 var(--sans); letter-spacing: -.01em; }
.cmp-title { margin-bottom: 18px; font: 600 17px/1.3 var(--sans); letter-spacing: 0; }
.model h3 { font: 600 clamp(20px, 1.8vw, 24px)/1.25 var(--sans); letter-spacing: -.01em; }
.term h3 { font: 600 clamp(18px, 1.6vw, 21px)/1.25 var(--sans); letter-spacing: -.01em; }
.need strong { font: 600 18px/1.3 var(--sans); letter-spacing: 0; }
.closing-title { font: 600 clamp(24px, 2.4vw, 32px)/1.2 var(--sans); letter-spacing: -.015em; }
.hero-lead, .body-copy { font-size: 17px; }

/* small labels above headings: sentence case instead of spaced capitals */
.eyebrow, .model-meta, .proof-title { font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; }

/* ---------- FAQ: heading on top, questions below ---------- */
.faq-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
.faq-list { max-width: 880px; }
.faq-item summary { font-size: 16.5px; }

/* ---------- buttons: violet for actions, solid lavender for the second choice ---------- */
.button { border-color: var(--violet); background: var(--violet); color: #fff; }
.button:hover { border-color: var(--violet-d); background: var(--violet-d); color: #fff; }
.button--soft { border-color: var(--purple-t); background: var(--purple-t); color: #1d2142; }
.button--soft:hover { border-color: #d8cbf0; background: #d8cbf0; color: #1d2142; }
/* closing strip: the white button on lavender was 1.3:1, now violet at 6.1:1 */
.closing .button--light { border-color: var(--violet); background: var(--violet); color: #fff; }
.closing .button--light:hover { border-color: var(--violet-d); background: var(--violet-d); color: #fff; }

/* ---------- "Why we start with the brief": header centred, stacked ---------- */
.flow-head { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 6px; max-width: 640px; margin-inline: auto; text-align: center; }
.flow-head .flow-title { margin-bottom: 4px; }
.flow-head .body-copy { margin: 0 auto 14px; }

/* ---------- the two panels move a little ---------- */
/* long list: rows scroll up without end (the 20 rows are two copies of the same 10, so -50% loops cleanly) */
.cmp--long .cmp-rows { padding-bottom: 10px; animation: cmp-scroll 14s linear infinite; }
@keyframes cmp-scroll { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.cmp--long::before { content: ""; position: absolute; z-index: 1; left: 0; right: 0; top: 0; height: 84px; background: linear-gradient(to bottom, #f1f1f3 55%, rgba(241, 241, 243, 0)); }
.cmp--long .cmp-title { position: relative; z-index: 2; }
/* few: the three profiles rise in one by one when the panel scrolls into view, ticks pop, then they float gently */
.cmp-rows--few span:nth-child(1) { --k: 0; } .cmp-rows--few span:nth-child(2) { --k: 1; } .cmp-rows--few span:nth-child(3) { --k: 2; }
.js .compare .cmp-rows--few span { opacity: 0; }
.js .compare.is-in .cmp-rows--few span { animation: cmp-in .55s cubic-bezier(.2, .7, .2, 1) calc(.25s + var(--k) * .25s) both, cmp-float 5s ease-in-out calc(1.4s + var(--k) * .7s) infinite; }
.js .compare.is-in .cmp-rows--few em { animation: cmp-tick .4s cubic-bezier(.3, 1.6, .5, 1) calc(.6s + var(--k) * .25s) both; }
@keyframes cmp-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes cmp-float { 0%, 100% { opacity: 1; transform: none; } 50% { opacity: 1; transform: translateY(-4px); } }
@keyframes cmp-tick { from { transform: scale(0); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .cmp--long .cmp-rows, .js .compare.is-in .cmp-rows--few span, .js .compare.is-in .cmp-rows--few em { animation: none; }
  .js .compare .cmp-rows--few span { opacity: 1; }
}

/* ---------- no small labels above headings on this page (the hero and closing strip come from shared parts) ---------- */
.eyebrow { display: none; }

/* ---------- three ways to work: each card shows how the model works ---------- */
.ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 8px; }
.way { display: flex; flex-direction: column; padding: 26px 24px 28px; background: #fff; }
.way-for { margin-bottom: 4px; color: var(--muted); font-size: 14px; font-weight: 500; }
.way h3 { margin-bottom: 18px; color: #1d2142; font: 600 22px/1.25 var(--sans); }
.way > p:last-child { color: var(--muted); font-size: 15.5px; line-height: 1.55; }
.way-art { margin-bottom: 18px; padding: 30px 18px 14px; background: #f7f5fc; }
.wt { position: relative; display: flex; justify-content: space-between; align-items: center; height: 14px; }
.wt::before { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 2px; margin-top: -1px; background: #d9d3ea; }
.wt i { position: relative; z-index: 1; width: 14px; height: 14px; border: 2px solid #c9c0e3; border-radius: 50%; background: #fff; }
.wt i.on { border-color: #1d2142; background: #1d2142; }
.wt b { position: absolute; bottom: 20px; left: 50%; padding: 1px 7px; background: #1d2142; color: #fff; font-size: 11px; font-weight: 600; line-height: 1.5; white-space: nowrap; transform: translateX(-50%); }
.wt i:last-child b { left: auto; right: -4px; transform: none; }
.wt i:first-child b { left: -4px; transform: none; }
.wt-labels { display: flex; justify-content: space-between; margin-top: 10px; color: var(--muted); font-size: 12.5px; }
.wteam { display: grid; gap: 8px; margin-top: -16px; }
.wteam span { display: flex; align-items: center; gap: 10px; }
.wteam i { flex: none; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 50% 36%, #fff 0 17%, transparent 18%), radial-gradient(ellipse 46% 34% at 50% 100%, #fff 0 99%, transparent 100%), var(--purple); }
.wteam b { display: block; height: 8px; background: #e2ddf0; }
.ways-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-top: 20px; padding: 18px 24px; background: #fff; }
.ways-foot p { color: #1d2142; font-size: 16px; font-weight: 500; }
/* fee tags pop in once when the card scrolls into view */
.js .way .wt b { opacity: 0; transform-origin: bottom center; }
.js .way.is-in .wt b { animation: way-tag .4s cubic-bezier(.3, 1.5, .5, 1) both; }
.js .way.is-in .wt i:nth-child(1) b { animation-delay: .3s; } .js .way.is-in .wt i:nth-child(2) b { animation-delay: .5s; } .js .way.is-in .wt i:nth-child(4) b { animation-delay: .7s; }
@keyframes way-tag { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }

/* ---------- fees and terms: one agreement card ---------- */
.agree-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.agree-copy .body-copy { max-width: 26em; margin-bottom: 0; }
.agree { padding: clamp(24px, 3vw, 36px); border: 1px solid var(--line); border-top: 4px solid #1d2142; background: #fff; box-shadow: 0 24px 48px -30px rgba(29, 33, 66, .35); }
.agree-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; color: #1d2142; font-size: 17px; font-weight: 600; }
.agree-head span { padding: 2px 9px; background: var(--purple-t); font-size: 12px; font-weight: 500; }
.agree-list { margin: 0; padding: 0; list-style: none; }
.agree-list li { display: flex; align-items: flex-start; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.agree-list .tick { margin-top: 1px; }
.agree-list p { color: var(--muted); font-size: 15px; line-height: 1.5; }
.agree-list strong { display: block; margin-bottom: 2px; color: #1d2142; font-weight: 600; }
.agree-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 22px; }
.agree-sign span { display: block; }
.agree-sign svg { display: block; width: 100%; max-width: 160px; height: 36px; fill: none; stroke: #1d2142; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.agree-sign i { display: block; margin-top: 4px; padding-top: 6px; border-top: 1px solid #c9c9cf; color: var(--muted); font-size: 12.5px; font-style: normal; }
/* the two signatures write themselves once when the card scrolls into view */
.js .agree .agree-sign path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .agree.is-in .agree-sign path { animation: sign 1.1s ease-in-out .5s forwards; }
.js .agree.is-in .agree-sign span + span path { animation-delay: 1.4s; }
@keyframes sign { to { stroke-dashoffset: 0; } }

/* ---------- FAQ: centred ---------- */
.faq-grid { justify-items: center; text-align: center; }
.faq-list { width: 100%; text-align: left; }

@media (max-width: 900px) {
  .ways, .agree-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .js .way .wt b { opacity: 1; animation: none !important; }
  .js .agree .agree-sign path { stroke-dashoffset: 0; animation: none !important; }
}

/* ---------- fixes after review ---------- */
/* the doubled list rows must not stretch the panels: fixed height, rows scroll inside */
.cmp { height: 360px; min-height: 0; }
.cmp--long::before { height: 92px; background: linear-gradient(to bottom, #f1f1f3 70%, rgba(241, 241, 243, 0)); }
.wt b { font-style: normal; }
.agree-sign span { border: 0; padding: 0; }
.agree-sign i { letter-spacing: 0; text-transform: none; }
