/* Home: hero with closing browser tabs + embers, inventory showcase, help band. */

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 40%;
  background: radial-gradient(60% 100% at 50% 100%, #c7773a1f, transparent 70%);
  z-index: -1;
}

.embers {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 3.5rem;
  align-items: center;
  padding-block: 4rem 5.5rem;
}

.lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 34rem;
  margin: 1.25rem 0 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 2rem;
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.75rem 0 0;
}

/* Browser tabs that close one by one, leaving UberExile. */
.tabs {
  display: flex;
  align-items: flex-end;
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  font-size: 0.8rem;
}

.tabs li {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 11rem;
  padding: 0.4rem 0.7rem;
  margin-right: 2px;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: var(--panel);
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  animation: tab-close 520ms var(--ease-out) forwards;
  animation-delay: calc(500ms + var(--i) * 260ms);
}

.tabs li::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  flex: none;
  border-radius: 2px;
  background: var(--fav, var(--muted));
}

.tabs li::after {
  content: "×";
  margin-left: 0.25rem;
  opacity: 0.6;
}

.tabs .keep {
  flex-shrink: 0;
  color: var(--text);
  background: var(--panel-deep);
  border-color: var(--frame);
  max-width: none;
  animation: tab-glow 900ms var(--ease-out) forwards;
  animation-delay: calc(500ms + var(--n) * 260ms);
}

.tabs .keep::before {
  width: 0.9rem;
  height: 0.9rem;
  background: url("icon-32.png") center / contain no-repeat;
}

.tabs .keep::after {
  content: none;
}

@keyframes tab-close {
  35% {
    opacity: 0.25;
    transform: translateY(5px);
  }
  100% {
    opacity: 0;
    transform: translateY(8px);
    max-width: 0;
    padding-inline: 0;
    margin-right: 0;
    border-width: 0;
  }
}

@keyframes tab-glow {
  to {
    box-shadow: 0 -6px 18px -8px var(--accent);
    color: var(--accent-strong);
  }
}

.hero h1 span {
  display: block;
  animation: rise 700ms var(--ease-out) both;
}

.hero h1 span + span {
  animation-delay: 140ms;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.4em);
  }
}

.hero .tip {
  animation: hover-in 520ms var(--ease-out) 2.1s both;
}

@keyframes hover-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
}

/* Help band */
.help {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.help p {
  color: var(--muted);
  margin: 0.5rem 0 0;
  max-width: 42rem;
}

@media (max-width: 56rem) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-block: 2.5rem 3.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tabs li:not(.keep) {
    display: none;
  }

  .tabs li,
  .hero h1 span,
  .hero .tip {
    animation: none;
  }
}
