@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('/fonts/jakarta-800.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}

/* Noteya's Midnight with the Iris accent: a dark room, so the scenes are what shine */
:root {
  --bg: #121216;
  --panel: #1b1b20;
  --raise: #24242b;
  --line: #2c2c34;
  --line-strong: #3b3b46;
  --text: #ececef;
  --soft: #a6a6b0;
  --faint: #7f7f8a;
  --accent: #a5a9ff;
  --accent-ink: #15153a;
  --ok: #8fe3b0;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f6f8;
    --panel: #ffffff;
    --raise: #f0f0f4;
    --line: #e3e3ea;
    --line-strong: #cfcfd9;
    --text: #1d1d1f;
    --soft: #56555d;
    --faint: #75747e;
    --accent: #4f50cc;
    --accent-ink: #ffffff;
    --ok: #1f8a4c;
    color-scheme: light;
  }
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background: var(--bg);
  font: 15px/1.55 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  text-rendering: optimizeLegibility;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
.sprite {
  position: absolute;
}
.icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- Top bar */

.top {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font: 800 1.12rem/1 'Plus Jakarta Sans', Inter, sans-serif;
  letter-spacing: -0.02em;
}
.brand svg {
  width: 30px;
  height: 30px;
}
.brand b {
  color: var(--accent);
  font-weight: 800;
}
.store {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 560;
  text-decoration: none;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.store:hover {
  background: var(--raise);
}

/* ---- Hero */

main {
  flex: 1;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 28px 64px;
}
.hero {
  margin-bottom: 34px;
}
h1 {
  margin: 0;
  font: 800 clamp(2.6rem, 7vw, 4.2rem) / 1 'Plus Jakarta Sans', Inter, sans-serif;
  letter-spacing: -0.045em;
}
.lead {
  margin: 10px 0 0;
  font-size: 1.08rem;
  color: var(--soft);
}
.steps {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.steps li {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 16px 9px 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}
.steps b {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
}
.steps small {
  display: block;
  font-size: 0.76rem;
  color: var(--faint);
}
.step-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  color: var(--accent);
  background: var(--raise);
}

/* ---- The scenes */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}
.ghost {
  aspect-ratio: 16 / 12.6;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--panel);
  transition: border-color 0.25s var(--ease);
}
.card:hover {
  border-color: var(--line-strong);
}
.shot {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  background: #000;
  cursor: pointer;
  overflow: hidden;
}
.shot img,
.shot video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shot video {
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}
.shot video[data-playing] {
  opacity: 1;
}
.kind {
  position: absolute;
  left: 10px;
  top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px 4px 7px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 560;
  color: #f2f2f6;
  background: rgb(10 10 14 / 0.55);
  backdrop-filter: blur(8px);
}
.kind .icon {
  width: 13px;
  height: 13px;
}
.info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px 16px;
}
/* The buttons line up along the foot of every card in a row */
.info .actions {
  margin-top: auto;
}
.title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.name {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 640;
  letter-spacing: -0.01em;
}
.name button {
  all: unset;
  cursor: pointer;
}
.count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.count .icon {
  width: 14px;
  height: 14px;
}
.by {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--faint);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  color: var(--soft);
  background: var(--raise);
}
.chip .icon {
  width: 13px;
  height: 13px;
}
.chip span {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.actions {
  display: flex;
  gap: 8px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.button.primary {
  flex: 1;
  color: var(--accent-ink);
  background: var(--accent);
}
.button.primary:hover {
  background: color-mix(in srgb, var(--accent) 86%, white);
}
.button.quiet {
  color: var(--text);
  border-color: var(--line-strong);
  background: transparent;
}
.button.quiet:hover {
  background: var(--raise);
}
.button.square {
  width: 38px;
  padding: 0;
}
.button[data-sent] {
  color: var(--accent-ink);
  background: var(--ok);
}

.trouble {
  margin: 24px 0;
  color: var(--soft);
}

/* ---- One scene, bigger */

.sheet {
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  color: var(--text);
  background: var(--panel);
  overflow: auto;
}
.sheet::backdrop {
  background: rgb(6 6 10 / 0.72);
}
.sheet[open] {
  animation: rise 0.32s var(--ease);
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
}
.sheet-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}
.sheet-media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  color: #f2f2f6;
  background: rgb(10 10 14 / 0.55);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: background-color 0.2s var(--ease);
}
.close:hover {
  background: rgb(10 10 14 / 0.8);
}
.sheet-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 22px 22px;
}
.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.sheet-head h2 {
  margin: 0;
  font: 800 1.6rem/1.1 'Plus Jakarta Sans', Inter, sans-serif;
  letter-spacing: -0.03em;
}
.sheet .actions {
  min-width: 260px;
}
.about {
  margin: 0;
  color: var(--soft);
}
.credits {
  margin: 0;
  padding: 12px 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--faint);
}
.credits li + li {
  margin-top: 4px;
}

/* ---- A word after "Open in Noteya" */

.hint {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 32px);
  padding: 10px 12px 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--raise);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.35);
  font-size: 0.86rem;
  transform: translateX(-50%);
  animation: rise 0.3s var(--ease);
}
.hint .button {
  height: 32px;
  padding: 0 12px;
  font-size: 0.8rem;
}

.foot {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 22px 28px 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--faint);
}
.foot a {
  color: var(--soft);
}

@media (max-width: 560px) {
  .top,
  main,
  .foot {
    padding-left: 16px;
    padding-right: 16px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .sheet .actions {
    min-width: 0;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sheet[open],
  .hint {
    animation: none;
  }
  .shot video {
    transition: none;
  }
}
