/* case-tech.css: the generated case pages (11 tech works + the carried-over identity works irthart, moto-pro).
   Built by tools/build_cases.py from tools/cases_data.json. Loads after /assets/site-chrome.css; body = .sc-page .ct
   Everything that can wrap keeps line-height >= 1.9; headings >= 1.35; no negative letter-spacing; no black (navy is the darkest). */

.ct { --ct-pad: clamp(56px, 6vw, 96px); }
.ct main { display: block; overflow-x: clip; }

/* ---------- Hero ---------- */
.ct-hero { position: relative; padding-block: clamp(64px, 7vw, 112px) clamp(36px, 4vw, 56px); }
.ct-hero__in { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--sc-gap); }
.ct-hero__in > * { grid-column: 1 / span 9; }
.ct-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 0 10px; font-size: 15px; line-height: 1.9; color: var(--sc-ink-2); }
.ct-crumbs a { color: var(--sc-ink-2); text-decoration: underline; text-decoration-color: var(--sc-rule); text-underline-offset: 6px; }
.ct-crumbs a:hover { color: var(--sc-violet); text-decoration-color: var(--sc-violet-a); }
.ct-crumbs [aria-hidden="true"] { color: var(--sc-ink-3); }
.ct-title { margin: 14px 0 0; font-size: clamp(2.125rem, 1.25rem + 3.4vw, 4.375rem); font-weight: 300; line-height: 1.38; letter-spacing: 0; text-wrap: balance; }
.ct-title b { font-weight: 700; }
.ct-title__lat { display: block; margin-top: 4px; font-family: var(--sc-lat); font-size: 15px; font-weight: 500; letter-spacing: .16em; line-height: 1.9; color: var(--sc-ink-3); }
.ct-one { margin: 18px 0 0; max-width: 38em; }
.ct-hero .sc-actions { margin-top: 30px; }
.ct-more { display: flex; flex-wrap: wrap; gap: 6px 26px; margin: 18px 0 0; padding: 0; list-style: none; }
.ct-meta {
  grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  column-gap: var(--sc-gap); row-gap: 6px; margin: clamp(36px, 4vw, 56px) 0 0; padding-top: 18px; border-top: 1px solid var(--sc-line);
}
.ct-meta > div { min-width: 0; }
.ct-meta dt { font-size: 14px; line-height: 1.9; color: var(--sc-ink-2); }
.ct-meta dd { margin: 0; font-size: 16px; font-weight: 500; line-height: 1.9; overflow-wrap: anywhere; }
.ct-meta dd a { color: var(--sc-violet); text-decoration: underline; text-decoration-color: var(--sc-violet-a); text-underline-offset: 6px; }
.ct-meta dd a:hover { text-decoration-color: var(--sc-violet); }
/* one structural slab in the free columns beside the title, level with it; it bleeds a little past the page edge
   (the blade is a child of the full-width section, so the offset is a share of the viewport, not --sc-edge) */
.ct-hero__blade {
  position: absolute; z-index: 0; top: calc(clamp(64px, 7vw, 112px) + 72px); inset-inline-end: -2%;
  width: clamp(220px, 28vw, 480px);
}
@media (max-width: 1023px) {
  .ct-hero__in > * { grid-column: 1 / -1; }
  /* the text spans the full width here, so the slab would sit under the title */
  .ct-hero__blade { display: none; }
}
@media (max-width: 767px) {
  .ct-hero { padding-top: 84px; }
}

/* ---------- Stage: the large framed screenshot (or illustration) ---------- */
.ct-stage-sec { padding-bottom: clamp(24px, 3vw, 48px); }
.ct-stage { position: relative; margin: 0; }
.ct-stage .sc-frame__view img { background: var(--sc-wash-v); }
@media (min-width: 600px) {
  /* the desktop shot keeps its own proportions: some are trimmed where the next section starts */
  .ct-stage .sc-frame__view { aspect-ratio: auto; }
  .ct-stage .sc-frame__view img { height: auto; }
}
.ct-stage__phone { position: absolute; z-index: 2; bottom: -40px; inset-inline-end: clamp(16px, 3vw, 48px); width: clamp(150px, 15%, 216px); }
.ct-stage__cap { margin-top: 14px; }
@media (min-width: 1024px) {
  .ct-stage-sec { padding-bottom: 72px; }
}
@media (max-width: 1023px) {
  .ct-stage__phone { display: none; }
}
/* pair: a cropped desktop column and the phone, side by side at their own sizes */
.ct-stage--pair {
  display: grid; grid-template-columns: minmax(0, 680px) clamp(180px, 17vw, 236px); justify-content: center; align-items: center;
  gap: clamp(32px, 5vw, 88px); padding: clamp(28px, 4vw, 64px) clamp(16px, 4vw, 64px); background: var(--sc-wash-t); border-radius: 10px;
}
.ct-stage--pair .sc-frame__view { aspect-ratio: auto; }
.ct-stage--pair .sc-frame__view img { height: auto; }
.ct-stage--pair .ct-stage__phone { position: static; width: 100%; }
@media (max-width: 1023px) {
  .ct-stage--pair { grid-template-columns: minmax(0, 680px); }
}
@media (max-width: 599px) {
  .ct-stage--pair { padding: 16px; }
}

/* ---------- Sections ---------- */
/* sections are divided by a hairline; alternate identity sections sit on white, not lilac (violet stays an accent) */
.ct-sec { border-top: 1px solid var(--sc-line); }
.ct-sec--wash { background: var(--sc-surface); }
.ct-sec--teal { background: var(--sc-wash-t); }
.ct-sec .sc-sec-head > .sc-lead { font-size: var(--sc-fs-lead); }
@media (min-width: 1101px) {
  .ct-sec .sc-sec-head > .sc-h2 { grid-column: 1 / span 6; }
  .ct-sec .sc-sec-head > .sc-lead { grid-column: 8 / span 5; }
}

/* facts: numbered list + "how it works" panel */
.ct-facts { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--sc-gap); row-gap: 40px; align-items: start; }
.ct-list { grid-column: 1 / span 7; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--sc-line); }
.ct-list > li { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 12px; padding-block: 18px; border-bottom: 1px solid var(--sc-line); }
.ct-list__n { font-family: var(--sc-lat); font-size: 14px; font-weight: 500; letter-spacing: .14em; line-height: 2.4; color: var(--sc-violet); }
.ct-list p { margin: 0; font-size: 17px; line-height: 1.95; text-wrap: pretty; }
.ct-how { grid-column: 9 / span 4; padding: clamp(24px, 2.6vw, 36px); background: var(--sc-wash-t); border-radius: 4px; }
.ct-how__h { margin: 0 0 14px; font-size: var(--sc-fs-h3); font-weight: 500; line-height: 1.5; text-wrap: balance; }
.ct-how .sc-dash > li { font-size: 16px; line-height: 1.95; color: var(--sc-ink); text-wrap: pretty; }
.ct-how .sc-dash > li + li { margin-top: 10px; }
.ct-facts--solo .ct-list { grid-column: 1 / span 8; }
@media (max-width: 1023px) {
  .ct-list, .ct-how, .ct-facts--solo .ct-list { grid-column: 1 / -1; }
}

/* proof numbers (only those in the research notes) */
.ct-proof { margin-top: clamp(48px, 5vw, 80px); }
.ct-proof__h { margin: 0 0 18px; font-size: 15px; line-height: 1.9; color: var(--sc-ink-2); }
.ct-proof__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 0 var(--sc-gap); margin: 0; }
.ct-proof__list > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 2px; padding-block: 16px 10px; border-top: 2px solid var(--sc-ink); }
.ct-proof__list dd { margin: 0; font-family: var(--sc-lat); font-size: clamp(2.125rem, 1.6rem + 1.6vw, 3.25rem); font-weight: 300; line-height: 1.35; color: var(--sc-ink); }
.ct-proof__list dt { font-size: 15px; line-height: 1.9; color: var(--sc-ink-2); text-wrap: pretty; }

/* ---------- Gallery ---------- */
.ct-gal { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(32px, 3.4vw, 56px) var(--sc-gap); align-items: start; }
.ct-fig { grid-column: span 12; margin: 0; min-width: 0; }
.ct-fig--main { grid-column: span 8; }
.ct-fig--half { grid-column: span 6; }
.ct-fig--third { grid-column: span 4; }
.ct-fig--phone { grid-column: span 4; }
.ct-fig--solo { grid-column: 1 / -1; width: min(100%, 600px); justify-self: center; }
.ct-fig img { display: block; width: 100%; height: auto; }
.ct-fig__frame { overflow: hidden; }
.ct-fig__frame > img { background: var(--sc-wash-v); }
.ct-fig--phone .sc-phone { width: min(100%, 248px); margin-inline: auto; }
.ct-fig--phone .ct-fig__plain { width: min(100%, 420px); margin-inline: auto; }
.ct-fig--phone .ct-cap { text-align: center; }
.ct-fig__plain { overflow: hidden; border-radius: 4px; background: var(--sc-surface); box-shadow: 0 0 0 1px var(--sc-line), var(--sc-shadow); }
.ct-tile { display: grid; place-items: center; aspect-ratio: 4 / 3; padding: 14% 12%; border-radius: 4px; box-shadow: 0 0 0 1px var(--sc-line); }
.ct-tile img { width: 100%; max-height: 100%; object-fit: contain; }
.ct-tile--paper { background: var(--sc-surface); }
.ct-cap { margin: 14px 0 0; font-size: 15px; line-height: 1.9; color: var(--sc-ink-2); text-wrap: pretty; }
.ct-tag {
  display: inline-block; margin-inline-end: 10px; padding: 0 9px; border: 1px solid var(--sc-violet-a); border-radius: 2px;
  font-size: 14px; font-weight: 500; line-height: 1.9; color: var(--sc-violet); white-space: nowrap; vertical-align: 1px;
}
@media (max-width: 1023px) {
  .ct-fig--main, .ct-fig--half { grid-column: span 12; }
  .ct-fig--third { grid-column: span 6; }
  .ct-fig--phone { grid-column: span 12; }
}
@media (min-width: 600px) and (max-width: 1023px) {
  /* identity sheets and logo tiles stay side by side on tablets; screenshots above go full width */
  .ct--identity .ct-fig--half { grid-column: span 6; }
  .ct--identity .ct-fig--third { grid-column: span 4; }
}
@media (max-width: 599px) {
  .ct-fig--third { grid-column: span 12; }
  .ct-fig--phone .sc-phone { width: min(78%, 248px); }
}

/* ---------- Identity pages ---------- */
.ct-idstage { position: relative; margin: 0; }
.ct-idstage__box { overflow: hidden; border-radius: 4px; box-shadow: 0 0 0 1px var(--sc-line), var(--sc-shadow); }
.ct-idstage__box img { display: block; width: 100%; height: auto; }
.ct-idstage--photo .ct-idstage__box { aspect-ratio: 16 / 9; }
.ct-idstage--photo .ct-idstage__box img { height: 100%; object-fit: cover; object-position: 50% 32%; }
.ct-idstage--logo .ct-idstage__box { display: grid; place-items: center; aspect-ratio: 16 / 7; padding: 8% 14%; background: var(--sc-surface); }
.ct-idstage--logo .ct-idstage__box img { width: min(100%, 720px); }
/* the whole work image, never cropped (guideline pages, sign files) */
.ct-idstage--fit .ct-idstage__box { border-radius: 4px; }
.ct-idstage .ct-cap { margin-top: 16px; }
@media (max-width: 599px) {
  .ct-idstage--photo .ct-idstage__box { aspect-ratio: 4 / 5; }
  .ct-idstage--photo .ct-idstage__box img { object-position: 50% 30%; }
  .ct-idstage--logo .ct-idstage__box { aspect-ratio: 4 / 3; padding: 10%; }
}
.ct-quote { margin: 0; padding: clamp(28px, 3.4vw, 48px); background: var(--sc-surface); border: 1px solid var(--sc-line); border-radius: 4px; border-inline-start: 4px solid var(--sc-teal); }
.ct-quote blockquote { margin: 0; }
.ct-quote blockquote p { margin: 0; font-size: clamp(1.1875rem, 1.05rem + .5vw, 1.5rem); font-weight: 400; line-height: 1.95; text-wrap: pretty; }
.ct-quote figcaption { margin-top: 18px; font-size: 15px; line-height: 1.9; color: var(--sc-ink-2); }
.ct-quote figcaption b { display: block; font-size: 17px; font-weight: 700; color: var(--sc-ink); }

/* ---------- Illustration: WhatsApp-style booking chat (no avatars) ---------- */
.ct-illus { margin: 0; }
.ct-illus-wrap { padding: clamp(28px, 4vw, 64px) clamp(16px, 4vw, 64px); background: var(--sc-wash-t); border-radius: 10px; }
.ct-chat { width: min(100%, 560px); margin-inline: auto; }
.ct-chat__win { overflow: hidden; background: #F3F6F4; border: 1px solid var(--sc-line); border-radius: 18px; box-shadow: var(--sc-shadow); }
.ct-chat__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; padding: 14px 20px; background: var(--sc-surface); border-bottom: 1px solid var(--sc-line); }
.ct-chat__title { font-size: 17px; font-weight: 700; line-height: 1.9; }
.ct-chat__sub { font-size: 14px; line-height: 1.9; color: var(--sc-ink-2); }
.ct-chat__badge { margin-inline-start: auto; padding: 0 10px; border: 1px solid rgba(8, 113, 109, .35); border-radius: 999px; font-size: 14px; font-weight: 500; line-height: 1.9; color: var(--sc-teal-ink); }
.ct-chat__list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 20px 16px 24px; list-style: none; }
.ct-msg { max-width: 84%; padding: 8px 14px 10px; border-radius: 14px; font-size: 16px; line-height: 1.9; text-wrap: pretty; box-shadow: 0 1px 1px rgba(0, 24, 52, .06); }
.ct-msg__who { display: block; font-size: 14px; font-weight: 500; line-height: 1.9; color: var(--sc-teal-ink); }
.ct-msg--bot { align-self: flex-start; background: var(--sc-surface); border-start-start-radius: 4px; }
.ct-msg--client { align-self: flex-end; background: #DDF4E6; border-start-end-radius: 4px; }
.ct-msg--client .ct-msg__who { color: var(--sc-ink-2); }
.ct-slots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ct-slots span { padding: 2px 12px; border: 1px solid rgba(8, 113, 109, .35); border-radius: 8px; font-size: 15px; line-height: 1.9; color: var(--sc-teal-ink); background: var(--sc-wash-t); }
.ct-paylink { display: block; margin-top: 8px; padding: 6px 12px; border-radius: 8px; background: var(--sc-wash-v); font-size: 15px; font-weight: 500; line-height: 1.9; color: var(--sc-violet); }
.ct-illus .ct-cap { text-align: center; }

/* ---------- Illustration: approval pipeline ---------- */
.ct-flow__list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.ct-step { position: relative; display: flex; flex-direction: column; gap: 6px; margin-inline-end: 28px; padding: 20px 18px 22px; background: var(--sc-surface); border: 1px solid var(--sc-line); border-radius: 6px; }
.ct-step:last-child { margin-inline-end: 0; }
/* arrow to the next step (RTL: the next step sits to the left) */
.ct-step:not(:last-child)::after {
  content: ""; position: absolute; top: 50%; inset-inline-end: -19px; width: 10px; height: 10px; margin-top: -5px;
  border-top: 2px solid var(--sc-ink-3); border-left: 2px solid var(--sc-ink-3); transform: rotate(-45deg);
}
.ct-step__n { font-family: var(--sc-lat); font-size: 14px; font-weight: 500; letter-spacing: .14em; line-height: 1.9; color: var(--sc-violet); }
.ct-step__t { font-size: 20px; font-weight: 700; line-height: 1.5; }
.ct-step__d { font-size: 15px; line-height: 1.9; color: var(--sc-ink-2); text-wrap: pretty; }
.ct-step--gate { background: var(--sc-violet); border-color: var(--sc-violet); color: #FFFFFF; box-shadow: 0 18px 36px -20px rgba(96, 25, 180, .7); }
.ct-step--gate .ct-step__n, .ct-step--gate .ct-step__d { color: rgba(255, 255, 255, .9); }
.ct-gate { align-self: flex-start; margin-top: 6px; padding: 0 10px; border: 1px solid rgba(255, 255, 255, .55); border-radius: 2px; font-size: 14px; font-weight: 500; line-height: 1.9; }
.ct-flow__note { margin: 22px 0 0; font-size: 17px; font-weight: 500; line-height: 1.9; text-align: center; }
.ct-flow__note::before { content: ""; display: inline-block; width: 12px; height: 2px; margin-inline-end: 10px; vertical-align: middle; background: var(--sc-teal); }
@media (max-width: 1100px) {
  .ct-flow__list { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin-inline: auto; }
  .ct-step { margin-inline-end: 0; margin-bottom: 26px; }
  .ct-step:last-child { margin-bottom: 0; }
  .ct-step:not(:last-child)::after { top: auto; bottom: -19px; inset-inline-end: auto; inset-inline-start: 50%; margin: 0 -5px 0 0; transform: rotate(-135deg); }
}

/* ---------- Next work ---------- */
.ct-next { padding-block: clamp(56px, 6vw, 96px); }
.ct-next__h { margin: 0 0 16px; font-size: 15px; font-weight: 500; line-height: 1.9; color: var(--sc-ink-2); }
.ct-next .sc-row__title { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.625rem); line-height: 1.6; }
.ct-next .sc-row__thumb { width: clamp(112px, 14vw, 176px); }
.ct-next .sc-tag { margin-top: 6px; }
.ct-next__all { margin-top: 22px; }

/* ---------- Closing consult band ---------- */
.ct-cta { position: relative; overflow: hidden; padding-block: clamp(72px, 8vw, 128px); background: var(--sc-bg); border-top: 1px solid var(--sc-line); }
.ct-cta__in { position: relative; z-index: 1; }
.ct-cta .sc-h2 { max-width: 15em; }
.ct-cta .sc-lead { max-width: 34em; margin-top: 18px; }
.ct-cta .sc-actions { margin-top: 30px; }
.ct-cta__blade { position: absolute; z-index: 0; bottom: clamp(24px, 4vw, 64px); inset-inline-end: -2%; width: clamp(200px, 26vw, 420px); }
@media (max-width: 767px) {
  .ct-cta { padding-bottom: 150px; }
  .ct-cta__blade { bottom: 28px; width: 220px; }
}
@media (max-width: 599px) {
  /* phones: the stacked buttons close the page; no lone slab under them (same as the home page) */
  .ct-cta { padding-bottom: clamp(72px, 8vw, 128px); }
  .ct-cta__blade { display: none; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .ct *, .ct *::before, .ct *::after { transition: none !important; animation: none !important; }
}
