/* Discover section */
.home-discover {
  border-radius: 34px 34px 0 0;
  box-shadow: 0 -16px 48px rgba(4, 10, 6, 0.35);
}

.home-discover .section-head {
  align-items: flex-end;
}

.home-discover .section-head h2 {
  margin: 0;
}

/* Stack builder section */
.stack-section {
  display: grid;
  grid-template-columns: 0.96fr 1.08fr;
  gap: clamp(2rem, 6.5vw, 6.5rem);
  align-items: center;
}

.stack-copy h2 {
  max-width: 9.5em;
  margin: 0 0 1rem;
  font-size: clamp(2.45rem, 4.9vw, 4.4rem);
  line-height: 1.05;
}

.stack-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  margin-top: 0.6rem;
  border: 1px solid #394b3e;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 14px;
}

.stack-tabs button {
  min-height: 44px;
  padding: 0.55rem 1.35rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #d3e0d5;
  font-size: 0.94rem;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}

.stack-tabs button:hover:not(.active) {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.stack-tabs .active {
  background: var(--mint);
  color: #16361f;
  font-weight: 700;
}

.stack-board {
  --stack-tint: #d5edbe;
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: clamp(1.35rem, 2.7vw, 2.6rem);
  border-radius: var(--radius-lg);
  color: #1b2a1e;
  background: linear-gradient(128deg, #e7f1e1, var(--stack-tint));
  transition: background 0.35s ease;
}

.stack-board[data-scenario="code"] {
  --stack-tint: #cad7fc;
}

.stack-board[data-scenario="create"] {
  --stack-tint: #efcadd;
}

.stack-board h3 {
  position: relative;
  max-width: 78%;
  margin: 0 0 1.4rem;
  font-weight: 700;
  font-size: clamp(1.38rem, 2.2vw, 2.1rem);
  letter-spacing: -0.025em;
}

.stack-services {
  position: relative;
  display: grid;
  gap: 10px;
}

.stack-service {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  min-height: 78px;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.82);
  border-radius: 15px;
  transition: background 0.2s ease, transform 0.22s var(--ease-out), box-shadow 0.22s ease;
}

.stack-service:hover {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(24, 42, 28, 0.08);
}

.stack-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  background: var(--tint);
}

.stack-icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.stack-service-copy {
  min-width: 0;
  flex: 1;
}

.stack-service strong,
.stack-service small {
  display: block;
}

.stack-service strong {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.stack-service small {
  color: #46604e;
  margin-top: 0.2rem;
  font-size: 0.87rem;
  line-height: 1.45;
}

.stack-service-price {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1f442a;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.stack-service-price svg {
  width: 16px;
  height: 16px;
  opacity: 0.65;
  transition: transform 0.2s var(--ease-out), opacity 0.2s ease;
}

.stack-service:hover .stack-service-price svg {
  transform: translateX(3px);
  opacity: 1;
}

.stack-board-foot {
  position: relative;
  margin-top: 1.1rem;
  display: flex;
  justify-content: flex-end;
}

.stack-board-foot a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1d3c26;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.stack-board-foot a svg {
  width: 16px;
  height: 16px;
}

/* Home GameHub cover */
.home-game-cover {
  isolation: isolate;
  overflow: hidden;
  position: relative;
  border-radius: clamp(22px, 2.2vw, 32px);
  min-height: 320px;
  padding: clamp(2rem, 4.4vw, 4.4rem);
  background: linear-gradient(110deg, #1d1630 0%, #241b3c 100%);
  border: 1px solid #5f4f73;
}

.home-game-cover picture,
.home-game-cover picture > img {
  position: absolute;
  inset: 0 0 0 auto;
  width: 78%;
  height: 100%;
  object-fit: cover;
  object-position: center 56%;
  z-index: -1;
  mask-image: linear-gradient(90deg, transparent 0%, #000 46%);
  transition: transform 0.65s var(--ease-out);
}

.home-game-cover:hover picture > img {
  transform: scale(1.03);
}

.home-game-copy {
  position: relative;
  max-width: 48%;
}

.home-game-copy h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(2.8rem, 5.6vw, 5.1rem);
  letter-spacing: -0.048em;
}

.home-game-copy p {
  max-width: 24rem;
  margin-bottom: 1.55rem;
  color: #e4def0;
}

.home-game-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.5rem;
}

.home-game-platforms span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(225, 201, 252, 0.22);
  backdrop-filter: blur(10px);
  color: #efe7fa;
  font-size: 0.78rem;
  font-weight: 600;
}

.home-game-platforms img {
  width: 20px;
  height: 20px;
  padding: 3px;
  border-radius: 6px;
  background: #ffffff;
  object-fit: contain;
}

.home-game-copy .btn {
  color: #2f2141;
  background: #eee4ff;
  min-height: 48px;
}

.home-game-copy .btn:hover {
  background: #ffffff;
}

/* Home FAQ links */
.home-faq .faq-copy h2 {
  margin-bottom: 1.35rem;
}

.home-faq .faq-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
}

/* ==========================================================================
   Homepage Responsive
   ========================================================================== */

@media (max-width: 950px) {
  .stack-section {
    gap: 2.2rem;
  }
}

@media (max-width: 720px) {
  .home-discover {
    border-radius: 24px 24px 0 0;
  }

  .stack-section {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }

  .stack-copy h2 {
    max-width: none;
    margin-bottom: 0.65rem;
  }

  .stack-service {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .home-game-cover {
    min-height: 300px;
    padding: 1.75rem;
    background: #1c162b;
  }

  .home-game-cover picture,
  .home-game-cover picture > img {
    width: 100%;
    object-position: 68% 58%;
    mask-image: linear-gradient(100deg, transparent 8%, rgba(0, 0, 0, 0.52) 66%, #000 100%);
  }

  .home-game-copy {
    max-width: 100%;
  }

  .home-game-copy p {
    max-width: min(20rem, 88%);
  }

  .home-faq .faq-copy h2 {
    margin: 0 0 0.65rem;
  }
}

@media (max-width: 430px) {
  .home-discover .section-head {
    align-items: flex-start;
  }

  .stack-board h3 {
    max-width: 92%;
  }
}

.account-shortcut { gap: .5rem; }
.account-shortcut svg { width: 17px; height: 17px; }
.header-actions .account-shortcut[aria-current="page"] { background: var(--mint); }

@media (max-width: 680px) {
  .header-actions .account-shortcut {
    display: inline-flex;
    width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 50%;
    background: #26352b;
    color: var(--mint);
  }
  .header-actions .account-shortcut[aria-current="page"] { color: var(--ink); }
  .account-shortcut svg { width: 19px; height: 19px; }
  .account-shortcut span { display: none; }
}
@media (max-width: 365px) {
  .header-inner { gap: 4px; width: calc(100% - 20px); }
  .header-inner .logo { font-size: 1.03rem; gap: 6px; }
  .header-inner .logo img { width: 24px; height: 24px; }
  .header-actions { gap: 0; }
}
