/* The breathing name footer: the footer of a small studio on a black page, in the minimal style. Hairlines, the
   address, two columns of links, the year, and the studio's name in a variable typeface (Anybody, width 50 to 150,
   weight 100 to 900) set so big it fills the width. One accent: the span of the letter that breathes the most. */
:root {
  --page: #000000;      /* the page */
  --ink: #f2eee6;       /* the name, the address, the link pointed at */
  --muted: #9a958c;     /* links and headings */
  --faint: #6b6760;     /* the small print */
  --line: #2b2926;      /* the hairline on top and the scale under the name */
  --tick: #57534d;      /* the ticks at the joints between letters */
  --accent: #ff5b2e;    /* the span of the letter that breathes, the focus ring, the copied mark */
}

* {
  box-sizing: border-box;
}

/* a tap is a click at once: no wait for a double tap */
html {
  touch-action: manipulation;
}

html,
body {
  margin: 0;
  overflow-x: clip;
}

body {
  min-height: 100svh;
  background: var(--page);
  color: var(--ink);
  font-family: 'Anybody Variable', system-ui, sans-serif;
  font-variation-settings: 'wdth' 100, 'wght' 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.stage {
  min-height: 100svh;
  display: grid;
  /* one column as wide as the page, never as wide as the name would like */
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 40px 16px;
}

/* ---------------------------------------------------------------- the footer */
.ft {
  position: relative;
  width: min(1040px, 100%);
  color: var(--muted);
}

.ft__rule {
  display: block;
  height: 1px;
  background: var(--line);
  transform-origin: 0 50%;
}

.ft__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  padding-top: 26px;
}

/* ---------------------------------------------------------------- the address */
.ft__label,
.ft__head {
  margin: 0 0 10px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 400;
  font-variation-settings: 'wdth' 112, 'wght' 460;
  line-height: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ft__mailrow {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}

/* the letters of a link breathe when it is pointed at: --b goes from 0 to 1 (and a hair past) on a spring */
.ch {
  --b: 0;
  display: inline-block;
  white-space: pre;
  font-variation-settings: 'wdth' calc(var(--w0) + var(--b) * var(--wd)), 'wght' calc(var(--g0) + var(--b) * var(--wg));
}

.ft__mail {
  --w0: 96;
  --wd: 12;
  --g0: 330;
  --wg: 150;
  position: relative;
  border-radius: 4px;
  color: var(--ink);
  font-size: 26px;
  font-variation-settings: 'wdth' 96, 'wght' 330;
  line-height: 34px;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.ft__copy {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

/* the ring that answers the pointer: a hairline circle that opens from the middle */
.ft__copy::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--line);
  transform: scale(0.6);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.3, 1.5, 0.5, 1), opacity 0.25s ease;
}

.ft__copy svg {
  width: 20px;
  height: 20px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ft__copy .c-front {
  fill: var(--page);
}

.ft__copy .c-tick {
  stroke: var(--accent);
  stroke-width: 1.6;
  opacity: 0;
}

.ft__copy:active svg {
  transform: scale(0.9);
}

.ft__copied {
  color: var(--accent);
  font-size: 12px;
  font-variation-settings: 'wdth' 112, 'wght' 460;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
}

@media (hover: hover) and (pointer: fine) {
  .ft__copy:hover {
    color: var(--ink);
  }

  .ft__copy:hover::before {
    transform: scale(1);
    opacity: 1;
  }
}

/* ---------------------------------------------------------------- the links */
.ft__cols {
  display: grid;
  grid-template-columns: repeat(2, 150px);
  gap: 28px;
}

.ft__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ft__link {
  --w0: 100;
  --wd: 24;
  --g0: 380;
  --wg: 300;
  display: inline-block;
  padding: 3px 0;
  border-radius: 4px;
  color: var(--muted);
  font-size: 15px;
  font-variation-settings: 'wdth' 100, 'wght' 380;
  line-height: 22px;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.ft__link.is-on {
  color: var(--ink);
}

.ft__mail:focus,
.ft__link:focus,
.ft__copy:focus {
  outline: none;
}

.ft__mail:focus-visible,
.ft__link:focus-visible,
.ft__copy:focus-visible {
  outline: 1.5px solid var(--accent);
  outline-offset: 4px;
}

.ft__link:focus-visible {
  color: var(--ink);
}

/* ---------------------------------------------------------------- the name */
.ft__name {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  height: var(--cap, 180px);
  margin-top: 42px;
  color: var(--ink);
  font-size: var(--size, 260px);
  line-height: var(--cap, 180px);
  white-space: nowrap;
  /* the letters rise out of the baseline: only what is under it is hidden */
  clip-path: inset(-60% -4% -5% -4%);
  /* a finger dragged sideways makes the letters breathe; up and down still scrolls the page */
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.ft__l {
  position: relative;
  top: var(--nudge, 0px);
  display: block;
  flex: none;
  height: var(--cap, 180px);
  font-variation-settings: 'wdth' 100, 'wght' 280;
  will-change: transform;
}

/* ---------------------------------------------------------------- the scale */
.ft__scale {
  position: relative;
  height: 14px;
  margin-top: 12px;
}

.ft__base-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--line);
  transform-origin: 0 50%;
}

.ft__tick {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 12px;
  background: var(--tick);
  transform-origin: 50% 0;
}

.ft__tick--end {
  background: var(--muted);
}

.ft__span {
  position: absolute;
  left: 0;
  top: -0.5px;
  width: 100px;
  height: 2px;
  background: var(--accent);
  transform-origin: 0 50%;
  opacity: 0;
}

/* ---------------------------------------------------------------- the small print */
.ft__base {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 10px;
  color: var(--faint);
  font-size: 12.5px;
  line-height: 20px;
}

.ft__year {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
}

/* the copyright sign, drawn: the character can turn into an emoji on some phones */
.ft__year svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.1;
  stroke-linecap: round;
}

.ft__legal {
  display: flex;
  gap: 22px;
}

.ft__link--small {
  --w0: 100;
  --wd: 20;
  --g0: 380;
  --wg: 240;
  padding: 0;
  color: var(--faint);
  font-size: 12.5px;
  line-height: 20px;
}

/* for screen readers only */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- a phone */
@media (max-width: 720px) {
  .ft__top {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    padding-top: 22px;
  }

  .ft__mail {
    font-size: 22px;
  }

  .ft__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .ft__head {
    margin-bottom: 4px;
  }

  /* each link a row a thumb can hit */
  .ft__list .ft__link {
    padding: 11px 0;
  }

  .ft__name {
    margin-top: 36px;
  }

  .ft__base {
    margin-top: 6px;
  }

  .ft__link--small {
    padding: 12px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ft__copy::before,
  .ft__link {
    transition: opacity 0.25s ease, color 0.3s ease;
  }

  .ft__copy::before {
    transform: none;
  }
}
