/*
 * hadzy.app, the one-page marketing site. Plain CSS, no external requests.
 *
 * Everything between "Tokens" and "End of tokens" declares design tokens:
 * the --hz-* values are copied from web/src/design/tokens.css and the colour
 * values from web/src/design/tokens.json (light, then dark). The --site-*
 * values are the few extra sizes a marketing page needs and the app doesn't:
 * larger headlines, a wide column and section spacing. Rules below the block
 * use only these variables. web/src/site.test.ts keeps it that way.
 */

/* Tokens */

@font-face {
  font-family: Figtree;
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("fonts/Figtree-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

@font-face {
  font-family: Figtree;
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("fonts/Figtree-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light dark;

  --hz-font-sans: Figtree, system-ui, -apple-system, "Segoe UI", sans-serif;

  --hz-space-1: 4px;
  --hz-space-2: 8px;
  --hz-space-3: 12px;
  --hz-space-4: 16px;
  --hz-space-5: 24px;
  --hz-space-6: 32px;

  --hz-radius-sm: 6px;
  --hz-radius-md: 10px;
  --hz-radius-lg: 14px;
  --hz-radius-full: 999px;

  --hz-control-sm: 28px;
  --hz-control-md: 36px;
  --hz-control-lg: 44px;
  --hz-icon-sm: 16px;
  --hz-measure-form: 440px;
  --hz-measure-text: 600px;
  --hz-measure-page: 720px;

  --hz-type-display: 700 30px/36px var(--hz-font-sans);
  --hz-type-title: 650 22px/28px var(--hz-font-sans);
  --hz-type-heading: 600 15px/22px var(--hz-font-sans);
  --hz-type-body: 400 14px/21px var(--hz-font-sans);
  --hz-type-body-strong: 600 14px/21px var(--hz-font-sans);
  --hz-type-small: 400 13px/18px var(--hz-font-sans);
  --hz-type-caption: 500 12px/16px var(--hz-font-sans);
  --hz-tracking-display: -0.02em;
  --hz-tracking-title: -0.01em;

  --hz-duration-fast: 120ms;
  --hz-duration-base: 180ms;
  --hz-ease-out: cubic-bezier(0.2, 0, 0, 1);

  /* The site's own scale, built on the app's: headlines grow with the screen */
  --site-type-hero: 700 clamp(40px, 6.4vw, 76px) / 1.02 var(--hz-font-sans);
  --site-type-section: 680 clamp(28px, 3.8vw, 44px) / 1.1 var(--hz-font-sans);
  --site-type-lead: 400 clamp(17px, 1.5vw, 20px) / 1.55 var(--hz-font-sans);
  --site-type-item: 620 19px/26px var(--hz-font-sans);
  --site-type-text: 400 16px/25px var(--hz-font-sans);
  --site-type-button: 600 16px/24px var(--hz-font-sans);
  --site-type-doing: 680 30px/36px var(--hz-font-sans);
  --site-tracking-hero: -0.035em;
  --site-measure-wide: 1200px;
  --site-gutter: clamp(16px, 5vw, 64px);
  --site-section-gap: clamp(88px, 13vw, 176px);
  --site-reveal-shift: 18px;
  --site-duration-reveal: 700ms;
  --site-duration-draw: 1600ms;

  /* Colours, light */
  --hz-brand: #1f6f5c;
  --hz-on-brand: #ffffff;
  --hz-brand-hover: #1a5f4f;
  --hz-brand-press: #154d40;
  --hz-brand-subtle: #e3f1ec;
  --hz-brand-strong: #145244;
  --hz-accent: #f0a63a;
  --hz-surface: #ffffff;
  --hz-surface-subtle: #f8f8f5;
  --hz-surface-sunken: #f2f1ec;
  --hz-surface-raised: #ffffff;
  --hz-hover: #e9e8e2;
  --hz-border: #e4e3dd;
  --hz-border-strong: #928f85;
  --hz-ink: #1d2120;
  --hz-ink-muted: #646a67;
  --hz-warning: #8a5a00;
  --hz-warning-subtle: #fdf3dc;
  --hz-focus: var(--hz-brand);
  --hz-shadow-xs: 0 1px 2px rgba(20, 30, 27, 0.06);
  --hz-shadow-card: 0 1px 2px rgba(20, 30, 27, 0.04), 0 2px 8px rgba(20, 30, 27, 0.04);
  --hz-shadow-pop: 0 8px 24px rgba(20, 30, 27, 0.12), 0 1px 2px rgba(20, 30, 27, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Colours, dark */
    --hz-brand: #5cc4a8;
    --hz-on-brand: #0d2620;
    --hz-brand-hover: #74cfb5;
    --hz-brand-press: #8cd9c3;
    --hz-brand-subtle: #1e3a33;
    --hz-brand-strong: #a8e6d3;
    --hz-accent: #f2b45a;
    --hz-surface: #1a1d1c;
    --hz-surface-subtle: #1f2322;
    --hz-surface-sunken: #0f1211;
    --hz-surface-raised: #232726;
    --hz-hover: #2a2f2d;
    --hz-border: #2e3331;
    --hz-border-strong: #6c7370;
    --hz-ink: #e9ece9;
    --hz-ink-muted: #9aa29e;
    --hz-warning: #f2c063;
    --hz-warning-subtle: #3b2f17;
    --hz-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --hz-shadow-card: 0 1px 2px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2);
    --hz-shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.3);
  }
}

/* End of tokens */

/* Page */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--hz-surface-sunken);
  color: var(--hz-ink);
  font: var(--site-type-text);
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
ul,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--hz-focus);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: var(--hz-space-3);
  left: var(--hz-space-3);
  z-index: 10;
  padding: var(--hz-space-2) var(--hz-space-3);
  border-radius: var(--hz-radius-md);
  background: var(--hz-surface-raised);
  box-shadow: var(--hz-shadow-pop);
  color: var(--hz-ink);
  font: var(--hz-type-body-strong);
  transform: translateY(calc(-1 * var(--site-section-gap)));
}

.skip-link:focus-visible {
  transform: none;
}

.wrap {
  width: 100%;
  max-width: calc(var(--site-measure-wide) + 2 * var(--site-gutter));
  margin-inline: auto;
  padding-inline: var(--site-gutter);
}

.section {
  padding-block: var(--site-section-gap) 0;
}

.section-head {
  display: grid;
  gap: var(--hz-space-4);
  max-width: var(--hz-measure-page);
  margin-bottom: calc(var(--hz-space-6) * 1.75);
}

.section-title {
  font: var(--site-type-section);
  letter-spacing: var(--hz-tracking-display);
  text-wrap: balance;
}

.lead {
  max-width: var(--hz-measure-text);
  color: var(--hz-ink-muted);
  font: var(--site-type-lead);
  text-wrap: pretty;
}

/* The one button: Sign in */
.button {
  display: inline-flex;
  align-items: center;
  gap: var(--hz-space-2);
  min-height: var(--hz-control-lg);
  padding: 0 calc(var(--hz-space-5) - 2px) 0 var(--hz-space-5);
  border-radius: var(--hz-radius-md);
  background: var(--hz-brand);
  box-shadow: var(--hz-shadow-xs);
  color: var(--hz-on-brand);
  font: var(--site-type-button);
  text-decoration: none;
  transition:
    background-color var(--hz-duration-fast) var(--hz-ease-out),
    transform var(--hz-duration-fast) var(--hz-ease-out);
}

.button:hover {
  background: var(--hz-brand-hover);
}

.button:active {
  background: var(--hz-brand-press);
  transform: scale(0.97);
}

.button svg {
  width: var(--hz-icon-sm);
  height: var(--hz-icon-sm);
  transition: transform var(--hz-duration-base) var(--hz-ease-out);
}

.button:hover svg {
  transform: translateX(calc(var(--hz-space-1) / 2));
}

/* Illustration parts: every drawing takes its colours from here, so it follows the theme */
.i-paper {
  fill: var(--hz-surface);
  stroke: var(--hz-border-strong);
  stroke-width: 1.5;
}

.i-line {
  fill: none;
  stroke: var(--hz-border-strong);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.i-bar {
  fill: var(--hz-border);
}

.i-soft {
  fill: var(--hz-brand-subtle);
}

.i-brand {
  fill: var(--hz-brand);
}

.i-brand-line {
  fill: none;
  stroke: var(--hz-brand);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.i-on-brand {
  fill: var(--hz-on-brand);
}

.i-on-brand-line {
  fill: none;
  stroke: var(--hz-on-brand);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.i-outline {
  fill: none;
  stroke: var(--hz-border-strong);
  stroke-width: 1.5;
}

.i-text-strong {
  fill: var(--hz-ink);
  font: var(--hz-type-title);
  letter-spacing: var(--hz-tracking-title);
}

.i-accent {
  fill: var(--hz-accent);
}

.i-arch {
  fill: none;
  stroke: var(--hz-brand);
  stroke-opacity: 0.28;
  stroke-width: 1.5;
}

.i-ground {
  fill: var(--hz-surface-sunken);
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Header */

.top {
  padding-block: var(--hz-space-5);
}

.top .wrap {
  display: flex;
  align-items: center;
}

.logo {
  display: inline-flex;
  border-radius: var(--hz-radius-sm);
}

.logo img {
  width: auto;
  height: var(--hz-space-6);
}

/* Hero */

.hero {
  padding-top: clamp(24px, 4vw, 56px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--hz-space-6) calc(var(--hz-space-6) * 2);
  align-items: end;
}

.hero-title {
  font: var(--site-type-hero);
  letter-spacing: var(--site-tracking-hero);
  text-wrap: balance;
}

.hero-title em {
  color: var(--hz-brand-strong);
  font-style: normal;
}

.hero-side {
  display: grid;
  gap: var(--hz-space-5);
  justify-items: start;
  padding-bottom: var(--hz-space-2);
}

.hero-note {
  color: var(--hz-ink-muted);
  font: var(--hz-type-small);
}

.hero-art {
  margin-top: clamp(24px, 3vw, 48px);
}

.hero-art svg {
  display: block;
  width: 100%;
  height: auto;
}

/* The bridge connects on load: threads draw in, then the disc settles */
.flow {
  fill: none;
  stroke: var(--hz-brand);
  stroke-opacity: 0.45;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 1;
  animation: draw var(--site-duration-draw) var(--hz-ease-out) both;
}

.flow:nth-of-type(2) { animation-delay: 80ms; }
.flow:nth-of-type(3) { animation-delay: 160ms; }
.flow:nth-of-type(4) { animation-delay: 240ms; }
.flow:nth-of-type(5) { animation-delay: 320ms; }
.flow:nth-of-type(6) { animation-delay: 400ms; }

.flow.flow-out {
  stroke-opacity: 0.6;
  animation-delay: calc(var(--site-duration-draw) * 0.55);
}

.work {
  animation: rise var(--site-duration-reveal) var(--hz-ease-out) both;
}

.work:nth-of-type(2) { animation-delay: 60ms; }
.work:nth-of-type(3) { animation-delay: 120ms; }
.work:nth-of-type(4) { animation-delay: 180ms; }
.work:nth-of-type(5) { animation-delay: 240ms; }
.work:nth-of-type(6) { animation-delay: 300ms; }

.bridge-disc {
  transform-box: fill-box;
  transform-origin: center;
  animation: settle var(--site-duration-reveal) var(--hz-ease-out) both;
  animation-delay: calc(var(--site-duration-draw) * 0.45);
}

.project-card {
  animation: rise var(--site-duration-reveal) var(--hz-ease-out) both;
  animation-delay: calc(var(--site-duration-draw) * 0.7);
}

@keyframes draw {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(var(--site-reveal-shift));
  }
}

@keyframes settle {
  from {
    transform: scale(0.4);
  }
}

/* Kinds of work */

.kinds {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--hz-space-4);
}

/* The thread every kind hangs from */
.kinds::before {
  content: "";
  position: absolute;
  top: var(--hz-control-lg);
  right: calc(100% / 14);
  left: calc(100% / 14);
  border-top: 1.5px dashed var(--hz-border-strong);
}

.kind {
  position: relative;
  display: grid;
  gap: var(--hz-space-3);
  justify-items: center;
  text-align: center;
}

.kind svg {
  width: calc(var(--hz-control-lg) * 2);
  height: calc(var(--hz-control-lg) * 2);
  padding: var(--hz-space-4);
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius-full);
  background: var(--hz-surface);
  box-shadow: var(--hz-shadow-card);
  overflow: visible;
}

.kind-name {
  font: var(--hz-type-body-strong);
}

.kinds-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: var(--hz-space-5);
  align-items: center;
  margin-top: calc(var(--hz-space-6) * 1.5);
  color: var(--hz-ink-muted);
  font: var(--site-type-text);
}

.kinds-foot p:first-child {
  text-align: right;
}

.kinds-foot svg {
  width: calc(var(--hz-control-lg) * 1.5);
  height: auto;
}

/* Review, ask, plan, act */

.doings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--hz-border);
}

.doing {
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
  gap: var(--hz-space-5);
  align-items: center;
  padding: var(--hz-space-6) 0;
  border-bottom: 1px solid var(--hz-border);
}

.doing:nth-child(odd) {
  padding-right: var(--hz-space-6);
  border-right: 1px solid var(--hz-border);
}

.doing:nth-child(even) {
  padding-left: var(--hz-space-6);
}

.doing-text {
  display: grid;
  gap: var(--hz-space-2);
  align-content: start;
}

.doing-name {
  font: var(--site-type-doing);
  letter-spacing: var(--hz-tracking-display);
}

.doing-text p {
  max-width: var(--hz-measure-form);
  color: var(--hz-ink-muted);
  text-wrap: pretty;
}

.doing svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--hz-radius-lg);
  background: var(--hz-surface);
}

/* A look inside: an illustrated workspace on a quiet brand ground */

.inside {
  margin-top: var(--site-section-gap);
  padding-block: var(--site-section-gap);
  background: var(--hz-brand-subtle);
  overflow: hidden;
}

.inside .section {
  padding-top: 0;
}

.inside .lead {
  color: var(--hz-ink);
}

.mock {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding-bottom: calc(var(--hz-control-lg) * 4);
}

.window {
  overflow: hidden;
  border: 1px solid var(--hz-border);
  border-radius: calc(var(--hz-radius-lg) + var(--hz-space-1));
  background: var(--hz-surface);
  box-shadow: var(--hz-shadow-pop);
  user-select: none;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: var(--hz-space-3);
  height: calc(var(--hz-control-md) + var(--hz-space-2));
  padding: 0 var(--hz-space-3);
  border-bottom: 1px solid var(--hz-border);
  background: var(--hz-surface-sunken);
  font: var(--hz-type-body-strong);
}

.window-bar .mark {
  width: var(--hz-icon-sm);
  height: var(--hz-icon-sm);
}

.window-crumb {
  color: var(--hz-ink-muted);
  font: var(--hz-type-small);
}

.window-ask {
  display: inline-flex;
  align-items: center;
  gap: var(--hz-space-2);
  height: var(--hz-control-sm);
  margin-left: auto;
  padding: 0 var(--hz-space-3);
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius-md);
  background: var(--hz-surface);
  color: var(--hz-ink-muted);
  font: var(--hz-type-small);
}

.window-ask::before {
  content: "";
  width: var(--hz-space-2);
  height: var(--hz-space-2);
  border-radius: var(--hz-radius-full);
  background: var(--hz-brand);
}

.window-body {
  display: grid;
  grid-template-columns: calc(var(--hz-measure-form) / 2) minmax(0, 1fr);
}

.side {
  display: grid;
  gap: var(--hz-space-1);
  align-content: start;
  min-height: 100%;
  padding: var(--hz-space-3);
  border-right: 1px solid var(--hz-border);
  background: var(--hz-surface-sunken);
  font: var(--hz-type-body);
}

.switcher {
  display: flex;
  align-items: center;
  gap: var(--hz-space-2);
  min-height: var(--hz-control-lg);
  margin-bottom: var(--hz-space-2);
  padding: 0 var(--hz-space-2);
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius-md);
  background: var(--hz-surface-raised);
  box-shadow: var(--hz-shadow-xs);
  font: var(--hz-type-body-strong);
}

.switcher svg {
  width: var(--hz-icon-sm);
  height: var(--hz-icon-sm);
  margin-left: auto;
  color: var(--hz-ink-muted);
}

.place {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: var(--hz-control-sm);
  height: var(--hz-control-sm);
  border-radius: var(--hz-radius-sm);
  background: var(--hz-brand);
  color: var(--hz-on-brand);
  font: var(--hz-type-caption);
  letter-spacing: 0.02em;
}

.nav-group {
  margin: var(--hz-space-3) 0 var(--hz-space-1) var(--hz-space-2);
  color: var(--hz-ink-muted);
  font: var(--hz-type-caption);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--hz-space-2);
  min-height: var(--hz-control-md);
  padding: 0 var(--hz-space-2);
  border-radius: var(--hz-radius-md);
  color: var(--hz-ink);
  white-space: nowrap;
}

.nav-on {
  background: var(--hz-brand-subtle);
  color: var(--hz-brand-strong);
  font: var(--hz-type-body-strong);
}

.nav-dot {
  flex: none;
  width: var(--hz-space-2);
  height: var(--hz-space-2);
  border-radius: var(--hz-radius-full);
  background: var(--hz-border-strong);
}

.nav-on .nav-dot {
  background: var(--hz-brand);
}

.main {
  display: grid;
  gap: var(--hz-space-5);
  align-content: start;
  padding: var(--hz-space-5);
}

.main-title {
  font: var(--hz-type-title);
  letter-spacing: var(--hz-tracking-title);
}

.main-lead {
  margin-top: var(--hz-space-1);
  color: var(--hz-ink-muted);
  font: var(--hz-type-body);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--hz-space-4);
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius-lg);
  background: var(--hz-surface);
  box-shadow: var(--hz-shadow-xs);
}

/* The cover: a calm brand tint with two thin arches, as in the app */
.cover {
  position: relative;
  aspect-ratio: 3 / 1;
  overflow: hidden;
  background: var(--hz-brand-subtle);
}

.cover::before,
.cover::after {
  content: "";
  position: absolute;
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--hz-brand) 22%, transparent);
  border-radius: var(--hz-radius-full);
}

.cover::before {
  top: 45%;
  right: -30%;
  width: 90%;
}

.cover::after {
  top: 70%;
  right: -10%;
  width: 50%;
}

.tint-1 {
  background: linear-gradient(135deg, var(--hz-brand-subtle), color-mix(in srgb, var(--hz-brand) 20%, var(--hz-brand-subtle)));
}

.tint-2 {
  background: radial-gradient(circle at 85% 0%, color-mix(in srgb, var(--hz-brand) 24%, var(--hz-brand-subtle)), var(--hz-brand-subtle) 70%);
}

.tint-3 {
  background: linear-gradient(200deg, color-mix(in srgb, var(--hz-brand) 12%, var(--hz-surface-subtle)), var(--hz-surface-subtle));
}

.tint-3::before,
.tint-3::after {
  right: auto;
  left: -20%;
}

.card-body {
  position: relative;
  display: grid;
  gap: var(--hz-space-2);
  padding: 0 var(--hz-space-4) var(--hz-space-4);
}

.card-mark {
  display: inline-grid;
  place-items: center;
  width: var(--hz-control-lg);
  height: var(--hz-control-lg);
  margin-top: calc(-1 * var(--hz-control-lg) / 2);
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius-md);
  background: var(--hz-surface);
  box-shadow: var(--hz-shadow-xs);
  color: var(--hz-brand-strong);
  font: var(--hz-type-heading);
  letter-spacing: 0.02em;
}

.card-title {
  font: var(--hz-type-heading);
}

.card-latest {
  color: var(--hz-ink-muted);
  font: var(--hz-type-small);
}

.faces {
  display: flex;
  margin-top: var(--hz-space-1);
}

.face {
  display: inline-grid;
  place-items: center;
  width: var(--hz-control-sm);
  height: var(--hz-control-sm);
  margin-left: calc(-1 * var(--hz-space-1));
  border: 2px solid var(--hz-surface);
  border-radius: var(--hz-radius-full);
  background: var(--hz-brand-subtle);
  color: var(--hz-brand-strong);
  font: var(--hz-type-caption);
}

.face:first-child {
  margin-left: 0;
}

/* The latest across the workspace, under the cards */
.activity {
  display: grid;
  gap: var(--hz-space-1);
  max-width: 52%;
  color: var(--hz-ink-muted);
  font: var(--hz-type-small);
}

.activity-title {
  margin-bottom: var(--hz-space-1);
  color: var(--hz-ink);
  font: var(--hz-type-heading);
}

.activity-row {
  display: flex;
  align-items: center;
  gap: var(--hz-space-3);
  min-height: var(--hz-control-md);
}

.activity-row .face {
  margin-left: 0;
}

/* The project page, open in front of the workspace */
.window-project {
  position: absolute;
  right: calc(-1 * var(--hz-space-6));
  bottom: 0;
  width: min(62%, calc(var(--hz-measure-page) * 0.95));
}

.project-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
}

.artifacts {
  display: grid;
  align-content: start;
  padding: var(--hz-space-3);
}

.artifacts-title {
  padding: var(--hz-space-2) var(--hz-space-2) var(--hz-space-3);
  font: var(--hz-type-heading);
}

.artifact {
  display: flex;
  align-items: center;
  gap: var(--hz-space-3);
  min-height: var(--hz-control-md);
  padding: 0 var(--hz-space-2);
  border-radius: var(--hz-radius-md);
  font: var(--hz-type-body);
}

.artifact svg {
  flex: none;
  width: calc(var(--hz-icon-sm) * 1.5);
  height: calc(var(--hz-icon-sm) * 1.5);
}

.artifact-from {
  margin-left: auto;
  color: var(--hz-ink-muted);
  font: var(--hz-type-caption);
  white-space: nowrap;
}

.ask {
  display: grid;
  gap: var(--hz-space-3);
  align-content: start;
  padding: var(--hz-space-4);
  border-left: 1px solid var(--hz-border);
  background: var(--hz-surface-sunken);
  font: var(--hz-type-small);
}

.ask-title {
  font: var(--hz-type-heading);
}

.ask-question {
  justify-self: end;
  max-width: 90%;
  padding: var(--hz-space-2) var(--hz-space-3);
  border-radius: var(--hz-radius-lg) var(--hz-radius-lg) var(--hz-radius-sm) var(--hz-radius-lg);
  background: var(--hz-brand);
  color: var(--hz-on-brand);
}

.ask-answer {
  display: grid;
  gap: var(--hz-space-2);
  padding: var(--hz-space-3);
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius-lg);
  background: var(--hz-surface);
}

.ask-sources {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hz-space-1);
}

.source {
  padding: 0 var(--hz-space-2);
  border-radius: var(--hz-radius-full);
  background: var(--hz-brand-subtle);
  color: var(--hz-brand-strong);
  font: var(--hz-type-caption);
  line-height: var(--hz-space-5);
}

.inside-caption {
  max-width: var(--hz-measure-text);
  margin-top: var(--hz-space-5);
  color: var(--hz-ink);
  font: var(--hz-type-body);
}

/* Built to fit how you work */

.fits {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: var(--hz-space-6) calc(var(--hz-space-6) * 2);
  align-items: start;
}

.fits .section-head {
  position: sticky;
  top: var(--hz-space-6);
  margin-bottom: 0;
}

.fit-list {
  display: grid;
}

.fit {
  display: grid;
  grid-template-columns: calc(var(--hz-control-lg) * 1.75) minmax(0, 1fr);
  gap: var(--hz-space-5);
  padding: var(--hz-space-5) 0;
  border-top: 1px solid var(--hz-border);
}

.fit:last-child {
  border-bottom: 1px solid var(--hz-border);
}

.fit svg {
  width: 100%;
  height: auto;
}

.fit h3 {
  margin-bottom: var(--hz-space-1);
  font: var(--site-type-item);
}

.fit p {
  max-width: var(--hz-measure-text);
  color: var(--hz-ink-muted);
  text-wrap: pretty;
}

/* Closing */

.closing {
  display: grid;
  justify-items: center;
  padding-bottom: calc(var(--site-section-gap) * 0.6);
  text-align: center;
}

.closing-art {
  width: min(100%, calc(var(--hz-measure-form) * 1.3));
  height: auto;
  margin-bottom: var(--hz-space-6);
}

.closing .section-title {
  max-width: var(--hz-measure-text);
  margin-bottom: var(--hz-space-4);
}

.closing .lead {
  margin-bottom: var(--hz-space-6);
}

.end {
  display: flex;
  justify-content: center;
  padding-block: var(--hz-space-6) calc(var(--hz-space-6) * 1.5);
  border-top: 1px solid var(--hz-border);
}

.end img {
  width: auto;
  height: var(--hz-space-5);
}

/* Things drift in as they come into view. Only with the script, so nothing stays hidden without it */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(var(--site-reveal-shift));
  transition:
    opacity var(--site-duration-reveal) var(--hz-ease-out),
    transform var(--site-duration-reveal) var(--hz-ease-out);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* Logos follow the theme */
.logo-light {
  display: block;
}

.logo-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .logo-light {
    display: none;
  }

  .logo-dark {
    display: block;
  }
}

/* Tablets */
@media (max-width: 1080px) {
  .mock {
    padding-bottom: 0;
  }

  .window-project {
    position: relative;
    right: auto;
    width: 84%;
    margin: calc(-1 * var(--hz-space-6)) calc(-1 * var(--hz-space-4)) 0 auto;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cards .card:nth-child(3) {
    display: none;
  }
}

@media (max-width: 900px) {
  .hero-grid,
  .fits {
    grid-template-columns: minmax(0, 1fr);
  }

  .fits .section-head {
    position: static;
  }

  .kinds {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: var(--hz-space-6);
  }

  .kinds::before {
    display: none;
  }

  .doings {
    grid-template-columns: minmax(0, 1fr);
  }

  .doing:nth-child(n) {
    padding-inline: 0;
    border-right: 0;
  }
}

/* Phones */
@media (max-width: 600px) {
  .kinds {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: var(--hz-space-4);
  }

  .kind {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    text-align: left;
  }

  .kind svg {
    width: calc(var(--hz-control-lg) * 1.25);
    height: calc(var(--hz-control-lg) * 1.25);
    padding: var(--hz-space-3);
  }

  .doing svg {
    max-width: calc(var(--hz-measure-form) * 0.8);
  }

  .kinds-foot {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
  }

  .kinds-foot p:first-child {
    text-align: center;
  }

  .doing {
    grid-template-columns: minmax(0, 1fr);
  }

  .window-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .activity,
  .side .nav,
  .side .nav-group {
    display: none;
  }

  /* On phones the sidebar is a drawer, so only its switcher shows, above the projects */
  .side {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--hz-border);
  }

  .switcher {
    margin-bottom: 0;
  }

  .cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .cards .card:nth-child(2) {
    display: none;
  }

  .cover {
    aspect-ratio: 5 / 1;
  }

  .mock {
    gap: var(--hz-space-5);
    padding-bottom: 0;
  }

  .window-project {
    width: 100%;
    margin: 0;
  }

  .project-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .ask {
    border-top: 1px solid var(--hz-border);
    border-left: 0;
  }

  .fit {
    grid-template-columns: var(--hz-control-lg) minmax(0, 1fr);
    gap: var(--hz-space-4);
  }

  .window-crumb {
    display: none;
  }
}

/* Motion is off for anyone who asks for less of it */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .flow,
  .work,
  .bridge-disc,
  .project-card {
    animation: none;
  }

  .flow {
    stroke-dasharray: none;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .button,
  .button svg {
    transition: none;
  }

  .button:active,
  .button:hover svg {
    transform: none;
  }
}
