/* ==========================================================================
   AtlasKeys — Home / Storefront landing
   ========================================================================== */

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(2.5rem, 7vw, 6rem));
  padding-bottom: clamp(3rem, 7vw, 6rem);
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(40% 50% at 50% 0%, rgba(124,58,237,0.30), transparent 70%),
    radial-gradient(30% 40% at 85% 10%, rgba(56,189,248,0.14), transparent 70%);
  pointer-events: none;
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--color-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-border) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(60% 60% at 50% 30%, #000, transparent 75%);
          mask-image: radial-gradient(60% 60% at 50% 30%, #000, transparent 75%);
  opacity: 0.5;
}
.hero__inner { max-width: 880px; margin-inline: auto; text-align: center; }
.hero h1 {
  font-size: var(--fs-hero);
  letter-spacing: -0.03em;
  margin-block: var(--space-5);
}
.hero p.hero__sub {
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  color: var(--color-text-muted);
  max-width: 60ch; margin-inline: auto;
}
.hero__search {
  position: relative;
  z-index: 10;
  display: flex; gap: var(--space-2);
  max-width: 640px; margin: var(--space-8) auto var(--space-5);
  padding: var(--space-2);
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg);
}
.hero__search:focus-within { border-color: var(--color-primary); box-shadow: var(--shadow-lg), var(--shadow-glow); }
.hero__search .input {
  border: none; background: transparent; min-height: 48px; padding-left: var(--space-5);
}
.hero__search .input:focus { box-shadow: none; }
.hero__search .btn { border-radius: var(--radius-pill); flex: none; }
.hero__tags { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; }
.hero__tags span { color: var(--color-text-dim); font-size: var(--fs-sm); margin-right: var(--space-1); }

.hero__stats {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(var(--space-6), 6vw, var(--space-16));
  margin-top: var(--space-12);
}
.hero__stat { text-align: center; }
.hero__stat b { display: block; font-family: var(--font-display); font-weight: var(--fw-bold); font-size: var(--fs-3xl); }
.hero__stat span { color: var(--color-text-dim); font-size: var(--fs-sm); }

/* ---------- Trust strip ---------- */
.trust-strip {
  display: flex; flex-wrap: wrap; gap: var(--space-4);
  justify-content: center;
  padding-block: var(--space-6);
  border-block: 1px solid var(--color-border);
}
.trust-strip__item { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--color-text-muted); font-size: var(--fs-sm); }
.trust-strip__item svg { width: 18px; height: 18px; color: var(--color-primary-300); }

/* ---------- Category tiles ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-6);
}
.cat-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 250px;
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  transition: transform var(--t-slow) var(--ease-spring),
              border-color var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease);
  z-index: 1;
}
.cat-tile::before {
  content: ""; position: absolute; inset: 0; opacity: 0;
  background: var(--grad-glow); transition: opacity var(--t-base) var(--ease);
  z-index: -1;
}
.cat-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 100%);
  z-index: -2;
  pointer-events: none;
}
.cat-tile:hover {
  transform: translateY(-8px);
  border-color: var(--color-border-primary);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
}
.cat-tile:hover::before { opacity: 1; }

/* Custom Category Ambient Color Themes */
.cat-tile--game-keys {
  background: radial-gradient(circle at 100% 100%, rgba(124, 58, 237, 0.14), transparent 60%), var(--color-surface);
}
.cat-tile--gift-cards {
  background: radial-gradient(circle at 100% 100%, rgba(56, 189, 248, 0.14), transparent 60%), var(--color-surface);
}
.cat-tile--software {
  background: radial-gradient(circle at 100% 100%, rgba(34, 197, 94, 0.14), transparent 60%), var(--color-surface);
}
.cat-tile--in-game {
  background: radial-gradient(circle at 100% 100%, rgba(242, 84, 91, 0.14), transparent 60%), var(--color-surface);
}
.cat-tile--subscriptions {
  background: radial-gradient(circle at 100% 100%, rgba(245, 158, 11, 0.14), transparent 60%), var(--color-surface);
}

.cat-tile__content {
  position: relative;
  z-index: 5;
  pointer-events: none;
}
.cat-tile__tag {
  display: block;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary-300);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-2);
}
.cat-tile h3 {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--color-text);
  margin-bottom: var(--space-1);
}
.cat-tile span.cat-tile__subs {
  display: block;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

/* 3D Overlapping Card Visuals */
.cat-tile__visual {
  position: absolute;
  right: -10px;
  bottom: -20px;
  width: 170px;
  height: 120px;
  z-index: 2;
  pointer-events: none;
}
.cat-tile__img {
  position: absolute;
  width: 85px;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  transition: transform var(--t-slow) var(--ease-spring), opacity var(--t-base) var(--ease);
  will-change: transform;
}

/* Stack styling: Game Keys */
.cat-tile--game-keys .img-steam {
  transform: translate(0px, 15px) rotate(-15deg);
  z-index: 3;
}
.cat-tile--game-keys .img-epic {
  transform: translate(40px, 5px) rotate(-5deg);
  z-index: 2;
  opacity: 0.9;
}
.cat-tile--game-keys .img-xbox {
  transform: translate(75px, 18px) rotate(10deg);
  z-index: 1;
  opacity: 0.8;
}
.cat-tile--game-keys:hover .img-steam {
  transform: translate(-10px, -5px) rotate(-22deg) scale(1.06);
}
.cat-tile--game-keys:hover .img-epic {
  transform: translate(35px, -18px) rotate(-8deg) scale(1.06);
  opacity: 1;
}
.cat-tile--game-keys:hover .img-xbox {
  transform: translate(80px, 0px) rotate(15deg) scale(1.06);
  opacity: 1;
}

/* Stack styling: Gift Cards */
.cat-tile--gift-cards .img-psn {
  transform: translate(0px, 15px) rotate(-15deg);
  z-index: 3;
}
.cat-tile--gift-cards .img-steam {
  transform: translate(40px, 5px) rotate(-5deg);
  z-index: 2;
  opacity: 0.9;
}
.cat-tile--gift-cards .img-amazon {
  transform: translate(75px, 18px) rotate(10deg);
  z-index: 1;
  opacity: 0.8;
}
.cat-tile--gift-cards:hover .img-psn {
  transform: translate(-10px, -5px) rotate(-22deg) scale(1.06);
}
.cat-tile--gift-cards:hover .img-steam {
  transform: translate(35px, -18px) rotate(-8deg) scale(1.06);
  opacity: 1;
}
.cat-tile--gift-cards:hover .img-amazon {
  transform: translate(80px, 0px) rotate(15deg) scale(1.06);
  opacity: 1;
}

/* Stack styling: Software */
.cat-tile--software .img-windows {
  transform: translate(10px, 15px) rotate(-12deg);
  z-index: 2;
}
.cat-tile--software .img-office {
  transform: translate(65px, 10px) rotate(8deg);
  z-index: 1;
  opacity: 0.9;
}
.cat-tile--software:hover .img-windows {
  transform: translate(0px, -12px) rotate(-18deg) scale(1.06);
}
.cat-tile--software:hover .img-office {
  transform: translate(75px, -10px) rotate(18deg) scale(1.06);
  opacity: 1;
}

/* Stack styling: In-Game */
.cat-tile--in-game .img-vbucks {
  transform: translate(10px, 15px) rotate(-12deg);
  z-index: 2;
}
.cat-tile--in-game .img-valorant {
  transform: translate(65px, 10px) rotate(8deg);
  z-index: 1;
  opacity: 0.9;
}
.cat-tile--in-game:hover .img-vbucks {
  transform: translate(0px, -12px) rotate(-18deg) scale(1.06);
}
.cat-tile--in-game:hover .img-valorant {
  transform: translate(75px, -10px) rotate(18deg) scale(1.06);
  opacity: 1;
}

/* Stack styling: Subscriptions */
.cat-tile--subscriptions .img-spotify {
  transform: translate(0px, 15px) rotate(-15deg);
  z-index: 3;
}
.cat-tile--subscriptions .img-xbox {
  transform: translate(40px, 5px) rotate(-5deg);
  z-index: 2;
  opacity: 0.9;
}
.cat-tile--subscriptions .img-psn {
  transform: translate(75px, 18px) rotate(10deg);
  z-index: 1;
  opacity: 0.8;
}
.cat-tile--subscriptions:hover .img-spotify {
  transform: translate(-10px, -5px) rotate(-22deg) scale(1.06);
}
.cat-tile--subscriptions:hover .img-xbox {
  transform: translate(35px, -18px) rotate(-8deg) scale(1.06);
  opacity: 1;
}
.cat-tile--subscriptions:hover .img-psn {
  transform: translate(80px, 0px) rotate(15deg) scale(1.06);
  opacity: 1;
}

/* ---------- Deal countdown badge ---------- */
.deal-timer {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: var(--fw-semibold);
  color: var(--color-warning);
}

/* ---------- Escrow / how-it-works ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-5); }
.step {
  position: relative;
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: transform var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease);
}
.step:hover {
  transform: translateY(-4px);
  border-color: var(--color-border-primary);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(124,58,237,0.25);
}

/* number badge — pops in when the step reveals */
.step__num {
  position: relative;
  display: grid; place-items: center;
  width: 44px; height: 44px; margin-bottom: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--grad-primary); color: #fff;
  font-family: var(--font-display); font-weight: var(--fw-bold); font-size: var(--fs-lg);
  box-shadow: 0 6px 18px rgba(124,58,237,0.45);
  transform: scale(0.4) rotate(-8deg); opacity: 0;
  transition: transform var(--t-slow) var(--ease-spring), opacity var(--t-base) var(--ease);
}
.step.is-revealed .step__num { transform: none; opacity: 1; transition-delay: 180ms; }
.step__num::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(124,58,237,0.5); pointer-events: none;
}
.step.is-revealed .step__num::after { animation: step-pulse 2.4s var(--ease) 0.9s; }
@keyframes step-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(124,58,237,0.55); }
  70%  { box-shadow: 0 0 0 13px rgba(124,58,237,0); }
  100% { box-shadow: 0 0 0 0 rgba(124,58,237,0); }
}

.step h3 { font-size: var(--fs-lg); margin-bottom: var(--space-2); }
.step p { font-size: var(--fs-sm); color: var(--color-text-muted); }

/* connector — draws itself across the gap after the card appears */
.step__line {
  position: absolute; top: calc(var(--space-6) + 22px);
  right: calc(var(--space-5) * -1); width: var(--space-5); height: 2px;
  background: linear-gradient(90deg, var(--color-primary), rgba(124,58,237,0.12));
  border-radius: 2px;
  transform: scaleX(0); transform-origin: left center;
  transition: transform var(--t-slow) var(--ease);
}
.step.is-revealed .step__line { transform: scaleX(1); transition-delay: 430ms; }
.step__line::after {
  content: ""; position: absolute; right: -3px; top: 50%; transform: translateY(-50%);
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--color-primary-400); box-shadow: 0 0 10px var(--color-primary-glow);
  opacity: 0; transition: opacity var(--t-base) var(--ease);
}
.step.is-revealed .step__line::after { opacity: 1; transition-delay: 760ms; }
@media (max-width: 720px) { .step__line { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .step__num, .step.is-revealed .step__num { transform: none; opacity: 1; }
  .step__line, .step.is-revealed .step__line { transform: scaleX(1); }
  .step__line::after, .step.is-revealed .step__line::after { opacity: 1; }
  .step.is-revealed .step__num::after { animation: none; }
}

/* ---------- Seller CTA band ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  padding: clamp(var(--space-10), 6vw, var(--space-20));
  border-radius: var(--radius-2xl);
  border: 1px solid var(--color-border-primary);
  background:
    radial-gradient(60% 120% at 0% 0%, rgba(124,58,237,0.35), transparent 60%),
    radial-gradient(60% 120% at 100% 100%, rgba(56,189,248,0.18), transparent 60%),
    var(--color-surface);
  text-align: center;
}
.cta-band h2 { font-size: var(--fs-4xl); margin-bottom: var(--space-3); }
.cta-band p { color: var(--color-text-muted); max-width: 56ch; margin: 0 auto var(--space-6); }
.cta-band__actions { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; }

@media (max-width: 540px) {
  .hero__search { flex-wrap: wrap; border-radius: var(--radius-xl); }
  .hero__search .btn { width: 100%; }
}
