/* home.css - navbar, hero, search pill, motion, dark "Discover" page */

/* ---------- navbar ---------- */
header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  transition: box-shadow 0.2s;
}
header.stuck {
  box-shadow: 0 4px 18px rgba(10, 47, 115, 0.1);
}
.nav {
  display: grid !important;
  grid-template-columns: 1fr auto 1fr;
  height: 72px !important;
}
.logo svg {
  transition: transform 0.3s;
}
.logo:hover svg {
  animation: wig 0.6s;
}
@keyframes wig {
  30% {
    transform: rotate(-12deg) scale(1.1);
  }
  60% {
    transform: rotate(10deg);
  }
}
.tabs {
  display: flex;
  gap: 4px;
  background: #eef4fd;
  padding: 5px;
  border-radius: 99px;
  margin: 0 !important;
}
.tabs a {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 18px;
  border-radius: 99px;
  font-weight: 700;
  color: var(--mute);
  transition: all 0.2s;
  text-decoration: none;
}
.tabs a:hover {
  color: var(--ink);
  background: #fff;
}
.tabs a.on {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 3px 0 var(--brand);
}
.tabs i {
  font-style: normal;
  transition: transform 0.25s;
}
.tabs a:hover i {
  transform: scale(1.3) rotate(-10deg);
}
.nav-r {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}
.owner-link {
  font-weight: 700;
  font-size: 14px;
  padding: 9px 14px;
  border-radius: 99px;
  text-decoration: none;
}
.owner-link:hover {
  background: #eef4fd;
}
.pillbtn {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--line);
  background: var(--card);
  border-radius: 99px;
  padding: 5px 6px 5px 14px;
  cursor: pointer;
  font-size: 16px;
  color: var(--ink);
  transition:
    box-shadow 0.2s,
    transform 0.15s;
}
.pillbtn:hover {
  box-shadow: 0 4px 14px rgba(10, 47, 115, 0.2);
  transform: translateY(-1px);
}
.pillbtn .avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
}
@media (max-width: 760px) {
  .nav {
    grid-template-columns: auto 1fr auto;
    gap: 8px;
  }
  .tabs {
    justify-self: center;
  }
  .tabs a {
    padding: 7px 12px;
    font-size: 14px;
  }
  .owner-link {
    display: none;
  }
}

/* ---------- hero ---------- */
.hero {
  padding: 56px 0 36px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, #eef4fd 0, transparent 45%),
    radial-gradient(circle at 90% 80%, #fff3cf 0, transparent 40%);
}
.hero .wrap {
  display: block;
  text-align: center;
  position: relative;
}
.kicker {
  display: inline-block;
  font-weight: 700;
  font-size: 14px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 99px;
  padding: 5px 14px;
  box-shadow: 3px 3px 0 var(--gold);
  animation: bob 3s ease-in-out infinite;
}
.hero h1 {
  font-size: clamp(38px, 6.5vw, 72px);
  letter-spacing: -0.03em;
  margin: 22px auto 0;
  max-width: 14ch;
}
/* a slim rounded gold underline that sweeps in under the key word (not a thick highlighter band) */
.scribble {
  position: relative;
  padding: 0 4px;
}
.scribble::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 0.02em;
  height: 0.085em;
  border-radius: 99px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  animation: hl 0.8s 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  pointer-events: none;
}
@keyframes hl {
  to {
    transform: scaleX(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .scribble::after {
    animation: none;
    transform: none;
  }
}
.hero p.lead {
  color: var(--mute);
  font-size: 18px;
  max-width: 48ch;
  margin: 16px auto 0;
}
.pill {
  display: flex;
  max-width: 780px;
  margin: 30px auto 0;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: #fff;
  box-shadow: 6px 6px 0 var(--line);
  padding: 6px;
  text-align: left;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}
.pill:focus-within,
.pill:hover {
  box-shadow: 8px 8px 0 var(--gold);
  transform: translate(-1px, -1px);
}
.pill label {
  flex: 1;
  padding: 9px 22px;
  border-radius: 99px;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s;
}
.pill label:hover {
  background: #eef4fd;
}
.pill select {
  border: 0;
  background: transparent;
  padding: 2px 0;
  font-size: 14px;
  color: var(--mute);
  font-weight: 600;
  outline: 0;
  cursor: pointer;
}
.pill .sep {
  width: 1px;
  background: var(--line);
  margin: 12px 0;
}
.pill .go {
  border: 0;
  border-radius: 99px;
  background: var(--gold);
  color: var(--goldink);
  font:
    800 15px Figtree,
    system-ui,
    sans-serif;
  padding: 0 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s;
}
.pill .go:hover {
  transform: scale(1.06) rotate(-2deg);
}
.pill .go:active {
  transform: scale(0.95);
}
@media (max-width: 700px) {
  .pill {
    flex-direction: column;
    border-radius: 26px;
  }
  .pill .sep {
    display: none;
  }
  .pill .go {
    padding: 14px;
    justify-content: center;
  }
}
.hero .stats {
  justify-content: center;
  margin-top: 30px;
  gap: 34px;
}
@keyframes bob {
  50% {
    translate: 0 -10px;
  }
}
/* ---------- motion ---------- */
.rv {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.5s,
    transform 0.5s;
}
.rv.in {
  opacity: 1;
  transform: none;
}
.grid .card {
  animation: cardIn 0.45s both;
}
.grid .card:nth-child(2) {
  animation-delay: 0.06s;
}
.grid .card:nth-child(3) {
  animation-delay: 0.12s;
}
.grid .card:nth-child(4) {
  animation-delay: 0.18s;
}
.grid .card:nth-child(n + 5) {
  animation-delay: 0.24s;
}
@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
}
.chip,
.tag,
.ver {
  transition: transform 0.15s;
}
.chip:hover {
  transform: translateY(-2px);
}
.burst {
  position: fixed;
  z-index: 150;
  pointer-events: none;
  font-size: 20px;
}
#dLike.pop {
  animation: heart 0.5s;
}
@keyframes heart {
  40% {
    transform: scale(1.5);
  }
}

/* ---------- Discover page (TikTok-style, dark) ---------- */
body.dark {
  --bg: #071836;
  --ink: #fff;
  --mute: #9db7e6;
  --line: #1d3d7a;
  --card: #0e2a5c;
  background: var(--bg);
}
body.dark header {
  background: rgba(7, 24, 54, 0.88);
  border-color: var(--line);
}
body.dark .tabs {
  background: #0e2a5c;
}
body.dark .tabs a:hover {
  background: #17397a;
  color: #fff;
}
body.dark .tabs a.on {
  background: var(--gold);
  color: var(--goldink);
  box-shadow: 0 3px 0 #b88a00;
}
body.dark .mbox {
  background: rgba(255, 255, 255, 0.08);
}
body.dark .menu,
body.dark .more .pop {
  box-shadow: 0 10px 30px #0008;
}
.dpage {
  min-height: calc(100dvh - 73px);
  display: grid;
  align-content: start;
  justify-items: center;
  padding: 18px 12px 40px;
  position: relative;
  overflow: hidden;
}
.dpage:before {
  content: "";
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(#1b4fb8 0, transparent 65%);
  top: -160px;
  left: 50%;
  translate: -50%;
  opacity: 0.55;
  pointer-events: none;
}
.dhead {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.dhead h1 {
  font-size: 26px;
}
.dhead .btn.alt {
  color: #fff;
  border-color: #fff;
}
.dpage .deckwrap {
  position: relative;
  width: min(520px, 100%);
}
.dpage .deck {
  height: min(660px, calc(100dvh - 200px));
  max-width: 400px;
}
.dpage .sw {
  box-shadow: 0 20px 50px #0008;
}

/* dark-mode fixes */
body #toast {
  background: #0a2f73;
  color: #fff;
}
body.dark .logo,
body.dark .ov-logo {
  color: #fff;
}
body.dark .btn.alt {
  color: #fff;
  border-color: #fff;
  background: transparent;
}
body.dark .empty {
  color: #fff;
}
body.dark .price {
  color: var(--gold);
}
.price small {
  font-family: inherit;
}
@media (max-width: 560px) {
  .logo span {
    display: none;
  }
  .tabs a {
    padding: 7px 10px;
  }
  .pillbtn {
    padding: 4px;
  }
  .pillbtn > span {
    display: none;
  }
  .nav {
    padding: 0 10px;
  }
}
