:root {
  --bg: #ecebe7;
  --paper: #fbfaf7;
  --ink: #141418;
  --soft: #6f6e76;
  --faint: #b3b1b8;
  --line: rgba(20, 20, 24, 0.08);
  --accent: #3d5afe;
  --accent-soft: rgba(61, 90, 254, 0.1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background:
    radial-gradient(90% 60% at 50% 0%, #f5f4f1 0%, rgba(245, 244, 241, 0) 65%),
    var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 8px;
}

/* the page window: everything inside is in em, and the em follows both the width and the height of the window */
.site {
  position: relative;
  font-size: clamp(6.5px, min(2.1vw, 2.45vh), 17px);
  width: min(44em, 100%);
  padding: 1.1em 1.6em 1.4em;
  border-radius: 1.6em;
  background: linear-gradient(180deg, #fefefd 0%, var(--paper) 50%, #f7f6f2 100%);
  box-shadow:
    0 0 0 1px rgba(20, 20, 24, 0.07),
    0 1px 0 0 rgba(255, 255, 255, 0.95) inset,
    0 1px 2px rgba(20, 20, 24, 0.05),
    0 10px 22px -10px rgba(20, 20, 24, 0.14),
    0 40px 80px -36px rgba(40, 52, 120, 0.3);
  overflow: hidden;
  isolation: isolate;
}
.site__grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .2  0 0 0 0 .2  0 0 0 0 .25  0 0 0 .08 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.site__glow {
  position: absolute;
  z-index: -1;
  width: 26em;
  height: 18em;
  left: 4em;
  top: 6em;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(61, 90, 254, 0.11), rgba(61, 90, 254, 0.04) 55%, rgba(61, 90, 254, 0));
  filter: blur(0.6em);
}

/* the top bar */
.bar {
  display: flex;
  align-items: center;
  gap: 1.1em;
  padding-bottom: 1em;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 0.45em; }
.brand__mark { width: 1.45em; height: 1.45em; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.brand__name { font-size: 1.15em; font-weight: 720; font-stretch: 112%; letter-spacing: -0.01em; }
.links { display: flex; gap: 1.2em; font-size: 0.86em; color: var(--soft); font-weight: 500; }
.links a { transition: color 0.25s; }
.clock {
  margin-left: auto;
  display: inline-flex;
  align-items: baseline;
  gap: 0.45em;
  font-size: 0.82em;
  color: var(--soft);
  font-variant-numeric: tabular-nums;
}
.clock__city { font-weight: 560; color: var(--ink); }
.clock__t { display: inline-flex; }
.dg { position: relative; display: inline-block; overflow: hidden; height: 1.2em; line-height: 1.2em; vertical-align: bottom; }
.dg__in { display: block; }
.dg__in span { display: block; height: 1.2em; }
.clock__colon { opacity: 0.6; padding: 0 0.04em; }

.avail { display: inline-block; }
.avail__face {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.48em 0.85em 0.48em 0.7em;
  border-radius: 99em;
  font-size: 0.82em;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(180deg, #2b2b33 0%, var(--ink) 100%);
  box-shadow:
    0 0 0 1px rgba(20, 20, 24, 0.9),
    0 1px 0 0 rgba(255, 255, 255, 0.14) inset,
    0 6px 14px -6px rgba(20, 20, 24, 0.5);
}
.avail__face svg { width: 1.15em; height: 1.15em; fill: none; stroke: #9fb0ff; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* the hero: the title on the left and the project card on the right */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12.6em;
  gap: 2em;
  align-items: end;
  padding: 1.7em 0 1.5em;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-size: 0.82em;
  font-weight: 540;
  color: var(--soft);
  margin-bottom: 1.1em;
}
.eyebrow__sep { width: 1.4em; height: 1px; background: var(--faint); }

.title {
  font-size: 3.7em;
  line-height: 1.02;
  font-weight: 620;
  letter-spacing: -0.035em;
}
.title__line { display: block; white-space: nowrap; }
.title__line--lead, .title__line--tail { font-variation-settings: "wght" 560, "wdth" 100; }
.title__line--word { position: relative; padding: 0.04em 0; }
.title__stop { color: var(--accent); }

/* the selection box around the craft word, like a selected text layer in a design tool */
.sel { position: relative; display: inline-block; vertical-align: top; }
.sel__mask {
  position: relative;
  display: block;
  height: 1.1em;
  margin: -0.02em 0 -0.02em -0.07em;
  overflow: hidden;
}
.word { position: absolute; left: 0.07em; top: 0.02em; display: block; white-space: nowrap; }
.word.is-sizer { position: absolute; visibility: hidden; }
.ch {
  display: inline-block;
  --w: 780;
  --d: 100;
  font-variation-settings: "wght" var(--w), "wdth" var(--d);
  will-change: transform;
}
.sel__box {
  position: absolute;
  left: -0.07em;
  top: -0.02em;
  height: 1.1em;
  width: 3em;
  pointer-events: none;
}
.sel__frame {
  position: absolute;
  inset: 0;
  border: 1px solid var(--accent);
  background: linear-gradient(180deg, rgba(61, 90, 254, 0.06), rgba(61, 90, 254, 0.025));
}
.h {
  position: absolute;
  width: 0.12em;
  height: 0.12em;
  margin: -0.06em 0 0 -0.06em;
  background: #fff;
  border: 1px solid var(--accent);
  box-shadow: 0 1px 2px rgba(20, 20, 40, 0.16);
}
.h--tl { left: 0; top: 0; }
.h--tr { left: 100%; top: 0; }
.h--bl { left: 0; top: 100%; }
.h--br { left: 100%; top: 100%; }

.sel__tag {
  position: absolute;
  left: 100%;
  top: 0.08em;
  margin-left: 0.22em;
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 0.4em;
  row-gap: 0.12em;
  font-size: 0.17em;
  line-height: 1.25;
  letter-spacing: 0;
  font-variation-settings: "wght" 560, "wdth" 100;
  padding: 0.42em 0.62em;
  border-radius: 0.5em;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 4px 10px -4px rgba(61, 90, 254, 0.6);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sel__axis { opacity: 0.7; }
.sel__num { text-align: right; min-width: 1.9em; }

/* the project card: a small stack, the front card changes with the word */
.proj { position: relative; display: block; align-self: end; margin-bottom: 0.4em; }
.proj__stack {
  position: absolute;
  left: 0.7em;
  right: 0.7em;
  bottom: -0.5em;
  height: 2em;
  border-radius: 1em;
  background: #f1f0ec;
  box-shadow: 0 0 0 1px rgba(20, 20, 24, 0.06), 0 6px 12px -8px rgba(20, 20, 24, 0.2);
}
.proj__stack--a { left: 0.35em; right: 0.35em; bottom: -0.25em; background: #f6f5f2; }
.proj__card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.8em;
  padding: 0.6em;
  border-radius: 1.1em;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(20, 20, 24, 0.07),
    0 1px 0 0 rgba(255, 255, 255, 1) inset,
    0 2px 4px rgba(20, 20, 24, 0.04),
    0 14px 26px -14px rgba(20, 20, 24, 0.26);
}
.proj__art {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 0.65em;
  overflow: hidden;
  background: #e9e8e3;
  isolation: isolate;
}
.proj__art::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 1px rgba(20, 20, 24, 0.06) inset, 0 1px 0 rgba(255, 255, 255, 0.4) inset;
  pointer-events: none;
  z-index: 3;
}
.art { position: absolute; inset: 0; display: block; clip-path: circle(0% at 12% 100%); }
.art.is-on { clip-path: circle(150% at 12% 100%); }

/* brand: a sun over the fjord, the mark of a ferry line */
.art--brand { background: linear-gradient(170deg, #1b2a55 0%, #0f1a3a 100%); }
.art__sun { position: absolute; left: 50%; top: 26%; width: 34%; aspect-ratio: 1; margin-left: -17%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #ffd99a, #f2a35b 70%); box-shadow: 0 0 1.4em rgba(242, 163, 91, 0.35); }
.art__wave { position: absolute; left: 14%; right: 14%; top: 58%; height: 6%; border-radius: 99em; background: #a8c1ff; }
.art__wave--2 { top: 69%; left: 22%; right: 22%; opacity: 0.7; }
.art__wave--3 { top: 80%; left: 30%; right: 30%; opacity: 0.45; }

/* interface: the home screen of a banking app */
.art--ui { background: linear-gradient(160deg, #d7efe4 0%, #b9e0cf 100%); }
.art__phone { position: absolute; left: 28%; right: 28%; top: 12%; bottom: -12%; border-radius: 0.6em; background: #fff; box-shadow: 0 0.4em 1em -0.3em rgba(16, 70, 50, 0.35); padding: 12% 10%; display: flex; flex-direction: column; gap: 8%; }
.art__bal { height: 13%; width: 70%; border-radius: 0.2em; background: #13372a; }
.art__bar { height: 6%; width: 92%; border-radius: 99em; background: #dbe8e2; }
.art__bar--s { width: 58%; }
.art__chart { flex: 1; display: flex; align-items: flex-end; gap: 9%; padding-top: 6%; }
.art__chart i { flex: 1; border-radius: 0.12em 0.12em 0 0; background: #2f9a6f; }
.art__chart i:nth-child(1) { height: 40%; opacity: 0.45; }
.art__chart i:nth-child(2) { height: 62%; opacity: 0.6; }
.art__chart i:nth-child(3) { height: 48%; opacity: 0.75; }
.art__chart i:nth-child(4) { height: 82%; }
.art__chart i:nth-child(5) { height: 66%; opacity: 0.85; }

/* typeface: a specimen of a grotesque for a radio station */
.art--type { background: linear-gradient(180deg, #f5efe2 0%, #ebe2cf 100%); }
.art__aa { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-56%); text-align: center; font-size: 3.6em; line-height: 1; letter-spacing: -0.04em; color: #1e1b16; font-variation-settings: "wght" 860, "wdth" 125; }
.art__base { position: absolute; left: 12%; right: 12%; top: 68%; height: 1px; background: #e2552e; }

/* packaging: a tub of cultured butter */
.art--pack { background: linear-gradient(165deg, #f8e39b 0%, #f1cf6a 100%); }
.art__tub { position: absolute; left: 30%; right: 30%; top: 30%; bottom: 12%; border-radius: 0.3em 0.3em 0.7em 0.7em; background: linear-gradient(90deg, #fffaf0 0%, #fff 40%, #efe8da 100%); box-shadow: 0 0.5em 0.9em -0.4em rgba(120, 80, 10, 0.45); }
.art__lid { position: absolute; left: -7%; right: -7%; top: -14%; height: 18%; border-radius: 0.25em; background: linear-gradient(180deg, #2c4fd8, #1f3aa8); }
.art__label { position: absolute; left: 14%; right: 14%; top: 34%; height: 30%; border-radius: 0.18em; border: 1px solid #1f3aa8; background: repeating-linear-gradient(0deg, transparent 0 22%, rgba(31, 58, 168, 0.2) 22% 30%); }

.proj__info { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "kind more" "client more"; row-gap: 0.2em; padding: 0 0.3em 0.25em; align-items: end; }
.proj__kind, .proj__client { position: relative; display: block; overflow: hidden; height: 1.3em; line-height: 1.3em; }
.proj__kind { grid-area: kind; font-size: 0.74em; color: var(--soft); font-weight: 520; }
.proj__client { grid-area: client; font-size: 0.95em; font-weight: 640; letter-spacing: -0.01em; }
.proj__roll { display: block; white-space: nowrap; }
.proj__more { grid-area: more; display: inline-flex; align-items: center; justify-content: center; width: 2.1em; height: 2.1em; border-radius: 50%; background: #f2f1ee; box-shadow: 0 0 0 1px rgba(20, 20, 24, 0.06) inset; }
.proj__more span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.proj__more svg { width: 1em; height: 1em; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* the craft tabs and the project count */
.foot { display: flex; align-items: center; justify-content: space-between; gap: 1em; padding-top: 1.1em; border-top: 1px solid var(--line); }
.crafts {
  position: relative;
  display: inline-flex;
  padding: 0.25em;
  border-radius: 99em;
  background: #f0efeb;
  box-shadow: 0 0 0 1px rgba(20, 20, 24, 0.05) inset, 0 1px 0 rgba(255, 255, 255, 0.9);
}
.crafts__thumb {
  position: absolute;
  left: 0;
  top: 0.25em;
  bottom: 0.25em;
  width: 4em;
  border-radius: 99em;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(20, 20, 24, 0.06), 0 2px 5px -1px rgba(20, 20, 24, 0.14);
  overflow: hidden;
}
.crafts__time { position: absolute; left: 0.9em; right: 0.9em; bottom: 0.22em; height: 2px; border-radius: 2px; background: var(--accent-soft); overflow: hidden; }
.crafts__fill { position: absolute; inset: 0; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.craft {
  position: relative;
  z-index: 1;
  padding: 0.55em 0.95em;
  border-radius: 99em;
  font-size: 0.84em;
  font-weight: 540;
  color: var(--soft);
  transition: color 0.3s;
}
.craft.is-on { color: var(--ink); }
.count { display: inline-flex; align-items: baseline; gap: 0.45em; color: var(--soft); font-size: 0.84em; white-space: nowrap; }
.count__n { position: relative; display: inline-flex; color: var(--ink); font-size: 1.7em; font-weight: 680; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.count__n .dg { height: 1em; line-height: 1em; }
.count__n .dg__in span { height: 1em; }

.cursor { position: absolute; left: 0; top: 0; z-index: 20; width: 22px; height: 22px; pointer-events: none; opacity: 0; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25)); }
.cursor path { fill: var(--ink); stroke: #fff; stroke-width: 1.4; stroke-linejoin: round; }

@media (hover: hover) {
  .links a:hover { color: var(--ink); }
  .craft:hover { color: var(--ink); }
  .proj:hover .proj__more { background: var(--ink); }
  .proj:hover .proj__more svg { stroke: #fff; }
  .proj__more, .proj__more svg { transition: background 0.3s, stroke 0.3s; }
}

/* narrow windows: the card goes under the title, in a row */
@media (max-width: 600px) {
  .site { width: min(31em, 100%); font-size: clamp(6.5px, min(3vw, 2.3vh), 15px); padding: 1em 1.3em 1.2em; }
  .links { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 1.4em; padding: 1.4em 0 1.4em; }
  .title { font-size: 3.6em; }
  .proj__card { flex-direction: row; align-items: center; gap: 1em; }
  .proj__art { width: 7.4em; flex: none; }
  .proj__info { flex: 1; padding-right: 0.4em; }
  .crafts { flex-wrap: nowrap; }
  .craft { padding: 0.5em 0.7em; font-size: 0.8em; }
}
@media (max-width: 600px) and (max-height: 330px) {
  .site { font-size: clamp(6px, 2.1vh, 12px); }
}
