/* Layout: one centered column on a Figma-like dotted canvas; sections are labelled like design frames, work sits in a 2-up grid */
/* Deliberately dark-only: the owner chose the dark look with the lilac accent for every visitor */
:root {
  --bg: #101216;
  --dot: #22262e;
  --surface: #181b21;
  --surface-2: #232730;
  --ink: #eceef2;
  --muted: #9aa1ae;
  --line: #2b3039;
  --accent: #7f97ff;
  --accent-soft: #1f2748;
  --on-accent: #0b0d12;
  --shadow: rgb(0 0 0 / 0.6);
  --duo: #b3bfff;
  color-scheme: dark;

  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Instrument Sans", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step--1: 0.8125rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem);
  --step-3: clamp(2.125rem, 1.5rem + 2.6vw, 3.5rem);
  --step-4: clamp(3rem, 1.6rem + 6vw, 6.5rem);

  --radius: 20px;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --spring: cubic-bezier(0.3, 0.7, 0.4, 1.4);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1px, transparent 1.4px);
  background-size: 24px 24px;
  color: var(--ink);
  font: 400 var(--step-0) / 1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

::selection { background: var(--accent-soft); color: var(--ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; text-wrap: balance; margin: 0; }

p { margin: 0; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono { font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: 0.01em; }

.frame-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--muted);
  transition: color 160ms ease;
}
.frame-label::before { content: "#"; font-weight: 500; opacity: 0.7; }

/* Placeholder content waiting for real copy */
.todo {
  background: var(--accent-soft);
  outline: 1px dashed var(--accent);
  outline-offset: 1px;
  border-radius: 3px;
  padding-inline: 0.2em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Header */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.logo { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.03em; text-decoration: none; }
.logo span { color: var(--accent); }
.site-nav ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted);
  transition: background 160ms ease, color 160ms ease;
}
.site-nav a:hover { background: var(--surface); color: var(--ink); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  border: 0;
  font: 500 1rem / 1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform 220ms var(--spring), background 160ms ease, box-shadow 220ms ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.96); transition-duration: 90ms; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 10px 24px -12px var(--accent); }
.btn-ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn .arrow { transition: transform 220ms var(--spring); }
.btn:hover .arrow { transform: translateX(3px); }

/* Hero */
.hero { padding-block: clamp(56px, 11vw, 140px) clamp(56px, 8vw, 104px); }
.hero h1 { font-size: var(--step-4); line-height: 0.98; letter-spacing: -0.045em; margin-top: 28px; }
.hero .lede { font-size: var(--step-1); line-height: 1.5; color: var(--muted); max-width: 34ch; margin-top: 56px; }
.hero .lede strong { color: var(--ink); font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* Design-tool selection box around a headline word */
.sel { position: relative; display: inline-block; white-space: nowrap; }
.sel-box {
  position: absolute;
  inset: 0.1em -0.14em -0.02em;
  border: 2px solid var(--accent);
  pointer-events: none;
  animation: sel-in 700ms 250ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.sel-box i {
  position: absolute;
  width: 11px;
  height: 11px;
  background: var(--surface);
  border: 2px solid var(--accent);
  animation: pop 380ms 850ms var(--spring) both;
}
.sel-box i:nth-child(1) { top: -6px; left: -6px; }
.sel-box i:nth-child(2) { top: -6px; right: -6px; }
.sel-box i:nth-child(3) { bottom: -6px; left: -6px; }
.sel-box i:nth-child(4) { bottom: -6px; right: -6px; }
.sel-dim {
  position: absolute;
  left: 50%;
  top: calc(100% + 12px);
  transform: translateX(-50%);
  padding: 5px 9px;
  border-radius: 5px;
  background: var(--accent);
  color: var(--on-accent);
  font: 500 12px / 1 var(--font-mono);
  letter-spacing: 0;
  white-space: nowrap;
  animation: pop 380ms 950ms var(--spring) both;
}
@keyframes sel-in { from { clip-path: inset(-40px 100% -60px -40px); } to { clip-path: inset(-40px -40px -60px -40px); } }
@keyframes pop { from { opacity: 0; scale: 0.4; } to { opacity: 1; scale: 1; } }

/* Sections */
.section { padding-block: clamp(56px, 9vw, 112px); }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: var(--step-3); }
.section-head p { color: var(--muted); max-width: 52ch; }

/* Impact */
.approx { font-size: 0.6em; color: var(--muted); vertical-align: 0.12em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.impact-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.impact-lead { display: grid; gap: 16px; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 96px); }
.lead-num { font: 600 clamp(5.5rem, 3rem + 10vw, 11rem) / 0.82 var(--font-display); letter-spacing: -0.06em; color: var(--accent); margin-top: 12px; }
.impact-lead h2 { font-size: var(--step-2); max-width: 18ch; }
.impact-lead .note { color: var(--muted); max-width: 36ch; line-height: 1.6; }
.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ledger li { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 24px; align-items: baseline; padding-block: 22px; border-bottom: 1px solid var(--line); }
.ledger .v { font: 600 var(--step-2) / 1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; transition: color 160ms ease; }
.ledger li:hover .v { color: var(--accent); }
.ledger .unit { display: block; margin-top: 8px; font: 400 var(--step--1) / 1.35 var(--font-mono); color: var(--muted); letter-spacing: 0; white-space: normal; }
.ledger .what { font-weight: 500; font-size: 1.0625rem; }
.ledger .how { display: block; margin-top: 4px; color: var(--muted); font-size: 0.9375rem; font-weight: 400; }

/* Work grid */
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 5vw, 64px) clamp(20px, 3vw, 40px); }
.case { display: flex; flex-direction: column; gap: 14px; text-decoration: none; min-width: 0; }
.case:focus-visible { outline: none; }
.case-visual {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  max-width: 100%;
  border-radius: var(--radius);
  background-color: var(--surface-2);
  background-image: radial-gradient(var(--line) 1px, transparent 1.4px);
  background-size: 18px 18px;
  overflow: hidden;
  outline: 2px solid transparent;
  transition: outline-color 160ms ease;
}
.case:hover .case-visual, .case:focus-visible .case-visual { outline-color: var(--accent); }
.case:hover .frame-label, .case:focus-visible .frame-label { color: var(--accent); }
.case:hover .phone, .case:focus-visible .phone,
.case:hover .sheet, .case:focus-visible .sheet { transform: translateY(-8px) rotate(-1.5deg); }
.case-body { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.case-body h3 { font-size: var(--step-2); }
.case-body p { color: var(--muted); }
.kpi { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.kpi .mono { color: var(--muted); }
.kpi strong { font: 600 var(--step-2) / 1 var(--font-display); color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* Phone mockups drawn in CSS */
.phone {
  width: min(44%, 200px);
  aspect-ratio: 9 / 18.5;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 12px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 34px 60px -30px var(--shadow);
  transition: transform 420ms var(--spring);
}
.ln { height: 7px; border-radius: 4px; background: var(--surface-2); flex: none; }
.ln.h { height: 11px; width: 62%; background: var(--ink); opacity: 0.85; }
.w40 { width: 40%; } .w55 { width: 55%; } .w70 { width: 70%; } .w85 { width: 85%; }
.blk { height: 26%; border-radius: 12px; background: var(--accent-soft); flex: none; }
.blk.sm { height: 14%; background: var(--surface-2); }
.push { margin-top: auto; }
.tabbar { display: flex; justify-content: space-around; align-items: center; padding: 10px 4px 2px; border-top: 1px solid var(--line); }
.tab { width: 16px; height: 16px; border-radius: 6px; background: var(--surface-2); }
.tab.on { width: 38px; border-radius: 999px; background: var(--accent); }
.field { height: 24px; border-radius: 8px; border: 1.5px solid var(--line); flex: none; }
.field.focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cta { height: 26px; border-radius: 999px; background: var(--accent); flex: none; }
.steps { display: flex; gap: 5px; }
.steps span { height: 4px; flex: 1; border-radius: 2px; background: var(--surface-2); }
.steps span.on { background: var(--accent); }
.row { display: flex; align-items: center; gap: 7px; padding: 5px; border-radius: 9px; }
.row.hl { background: var(--accent-soft); }
.row .av { width: 20px; height: 20px; border-radius: 50%; background: var(--surface-2); flex: none; }
.row.hl .av { background: var(--accent); }
.row .ln { flex: 1; }
.row .amt { width: 24px; height: 7px; border-radius: 4px; background: var(--ink); opacity: 0.6; flex: none; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); align-self: center; margin-block: 6px 4px; flex: none; }
.center { align-self: center; }
.set { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-block: 5px; border-bottom: 1px solid var(--line); }
.set .ln { flex: 1; max-width: 60%; }
.tg { position: relative; width: 24px; height: 14px; border-radius: 999px; background: var(--surface-2); flex: none; }
.tg::after { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px var(--shadow); }
.tg.on { background: var(--accent); }
.tg.on::after { left: 12px; }

/* Component sheet mockup drawn in CSS */
.sheet {
  width: min(72%, 360px);
  display: grid;
  gap: 12px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 34px 60px -30px var(--shadow);
  transition: transform 420ms var(--spring);
}
.swatches { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.swatches span { aspect-ratio: 1; border-radius: 7px; background: var(--accent); }
.swatches span:nth-child(2) { opacity: 0.7; }
.swatches span:nth-child(3) { opacity: 0.45; }
.swatches span:nth-child(4) { background: var(--accent-soft); }
.swatches span:nth-child(5) { background: var(--ink); opacity: 0.85; }
.swatches span:nth-child(6) { background: var(--surface-2); }
.sheet-row { display: flex; align-items: center; gap: 8px; }
.pill { width: 26%; height: 22px; border-radius: 999px; background: var(--accent); flex: none; }
.pill.soft { background: var(--accent-soft); }
.pill.ghost { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.chip { width: 18%; height: 14px; border-radius: 5px; background: var(--surface-2); flex: none; }
.sheet-row .tg { margin-left: auto; }

.more-work { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 20px; margin-top: clamp(40px, 5vw, 64px); padding-top: 20px; border-top: 1px solid var(--line); }
.more-work .mono { color: var(--muted); }
.more-work ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.more-work li { padding: 6px 14px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 0.9375rem; }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.portrait { position: relative; aspect-ratio: 1; width: calc(100% - 24px); max-width: 440px; margin: 12px; }
.portrait .sel-box { inset: -12px; animation: none; }
.portrait .sel-box i, .portrait .sel-dim { animation: none; }

/* Photos: soft shapes from the old Soft Interactions site, lilac duotone that fades to colour on hover */
.shape { width: 100%; height: 100%; -webkit-mask: var(--shape) center / 100% 100% no-repeat; mask: var(--shape) center / 100% 100% no-repeat; transition: transform 700ms var(--spring); }
.shape-flower { --shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M99.60%2050.00%20L99.54%2050.86%20L99.35%2051.72%20L99.04%2052.57%20L98.62%2053.40%20L98.12%2054.21%20L97.54%2055.00%20L96.92%2055.76%20L96.27%2056.50%20L95.63%2057.23%20L95.01%2057.94%20L94.43%2058.64%20L93.92%2059.33%20L93.48%2060.04%20L93.14%2060.76%20L92.89%2061.49%20L92.73%2062.25%20L92.67%2063.05%20L92.70%2063.87%20L92.79%2064.74%20L92.94%2065.63%20L93.13%2066.56%20L93.33%2067.50%20L93.51%2068.47%20L93.67%2069.44%20L93.77%2070.41%20L93.81%2071.37%20L93.75%2072.29%20L93.60%2073.18%20L93.33%2074.02%20L92.95%2074.80%20L92.47%2075.52%20L91.87%2076.16%20L91.18%2076.74%20L90.41%2077.25%20L89.57%2077.70%20L88.67%2078.10%20L87.75%2078.45%20L86.82%2078.77%20L85.90%2079.07%20L85.01%2079.38%20L84.16%2079.69%20L83.36%2080.04%20L82.64%2080.43%20L81.98%2080.88%20L81.40%2081.40%20L80.88%2081.98%20L80.43%2082.64%20L80.04%2083.36%20L79.69%2084.16%20L79.38%2085.01%20L79.07%2085.90%20L78.77%2086.82%20L78.45%2087.75%20L78.10%2088.67%20L77.70%2089.57%20L77.25%2090.41%20L76.74%2091.18%20L76.16%2091.87%20L75.52%2092.47%20L74.80%2092.95%20L74.02%2093.33%20L73.18%2093.60%20L72.29%2093.75%20L71.37%2093.81%20L70.41%2093.77%20L69.44%2093.67%20L68.47%2093.51%20L67.50%2093.33%20L66.56%2093.13%20L65.63%2092.94%20L64.74%2092.79%20L63.87%2092.70%20L63.05%2092.67%20L62.25%2092.73%20L61.49%2092.89%20L60.76%2093.14%20L60.04%2093.48%20L59.33%2093.92%20L58.64%2094.43%20L57.94%2095.01%20L57.23%2095.63%20L56.50%2096.27%20L55.76%2096.92%20L55.00%2097.54%20L54.21%2098.12%20L53.40%2098.62%20L52.57%2099.04%20L51.72%2099.35%20L50.86%2099.54%20L50.00%2099.60%20L49.14%2099.54%20L48.28%2099.35%20L47.43%2099.04%20L46.60%2098.62%20L45.79%2098.12%20L45.00%2097.54%20L44.24%2096.92%20L43.50%2096.27%20L42.77%2095.63%20L42.06%2095.01%20L41.36%2094.43%20L40.67%2093.92%20L39.96%2093.48%20L39.24%2093.14%20L38.51%2092.89%20L37.75%2092.73%20L36.95%2092.67%20L36.13%2092.70%20L35.26%2092.79%20L34.37%2092.94%20L33.44%2093.13%20L32.50%2093.33%20L31.53%2093.51%20L30.56%2093.67%20L29.59%2093.77%20L28.63%2093.81%20L27.71%2093.75%20L26.82%2093.60%20L25.98%2093.33%20L25.20%2092.95%20L24.48%2092.47%20L23.84%2091.87%20L23.26%2091.18%20L22.75%2090.41%20L22.30%2089.57%20L21.90%2088.67%20L21.55%2087.75%20L21.23%2086.82%20L20.93%2085.90%20L20.62%2085.01%20L20.31%2084.16%20L19.96%2083.36%20L19.57%2082.64%20L19.12%2081.98%20L18.60%2081.40%20L18.02%2080.88%20L17.36%2080.43%20L16.64%2080.04%20L15.84%2079.69%20L14.99%2079.38%20L14.10%2079.07%20L13.18%2078.77%20L12.25%2078.45%20L11.33%2078.10%20L10.43%2077.70%20L9.59%2077.25%20L8.82%2076.74%20L8.13%2076.16%20L7.53%2075.52%20L7.05%2074.80%20L6.67%2074.02%20L6.40%2073.18%20L6.25%2072.29%20L6.19%2071.37%20L6.23%2070.41%20L6.33%2069.44%20L6.49%2068.47%20L6.67%2067.50%20L6.87%2066.56%20L7.06%2065.63%20L7.21%2064.74%20L7.30%2063.87%20L7.33%2063.05%20L7.27%2062.25%20L7.11%2061.49%20L6.86%2060.76%20L6.52%2060.04%20L6.08%2059.33%20L5.57%2058.64%20L4.99%2057.94%20L4.37%2057.23%20L3.73%2056.50%20L3.08%2055.76%20L2.46%2055.00%20L1.88%2054.21%20L1.38%2053.40%20L0.96%2052.57%20L0.65%2051.72%20L0.46%2050.86%20L0.40%2050.00%20L0.46%2049.14%20L0.65%2048.28%20L0.96%2047.43%20L1.38%2046.60%20L1.88%2045.79%20L2.46%2045.00%20L3.08%2044.24%20L3.73%2043.50%20L4.37%2042.77%20L4.99%2042.06%20L5.57%2041.36%20L6.08%2040.67%20L6.52%2039.96%20L6.86%2039.24%20L7.11%2038.51%20L7.27%2037.75%20L7.33%2036.95%20L7.30%2036.13%20L7.21%2035.26%20L7.06%2034.37%20L6.87%2033.44%20L6.67%2032.50%20L6.49%2031.53%20L6.33%2030.56%20L6.23%2029.59%20L6.19%2028.63%20L6.25%2027.71%20L6.40%2026.82%20L6.67%2025.98%20L7.05%2025.20%20L7.53%2024.48%20L8.13%2023.84%20L8.82%2023.26%20L9.59%2022.75%20L10.43%2022.30%20L11.33%2021.90%20L12.25%2021.55%20L13.18%2021.23%20L14.10%2020.93%20L14.99%2020.62%20L15.84%2020.31%20L16.64%2019.96%20L17.36%2019.57%20L18.02%2019.12%20L18.60%2018.60%20L19.12%2018.02%20L19.57%2017.36%20L19.96%2016.64%20L20.31%2015.84%20L20.62%2014.99%20L20.93%2014.10%20L21.23%2013.18%20L21.55%2012.25%20L21.90%2011.33%20L22.30%2010.43%20L22.75%209.59%20L23.26%208.82%20L23.84%208.13%20L24.48%207.53%20L25.20%207.05%20L25.98%206.67%20L26.82%206.40%20L27.71%206.25%20L28.63%206.19%20L29.59%206.23%20L30.56%206.33%20L31.53%206.49%20L32.50%206.67%20L33.44%206.87%20L34.37%207.06%20L35.26%207.21%20L36.13%207.30%20L36.95%207.33%20L37.75%207.27%20L38.51%207.11%20L39.24%206.86%20L39.96%206.52%20L40.67%206.08%20L41.36%205.57%20L42.06%204.99%20L42.77%204.37%20L43.50%203.73%20L44.24%203.08%20L45.00%202.46%20L45.79%201.88%20L46.60%201.38%20L47.43%200.96%20L48.28%200.65%20L49.14%200.46%20L50.00%200.40%20L50.86%200.46%20L51.72%200.65%20L52.57%200.96%20L53.40%201.38%20L54.21%201.88%20L55.00%202.46%20L55.76%203.08%20L56.50%203.73%20L57.23%204.37%20L57.94%204.99%20L58.64%205.57%20L59.33%206.08%20L60.04%206.52%20L60.76%206.86%20L61.49%207.11%20L62.25%207.27%20L63.05%207.33%20L63.87%207.30%20L64.74%207.21%20L65.63%207.06%20L66.56%206.87%20L67.50%206.67%20L68.47%206.49%20L69.44%206.33%20L70.41%206.23%20L71.37%206.19%20L72.29%206.25%20L73.18%206.40%20L74.02%206.67%20L74.80%207.05%20L75.52%207.53%20L76.16%208.13%20L76.74%208.82%20L77.25%209.59%20L77.70%2010.43%20L78.10%2011.33%20L78.45%2012.25%20L78.77%2013.18%20L79.07%2014.10%20L79.38%2014.99%20L79.69%2015.84%20L80.04%2016.64%20L80.43%2017.36%20L80.88%2018.02%20L81.40%2018.60%20L81.98%2019.12%20L82.64%2019.57%20L83.36%2019.96%20L84.16%2020.31%20L85.01%2020.62%20L85.90%2020.93%20L86.82%2021.23%20L87.75%2021.55%20L88.67%2021.90%20L89.57%2022.30%20L90.41%2022.75%20L91.18%2023.26%20L91.87%2023.84%20L92.47%2024.48%20L92.95%2025.20%20L93.33%2025.98%20L93.60%2026.82%20L93.75%2027.71%20L93.81%2028.63%20L93.77%2029.59%20L93.67%2030.56%20L93.51%2031.53%20L93.33%2032.50%20L93.13%2033.44%20L92.94%2034.37%20L92.79%2035.26%20L92.70%2036.13%20L92.67%2036.95%20L92.73%2037.75%20L92.89%2038.51%20L93.14%2039.24%20L93.48%2039.96%20L93.92%2040.67%20L94.43%2041.36%20L95.01%2042.06%20L95.63%2042.77%20L96.27%2043.50%20L96.92%2044.24%20L97.54%2045.00%20L98.12%2045.79%20L98.62%2046.60%20L99.04%2047.43%20L99.35%2048.28%20L99.54%2049.14Z'/%3E%3C/svg%3E"); }
.shape-clover { --shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='28' cy='28' r='28'/%3E%3Ccircle cx='72' cy='28' r='28'/%3E%3Ccircle cx='28' cy='72' r='28'/%3E%3Ccircle cx='72' cy='72' r='28'/%3E%3Ccircle cx='50' cy='50' r='32'/%3E%3C/svg%3E"); }
.shape img { width: 100%; height: 100%; object-fit: cover; }
.duo { position: relative; isolation: isolate; background: var(--bg); }
.duo img { filter: grayscale(1) contrast(1.12) brightness(1.12); transition: filter 700ms ease; }
.duo::after { content: ""; position: absolute; inset: 0; background: var(--duo); mix-blend-mode: multiply; transition: opacity 700ms ease; pointer-events: none; }
.portrait .duo img, .contact-photo .duo img { filter: grayscale(0.55) contrast(1.08) brightness(1.08); }
.portrait .duo::after, .contact-photo .duo::after { opacity: 0.75; }
.contact-photo .duo img { filter: grayscale(0.7) contrast(1.05) brightness(0.9); }
.contact-photo .duo::after { opacity: 0.55; }
.duo:hover img, .portrait .duo:hover img, .contact-photo .duo:hover img { filter: none; }
.duo:hover::after, .portrait .duo:hover::after, .contact-photo .duo:hover::after { opacity: 0; }
.portrait:hover .shape { transform: rotate(8deg); }
.portrait:hover .shape img { transform: rotate(-8deg) scale(1.1); }
.shape img { transition: transform 700ms var(--spring), filter 700ms ease; }
.about-text { display: grid; gap: 20px; min-width: 0; }
.about-text h2 { font-size: var(--step-3); }
.about-text p { font-size: var(--step-1); line-height: 1.55; max-width: 38ch; }
.about-text .about-body { font-size: var(--step-0); line-height: 1.65; color: var(--muted); max-width: 60ch; }
.traits { display: grid; gap: 10px; list-style: none; margin: 4px 0 0; padding: 0; }
.traits li { display: flex; align-items: baseline; gap: 12px; }
.traits li::before { content: ""; width: 8px; height: 8px; flex: none; border: 2px solid var(--accent); background: var(--surface); transform: translateY(-1px); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 16px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.facts dt { font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted); }
.facts dd { margin: 4px 0 0; font-weight: 500; }

/* Contact */
.contact-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.contact-photo { aspect-ratio: 1; width: 100%; }
.contact-photo:hover .shape { transform: rotate(-12deg); }
.contact-photo:hover .shape img { transform: rotate(12deg) scale(1.12); }
.contact { display: grid; gap: 28px; justify-items: start; }
.contact h2 { font-size: var(--step-4); letter-spacing: -0.045em; line-height: 0.98; }
.contact p { color: var(--muted); font-size: var(--step-1); max-width: 40ch; }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.email { font-family: var(--font-mono); font-size: 0.9375rem; user-select: all; }

/* Footer */
.site-footer { padding-block: 32px 40px; color: var(--muted); font-size: 0.9375rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 24px; }
.site-footer ul { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* Case study page */
.cs-hero { padding-block: clamp(40px, 7vw, 88px) clamp(32px, 4vw, 48px); display: grid; gap: 20px; }
.back { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); text-decoration: none; font-family: var(--font-mono); font-size: var(--step--1); justify-self: start; }
.back:hover { color: var(--accent); }
.cs-hero h1 { font-size: var(--step-4); letter-spacing: -0.045em; line-height: 0.98; }
.cs-hero .lede { font-size: var(--step-1); color: var(--muted); max-width: 46ch; line-height: 1.5; }
.meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 20px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.meta dt { font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted); }
.meta dd { margin: 4px 0 0; font-weight: 500; }

.cs-visual { aspect-ratio: 16 / 9; }
.cs-visual .phone { width: min(26%, 220px); }
.cs-visual .sheet { width: min(56%, 480px); }

.quote { display: grid; gap: 16px; margin: 0; padding-block: clamp(40px, 6vw, 72px); border-top: 1px solid var(--line); }
.quote p { font: 500 var(--step-3) / 1.15 var(--font-display); letter-spacing: -0.03em; max-width: 26ch; text-wrap: balance; }
.quote p::before { content: "“"; color: var(--accent); }
.quote p::after { content: "”"; color: var(--accent); }
.quote figcaption { color: var(--muted); }

.results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.result { display: grid; gap: 6px; align-content: start; padding: 24px; border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.result strong { font: 600 var(--step-3) / 1 var(--font-display); color: var(--accent); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.result span { color: var(--muted); }
.result .word, .kpi .word { font-size: var(--step-2); line-height: 1.15; letter-spacing: -0.02em; color: var(--accent); }

.story { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: clamp(16px, 4vw, 56px); padding-block: clamp(40px, 6vw, 72px); border-top: 1px solid var(--line); }
.story:first-of-type { border-top: 0; }
.story-label { display: grid; gap: 10px; align-content: start; }
.story-label .mono { color: var(--accent); }
.story-label h2 { font-size: var(--step-2); }
.story-body { display: grid; gap: 18px; max-width: 64ch; min-width: 0; }
.story-body p { font-size: 1.125rem; line-height: 1.65; }
.decisions { display: grid; gap: 12px; list-style: none; margin: 0; padding: 0; }
.decisions li { display: grid; gap: 4px; padding: 18px 20px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.decisions strong { font-weight: 600; }
.decisions span { color: var(--muted); }

.next-case {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-block: clamp(24px, 4vw, 48px) clamp(56px, 8vw, 96px);
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  text-decoration: none;
  transition: box-shadow 160ms ease;
}
.next-case:hover { box-shadow: inset 0 0 0 2px var(--accent); }
.next-case h2 { font-size: var(--step-3); }
.next-case .arrow { font-size: var(--step-3); color: var(--accent); transition: transform 260ms var(--spring); }
.next-case:hover .arrow { transform: translateX(6px); }

/* Design system playground: brands and sport modes as token sets, switched with radios (no JS, works in the modal) */
.cs-visual.ds-visual { aspect-ratio: auto; display: block; padding: clamp(20px, 4vw, 48px); }
.ds-demo {
  --p: #7f97ff; --p-ink: #0b0d12; --p-label: "#7F97FF";
  --r: 14px; --r-label: "14px";
  --card: #1a1e27;
  --m: var(--p); --m-label: "= primary"; --league: "Matchday 12";
  --pattern: none;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.ds-demo:has(#ds-brand-b:checked) { --p: #ffb547; --p-ink: #1a1203; --p-label: "#FFB547"; --r: 4px; --r-label: "4px"; --card: #1f1c17; }
.ds-demo:has(#ds-brand-c:checked) { --p: #4fd1a5; --p-ink: #04140e; --p-label: "#4FD1A5"; --r: 26px; --r-label: "26px"; --card: #152019; }
.ds-demo:has(#ds-mode-football:checked) { --m: #3ccf6e; --m-label: "#3CCF6E"; --league: "Football"; --pattern: repeating-linear-gradient(90deg, rgb(60 207 110 / 0.06) 0 22px, transparent 22px 44px); }
.ds-demo:has(#ds-mode-handball:checked) { --m: #ff7a45; --m-label: "#FF7A45"; --league: "Handball"; --pattern: radial-gradient(rgb(255 122 69 / 0.18) 1.2px, transparent 1.6px) 0 0 / 14px 14px; }
.ds-demo:has(#ds-mode-hockey:checked) { --m: #8fd3ff; --m-label: "#8FD3FF"; --league: "Ice hockey"; --pattern: linear-gradient(90deg, transparent calc(50% - 1px), rgb(143 211 255 / 0.3) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)), radial-gradient(circle at 50% 50%, transparent 36px, rgb(143 211 255 / 0.3) 36px 38px, transparent 38px); }

.ds-side { display: grid; gap: 20px; min-width: 0; }
.ds-group { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.ds-group legend { width: 100%; margin-bottom: 8px; padding: 0; color: var(--muted); }
.ds-group label {
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 0.9375rem;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 220ms var(--spring);
}
.ds-group label:hover { transform: translateY(-1px); }
.ds-group label:active { transform: scale(0.96); }
.ds-group input { position: absolute; opacity: 0; pointer-events: none; }
.ds-group label:has(input:checked) { background: var(--ink); color: var(--bg); box-shadow: none; }
.ds-group label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.ds-tokens { display: grid; gap: 6px; margin: 4px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: var(--step--1); }
.ds-tokens div { display: flex; justify-content: space-between; gap: 12px; }
.ds-tokens dt { color: var(--muted); }
.ds-tokens dd { margin: 0; display: flex; align-items: center; gap: 8px; }
.ds-tokens dd::before { content: ""; width: 12px; height: 12px; border-radius: 3px; }
.ds-tokens .t-p::before { background: var(--p); }
.ds-tokens .t-m::before { background: var(--m); }
.ds-tokens .t-r::before { border: 2px solid var(--ink); border-radius: min(var(--r), 6px) 3px 3px 3px; width: 10px; height: 10px; }
.ds-tokens .t-p::after { content: var(--p-label); }
.ds-tokens .t-m::after { content: var(--m-label); }
.ds-tokens .t-r::after { content: var(--r-label); }

.ds-stage { display: grid; gap: 12px; justify-items: center; min-width: 0; }
.ds-card {
  width: min(100%, 340px);
  display: grid;
  gap: 18px;
  padding: 22px;
  border-radius: var(--r);
  background: var(--pattern), var(--card);
  box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.7), inset 0 0 0 1px rgb(255 255 255 / 0.06);
  color: #f2f3f6;
  transition: border-radius 420ms var(--spring), background-color 300ms ease;
}
.ds-card-top { display: flex; justify-content: space-between; align-items: center; }
.ds-tag { padding: 4px 10px; border-radius: calc(var(--r) / 2); background: color-mix(in srgb, var(--m) 18%, transparent); color: var(--m); font: 500 0.8125rem / 1.2 var(--font-mono); transition: color 300ms ease, background 300ms ease, border-radius 420ms var(--spring); }
.ds-tag::before { content: var(--league); }
.ds-live { display: inline-flex; align-items: center; gap: 6px; font: 600 0.75rem / 1 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; }
.ds-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #ff4d5e; box-shadow: 0 0 0 4px rgb(255 77 94 / 0.2); }
.ds-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; font-weight: 500; }
.ds-teams span:last-child { text-align: right; }
.ds-teams strong { font: 600 2rem / 1 var(--font-display); letter-spacing: -0.02em; }
.ds-bar { height: 6px; border-radius: 99px; background: rgb(255 255 255 / 0.1); overflow: hidden; }
.ds-bar span { display: block; width: 62%; height: 100%; border-radius: inherit; background: var(--m); transition: background 300ms ease; }
.ds-btn { justify-self: start; padding: 11px 18px; border-radius: var(--r); background: var(--p); color: var(--p-ink); font-weight: 600; transition: background 300ms ease, color 300ms ease, border-radius 420ms var(--spring); }
.ds-note { color: var(--muted); text-align: center; }

@media (max-width: 860px) {
  .ds-demo { grid-template-columns: minmax(0, 1fr); }
  .ds-stage { order: -1; }
}

/* Case study modal: a sheet that slides up over the home page */
html.modal-open { overflow: hidden; }
.case-modal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: env(safe-area-inset-top, 0px) 0 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: hidden;
}
.case-modal::backdrop { background: rgb(5 6 9 / 0.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.case-modal-sheet {
  height: calc(100% - clamp(12px, 4vh, 40px));
  max-width: calc(var(--wrap) + 2 * var(--gutter) + 48px);
  margin: clamp(12px, 4vh, 40px) auto 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1px, transparent 1.4px);
  background-size: 24px 24px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -30px 80px -20px rgb(0 0 0 / 0.6);
}
.case-modal[open] .case-modal-sheet { animation: sheet-in 460ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.case-modal.closing .case-modal-sheet { animation: sheet-out 200ms ease both; }
.case-modal.closing::backdrop { opacity: 0; transition: opacity 200ms ease; }
@keyframes sheet-in { from { transform: translateY(56px); opacity: 0; } }
@keyframes sheet-out { to { transform: translateY(56px); opacity: 0; } }
.case-modal-bar { position: sticky; top: 0; z-index: 3; height: 0; display: flex; justify-content: flex-end; padding-inline: 16px; pointer-events: none; }
.case-modal-close {
  pointer-events: auto;
  margin-top: 16px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), 0 8px 24px -8px rgb(0 0 0 / 0.6);
  color: var(--ink);
  font: 400 26px / 1 var(--font-body);
  cursor: pointer;
  transition: transform 260ms var(--spring), background 160ms ease;
}
.case-modal-close:hover { transform: rotate(90deg); background: var(--surface-2); }
.case-modal-body .cs-hero { padding-top: clamp(32px, 5vw, 64px); }
.case-modal-body .next-case { margin-bottom: clamp(32px, 5vw, 64px); }
.case-modal-status { padding: 96px var(--gutter); color: var(--muted); }
.case-modal-status a { color: var(--accent); }

/* 404 */
.notfound { min-height: 60vh; display: grid; align-content: center; gap: 24px; justify-items: start; padding-block: 80px; }
.notfound h1 { font-size: var(--step-4); letter-spacing: -0.045em; }

@media (max-width: 860px) {
  .work-grid, .about { grid-template-columns: minmax(0, 1fr); }
  .impact-layout, .contact-layout { grid-template-columns: minmax(0, 1fr); }
  .contact-photo { max-width: 320px; }
  .impact-lead { position: static; }
  .portrait { max-width: 360px; margin-bottom: 48px; }
  .story { grid-template-columns: minmax(0, 1fr); }
  .meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .results { grid-template-columns: minmax(0, 1fr); }
  .cs-visual { aspect-ratio: 4 / 3; }
  .cs-visual .phone { width: min(44%, 200px); }
  .cs-visual .sheet { width: min(80%, 360px); }
}

@media (max-width: 520px) {
  .site-nav a { padding: 8px 9px; font-size: 0.875rem; }
  .site-header .wrap { gap: 8px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .ledger li { grid-template-columns: 6.5rem minmax(0, 1fr); gap: 14px; }
  .next-case h2 { font-size: var(--step-2); }
}

@media (max-width: 400px) {
  .site-nav .nav-opt { display: none; }
}

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