/* The word that tries on effects: a big sentence on the left, a dark panel of type blocks on the right */
:root {
  --paper: #f3f1ec;
  --ink: #161616;
  --muted: #6b6862;
  --panel: #0d0d0e;
  --tile: #161618;
  --tile-text: #a9a6a1;
  --cyan: #4cc7f0;
  --pink: #ff6fd8;
  /* the width of the chosen word and of the rest of the sentence, moved by the Stretch block */
  --wdth-word: 104;
  --wdth-rest: 104;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.filters {
  position: absolute;
  width: 0;
  height: 0;
}

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

.page {
  min-height: 100svh;
  padding: clamp(18px, 3.4vh, 30px) clamp(20px, 4vw, 56px) 48px;
}

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.brand {
  margin: 0;
  font-size: 20px;
  font-weight: 760;
  font-stretch: 112%;
  letter-spacing: -0.03em;
}

.top__line {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.story {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(250px, 0.7fr);
  align-items: center;
  gap: clamp(28px, 6vw, 90px);
  min-height: calc(100svh - 110px);
}

.label {
  margin: 0 0 22px;
  color: var(--muted);
  font-family: 'JetBrains Mono Variable', ui-monospace, monospace;
  font-size: 12px;
}

/* ------------------------------------------------------------------ the sentence */
.line {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(40px, 5.8vw, 96px);
  font-weight: 560;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.line__visual {
  font-stretch: calc(var(--wdth-rest) * 1%);
}

.line__visual span {
  display: inline-block;
}

/* the chosen word: its own width, a glow behind, and a row of inflated letters over it */
.word {
  position: relative;
  isolation: isolate;
  font-stretch: calc(var(--wdth-word) * 1%);
}

.word__glow {
  position: absolute;
  inset: -0.35em -0.55em;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(76, 199, 240, 0.75), rgba(255, 111, 216, 0.45) 55%, rgba(255, 111, 216, 0) 78%);
  filter: blur(14px);
  opacity: 0;
}

.word__text {
  position: relative;
}

.word__puff {
  position: absolute;
  inset: 0;
  display: flex !important;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.word__puff span {
  font-weight: 760;
  filter: url(#puff) drop-shadow(0 0.06em 0.05em rgba(0, 0, 0, 0.25));
}

.note {
  margin: 30px 0 0;
  color: var(--muted);
  font-size: 15px;
}

/* ------------------------------------------------------------------ the panel of blocks */
.panel {
  padding: clamp(10px, 1.2vw, 16px);
  border-radius: clamp(16px, 2vw, 28px);
  background: var(--panel);
  color: var(--tile-text);
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: 'JetBrains Mono Variable', ui-monospace, monospace;
  font-size: 12px;
}

.panel__path {
  padding: 9px 14px;
  border-radius: 10px;
  background: #242426;
}

.panel__close {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #242426;
}

.panel__close svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.panel__tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: clamp(28px, 5vh, 64px);
}

.block {
  display: grid;
  gap: 10px;
  padding: 8px 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  background: var(--tile);
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.block[aria-pressed='true'] {
  border-color: rgba(255, 255, 255, 0.55);
  background: #1e1e21;
  color: #fff;
}

@media (hover: hover) {
  .block:hover {
    border-color: rgba(255, 255, 255, 0.3);
  }
}

.block:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.block__art {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 11px;
  background: #0b0b0c;
  color: #f2f0ea;
  font-size: clamp(30px, 3vw, 46px);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.block__art--inflate span {
  color: #ffa9cf;
  font-weight: 800;
  filter: url(#puff);
}

.block__art--glow {
  color: #fff;
  text-shadow: 0 0 8px var(--cyan), 0 0 22px var(--pink);
}

.block__art--focus {
  filter: blur(2.5px);
}

.block__art--stretch {
  font-stretch: 125%;
}

.block__name {
  font-family: 'JetBrains Mono Variable', ui-monospace, monospace;
  font-size: 12px;
}

@media (max-width: 820px) {
  .story {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-top: 30px;
  }

  .line {
    font-size: clamp(38px, 10.5vw, 64px);
  }

  .panel__tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 16px;
  }

  .block__art {
    font-size: 24px;
  }
}
