/* The hub: the sims' landing-page look (panels with a hairline and a soft
   shadow, display-face headings) around one card per sim. */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  min-height: 100vh;
  padding: 72px 24px 40px;
  background:
    radial-gradient(70% 45% at 50% -8%, rgba(168, 50, 60, 0.10), transparent 70%),
    var(--ground);
  color: var(--bone);
  font-family: var(--font-ui);
  line-height: 1.5;
}
.page { max-width: 1080px; margin: 0 auto; }

/* ---- Title ---- */
.hero { margin-bottom: 30px; padding: 0 4px; }
h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0.005em;
}
h1 em { font-style: normal; color: var(--blood); }
.subtitle { margin-top: 8px; color: var(--dim); font-size: 0.95rem; }

/* ---- The panel ---- */
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 50% at 50% 0%, rgba(168, 50, 60, 0.06), transparent 70%),
    var(--panel-solid);
  box-shadow: var(--shadow);
}
.panel-head {
  padding: 22px 22px 14px;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1;
}
.panel-body { padding: 0 22px 22px; }

/* ---- Sims: one card each ---- */
.sims {
  display: grid;
  /* auto-fit: one sim is a full-width banner, more share the row */
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 16px;
}
.sim {
  --aura: #d6d0c6;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(214, 208, 198, 0.022);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
  animation: rise 0.45s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
a.sim:hover, a.sim:focus-visible {
  outline: none;
  background: rgba(214, 208, 198, 0.045);
  border-color: color-mix(in srgb, var(--aura) 40%, var(--line));
  transform: translateY(-2px);
}

/* The stage: the sim's bosses side by side in its aura; a narrow card
   shows only its lead */
.sim-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  container-type: inline-size;
  height: 250px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(#0a0809, #0f0c0d);
  overflow: hidden;
}
.sim-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(45% 70% at 50% 85%, var(--aura), transparent 72%);
  opacity: 0.25;
  transition: opacity 0.35s;
}
a.sim:is(:hover, :focus-visible) .sim-stage::before { opacity: 0.6; }
.sim-boss {
  position: relative;
  flex: none;
  margin-bottom: 10px;
  width: 224px;
  height: 224px;
  overflow: hidden;
  transform-origin: 50% 85%;
  transition: transform 0.35s cubic-bezier(.2, .8, .2, 1.2);
  /* the portrait's square frame fades into the stage, no hard edges */
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent);
  mask-image: radial-gradient(closest-side, #000 72%, transparent);
}
a.sim:is(:hover, :focus-visible) .sim-boss { transform: scale(1.06) translateY(-1px); }
@container (max-width: 720px) {
  .sim-boss:not(.is-lead) { display: none; }
}
.sim-strip {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: calc(var(--n, 1) * 100%);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  filter: saturate(0.85) brightness(0.9);
  transition: filter 0.35s;
}
@keyframes play { to { transform: translateX(-100%); } }
a.sim:is(:hover, :focus-visible) .sim-strip {
  filter: none;
  animation: play var(--ms, 1s) steps(var(--n, 1)) infinite;
}
.sim.is-soon .sim-strip { filter: brightness(0) drop-shadow(0 0 1px rgba(214, 208, 198, 0.35)); }

.sim-body { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 18px; }
.sim-name {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.1;
  color: var(--bone);
}
.sim.is-soon .sim-name { color: var(--faint); }
.sim-where {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}
.sim.is-soon .sim-where { color: var(--faint); font-family: var(--font-ui); }

/* ---- Footer ---- */
.legal {
  margin-top: 28px;
  padding: 0 4px;
  color: var(--faint);
  font-size: 0.72rem;
  line-height: 1.55;
  max-width: 60ch;
}

@media (max-width: 600px) {
  body { padding: 40px 12px 32px; }
  .panel-head { padding: 18px 16px 12px; font-size: 1.4rem; }
  .panel-body { padding: 0 12px 14px; }
}
/* Touch: no hover to reveal, so the boss plays */
@media (hover: none) {
  a.sim .sim-strip { filter: none; animation: play var(--ms, 1s) steps(var(--n, 1)) infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .sim, a.sim:hover { animation: none; transform: none; }
  .sim-strip, a.sim:is(:hover, :focus-visible) .sim-strip { animation: none !important; }
  a.sim:is(:hover, :focus-visible) .sim-boss { transform: none; }
}
