/*
 * Dr. Mito link hub. One aesthetic: Switch-era brain-exercise marketing,
 * paper-and-red-band grammar (brand-kit/refs/ANALYSIS.md, grammar B):
 * graph paper, heavy rounded type, a red hook band, the faceted host head on
 * the band with no shadow and no outline.
 * Type: M PLUS Rounded 1c (SIL OFL 1.1), self-hosted Latin subsets.
 */
@font-face {
  font-family: "Mito Rounded";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/mito-rounded-500.d1e39f029e.woff2") format("woff2");
}

@font-face {
  font-family: "Mito Rounded";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/assets/fonts/mito-rounded-800.c2dd931a11.woff2") format("woff2");
}

@font-face {
  font-family: "Mito Rounded";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("/assets/fonts/mito-rounded-900.1e0f75cbe1.woff2") format("woff2");
}

:root {
  --paper: #ffffff;
  --grid-minor: #efefef;
  --grid-major: #dcdcdc;
  --band-red: #e50112;
  --ink: #000000;
  --ink-soft: #333333;
  --on-ink-soft: #d9d9d9;
  --focus: #15516b;
  --white: #ffffff;
  --cell: 16px;
  --line: 1px;
  --gutter: 16px;
  --column: 460px;
  --radius: 14px;
  --key-depth: 4px;
  --host-w: clamp(118px, 34vw, 196px);
  --font: "Mito Rounded", ui-rounded, "Arial Rounded MT Bold", system-ui,
    sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-weight: 500;
  color: var(--ink);
  background-color: var(--paper);
  /* Graph paper: minor line every cell, major line every five cells. */
  background-image:
    linear-gradient(to right, var(--grid-major) var(--line),
      transparent var(--line)),
    linear-gradient(to bottom, var(--grid-major) var(--line),
      transparent var(--line)),
    linear-gradient(to right, var(--grid-minor) var(--line),
      transparent var(--line)),
    linear-gradient(to bottom, var(--grid-minor) var(--line),
      transparent var(--line));
  background-size:
    calc(var(--cell) * 5) calc(var(--cell) * 5),
    calc(var(--cell) * 5) calc(var(--cell) * 5),
    var(--cell) var(--cell),
    var(--cell) var(--cell);
  background-position: center top;
  -webkit-font-smoothing: antialiased;
}

.col {
  width: 100%;
  max-width: calc(var(--column) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left))
    max(var(--gutter), env(safe-area-inset-right));
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Hero: lockup on paper, head on the band's right end. */
.hero-top {
  padding-top: clamp(28px, 7vw, 48px);
  padding-bottom: 14px;
}

.lockup {
  margin: 0;
  max-width: calc(100% - var(--host-w) - 8px);
  color: var(--ink);
  line-height: 1;
}

.lockup .byline {
  display: inline-block;
  font-size: clamp(15px, 4.3vw, 20px);
  font-weight: 800;
  letter-spacing: 0.01em;
  padding-bottom: 0.18em;
  margin-bottom: 0.28em;
  border-bottom: 2px solid var(--ink);
}

.lockup .t1 {
  display: block;
  font-size: clamp(36px, 10.6vw, 52px);
  font-weight: 900;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}

.lockup .chip {
  display: inline-block;
  margin-top: 0.16em;
  padding: 0.12em 0.42em 0.16em;
  font-size: clamp(21px, 6.3vw, 31px);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--band-red);
}

.band {
  background: var(--band-red);
  color: var(--white);
}

.band-inner {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(92px, 25vw, 112px);
  padding-top: 16px;
  padding-bottom: 18px;
}

.hook {
  margin: 0;
  max-width: calc(100% - var(--host-w) - 4px);
  font-size: clamp(19px, 5.4vw, 25px);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: 0.02em;
  text-wrap: balance;
}

.host {
  position: absolute;
  right: max(4px, calc(var(--gutter) - 12px));
  bottom: 6px;
  width: var(--host-w);
  pointer-events: none;
  user-select: none;
}

.host img {
  display: block;
  width: 100%;
  height: auto;
}

/* Socials: 48 px round keys. */
.socials {
  margin-top: 26px;
}

.socials ul {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.social {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 3px 0 var(--ink);
  transition: transform 80ms ease-out, box-shadow 80ms ease-out,
    background-color 120ms ease-out, color 120ms ease-out;
}

.social svg {
  fill: currentColor;
}

.social:hover {
  color: var(--white);
  background: var(--ink);
}

.social:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--ink);
}

/* Link keys. */
.links {
  margin-top: 26px;
}

.links ul,
.links-plain {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.btn {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 70px;
  padding: 12px 14px 12px 18px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--white);
  text-decoration: none;
  box-shadow: 0 var(--key-depth) 0 var(--ink);
  transition: transform 80ms ease-out, box-shadow 80ms ease-out;
  -webkit-tap-highlight-color: transparent;
}

.btn-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.btn-label {
  font-size: 17.5px;
  font-weight: 800;
  line-height: 1.22;
}

.btn-sub {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.32;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.btn-arrow {
  flex: none;
}

.btn-primary {
  color: var(--white);
  background: var(--ink);
  box-shadow: 0 var(--key-depth) 0 var(--band-red);
}

.btn-primary .btn-sub {
  color: var(--on-ink-soft);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 calc(var(--key-depth) + 1px) 0 var(--ink);
}

.btn-primary:hover {
  box-shadow: 0 calc(var(--key-depth) + 1px) 0 var(--band-red);
}

.btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--ink);
}

.btn-primary:active {
  box-shadow: 0 1px 0 var(--band-red);
}

.btn:focus-visible,
.social:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.foot {
  margin-top: auto;
  padding-top: 30px;
  padding-bottom: max(26px, env(safe-area-inset-bottom));
  text-align: center;
}

.foot p {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink-soft);
  text-wrap: balance;
}

main.col {
  padding-bottom: 8px;
}

/* 404 page. */
.missing {
  padding-top: clamp(40px, 12vw, 80px);
}

.missing .lockup {
  max-width: none;
}

.missing-text {
  margin: 18px 0 24px;
  font-size: 18px;
  font-weight: 800;
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .social {
    transition: none;
  }

  .btn:hover,
  .btn:active,
  .social:active {
    transform: none;
  }
}

@media (forced-colors: active) {
  .btn,
  .social {
    border-color: LinkText;
  }

  .lockup .chip {
    border: 2px solid CanvasText;
  }
}
