/* Shared by every page: tokens, type, header, footer, hand lettering.

   The system, in full:
   - one text size, 14px on a 24px line. Fine print is 12px on 20px.
   - hierarchy comes from colour only: black, dark grey, light grey.
   - text sits in a 566px column. Figures may break out to 792px.
   - sections are 64px apart. Rules are half-pixel hairlines. */

@font-face{
  font-family:"Open Runde";
  src:url("/assets/fonts/open-runde-latin-400-normal.woff2") format("woff2");
  font-weight:400;
  font-display:swap;
}
@font-face{
  font-family:"Open Runde";
  src:url("/assets/fonts/open-runde-latin-500-normal.woff2") format("woff2");
  font-weight:500;
  font-display:swap;
}
@font-face{
  font-family:"Coming Soon";
  src:url("/assets/fonts/coming-soon-latin-400-normal.woff2") format("woff2");
  font-weight:400;
  font-display:swap;
}

:root{
  --white:#fff;
  --black:#000;
  --text:#303030;
  --grey:#a1a1a1;
  --line:rgba(163,163,163,.28);
  --wash:#f5f5f5;
  --sans:"Open Runde","Inter",-apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;
  --hand:"Coming Soon","Comic Sans MS",cursive;
  --col:566px;
  --wide:792px;
  --gutter:24px;
  --gap:64px;
}

*{box-sizing:border-box;margin:0;padding:0}

html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}

body{
  background:var(--white);
  color:var(--text);
  font-family:var(--sans);
  font-size:14px;
  line-height:24px;
  font-weight:400;
  -webkit-font-smoothing:antialiased;
}

a{color:inherit;text-decoration:none}

:focus-visible{outline:1px solid var(--black);outline-offset:4px;border-radius:2px}

.link{
  color:var(--text);
  text-decoration:underline;
  text-decoration-color:var(--line);
  text-decoration-thickness:1px;
  text-underline-offset:4px;
  transition:text-decoration-color .2s ease,color .2s ease;
}
.link:hover{color:var(--black);text-decoration-color:var(--black)}

/* hand lettering: mixed case is typed into the markup on purpose */
.hand{
  font-family:var(--hand);
  font-weight:400;
  font-size:17px;
  line-height:24px;
  letter-spacing:.04em;
  color:var(--black);
}

/* letter beads: words spelled in beads. Used for the name and "say hi" only. */
.beads{display:flex;flex-wrap:wrap;gap:6px 26px;margin-left:-3px}
.beads .w{display:flex;flex-wrap:nowrap;gap:1px}
.beads img{
  display:block;
  width:38px;
  height:38px;
  transition:transform .4s cubic-bezier(.3,.7,.3,1);
}
.beads img:nth-child(3n+1){transform:rotate(-5deg)}
.beads img:nth-child(3n+2){transform:rotate(4deg) translateY(1px)}
.beads img:nth-child(3n){transform:rotate(-2deg) translateY(-1px)}
.beads:hover img:nth-child(odd){transform:rotate(7deg) translateY(-2px)}
.beads:hover img:nth-child(even){transform:rotate(-7deg) translateY(2px)}

/* ---------- header: stays at the top of every page, 52px tall ---------- */

.top{
  position:sticky;
  top:0;
  z-index:80;
  height:52px;
  padding:0 max(var(--gutter), calc((100% - var(--col)) / 2));
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  line-height:20px;
  background:var(--white);
}

/* the small beaded name is the way home */
.top .home{flex:none;flex-wrap:nowrap;gap:0 10px;margin-left:-2px;transition:opacity .25s ease,transform .25s ease}
.top .home .w{gap:0}
.top .home img{width:22px;height:22px}
.top.at-top .home{opacity:0;transform:translateY(6px);pointer-events:none}

.top nav{display:flex;gap:20px}
.top nav a{color:var(--grey);transition:color .2s ease}
.top nav a:hover{color:var(--black)}

/* ---------- footer ---------- */

.foot{
  max-width:calc(var(--col) + 2 * var(--gutter));
  margin:0 auto;
  padding:var(--gap) var(--gutter) 48px;
}

.fine{border-top:.5px solid var(--line)}

.fine{
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  gap:8px 24px;
  padding-top:16px;
}
.fine nav{display:flex;gap:24px}
.fine nav a{color:var(--black)}
.fine nav a:hover{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px}
.fine span{color:var(--grey)}

@media (max-width:480px){
  :root{--gutter:20px}
  .top nav{gap:14px}
  .top .home{gap:0 7px}
  .top .home img{width:20px;height:20px}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation-duration:.01ms !important;transition-duration:.01ms !important}
}

/* ---------- password pop-up for the private case study ---------- */

html.lock-open{overflow:hidden}

.lock{
  position:fixed;
  inset:0;
  z-index:200;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:var(--gutter);
  background:rgba(255,255,255,.86);
  -webkit-backdrop-filter:blur(6px);
  backdrop-filter:blur(6px);
  opacity:0;
  visibility:hidden;
  transition:opacity .25s ease,visibility .25s;
}
.lock.on{opacity:1;visibility:visible}

.lock-card{
  position:relative;
  width:100%;
  max-width:380px;
  padding:32px 28px 28px;
  background:var(--white);
  border:.5px solid var(--grey);
  transform:translateY(8px);
  transition:transform .3s cubic-bezier(.3,.7,.3,1);
}
.lock.on .lock-card{transform:none}

.lock-card h2{margin-bottom:8px}

.lock-x{
  position:absolute;
  top:14px;
  right:16px;
  padding:4px;
  border:0;
  background:none;
  font:inherit;
  font-size:12px;
  line-height:20px;
  color:var(--grey);
  cursor:pointer;
}
.lock-x:hover{color:var(--black)}
.lock.fixed .lock-x{display:none}

.lock form{display:flex;gap:8px;margin-top:24px}

.lock input{
  flex:1;
  min-width:0;
  height:40px;
  padding:0 12px;
  border:.5px solid var(--grey);
  border-radius:0;
  background:var(--white);
  font:inherit;
  color:var(--black);
}
.lock input:focus{outline:1px solid var(--black);outline-offset:0}

.lock form button{
  height:40px;
  padding:0 16px;
  border:0;
  background:var(--black);
  color:var(--white);
  font:inherit;
  cursor:pointer;
}
.lock form button:disabled{opacity:.5;cursor:default}

.lock-msg{min-height:24px;margin-top:8px;color:var(--text)}
.lock-ask{margin-top:12px;color:var(--grey)}
