/* Page CSS. The layout, type, buttons, nav and motion come from /assets (the design kit).
   This file only draws what sits inside a visual, plus the brief's second accent. */
:root { --blue: #005dac; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* a visual that is drawn in HTML and fills its frame */
.shot { display: flex; flex-direction: column; justify-content: center; padding: clamp(20px, 3.4vw, 48px); }
.frame.shot-link { align-items: stretch; color: inherit; text-decoration: none; transition: transform 200ms ease; }
@media (hover: hover) and (pointer: fine) { .frame.shot-link:hover { transform: translateY(-2px); } }

/* --- a voice call as turns and states ------------------------------------------------------ */
.call { display: grid; gap: var(--s-4); width: 100%; font-size: 15px; line-height: 1.45; text-align: left; }
.call__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-2); font-size: var(--t-label); font-weight: 500; color: var(--muted); }
.call__wave { display: flex; align-items: center; gap: 3px; height: 24px; flex: 1; justify-content: center; }
.call__wave i { width: 3px; border-radius: 2px; background: var(--accent); }
.call__turn { margin: 0; max-width: 86%; padding: 12px 16px; border-radius: var(--r-md); background: var(--p-bg); border: 1px solid var(--line); color: var(--p-ink); }
.call__turn b { display: block; font-size: var(--t-label); font-weight: 500; color: var(--p-muted); }
.call__turn--user { justify-self: end; background: var(--p-ink); border-color: transparent; color: var(--p-bg); }
.call__turn--user b { color: var(--p-inv-muted); }
.call__state { margin: 0; justify-self: start; display: flex; align-items: center; gap: var(--s-2); font-size: var(--t-label); font-weight: 500; color: var(--ink); }
.call__state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.call__state--manual::before { background: var(--blue); }
.call__result { display: flex; align-items: end; justify-content: space-between; gap: var(--s-5); margin-top: var(--s-3); padding-top: var(--s-4); border-top: 1px solid var(--line-strong); font-weight: 500; }
.call__result small { display: block; font-size: var(--t-label); font-weight: 400; color: var(--muted); }
.call__result strong { font: var(--display-weight) var(--t-stat)/1 var(--font-display); letter-spacing: var(--display-tracking); white-space: nowrap; }
@media (max-width: 639px) {
  .call__turn:nth-of-type(n + 4), .call__state { display: none; }
  .call__result strong { font-size: 24px; }
}

/* --- before-and-after bars ------------------------------------------------------------------ */
.bars { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6); width: 100%; height: 100%; min-height: 280px; }
.bars__group { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: var(--s-4); }
.bars__name { margin: 0; font-size: var(--t-small); font-weight: 500; }
.bars__plot { position: relative; display: flex; align-items: flex-end; gap: var(--s-3); border-bottom: 1px solid var(--line-strong); }
.bars__bar { flex: 1; display: flex; justify-content: center; padding-top: var(--s-3); border-radius: var(--r-sm) var(--r-sm) 0 0; background: color-mix(in oklab, var(--ink) 12%, var(--surface)); font: var(--display-weight) clamp(20px, 2vw, 28px)/1 var(--font-display); }
.bars__bar--after { background: var(--accent); color: var(--accent-ink); }
.bars__target { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--blue); padding-top: 4px; font-size: var(--t-label); font-weight: 500; color: var(--blue); text-align: right; }
.bars__axis { display: flex; gap: var(--s-3); margin: 0; font-size: var(--t-label); color: var(--muted); }
.bars__axis span { flex: 1; text-align: center; }

/* --- small diagrams in the expertise cards -------------------------------------------------- */
#expertise .panel { --p-h: 148px; display: flex; align-items: center; justify-content: center; padding: var(--s-5); background: var(--surface); }
.glyph { width: 100%; max-width: 240px; height: auto; overflow: visible; }
.glyph .ln { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.glyph .box { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.glyph .dot, .glyph .fill { fill: var(--ink); }
.glyph .bar { fill: color-mix(in oklab, var(--ink) 55%, transparent); }
.glyph .acc { fill: var(--accent); }
#expertise .rows { margin-top: var(--s-4); }
#expertise .rows > li { display: block; padding-block: var(--s-3); }

.about__more { margin-top: var(--s-8); }
.footer__name { font: var(--display-weight) clamp(30px, 3.4vw, 48px)/1.05 var(--font-display); letter-spacing: var(--display-tracking); }

/* --- case study ----------------------------------------------------------------------------- */
.hero--case { --ly-h1: calc(var(--ly-scale) * clamp(36px, 2.4vw + 22px, 56px)); }
.hero__meta { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4) var(--gutter); margin: var(--s-6) 0 0; }
.hero__meta dt { font-size: var(--t-small); color: var(--muted); }
.hero__meta dd { margin: 0; font-weight: 500; }
@media (max-width: 1023px) { .hero__meta { display: none; } }

/* the funnel of a manual calling day */
.funnel { display: grid; gap: var(--s-4); width: 100%; }
.funnel__row { display: grid; gap: var(--s-2); }
.funnel__row span { font-size: var(--t-small); font-weight: 500; }
.funnel__row i { display: block; height: 44px; border-radius: var(--r-sm); background: color-mix(in oklab, var(--ink) 12%, var(--surface)); }
.funnel__row:last-child i { background: var(--accent); }

/* the opening line, before and after */
.opener { display: grid; gap: var(--s-4); width: 100%; text-align: left; }
.opener__card { display: grid; gap: var(--s-3); padding: var(--s-5); border-radius: var(--r-md); background: var(--p-bg); border: 1px solid var(--line); }
.opener__card--after { border-color: var(--accent); }
.opener__card p { margin: 0; }
.opener__tag { font-size: var(--t-label); font-weight: 500; color: var(--muted); }
.opener__line { font: var(--display-weight) clamp(20px, 1.8vw, 26px)/1.25 var(--font-display); letter-spacing: var(--display-tracking); }
.opener__line em { font-style: normal; color: var(--accent); }
.opener__then { font-size: var(--t-small); }
.opener__then b { font-weight: 500; }

/* the eight stages: a coloured rule says who acts */
.stage8 > li { display: grid; gap: var(--s-2); align-content: start; padding-top: var(--s-4); border-top: 2px solid var(--accent); }
.stage8 > li[data-actor="customer"] { border-top-color: var(--ink); }
.stage8 > li[data-actor="manual"] { border-top-color: var(--blue); }
.stage8 h3 { font: 500 var(--t-card)/1.3 var(--font-text); letter-spacing: -0.01em; }
.legend { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); margin: var(--s-6) 0 0; padding: 0; list-style: none; font-size: var(--t-small); }
.legend li { display: flex; align-items: center; gap: var(--s-2); }
.legend li::before { content: ""; width: 16px; height: 2px; background: var(--accent); }
.legend li[data-actor="customer"]::before { background: var(--ink); }
.legend li[data-actor="manual"]::before { background: var(--blue); }

/* a decision: problem, decision, impact */
.decision { display: grid; gap: var(--s-4); }
.decision + .decision { margin-top: var(--s-7); }
.decision dl { margin: 0; }
.decision dt { font-size: var(--t-label); font-weight: 500; color: var(--muted); margin-bottom: var(--s-2); }
.decision dd { margin: 0; }
.decision .is-choice dt { color: var(--accent); }

/* the figures of the impact section */
.kpi { display: grid; gap: var(--s-3); align-content: start; padding-top: var(--s-4); border-top: 1px solid var(--line-strong); }
.kpi__value { font: var(--display-weight) var(--t-h2)/1 var(--font-display); letter-spacing: var(--display-tracking-xl); margin: 0; }
.kpi__value small { font-size: .5em; color: var(--muted); letter-spacing: 0; }
.kpi--small .kpi__value { font-size: var(--t-stat); }
.kpi--open .kpi__value { color: var(--muted); }
.kpi p { margin: 0; }
.kpi .t-small { color: var(--muted); }

.mo-pc__visual.shot { background: var(--surface); aspect-ratio: 4 / 3; }
#reflection .rows { margin-top: var(--s-7); }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6) var(--gutter); }
.pair .t-label { margin-bottom: var(--s-4); }
.pair .rows > li { display: block; padding-block: var(--s-3); }
@media (max-width: 639px) { .pair { grid-template-columns: 1fr; } }
.stage8 { row-gap: var(--s-7); margin: 0; padding: 0; list-style: none; }
.kpis-more { margin-top: var(--s-7); }
.reflection__rows { margin: var(--s-7) 0 0; padding: 0; list-style: none; }
.reflection__rows > li { padding-top: var(--s-4); border-top: 1px solid var(--line-strong); }
.about__ways { margin-top: var(--s-7); }
.about__ways > div { padding-top: var(--s-4); border-top: 1px solid var(--line-strong); }
.about__ways h3 { font: 500 var(--t-card)/1.3 var(--font-text); letter-spacing: -0.01em; margin-bottom: var(--s-2); }
#expertise .card > .panel { flex: none; height: var(--p-h); min-height: 0; }

/* second pass: sections that sat too empty in their screen */
.close__word { font-size: clamp(64px, 19.4vw, 290px); }
@media (max-width: 639px) { .close__word { font-size: clamp(48px, 19.4vw, 96px); } }
#strategy .rows__name, .stage8 h3 { font: var(--display-weight) var(--t-h3)/1.2 var(--font-display); letter-spacing: var(--display-tracking); }
#strategy .rows > li { padding-block: var(--s-5); gap: var(--s-2) var(--s-5); }
#strategy .rows > li:first-child { padding-top: 0; }
.stage8 { row-gap: var(--s-8); }
.stage8 > li { gap: var(--s-3); padding-top: var(--s-5); }
.decision dd { font-size: var(--t-lead); line-height: 1.5; }
.decision + .decision { margin-top: var(--s-8); }
.funnel { gap: var(--s-6); }
.funnel__row span { font-size: var(--t-lead); font-weight: 400; }
.funnel__row i { height: 72px; }
.facts { margin-top: var(--s-8); }
.impact__main .kpi + .kpi { margin-top: var(--s-7); }
.impact__main .frame { min-height: 320px; }
.kpi dd { margin: 0; }

/* restyle: warm ember hero (after tasteskill.dev); nav, buttons and corners stay on the kit */
.hero--split { position: relative; color: #fff; isolation: isolate;
  background: radial-gradient(90% 70% at 85% 110%, #ff5500 0%, rgba(255,85,0,0) 62%), radial-gradient(70% 60% at 10% 120%, #b83a05 0%, rgba(184,58,5,0) 60%), linear-gradient(180deg, #140a05 0%, #2a1208 100%); }
.hero--split h1, .hero--split .hero__lead, .hero--split .hero__kicker, .hero--split dd { color: #fff; }
.hero--split .hero__lead, .hero--split dt { color: rgba(255,255,255,.8); }
.hero--split .hero__media .call { background: var(--p-bg); border-radius: 18px; padding: clamp(16px, 2vw, 28px); color: var(--p-ink); }
.close__word { font-size: clamp(64px, 19.4vw, 290px); }
@media (max-width: 639px) { .close__word { font-size: clamp(48px, 19.4vw, 96px); } }
#strategy .rows__name, .stage8 h3 { font: var(--display-weight) var(--t-h3)/1.2 var(--font-display); letter-spacing: var(--display-tracking); }
#strategy .rows > li { padding-block: var(--s-5); gap: var(--s-2) var(--s-5); }
#strategy .rows > li:first-child { padding-top: 0; }
.stage8 { row-gap: var(--s-8); }
.stage8 > li { gap: var(--s-3); padding-top: var(--s-5); }
.decision dd { font-size: var(--t-lead); line-height: 1.5; }
.decision + .decision { margin-top: var(--s-8); }
.funnel { gap: var(--s-6); }
.funnel__row span { font-size: var(--t-lead); font-weight: 400; }
.funnel__row i { height: 72px; }
.facts { margin-top: var(--s-8); }
.impact__main .kpi + .kpi { margin-top: var(--s-7); }
.impact__main .frame { min-height: 320px; }
.kpi dd { margin: 0; }

/* restyle: warm ember hero (after tasteskill.dev); nav, buttons and corners stay on the kit */
.hero--split { position: relative; color: #fff; isolation: isolate;
  background: radial-gradient(90% 70% at 85% 110%, #ff5500 0%, rgba(255,85,0,0) 62%), radial-gradient(70% 60% at 10% 120%, #b83a05 0%, rgba(184,58,5,0) 60%), linear-gradient(180deg, #140a05 0%, #2a1208 100%); }
.hero--split h1, .hero--split .hero__lead, .hero--split .hero__kicker, .hero--split dd { color: #fff; }
.hero--split .hero__lead, .hero--split dt { color: rgba(255,255,255,.8); }
.hero--split .hero__media .call { background: var(--p-bg); border-radius: 18px; padding: clamp(16px, 2vw, 28px); color: var(--p-ink); }
.btn--primary { background: #ff5500; color: #111; }
.btn--secondary { background: #fff; color: #1a0e08; box-shadow: 0 0 0 1px rgba(20,10,5,.08); }
.close__word { font-size: clamp(48px, 15vw, 220px); line-height: 1.15; overflow: visible; }
.hero--split .hero__media { background: var(--p-bg); border-radius: 22px; }

@media (max-width: 639px) { #expertise .rows { display: none; } #expertise .panel { --p-h: 96px; } }

/* no underline draws on hover or focus: the kit's link motion (assets/motion/motion.css) keeps only its resting state */
html:not([data-motion="off"]) :is(.link, .m-link, p a:not([class]), .footer .link):is(:hover, :focus-visible) { background-size: 0% 1px, 100% 1px; background-position: right 0 bottom 0, 0 100%; }
html:not([data-motion="off"]) .link:is(:hover, :focus-visible) { background-size: 0% 1px, calc(100% - 1em - var(--s-2)) 1px; background-position: 0 100%, 0 100%; }
html:not([data-motion="off"]) .footer ul a:is(:hover, :focus-visible) { background-size: 0% 1px, 0% 1px; }
