/* Homepage and case-study layout. Sizes and spacing come from the tokens in typography.css. */
*{box-sizing:border-box}
html{background:var(--paper);color:var(--ink)}
body{margin:0}a{color:inherit;text-decoration:none}button{font:inherit;color:inherit;cursor:pointer}img{display:block;max-width:100%}
figure{margin:0}p{margin:0}
[hidden]{display:none!important}
a:focus-visible,button:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
.ix-skip{position:fixed;left:var(--s4);top:-60px;z-index:60;background:var(--paper);padding:var(--s3)}.ix-skip:focus{top:var(--s2)}



/* Layout */
.ix-shell{height:calc(100dvh - var(--header));display:grid;grid-template-columns:var(--sidebar) minmax(0,1fr);overflow:hidden}
.ix-sidebar{min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;border-right:1px solid var(--line);display:flex;flex-direction:column;scrollbar-width:thin}
.ix-block{border-top:1px solid var(--line);padding:var(--s3) var(--gutter)}
.ix-index-heading{font-size:var(--fs-xl);margin:0 0 var(--s3)}

/* Introduction and greeting */
.ix-rail{padding:var(--s4) var(--gutter) var(--s4)}
.ix-hello{display:flex;align-items:center;gap:var(--s2);font-size:var(--fs-xl);margin:0 0 var(--s3)}
.ix-greeting{display:inline-flex;overflow:hidden;padding-block:.14em .06em;margin-block:-.14em -.06em;line-height:1;white-space:pre}
.ix-letter{display:inline-block;transform-origin:0 100%;will-change:transform}
.ix-wave{display:inline-block;font-size:.78em;transform-origin:70% 75%;animation:wave-hello 1.4s var(--ease-out) 1}
.ix-hello:hover .ix-wave{animation:wave-again 1.2s var(--ease-out)}
@keyframes wave-hello{0%,100%{transform:rotate(0)}25%{transform:rotate(18deg)}50%{transform:rotate(-8deg)}75%{transform:rotate(12deg)}}
@keyframes wave-again{0%,100%{transform:rotate(0)}25%{transform:rotate(18deg)}50%{transform:rotate(-8deg)}75%{transform:rotate(12deg)}}
.ix-rail p{font-size:var(--fs-md);line-height:var(--lh-copy);max-width:52ch}
/* On tall screens the intro grows with the window (up to 22px); the work tiles give up the room it takes. */
@media(min-width:901px) and (min-height:1000px){.ix-rail p{font-size:clamp(var(--fs-md),1.1vw + 6px,var(--fs-lg))}}
.ix-rail p+p{margin-top:var(--s2)}

/* Selected work (after reckon.house): a 3 × 2 grid of six cases, image on top, title and year below.
   The column never scrolls: this block takes the height the intro and Experience leave, and the images
   grow or shrink with the window (up to square), never below 64px (below that the column scrolls). */
.ix-sidebar{overflow-x:hidden}
.ix-rail,.ix-sidebar>.ix-block{flex-shrink:0}
.ix-sidebar>.ix-block.ix-work{--work-head:48px;--card-text:72px;flex:0 1 auto;min-height:calc(2 * (44px + var(--card-text)) + var(--s4) + var(--work-head));display:flex;flex-direction:column;container-type:inline-size}
/* Each card spans three shared rows (image, title, meta), so images in a row are always the same height. */
.ix-projects{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(44px,calc((100cqi - 2 * var(--s3)) / 3 + var(--s2))) auto auto);column-gap:var(--s3)}
.ix-card{grid-row:span 3;display:grid;grid-template-rows:subgrid;min-width:0;transition:transform .25s var(--ease-out)}
.ix-card:nth-child(-n+3){padding-bottom:var(--s4)}
/* 2 × 3 when the column has room to spare (index-concept.js adds .is-tall after measuring), so tall screens
   fill the sidebar with larger tiles; elsewhere 3 × 2. The year moves onto the title line in 2 × 3. */
.ix-sidebar.is-tall>.ix-block.ix-work{--card-text:40px;min-height:calc(3 * (44px + var(--card-text)) + 2 * var(--s4) + var(--work-head))}
.ix-sidebar.is-tall .ix-projects{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(44px,calc((100cqi - var(--s3)) / 2 + var(--s2))) auto auto)}
.ix-sidebar.is-tall .ix-card:nth-child(-n+4){padding-bottom:var(--s4)}
.ix-sidebar.is-tall :is(.ix-card-row,.ix-card-meta){grid-row:2;grid-column:1;width:var(--tile-w,100%);max-width:100%;justify-self:start}
.ix-sidebar.is-tall .ix-card-row{padding-right:5ch}
.ix-sidebar.is-tall .ix-card-meta{display:block;text-align:right;align-self:center;pointer-events:none}
/* The tiles are narrower than their columns in 2 × 3, so the right-hand column sits against the right edge:
   the pair spans the full width and the side padding stays even. */
.ix-sidebar.is-tall .ix-card:nth-child(even)>*{justify-self:end}
/* Logo tiles: square. A tile is as tall as its row and as wide as it is tall, so it is a full column
   wide where there is room and a smaller square on short screens. the client's logo (an alpha mask, so it takes the ink colour) on a soft ground. The tile
   inverts on hover and while that case is open: ink ground, logo in paper. */
.ix-card-logo{position:relative;display:grid;place-items:center;height:calc(100% - var(--s2));aspect-ratio:1;justify-self:start;max-width:100%;min-height:0;overflow:hidden;background:var(--soft);margin-bottom:var(--s2);transition:background-color .45s var(--ease-out)}
.ix-card-logo>span{width:var(--logo-w,50%);height:72%;background:var(--ink);-webkit-mask:var(--logo) center/contain no-repeat;mask:var(--logo) center/contain no-repeat;transition:transform .6s var(--ease-out),background-color .45s var(--ease-out)}
/* A card can set its own tile colour (--tile, the third value in brandLogos); none does today. */
/* Hover and the open case invert the tile: ink ground, logo in paper. */
.ix-card:is(:hover,:focus-visible,[aria-current="true"]) .ix-card-logo{background:var(--tile,var(--ink))}
.ix-card:is(:hover,:focus-visible,[aria-current="true"]) .ix-card-logo>span{background:var(--paper)}
.ix-card:is(:hover,:focus-visible) .ix-card-logo>span{transform:scale(1.06)}
.ix-card-row{display:flex;justify-content:space-between;align-items:baseline;gap:var(--s2)}
.ix-card-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-inline:.2em;margin-inline:-.2em;font-family:var(--display);font-weight:500;font-size:var(--fs-md);letter-spacing:var(--track-title);line-height:var(--lh-snug)}
.ix-card-year,.ix-card-meta{font-size:var(--fs-sm);color:var(--muted);line-height:var(--lh-copy)}
.ix-card-meta{padding-top:0}

/* Experience */
.ix-years button{display:flex;align-items:center;justify-content:space-between;gap:var(--s3);width:100%;min-height:28px;border:0;background:none;text-align:left;padding:var(--s1) 0;font-size:var(--fs-md);line-height:var(--lh-snug);transition:transform .25s var(--ease-out)}
.ix-year{color:var(--muted);white-space:nowrap}
.ix-company{display:flex;align-items:center;gap:var(--s2)}.ix-company .icon{width:13px;height:13px}
.ix-years button:active,.ix-card:active{transform:scale(.985);transition-duration:.1s}


/* Stage */
.ix-stage{min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;padding:var(--s4) var(--gutter) 0;background:var(--paper);position:relative;scrollbar-width:thin}
.ix-stage.is-idle{padding:0;overflow:hidden}
.ix-back{display:inline-flex;align-items:center;gap:var(--s2);border:0;background:none;padding:0;margin:0 0 var(--s4);min-height:32px;font-size:var(--fs-sm);color:var(--muted);transition:color .3s var(--ease-out)}.ix-back:hover{color:var(--ink)}

/* Case study */
.ix-reader{min-width:0}
.ix-reader .eyebrow,.ix-label{display:block;font-size:var(--fs-xs);letter-spacing:.06em;text-transform:uppercase;color:var(--muted);line-height:var(--lh-copy)}
.project-title-row h2{font-size:var(--fs-2xl);letter-spacing:var(--track-display);margin:var(--s2) 0 var(--s4)}
/* Subheader: the location leads, in ink with the highlighter drawn under it; category and year follow in grey. */
.project-meta{display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--s1) var(--s5);margin-bottom:var(--s5);font-size:var(--fs-xl);letter-spacing:var(--track-text);line-height:var(--lh-tight);color:var(--muted)}
.project-location{color:var(--ink)}
.project-location .hl::before{transform:scaleX(1) rotate(-1.2deg) skewX(-8deg);transform-origin:0 50%;animation:meta-mark .7s .55s var(--ease-out) both}
@keyframes meta-mark{from{transform:scaleX(0) rotate(-1.2deg) skewX(-8deg)}}
@media(max-width:600px){.project-meta{font-size:var(--fs-lg);gap:var(--s1) var(--s4)}}
.case-cover :is(img,video){display:block;width:100%;height:auto;max-height:85dvh;object-fit:cover}
/* A portrait clip (a phone reel) plays whole, centred on a soft ground, rather than cropped to a strip. */
/* Portrait reel: a brand panel (logo on the reel's ground colour) takes the rest of the width beside the video. */
.case-cover.is-portrait{display:grid;grid-template-columns:minmax(0,1fr) auto;background:var(--brand,var(--soft))}
.case-cover.is-portrait video{width:auto;max-width:none;height:min(85dvh,960px);object-fit:cover}
.case-cover-brand{display:grid;place-items:center;background:var(--brand)}
.case-cover-brand>span{width:min(44%,440px);aspect-ratio:3;background:#fff;-webkit-mask:var(--logo) center/contain no-repeat;mask:var(--logo) center/contain no-repeat}
@media(max-width:600px){.case-cover.is-portrait{grid-template-columns:1fr}.case-cover-brand{display:none}.case-cover.is-portrait video{width:100%;height:auto}}
/* Case text: one recipe for every block (after AKQA and R/GA). A small label sits in the left column; the
   right column holds an optional lead line and the body copy. Every block has the same rule, spacing and sizes,
   so the at-a-glance facts, the intro, each process step and the result all read alike. */
.case-block{display:grid;grid-template-columns:minmax(0,.55fr) minmax(0,1.6fr);gap:var(--s2) var(--s6);align-items:start;padding:var(--s5) 0 var(--s6);border-top:1px solid var(--line)}
.case-cover+.case-block{margin-top:var(--s5)}
.case-label{padding-top:.3em}
.case-body{min-width:0}
.case-lead{font-size:var(--fs-xl);letter-spacing:var(--track-display);line-height:var(--lh-tight);margin:0 0 var(--s4);max-width:34ch}
.case-copy{font-size:var(--fs-md);line-height:var(--lh-body);max-width:80ch}.case-copy p+p{margin-top:var(--s4)}
.case-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--s4) var(--s5);margin:0}
.case-facts dt{font-size:var(--fs-xs);letter-spacing:.06em;text-transform:uppercase;color:var(--muted);line-height:var(--lh-copy)}
.case-facts dd{margin:var(--s1) 0 0;font-size:var(--fs-md);line-height:var(--lh-copy);letter-spacing:var(--track-text)}
/* At a glance keeps its three facts in a row; on mid-size screens the label sits above so they get the full width. */
@media(max-width:1280px){.case-block:has(>.case-facts){grid-template-columns:1fr}}
@media(max-width:600px){.case-facts{grid-template-columns:1fr}}
.next-project{display:flex;justify-content:space-between;align-items:center;gap:var(--s4);padding:var(--s5) 0;border-top:1px solid var(--line)}
.next-project>span:last-child{display:inline-flex;align-items:center;gap:var(--s2);font-family:var(--display);font-weight:500;font-size:var(--fs-xl);letter-spacing:var(--track-display)}

/* Experience panel */
.ix-experience-intro{display:grid;grid-template-columns:minmax(180px,.7fr) 2fr;gap:clamp(var(--s5),4vw,var(--s7));padding:var(--s2) 0 var(--s6);align-items:start}
.ix-company-logo{width:180px;height:56px;object-fit:contain;object-position:left center;margin:0 0 var(--s4)}
.ix-company-wordmark{font-family:var(--display);font-size:var(--fs-xl);font-weight:500;letter-spacing:var(--track-display);line-height:var(--lh-tight);margin:0 0 var(--s4);max-width:9ch}
.ix-company-identity .ix-label{margin-bottom:var(--s1)}
.ix-experience-role{font-size:var(--fs-sm);line-height:var(--lh-copy)}
/* Wide, short measure: the summary reads in a few lines so the images below carry the panel. */
.ix-experience-summary{max-width:none}
.ix-experience-summary p{max-width:64ch}
.ix-experience-summary p{font-size:var(--fs-lg);line-height:var(--lh-copy);letter-spacing:var(--track-text)}
.ix-experience-summary p+p{margin-top:var(--s3)}
.ix-experience-gallery{padding-bottom:var(--s5)}
/* Experience panels are a dense contact sheet: rows of two to four with tighter gaps. */
.ix-experience-gallery .ix-row{gap:var(--s2);margin-bottom:var(--s2)}
.ix-experience-gallery .ix-row-full .ix-media:not(.is-contain) :is(img,video){max-height:70dvh}
.ix-experience-gallery .ix-row-pair .ix-media.is-contain{padding:clamp(var(--s2),1.5vw,var(--s4))}
@media(max-width:600px){
  /* One continuous two-column grid, so rows of three leave no holes. */
  .ix-experience-gallery{display:grid;grid-template-columns:1fr 1fr;gap:var(--s2);align-content:start}
  .ix-experience-gallery .ix-row{margin:0}
  .ix-experience-gallery .ix-row-pair{display:contents}
  .ix-experience-gallery .ix-row-full{grid-column:1 / -1}
  .ix-experience-gallery .ix-row-pair .ix-media{aspect-ratio:4/3}
  .ix-experience-gallery .ix-row-pair .ix-media:not(.is-contain) :is(img,video){width:100%;height:100%;object-fit:cover}
  .ix-experience-gallery .ix-row-pair .ix-media.is-contain img{max-height:100%;width:auto;margin:auto}
}

/* Idle slideshow */
.ix-idle{position:relative;isolation:isolate;width:100%;height:100%;min-height:420px}
.ix-idle-images{position:absolute;inset:-10px;overflow:hidden;background:var(--paper);transform:translate(var(--pan-x,0px),var(--pan-y,0px));transition:transform 1.4s var(--ease-out)}
/* Slides: the next image wipes across while the current one is pushed aside; each settles with a slow zoom. */
.ix-slide{position:absolute;inset:0;overflow:hidden;visibility:hidden;will-change:clip-path,transform}
.ix-slide.is-current{visibility:visible;z-index:2}.ix-slide.is-prev{visibility:visible;z-index:1}
.ix-slide img{width:100%;height:100%;object-fit:cover;transform-origin:50% 55%;will-change:transform}

/* 404 */
.ix-not-found{min-height:calc(100dvh - var(--header));display:grid;align-content:center;justify-items:start;gap:var(--s4);padding:var(--s6) var(--gutter)}
.ix-not-found h1{font-size:var(--fs-2xl);margin:0}

/* Short desktop windows */
@media(min-width:901px) and (max-height:820px){.ix-rail{padding-block:var(--s3)}.ix-hello{margin-bottom:var(--s2)}.ix-rail p{font-size:var(--fs-base)}.ix-block{padding-block:var(--s2)}.ix-index-heading{font-size:var(--fs-lg);margin-bottom:var(--s2)}.ix-years button{font-size:var(--fs-base)}.ix-work{--work-head:44px!important;--card-text:44px!important}.ix-card-meta{display:none}.ix-years button{min-height:24px;padding-block:2px}}

/* Tablet and phone: the sidebar stacks above the stage. */
@media(max-width:900px){
  :root{--sidebar:100%;--gutter:20px}
  .ix-shell{display:flex;flex-direction:column;height:auto;overflow:visible}
  .ix-sidebar{overflow:visible;border:0}
  .ix-stage{min-height:60dvh;overflow:visible;border-top:1px solid var(--line)}.ix-stage.is-idle{height:65dvh}
  .ix-idle{min-height:0}
  .ix-projects{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:none}
  .ix-card-logo{height:auto;width:100%;max-width:none}
  .ix-years button{min-height:44px}
  .ix-rail p{font-size:var(--fs-md)}
  .case-block{grid-template-columns:1fr}
  .ix-experience-intro{grid-template-columns:1fr;gap:var(--s4)}
  .ix-experience-summary p{font-size:var(--fs-md)}
  .ix-company-logo{height:44px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.ix-idle-images{transform:none}}

/* One highlighter colour (lime) for the whole site. The title and meta rise in, and Next project fills with lime on hover. */
.project-title-row h2{animation:case-rise .9s .12s var(--ease-out) both}
.project-meta{animation:case-rise .9s .22s var(--ease-out) both}
@keyframes case-rise{from{opacity:0;transform:translateY(28px)}}
.next-project{position:relative;isolation:isolate;margin:0 calc(-1 * var(--gutter));padding-inline:var(--gutter);transition:color .45s var(--ease-out),border-color .45s var(--ease-out)}
.next-project::before{content:"";position:absolute;inset:0;z-index:-1;background:var(--highlight);clip-path:inset(100% 0 0 0);transition:clip-path .6s var(--ease-in-out)}
.next-project .eyebrow{transition:color .45s var(--ease-out)}
.next-project:is(:hover,:focus-visible){color:var(--ink);border-color:transparent}
.next-project:is(:hover,:focus-visible) .eyebrow{color:inherit}
.next-project:is(:hover,:focus-visible)::before{clip-path:inset(0)}
.project-title-row h2:focus{outline:none}


/* Galleries (case process, case result, experience panels): rows of one full-width image or two side by side.
   Full rows run edge to edge across the stage, up to a full screen tall, and drift slightly as you scroll.
   Pairs share one height and keep each image's own proportions, so nothing is cropped. */
.ix-row{display:flex;gap:var(--s3);margin-bottom:var(--s3)}
.ix-media{position:relative;margin:0;overflow:hidden;background:var(--soft);min-width:0}
.ix-media :is(img,video){display:block;width:100%;height:auto}
.ix-row-full{margin-inline:calc(-1 * var(--gutter))}
.ix-row-full .ix-media{flex:1}
.ix-row-full .ix-media:not(.is-contain) :is(img,video){max-height:calc(100dvh - var(--header));object-fit:cover}
.ix-row-pair .ix-media{flex:var(--r) 1 0}
/* A pair always spans the full width, at the images' combined proportions, so the images share one height
   and none is cropped (a portrait pair may be taller than the screen). */
.ix-row-pair{width:100%;aspect-ratio:var(--sum, 3)}
.ix-row-pair .ix-media:not(.is-contain) :is(img,video){height:100%;object-fit:cover}
.ix-media.is-contain{display:grid;place-items:center;padding:clamp(var(--s4),4vw,var(--s7))}
.ix-row-pair .ix-media.is-contain{display:flex;align-items:center;justify-content:center;padding:clamp(var(--s3),2.5vw,var(--s5))}
/* In a pair, a contained image fills its share of the row (the pair itself is capped at one screen height). */
.ix-row-pair .ix-media.is-contain img{width:auto;height:auto;max-width:100%;max-height:100%}
/* Clips in a pair keep the row height of the still beside them. */
.ix-row-pair .ix-media.is-video{display:flex}.ix-row-pair .ix-media.is-video video{height:100%;object-fit:cover}
.ix-media.is-contain img{width:auto;max-width:100%;max-height:calc(100dvh - var(--header) - 2 * var(--s7));box-shadow:0 1px 2px rgba(32,33,30,.06),0 12px 32px -18px rgba(32,33,30,.35)}
@supports (animation-timeline:view()){
  .ix-row-full .ix-media:not(.is-contain) img{scale:1.1;animation:ix-drift linear both;animation-timeline:view();animation-range:cover}
  @keyframes ix-drift{from{translate:0 -4.5%}to{translate:0 4.5%}}
}
@media(prefers-reduced-motion:reduce){.ix-row-full .ix-media img{scale:none!important;translate:none!important}}
@media(max-width:600px){.ix-row-pair{flex-direction:column;aspect-ratio:auto}.ix-row-pair .ix-media{flex:none}.ix-row-pair .ix-media:not(.is-contain) :is(img,video){height:auto}}

/* Case studies: the process as numbered steps, then the result. */
.case-step{margin-bottom:var(--s6)}
.case-step>.case-block,.case-result>.case-block{margin-bottom:var(--s4)}
.case-result>.case-block{padding-bottom:0}
.case-result{padding-bottom:var(--s5)}

/* Selected work tooltip (index-concept.js): location in the highlighter colour, discipline below, ink ground. */
.ix-tip{position:fixed;left:0;top:0;z-index:50;display:grid;gap:2px;max-width:260px;padding:8px 11px 9px;background:var(--ink);color:var(--paper);font-size:var(--fs-sm);line-height:var(--lh-copy);letter-spacing:var(--track-text);pointer-events:none;opacity:0;transition:opacity .18s var(--ease-out)}
.ix-tip.is-on{opacity:1}
.ix-tip-location{color:var(--highlight);font-weight:500}
.ix-tip-category{opacity:.75}
@media(hover:none){.ix-tip{display:none}}
