/* Code Elves prototype. Colours sampled from codeelves.net.
   Geometry comes from the brand stationery: 45-degree cuts, corner triangles, diamonds. */
:root {
  --ink: #343548;
  --ink-2: #2a2b3b;
  --teal: #37d7c4;
  --teal-2: #34d5c0;
  --teal-lite: #6ee6d7;
  --teal-pale: #c9f5ee;
  --mist: #efeff6;
  --grey: #5f6073;
  --line: rgba(52, 53, 72, .16);
  --white: #fff;
  --display: "Rubik", Arial, sans-serif;
  --body: "Barlow", Arial, sans-serif;
  --gut: clamp(16px, 4.5vw, 64px);
  --head: 84px;
  --sec: clamp(64px, 9vw, 136px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--head) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 1.125rem/1.55 var(--body); overflow-x: clip; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 800; letter-spacing: -.02em; line-height: 1.04; text-wrap: balance; }
h1 { font-size: clamp(2.35rem, 5.4vw, 4.75rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.6rem); }
h3 { font-size: clamp(1.25rem, 1.9vw, 1.6rem); font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.on-ink :focus-visible, .foot :focus-visible { outline-color: var(--teal); }

.wrap { width: 100%; max-width: 1400px; margin-inline: auto; padding-inline: var(--gut); }
.sec { padding-block: var(--sec); }
.lead { font-size: clamp(1.2rem, 1.7vw, 1.45rem); line-height: 1.42; max-width: 36em; }
.head-row { max-width: 20em; margin-bottom: clamp(32px, 5vw, 64px); }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 18px; background: var(--ink); color: #fff; }
.skip:focus { top: 12px; }

/* Diamond: the one recurring mark */
.dm { display: inline-block; width: .62em; height: .62em; background: var(--teal); transform: rotate(45deg); flex: none; }

/* Buttons: pills like the current site, with a diamond that turns on hover */
.btn { display: inline-flex; align-items: center; gap: .8em; min-height: 52px; padding: .7em 1.6em; border: 2px solid transparent; border-radius: 999px; background: linear-gradient(95deg, var(--teal-2), var(--teal-lite)); color: var(--ink); font: 600 1.02rem/1.2 var(--display); text-decoration: none; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.btn::after { content: ""; width: .55em; height: .55em; background: currentColor; transform: rotate(45deg); transition: transform .35s cubic-bezier(.3, 1.5, .5, 1); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(55, 215, 196, .9); }
.btn:hover::after { transform: rotate(225deg) scale(1.25); }
.btn.line { background: transparent; border-color: var(--teal); }
.btn.line:hover { background: var(--teal-pale); box-shadow: none; }
.btn.dark { background: var(--ink); color: #fff; }
.btn.dark:hover { box-shadow: 0 10px 24px -10px rgba(52, 53, 72, .9); }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header */
.top { position: sticky; top: 0; z-index: 50; background: #fff; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--head); }
.brand { display: flex; align-items: center; gap: 12px; font: 800 1.3rem/1 var(--display); letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
.brand svg { width: 34px; height: 41px; fill: var(--teal); }
.nav { display: flex; align-items: center; gap: clamp(14px, 1.7vw, 28px); }
.nav > ul { display: flex; align-items: center; gap: clamp(14px, 1.7vw, 28px); }
.nav a.lnk { position: relative; display: block; padding: 8px 0; font-weight: 500; font-size: 1.02rem; text-decoration: none; white-space: nowrap; }
.nav a.lnk::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 3px; background: var(--teal); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.nav a.lnk:hover::after, .nav a.lnk[aria-current]::after { transform: scaleX(1); }
.nav .btn { min-height: 46px; padding: .5em 1.3em; font-size: .95rem; white-space: nowrap; }
.has-sub { position: relative; }
.sub { position: absolute; top: 100%; left: -24px; width: 340px; padding: 14px 24px 18px; background: var(--ink); color: #fff; visibility: hidden; opacity: 0; transform: translateY(8px); transition: .18s; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 28px), calc(100% - 28px) 100%, 0 100%); }
.has-sub:hover .sub, .has-sub:focus-within .sub { visibility: visible; opacity: 1; transform: none; }
.sub a { display: block; padding: 7px 0; font-size: 1rem; text-decoration: none; }
.sub a:hover { color: var(--teal); }
.burger { display: none; width: 48px; height: 48px; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; }
.burger span { display: block; width: 26px; height: 3px; margin: 6px auto; background: currentColor; transition: transform .2s, opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* Home hero */
.hero-home .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: clamp(16px, 3vw, 48px); min-height: min(calc(100vh - var(--head)), 820px); padding-block: 24px 56px; }
.hero-home h1 { font-size: clamp(2.5rem, 5.5vw, 5.2rem); text-transform: uppercase; line-height: .98; letter-spacing: -.025em; }
.hero-home h1 mark { color: inherit; background: linear-gradient(transparent 62%, var(--teal) 62%, var(--teal) 92%, transparent 92%); }
.hero-home .lead { margin: 28px 0 32px; max-width: 30em; }
.typed { margin-top: 24px; min-height: 1.6em; color: var(--grey); font-size: 1.05rem; }
.typed::after { content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 3px; vertical-align: -.15em; background: var(--teal); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.spell { width: 100%; aspect-ratio: 1 / 1.08; max-height: 680px; touch-action: pan-y; }

/* Inner page hero, after the letterhead's corner */
.hero { position: relative; overflow: hidden; }
.hero .wrap { position: relative; padding-block: clamp(48px, 7vw, 104px) clamp(56px, 7vw, 104px); }
.hero h1 { max-width: 15.5em; padding-right: clamp(0px, 15vw, 260px); }
.hero .long { font-size: clamp(2.1rem, 4.3vw, 3.9rem); }
.hero .lead { margin-top: 26px; }
.hero .btns { margin-top: 32px; }
.corner { position: absolute; top: 0; right: 0; width: clamp(120px, 27vw, 420px); height: auto; }
.hero.on-ink { background: var(--ink); color: #fff; }
.ghost { position: absolute; right: -4%; top: -12%; width: min(58vw, 640px); height: auto; fill: none; stroke: var(--teal); stroke-width: .14; opacity: .55; }
.hero.on-ink .wrap { z-index: 1; }

/* Service index: rows, not cards */
.index { border-top: 2px solid var(--ink); }
.row { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) 32px; align-items: center; gap: 24px; padding: clamp(18px, 2.2vw, 30px) 12px; border-bottom: 1px solid var(--line); text-decoration: none; overflow: hidden; isolation: isolate; }
.row::before { content: ""; position: absolute; inset: 0 -12%; z-index: -1; background: var(--teal); transform: translateX(-108%) skewX(-40deg); transition: transform .42s cubic-bezier(.2, .8, .2, 1); }
.row:hover::before, .row:focus-visible::before { transform: translateX(0) skewX(-40deg); }
.row h3 { font-size: clamp(1.45rem, 2.7vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; }
.row p { margin: 0; }
.row .go { justify-self: end; width: 14px; height: 14px; background: var(--ink); transform: rotate(45deg); transition: transform .35s; }
.row:hover .go { transform: rotate(225deg) scale(1.4); }
.row.lead-row h3 { font-size: clamp(1.9rem, 4vw, 3.5rem); }
.row.lead-row .go { background: var(--teal); }
.row.lead-row:hover .go { background: var(--ink); }
.more { margin-top: 40px; }

/* Three rising steps */
.band { background: var(--mist); }
.rise { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 12px; }
.step { display: flex; flex-direction: column; justify-content: flex-end; padding: 72px clamp(20px, 2.4vw, 36px) clamp(24px, 2.6vw, 36px); clip-path: polygon(0 44px, 100% 0, 100% 100%, 0 100%); }
.step:nth-child(1) { min-height: 300px; background: #fff; }
.step:nth-child(2) { min-height: 380px; background: var(--teal-pale); }
.step:nth-child(3) { min-height: 460px; background: linear-gradient(160deg, var(--teal-lite), var(--teal)); }
.step .n { font: 800 clamp(3rem, 6vw, 5rem)/1 var(--display); letter-spacing: -.04em; margin-bottom: 14px; }
.step small { display: block; margin: 8px 0 12px; font: 600 .98rem/1.2 var(--display); }

/* Proof */
.proof { position: relative; background: var(--ink); color: #fff; clip-path: polygon(0 clamp(24px, 5vw, 80px), 100% 0, 100% 100%, 0 calc(100% - clamp(24px, 5vw, 80px))); }
.proof .wrap { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: clamp(24px, 5vw, 80px); padding-block: clamp(96px, 12vw, 176px); }
.big2x { font: 800 clamp(8rem, 25vw, 24rem)/.8 var(--display); letter-spacing: -.06em; color: var(--teal); }
.proof h2 { margin-bottom: 18px; }
.proof .lead { margin-bottom: 26px; }
.names { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: clamp(32px, 4vw, 48px); font-weight: 500; }
.names li { display: flex; align-items: center; gap: 18px; color: rgba(255, 255, 255, .86); }
.names li + li::before { content: ""; width: 7px; height: 7px; background: var(--teal); transform: rotate(45deg); }

/* Quote */
.quote { margin: 0; max-width: 1080px; }
.quote blockquote { margin: 0; font: 500 clamp(1.5rem, 3.1vw, 2.75rem)/1.2 var(--display); letter-spacing: -.015em; }
.quote figcaption { margin-top: 24px; color: var(--grey); }
.quote .dm { display: block; font-size: 2rem; margin-bottom: 28px; }

/* Stats */
.why { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.why .lead { margin: 22px 0 28px; }
.stats li { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); align-items: baseline; gap: 16px; padding: 20px 0; border-top: 1px solid var(--line); }
.stats li:last-child { border-bottom: 1px solid var(--line); }
.stats b { font: 800 clamp(2rem, 3.8vw, 3.2rem)/1 var(--display); letter-spacing: -.03em; }

/* Closing call to action */
.close { position: relative; overflow: hidden; background: linear-gradient(100deg, var(--teal-2), var(--teal-lite)); }
.close .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 32px; padding-block: clamp(64px, 9vw, 128px); }
.close h2 { font-size: clamp(2.3rem, 5.6vw, 5rem); max-width: 12em; }
.close p { margin-top: 18px; font-size: 1.3rem; }
.close svg { position: absolute; right: 0; top: 0; height: 100%; width: auto; }

/* Footer */
.foot { position: relative; background: var(--ink-2); color: #fff; overflow: hidden; }
.foot .wrap { position: relative; padding-block: clamp(48px, 6vw, 80px) 28px; }
.magic { font: 800 min(10vw, 9rem)/.95 var(--display); letter-spacing: -.03em; white-space: nowrap; }
.magic i { color: var(--teal); font-style: normal; }
.foot-cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px; margin-top: clamp(32px, 5vw, 64px); }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--teal); }
.foot li { padding: 3px 0; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 48px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .18); font-size: .95rem; color: rgba(255, 255, 255, .78); }

/* Capability lists */
.caps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); column-gap: clamp(24px, 4vw, 56px); }
.caps li { display: flex; align-items: baseline; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); font: 500 clamp(1.1rem, 1.6vw, 1.35rem)/1.25 var(--display); }
.columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.columns h3 { padding-bottom: 16px; border-bottom: 3px solid var(--ink); }
.columns .caps { display: block; }
.columns .caps li:first-child { border-top: 0; }

/* Numbered path */
.path { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); position: relative; }
.path li { position: relative; padding-top: 44px; }
.path li::before { content: ""; position: absolute; top: 8px; left: 0; width: 22px; height: 22px; background: var(--teal); transform: rotate(45deg); }
.path li::after { content: ""; position: absolute; top: 18px; left: 38px; right: calc(-1 * clamp(20px, 3vw, 40px) + 6px); height: 2px; background: var(--ink); opacity: .22; }
.path li:last-child::after { display: none; }
.path h3 { margin-bottom: 10px; }

/* Panels */
.note { background: var(--ink); color: #fff; }
.note .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); align-items: center; padding-block: clamp(56px, 7vw, 96px); }
.note h2 { font-size: clamp(1.8rem, 3.4vw, 3rem); }
.next { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-block: 28px; border-top: 1px solid var(--line); font: 700 clamp(1.2rem, 2vw, 1.6rem)/1.2 var(--display); text-decoration: none; }
.next span { font: 500 1rem var(--body); color: var(--grey); }
.next:hover { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--teal); text-decoration-thickness: 3px; text-underline-offset: 6px; }

/* Assessment */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: clamp(32px, 6vw, 96px); align-items: start; }
.fit li { display: flex; align-items: baseline; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); font-size: 1.2rem; }
.fit { margin: 24px 0 clamp(48px, 6vw, 72px); }
.split h2 { font-size: clamp(1.8rem, 3vw, 2.7rem); }
.roadmap { padding: clamp(28px, 3.5vw, 44px); background: var(--mist); clip-path: polygon(0 0, calc(100% - 40px) 0, 100% 40px, 100% 100%, 0 100%); }
.roadmap p { margin-top: 14px; }

/* Forms */
.form { position: sticky; top: calc(var(--head) + 16px); padding: clamp(24px, 3vw, 40px); background: var(--ink); color: #fff; clip-path: polygon(0 0, calc(100% - 44px) 0, 100% 44px, 100% 100%, 0 100%); }
.form h2 { margin-bottom: 24px; font-size: clamp(1.7rem, 2.5vw, 2.3rem); }
.form label { display: block; margin-bottom: 16px; font-weight: 500; }
.form input, .form select, .form textarea { display: block; width: 100%; margin-top: 4px; padding: 10px 2px; border: 0; border-bottom: 2px solid rgba(255, 255, 255, .55); border-radius: 0; background: transparent; color: #fff; font: 400 1.1rem var(--body); }
.form select option { color: var(--ink); }
.form textarea { min-height: 96px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 0; border-bottom-color: var(--teal); box-shadow: 0 2px 0 var(--teal); }
.form .consent { font-size: .95rem; color: rgba(255, 255, 255, .82); }
.form .consent a { color: inherit; }
.form .btn { margin-top: 8px; border: 0; }
.thanks { padding: clamp(24px, 3vw, 40px); background: var(--ink); color: #fff; font: 500 1.4rem/1.3 var(--display); clip-path: polygon(0 0, calc(100% - 44px) 0, 100% 44px, 100% 100%, 0 100%); }
.thanks small { display: block; margin-top: 14px; font: 400 1rem var(--body); color: rgba(255, 255, 255, .82); }

/* Industries */
.ind { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(20px, 5vw, 80px); padding-block: clamp(32px, 5vw, 64px); border-top: 2px solid var(--ink); }
.ind h2 { font-size: clamp(1.8rem, 3.4vw, 3rem); }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tiles li { padding: 28px clamp(18px, 2vw, 28px) 32px; background: var(--mist); clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%); }
.tiles h3 { margin-bottom: 10px; }

/* Case studies */
.case { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 80px); padding-block: clamp(40px, 6vw, 88px); border-top: 2px solid var(--ink); scroll-margin-top: var(--head); }
.tile { position: sticky; top: calc(var(--head) + 16px); display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 5 / 4; padding: clamp(20px, 2.6vw, 36px); background-color: var(--mist); background-image: url("lattice-ink.svg"); clip-path: polygon(0 0, calc(100% - 56px) 0, 100% 56px, 100% 100%, 0 100%); }
.tile h2 { font-size: clamp(1.8rem, 3.2vw, 2.9rem); }
.tile.teal { background-color: var(--teal); }
.tile.dark { background-color: var(--ink); background-image: url("lattice-teal.svg"); color: #fff; }
.tile b { font: 800 clamp(4rem, 9vw, 8rem)/.9 var(--display); letter-spacing: -.05em; margin-bottom: auto; }
.facts { margin: 0; }
.facts div { padding-block: 16px; border-top: 1px solid var(--line); }
.facts div:first-child { border-top: 0; padding-top: 0; }
.facts dt { font: 700 1rem/1.3 var(--display); }
.facts dd { margin: 4px 0 0; font-size: 1.15rem; }
.facts .res dd { font: 500 clamp(1.25rem, 1.9vw, 1.6rem)/1.25 var(--display); }
.case .quote { margin-top: 24px; padding: 24px 0 0 22px; border-left: 6px solid var(--teal); padding-top: 0; }
.case .quote blockquote { font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.32; }
.case .quote figcaption { margin-top: 10px; font-size: 1rem; }

/* About and insights */
.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(20px, 6vw, 96px); }
.pair h2 { font-size: clamp(1.9rem, 3.4vw, 3rem); }
.art { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: baseline; gap: 18px; padding-block: clamp(22px, 3vw, 36px); border-top: 1px solid var(--line); }
.art:last-child { border-bottom: 1px solid var(--line); }
.art b { font: 800 2rem/1 var(--display); }
.art h2 { font-size: clamp(1.4rem, 2.8vw, 2.4rem); }
.art span { font-size: .98rem; color: var(--grey); white-space: nowrap; }
.hours { margin-top: 28px; }
.hours li { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--line); }

/* Scroll reveal. Only hidden when the script is running. */
.js .rv { opacity: 0; transform: translateY(26px); transition: opacity .7s, transform .7s cubic-bezier(.2, .8, .2, 1); }
.js .rv.in { opacity: 1; transform: none; }

@media (max-width: 1120px) {
  .burger { display: block; }
  .nav { position: fixed; inset: var(--head) 0 0 0; display: none; flex-direction: column; align-items: flex-start; gap: 20px; padding: 24px var(--gut) 40px; background: #fff; overflow-y: auto; }
  .nav.open { display: flex; }
  .nav > ul { flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; }
  .nav a.lnk { font: 800 1.7rem/1.2 var(--display); }
  .sub { position: static; width: auto; padding: 4px 0 8px; visibility: visible; opacity: 1; transform: none; background: none; color: var(--ink); clip-path: none; }
  .sub a { padding: 5px 0; }
}
@media (max-width: 860px) {
  :root { --head: 72px; }
  .hero-home .wrap { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-block: 28px 40px; }
  .spell { max-width: 400px; margin-inline: auto; }
  .hero h1 { padding-right: 72px; }
  .row { grid-template-columns: minmax(0, 1fr) 20px; gap: 6px 16px; }
  .row p { grid-column: 1; grid-row: 2; }
  .row .go { grid-column: 2; grid-row: 1 / span 2; }
  .rise, .why, .note .wrap, .split, .ind, .case, .pair, .columns, .foot-cols { grid-template-columns: minmax(0, 1fr); }
  .step, .step:nth-child(n) { min-height: 0; }
  .proof .wrap { grid-template-columns: minmax(0, 1fr); }
  .close .wrap { grid-template-columns: minmax(0, 1fr); }
  .close svg { opacity: .35; }
  .form, .tile { position: static; }
  .path { grid-template-columns: minmax(0, 1fr); }
  .path li::after { top: 40px; bottom: -24px; left: 10px; right: auto; width: 2px; height: auto; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .art { grid-template-columns: 40px minmax(0, 1fr); }
  .art span { grid-column: 2; }
  .stats li { grid-template-columns: minmax(0, 120px) minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .btn { width: 100%; justify-content: center; }
  .top .btn { width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rv { opacity: 1; transform: none; }
}
