/* ==========================================================
   Tokens. ".band" sections use the opposite theme.
   ========================================================== */
:root,
:root[data-theme="light"] .band {
    --bg: #0f1015;
    --surface: #15181e;
    --surface-2: #1d2129;
    --line: #2b303a;
    --text: #fbfbf9;
    --muted: #a3a9b5;
    --accent: #ff641e;
    --pop: #d8ff3e;
    --ok: #d8ff3e;
    --warn: #ff641e;
    color-scheme: dark;
}

:root[data-theme="light"],
.band {
    --bg: #fbfbf8;
    --surface: #ffffff;
    --surface-2: #efefea;
    --line: #d9d9d1;
    --text: #0f1015;
    --muted: #50565f;
    --accent: #a83a00;
    --pop: #566400;
    --ok: #566400;
    --warn: #b0391a;
    color-scheme: light;
}

:root {
    --ink: #0f1015;
    --hot: #ff641e;
    --mint: #d8ff3e;
    --sans: 'Inter Tight', system-ui, sans-serif;
    --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

/* ==========================================================
   Base
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
ul, ol { list-style: none; }
:focus-visible { outline: 2px solid var(--pop); outline-offset: 3px; }
.wrap { width: min(1320px, 100% - clamp(2.5rem, 6vw, 5rem)); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: .5rem 1rem; background: var(--hot); color: var(--ink); }
.skip:focus { top: 1rem; }

h1, h2, h3 { font-weight: 600; text-wrap: balance; }
h2 { font-size: clamp(2.25rem, 6.6vw, 6rem); line-height: .98; letter-spacing: -.05em; }
h2 em { font-style: normal; color: var(--accent); }
h3 { font-size: 1.3rem; line-height: 1.2; letter-spacing: -.02em; }

.mono, .rule, .num, .when, .work-tag, .work-stack, .hero-top, .footer-line {
    font-family: var(--mono);
    font-size: .74rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.hot, .num, .accent { color: var(--accent); }

.section { padding-block: clamp(4.5rem, 9vw, 8rem); background: var(--bg); color: var(--text); }
.rule {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: .8rem;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
    border-bottom: 1px solid var(--pop);
}
.rule span:last-child { color: var(--muted); text-align: right; }
.intro { max-width: 40rem; margin-top: 1.5rem; color: var(--muted); font-size: 1.15rem; }

/* ==========================================================
   Buttons and links
   ========================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.75rem;
    padding: .95rem 1.3rem;
    border: 1px solid transparent;
    background: none;
    color: var(--text);
    font: 600 .8rem var(--mono);
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}
.btn-solid { background: var(--hot); color: var(--ink); }
.btn-solid:hover { background: var(--mint); }
.btn-line { border-color: var(--muted); }
.btn-line:hover { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn-dark { background: var(--ink); color: var(--mint); }
.btn-dark:hover { background: #fff; color: var(--ink); }
.btn-small { padding: .55rem 1rem; }
.text-link, .work-links a {
    font: 600 .78rem var(--mono);
    text-transform: uppercase;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}

/* ==========================================================
   Header
   ========================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 4.5rem; }
.brand { font-size: 1.7rem; font-weight: 700; letter-spacing: -.06em; text-decoration: none; }
.brand b { color: var(--accent); margin-inline: .08em; }
.nav nav { margin-left: auto; }
.nav-links { display: flex; gap: 2.25rem; }
.nav-links a { font: 500 .74rem var(--mono); text-transform: uppercase; letter-spacing: .06em; text-decoration: none; padding-block: .4rem; border-bottom: 2px solid transparent; }
.nav-links a:hover, .nav-links a.current { border-bottom-color: var(--accent); }
.nav-actions { display: flex; gap: .5rem; }
.icon-btn { display: grid; place-content: center; gap: 6px; width: 2.5rem; height: 2.5rem; background: none; border: 1px solid var(--line); border-radius: 50%; color: var(--text); cursor: pointer; }
.icon-btn svg { width: 1.1rem; }
.menu-btn { display: none; }
.menu-btn span { width: 16px; height: 1.5px; background: currentColor; transition: transform .2s; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

/* ==========================================================
   Hero
   ========================================================== */
.hero { position: relative; overflow: hidden; padding-block: clamp(1.5rem, 4vw, 3rem) clamp(2.5rem, 5vw, 4rem); }
.hero::after { content: ''; position: absolute; width: 46rem; aspect-ratio: 1; right: -18rem; top: -20rem; border: 1px solid var(--line); border-radius: 50%; pointer-events: none; }
.hero-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; }
.hero-top span:last-child { color: var(--muted); }
.pop { color: var(--pop); }
.hero-stage { position: relative; margin-top: clamp(1.5rem, 3vw, 2.5rem); }
.hero h1 { font-size: clamp(3.4rem, min(13.2vw, 20vh), 12.5rem); font-weight: 700; line-height: .84; letter-spacing: -.065em; word-spacing: .08em; text-transform: uppercase; }
.line { display: block; }
.line.indent { padding-left: .72em; color: var(--hot); }
:root[data-theme="light"] .line.indent { color: #d94c0b; }
.sticker { position: absolute; z-index: 1; right: 1%; top: 6%; padding: .8rem 1.1rem; background: var(--mint); color: var(--ink); font: 600 .95rem var(--mono); text-transform: uppercase; transform: rotate(8deg); }
.dot { display: block; width: 1.25rem; aspect-ratio: 1; margin-top:  1.25rem; border-radius: 50%; background: var(--mint); }
:root[data-theme="light"] .dot { background: var(--pop); }
.hero-bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: end; margin-top: .5rem; }
.disciplines { color: var(--muted); font: .8rem var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.tagline { font-size: clamp(1.35rem, 2.2vw, 1.9rem); line-height: 1.25; letter-spacing: -.03em; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }

/* Facts strip */
.facts { border-block: 1px solid var(--line); }
.facts ul { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem; padding-block: 1.35rem; color: var(--muted); font: .76rem var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.facts b { color: var(--text); font-weight: 600; }

/* ==========================================================
   Work grid
   ========================================================== */
.work-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4rem 1.5rem; align-items: start; margin-top: 3.5rem; }
.work.wide { grid-column: span 7; }
.work.narrow { grid-column: span 5; }
.work:nth-child(even) { margin-top: 4rem; }
.work-visual {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 31rem;
    padding: 1.25rem;
    background: radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 0) 0 0 / 22px 22px, var(--surface);
    border: 1px solid var(--line);
    transition: border-color .25s;
}
.work:hover .work-visual { border-color: var(--accent); }
.work-tag { align-self: flex-start; padding: .35rem .65rem; background: var(--text); color: var(--bg); }
.work-caption { font-size: clamp(2rem, 3.8vw, 3.4rem); font-weight: 700; line-height: 1.18; letter-spacing: -.05em; text-transform: uppercase; }
.work-caption span { background: var(--ink); color: #fff; padding-inline: .12em; box-decoration-break: clone; border-bottom: 3px solid var(--hot); }
.poster { background: var(--hot); border-color: var(--hot); color: var(--ink); }
.pop-poster { background: var(--mint); border-color: var(--mint); }
.poster .work-tag { background: var(--ink); color: #fff; }
.poster .work-caption { font-size: clamp(2.6rem, 5.6vw, 5.2rem); line-height: .95; }
.poster .work-caption span { background: none; color: var(--ink); border: 0; padding: 0; }
.work-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .25rem 1rem; padding-block: .9rem; border-bottom: 1px solid var(--line); }
.work-meta p { color: var(--muted); font-size: .875rem; }
.work-problem { margin-top: 1rem; color: var(--muted); }
.work details { margin-top: 1rem; }
.work summary { cursor: pointer; font-weight: 600; }
.work summary::marker { color: var(--accent); }
.work details p { margin-top: .6rem; }
.work .work-stack { margin-top: .75rem; color: var(--accent); line-height: 1.8; }
.work-links { display: flex; flex-wrap: wrap; gap: .75rem 1.75rem; margin-top: 1.25rem; }

.flow { display: flex; flex-direction: column; align-items: center; }
.flow-row { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
.flow i { width: 1px; height: 1.5rem; background: var(--accent); }
.node { padding: .55rem 1rem; background: var(--surface-2); border: 1px solid var(--line); font: .8rem var(--mono); }
.node.strong { background: var(--hot); border-color: var(--hot); color: var(--ink); }
.node.ok { border-color: var(--ok); }
.node.warn { border-color: var(--warn); }
.node.dashed { border-style: dashed; border-color: var(--muted); }

.shots { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.shots img { border: 1px solid var(--line); box-shadow: 0 20px 45px rgb(0 0 0 / .3); }
.shots .shot-web { width: 100%; }
.shots:not(.single) .shot-web { width: 88%; }
.shots .shot-phone { position: absolute; right: 0; top: 50%; width: 31%; max-width: 8.5rem; transform: translateY(-50%); border-radius: 14px; }

.signal { width: 100%; }
.signal rect { fill: var(--surface-2); }
.signal .line { fill: none; stroke: var(--text); stroke-width: 1.6; stroke-linejoin: round; animation: none; }
.signal .hit { fill: none; stroke: var(--warn); stroke-width: 2.5; }
.signal text { fill: var(--muted); font: 12px var(--mono); }
.caption { margin-top: .5rem; text-align: center; font-size: .75rem; color: var(--muted); }

/* ==========================================================
   Statement
   ========================================================== */
.statement { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.statement img { width: 100%; }
.statement figcaption { padding-block: .7rem; border-bottom: 3px solid var(--accent); font: .74rem var(--mono); text-transform: uppercase; }
.statement h2 { font-size: clamp(2.5rem, 6.4vw, 6rem); }
.statement h2 + p { max-width: 38rem; margin-top: 2rem; font-size: 1.2rem; }

/* ==========================================================
   Pipeline
   ========================================================== */
.pipeline { margin-top: 3rem; }
.stages { display: grid; grid-template-columns: repeat(6, 1fr); gap: .75rem; }
.stages button { display: flex; flex-direction: column; gap: .4rem; width: 100%; padding: 1rem 0; text-align: left; background: none; border: 0; border-top: 2px solid var(--line); color: var(--muted); font: 600 clamp(1.4rem, 2.4vw, 2.25rem) var(--sans); letter-spacing: -.04em; cursor: pointer; transition: color .2s, border-color .2s; }
.stages button:hover { color: var(--text); }
.stages button[aria-pressed="true"] { color: var(--text); border-top-color: var(--hot); }
.stages button .mono { letter-spacing: .06em; }
.stages button[aria-pressed="true"] .mono { color: var(--accent); }
.stage-detail { min-height: 12rem; padding-block: 2rem 1rem; }
.stage-detail h3 { font-size: 2rem; letter-spacing: -.04em; }
.stage-detail p { max-width: 46rem; margin-top: .6rem; }
.pipeline-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }

/* ==========================================================
   Service rows
   ========================================================== */
.rows { margin-top: 3.5rem; border-top: 1px solid var(--line); }
.rows a { display: grid; grid-template-columns: 5rem minmax(0, 1.4fr) minmax(0, 1fr) 2rem; align-items: center; gap: .5rem 1.5rem; padding-block: 1.9rem; border-bottom: 1px solid var(--line); text-decoration: none; transition: background .2s, padding .2s; }
.rows a:hover, .rows a:focus-visible { background: var(--surface-2); padding-inline: 1rem; }
.rows h3 { font-size: clamp(1.6rem, 3.2vw, 2.75rem); letter-spacing: -.045em; }
.rows p { color: var(--muted); font-size: .95rem; }
.arrow { justify-self: end; font-size: 1.4rem; color: var(--pop); transition: transform .2s; }
.rows a:hover .arrow { transform: rotate(45deg); }

/* Process */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 3.5rem; }
.steps li { display: flex; flex-direction: column; padding: 1.5rem; border: 1px solid var(--line); background: var(--surface); }
.steps h3 { margin: 3.5rem 0 .75rem; font-size: 1.75rem; }
.steps li > p:last-child { color: var(--muted); font-size: .95rem; }

/* ==========================================================
   Project list
   ========================================================== */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: 3rem 1.5rem; }
.filters button { padding: .55rem 1rem; background: none; border: 1px solid var(--line); color: var(--muted); font: 500 .74rem var(--mono); text-transform: uppercase; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.project-list { border-top: 1px solid var(--line); margin-bottom: 2rem; }
.project { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) 6rem; gap: .5rem 2rem; align-items: baseline; padding-block: 1.6rem; border-bottom: 1px solid var(--line); }
.project h3 { font-size: 1.6rem; }
.project p { color: var(--muted); font-size: .975rem; }
.project .mono { display: block; margin-top: .5rem; text-transform: none; }
.project a { justify-self: end; font: 600 .78rem var(--mono); text-transform: uppercase; text-underline-offset: 6px; text-decoration-color: var(--accent); }

/* ==========================================================
   Colour block
   ========================================================== */
.callout { position: relative; overflow: hidden; padding-block: clamp(4.5rem, 9vw, 8rem); background: var(--mint); color: var(--ink); }
.callout::after { content: '+'; position: absolute; right: 2vw; top: -9rem; font-size: 36rem; line-height: 1; font-weight: 700; opacity: .07; pointer-events: none; }
.callout .wrap { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 2rem; align-items: end; }
.callout .mono { grid-column: 1 / -1; }
.callout h2 { font-size: clamp(2.6rem, 9vw, 8.5rem); font-weight: 700; line-height: .9; text-transform: uppercase; }
.callout h2 em { color: #9c3500; }
.callout-side { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 1.5rem; font-size: 1.2rem; }
.callout :focus-visible { outline-color: var(--ink); }

/* ==========================================================
   Experience
   ========================================================== */
.timeline { margin-top: 3.5rem; }
.timeline li { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: .5rem 2rem; padding-block: 1.75rem; border-top: 1px solid var(--line); }
.when { color: var(--muted); padding-top: .35rem; }
.timeline h3 { font-size: 1.6rem; }
.org { color: var(--accent); font-size: .95rem; margin-block: .25rem .4rem; }
.timeline li div p:last-child { color: var(--muted); }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 6vw, 5rem); padding-top: 3rem; border-top: 1px solid var(--line); }
.split-title { font-size: 1.75rem; margin-bottom: 1.25rem; }
.edu li { display: flex; flex-direction: column; padding-block: .8rem; border-bottom: 1px solid var(--line); }
.edu strong { font-weight: 600; font-size: .975rem; }
.edu span { color: var(--muted); font-size: .875rem; }
.stack { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); }
.stack dt, .stack dd { padding-block: .8rem; border-bottom: 1px solid var(--line); font-size: .95rem; }
.stack dt { font-weight: 600; }
.stack dd { color: var(--muted); }

/* ==========================================================
   Contact and footer
   ========================================================== */
.contact { border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); }
.contact-grid > div > p { font-size: 1.2rem; }
.big-link { display: inline-block; margin-block: 2rem; padding-bottom: .5rem; border-bottom: 3px solid var(--accent); font-size: clamp(2rem, 4.5vw, 3.75rem); font-weight: 600; letter-spacing: -.045em; text-transform: uppercase; text-decoration: none; }
.big-link:hover { color: var(--accent); }
.email-row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
.email { overflow-wrap: anywhere; }
.channels { display: flex; flex-wrap: wrap; gap: .75rem 1.75rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.channels a { font: 500 .76rem var(--mono); text-transform: uppercase; text-decoration: none; }
.channels a:hover { color: var(--accent); }

.footer { border-top: 1px solid var(--line); padding-top: 3rem; }
.wordmark { font-size: clamp(3.4rem, 15vw, 13rem); font-weight: 700; line-height: .86; letter-spacing: -.065em; text-transform: uppercase; }
.wordmark span { display: block; text-align: right; color: var(--accent); padding-right: .07em; }
.footer-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem; margin-top: 2.5rem; padding-block: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); }
.footer-line a { text-decoration: none; }

/* ==========================================================
   Motion
   ========================================================== */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.hero .line { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero .line:nth-child(2) { animation-delay: .1s; }
.hero .line:nth-child(3) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(.35em); } }

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

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1000px) {
    .hero-bottom { grid-template-columns: minmax(0, 1fr); }
    .disciplines { order: 2; }
    .sticker { position: static; display: inline-block; margin-bottom: 1.5rem; transform: rotate(-4deg); }
    .work.wide, .work.narrow { grid-column: 1 / -1; }
    .work:nth-child(even) { margin-top: 0; }
    .statement, .callout .wrap, .contact-grid, .split { grid-template-columns: minmax(0, 1fr); }
    .stages { grid-template-columns: repeat(3, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
    .menu-btn { display: grid; }
    .nav-actions { margin-left: auto; }
    .nav nav { margin: 0; }
    .nav-links { position: absolute; inset: 4.5rem 0 auto; flex-direction: column; gap: 0; padding: .5rem 1.25rem 1rem; background: var(--bg); border-bottom: 1px solid var(--line); }
    /* Collapse only when JavaScript can open the menu again */
    .js .nav-links { display: none; }
    .js .nav-links.open { display: flex; }
    .nav-links a { display: block; padding-block: .8rem; font-size: .9rem; }
    html:not(.js) .menu-btn { display: none; }
    html:not(.js) .nav-links { position: static; flex-direction: row; flex-wrap: wrap; gap: 0 1rem; padding: 0; border: 0; }
    html:not(.js) .nav { height: auto; flex-wrap: wrap; padding-block: .75rem; }
    .project, .timeline li { grid-template-columns: minmax(0, 1fr); }
    .project a { justify-self: start; }
    .rows a { grid-template-columns: minmax(0, 1fr) 2rem; }
    .rows .num, .rows h3, .rows p { grid-column: 1; }
    .rows .arrow { grid-column: 2; grid-row: 2; }
}

@media (max-width: 560px) {
    .work-visual { min-height: 26rem; padding: .9rem; }
    .steps { grid-template-columns: minmax(0, 1fr); }
    .steps h3 { margin-top: 1.5rem; }
    .stages { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
    .stage-detail { min-height: 17rem; }
    .actions .btn { flex: 1 1 100%; }
    .hero h1 { font-size: 16.4vw; }
    .line.indent { padding-left: .22em; }
    .dot { display: none; }
    .hero-bottom { margin-top: 1.75rem; }
    .statement figure { max-width: 16rem; }
    .facts ul { flex-direction: column; }
    .rule { flex-direction: column; gap: .25rem; }
    .rule span:last-child { text-align: left; }
    .stack { grid-template-columns: 6rem minmax(0, 1fr); }
}
