/* Greta Bartkute portfolio.
   Signature: the "redline". Red numbered markers and notes, the way I annotate real design work. */

:root {
  --paper: #fbfaf7;
  --card: #ffffff;
  --soft: #f1efe9;
  --ink: #16181d;
  --ink-2: #4b4d55;
  --muted: #6f6e68;
  --line: #e4e1d9;
  --red: #e2462c;
  --red-soft: #fde9e4;
  --good: #2f8a57;
  --warn: #b7791f;
  --display: "Roboto Slab", "Clarendon", Georgia, serif;
  --text: "Host Grotesk", "Helvetica Neue", system-ui, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--text); font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red); }
button { font: inherit; color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 300; line-height: 1.16; letter-spacing: normal; }
/* Display face is Roboto Slab Light (free stand-in for Clarendon BT Light). Only 300 is loaded; never fake a bold. */
html { font-synthesis: none; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 10; }

.kicker { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.kicker b { color: var(--red); font-weight: 700; }

/* header */
.site-head .wrap { display: flex; justify-content: space-between; align-items: center; height: 84px; gap: 16px; }
.site-head .name { font-family: var(--display); font-weight: 600; font-size: 19px; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.site-head .name::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.site-head nav { display: flex; gap: clamp(14px, 3vw, 36px); }
.site-head nav a { text-decoration: none; font-size: 16px; }
.site-head nav a[aria-current="page"] { color: var(--red); }

/* ---------- home ---------- */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 112px); }
.hero h1 { font-size: clamp(40px, 5.6vw, 76px); letter-spacing: normal; margin: 14px 0 24px; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero p { font-size: 19px; color: var(--ink-2); max-width: 560px; }
.hero .now { font-size: 16px; color: var(--muted); margin-top: 20px; }
.hero .now a { color: var(--ink); }
.desk { position: relative; aspect-ratio: 5 / 4; }
.desk figure { position: absolute; margin: 0; background: var(--card); padding: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 14px 40px rgba(0,0,0,.10); }
.desk figure img { width: 100%; }
.desk figcaption { font-size: 13px; color: var(--ink-2); padding: 8px 4px 2px; display: flex; gap: 8px; align-items: baseline; }
.desk figcaption b { color: var(--red); font-family: var(--display); }
.desk .d1 { width: 56%; left: 0; top: 6%; transform: rotate(-3deg); }
.desk .d2 { width: 40%; right: 0; top: 0; transform: rotate(2.5deg); }
.desk .d3 { width: 60%; left: 22%; top: 47%; transform: rotate(-.5deg); }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } .desk { max-width: 560px; } }
/* home hero portrait: photo with an offset redline frame */
.me { position: relative; margin: 0 18px 18px 0; justify-self: end; width: min(100%, 430px); }
.me::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border: 1.5px solid var(--red); border-radius: 24px; }
.me img { position: relative; display: block; width: 100%; height: auto; border-radius: 24px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 18px 48px rgba(22,24,29,.14); }
.me figcaption { position: absolute; left: -28px; bottom: 44px; display: grid; gap: 2px; background: var(--card); border-radius: 10px; padding: 10px 14px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 10px 28px rgba(22,24,29,.12); }
.me figcaption b { font-family: var(--display); font-weight: 300; font-size: 19px; line-height: 1.2; color: var(--ink); }
.me figcaption span { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 900px) { .me { justify-self: start; width: min(100% - 18px, 340px); } .me figcaption { left: 14px; bottom: 18px; } }

.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-top: 1px solid var(--ink); padding-top: 14px; margin-bottom: 36px; flex-wrap: wrap; }
.section-title h2 { font-size: clamp(26px, 3vw, 36px); }
.section-title span { color: var(--muted); font-size: 15px; }

.work { display: grid; gap: clamp(56px, 8vw, 104px); padding-bottom: clamp(64px, 9vw, 120px); }
.work-item { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: end; text-decoration: none; }
.work-item:hover { color: inherit; }
.work-item .img { background: var(--soft); overflow: hidden; }
.work-item .img img { width: 100%; transition: transform .8s ease; }
.work-item:hover .img img { transform: scale(1.02); }
.work-item .num { font-family: var(--display); color: var(--red); font-size: 15px; font-weight: 600; }
.work-item h3 { font-size: clamp(26px, 2.8vw, 36px); margin: 6px 0 12px; }
.work-item p { color: var(--ink-2); }
.score { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); margin: 18px 0; }
.score div { padding: 12px 10px 0 0; }
.score b { display: block; font-family: var(--display); font-size: 24px; font-weight: 500; letter-spacing: normal; }
.score span { font-size: 13px; color: var(--muted); line-height: 1.35; display: block; }
.go { font-weight: 600; font-size: 16px; display: inline-flex; gap: 8px; align-items: center; }
.go::after { content: "→"; color: var(--red); transition: transform .25s; }
.work-item:hover .go::after { transform: translateX(4px); }
@media (max-width: 860px) { .work-item { grid-template-columns: 1fr; } }

.two { display: grid; grid-template-columns: 1fr 1.5fr; gap: clamp(32px, 6vw, 96px); padding: clamp(56px, 8vw, 104px) 0; border-top: 1px solid var(--ink); }
.two h2 { font-size: clamp(26px, 3vw, 36px); }
.two p, .two li { color: var(--ink-2); }
.principles { list-style: none; padding: 0; margin: 8px 0 0; counter-reset: p; }
.principles li { counter-increment: p; display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.principles li::before { content: counter(p); width: 24px; height: 24px; border-radius: 50%; background: var(--red); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; margin-top: 2px; }
.principles strong { color: var(--ink); }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.btn { display: inline-block; padding: 12px 20px; border: 1px solid var(--ink); text-decoration: none; font-weight: 600; transition: background-color .3s ease, border-color .3s ease, color .3s ease; }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn:hover { background: var(--red); border-color: var(--red); color: #fff; }
.site-foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); font-size: 14px; }
@media (max-width: 820px) { .two { grid-template-columns: 1fr; } }

/* ---------- case study ---------- */
.cs-head { padding: clamp(28px, 5vw, 64px) 0 0; }
.cs-head h1 { font-size: clamp(36px, 5vw, 64px); letter-spacing: normal; max-width: 18ch; margin: 12px 0 20px; }
.cs-head .lede { font-size: 20px; color: var(--ink-2); max-width: 640px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; border-top: 1px solid var(--ink); padding-top: 14px; margin-top: 32px; }
.facts dt { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.facts dd { margin: 0; font-size: 15px; }
.cover { margin-top: 40px; }
.cover img { width: 100%; }
@media (max-width: 820px) { .facts { grid-template-columns: 1fr 1fr; } }

/* dashboard: results at a glance */
.dash { background: var(--ink); color: var(--paper); margin-top: 16px; padding: clamp(24px, 3vw, 36px); display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); gap: 24px; align-items: end; }
.dash h2 { font-size: 22px; color: var(--paper); }
.dash h2 small { display: block; font-family: var(--text); font-size: 14px; font-weight: 400; color: #b9b7b0; margin-top: 8px; letter-spacing: 0; line-height: 1.45; }
.dash div b { display: block; font-family: var(--display); font-size: clamp(32px, 3.6vw, 46px); font-weight: 500; letter-spacing: normal; line-height: 1; }
.dash div span { font-size: 14px; color: #c9c7c0; display: block; margin-top: 6px; line-height: 1.4; }
.dash a { color: var(--paper); }
.dash .tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--red); margin-bottom: 6px; }
@media (max-width: 860px) { .dash { grid-template-columns: 1fr 1fr; } .dash h2 { grid-column: 1 / -1; } }

/* body layout: text column + margin notes */
.cs { padding-bottom: 32px; }
.chapter { padding-top: clamp(56px, 7vw, 96px); }
.chapter > h2, .chapter .h2 { font-size: clamp(28px, 3.2vw, 42px); letter-spacing: normal; max-width: 20ch; margin-bottom: 18px; }
.chapter h3 { font-size: 22px; margin: 44px 0 10px; }
.chapter p, .chapter li { color: var(--ink-2); }
.chapter ul, .chapter ol { padding-left: 22px; }
.chapter li { margin-bottom: 6px; }
.col { max-width: 680px; }
.with-note { display: grid; grid-template-columns: minmax(0, 680px) 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.note { border-left: 2px solid var(--red); padding: 4px 0 4px 16px; font-size: 15px; color: var(--ink-2); margin-top: 6px; }
.note .kicker { display: block; color: var(--red); margin-bottom: 4px; }
.note p { margin: 0; }
@media (max-width: 900px) { .with-note { grid-template-columns: 1fr; } }
.skip-note { margin-top: 24px; color: var(--ink-2); }
.skip-note a { color: var(--ink); font-weight: 600; }

.split { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(24px, 4vw, 56px); align-items: center; margin-top: clamp(40px, 5vw, 64px); }
.split.flip > :first-child { order: 2; }
.split h3:first-child { margin-top: 0; }
.step { font-family: var(--display); color: var(--red); font-weight: 600; margin-right: 6px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split.flip > :first-child { order: 0; } }

figure { margin: 0; }
figure img { width: 100%; cursor: zoom-in; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
.row { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 14px; }
@media (max-width: 700px) { .row { grid-template-columns: 1fr; } .row.keep { grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); } }

/* learned → did, with links to annotated screens */
.learn { margin-top: 20px; border-top: 1px solid var(--ink); }
.learn-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: start; transition: background .2s; }
.learn-row:hover { background: var(--card); }
.learn-row .k { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 2px; }
.learn-row p { margin: 0; color: var(--ink-2); }
.learn-row p:first-of-type { color: var(--ink); }
.learn-row a { font-size: 14px; font-weight: 600; white-space: nowrap; text-decoration: none; color: var(--red); }
@media (max-width: 760px) { .learn-row { grid-template-columns: 1fr; gap: 6px; } }

/* annotated screen: the signature */
.anno { margin-top: 28px; }
.anno-stage { position: relative; }
.anno-stage img { width: 100%; cursor: default; }
.pin { position: absolute; transform: translate(-50%, -50%); width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; background: var(--red); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.3); transition: transform .2s; padding: 0; }
.pin::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid var(--red); opacity: 0; transition: opacity .2s; }
.pin:hover, .pin.on { transform: translate(-50%, -50%) scale(1.15); }
.pin.on::after { opacity: 1; }
.anno-notes { list-style: none; padding: 0 !important; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 28px; counter-reset: n; }
.anno-notes li { counter-increment: n; display: grid; grid-template-columns: 24px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; margin: 0; cursor: pointer; transition: color .2s; }
.anno-notes li::before { content: counter(n); width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; margin-top: 2px; transition: background .2s; }
.anno-notes li.on { color: var(--ink); }
.anno-notes li.on::before { background: var(--red); }
.anno-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.anno-head h3 { margin: 0; }
.anno-head span { font-size: 14px; color: var(--muted); }

.mini { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 48px; }
.mini h4 { font-size: 17px; margin: 12px 0 4px; }
.mini p { font-size: 15px; margin: 0; }
@media (max-width: 820px) { .mini { grid-template-columns: 1fr 1fr; } }

/* decisions */
.decisions { list-style: none; padding: 0 !important; counter-reset: d; margin: 12px 0 0; }
.decisions li { counter-increment: d; display: grid; grid-template-columns: 48px 1fr 1fr; gap: 20px; padding: 20px 0; border-top: 1px solid var(--line); margin: 0; }
.decisions li:last-child { border-bottom: 1px solid var(--line); }
.decisions li::before { content: counter(d, decimal-leading-zero); font-family: var(--display); font-size: 22px; color: var(--red); }
.decisions strong { display: block; color: var(--ink); font-family: var(--display); font-weight: 500; font-size: 19px; margin-bottom: 4px; }
.decisions .cost { font-size: 15px; }
.decisions .cost b { color: var(--ink); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; display: block; margin-bottom: 2px; }
@media (max-width: 760px) { .decisions li { grid-template-columns: 36px 1fr; } .decisions .cost { grid-column: 2; } }

/* results */
.source { font-size: 14px; color: var(--muted); margin-top: 16px; }
.source a { color: var(--muted); }

/* next */
.next { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; border-top: 1px solid var(--ink); margin-top: clamp(64px, 9vw, 112px); padding-top: 24px; text-decoration: none; }
.next h3 { font-size: clamp(26px, 3vw, 38px); margin-top: 6px; }
.next .img { background: var(--soft); overflow: hidden; }
.next .img img { transition: transform .8s ease; }
@media (max-width: 760px) { .next { grid-template-columns: 1fr; } }

/* tree test */
.tt { margin-top: 24px; display: grid; grid-template-columns: 1fr 300px; gap: 32px; background: var(--card); border: 1px solid var(--line); padding: 24px; }
.tt-rows { display: grid; gap: 4px; }
.tt-row { appearance: none; background: none; border: 0; padding: 8px; margin: 0 -8px; cursor: pointer; text-align: left; display: grid; grid-template-columns: 130px 1fr 44px; gap: 14px; align-items: center; }
.tt-row:hover, .tt-row.on { background: var(--soft); }
.tt-row .lbl { font-size: 15px; }
.tt-row .track { position: relative; height: 12px; background: var(--soft); }
.tt-row .bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink-2); }
.tt-row.low .bar { background: var(--red); }
.tt-row .val { font-size: 15px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.tt-detail { font-size: 15px; border-left: 1px solid var(--line); padding-left: 24px; }
.tt-detail .k { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 14px 0 2px; }
.tt-detail .k:first-child { margin-top: 0; }
.tt-detail p { margin: 0; }
.tt-detail .big { font-family: var(--display); font-size: 40px; line-height: 1; color: var(--ink); }
.chart-note { font-size: 14px; color: var(--muted); margin-top: 12px; }
@media (max-width: 860px) { .tt { grid-template-columns: 1fr; } .tt-detail { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 16px; } }
@media (max-width: 480px) { .tt { padding: 16px; } .tt-row { grid-template-columns: 90px 1fr 40px; gap: 10px; } }

/* journey */
.journey-card { background: var(--card); border: 1px solid var(--line); padding: 24px; margin-top: 24px; }
.journey { overflow-x: auto; }
.journey svg { width: 100%; min-width: 660px; height: auto; display: block; overflow: visible; }
.journey .step-hit { cursor: pointer; }
.journey-detail { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 24px; margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 15px; min-height: 130px; }
.journey-detail .k { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.journey-detail ul { margin: 0; padding-left: 18px; }
.journey-detail p, .journey-detail li { margin: 0; color: var(--ink-2); }
.journey-detail .thought { font-family: var(--display); font-size: 20px; color: var(--ink); line-height: 1.3; }
@media (max-width: 760px) { .journey-detail { grid-template-columns: 1fr; } .journey-card { padding: 16px; } }

/* before / after */
.steps { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 48px); margin-top: 24px; }
.steps h3 { margin: 0 0 8px; font-size: 18px; }
.steps h3 b { color: var(--red); }
.steps ol { margin: 0; padding-left: 22px; }
.steps li { margin: 0; padding: 7px 0; border-bottom: 1px solid var(--line); transition: opacity .2s, color .2s; }
.steps .back { color: var(--red); font-size: 13px; font-weight: 600; }
.steps.linking .before li { opacity: .3; }
.steps.linking .before li.hit { opacity: 1; color: var(--ink); }
.steps.linking .after li.on { color: var(--ink); font-weight: 700; }
@media (max-width: 700px) { .steps { grid-template-columns: 1fr; } }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(251,250,247,.97); display: none; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox.open { display: grid; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox button { position: absolute; top: 16px; right: 16px; background: none; border: 0; font-size: 30px; cursor: pointer; line-height: 1; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }

/* ---------- design system case study ---------- */
.plate { background: var(--soft); padding: clamp(16px, 3vw, 40px); }
.plate img { box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 10px 30px rgba(0,0,0,.08); background: #fff; }
.shot img { border-radius: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 12px 36px rgba(0,0,0,.10); }

.phases { list-style: none; padding: 0 !important; margin: 24px 0 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; border-top: 1px solid var(--ink); counter-reset: ph; }
.phases li { counter-increment: ph; padding: 14px 14px 0 0; margin: 0; font-size: 15px; }
.phases li::before { content: counter(ph); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; margin-bottom: 10px; }
.phases strong { display: block; color: var(--ink); font-family: var(--display); font-weight: 500; font-size: 17px; line-height: 1.2; margin-bottom: 4px; }
@media (max-width: 900px) { .phases { grid-template-columns: repeat(2, 1fr); } }

.libs { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 15px; }
.libs th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0 12px 8px 0; border-bottom: 1px solid var(--ink); }
.libs td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: top; }
.libs td:first-child { color: var(--ink); font-weight: 600; white-space: nowrap; }
.libs tr.win td { background: var(--red-soft); }
.libs tr.win td:first-child { padding-left: 10px; }
.libs .v { font-weight: 700; color: var(--red); }

.chain { display: flex; align-items: stretch; flex-wrap: wrap; gap: 0; margin-top: 20px; }
.chain div { background: var(--card); border: 1px solid var(--line); padding: 14px 16px; min-width: 180px; flex: 1; }
.chain div .k { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.chain code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 14px; color: var(--ink); }
.chain .arrow { flex: 0 0 auto; min-width: 0; background: none; border: 0; display: grid; place-items: center; color: var(--red); font-size: 20px; padding: 0 10px; }
.chain .sw { display: inline-block; width: 14px; height: 14px; background: #3A2AA8; vertical-align: -2px; margin-right: 6px; }
@media (max-width: 700px) { .chain { flex-direction: column; } .chain .arrow { transform: rotate(90deg); padding: 6px 0; } }

.ba { display: grid; grid-template-columns: 1fr 1.6fr; gap: 16px; margin-top: 20px; align-items: start; }
.ba .tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px; }
.ba .tag.b { color: var(--muted); }
.ba .tag.a { color: var(--red); }
@media (max-width: 760px) { .ba { grid-template-columns: 1fr; } }

/* drag-to-compare */
.compare { position: relative; overflow: hidden; margin-top: 20px; cursor: ew-resize; user-select: none; touch-action: pan-y; border-radius: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 12px 36px rgba(0,0,0,.10); }
.compare img { width: 100%; display: block; pointer-events: none; cursor: inherit; }
.compare .top { position: absolute; inset: 0; clip-path: inset(0 50% 0 0); }
.compare .bar { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: var(--red); transform: translateX(-1px); }
.compare .knob { position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; border-radius: 50%; background: var(--red); color: #fff; transform: translate(-50%, -50%); display: grid; place-items: center; font-size: 14px; font-weight: 700; box-shadow: 0 2px 10px rgba(0,0,0,.3); border: 0; cursor: ew-resize; }
.compare .lbl { position: absolute; top: 12px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: rgba(22,24,29,.85); color: #fff; padding: 4px 8px; }
.compare .lbl.l { left: 12px; }
.compare .lbl.r { right: 12px; background: var(--red); }

.dodd { list-style: none; padding: 0 !important; margin: 16px 0 0; display: grid; gap: 0; }
.dodd li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); margin: 0; }
.dodd li::before { content: "✓"; width: 20px; height: 20px; border: 1.5px solid var(--red); color: var(--red); font-size: 12px; font-weight: 700; display: grid; place-items: center; margin-top: 3px; }

.ba-table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 15px; }
.ba-table th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0 12px 8px 0; border-bottom: 1px solid var(--ink); }
.ba-table td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.ba-table td:first-child { color: var(--ink); font-weight: 600; }
.ba-table td:last-child { color: var(--ink); }
.ba-table td:last-child::before { content: "→ "; color: var(--red); font-weight: 700; }

.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
.gallery figcaption { margin-top: 12px; }
@media (max-width: 700px) { .gallery { grid-template-columns: 1fr; } }
.quote-line { font-family: var(--display); font-size: clamp(24px, 2.6vw, 32px); line-height: 1.2; color: var(--ink); margin: 28px 0; max-width: 22ch; }
.quote-line::before { content: ""; display: block; width: 32px; height: 3px; background: var(--red); margin-bottom: 14px; }
.phases { grid-template-columns: repeat(7, 1fr); }
@media (max-width: 900px) { .phases { grid-template-columns: repeat(2, 1fr); } }
.brief { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 24px; background: var(--card); border: 1px solid var(--line); }
.brief > div { padding: 22px; }
.brief > div + div { border-left: 1px solid var(--line); }
.brief h4 { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--red); margin-bottom: 10px; font-family: var(--text); }
.brief ul { margin: 0; padding-left: 18px; }
.brief li { font-size: 15px; margin-bottom: 6px; color: var(--ink-2); }
.brief .big { font-family: var(--display); font-size: 22px; line-height: 1.2; color: var(--ink); margin: 0 0 10px; }
@media (max-width: 820px) { .brief { grid-template-columns: 1fr; } .brief > div + div { border-left: 0; border-top: 1px solid var(--line); } }
.inv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.inv > div { background: var(--card); border: 1px solid var(--line); padding: 18px; }
.inv h4 { font-size: 16px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: baseline; }
.inv h4 span { font-family: var(--text); font-size: 13px; color: var(--red); font-weight: 700; }
.inv ul { list-style: none; padding: 0 !important; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.inv li { margin: 0; font-size: 13px; padding: 4px 9px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
@media (max-width: 900px) { .inv { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .inv { grid-template-columns: 1fr; } }
.statement { font-family: var(--display); font-weight: 500; font-size: clamp(28px, 3.8vw, 50px); line-height: 1.12; letter-spacing: normal; max-width: 22ch; margin: 0 0 28px; }
.duo { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; margin-top: 36px; align-items: start; }
.duo .anno { margin-top: 0; }
@media (max-width: 860px) { .duo { grid-template-columns: 1fr; } }
.moment { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(24px, 4vw, 64px); align-items: center; margin-top: clamp(56px, 7vw, 88px); }
.moment.flip > :first-child { order: 2; }
.moment h3 { font-size: clamp(22px, 2.2vw, 28px); margin: 10px 0 12px; letter-spacing: normal; }
.moment p { margin: 0; }
.moment .kicker { display: block; }
.moment .dodd { margin-top: 8px; }
@media (max-width: 860px) { .moment { grid-template-columns: 1fr; } .moment.flip > :first-child { order: 0; } }

/* =====================================================================
   v2 · One visual system for every page
   Stage: the single surface every product visual sits on.
   ===================================================================== */
:root { --stage: #efece5; --stage-dot: #d9d4c8; --r: 18px; --ease: cubic-bezier(.2,.7,.2,1); }

/* header */
.site-head { position: sticky; top: 0; z-index: 40; background: rgba(251,250,247,.88); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .25s; }
.site-head.scrolled { border-bottom-color: var(--line); }
.site-head .wrap { height: 68px; }
.site-head nav a { font-weight: 600; font-size: 15px; }
.site-head .name { font-size: clamp(21px, 1.9vw, 26px); line-height: 1; color: var(--ink); gap: 12px; }
.site-head .name::before { width: 12px; height: 12px; }
.site-head .name span { font-family: var(--text); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-left: 4px; padding-left: 12px; border-left: 1px solid var(--line); line-height: 1.6; }
@media (max-width: 640px) { .site-head .name span { display: none; } }

/* the stage */
.stage { position: relative; border-radius: var(--r); background-color: var(--stage); background-image: radial-gradient(var(--stage-dot) 1px, transparent 1px); background-size: 18px 18px; padding: clamp(18px, 4vw, 56px); overflow: hidden; }
.stage > img { width: 100%; margin: 0 auto; cursor: zoom-in; }
.stage .dev, .stage > img.dev { filter: drop-shadow(0 22px 34px rgba(22,24,29,.18)) drop-shadow(0 2px 4px rgba(22,24,29,.08)); }
.stage.flush { padding: 0; }
.stage.flush > img { width: 100%; height: 100%; object-fit: cover; }
.stage.ink { background-color: #16181d; background-image: radial-gradient(#2b2e35 1px, transparent 1px); }
.stage + .stage { margin-top: 16px; }
.stage-cap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-top: 12px; }
.stage-cap b { color: var(--ink); font-weight: 600; }
.stage .anno-stage { max-width: 1040px; margin: 0 auto; }
.stage .anno-stage img { filter: drop-shadow(0 22px 34px rgba(22,24,29,.18)); }

/* case hero */
.cs-head h1 { font-size: clamp(38px, 5.4vw, 72px); max-width: 17ch; }
.cs-head .lede { font-size: clamp(18px, 1.6vw, 21px); max-width: 60ch; }
.hero-stage { margin-top: 40px; aspect-ratio: 16 / 8.4; display: grid; place-items: center; }
.hero-stage > img { max-height: 100%; width: auto; max-width: 100%; }
@media (max-width: 700px) { .hero-stage { aspect-ratio: auto; } .hero-stage > img { width: 100%; } }

/* floating section nav on case studies */
/* section index: a quiet vertical list in the left margin, wide screens only.
   Ticks by default, the current section is named, every name shows on hover. */
.toc { position: fixed; left: clamp(16px, 2vw, 32px); top: 50%; z-index: 45; transform: translate(-12px, -50%); opacity: 0; pointer-events: none; transition: opacity .35s, transform .35s var(--ease); display: none; flex-direction: column; gap: 2px; padding: 8px 10px 8px 0; border-radius: 10px; }
.toc.show { opacity: 1; transform: translate(0, -50%); pointer-events: auto; }
.toc a { display: grid; grid-template-columns: 22px auto; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; text-decoration: none; color: var(--muted); padding: 3px 0; white-space: nowrap; }
.toc a::before { content: ""; width: 12px; height: 1.5px; background: #c9c6be; border-radius: 2px; transition: width .25s var(--ease), background .25s; }
.toc a span { opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .2s; }
.toc a.on { color: var(--ink); }
.toc a.on::before { width: 22px; background: var(--red); }
.toc a:hover { color: var(--ink); }
.toc a:hover::before { background: var(--ink); width: 18px; }
.toc:hover, .toc:focus-within { background: rgba(251,250,247,.96); box-shadow: 0 8px 28px rgba(22,24,29,.10); padding-left: 10px; }
.toc:hover a span, .toc:focus-within a span { opacity: 1; transform: none; }
@media (min-width: 1280px) { .toc { display: flex; } }
@media (min-width: 1520px) { .toc a.on span { opacity: 1; transform: none; } }
@media print { .toc { display: none; } }

/* ---------- home v2 ---------- */
.hero { padding-top: clamp(32px, 6vw, 80px); }
.hero h1 { font-size: clamp(44px, 6.4vw, 92px); letter-spacing: normal; line-height: .98; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 5vw, 64px) clamp(16px, 2.4vw, 28px); padding-bottom: clamp(72px, 10vw, 140px); }
.tile { display: block; text-decoration: none; color: inherit; }
.tile:hover { color: inherit; }
.tile.wide { grid-column: 1 / -1; }
.tile .stage { aspect-ratio: 16 / 10.5; display: grid; place-items: center; transition: transform .6s var(--ease); }
.tile.wide .stage { aspect-ratio: 16 / 7.4; }
.tile .stage > img { max-height: 100%; width: auto; max-width: 100%; transition: transform .8s var(--ease); cursor: pointer; }
.tile.wide .stage > img { max-width: 92%; }
.tile:hover .stage > img { transform: translateY(-6px) scale(1.015); }
.tile-meta { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; align-items: start; margin-top: 20px; }
.tile.wide .tile-meta { grid-template-columns: 1.1fr 1fr; align-items: end; }
.tile .num { font-family: var(--display); color: var(--red); font-size: 14px; font-weight: 600; }
.tile h3 { font-size: clamp(24px, 2.4vw, 34px); letter-spacing: normal; margin: 6px 0 0; max-width: 22ch; }
.tile .score { margin: 0; border-top: 1px solid var(--line); }
.tile .score b { font-size: 22px; }
.tile .go { grid-column: 1 / -1; margin-top: 4px; }
.tile:hover .go { color: var(--red); }
.tile:hover .go::after { transform: translateX(4px); }
.tile:not(.wide) .tile-meta { grid-template-columns: 1fr; }
@media (max-width: 860px) { .tiles { grid-template-columns: 1fr; } .tile.wide .stage { aspect-ratio: 16 / 10.5; } .tile.wide .tile-meta { grid-template-columns: 1fr; } }

.about2 { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(32px, 6vw, 96px); padding: clamp(64px, 9vw, 120px) 0; border-top: 1px solid var(--ink); }
.about2 h2 { font-size: clamp(30px, 3.6vw, 48px); letter-spacing: normal; }
.about2 .intro { font-family: var(--display); font-weight: 500; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.25; letter-spacing: normal; margin: 0 0 32px; color: var(--ink); }
.strengths { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.strengths > div { background: var(--soft); border-radius: 14px; padding: 20px 22px; }
.strengths .n { font-family: var(--display); color: var(--red); font-weight: 600; font-size: 14px; }
.strengths b { display: block; font-family: var(--display); font-weight: 500; font-size: 21px; letter-spacing: normal; margin: 10px 0 6px; }
.strengths p { margin: 0; font-size: 15px; color: var(--ink-2); }
@media (max-width: 860px) { .about2 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .strengths { grid-template-columns: 1fr; } }

.contact2 { background: var(--ink); color: var(--paper); border-radius: 22px; padding: clamp(32px, 6vw, 80px); display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: end; margin-bottom: 40px; }
.contact2 h2 { font-size: clamp(36px, 5vw, 68px); letter-spacing: normal; color: #fff; }
.contact2 h2 em { font-style: normal; color: var(--red); }
.contact2 p { color: #c9c7c0; margin: 16px 0 0; max-width: 46ch; }
.contact2 .contact-links { justify-content: flex-end; }
.contact2 .btn { border-color: #4a4d55; color: #fff; border-radius: 10px; }
.contact2 .btn.solid { background: #fff; color: var(--ink); border-color: #fff; }
.contact2 .btn:hover { background: var(--red); border-color: var(--red); color: #fff; }
.contact2 .mail-copy { flex-basis: 100%; display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-bottom: 4px; }
.contact2 .mail-addr { color: #c9c6be; font-size: 15px; text-decoration: none; border-bottom: 1px solid #3a3d45; padding-bottom: 1px; }
.contact2 .mail-addr:hover { color: #fff; border-color: var(--red); }
.contact2 .copy-mail { display: inline-flex; align-items: center; gap: 5px; background: none; border: 1px solid #3a3d45; color: #c9c6be; border-radius: 8px; padding: 4px 8px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.contact2 .copy-mail:hover { border-color: var(--red); color: #fff; }
.contact2 .copy-mail.done { border-color: #3fae6e; color: #9fe0bd; }
@media (max-width: 760px) { .contact2 .mail-copy { justify-content: flex-start; flex-wrap: wrap; } }
@media (max-width: 860px) { .contact2 { grid-template-columns: 1fr; } .contact2 .contact-links { justify-content: flex-start; } }
.next .img.stage { background-color: var(--stage); display: grid; place-items: center; aspect-ratio: 16 / 10; padding: 24px; }
.next .img.stage img { max-height: 100%; width: auto; }
/* stages with a fixed shape centre their image with flex so max-height resolves */
.hero-stage, .tile .stage, .next .img.stage { display: flex; align-items: center; justify-content: center; }
.hero-stage > img, .tile .stage > img, .next .img.stage img { max-height: 100%; max-width: 100%; width: auto; height: auto; min-width: 0; }
.tile .stage.flush > img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.tile.wide .stage.flush > img { max-width: none; }
.tile:hover .stage.flush > img { transform: scale(1.02); }
.about2 .kicker b { color: var(--red); }
.tile.wide .stage { aspect-ratio: 2200 / 944; }
/* three TV screens fanned on the stage */
.tvstack { position: relative; width: 100%; aspect-ratio: 2 / 1; }
.tvstack img { position: absolute; border-radius: 10px; box-shadow: 0 1px 2px rgba(22,24,29,.12), 0 30px 60px -22px rgba(22,24,29,.5); cursor: default; }
.tvstack .b1 { width: 54%; left: 1%; top: 3%; }
.tvstack .b2 { width: 54%; right: 1%; top: 3%; }
.tvstack .f { width: 66%; left: 17%; top: 24%; }
.hero-stage .tvstack { max-width: 1040px; }

/* ---------- home v3: every study gets a big cover in its own colour ---------- */
.tiles { grid-template-columns: 1fr; gap: clamp(72px, 9vw, 128px); }
.tile .cover-wrap { position: relative; }
.cover { position: relative; aspect-ratio: 16 / 8.2; border-radius: 22px; overflow: hidden; display: grid; place-items: center; isolation: isolate; transition: border-radius .6s var(--ease); }
.cover::before { content: ""; position: absolute; inset: 0; z-index: -1; transition: transform 1.2s var(--ease); }
.tile:hover .cover { border-radius: 30px; }
.tile:hover .cover::before { transform: scale(1.06); }
.cover img { cursor: pointer; }
.cover .main, .cover .tvstack { transition: transform 1s var(--ease); }
.tile:hover .cover .main, .tile:hover .cover .tvstack { transform: translateY(-8px) scale(1.02); }
/* design system: Fashion Cloud primary */
.c-ds::before { background: radial-gradient(120% 90% at 20% 0%, #7B7FFE 0%, #4630D2 55%, #332B85 100%); }
.c-ds .main { width: 72%; border-radius: 12px; box-shadow: 0 30px 70px rgba(20, 12, 70, .45); }
.c-ds .chip { position: absolute; background: #fff; border-radius: 10px; padding: 10px; box-shadow: 0 18px 40px rgba(20, 12, 70, .35); transition: transform 1s var(--ease); }
.c-ds .c1 { width: 30%; left: 6%; top: 12%; transform: rotate(-4deg); }
.c-ds .c2 { width: 20%; right: 6%; top: 18%; transform: rotate(5deg); }
.c-ds .c3 { width: 16%; right: 9%; bottom: 14%; transform: rotate(-3deg); }
.tile:hover .c-ds .c1 { transform: rotate(-6deg) translate(-8px, -6px); }
.tile:hover .c-ds .c2 { transform: rotate(8deg) translate(8px, -8px); }
.tile:hover .c-ds .c3 { transform: rotate(-1deg) translate(6px, 8px); }
/* UKTV: navy with an aqua glow */
.c-uktv::before { background: radial-gradient(70% 80% at 50% 110%, rgba(20, 220, 220, .55) 0%, rgba(20, 220, 220, 0) 60%), radial-gradient(60% 70% at 85% 0%, rgba(180, 120, 205, .45) 0%, rgba(180, 120, 205, 0) 60%), #141932; }
.c-uktv .tvstack { width: 84%; aspect-ratio: 2.05 / 1; }
.c-uktv .tvstack img { box-shadow: 0 30px 60px -18px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .06); }
/* Smart Replenishment: fresh green, the North Star cockpit with real UI pieces around it */
.c-sr::before { background: radial-gradient(120% 90% at 18% 0%, #8BE3B7 0%, #2F9367 48%, #1C5440 100%); }
.c-sr .main { width: 64%; border-radius: 12px; box-shadow: 0 30px 70px rgba(8, 40, 26, .45); }
.c-sr .chip { position: absolute; background: #fff; border-radius: 10px; padding: 6px; box-shadow: 0 18px 40px rgba(8, 40, 26, .35); transition: transform 1s var(--ease); }
.c-sr .c1 { width: 44%; left: 3%; bottom: 12%; transform: rotate(-3deg); }
.c-sr .c2 { width: 17%; left: 6%; top: 12%; transform: rotate(-5deg); }
.c-sr .c3 { width: 24%; right: 4%; top: 14%; padding: 0; overflow: hidden; transform: rotate(4deg); }
.tile:hover .c-sr .c1 { transform: rotate(-5deg) translate(-10px, 6px); }
.tile:hover .c-sr .c2 { transform: rotate(-8deg) translate(-8px, -8px); }
.tile:hover .c-sr .c3 { transform: rotate(7deg) translate(8px, -6px); }
/* Bwin: brand yellow */
.c-bwin::before { background: radial-gradient(90% 90% at 80% 10%, #FFE066 0%, #FFCC00 50%, #F5B800 100%); }
.c-bwin .main { height: 92%; width: auto; max-width: 92%; object-fit: contain; filter: drop-shadow(0 34px 40px rgba(60, 40, 0, .28)); margin-top: 6%; }

.c-vocabelo::before { background: radial-gradient(120% 90% at 25% 0%, #a78bfa 0%, #6d28d9 55%, #221146 100%); }
.c-vocabelo .vb-fan { position: relative; height: 84%; aspect-ratio: 1.6 / 1; max-width: 90%; }
.c-vocabelo .ph { position: absolute; top: 50%; height: 100%; aspect-ratio: 800 / 1690; padding: 6px; background: #0b0b10; border-radius: 30px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 30px 60px -18px rgba(20, 8, 50, .65); transition: transform 1s var(--ease); }
.c-vocabelo .ph img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 24px; }
.c-vocabelo .p1 { left: 8%; transform: translateY(-46%) rotate(-7deg) scale(.86); }
.c-vocabelo .p2 { left: 50%; z-index: 2; transform: translate(-50%, -50%); }
.c-vocabelo .p3 img { object-fit: contain; object-position: center 12%; background: #16171c; }
.c-vocabelo .p3 { right: 8%; transform: translateY(-46%) rotate(7deg) scale(.86); }
.tile:hover .c-vocabelo .p1 { transform: translateY(-48%) translateX(-10px) rotate(-10deg) scale(.86); }
.tile:hover .c-vocabelo .p2 { transform: translate(-50%, -53%); }
.tile:hover .c-vocabelo .p3 { transform: translateY(-48%) translateX(10px) rotate(10deg) scale(.86); }
.tile .tile-meta { grid-template-columns: 1.1fr 1fr; align-items: end; margin-top: 24px; }
@media (max-width: 860px) { .cover { aspect-ratio: 4 / 3; } .c-ds .main { width: 86%; } .c-sr .main { width: 80%; } .c-uktv .tvstack { width: 94%; } .tile .tile-meta { grid-template-columns: 1fr; } }
.tile .score b { font-size: clamp(26px, 2.6vw, 36px); line-height: 1.05; }
.tile .score span { font-size: 14px; margin-top: 6px; }
.tile .score { border-top: 2px solid var(--ink); }
.tile .num { font-family: var(--text); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

/* nothing may push the page sideways (floating shapes near the edge) */
html { overflow-x: clip; }

/* contact: hovers fade in and out instead of snapping (no flashing as the mouse passes) */
.contact2 .mail-addr, .contact2 .copy-mail { transition: color .3s ease, border-color .3s ease; }
