:root {
  color-scheme: dark;
  --black: #050506;
  --panel: #0b0b0d;
  --panel-high: #121216;
  --red: #e11132;
  --red-hot: #ff526c;
  --red-dim: #941027;
  --white: #f3f1f2;
  --muted: #989398;
  --line: rgba(225, 17, 50, 0.28);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--black);
  color: var(--white);
  font: 16px/1.45 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
  padding:
    max(1.1rem, env(safe-area-inset-top))
    max(1rem, env(safe-area-inset-right))
    max(2.25rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
}

body::before,
.atmosphere {
  position: fixed;
  inset: -30vmax;
  pointer-events: none;
  content: "";
}

body::before {
  z-index: 0;
  background:
    radial-gradient(ellipse at 24% 34%, #17171b 0%, #0c0c0f 24%, #050506 52%),
    radial-gradient(ellipse at 72% 58%, #141418 0%, #09090b 28%, #050506 58%),
    radial-gradient(ellipse at 48% 82%, #101014 0%, #08080a 24%, #050506 54%);
  filter: blur(34px);
  animation: mineral-drift 24s ease-in-out infinite alternate;
}

.atmosphere {
  z-index: 0;
  opacity: 0.55;
  background: conic-gradient(from 110deg at 50% 50%, #050506, #17171b, #08080a 22%, #111115, #050506 52%);
  filter: blur(70px);
  animation: slow-turn 52s linear infinite;
}

.shell {
  position: relative;
  z-index: 2;
  width: min(100%, 30rem);
  margin: 0 auto;
}

.landing {
  min-height: calc(100dvh - 3.35rem);
  display: flex;
  flex-direction: column;
}

.landing .stack {
  margin-block: auto;
  padding-bottom: 8vh;
}

.mast {
  min-height: 3rem;
  margin-bottom: 1.3rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.8rem;
}

.eyebrow,
.edition {
  color: var(--red-dim);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.landing .eyebrow { grid-column: 1 / 3; }
.edition { text-align: right; }

.back {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--red-hot);
  background: rgba(12, 12, 15, 0.76);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.stack {
  display: grid;
  gap: 0.78rem;
}

.card {
  position: relative;
  min-height: 5.65rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.05rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  background:
    linear-gradient(180deg, #151519, #09090b) padding-box,
    linear-gradient(110deg, #790c20, #d80f31, #ff526c, #b90d2b, #790c20) border-box;
  background-position: 0 0, 100% 50%;
  background-size: 100% 100%, 320% 100%;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42), 0 0 18px rgba(225, 17, 50, 0.11), inset 0 1px rgba(255, 82, 108, 0.035);
  color: var(--white);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  animation: border-shimmer 3.2s linear infinite;
  transition: transform 200ms cubic-bezier(.2,.8,.2,1), border-color 200ms ease, box-shadow 200ms ease;
}

.card::after {
  position: absolute;
  inset: 0;
  content: "";
  width: 14%;
  left: -18%;
  right: auto;
  background: linear-gradient(90deg, #790c20, #ff526c, #b90d2b);
  opacity: 0.13;
  transform: translateX(0);
  transition: transform 650ms cubic-bezier(.2,.8,.2,1);
}

.hero-card { min-height: 6.7rem; }

.glyph {
  position: relative;
  z-index: 1;
  width: 3.3rem;
  height: 3.3rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(225, 17, 50, 0.25);
  border-radius: 1rem;
  background: #08080a;
  color: var(--red);
  box-shadow: inset 0 0 22px rgba(255, 30, 65, 0.075);
}

.glyph svg {
  width: 1.75rem;
  height: 1.75rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
}

.numeral {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.sigil {
  color: var(--red-hot);
  font-family: Georgia, serif;
  font-size: 1.45rem;
  text-shadow: 0 0 18px rgba(225, 17, 50, 0.38);
}

.index {
  position: relative;
  z-index: 1;
  margin-left: auto;
  color: var(--red-dim);
  font: 700 0.65rem/1 ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.12em;
}

.card-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: block;
}

.name {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.sub {
  display: block;
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.arrow {
  position: relative;
  z-index: 1;
  margin-left: auto;
  color: var(--red-dim);
  font-size: 1rem;
  transition: color 180ms ease, transform 180ms ease;
}

@media (hover: hover) {
  .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 56px rgba(0, 0, 0, 0.48), 0 0 18px rgba(225, 17, 50, 0.3), 0 0 42px rgba(148, 16, 39, 0.18);
  }
  .card:hover::after { transform: translateX(900%); }
  .card:hover .arrow { color: var(--red-hot); transform: translate(2px, -2px); }
  .back:hover { transform: translateX(-2px); border-color: rgba(225, 17, 50, 0.48); }
}

.card:active { transform: scale(0.985); }
.card:focus-visible,
.back:focus-visible { outline: 2px solid var(--red-hot); outline-offset: 3px; }

@keyframes mineral-drift {
  0% { transform: translate3d(-5%, -3%, 0) scale(0.94) rotate(-4deg); }
  45% { transform: translate3d(6%, 4%, 0) scale(1.06) rotate(3deg); }
  100% { transform: translate3d(-1%, 8%, 0) scale(1.01) rotate(8deg); }
}

@keyframes slow-turn {
  to { transform: rotate(360deg) scale(1.06); }
}

@keyframes border-shimmer {
  from { background-position: 0 0, 100% 50%; }
  to { background-position: 0 0, -220% 50%; }
}

@media (max-width: 380px) {
  .card { padding-inline: 0.85rem; gap: 0.8rem; }
  .glyph { width: 3rem; height: 3rem; }
  .name { font-size: 1.16rem; }
  .sub { max-width: 14rem; }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  .atmosphere { animation: none; }
  .card,
  .card::after,
  .arrow,
  .back { transition: none; }
  .card { animation: none; }
}
