/* ==========================================================================
   THEMESCORE SHOWCASE - STYLES (assets/css/style.css)
   Colors and fonts: edit the custom properties in :root below.
   ========================================================================== */

:root {
  --ink: #0e1321;
  --ink-2: #171e31;
  --ink-line: #2a3350;
  --on-ink: #eef1f8;
  --on-ink-mute: #9aa3bc;
  --bg: #f5f6fa;
  --surface: #ffffff;
  --fg: #121726;
  --mute: #5b6478;
  --line: #e2e5ee;
  --accent: #ff5b2e;
  --accent-ink: #ffffff;
  --accent-soft: #ffe9e1;
  --score: #1fcb8b;
  --new: #2f6bff;
  --hot: #ff5b2e;
  --shadow: 0 1px 2px rgba(14, 19, 33, 0.06), 0 12px 32px -12px rgba(14, 19, 33, 0.18);
  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: var(--f-body);
  --r: 14px;
  --wrap: 1280px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0f1a;
    --surface: #131a2b;
    --fg: #e9ecf5;
    --mute: #98a1b8;
    --line: #232c44;
    --accent-soft: #3a1d14;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -16px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0f1a;
  --surface: #131a2b;
  --fg: #e9ecf5;
  --mute: #98a1b8;
  --line: #232c44;
  --accent-soft: #3a1d14;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -16px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 60;
  background: var(--ink);
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3 {
  font-family: var(--f-display);
  line-height: 1.06;
  margin: 0;
  text-wrap: balance;
  letter-spacing: -0.025em;
}
p {
  margin: 0;
}
button {
  font: inherit;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.2s,
    background 0.2s,
    box-shadow 0.2s,
    border-color 0.2s;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 24px -10px var(--accent);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -10px var(--accent);
}
.btn-ghost {
  border-color: var(--ink-line);
  color: var(--on-ink);
  background: rgba(255, 255, 255, 0.02);
}
.btn-ghost:hover {
  background: var(--ink-2);
  border-color: var(--on-ink-mute);
}
.btn svg {
  width: 18px;
  height: 18px;
}

/* ---------- NAV ---------- */
.nav {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: color-mix(in srgb, var(--ink) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.scrolled {
  border-bottom-color: var(--ink-line);
}
.nav .bar {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 72px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--on-ink);
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.02em;
}
.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
  display: grid;
  place-items: center;
  font-family: var(--f-mono);
  font-size: 13px;
  color: #fff;
  font-weight: 700;
  position: relative;
}
.logo-mark::after {
  content: "";
  position: absolute;
  right: -3px;
  top: -3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--score);
  border: 2px solid var(--ink);
}
.logo b {
  color: var(--accent);
  font-weight: 800;
}
.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.nav-links a {
  color: var(--on-ink-mute);
  font-size: 14.5px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  transition:
    color 0.2s,
    background 0.2s;
}
.nav-links a:hover {
  color: var(--on-ink);
  background: var(--ink-2);
}
.nav .bar .btn {
  height: 42px;
  padding: 0 20px;
  font-size: 14px;
}
.burger {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--ink-line);
  color: var(--on-ink);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
}
.mobile-menu {
  display: none;
}
@media (max-width: 900px) {
  .nav-links,
  .nav .bar .btn-primary {
    display: none;
  }
  .burger {
    display: grid;
    place-items: center;
  }
  .mobile-menu.open {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-block: 8px 18px;
  }
  .mobile-menu a {
    color: var(--on-ink);
    padding: 12px 4px;
    border-bottom: 1px solid var(--ink-line);
    font-weight: 500;
  }
  .mobile-menu .btn {
    margin-top: 14px;
    justify-content: center;
    border-bottom: 0;
  }
}

/* ---------- HERO ---------- */
.hero {
  background: var(--ink);
  color: var(--on-ink);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--ink-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink-line) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.3;
  mask-image: radial-gradient(ellipse 60% 70% at 75% 35%, #000 15%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 75% 35%, #000 15%, transparent 72%);
}
.hero::after {
  content: "";
  position: absolute;
  width: 760px;
  height: 760px;
  right: -200px;
  top: -260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 91, 46, 0.32), transparent 62%);
  pointer-events: none;
}
.hero-in {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 40px;
  align-items: center;
  padding-block: 64px 56px;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--on-ink-mute);
  background: var(--ink-2);
}
.hero-tag span {
  background: var(--score);
  color: var(--ink);
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
}
.hero h1 {
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 800;
  margin-top: 24px;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero h1 .num {
  font-variant-numeric: tabular-nums;
}
.hero-lead {
  color: var(--on-ink-mute);
  font-size: 18px;
  max-width: 48ch;
  margin-top: 22px;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}
.trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--ink-line);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.trust-item b {
  font-family: var(--f-display);
  font-size: 24px;
  line-height: 1;
  display: block;
}
.trust-item small {
  font-size: 12.5px;
  color: var(--on-ink-mute);
}
.trust .stars {
  color: #ffb21e;
  font-size: 13px;
  letter-spacing: 1px;
}
.trust .sep {
  width: 1px;
  height: 34px;
  background: var(--ink-line);
}
.env {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 7px;
  border: 1px solid var(--ink-line);
  color: var(--on-ink);
}

/* hero visual: stacked live demo windows */
.stage {
  position: relative;
  height: 560px;
  perspective: 2200px;
}
.win {
  position: absolute;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 40px 90px -30px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}
.win .wbar {
  height: 28px;
  background: #f1f2f6;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  position: relative;
  z-index: 2;
}
.win .wbar i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d5d8e1;
}
.win .wbar i:nth-child(1) {
  background: #ff6159;
}
.win .wbar i:nth-child(2) {
  background: #ffbd2e;
}
.win .wbar i:nth-child(3) {
  background: #28c941;
}
.win .wbar span {
  margin-left: 10px;
  font-family: var(--f-mono);
  font-size: 10px;
  color: #6b7280;
  background: #fff;
  padding: 2px 10px;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.win .wvp {
  position: absolute;
  inset: 28px 0 0;
  overflow: hidden;
}
.win .site {
  animation: autoscroll 16s ease-in-out infinite alternate;
}
@keyframes autoscroll {
  0%,
  12% {
    transform: translateY(0);
  }
  88%,
  100% {
    transform: translateY(calc(-100% + var(--wh)));
  }
}
.w-main {
  width: 74%;
  height: 430px;
  left: 13%;
  top: 58px;
  z-index: 3;
  transform: rotateY(-12deg) rotateX(5deg);
  --wh: 402px;
}
.w-back {
  width: 56%;
  height: 330px;
  right: -6%;
  top: 0;
  z-index: 2;
  transform: rotateY(-12deg) rotateX(5deg) translateZ(-120px);
  opacity: 0.92;
  --wh: 302px;
}
.w-back .site {
  animation-duration: 20s;
  animation-delay: -6s;
}
.w-left {
  width: 46%;
  height: 290px;
  left: -4%;
  bottom: 0;
  z-index: 4;
  transform: rotateY(-12deg) rotateX(5deg) translateZ(60px);
  --wh: 262px;
}
.w-left .site {
  animation-duration: 18s;
  animation-delay: -3s;
}
.w-phone {
  position: absolute;
  width: 150px;
  height: 300px;
  right: 2%;
  bottom: 8px;
  z-index: 5;
  border-radius: 26px;
  background: #0b0e17;
  padding: 8px;
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  transform: rotateY(-12deg) rotateX(5deg) translateZ(110px);
}
.w-phone .scr {
  position: absolute;
  inset: 8px;
  border-radius: 19px;
  overflow: hidden;
  --wh: 284px;
}
.w-phone .site {
  animation-duration: 14s;
  animation-delay: -8s;
}
.w-phone::before {
  content: "";
  position: absolute;
  top: 13px;
  left: 50%;
  width: 44px;
  height: 6px;
  margin-left: -22px;
  border-radius: 6px;
  background: #0b0e17;
  z-index: 3;
}
.badge-f {
  position: absolute;
  z-index: 6;
  background: var(--surface);
  color: var(--fg);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 20px 40px -14px rgba(0, 0, 0, 0.6);
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12.5px;
  animation: bob 6s ease-in-out infinite;
}
.badge-f strong {
  display: block;
  font-family: var(--f-display);
  font-size: 17px;
  line-height: 1.1;
}
.badge-f .ring {
  width: 42px;
  height: 42px;
  flex: none;
}
.badge-f .ring circle {
  fill: none;
  stroke-width: 5;
}
.badge-f .ring text {
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 15px;
  fill: var(--score);
}
.bf-1 {
  left: 2%;
  top: 14px;
}
.bf-2 {
  right: 24%;
  bottom: -4px;
  animation-delay: -3s;
}
.bf-2 .sw {
  display: flex;
  gap: 4px;
}
.bf-2 .sw i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: block;
  box-shadow: 0 0 0 2px var(--surface);
}
@keyframes bob {
  50% {
    transform: translateY(-8px);
  }
}

/* marquee of demos */
.marquee {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--ink-line);
  padding-block: 26px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.mq-track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: mq 60s linear infinite;
}
.marquee:hover .mq-track {
  animation-play-state: paused;
}
@keyframes mq {
  to {
    transform: translateX(-50%);
  }
}
.mq-item {
  width: 210px;
  flex: none;
}
.mq-item .thumb {
  height: 140px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 0 1px var(--ink-line);
}
.mq-item .thumb .site {
  width: 100%;
}
.mq-item span {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--on-ink-mute);
  font-weight: 500;
}
@media (max-width: 1060px) {
  .hero-in {
    grid-template-columns: 1fr;
    padding-block: 48px 40px;
  }
  .stage {
    height: 480px;
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
  }
  .w-main {
    height: 360px;
    --wh: 332px;
  }
}
@media (max-width: 620px) {
  .stage {
    height: 330px;
  }
  .w-main {
    width: 86%;
    left: 2%;
    top: 30px;
    height: 250px;
    --wh: 222px;
  }
  .w-back {
    width: 70%;
    height: 200px;
    --wh: 172px;
  }
  .w-left {
    display: none;
  }
  .w-phone {
    width: 104px;
    height: 210px;
    border-radius: 20px;
    padding: 6px;
  }
  .w-phone .scr {
    inset: 6px;
    border-radius: 15px;
    --wh: 198px;
  }
  .bf-2 {
    display: none;
  }
  .bf-1 {
    top: auto;
    bottom: 0;
    left: 0;
  }
  .trust .sep {
    display: none;
  }
}

/* ---------- STATS ---------- */
.stats {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.stats .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding-block: 34px;
  padding-inline: 24px;
  border-left: 1px solid var(--line);
}
.stat:first-child {
  border-left: 0;
  padding-left: 0;
}
.stat b {
  font-family: var(--f-display);
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 800;
  letter-spacing: -0.03em;
  display: inline;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat sup {
  color: var(--accent);
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 22px;
  vertical-align: top;
  margin-left: 2px;
}
.stat span {
  color: var(--mute);
  font-size: 14px;
  margin-top: 8px;
  display: block;
}
@media (max-width: 760px) {
  .stats .wrap {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }
  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

/* ---------- SECTION HEAD ---------- */
section.block {
  padding-block: 100px;
}
.shead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 44px;
}
.shead h2 {
  font-size: clamp(32px, 4.4vw, 54px);
  font-weight: 800;
  margin-top: 12px;
  max-width: 18ch;
}
.shead p {
  color: var(--mute);
  max-width: 46ch;
  font-size: 17px;
}
@media (max-width: 640px) {
  section.block {
    padding-block: 72px;
  }
}

/* ---------- DEMOS ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 34px;
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + 72px);
  z-index: 20;
  padding-block: 12px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.tabs {
  display: flex;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 5px;
  border-radius: 999px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab {
  border: 0;
  background: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--mute);
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
  transition:
    background 0.2s,
    color 0.2s;
}
.tab small {
  font-family: var(--f-mono);
  font-size: 11px;
  opacity: 0.7;
}
.tab:hover {
  color: var(--fg);
}
.tab.on {
  background: var(--fg);
  color: var(--bg);
}
.search {
  position: relative;
  flex: 0 1 280px;
  min-width: 0;
}
.search input {
  width: 100%;
  height: 46px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--fg);
  padding: 0 18px 0 44px;
  font: inherit;
  font-size: 14px;
}
.search input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.search svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--mute);
}
@media (max-width: 640px) {
  .toolbar {
    position: static;
  }
  .search {
    flex: 1 1 100%;
  }
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 28px;
}
@media (max-width: 1020px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr;
  }
}
.card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: rise 0.5s both;
}
@keyframes rise {
  from {
    transform: translateY(14px);
  }
  to {
    transform: none;
  }
}
.frame {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  aspect-ratio: 4/3.15;
  max-width: 100%;
  transition:
    transform 0.35s,
    box-shadow 0.35s;
}
.frame-bar {
  position: absolute;
  inset: 0 0 auto;
  height: 30px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 0 10px;
  z-index: 4;
}
.frame-bar i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
  flex: none;
}
.frame-bar .pg {
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: 10.5px;
  color: var(--mute);
  display: flex;
  gap: 8px;
  align-items: center;
}
.frame-bar .pg b {
  color: var(--fg);
  font-weight: 700;
}
.viewport {
  position: absolute;
  inset: 30px 0 0;
  overflow: hidden;
}
.track {
  display: flex;
  height: 100%;
  transition: transform 0.55s cubic-bezier(0.65, 0, 0.35, 1);
}
.slide {
  flex: 0 0 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}
.slide .site {
  transition: transform 4.5s cubic-bezier(0.45, 0.05, 0.35, 1);
}
.card:hover .frame {
  transform: translateY(-6px);
  box-shadow:
    0 2px 4px rgba(14, 19, 33, 0.08),
    0 30px 60px -20px rgba(14, 19, 33, 0.35);
}
.card:hover .slide.on .site {
  transform: translateY(calc(-100% + var(--vh, 200px)));
}
.arrow {
  position: absolute;
  top: calc(50% + 15px);
  transform: translateY(-50%) scale(0.85);
  z-index: 5;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.96);
  color: #0e1321;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition:
    opacity 0.25s,
    transform 0.25s,
    background 0.2s;
}
.arrow:hover {
  background: var(--accent);
  color: #fff;
}
.arrow svg {
  width: 16px;
  height: 16px;
}
.arrow.prev {
  left: 10px;
}
.arrow.next {
  right: 10px;
}
.card:hover .arrow,
.card:focus-within .arrow {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}
.dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(14, 19, 33, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition:
    width 0.3s,
    background 0.3s;
}
.dots button.on {
  width: 20px;
  background: #fff;
}
.overlay {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  padding-bottom: 44px;
  opacity: 0;
  transition: opacity 0.3s;
  background: linear-gradient(180deg, transparent, rgba(14, 19, 33, 0.6));
  z-index: 4;
  pointer-events: none;
}
.overlay a {
  pointer-events: auto;
  background: #fff;
  color: #0e1321;
  font-weight: 600;
  font-size: 13px;
  padding: 9px 15px;
  border-radius: 999px;
  transform: translateY(10px);
  transition: transform 0.3s;
}
.overlay a.dark {
  background: var(--accent);
  color: #fff;
}
.card:hover .overlay,
.card:focus-within .overlay {
  opacity: 1;
}
.card:hover .overlay a,
.card:focus-within .overlay a {
  transform: none;
}
@media (hover: none) {
  .arrow {
    opacity: 1;
    transform: translateY(-50%) scale(0.9);
  }
  .overlay {
    display: none;
  }
}
.badge {
  position: absolute;
  top: 42px;
  left: 12px;
  z-index: 5;
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 9px;
  border-radius: 6px;
  color: #fff;
}
.badge.new {
  background: var(--new);
}
.badge.hot {
  background: var(--hot);
}
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.card-meta h3 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.card-meta p {
  color: var(--mute);
  font-size: 13.5px;
  margin-top: 3px;
}
.pill {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--score);
  background: color-mix(in srgb, var(--score) 12%, transparent);
  padding: 5px 9px;
  border-radius: 8px;
}
.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 60px 20px;
  color: var(--mute);
  border: 1px dashed var(--line);
  border-radius: var(--r);
}
.more {
  display: flex;
  justify-content: center;
  margin-top: 56px;
}
.btn-outline {
  border-color: var(--line);
  background: var(--surface);
  color: var(--fg);
}
.btn-outline:hover {
  border-color: var(--fg);
}

/* mini-site primitives (inside previews) */
.site {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  font-size: 0;
}
.ms-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
}
.ms-logo {
  width: 34px;
  height: 8px;
  border-radius: 3px;
  margin-right: auto;
}
.ms-l {
  height: 5px;
  border-radius: 3px;
  display: block;
}
.ms-sec {
  padding: 16px 12px;
}
.ms-btn {
  display: inline-block;
  width: 46px;
  height: 14px;
  border-radius: 7px;
}
.ms-img {
  border-radius: 6px;
  display: block;
}
.ms-row {
  display: grid;
  gap: 8px;
}
.ms-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- FEATURES ---------- */
.features {
  background: var(--surface);
  border-block: 1px solid var(--line);
}
.fgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.feat {
  padding: 30px 26px 34px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background 0.25s;
}
.feat:hover {
  background: var(--bg);
}
.feat .ic {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}
.feat .ic svg {
  width: 22px;
  height: 22px;
}
.feat h3 {
  font-size: 19px;
  margin-top: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.feat p {
  color: var(--mute);
  font-size: 14.5px;
  margin-top: 8px;
}
@media (max-width: 980px) {
  .fgrid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 540px) {
  .fgrid {
    grid-template-columns: 1fr;
  }
}

/* ---------- COMPONENTS ---------- */
.comp {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 60px;
  align-items: center;
}
.comp-num {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(90px, 14vw, 190px);
  line-height: 0.85;
  letter-spacing: -0.05em;
  color: var(--fg);
}
.comp-num sup {
  color: var(--accent);
  font-size: 0.4em;
  vertical-align: top;
}
.comp h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 800;
  margin-top: 18px;
}
.comp p {
  color: var(--mute);
  margin-top: 14px;
  max-width: 40ch;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tag {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  gap: 8px;
  align-items: center;
  transition:
    border-color 0.2s,
    transform 0.2s;
}
.tag:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.tag b {
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--accent);
  font-weight: 700;
}
@media (max-width: 900px) {
  .comp {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}
.stack {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-top: 64px;
}
.stk {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 14px;
  text-align: center;
  background: var(--surface);
}
.stk b {
  display: block;
  font-family: var(--f-mono);
  font-size: 14px;
}
.stk span {
  font-size: 12px;
  color: var(--mute);
}
@media (max-width: 860px) {
  .stack {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- REVIEWS ---------- */
.rating {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 18px;
}
.rating b {
  font-family: var(--f-display);
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
}
.stars {
  color: #ffb21e;
  letter-spacing: 2px;
  font-size: 15px;
}
.rating small {
  display: block;
  color: var(--mute);
  font-size: 12.5px;
}
.rgrid {
  columns: 3 300px;
  column-gap: 24px;
}
.rv {
  break-inside: avoid;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 26px;
  margin-bottom: 24px;
}
.rv .cat {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.rv p {
  margin-top: 12px;
  font-size: 15.5px;
}
.rv footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.av {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}
.rv footer b {
  display: block;
  font-size: 14px;
}
.rv footer span {
  font-size: 12.5px;
  color: var(--mute);
}

/* ---------- BUY ---------- */
.buy {
  background: var(--ink);
  color: var(--on-ink);
  border-radius: 28px;
  padding: 64px 56px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.buy::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -120px;
  top: -160px;
  border-radius: 50%;
  border: 70px solid var(--accent);
  opacity: 0.12;
}
.buy h2 {
  font-size: clamp(32px, 4.4vw, 52px);
  font-weight: 800;
}
.buy p {
  color: var(--on-ink-mute);
  margin-top: 16px;
  font-size: 17px;
  max-width: 46ch;
}
.price {
  position: relative;
  z-index: 1;
  background: var(--ink-2);
  border: 1px solid var(--ink-line);
  border-radius: 20px;
  padding: 28px;
}
.price .amt {
  font-family: var(--f-display);
  font-size: 58px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}
.price .amt small {
  font-size: 16px;
  color: var(--on-ink-mute);
  font-weight: 500;
  margin-left: 8px;
  font-family: var(--f-body);
  letter-spacing: 0;
}
.price ul {
  list-style: none;
  padding: 0;
  margin: 20px 0 24px;
  display: grid;
  gap: 10px;
  font-size: 14.5px;
}
.price li {
  display: flex;
  gap: 10px;
  align-items: center;
}
.price li::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  background: color-mix(in srgb, var(--score) 20%, transparent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231FCB8B' stroke-width='3'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E")
    center/11px no-repeat;
}
.price .btn {
  width: 100%;
  justify-content: center;
}
@media (max-width: 860px) {
  .buy {
    grid-template-columns: 1fr;
    padding: 44px 26px;
  }
}

/* ---------- FOOTER ---------- */
.foot {
  padding-block: 60px 40px;
  color: var(--mute);
  font-size: 14px;
}
.foot .top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.foot .logo {
  color: var(--fg);
}
.foot .logo-mark::after {
  border-color: var(--bg);
}
.foot h4 {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
  margin: 0 0 14px;
}
.foot ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 9px;
}
.foot a:hover {
  color: var(--accent);
}
.foot .bot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 26px;
}
@media (max-width: 760px) {
  .foot .top {
    grid-template-columns: 1fr 1fr;
  }
  .foot .top > div:first-child {
    grid-column: 1/-1;
  }
}

.totop {
  position: fixed;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px -8px var(--accent);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: 0.3s;
  z-index: 40;
}
.totop.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.totop svg {
  width: 20px;
  height: 20px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ==========================================================================
   Themescore showcase additions
   ========================================================================== */
/* one clean text font everywhere (no monospace) */
:root {
  --f-mono: var(--f-body);
}
.eyebrow {
  letter-spacing: 0.12em;
}
code.plain {
  font-family: var(--f-body);
  font-size: 0.95em;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--fg);
  padding: 1px 6px;
  border-radius: 6px;
}

/* real preview screenshots */
.shot {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
}
.mq-item {
  text-decoration: none;
}
.mq-item .thumb .site.shot {
  width: 100%;
}
.mq-item:hover span {
  color: var(--on-ink);
}

/* centered hero */
.hero-in {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  padding-block: 96px 72px;
  max-width: 980px;
  margin-inline: auto;
}
.hero::after {
  right: auto;
  left: 50%;
  top: -340px;
  margin-left: -380px;
  background: radial-gradient(circle, rgba(255, 91, 46, 0.3), transparent 64%);
}
.hero h1 {
  font-size: clamp(40px, 6vw, 80px);
}
.hero-lead {
  margin-inline: auto;
  max-width: 60ch;
}
.hero-cta {
  justify-content: center;
}
.hero-points {
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 26px;
  color: var(--on-ink);
  font-size: 15px;
  font-weight: 500;
}
.hero-points li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hp-ic {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(31, 203, 139, 0.16);
  color: var(--score);
  font-size: 12px;
  font-weight: 800;
}
.hero-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
  padding-top: 28px;
  border-top: 1px solid var(--ink-line);
  width: 100%;
}
.hero-stack .env {
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--ink-2);
}
.hero-tag span {
  font-size: 12px;
}

/* cards */
.frame-bar .pg {
  font-size: 11.5px;
  letter-spacing: 0;
}
.frame-bar .pg b {
  font-weight: 600;
}
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 6px;
}
.cat-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c, var(--accent));
}
.pill {
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
}
.pill::before {
  background: var(--score);
}
.card-meta h3 {
  font-size: 20px;
}

/* support */
.support {
  background: var(--surface);
  border-block: 1px solid var(--line);
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  counter-reset: s;
}
.step {
  position: relative;
  padding: 28px;
  border-radius: var(--r);
  background: var(--bg);
  border: 1px solid var(--line);
}
.step-n {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 10px 22px -10px var(--accent);
}
.step h3 {
  font-size: 20px;
  margin-top: 18px;
}
.step p {
  color: var(--mute);
  font-size: 15px;
  margin-top: 10px;
}
.step strong {
  color: var(--fg);
  font-weight: 600;
}
.sgrid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}
.scard {
  padding: 28px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.scard h3 {
  font-size: 19px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}
.dot.ok {
  background: var(--score);
}
.dot.no {
  background: #f04438;
}
.dot.info {
  background: var(--new);
}
.check,
.cross {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 12px;
}
.check li,
.cross li {
  position: relative;
  padding-left: 30px;
  color: var(--mute);
  font-size: 15px;
}
.check li::before,
.cross li::before {
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
}
.check li::before {
  content: "\2713 ";
  background: rgba(31, 203, 139, 0.15);
  color: var(--score);
}
.cross li::before {
  content: "\2715 ";
  background: rgba(240, 68, 56, 0.12);
  color: #f04438;
}
.scard.hours .big {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 46px;
  letter-spacing: -0.03em;
  margin-top: 14px;
  line-height: 1;
}
.scard.hours p {
  color: var(--mute);
  font-size: 15px;
  margin-top: 10px;
}
.scard dl {
  margin: 18px 0 0;
  display: grid;
  gap: 10px;
}
.scard dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.scard dt {
  color: var(--mute);
}
.scard dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

/* licensing */
.lic-table {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.lic-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  align-items: center;
}
.lic-row span {
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.lic-row:first-child span {
  border-top: 0;
}
.lic-head span {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 17px;
  background: var(--bg);
}
.lic-row .y {
  color: var(--fg);
  font-weight: 600;
}
.lic-row .y::before {
  content: "\2713 ";
  color: var(--score);
  font-weight: 800;
  margin-right: 8px;
}
.lic-row .n {
  color: var(--mute);
}
.lic-row .n::before {
  content: "\2715 ";
  color: #f04438;
  font-weight: 800;
  margin-right: 8px;
}
.lic-note {
  color: var(--mute);
  font-size: 14px;
  margin-top: 16px;
}
.lic-note a {
  color: var(--accent);
  font-weight: 600;
}

/* faq */
.faq {
  display: grid;
  gap: 12px;
  max-width: 900px;
}
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  padding: 0 24px;
  transition: box-shadow 0.2s;
}
.faq details[open] {
  box-shadow: var(--shadow);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 32px 20px 0;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 18px;
  position: relative;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--accent);
  font-family: var(--f-body);
  font-size: 18px;
  font-weight: 600;
  transition: transform 0.2s;
}
.faq details[open] summary::after {
  content: "\2013 ";
}
.faq details p {
  color: var(--mute);
  padding-bottom: 20px;
  font-size: 15.5px;
}

@media (max-width: 900px) {
  .steps,
  .sgrid {
    grid-template-columns: 1fr;
  }
  .lic-row {
    grid-template-columns: 1.3fr 1fr 1fr;
  }
  .lic-row span {
    padding: 12px 12px;
    font-size: 13.5px;
  }
  .hero-in {
    padding-block: 64px 48px;
  }
}

/* ---------- page edges: no default browser margin ---------- */
html,
body {
  margin: 0;
  padding: 0;
}

/* ---------- licensing table alignment ---------- */
.lic-row {
  align-items: stretch;
}
.lic-row span {
  display: flex;
  align-items: center;
}

/* ---------- toolbar: filters and search on one line ---------- */
.toolbar {
  flex-wrap: nowrap;
}
.tabs {
  flex: 1 1 auto;
  min-width: 0;
}
.tab {
  padding: 9px 14px;
}
.search {
  flex: 0 0 250px;
}
@media (max-width: 900px) {
  .toolbar {
    flex-wrap: wrap;
  }
  .search {
    flex: 1 1 100%;
  }
}

/* ---------- hero: 3D field of template previews behind the text ---------- */
.hero {
  isolation: isolate;
}
.hero-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  perspective: 1800px;
  perspective-origin: 50% 0%;
}
.hero-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      ellipse 55% 60% at 50% 38%,
      rgba(14, 19, 33, 0.92) 0%,
      rgba(14, 19, 33, 0.72) 45%,
      rgba(14, 19, 33, 0.35) 100%
    ),
    linear-gradient(180deg, var(--ink) 0%, rgba(14, 19, 33, 0.2) 40%, rgba(14, 19, 33, 0.55) 85%, var(--ink) 100%);
}
.hs-plane {
  position: absolute;
  left: 50%;
  top: 30%;
  width: 1880px;
  display: grid;
  grid-template-columns: repeat(5, 340px);
  gap: 30px 40px;
  transform: translateX(-50%) rotateX(58deg) rotateZ(-16deg);
  transform-style: preserve-3d;
  transform-origin: 50% 0;
}
.hs-win {
  position: relative;
  height: 460px;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 50px 90px -30px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}
.hs-win:nth-child(even) {
  transform: translateY(90px);
}
.hs-bar {
  position: absolute;
  inset: 0 0 auto;
  height: 22px;
  background: #f1f2f6;
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 0 10px;
  z-index: 2;
}
.hs-bar i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d5d8e1;
}
.hs-bar i:nth-child(1) {
  background: #ff6159;
}
.hs-bar i:nth-child(2) {
  background: #ffbd2e;
}
.hs-bar i:nth-child(3) {
  background: #28c941;
}
.hs-win img {
  position: absolute;
  top: 22px;
  left: 0;
  width: 100%;
  height: auto;
  animation: hsScroll 30s ease-in-out infinite alternate;
}
@keyframes hsScroll {
  0%,
  10% {
    transform: translateY(0);
  }
  90%,
  100% {
    transform: translateY(calc(-100% + 438px));
  }
}
.hero-in {
  z-index: 2;
}
.marquee {
  z-index: 2;
  background: rgba(14, 19, 33, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
@media (max-width: 900px) {
  .hs-plane {
    width: 1300px;
    grid-template-columns: repeat(5, 230px);
    gap: 20px 26px;
  }
  .hs-win {
    height: 320px;
  }
}

/* ==========================================================================
   Page gallery on cards + full-screen page viewer
   ========================================================================== */
/* hover auto-scroll: quick return, speed set per page by main.js (--dur) */
.slide .site {
  transition: transform 0.9s cubic-bezier(0.65, 0, 0.35, 1);
}
.card:hover .slide.on .site {
  transition-duration: var(--dur, 6s);
  transition-timing-function: linear;
}
.viewport {
  cursor: zoom-in;
}
.slide.missing::after {
  content: attr(data-soon);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: var(--mute);
  background: var(--bg);
}
.slide.missing img {
  visibility: hidden;
}

/* expand button (top right of the screenshot) */
.expand {
  position: absolute;
  top: 40px;
  right: 10px;
  z-index: 5;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 0;
  display: grid;
  place-items: center;
  background: rgba(14, 19, 33, 0.62);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.25s, transform 0.25s, background 0.2s;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.expand svg {
  width: 16px;
  height: 16px;
}
.expand:hover {
  background: var(--accent);
}
.card:hover .expand,
.card:focus-within .expand {
  opacity: 1;
  transform: none;
}
@media (hover: none) {
  .expand {
    opacity: 1;
    transform: none;
  }
}
.overlay button {
  pointer-events: auto;
  border: 0;
  cursor: pointer;
  font: inherit;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  padding: 9px 15px;
  border-radius: 999px;
  transform: translateY(10px);
  transition: transform 0.3s, background 0.2s;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}
.overlay button:hover {
  background: rgba(255, 255, 255, 0.3);
}
.card:hover .overlay button,
.card:focus-within .overlay button {
  transform: none;
}

/* page count pill is a button that opens the viewer */
button.pill {
  font-family: var(--f-body);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
button.pill:hover {
  border-color: var(--fg);
}

/* page chips under each card */
.pages {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-top: -4px;
  padding: 2px 1px;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
}
.pages::-webkit-scrollbar {
  display: none;
}
.pg-chip {
  flex: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--mute);
  font: 500 12px/1 var(--f-body);
  padding: 7px 11px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.pg-chip:hover {
  color: var(--fg);
  border-color: var(--fg);
}
.pg-chip.on {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--bg);
}
.pages .pg-chip:last-child {
  margin-right: 30px;
}

/* full-screen viewer */
html.vw-open {
  overflow: hidden;
}
.viewer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background: rgba(8, 11, 20, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #eef1f8;
  opacity: 0;
  transition: opacity 0.2s;
}
.viewer[hidden] {
  display: none;
}
.viewer.in {
  opacity: 1;
}
.vw-top {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 14px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.vw-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.vw-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: none;
}
.vw-title b {
  display: block;
  font-family: var(--f-display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.15;
}
.vw-title small {
  display: block;
  font-size: 12.5px;
  color: #9aa3bc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 34ch;
}
.vw-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  justify-self: center;
  max-width: 100%;
}
.vw-tabs::-webkit-scrollbar {
  display: none;
}
.vw-tabs button {
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: #c4cadb;
  font: 500 13px/1 var(--f-body);
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.vw-tabs button:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}
.vw-tabs button.on {
  background: #fff;
  border-color: #fff;
  color: #0e1321;
}
.viewer.single .vw-tabs,
.viewer.single .vw-nav {
  visibility: hidden;
}
.vw-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.vw-btn {
  font-size: 13px;
  font-weight: 600;
  padding: 10px 15px;
  border-radius: 999px;
  white-space: nowrap;
  text-decoration: none;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
  transition: background 0.2s;
}
.vw-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}
.vw-buy {
  background: var(--accent);
  box-shadow: none;
}
.vw-buy:hover {
  background: var(--accent);
  filter: brightness(1.08);
}
.vw-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  margin-left: 4px;
}
.vw-close:hover {
  background: rgba(255, 255, 255, 0.2);
}
.vw-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  align-items: center;
}
.vw-scroll {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 0 40px;
  outline: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}
.vw-page {
  width: min(1280px, 100%);
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
}
.vw-bar {
  position: sticky;
  top: -24px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  background: #f1f3f8;
  border-bottom: 1px solid #e2e5ee;
}
.vw-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d5d9e4;
}
.vw-bar i:nth-child(1) { background: #ff6159; }
.vw-bar i:nth-child(2) { background: #ffbd2e; }
.vw-bar i:nth-child(3) { background: #28c941; }
.vw-url {
  margin: 0 auto;
  font-size: 12px;
  color: #5b6478;
  background: #fff;
  border: 1px solid #e2e5ee;
  border-radius: 7px;
  padding: 5px 14px;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vw-img {
  position: relative;
  min-height: 60vh;
  background: #fff;
}
.vw-img img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.2s;
}
.viewer.loading .vw-img img {
  opacity: 0.25;
}
.vw-load {
  position: absolute;
  inset: 0;
  display: none;
  justify-content: center;
  padding-top: 25vh;
}
.viewer.loading .vw-load {
  display: flex;
}
.vw-load span {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid #e2e5ee;
  border-top-color: var(--accent);
  animation: vwspin 0.8s linear infinite;
}
@keyframes vwspin {
  to {
    transform: rotate(360deg);
  }
}
.viewer.missing .vw-img::after {
  content: "Preview coming soon";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #5b6478;
  font-size: 15px;
}
.viewer.missing .vw-img img {
  visibility: hidden;
}
.vw-nav {
  justify-self: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}
.vw-nav:hover {
  background: var(--accent);
}
.vw-nav svg {
  width: 20px;
  height: 20px;
}
.vw-foot {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 22px 12px;
  font-size: 12.5px;
  color: #9aa3bc;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.vw-count {
  color: #fff;
  font-weight: 600;
}
@media (max-width: 1100px) {
  .vw-top {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .vw-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
  }
}
@media (max-width: 760px) {
  .vw-top {
    padding: 10px 12px;
    gap: 10px;
  }
  .vw-live,
  .vw-hint {
    display: none;
  }
  .vw-btn {
    padding: 9px 12px;
    font-size: 12.5px;
  }
  .vw-stage {
    grid-template-columns: 0 minmax(0, 1fr) 0;
  }
  .vw-nav {
    position: fixed;
    bottom: 50px;
    z-index: 3;
    box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.5);
    background: rgba(14, 19, 33, 0.85);
  }
  .vw-nav.prev {
    left: 14px;
  }
  .vw-nav.next {
    right: 14px;
  }
  .vw-scroll {
    padding: 12px 10px 90px;
  }
  .vw-bar {
    top: -12px;
  }
  .vw-title small {
    max-width: 22ch;
  }
}
@media (prefers-reduced-motion: reduce) {
  .vw-load span {
    animation: none !important;
  }
}
.vw-scroll {
  grid-column: 2;
  grid-row: 1;
}
.overlay {
  gap: 8px;
  padding-inline: 10px;
}
.overlay a,
.overlay button {
  white-space: nowrap;
  font-size: 12.5px;
  padding: 9px 13px;
}
