/*
 * PinTube website. The palette is the extension's own, so the site and the
 * product read as one thing. Fonts are the visitor's system fonts on purpose:
 * like the extension, the site loads nothing from a third party.
 */
:root {
  color-scheme: light;
  --bg: #fbfbfc;
  --surface: #ffffff;
  --surface-2: #f3f3f6;
  --border: #e4e4ea;
  --border-strong: #cfcfd8;
  --text: #17171c;
  --text-2: #55555f;
  --accent: #fa003f;
  /* The accent, darkened or lightened until small text in it is readable. */
  --accent-ink: #d40036;
  --accent-soft: #ffe5ec;
  --stage-shadow: 0 1px 2px rgb(23 23 28 / 0.06), 0 28px 64px -24px rgb(23 23 28 / 0.3);
  --only-light: block;
  --only-dark: none;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', 'Noto Sans Arabic', Tahoma, sans-serif;
}

/* Dark: the system's choice unless the visitor picked light, or the visitor's own pick. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #0e0e11;
    --surface: #17171b;
    --surface-2: #202026;
    --border: #2c2c34;
    --border-strong: #41414d;
    --text: #f2f2f5;
    --text-2: #a8a8b3;
    --accent-ink: #ff5c85;
    --accent-soft: rgb(250 0 63 / 0.16);
    --stage-shadow: 0 0 0 1px rgb(255 255 255 / 0.04), 0 28px 64px -24px rgb(0 0 0 / 0.8);
    --only-light: none;
    --only-dark: block;
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0e0e11;
  --surface: #17171b;
  --surface-2: #202026;
  --border: #2c2c34;
  --border-strong: #41414d;
  --text: #f2f2f5;
  --text-2: #a8a8b3;
  --accent-ink: #ff5c85;
  --accent-soft: rgb(250 0 63 / 0.16);
  --stage-shadow: 0 0 0 1px rgb(255 255 255 / 0.04), 0 28px 64px -24px rgb(0 0 0 / 0.8);
  --only-light: none;
  --only-dark: block;
}

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

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

/* A translated page stays hidden for the instant before site.js fills it in. */
.i18n-pending body {
  visibility: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-ink);
  text-underline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
}

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

.container {
  width: min(1120px, 100% - 40px);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -60px;
  z-index: 40;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.only-light {
  display: var(--only-light);
}

.only-dark {
  display: var(--only-dark);
}

/* Header ------------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 750;
  font-size: 18px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: 30px;
  height: 30px;
}

.site-nav {
  display: flex;
  gap: 4px;
  margin-inline-start: 28px;
}

.site-nav a {
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.site-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: auto;
}

.lang,
.icon-button {
  display: inline-flex;
  align-items: center;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}

.lang {
  gap: 2px;
  padding-inline-start: 10px;
}

.lang:hover,
.icon-button:hover {
  border-color: var(--border-strong);
}

.lang:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.lang svg,
.icon-button svg {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lang select {
  height: 34px;
  padding-inline: 6px 8px;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
}

.lang option {
  background: var(--surface);
  color: var(--text);
}

.icon-button {
  justify-content: center;
  width: 36px;
  padding: 0;
  cursor: pointer;
}

.icon-sun {
  display: var(--only-dark);
}

.icon-moon {
  display: var(--only-light);
}

/* GitHub corner (after github.com/tholman/github-corners). It sits over the end
   of the header and scrolls away with the page. */
.github-corner {
  position: absolute;
  top: 0;
  inset-inline-end: 0;
  z-index: 20;
  width: 76px;
  height: 76px;
  border-radius: 0;
}

.github-corner[hidden] {
  display: none;
}

.github-corner svg {
  display: block;
  width: 100%;
  height: 100%;
}

[dir='rtl'] .github-corner svg {
  transform: scaleX(-1);
}

.github-corner .corner-bg {
  fill: var(--text);
}

.github-corner .octo-arm,
.github-corner .octo-body {
  fill: var(--bg);
}

.github-corner .octo-arm {
  transform-origin: 130px 106px;
}

.github-corner:hover .octo-arm,
.github-corner:focus-visible .octo-arm {
  animation: octo-wave 560ms ease-in-out;
}

@keyframes octo-wave {
  0%,
  100% {
    transform: rotate(0);
  }
  20%,
  60% {
    transform: rotate(-25deg);
  }
  40%,
  80% {
    transform: rotate(10deg);
  }
}

/* Keep the header's controls clear of the corner when the page is not much wider than its content. */
@media (max-width: 1290px) {
  .site-header .container {
    padding-inline-end: 62px;
  }
}

/* Hero -------------------------------------------------------------------------- */
.hero {
  padding-block: 48px 34px;
}

.hero .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  align-items: center;
  gap: 64px;
}

.hero-art img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--stage-shadow);
}

.hero h1 {
  max-width: 21ch;
  margin: 0;
  font-size: clamp(2.2rem, 5.1vw, 3.55rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.032em;
  text-wrap: balance;
}

.hero-lead {
  max-width: 60ch;
  margin: 20px 0 0;
  color: var(--text-2);
  font-size: 1.14rem;
  line-height: 1.55;
}

/* Install: one tile per browser. */
.browsers {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0 14px;
  padding: 0;
  list-style: none;
}

.browser {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 108px;
  height: 100px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 120ms, transform 120ms;
}

.browser img {
  width: 34px;
  height: 34px;
}

.browser[href]:hover {
  border-color: var(--text);
  transform: translateY(-2px);
}

.browser[aria-disabled='true'] {
  color: var(--text-2);
  cursor: default;
}

.soon {
  margin-top: -7px;
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.2;
}

.hero-note {
  max-width: 60ch;
  margin: 0;
  color: var(--text-2);
  font-size: 14.5px;
}

.hero-pending {
  margin-top: 4px;
}

/* Sections ---------------------------------------------------------------------- */
section[id] {
  scroll-margin-top: 80px;
}

.section-title {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  font-weight: 780;
  line-height: 1.15;
  letter-spacing: -0.024em;
}

.section-lead {
  max-width: 60ch;
  margin: 10px 0 0;
  color: var(--text-2);
  font-size: 1.08rem;
}

/* Tour -------------------------------------------------------------------------- */
.tour {
  padding-block: 30px 84px;
}

.player {
  margin-top: 22px;
}

/* The stage never grows taller than the window can show together with its controls;
   when that leaves room beside it, the caption moves there instead of below. */
.js .player {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0 44px;
}

.js .screen {
  flex: 0 1 max(560px, (100vh - 236px) * 2);
  min-width: 0;
  max-width: 100%;
}

/* Without JavaScript the scenes are simply stacked, each with its caption. */
.shot {
  margin: 0 0 36px;
}

.canvas {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
}

.canvas img {
  width: 100%;
  height: auto;
}

.canvas img:not(.only-light, .only-dark) {
  display: block;
}

.shot figcaption {
  max-width: 62ch;
  margin-top: 14px;
}

.shot figcaption h3,
.caption h3 {
  margin: 0 0 6px;
  font-size: 1.4rem;
  font-weight: 740;
  line-height: 1.2;
  letter-spacing: -0.016em;
}

.shot figcaption p,
.caption p {
  margin: 0;
  color: var(--text-2);
  font-size: 1.06rem;
}

.controls,
.caption {
  display: none;
}

/* With JavaScript they become one stage that plays through the scenes. */
/* Wider than the screenshots: their bottom fifth, which shows nothing of PinTube, is cropped. */
.js .stage {
  position: relative;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-2);
  box-shadow: var(--stage-shadow);
}

.js .shot {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 320ms ease, visibility 0s 320ms;
}

.js .shot.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 320ms ease;
}

.js .canvas {
  aspect-ratio: 1280 / 800;
  overflow: visible;
  border: 0;
  border-radius: 0;
}

.js .shot figcaption {
  display: none;
}

/* Callouts: a ring on the thing to look at, a label, and an arrow nudging towards it. */
.callout {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 2;
  width: 0;
  height: 0;
  font-size: calc(13.5px / var(--k, 1));
  pointer-events: none;
}

.js .callout {
  opacity: 0;
  transition: opacity 260ms ease;
}

.js .shot.is-active .callout {
  opacity: 1;
  transition-delay: 420ms;
}

.callout::before {
  content: '';
  position: absolute;
  left: -1.25em;
  top: -1.25em;
  width: 2.5em;
  height: 2.5em;
  border: 0.17em solid var(--accent);
  border-radius: 50%;
  background: rgb(250 0 63 / 0.12);
  animation: callout-ring 1.9s ease-out infinite;
}

.callout::after {
  content: '';
  position: absolute;
  width: 1em;
  height: 1.5em;
  background: var(--accent);
  clip-path: polygon(34% 0, 66% 0, 66% 52%, 100% 52%, 50% 100%, 0 52%, 34% 52%);
  filter: drop-shadow(0 0.1em 0.2em rgb(0 0 0 / 0.3));
  animation: callout-nudge 850ms ease-in-out infinite alternate;
}

.callout b {
  position: absolute;
  padding: 0.5em 0.85em;
  border-radius: 0.75em;
  background: var(--accent);
  color: #ffffff;
  font-weight: 650;
  line-height: 1.25;
  white-space: nowrap;
  box-shadow: 0 0.45em 1.3em rgb(0 0 0 / 0.3);
  /* The label takes the direction of its own language inside the left-to-right stage. */
  unicode-bidi: plaintext;
}

/* A ring only where there is one small thing to click; otherwise the arrow points at an area. */
.callout {
  --gap: 0.35em;
}

.callout.spot {
  --gap: 1.75em;
}

.callout:not(.spot)::before {
  display: none;
}

.callout[data-side='top']::after {
  left: -0.5em;
  bottom: var(--gap);
  --turn: 0deg;
}

.callout[data-side='top'] b {
  left: 0;
  bottom: calc(var(--gap) + 1.85em);
  transform: translateX(-50%);
}

.callout[data-side='bottom']::after {
  left: -0.5em;
  top: var(--gap);
  --turn: 180deg;
}

.callout[data-side='bottom'] b {
  left: 0;
  top: calc(var(--gap) + 1.85em);
  transform: translateX(-50%);
}

/* Turned sideways, the arrow is 1.5em wide around the same centre. */
.callout[data-side='right']::after {
  left: calc(var(--gap) + 0.25em);
  top: -0.75em;
  --turn: 90deg;
}

.callout[data-side='right'] b {
  left: calc(var(--gap) + 2.1em);
  top: 0;
  transform: translateY(-50%);
}

.callout[data-side='left']::after {
  right: calc(var(--gap) + 0.25em);
  top: -0.75em;
  --turn: -90deg;
}

.callout[data-side='left'] b {
  right: calc(var(--gap) + 2.1em);
  top: 0;
  transform: translateY(-50%);
}

@keyframes callout-ring {
  0% {
    box-shadow: 0 0 0 0 rgb(250 0 63 / 0.55);
  }
  75%,
  100% {
    box-shadow: 0 0 0 0.95em rgb(250 0 63 / 0);
  }
}

@keyframes callout-nudge {
  from {
    transform: rotate(var(--turn)) translateY(-0.18em);
  }
  to {
    transform: rotate(var(--turn)) translateY(0.32em);
  }
}

/* Controls: the chapters of the tour, laid out like a player's progress bar. */
.js .controls {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 18px;
}

.play {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  cursor: pointer;
}

.play svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.play .icon-pause,
.is-playing .play .icon-play {
  display: none;
}

.is-playing .play .icon-pause {
  display: block;
}

.clock {
  flex: none;
  min-width: 78px;
  color: var(--text-2);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  line-height: 40px;
}

.chapters {
  display: flex;
  flex: 1;
  gap: 4px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chapters li {
  flex: 1;
  min-width: 0;
}

.chapter {
  display: block;
  width: 100%;
  padding: 18px 0 6px;
  border: 0;
  background: none;
  color: var(--text-2);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  text-align: start;
  cursor: pointer;
}

.chapter-bar {
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--border-strong);
}

.chapter:hover .chapter-bar {
  background: color-mix(in srgb, var(--accent) 35%, var(--border-strong));
}

.chapter-bar i {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}

[dir='rtl'] .chapter-bar i {
  transform-origin: right;
}

.chapter-name {
  display: block;
  margin-top: 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chapter:hover,
.chapter[aria-current] {
  color: var(--text);
}

.chapter[aria-current] {
  font-weight: 650;
}

.js .caption {
  display: block;
  flex: 1 1 240px;
  max-width: 62ch;
  min-height: 7.4em;
  margin-top: 22px;
}

/* Features ---------------------------------------------------------------------- */
.features {
  padding-block: 84px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.features .section-lead {
  margin-bottom: 44px;
}

.feature-group {
  display: grid;
  grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
  gap: 18px 56px;
  padding-block: 34px;
  border-top: 1px solid var(--border);
}

.feature-group h3 {
  position: sticky;
  top: 88px;
  align-self: start;
  margin: 0;
  font-size: 1.22rem;
  font-weight: 740;
  line-height: 1.25;
  letter-spacing: -0.014em;
}

.feature-group dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 48px;
  margin: 0;
}

.feature-group dt {
  font-weight: 650;
}

.feature-group dd {
  margin: 4px 0 0;
  color: var(--text-2);
  font-size: 15.5px;
  line-height: 1.55;
}

/* Questions --------------------------------------------------------------------- */
.faq {
  padding-block: 84px;
  border-top: 1px solid var(--border);
}

.faq-list {
  max-width: 780px;
  margin-top: 26px;
  border-top: 1px solid var(--border);
}

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-size: 1.06rem;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '';
  flex: none;
  width: 11px;
  height: 11px;
  margin-inline-end: 4px;
  border-right: 2px solid var(--text-2);
  border-bottom: 2px solid var(--text-2);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 160ms ease;
}

.faq details[open] summary::after {
  transform: translateY(2px) rotate(-135deg);
}

.faq details p {
  max-width: 66ch;
  margin: 0 0 20px;
  color: var(--text-2);
}

/* Text pages (privacy) ---------------------------------------------------------- */
.prose {
  max-width: 720px;
  padding-block: 56px 96px;
}

.prose h1 {
  margin: 0;
  font-size: clamp(2rem, 4.4vw, 2.7rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.028em;
}

.prose .updated {
  margin: 10px 0 30px;
  color: var(--text-2);
  font-size: 14.5px;
}

.prose h2 {
  margin: 38px 0 8px;
  font-size: 1.22rem;
  font-weight: 740;
  letter-spacing: -0.014em;
}

.prose p {
  margin: 0 0 12px;
}

.prose .summary {
  font-size: 1.14rem;
}

.prose code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  font-size: 0.92em;
}

.not-found {
  padding-block: 110px 140px;
}

.not-found p {
  margin-top: 14px;
  color: var(--text-2);
  font-size: 1.1rem;
}

/* Footer ------------------------------------------------------------------------ */
.site-footer {
  padding-block: 30px 40px;
  border-top: 1px solid var(--border);
  color: var(--text-2);
  font-size: 14.5px;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 32px;
}

.footer-legal {
  margin: 0;
}

.footer-links,
.footer-support {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 20px;
}

.footer-support {
  gap: 8px 12px;
}

.site-footer a {
  color: var(--text);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Back to top: appears after the first screen; its ring fills as the page is read. */
.to-top {
  position: fixed;
  bottom: 22px;
  inset-inline-end: 22px;
  z-index: 15;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--border), 0 8px 24px -8px rgb(0 0 0 / 0.3);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 0s 180ms;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.to-top:hover {
  background: var(--surface-2);
}

.to-top svg {
  grid-area: 1 / 1;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.to-top-ring {
  width: 48px;
  height: 48px;
  transform: rotate(-90deg);
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--read, 0));
}

.to-top-arrow {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2.2;
}

/* Arabic: letters join, so no tracking; the script also needs more line height. */
:lang(ar) :is(h1, h2, h3, .brand) {
  letter-spacing: 0;
}

:lang(ar) .hero h1 {
  line-height: 1.32;
}

:lang(ar) :is(.section-title, .prose h1) {
  line-height: 1.4;
}

/* Smaller screens --------------------------------------------------------------- */
@media (max-width: 960px) {
  /* The popup comes back as a scene of the tour. */
  .hero .container {
    display: block;
  }

  .hero-art {
    display: none;
  }
}

@media (max-width: 860px) {
  .site-nav {
    display: none;
  }

  .feature-group {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-group h3 {
    position: static;
  }
}

@media (max-width: 760px) {
  .hero {
    padding-block: 40px 22px;
  }

  .tour {
    padding-bottom: 60px;
  }

  .features,
  .faq {
    padding-block: 60px;
  }

  /* A full browser window is unreadable at this width: each scene zooms in on its subject. */
  .js .stage {
    aspect-ratio: 1280 / 800;
  }

  .js .shot {
    --k: var(--zoom);
  }

  .js .canvas {
    transform: scale(var(--zoom));
    transform-origin: var(--ox) var(--oy);
  }

  /* Callouts that would fall outside the zoomed view. */
  .callout.minor {
    display: none;
  }

  .clock,
  .chapter-name {
    display: none;
  }

  .chapter {
    padding-bottom: 18px;
  }

  .js .caption {
    min-height: 9.5em;
    margin-top: 10px;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(1120px, 100% - 32px);
  }

  .github-corner {
    width: 60px;
    height: 60px;
  }

  .site-header .container {
    padding-inline-end: 44px;
  }

  .lang svg {
    display: none;
  }

  .lang {
    padding-inline-start: 4px;
  }

  .browsers {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .browser {
    width: auto;
  }

  .feature-group dl {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
}

/* Konami code easter egg (site.js). */
.konami {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgb(14 14 17 / 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  transition: opacity 400ms ease;
}

.konami.is-open {
  opacity: 1;
}

.konami-card {
  position: relative;
  overflow: hidden;
  width: min(500px, 100%);
  padding: 64px 32px;
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 0 60px rgb(250 0 63 / 0.22), var(--stage-shadow);
  text-align: center;
  transform: scale(0.85) translateY(20px);
  transition: transform 450ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.konami.is-open .konami-card {
  transform: none;
}

/* A slow red glow turning behind the text. */
.konami-card::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: radial-gradient(circle, rgb(250 0 63 / 0.1) 0%, transparent 60%);
  pointer-events: none;
  animation: konami-spin 20s linear infinite;
}

.konami-jp {
  position: relative;
  margin: 0 0 22px;
  color: var(--accent);
  font-size: clamp(26px, 7vw, 35px);
  font-weight: 800;
  letter-spacing: 2px;
  animation: konami-pulse 2s ease-in-out infinite alternate;
}

.konami-line {
  position: relative;
  margin: 0;
  color: var(--text-2);
  font: 15px/1.5 ui-monospace, 'SF Mono', Consolas, monospace;
}

.konami-close {
  position: absolute;
  top: 20px;
  inset-inline-end: 20px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-2);
  cursor: pointer;
  transition: background 200ms, color 200ms, border-color 200ms, transform 200ms;
}

.konami-close:hover,
.konami-close:focus-visible {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  transform: rotate(90deg);
}

.konami-close svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
}

@keyframes konami-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes konami-pulse {
  from {
    text-shadow: 0 0 14px rgb(250 0 63 / 0.25);
  }
  to {
    text-shadow: 0 0 30px rgb(250 0 63 / 0.55);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
