/* Homepage sections that sit under the hero: the statement, problems by role,
   and the kinds of data problems. Built on the tokens in quill.css. */
:root { --risk: #A8402F; }

/* ---- Statement: the headline with the scroll-lit paragraph under it on the
   left, the four-systems card on the right ----
   One question, four tiles: each system's count of active customers. On scroll
   the tiles rise in one after another and their numbers count up, then the red
   mark and the gap appear underneath. It only moves forward and then holds. */
.stmt-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: 88px; align-items: center; }
.stmt-text { min-width: 0; }
.stmt-text h2 { max-width: 14em; }
.statement .stmt-p { margin-top: 32px; max-width: 32ch; font-family: var(--serif); font-weight: 400; font-size: 1.5rem; line-height: 1.42; letter-spacing: -0.01em; }
.tally { margin: 0; padding: 36px; border-radius: var(--r-modal); background: var(--sand) url(art/plate.jpg) center / cover no-repeat; }
.ft { padding: 28px 30px 24px; background: #fff; border-radius: var(--r-card); box-shadow: 0 30px 80px rgba(46, 36, 80, 0.16); }
.ft-q { font-size: 1.0625rem; font-weight: 600; color: var(--ink-900); }
.ft-grid { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ft-tile { padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: var(--r); opacity: var(--t, 1); transform: translateY(calc((1 - var(--t, 1)) * 10px)); }
.ft-tile small { display: block; font-size: 0.875rem; color: var(--ink-500); }
.ft-tile b { display: block; margin-top: 8px; font-family: var(--serif); font-weight: 450; font-size: 2.75rem; line-height: 1; letter-spacing: -0.02em; color: var(--ink-900); font-variant-numeric: tabular-nums lining-nums; }
.ft-foot { margin-top: 16px; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 0.9375rem; font-weight: 600; color: var(--risk); }
.ft-x { display: inline-flex; align-items: center; gap: 8px; }
.ft-x svg { width: 18px; height: 18px; flex: none; transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.ft-x > span, .ft-apart { transition: opacity 0.45s ease 0.12s, transform 0.45s var(--ease-out) 0.12s; }
.ft-apart { white-space: nowrap; transition-delay: 0.3s; }
.tally.is-armed:not(.is-done) .ft-x svg { transform: scale(0); }
.tally.is-armed:not(.is-done) .ft-x > span, .tally.is-armed:not(.is-done) .ft-apart { opacity: 0; transform: translateY(4px); }
@media (max-width: 1100px) { .stmt-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: 56px; } .tally { padding: 32px; } }
@media (max-width: 900px) { .stmt-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; } .statement .stmt-p { margin-top: 24px; font-size: 1.3125rem; } .tally { max-width: 580px; } }
@media (max-width: 640px) {
    .tally { padding: 18px; border-radius: var(--r-card); }
    .ft { padding: 20px 18px 18px; }
    .ft-q { font-size: 1rem; }
    .ft-tile { padding: 12px 12px 14px; }
    .ft-tile small { font-size: 0.8125rem; white-space: nowrap; }
    .ft-tile b { font-size: 2rem; }
    .ft-foot { font-size: 0.8125rem; gap: 10px; }
    .ft-x { gap: 6px; white-space: nowrap; }
    .ft-x svg { width: 16px; height: 16px; }
}
@media (prefers-reduced-motion: reduce) { .ft-x svg, .ft-x > span, .ft-apart { transition: none; } }

/* ---- Problems by role ----
   A small segmented control picks the seat. Five problems for that seat on
   the left, what Quill gives you instead on the right, in two plain columns
   with hairlines. Color sits only in the two column labels. */
#problems .section-head { margin-bottom: 40px; }
.pb-pick { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 40px; }
.pb-pick-label, .pb-role-name { font-size: 0.8125rem; font-weight: 500; color: var(--ink-600); }
.pb-role-name { color: var(--ink-900); white-space: nowrap; }
.pb-roles { --k: 0; --n: 3; position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 2px; padding: 2px; border: 1px solid rgba(30, 35, 48, 0.08); border-radius: 8px; background: #EAE6DE; }
.pb-thumb { position: absolute; top: 2px; bottom: 2px; left: 2px; width: calc((100% - 4px - (var(--n) - 1) * 2px) / var(--n)); border-radius: 6px; background: #fff; box-shadow: 0 1px 2px rgba(15, 15, 15, 0.06); transform: translateX(calc(var(--k) * (100% + 2px))); transition: transform 0.4s var(--ease-out); }
.pb-roles button { position: relative; z-index: 1; height: 28px; padding: 0 12px; border: 0; border-radius: 6px; background: none; cursor: pointer; font-family: var(--font); font-size: 0.8125rem; font-weight: 600; color: var(--ink-600); white-space: nowrap; transition: color 0.2s ease; }
.pb-roles button:hover { color: var(--ink-700); }
.pb-roles button[aria-selected="true"] { color: var(--ink-900); }
.pb-roles button:focus-visible { outline: 2px solid var(--lavender-500); outline-offset: 2px; }

.pb-head, .pb-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.pb-head span { padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.02em; line-height: 1.3; color: var(--risk); }
.pb-head span:last-child { color: var(--lavender-700); }
.pb-rows { list-style: none; margin: 0; padding: 0; }
.pb-prob, .pb-fix { position: relative; padding: 20px 0; border-bottom: 1px solid var(--line); }
/* A hairline between the two columns, so right reads as relief a beat sooner */
.pb-prob, .pb-head span:first-child { padding-right: 32px; border-right: 1px solid var(--line); }
.pb-fix, .pb-head span:last-child { padding-left: 32px; }
.pb-prob h3, .pb-win { margin: 0; font-family: var(--serif); font-weight: 450; font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.012em; color: var(--ink-900); text-wrap: balance; }
.pb-prob p, .pb-fix p:not(.pb-win) { margin-top: 6px; font-size: 1rem; line-height: 1.5; color: var(--ink-600); text-wrap: pretty; }
/* Read out by a screen reader; the With Quill one is shown as a small label once the columns stack */
.pb-sr, .pb-fix-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* A new role's rows settle in, one after another */
.pb-panel.is-entering .pb-row { animation: pbIn 0.45s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes pbIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
    #problems .section-head { margin-bottom: 28px; }
    .pb-pick { margin-bottom: 20px; }
    .pb-head { display: none; }
    .pb-row { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 22px 0; border-bottom: 1px solid var(--line); }
    .pb-prob, .pb-fix { padding: 0; border-bottom: 0; border-right: 0; }
    .pb-fix { margin-top: 18px; }
    .pb-fix-label { position: static; display: block; width: auto; height: auto; overflow: visible; clip: auto; margin-bottom: 6px; font-size: 0.8125rem; font-weight: 600; color: var(--lavender-700); }
}
@media (max-width: 640px) { .pb-prob h3, .pb-win { font-size: 1.375rem; } }
/* The label, the seats and the title don't fit on one line on a phone, so the first line reads
   "I'm the Chief Revenue Officer" and the seats sit below it, sharing the full width */
@media (max-width: 480px) {
    .pb-pick { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 8px 4px; }
    .pb-roles { grid-row: 2; grid-column: 1 / -1; }
    .pb-role-name { grid-row: 1; grid-column: 2; }
    .pb-roles button { padding: 0 4px; }
}
@media (prefers-reduced-motion: reduce) {
    .pb-thumb { transition: none; }
    .pb-panel.is-entering .pb-row { animation: none; }
}

/* ---- The three kinds of data integrity problems ----
   The heading with its lede beside it, over three open columns. Each
   chart is the deck's: lavender is the record as it should read, red is the
   problem. On scroll the lines draw left to right and the problem lands in red.
   The finished chart holds; nothing loops. */
#kinds { --risk-line: #C2523C; --sp: 0.55; }
#problems .section-head, #process .section-head { grid-template-columns: minmax(0, 1fr); }
.kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 72px; }
.kind { position: relative; min-width: 0; padding: 0 0 4px; }
.kind + .kind::before { content: ""; position: absolute; top: 0; bottom: 0; left: -36px; border-left: 1px solid var(--line); }
.kind-chart { display: block; width: 100%; height: auto; overflow: visible; }
.kind h3 { margin-top: 30px; font-family: var(--serif); font-weight: 450; font-size: 1.75rem; line-height: 1.15; letter-spacing: -0.015em; color: var(--ink-900); }
.kind p { margin-top: 10px; max-width: 34ch; color: var(--ink-600); text-wrap: pretty; }

.kind-chart .k-axis { stroke: var(--ink-200); stroke-width: 1; fill: none; }
.kind-chart .k-area { fill: var(--lavender-100); }
.kind-chart .k-gap { fill: rgba(194, 82, 60, 0.14); }
.kind-chart .k-ln, .kind-chart .k-bad, .kind-chart .k-dash, .kind-chart .k-skip { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.kind-chart .k-ln { stroke: var(--lavender-600); stroke-width: 2; }
.kind-chart .k-bad { stroke: var(--risk-line); stroke-width: 2; }
.kind-chart .k-dash { stroke: var(--risk-line); stroke-width: 1.8; stroke-dasharray: 4 3; stroke-linecap: butt; }
.kind-chart .k-skip { stroke: var(--ink-400); stroke-width: 1.3; stroke-dasharray: 2 3; stroke-linecap: butt; }
.kind-chart .k-mk { fill: none; stroke: #fff; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.kind-chart .k-dot { fill: var(--risk-line); }
.kind-chart .k-dot--ok { fill: var(--lavender-600); }
.kind-chart .k-dot--open { fill: var(--parchment); stroke: var(--risk-line); stroke-width: 1.4; }

/* Before the column scrolls in: lines undrawn, fills and dots out of sight */
.kind.is-armed:not(.is-drawn) .k-draw { stroke-dasharray: 1 1.2; stroke-dashoffset: 1.1; }
.kind.is-armed:not(.is-drawn) .k-fade { opacity: 0; }
.kind.is-armed:not(.is-drawn) .k-pop { opacity: 0; transform: scale(0.2); }
.kind-chart .k-draw { stroke-dasharray: 1 1.2; stroke-dashoffset: 0; }
.kind-chart .k-pop { transform-box: fill-box; transform-origin: center; }
.kind.is-drawn .k-draw { transition: stroke-dashoffset calc(var(--dur, 0.8s) * var(--sp)) cubic-bezier(0.45, 0.05, 0.55, 0.95) calc((var(--t, 0s) + var(--i, 0) * 0.35s) * var(--sp)); }
.kind.is-drawn .k-ln.k-draw, .kind.is-drawn .k-bad, .kind.is-drawn .k-mk { transition-timing-function: linear; }
.kind.is-drawn .k-fade { transition: opacity calc(var(--dur, 0.8s) * var(--sp)) ease calc((var(--t, 0s) + var(--i, 0) * 0.35s) * var(--sp)); }
.kind.is-drawn .k-pop { transition: opacity 0.15s ease calc((var(--t, 0s) + var(--i, 0) * 0.35s) * var(--sp)), transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) calc((var(--t, 0s) + var(--i, 0) * 0.35s) * var(--sp)); }

@media (max-width: 900px) {
    .kinds { grid-template-columns: minmax(0, 1fr); }
    .kind { --i: 0 !important; padding: 36px 0 32px; }
    .kind:first-child { padding-top: 0; }
    .kind + .kind { border-top: 1px solid var(--line); }
    .kind + .kind::before { display: none; }
    .kind-chart { max-width: 460px; }
}

/* The agents section and the console plate under it read as one section on the
   plain page: the cream band sits on the problems above, and the plate is the
   picture for the agents heading. */
#kinds { padding-bottom: 96px; }
@media (max-width: 900px) { #kinds { padding-bottom: 72px; } }

/* ---- Design pass (Nov 2026) ---- */
/* The product panels were half empty at 440px. Phones stack them and keep quill.css's height: auto. */
@media (min-width: 901px) { .panels { height: 380px; } }
/* The systems list opened with the only solid black rule on the page */
.problems { border-top: 1px solid var(--line); }

/* ---- Closing: with no lede, the heading and button sit centered against the form instead of
   top-aligned with empty space under them ---- */
@media (min-width: 901px) { .closing-grid { align-items: center; } }
