:root {
  --ink: #0A0A0A; --paper: #ECEBE6; --mid: #5d5d58; --acc: #2a2aff; --line: #cfcec8;
  --wrap: 1200px; --gut: clamp(16px, 4vw, 40px);
  color-scheme: light;   /* the brand default: ink on off-white (#ECEBE6), per the proposal */
}
/* dark mode, chosen with the switch: the proposal's dark palette */
:root[data-theme="dark"] { --ink: #ECEBE6; --paper: #0B0B0B; --mid: #9a9a94; --acc: #2a2aff; --line: #333; color-scheme: dark; }
body, .stick { transition: background-color .35s ease, color .35s ease; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 18px/1.5 "Familjen Grotesk", Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.lg { display: block; fill: currentColor; }
.m { color: var(--mid); font-size: .9rem; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; }
p { margin: 0 0 14px; max-width: 60ch; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 10px 14px; z-index: 50; }
.skip:focus { left: 16px; }
:focus-visible { outline: 3px solid var(--acc); outline-offset: 2px; }

/* buttons and links */
.btn { display: inline-block; background: var(--ink); color: var(--paper); padding: 14px 24px; font: 700 16px "Familjen Grotesk", sans-serif; border: 0; text-decoration: none; cursor: pointer; transition: background .15s, color .15s; }
.btn:hover { background: var(--acc); color: #fff; }
.btn.sm { padding: 9px 16px; font-size: 14px; }
.link { font-weight: 700; text-decoration: none; border-bottom: 3px solid var(--acc); }

/* header */
.top { padding-top: clamp(20px, 3vw, 36px); }
.mark { display: block; }
.mark .lg { width: 100%; height: auto; }
.nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); padding: 14px 0; margin-top: clamp(16px, 2.4vw, 28px); font-weight: 500; font-size: .95rem; }
.nav span { display: flex; gap: 22px; flex-wrap: wrap; }
.nav a { text-decoration: none; border-bottom: 3px solid transparent; transition: border-color .15s; }
.nav a:hover { border-color: var(--acc); }
.nav-meta { color: var(--mid); }

/* sticky bar */
.stick { position: fixed; top: 0; left: 0; right: 0; z-index: 20; background: var(--paper); border-bottom: 3px solid var(--ink); transform: translateY(-110%); transition: transform .3s ease; }
.stick.on { transform: none; }
.stick-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.stick .lg { width: 112px; height: auto; }
.stick span { display: flex; align-items: center; gap: 20px; font-weight: 500; font-size: .92rem; }
.stick span a:not(.btn) { text-decoration: none; }

/* hero */
.hero { padding-block: clamp(20px, 3vw, 40px) clamp(48px, 7vw, 96px); }
.hero h1 { font-size: clamp(2.6rem, 1rem + 5.2vw, 6.2rem); line-height: .9; letter-spacing: -.05em; }
.hero-foot { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(22px, 2.4vw, 32px); margin-top: clamp(28px, 4vw, 48px); }
.hero-foot p { font-size: 1.15rem; margin: 0; max-width: 42ch; }
.btn-xl { display: inline-flex; align-items: center; gap: 22px; padding: clamp(22px, 2.2vw, 30px) clamp(30px, 3.2vw, 46px); font-size: clamp(20px, 1rem + .9vw, 28px); letter-spacing: -.02em; }
.btn-xl .arr { display: inline-block; font-size: 1.25em; line-height: 1; transition: transform .25s cubic-bezier(.2,.7,.2,1); }
.btn-xl:hover .arr, .btn-xl:focus-visible .arr { transform: translateX(8px); }
@media (max-width: 760px) { .btn-xl { width: 100%; justify-content: space-between; } }

/* hero art: the rubber, pencil and set square. Each one plays when clicked (tools.js) */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 40.6%; column-gap: clamp(20px, 3vw, 48px); align-items: start; }
.hero > h1, .hero > .hero-foot { grid-column: 1; }
.hero-art { grid-column: 2; grid-row: 1 / span 2; margin-top: clamp(-28px, -1.6vw, -8px); }
.tools { display: block; width: 100%; height: auto; overflow: visible; color: var(--ink); -webkit-tap-highlight-color: transparent; }
.tool { cursor: pointer; outline: none; transform-box: fill-box; transform-origin: center; transition: translate .25s cubic-bezier(.2,.7,.2,1); }
.tool-ink { fill: currentColor; }
.tool-fill { fill: var(--paper); }
.tool:focus-visible .tool-ink { fill: var(--acc); }
@media (hover: hover) { .tool:hover { translate: 0 -6px; } }
.tool-fx { pointer-events: none; }
.tool-fx .crumb { fill: currentColor; transform-box: fill-box; transform-origin: center; }
.tool-fx .scrawl { fill: none; stroke: currentColor; stroke-width: 4.2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { grid-column: 1; grid-row: auto; margin: clamp(28px, 7vw, 44px) auto 0; width: min(100%, 420px); }
}

/* blocks */
.block { padding-block: clamp(44px, 6vw, 80px); }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-top: 3px solid var(--ink); padding-top: 18px; margin-bottom: clamp(22px, 3vw, 36px); }
.block-head h2 { font-size: clamp(2rem, 1.2rem + 3vw, 3.4rem); line-height: 1; letter-spacing: -.035em; }

/* work */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.6vw, 32px) clamp(14px, 2vw, 24px); }
.work { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.tile { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; background: var(--bg); overflow: hidden; position: relative; }
.tile::after { content: "View case study \2192"; position: absolute; left: 16px; bottom: 14px; font-weight: 700; font-size: .85rem; color: #fff; background: rgba(0,0,0,.35); padding: 6px 10px; opacity: 0; transform: translateY(6px); transition: opacity .25s ease, transform .25s ease; }
.tm { display: block; flex: none; height: auto; max-width: 100%; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.tm-fr { width: 56%; } .tm-ss { width: 58%; }
.work:hover .tm, .work:focus-visible .tm { transform: scale(1.06); }
.work:hover .tile::after, .work:focus-visible .tile::after { opacity: 1; transform: none; }
.cap { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: .92rem; }
.cap span { color: var(--mid); }
.work:hover .cap b { text-decoration: underline; text-decoration-color: var(--acc); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* brand lockups set in type */
.ec-lock { display: inline-flex; align-items: center; gap: .45em; font: 500 clamp(1.8rem, 1rem + 2.6vw, 3.4rem)/1 "EB Garamond", Garamond, Georgia, serif; letter-spacing: -.01em; white-space: nowrap; }
.ec-lock img { height: 1.15em; width: auto; }
.ec-stack { flex-direction: column; gap: .25em; }
.ec-stack img { height: 1.6em; }
.ec-keys { height: 46%; width: auto !important; }
.vy-word { display: inline-flex; flex-direction: column; align-items: center; font: 400 clamp(2rem, 1rem + 3vw, 3.8rem)/1 "Libre Caslon Text", Georgia, serif; letter-spacing: -.02em; }
.vy-word i { font-style: italic; }
.vy-word small { display: flex; align-items: center; gap: .7em; margin-top: .45em; font: 600 .2em/1 "Familjen Grotesk", sans-serif; letter-spacing: .45em; text-transform: uppercase; color: #B39B7B; }
.vy-word small::before, .vy-word small::after { content: ""; width: 3em; height: 1px; background: currentColor; }
.vy-mono { font: 400 clamp(2.6rem, 1.4rem + 3vw, 4.4rem)/1 "Libre Caslon Text", Georgia, serif; }
.vy-ring { display: grid; place-items: center; width: 2.1em; height: 2.1em; border-radius: 50%; background: #1E2A44; color: #F4F1EA; font-size: clamp(2rem, 1rem + 2.4vw, 3.2rem); }
.case-hd .ec-lock { font-size: clamp(2.2rem, 1.2rem + 3vw, 3.8rem); }
.case-hd .vy-word { font-size: clamp(2.4rem, 1.2rem + 3.4vw, 4.2rem); align-items: flex-start; }
.vy-logos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vy-logos > div { aspect-ratio: 16 / 10; display: grid; place-items: center; }

/* case study sheet */
.case { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: var(--paper); color: var(--ink); overflow: auto; overscroll-behavior: contain; }
.case::backdrop { background: rgba(10,10,10,.55); }
.case[open] { animation: caseIn .45s cubic-bezier(.2,.7,.2,1); }
@keyframes caseIn { from { transform: translateX(40px); opacity: 0; } }
.case-in { position: relative; outline: none; }
/* sticks inside the sheet (left of its scrollbar); the negative bottom margin keeps it from pushing the header down */
.case-x { position: sticky; top: calc(14px + env(safe-area-inset-top, 0px)); display: block; width: max-content; margin: 14px 14px -51px auto; z-index: 2; background: #2a2aff; color: #fff; border: 0; font: 700 14px "Familjen Grotesk", sans-serif; padding: 10px 14px; cursor: pointer; }
.case-x:hover { background: #0a0a0a; color: #fff; }
.case-hd { background: var(--cbg); color: var(--cfg); display: flex; flex-wrap: wrap; align-items: flex-end; gap: 24px 40px; padding: clamp(60px, 8vw, 110px) clamp(20px, 5vw, 64px) clamp(28px, 4vw, 48px); }
.case-mark { display: block; width: auto; }
.case-hd { flex-direction: column; align-items: flex-start; }
.case-hd h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.case-k { margin: 0; font-weight: 500; font-size: .9rem; opacity: .8; }
.case-body { padding: clamp(28px, 4vw, 56px) clamp(20px, 5vw, 64px) clamp(48px, 6vw, 80px); display: grid; gap: clamp(28px, 4vw, 48px); }
.case-lead { font-size: clamp(1.15rem, 1rem + .6vw, 1.5rem); line-height: 1.4; letter-spacing: -.01em; max-width: 46ch; margin: 0; }
.case-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px 32px; margin: 0; border-top: 3px solid var(--ink); padding-top: 18px; }
.case-facts dt { font-size: .85rem; color: var(--mid); margin-bottom: 4px; }
.case-facts dd { margin: 0; font-weight: 500; }
.case-facts a { color: inherit; border-bottom: 3px solid var(--acc); text-decoration: none; }
.case figure { margin: 0; }
.case figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }
.case figure.narrow { max-width: 520px; }
.case .browser { border: 1px solid var(--line); background: #fff; }
.case .browser img { border: 0; }
.case .browser .bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: #e9e8e3; border-bottom: 1px solid #d6d5cf; }
.case .browser .bar i { width: 10px; height: 10px; border-radius: 50%; background: #c9c8c2; }
.case .browser .bar span { margin-left: 10px; flex: 1; max-width: 340px; background: #fff; color: #555; font-size: 12px; padding: 3px 10px; }
.case .browser figcaption { margin: 0; padding: 10px 12px; background: var(--paper); border-top: 1px solid var(--line); }
.case figcaption { margin-top: 10px; font-size: .88rem; color: var(--mid); }
.case-panel { display: grid; gap: 8px; }
.ec-logos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ec-logos > div { aspect-ratio: 16 / 10; display: grid; place-items: center; padding: 8%; }
.ec-logos img { border: 0 !important; width: auto !important; max-width: 100%; max-height: 100%; }
.ec-logos figcaption, .ec-pal figcaption { grid-column: 1 / -1; }
.ec-pal { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ec-pal > div { min-height: 150px; padding: 16px; display: flex; flex-direction: column; justify-content: flex-end; font-size: .9rem; }
.ec-pal b { font-size: 1.2rem; }
html.case-open { overflow: hidden; }
@media (max-width: 760px) { .ec-logos, .ec-pal { grid-template-columns: 1fr; } }

/* services */
.srv { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px clamp(14px, 1.6vw, 22px); padding: 22px 0; border-top: 1px solid var(--ink); }
.srv:last-child { border-bottom: 1px solid var(--ink); }
.srv .n { display: block; }
.srv .tri { display: block; width: clamp(18px, 2vw, 26px); height: auto; fill: var(--acc); }
.srv h3 { font-size: clamp(1.4rem, 1rem + 1.4vw, 2rem); letter-spacing: -.03em; line-height: 1.05; margin-bottom: 6px; }
.srv p { color: var(--mid); margin: 0; }

/* about */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); }
.big { font-size: clamp(1.5rem, 1rem + 1.6vw, 2.3rem); line-height: 1.15; letter-spacing: -.03em; font-weight: 500; max-width: 24ch; }

/* booking */
.book { max-width: 640px; }
.book fieldset { border: 0; padding: 0; margin: 0 0 22px; }
.book legend, .book label { display: block; font-weight: 700; margin: 0 0 8px; font-size: .95rem; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--ink); background: transparent; color: var(--ink); padding: 9px 15px; font: 500 15px "Familjen Grotesk", sans-serif; cursor: pointer; transition: background .15s, color .15s; }
.chip:hover { border-color: var(--acc); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.leg-hint { font-weight: 400; color: var(--mut, inherit); opacity: .7; margin-left: 6px; }
.book input { width: 100%; padding: 12px; margin-bottom: 18px; border: 1px solid var(--ink); background: transparent; color: var(--ink); font: 400 16px "Familjen Grotesk", sans-serif; border-radius: 0; }
.actions { margin-top: 6px; }
.err { color: #c0281f; font-weight: 500; }
.ok { font-weight: 700; border-bottom: 3px solid var(--acc); padding-bottom: 4px; max-width: max-content; }

/* theme switch */
.theme-tg { display: inline-flex; align-items: center; gap: 7px; margin-left: 14px; padding: 4px 10px 4px 8px; border: 1px solid var(--ink); background: transparent; color: var(--ink); font: 500 13px "Familjen Grotesk", sans-serif; cursor: pointer; vertical-align: middle; transition: background .15s, color .15s; }
.theme-tg:hover { background: var(--ink); color: var(--paper); }
.theme-tg svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.theme-tg .moon { display: none; fill: currentColor; stroke: none; }
[data-theme="dark"] .theme-tg .moon { display: block; }
[data-theme="dark"] .theme-tg .sun, [data-theme="dark"] .theme-tg .rays { display: none; }
.stick .theme-tg { margin-left: 0; }
/* footer: black-grey block with the wordmark and the call to action, then an off-white band of links */
.ft { margin-top: clamp(48px, 7vw, 96px); }
.ft a { color: inherit; text-decoration: none; }
.ft-wrap { padding-inline: clamp(20px, 3.3vw, 52px); }
.ft-dark { background: #0A0A0A; color: #ECEBE6; padding-block: clamp(48px, 6vw, 96px) clamp(80px, 11vw, 180px); }
[data-theme="dark"] .ft-dark { border-block: 1px solid #2a2a28; }
.ft-word { display: block; }
.ft-word svg { display: block; width: 100%; height: auto; fill: currentColor; }
.ft-talk { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 20px 40px; margin-top: clamp(40px, 5vw, 76px); }
.ft-talk h2 { font-size: clamp(2rem, 1rem + 3.4vw, 4.4rem); line-height: 1; letter-spacing: -.045em; font-weight: 700; min-width: 0; }
.ft-mail { font-weight: 700; font-size: clamp(1.3rem, .9rem + 1.5vw, 2.3rem); letter-spacing: -.02em; text-decoration: underline !important; text-decoration-color: #2a2aff !important; text-decoration-thickness: 3px !important; text-underline-offset: 6px; }
.ft-mail:hover { color: #fff; }
.ft-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 32px; padding-block: clamp(36px, 4vw, 56px) 0; background: var(--paper); }
.ft-cols h3 { font-size: .95rem; font-weight: 500; color: var(--mid); margin-bottom: 12px; }
.ft-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ft-cols p { margin: 0; }
.ft-cols a:hover { text-decoration: underline; text-decoration-color: var(--acc); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.ft-copy { margin: 0; padding-block: clamp(28px, 4vw, 48px); font-size: .85rem; color: var(--mid); max-width: none; }
.ft :focus-visible { outline-color: var(--acc); }
@media (max-width: 860px) { .ft-cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .ft-cols { grid-template-columns: 1fr; } }

@media (max-width: 760px) {
  .tiles { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .stick span a:not(.btn) { display: none; }
}

/* ===== entrance: the wordmark is constructed ===== */
.build { display: none; }
.intro .build { display: block; position: fixed; inset: 0; z-index: 100; background: var(--paper); color: var(--ink); overflow: hidden; }
.intro body { overflow: hidden; }
.intro .top .mark { visibility: hidden; }
.build-logo { position: absolute; left: 50%; top: 46%; width: min(72vw, 900px); height: auto; transform: translate(-50%, -50%); transform-origin: 0 0; will-change: transform; overflow: visible; }
.build .g { fill: none; stroke: var(--acc); stroke-width: .16; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: .8; animation: draw .9s cubic-bezier(.6,0,.2,1) var(--d) forwards; }
.build .lb { font: 500 2.1px "Familjen Grotesk", sans-serif; letter-spacing: .12em; fill: var(--acc); opacity: 0; animation: fadein .5s ease .7s forwards; }
.build .o { fill: none; stroke: var(--ink); stroke-width: .3; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .8s cubic-bezier(.5,0,.3,1) var(--d) forwards; }
.build .f { fill: var(--ink); opacity: 0; animation: fadein .45s ease var(--d) forwards; }
.build .f.dot { fill: var(--acc); }
.build.clear .guides, .build.clear .outlines { opacity: 0; transition: opacity .45s ease; }
.build.clear .f.dot { fill: var(--ink); transition: fill .6s ease .3s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.build-skip { position: absolute; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); background: none; border: 1px solid var(--mid); color: var(--ink); font: 500 14px "Familjen Grotesk", sans-serif; padding: 8px 14px; cursor: pointer; opacity: 0; animation: fadein .4s .6s forwards; }
.build-skip:hover { border-color: var(--ink); }
@keyframes fadein { to { opacity: 1; } }
.build.out { background: transparent; transition: background .7s ease; }
.build.out .build-skip { opacity: 0; transition: opacity .3s ease; }

/* ===== hero: a live identity grid ===== */
#idgrid .cell { transition: fill .7s ease; shape-rendering: crispEdges; }
#idgrid .shape { transform-box: view-box; transform-origin: 47px 47px; transition: transform .9s cubic-bezier(.65,0,.25,1), fill .7s ease, opacity .35s ease; }
#idgrid .gap { fill: var(--paper); transition: fill .35s ease; }
#idgrid { overflow: hidden; }
#idgrid .mono { fill: var(--paper); transition: fill .7s ease; }
/* page content rises in after the intro */
.rise { opacity: 1; transform: none; }
.intro .rise { opacity: 0; transform: translateY(24px); }
@media (prefers-reduced-motion: reduce) { #idgrid .shape, #idgrid .cell { transition: none; } }
.revealed .rise { opacity: 1; transform: none; transition: opacity .7s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.revealed .rise + .rise { transition-delay: .12s; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .tile span, .stick { transition: none; } }

/* lockups inside case sheets (beat the generic .case-mark / .case-panel img rules) */
.case .case-mark.ec-lock { display: inline-flex; }
.case .case-mark.ec-lock img { height: 1.1em !important; width: auto !important; }
.case .ec-logos .ec-lock img { height: 1.15em !important; max-height: none; }
.case .ec-logos .ec-stack img { height: 1.6em !important; }
.case .ec-logos .ec-lock { font-size: clamp(1.6rem, .8rem + 2vw, 2.8rem); }
.case .ec-logos img.ec-keys { width: 30% !important; height: auto !important; }
.case .case-mark.vy-word { display: inline-flex; }
.vy-word { white-space: nowrap; }
.case .vy-logos .vy-word { font-size: clamp(1.8rem, .8rem + 2.4vw, 3.2rem); }
.tm-vy { width: 56%; }
.case .vy-logos img { width: 72% !important; height: auto; max-height: none; border: 0 !important; }
.case .vy-logos img.vy-sun { width: 30% !important; }
.vy-logos > div { padding: 6%; }
.tm-fe { width: 40%; }
.work-soon { cursor: default; }
.work-soon:hover .tm { transform: none; }
.work-soon .tile::after { content: none; }
.work-soon:hover .cap b { text-decoration: none; }
.case-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); align-items: start; }
@media (max-width: 760px) { .case-pair { grid-template-columns: 1fr; } }
/* full-screen case study: colour runs edge to edge, content holds a readable centred column */
.case-hd, .case-body { padding-inline: max(clamp(20px, 5vw, 64px), calc((100% - 1100px) / 2)); }
.tm-ek { width: 30%; }
/* Earl's Court: EC + horizontal key, and horizontal key over the wordmark */
.case .ec-logos .ec-mono { gap: .3em; font-size: clamp(2.4rem, 1.2rem + 3.6vw, 4.6rem); }
.case .ec-logos .ec-mono img { height: .78em !important; }
.case .ec-logos .ec-over { flex-direction: column; align-items: flex-start; gap: .12em; }
.case .ec-logos .ec-over img { height: 1.62em !important; }
