@font-face {
  font-family: "Sixtyfour";
  src: url("fonts/sixtyfour-variable.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Tiny5";
  src: url("fonts/tiny5-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/ibm-plex-sans-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #f2eee6;
  --ink-soft: #c4bfb4;
  --paper: #0c0b09;
  --brand: #ffcb47;
  --brand-edge: #ece6db;
  --rust: #823200;
  --rust-soft: #d4784a;
  --spiral: color-mix(in srgb, var(--ink) 8%, var(--paper));
  --gutter: clamp(1.15rem, 4vw, 2.4rem);
  --stage: 36rem;
}

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

html {
  color-scheme: dark;
  background: var(--paper);
  color: var(--ink);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(1.02rem, 0.96rem + 0.28vw, 1.125rem);
  line-height: 1.55;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mark {
  display: inline;
  padding: 0.04em 0.16em;
  margin: 0 -0.16em;
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(var(--brand), var(--brand));
  background-size: 100% 0.12em;
  background-position: left 88%;
  background-repeat: no-repeat;
  transition:
    color 280ms ease,
    background-size 280ms ease,
    background-position 280ms ease;
}

.mark:hover,
.mark:focus-visible {
  color: var(--paper);
  background-size: 100% 100%;
  background-position: left bottom;
}

.mark:focus-visible {
  outline: 1px solid var(--brand);
  outline-offset: 3px;
}

strong {
  font-weight: 700;
  color: var(--ink);
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.atmosphere__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(236, 230, 219, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(236, 230, 219, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 82% 118%, #000 0%, transparent 58%);
}

.atmosphere__spiral {
  position: absolute;
  left: 0;
  top: 0;
  width: min(92vw, 72rem);
  color: var(--spiral);
  transform: translate(-50%, -50%);
}

.atmosphere__spiral svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 0.55;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(-18deg);
}

.scribbles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.scribble {
  position: absolute;
  display: flex;
  padding: 1.35rem;
  color: var(--spiral);
  opacity: 0;
  pointer-events: auto;
  cursor: default;
  transition: opacity 420ms ease;
}

.scribble svg {
  display: block;
  width: var(--size, 5.2rem);
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scribble path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 720ms cubic-bezier(0.16, 1, 0.3, 1);
}

.scribble:hover,
.scribble.is-lit {
  opacity: 1;
}

.scribble:hover path,
.scribble.is-lit path {
  stroke-dashoffset: 0;
}

.home {
  position: fixed;
  top: max(0.85rem, env(safe-area-inset-top, 0px));
  left: max(0.9rem, env(safe-area-inset-left, 0px));
  z-index: 2;
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.7em;
  color: var(--brand);
  font-family: "Sixtyfour", sans-serif;
  font-size: clamp(0.88rem, 0.72rem + 0.55vw, 1.12rem);
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-decoration: none;
  text-shadow: 0.07em 0.09em 0 var(--rust);
  white-space: nowrap;
}

.home:focus-visible {
  outline: 1px solid var(--brand);
  outline-offset: 3px;
}

.home__name {
  display: flex;
  gap: 0.42em;
}

.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
  width: min(var(--stage), 100%);
  margin: 0 auto;
  padding: clamp(4.5rem, 12vh, 7rem) var(--gutter) 7.5rem;
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
}

.intro {
  margin-bottom: 1.6rem;
}

.tagline {
  margin: 0;
  max-width: 12ch;
  color: var(--ink);
  font-size: clamp(2.4rem, 1.2rem + 5.2vw, 4.15rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.95;
  text-wrap: balance;
}

.ident {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.55rem;
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
  font-family: "Tiny5", ui-monospace, "Cascadia Code", "IBM Plex Sans", monospace;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.35;
  text-transform: uppercase;
}

.ident__sep {
  width: 0.32rem;
  height: 0.32rem;
  background: var(--brand);
  border: 1px solid var(--brand-edge);
  align-self: center;
}

.story {
  max-width: 34rem;
  overflow-wrap: break-word;
}

.story p {
  margin: 0 0 1.05em;
  color: var(--ink-soft);
}

.story p:last-child {
  margin-bottom: 0;
}

.sign {
  margin-top: 1.5em;
  font-style: italic;
  color: var(--ink);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.7rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-name: rise) {
    .intro {
      opacity: 0;
      animation: rise 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards 80ms;
    }

    .story {
      opacity: 0;
      animation: rise 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards 200ms;
    }

    .dock {
      opacity: 0;
      animation: rise 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards 360ms;
    }
  }
}

.dock {
  position: fixed;
  z-index: 2;
  left: 50%;
  bottom: max(1.05rem, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 1.4rem);
  max-width: calc(
    100% - 1.4rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)
  );
  color: var(--ink);
}

.dock__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 1.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dock__item {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  color: var(--ink);
  font-family: "Tiny5", ui-monospace, "Cascadia Code", "IBM Plex Sans", monospace;
  font-size: 0.92rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.langs {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.langs button {
  appearance: none;
  margin: 0;
  padding: 0.04em 0;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  background-image: linear-gradient(var(--brand), var(--brand));
  background-size: 0 0.12em;
  background-position: left 88%;
  background-repeat: no-repeat;
}

.langs button[aria-pressed="true"] {
  color: var(--ink);
  background-size: 100% 0.12em;
}

.langs button:hover,
.langs button:focus-visible {
  color: var(--ink);
}

.langs button:focus-visible {
  outline: 1px solid var(--brand);
  outline-offset: 3px;
}

.dock__ico {
  display: inline-flex;
  color: var(--rust-soft);
}

@media (max-width: 720px) {
  .home {
    position: static;
    margin: max(1rem, env(safe-area-inset-top, 0px))
      max(var(--gutter), env(safe-area-inset-right, 0px)) 0
      max(var(--gutter), env(safe-area-inset-left, 0px));
    max-width: 100%;
  }

  .stage {
    justify-content: flex-start;
    padding-top: 1.5rem;
    padding-bottom: 2rem;
  }

  .ident__sep {
    display: none;
  }

  .ident {
    flex-direction: column;
    gap: 0.2rem;
  }

  .dock {
    position: static;
    left: auto;
    bottom: auto;
    transform: none;
    width: auto;
    max-width: none;
    margin: 0 max(var(--gutter), env(safe-area-inset-right, 0px))
      max(1.4rem, env(safe-area-inset-bottom, 0px))
      max(var(--gutter), env(safe-area-inset-left, 0px));
  }

  .dock__list {
    display: grid;
    justify-content: start;
    gap: 0.55rem;
  }

  .dock__item {
    white-space: normal;
  }

  .scribbles {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro,
  .story,
  .dock {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .scribble {
    opacity: 1;
    transition: none;
  }

  .scribble path {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
    transition: none;
  }
}

@media print {
  .atmosphere,
  .scribbles {
    display: none;
  }

  .intro,
  .story,
  .dock,
  .home {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
  }

  .home,
  .dock {
    position: static;
  }
}
