:root {
  --stripe-red: #d4626d;
  --stripe-orange: #e79f62;
  --stripe-yellow: #f0de87;
  --stripe-green: #4f9166;
  --stripe-blue: #4e79b4;
  --ink: #232323;
  --paper: rgba(255, 255, 255, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-family: "Chalkboard SE", "Marker Felt", "Comic Sans MS", cursive;
  background:
    linear-gradient(180deg,
      var(--stripe-red) 0% 21%,
      var(--stripe-orange) 21% 41%,
      var(--stripe-yellow) 41% 62%,
      var(--stripe-green) 62% 83%,
      var(--stripe-blue) 83% 100%);
  overflow-x: hidden;
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: -30px;
  pointer-events: none;
}

body::before {
  background:
    repeating-linear-gradient(18deg,
      rgba(255, 255, 255, 0.2) 0 3px,
      rgba(255, 255, 255, 0) 3px 11px),
    repeating-linear-gradient(-14deg,
      rgba(0, 0, 0, 0.06) 0 2px,
      rgba(0, 0, 0, 0) 2px 9px);
  mix-blend-mode: soft-light;
}

body::after {
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0) 48%);
}

.poster {
  width: min(840px, 95vw);
  text-align: center;
  padding: clamp(1.5rem, 4vw, 3.2rem) clamp(1rem, 3vw, 2.2rem) 2rem;
  border-radius: 2rem;
  background: var(--paper);
  backdrop-filter: blur(1px);
  animation: slide-in 700ms ease-out both;
  position: relative;
}

.corner-logo {
  position: absolute;
  top: clamp(0.7rem, 2vw, 1rem);
  right: clamp(0.7rem, 2vw, 1rem);
  width: clamp(114px, 18.2vw, 195px);
  height: auto;
  padding: 0.2rem;
}

.logo {
  margin: 0;
  font-size: clamp(3.1rem, 12vw, 6.2rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.04em;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
}

.logo-c {
  color: #7da87a;
}

.logo-h {
  color: #5f8eb5;
}

.logo-a {
  color: #7da87a;
}

.logo-p {
  color: #538dbd;
}

.subtitle {
  margin: 0.15rem 0 0.5rem;
  font-size: clamp(2rem, 7vw, 3.2rem);
  font-weight: 600;
  line-height: 1;
  color: #2f2f2f;
}

.tagline {
  margin: 0.15rem 0 1.2rem;
  font-size: clamp(1rem, 3.2vw, 1.45rem);
  font-weight: 600;
  max-width: 32ch;
  margin-inline: auto;
}

.search-form {
  margin-inline: auto;
  width: min(640px, 92%);
}

.search-shell {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border: 3px solid rgba(38, 38, 38, 0.86);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 0.2rem;
  box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.2);
}

#searchInput {
  border: 0;
  outline: none;
  padding: 0.8rem 0.95rem 0.75rem;
  font: inherit;
  font-size: clamp(1rem, 2.8vw, 1.3rem);
  background: transparent;
}

#searchInput::placeholder {
  color: #696969;
}

.search-shell button {
  border: 2.5px solid rgba(39, 39, 39, 0.85);
  background: #fff;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 180ms ease;
}

.search-shell button:hover,
.search-shell button:focus-visible {
  transform: rotate(-6deg) scale(1.05);
}

.lens {
  width: 0.78rem;
  height: 0.78rem;
  border: 3px solid #1f1f1f;
  border-radius: 999px;
  position: relative;
}

.lens::after {
  content: "";
  position: absolute;
  width: 0.5rem;
  height: 3px;
  background: #1f1f1f;
  right: -0.38rem;
  bottom: -0.3rem;
  transform: rotate(42deg);
  border-radius: 10px;
}

.result-count {
  margin: 0.95rem 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.cards {
  width: min(900px, 100%);
  margin: 0.45rem auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
}

.card {
  text-align: left;
  border: 2.5px solid rgba(39, 39, 39, 0.82);
  border-radius: 1rem;
  padding: 0.7rem 0.75rem;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.16);
  transform-origin: center;
  animation: pop-in 260ms ease both;
  animation-delay: calc(var(--i, 0) * 55ms);
}

.card h3 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.05;
}

.card p {
  margin: 0.35rem 0;
  font-size: 0.92rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.tags span {
  border: 2px solid rgba(37, 37, 37, 0.85);
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.84);
}

.open-link {
  display: inline-block;
  margin-top: 0.55rem;
  border: 2px solid rgba(37, 37, 37, 0.85);
  border-radius: 999px;
  padding: 0.16rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1f1f1f;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.9);
}

.open-link:hover,
.open-link:focus-visible {
  transform: translateY(-1px);
}

.open-link[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  font-weight: 700;
  padding: 1rem;
}

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

@keyframes slide-in {
  from {
    transform: translateY(16px) scale(0.98);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes pop-in {
  from {
    transform: scale(0.96) rotate(-1deg);
    opacity: 0;
  }

  to {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}

@media (max-width: 560px) {
  .poster {
    padding-inline: 0.8rem;
    border-radius: 1.1rem;
  }

  .corner-logo {
    width: clamp(70px, 22vw, 110px);
  }

  .search-shell button {
    width: 2.3rem;
    height: 2.3rem;
  }
}
