/* Case study page additions. Built on the tokens and components in mobii.css. */

/* logo in place of the text wordmark */
.wordmark .logo-svg { display: block; height: 28px; width: auto; color: var(--fg); }
.site-header .wrap { grid-template-columns: 1fr auto; }

/* hero: real broadcast frame inside the concept's art panel */
.art.photo { min-height: 0; align-items: center; }
.board img { display: block; width: 100%; height: auto; }

/* screenshots */
.shot { margin: 0; display: grid; gap: 10px; align-content: start; }
.shot img { display: block; width: 100%; height: auto; border-radius: var(--r); border: 1px solid var(--line); }
.shot figcaption { color: var(--fg-3); font-size: var(--fs-sm); max-width: 70ch; }
.shot figcaption .mono { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); margin-right: 6px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.panel { padding: clamp(16px, 2.5vw, 24px); }

/* video */
.video { position: relative; width: 100%; aspect-ratio: 16 / 9; background: var(--art-ink); border-radius: var(--r); overflow: hidden; }
.video mobii-player { display: block; width: 100%; height: 100%; }

/* before and after */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.duo .tl-item { grid-template-columns: 76px 14px 1fr; }
.mock-foot { display: grid; gap: 4px; padding: 16px; border-top: 1px solid var(--line); }
.mock-foot b { font-weight: 300; font-size: clamp(30px, 3.4vw, 40px); letter-spacing: -0.03em; line-height: 1; }
.mock-foot b.go { color: var(--brand-text); }
.mock-foot span { color: var(--fg-3); font-size: var(--fs-sm); }

/* rules table, using the comparison table look with left aligned cells */
.rules td { text-align: left; color: var(--fg); }
.rules thead th:not(:first-child) { text-align: left; }
.compare.rules { min-width: 520px; }

/* team panel */
.team .ch { color: var(--fg); border-color: var(--line); }
.team .ch .id { color: var(--fg-3); }
.team .ch .name small { color: var(--fg-3); }

/* outcome band */
.cta .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 40px; max-width: 900px; text-align: left; margin-top: 8px; }
.cta .cols p { max-width: none; }

/* footer */
.giant-logo { display: block; width: min(100%, 980px); height: auto; margin: 56px auto 0; color: var(--fg-3);
  -webkit-mask-image: linear-gradient(180deg, #000 10%, transparent 95%); mask-image: linear-gradient(180deg, #000 10%, transparent 95%); }

@media (max-width: 900px) {
  .duo, .cta .cols { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .pair { grid-template-columns: 1fr; }
}

/* equal height before and after panels */
.duo .mock { display: flex; flex-direction: column; }
.duo .tl { flex: 1; }
.team .ch { grid-template-columns: 84px 1fr auto; }

/* PRISM brand elements, from the PRISM Design System */
:root {
  --prism-beam: linear-gradient(90deg, #785FC1 0%, #785FC1 21%, #62B4DB 45%, #FCD767 61%, #FC523B 90%, #FC523B 100%);
  --app-fusion: #F97315; --app-studio: #EFBF04; --app-code: #21C55D; --app-zenith: #A854F8; --app-prism: #7960C2;
}
.site-header::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: var(--prism-beam); }
/* the header sits at the top of the page and scrolls away with it: no tray behind it and no divider under it */
.site-header { position: relative; top: auto; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 0; }

/* dark lockups (white wordmark) by default, light lockups (black wordmark) in light theme */
.on-light { display: none; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .on-dark { display: none; } :root:not([data-theme="dark"]) .on-light { display: block; } }
:root[data-theme="light"] .on-dark { display: none; }
:root[data-theme="light"] .on-light { display: block; }

.products { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.product { padding: 24px 22px 26px; display: grid; gap: 16px; align-content: start; position: relative; overflow: hidden; }
.product::after { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: var(--acc); }
.product img { height: 30px; width: auto; max-width: 100%; }
.product p { color: var(--fg-2); font-size: 14px; }
@media (max-width: 1080px) { .products { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .products { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .products { grid-template-columns: 1fr; } }

.chip img.app { width: 16px; height: 16px; border-radius: 3px; display: block; }

/* ===== Overview / detail layout (v3) ===== */

/* header: logo | view switch | theme */
.site-header .wrap { grid-template-columns: 1fr auto 1fr; }
.viewswitch { justify-self: center; }
.viewswitch button { padding: 6px 14px; }
@media (max-width: 520px) { .viewswitch button { padding: 6px 10px; font-size: 12px; } .wordmark .logo-svg { height: 22px; } }

/* dotted arrow list, after the concept references */
.arrows { list-style: none; margin: 8px 0 0; padding: 0; display: grid; max-width: 440px; }
.arrows li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line-2); color: var(--fg); }
.arrows svg { flex: none; width: 18px; height: 18px; margin-top: 3px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; }

/* image set inside a gradient panel, after the concept references */
.frame { position: relative; border-radius: var(--r-lg); overflow: hidden; padding: clamp(18px, 4vw, 48px); isolation: isolate;
  background: radial-gradient(90% 70% at 85% 0%, #4096FF 0%, transparent 60%), radial-gradient(80% 80% at 0% 100%, #2BC4B4 0%, transparent 55%), linear-gradient(160deg, #7B61FF 0%, #2D1790 60%, var(--art-ink) 100%); }
.frame::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.35) 1px, transparent 1.2px); background-size: 10px 10px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 80%); mask-image: linear-gradient(180deg, #000, transparent 80%); }
.frame img { display: block; width: 100%; height: auto; border-radius: var(--r); border: 1px solid rgba(255,255,255,.25); box-shadow: 0 0 0 6px rgba(255,255,255,.08), 0 20px 50px -10px rgba(0,0,0,.6); }
.feature .frame + figcaption, .frame-cap { color: var(--fg-3); font-size: var(--fs-sm); margin-top: 10px; }

/* section summary */
.summary-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.summary-grid > * { min-width: 0; }
.summary-grid h2 { font-size: var(--fs-h2); max-width: 16ch; }
.big-line { font-size: clamp(19px, 1.9vw, 23px); font-weight: 300; line-height: 1.4; letter-spacing: -0.01em; max-width: 34ch; color: var(--fg); }

/* expandable detail */
details.more { margin-top: clamp(32px, 4vw, 48px); }
details.more > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 18px;
  border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg-2); font-size: 14px; font-weight: 500; color: var(--fg); transition: border-color .1s var(--ease), color .1s var(--ease); }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary:hover { border-color: var(--blue); color: var(--blue); }
details.more > summary .i { width: 16px; height: 16px; transition: transform .2s var(--ease); }
details.more[open] > summary .i { transform: rotate(45deg); }
details.more > summary .when-open { display: none; }
details.more[open] > summary .when-open { display: inline; }
details.more[open] > summary .when-closed { display: none; }
.more-body { margin-top: 32px; padding-top: 32px; border-top: 1px dashed var(--line-2); display: grid; gap: clamp(32px, 4vw, 56px); }
.more-body > * { min-width: 0; }
.more-body h3.sub { font-size: clamp(24px, 2.6vw, 32px); }

/* format cards, after the journal card reference */
.fcards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fcard { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 20px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); align-items: stretch; }
.fcard img { width: 100%; height: 100%; min-height: 170px; object-fit: cover; border-radius: var(--r); display: block; }
.fcard .body { display: grid; align-content: space-between; gap: 18px; padding: 6px 6px 6px 0; }
.fcard .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fcard .tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; padding: 3px 8px; border-radius: var(--r-sm); background: var(--card-2); color: var(--fg); }
.fcard .where { font-size: 12px; color: var(--fg-3); }
.fcard h3 { font-size: 22px; font-weight: 400; letter-spacing: -0.015em; margin-bottom: 6px; }
.fcard p { color: var(--fg-2); font-size: 14px; }
@media (max-width: 1000px) { .fcards { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .fcard { grid-template-columns: 1fr; } .fcard img { min-height: 0; aspect-ratio: 16/9; } }

/* product strip in the overview */
.lockups { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; margin-top: 8px; }
.lockups img { height: 22px; width: auto; }

@media (max-width: 900px) { .summary-grid { grid-template-columns: 1fr; } }
.frame .video { border-radius: var(--r); border: 1px solid rgba(255,255,255,.25); box-shadow: 0 0 0 6px rgba(255,255,255,.08), 0 20px 50px -10px rgba(0,0,0,.6); }

/* ===== v4 ===== */
/* no corner dots on panels */
.ticks { background-image: none; }

/* product chips: larger icon, product name only */
.chip { font-size: 14px; padding: 5px 12px 5px 6px; gap: 10px; }
.chip img.app { width: 24px; height: 24px; border-radius: 5px; }

/* video features: text across the top, video at full width below */
.feature.stacked { grid-template-columns: 1fr; gap: 28px; }
.feature.stacked.flip > :first-child { order: 0; }
.feature.stacked > .stack { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); grid-template-areas: "chip text" "title text" "title list" ". list"; gap: 14px 48px; align-items: start; }
.feature.stacked > .stack > .chip { grid-area: chip; }
.feature.stacked > .stack > h3 { grid-area: title; }
.feature.stacked > .stack > p { grid-area: text; }
.feature.stacked > .stack > ul { grid-area: list; margin: 0; max-width: none; }
.feature.stacked .frame { padding: clamp(12px, 3vw, 40px); }
@media (max-width: 900px) { .feature.stacked > .stack { grid-template-columns: 1fr; grid-template-areas: "chip" "title" "text" "list"; } }

/* main stage and thumbnails */
.stage { display: grid; gap: 12px; }
.stage .video img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.thumb { padding: 0; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--card); cursor: pointer; overflow: hidden; text-align: left; display: grid; transition: border-color .1s var(--ease); }
.thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; opacity: .7; transition: opacity .1s var(--ease); }
.thumb .tl { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; }
.thumb .tl b { font-weight: 500; font-size: 14px; color: var(--fg); }
.thumb .tl span { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); }
.thumb:hover { border-color: var(--blue); }
.thumb:hover img, .thumb[aria-pressed="true"] img { opacity: 1; }
.thumb[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
@media (max-width: 900px) { .thumbs { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .thumbs { grid-template-columns: 1fr 1fr; } }

/* in the media */
.press { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.presscard { display: grid; gap: 14px; align-content: start; padding: 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); text-decoration: none; transition: border-color .1s var(--ease); }
.presscard:hover { border-color: var(--blue); }
.presscard:hover h3 { color: var(--blue); }
.presscard .meta { display: flex; justify-content: space-between; align-items: center; }
.presscard .tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; padding: 3px 8px; border-radius: var(--r-sm); background: var(--card-2); color: var(--fg); }
.presscard .where { font-size: 12px; color: var(--fg-3); }
.presscard h3 { font-size: 21px; font-weight: 400; letter-spacing: -0.015em; line-height: 1.25; transition: color .1s var(--ease); }
.presscard p { color: var(--fg-2); font-size: 14px; }
.presscard .src { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--fg); margin-top: 4px; }
.presscard .src svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; }
@media (max-width: 800px) { .press { grid-template-columns: 1fr; } }

/* ===== v5 ===== */
/* section labels: filled so the reader always knows where they are */
.eyebrow { background: var(--brand); border-color: transparent; color: #fff; --tick: transparent; font-weight: 700; }
.eyebrow .dot { background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.25); }
.cta .eyebrow { background: rgba(255,255,255,.14); color: #fff; }

/* award line in the hero */
.award { display: inline-flex; gap: 12px; align-items: center; padding: 10px 16px 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg-2); text-decoration: none; color: var(--fg); width: max-content; max-width: 100%; transition: border-color .1s var(--ease); }
.award:hover { border-color: #EFBF04; }
.award .ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(239,191,4,.14); color: #EFBF04; flex: none; }
.award .ic svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.award b { display: block; font-weight: 500; font-size: 14px; }
.award span.s { display: block; font-size: 12px; color: var(--fg-3); }

/* how AI makes it work */
.ai3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ai3 .step { padding: 28px 26px; display: grid; gap: 12px; align-content: start; }
.ai3 .n { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; color: var(--brand-text); }
.ai3 h3 { font-size: 24px; font-weight: 400; }
.ai3 p { color: var(--fg-2); font-size: 15px; }
@media (max-width: 900px) { .ai3 { grid-template-columns: 1fr; } }

/* now playing caption under the stage */
.nowplaying { display: grid; grid-template-columns: auto 1fr; gap: 6px 24px; align-items: baseline; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.nowplaying .tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; padding: 3px 8px; border-radius: var(--r-sm); background: var(--card-2); color: var(--fg); grid-row: span 2; align-self: center; }
.nowplaying h3 { font-size: 22px; font-weight: 400; }
.nowplaying p { color: var(--fg-2); font-size: 14px; }
@media (max-width: 560px) { .nowplaying { grid-template-columns: 1fr; } .nowplaying .tag { grid-row: auto; width: max-content; } }

/* product roles in the overview */
.roles { display: grid; gap: 0; border-top: 1px solid var(--line-2); }
.roles > div { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.roles img { height: 24px; width: auto; }
.roles span { color: var(--fg-2); font-size: 14px; }

/* product detail rows */
.prodrows { display: grid; gap: 12px; }
.prodrow { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); gap: 16px 48px; padding: 28px; position: relative; overflow: hidden; }
.prodrow::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--acc); }
.prodrow .who { display: grid; gap: 12px; align-content: start; }
.prodrow .who img { height: 30px; width: auto; }
.prodrow .who h4 { margin: 0; font-size: 19px; font-weight: 400; letter-spacing: -0.01em; }
.prodrow .who p { color: var(--fg-2); font-size: 14px; }
.prodrow .arrows { max-width: none; margin: 0; }
.prodrow .arrows li { font-size: 14px; padding: 11px 0; }
@media (max-width: 900px) { .prodrow { grid-template-columns: 1fr; } .roles > div { grid-template-columns: 1fr; gap: 6px; } }

/* flexibility points under automation rules */
.flex3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.flex3 > div { padding: 22px; display: grid; gap: 8px; align-content: start; }
.flex3 h4 { margin: 0; font-size: 17px; font-weight: 500; }
.flex3 p { color: var(--fg-2); font-size: 14px; }
@media (max-width: 900px) { .flex3 { grid-template-columns: 1fr; } }
.duo .mock-foot { gap: 8px; padding: 20px 16px; }
.duo .mock-foot b { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.1; }
.duo .mock-foot span { font-size: 14px; color: var(--fg-2); max-width: 46ch; }

/* ===== mobile fixes ===== */
.award { width: fit-content; }
.award > span:last-child { min-width: 0; }
.eyebrow { width: fit-content; max-width: 100%; white-space: normal; line-height: 1.5; }
.hero-grid > .stack, .summary-grid > .stack { min-width: 0; grid-template-columns: minmax(0, 1fr); }
@media (max-width: 560px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi { padding: 16px; }
  .kpi b { font-size: 32px; }
  .duo .tl-item { grid-template-columns: 64px 12px 1fr; gap: 8px; }
  .mock-head { flex-direction: column; align-items: flex-start; gap: 2px; }
  .prodrow { padding: 20px; }
  .feature { padding: 20px; }
  .feature.stacked .frame, .frame { padding: 10px; }
  .big-line { font-size: 18px; }
  .thumb .tl { padding: 8px 10px; }
  .thumb .tl b { font-size: 13px; }
  .presscard { padding: 18px; }
  .presscard h3 { font-size: 18px; }
  .cta .cols { gap: 12px; }
  .board-foot div { padding: 8px 10px; }
}
@media (max-width: 600px) {
  /* rules table becomes stacked rows */
  .compare.rules { min-width: 0; }
  .compare.rules thead { display: none; }
  .compare.rules tr { display: grid; gap: 4px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .compare.rules tr:last-child { border-bottom: 0; }
  .compare.rules th, .compare.rules td { display: block; padding: 0; border: 0; }
  .compare.rules th::before { content: "When "; color: var(--fg-3); font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; margin-right: 4px; }
  .compare.rules td::before { content: "Then "; color: var(--brand-text); font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; margin-right: 4px; }
  /* thumbnails become a swipeable strip */
  .thumbs { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; padding-bottom: 6px; margin-inline: -16px; padding-inline: 16px; scrollbar-width: thin; }
  .thumb { flex: 0 0 62%; scroll-snap-align: start; }
}

/* client logos and project facts, used on the NASCAR case study */
.cs-logos { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; }
.cs-logos img { width: auto; display: block; }
.cs-logos .sep { width: 1px; height: 28px; background: var(--line-2); }
:root[data-theme="light"] .cs-logos img { filter: invert(1); }
.cs-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: clamp(36px, 5vw, 56px); border-top: 1px solid var(--line); }
.cs-facts > div { padding: 18px 20px 0 0; display: grid; gap: 6px; }
.cs-facts dt { font-family: "Space Mono", monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); }
.cs-facts dd { margin: 0; font-size: 15px; color: var(--fg); }
@media (max-width: 800px) { .cs-facts { grid-template-columns: 1fr 1fr; gap: 0 12px; } .cs-facts > div { padding-bottom: 14px; } }

/* clean images, after the designer's product pages: a picture sits on the page as it is, with rounded corners and a
   fine edge in the line colour, and no gradient panel or padding round it */
.frame { padding: 0; background: none; overflow: visible; border-radius: var(--r); }
.frame::before { display: none; }
.frame img, .frame .video { border: 0; border-radius: var(--r); box-shadow: 0 0 0 1px var(--line-2); }
.feature.stacked .frame { padding: 0; }
.art.photo { padding: 0; background: none; border-radius: var(--r-lg); }
.art.photo::before { display: none; }
.art.photo .board { border-color: var(--line-2); }
.art.shot, .hero-grid .art.shot { padding: 0; background: none; min-height: 0; align-items: center; overflow: visible; }
.art.shot::before { display: none; }
.art.shot img { display: block; width: 100%; height: auto; border-radius: var(--r); box-shadow: 0 0 0 1px var(--line-2); }

/* the Overview / More detail switch on the case studies: a pill that floats at the foot of the window, so it stays to
   hand while the main navigation sits in the header */
.viewswitch-float { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40; }
.viewswitch-float .toggle { box-shadow: 0 10px 30px -8px rgba(0,0,0,.5); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg-2) 85%, transparent); }
