:root {
  --bg: #050507;
  --panel: #111116;
  --text: #f5f5f5;
  --muted: #b3b3b3;
  --red: #e50914;
  --red-hot: #ff2a36;
  --blue: #4b7bff;
  --line: rgba(255, 255, 255, 0.08);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  --max: 1600px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Manrope", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 4vw;
  transition: background 0.35s ease, backdrop-filter 0.35s ease;
}

.topbar.scrolled {
  background: rgba(5, 5, 7, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(2.2rem, 4.5vw, 3.1rem);
  letter-spacing: 0.1em;
  color: var(--red);
  text-shadow: 0 0 40px rgba(229, 9, 20, 0.45);
  line-height: 0.9;
}

.brand.tiny { font-size: 2rem; margin-bottom: 0.4rem; }

.nav {
  display: flex;
  gap: 1.4rem;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav a:hover { color: #fff; }

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  padding: 0 4vw 5.5rem;
  overflow: hidden;
}

.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.1s ease, transform 8s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(5, 5, 7, 0.92) 0%, rgba(5, 5, 7, 0.55) 42%, rgba(5, 5, 7, 0.15) 70%, transparent 100%),
    linear-gradient(0deg, #050507 0%, rgba(5, 5, 7, 0.35) 38%, transparent 70%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 640px;
  animation: rise 1s ease both;
}

.hero-kicker {
  color: var(--red);
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin-bottom: 0.8rem;
}

.hero h1 {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(4rem, 10vw, 7rem);
  line-height: 0.88;
  letter-spacing: 0.04em;
  margin-bottom: 0.9rem;
}

.hero p {
  color: #d0d0d0;
  font-size: 1.08rem;
  max-width: 40ch;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 0.8rem; }

.btn {
  border: 0;
  cursor: pointer;
  border-radius: 4px;
  padding: 0.9rem 1.5rem;
  font-weight: 800;
  font-size: 0.95rem;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 12px 34px rgba(229, 9, 20, 0.4);
}

.btn-primary:hover { background: var(--red-hot); }

.btn-ghost {
  background: rgba(120, 120, 130, 0.45);
  color: #fff;
  backdrop-filter: blur(6px);
}

.hero-dots {
  display: flex;
  gap: 0.45rem;
  margin-top: 1.4rem;
}

.hero-dots button {
  width: 2rem;
  height: 3px;
  border: 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: background 0.25s ease, width 0.25s ease;
}

.hero-dots button.active {
  background: var(--red);
  width: 2.6rem;
}

.rail-section {
  position: relative;
  z-index: 3;
  margin-top: -2.5rem;
  padding: 0 0 1.8rem;
}

.rail-section + .rail-section { margin-top: 0.5rem; }

.rail-head {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 4vw 0.9rem;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.rail-head h2 {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  letter-spacing: 0.04em;
}

.rail-head p { color: var(--muted); font-size: 0.92rem; margin-top: 0.2rem; }

.rail-controls { display: flex; gap: 0.45rem; }

.rail-btn {
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(20, 20, 28, 0.75);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.rail-btn:hover {
  background: rgba(229, 9, 20, 0.85);
  border-color: transparent;
}

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 22vw);
  gap: 0.9rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.4rem 4vw 1.4rem;
  scrollbar-width: none;
}

.rail::-webkit-scrollbar { display: none; }

.premium-rail {
  grid-auto-columns: minmax(170px, 12.5vw);
}

.tool-card {
  position: relative;
  scroll-snap-align: start;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #15151c;
  box-shadow: var(--shadow);
  transform-origin: center bottom;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  isolation: isolate;
}

.tool-card:hover {
  transform: scale(1.06) translateY(-6px);
  z-index: 4;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.65);
}

.tool-card .poster {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}

.tool-card:hover .poster { transform: scale(1.08); }

.tool-card .shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.94) 100%);
}

.tool-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.05rem;
  z-index: 2;
}

.badge-free {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  padding: 0.28rem 0.5rem;
  border-radius: 3px;
  margin-bottom: 0.45rem;
}

.tool-meta h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.tool-meta p {
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 0.75rem;
}

.btn-dl {
  display: inline-block;
  background: #fff;
  color: #111;
  padding: 0.58rem 0.95rem;
  border-radius: 3px;
  font-weight: 800;
  font-size: 0.85rem;
}

.btn-dl[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.btn-dl:hover { background: #ececec; }

.product {
  scroll-snap-align: start;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(180deg, #1a1a22, #0e0e14);
  border: 1px solid var(--line);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.product:hover {
  transform: translateY(-8px) scale(1.03);
  border-color: rgba(229, 9, 20, 0.5);
}

.product-thumb {
  height: 150px;
  position: relative;
  overflow: hidden;
}

.product-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.75));
}

.product-body { padding: 0.85rem; }

.product-body h3 {
  font-size: 0.92rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-body p {
  color: var(--muted);
  font-size: 0.74rem;
  min-height: 2.3em;
  margin-bottom: 0.7rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.price { font-weight: 800; }

.btn-buy {
  background: linear-gradient(90deg, var(--red), #b20710);
  color: #fff;
  border: 0;
  border-radius: 3px;
  padding: 0.42rem 0.65rem;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}

.pill {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
}

.site-footer {
  padding: 3rem 4vw 4rem;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
}

.cart-toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  background: #16161f;
  border: 1px solid rgba(229, 9, 20, 0.55);
  color: #fff;
  padding: 0.9rem 1.05rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
  transform: translateY(120%);
  opacity: 0;
  transition: 0.3s ease;
  z-index: 100;
}

.cart-toast.show {
  transform: translateY(0);
  opacity: 1;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .rail { grid-auto-columns: minmax(78vw, 1fr); }
  .premium-rail { grid-auto-columns: minmax(42vw, 1fr); }
  .hero { min-height: 78vh; padding-bottom: 4rem; }
}
