.hero {
  position: relative;
  isolation: isolate;
  background: radial-gradient(ellipse at 72% 40%, #24213d 0%, #101120 47%, #0a0b12 80%);
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  background: linear-gradient(90deg, #0a0b12 8%, #0a0b12cc 38%, #0a0b1240 79%), url("assets/path.webp") center 55% / cover no-repeat;
  opacity: .72;
  mask-image: linear-gradient(transparent 4%, #000 42%, #000 82%, transparent);
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, #0a0b1273, transparent 64%), linear-gradient(0deg, #0a0b12, transparent 23%);
}
.hero-stars { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .9; }
.hero-inner { min-height: clamp(610px, 77svh, 790px); }
.hero-copy { text-shadow: 0 2px 28px #090911; }
.hero-copy .button { text-shadow: none; }
.hero-art {
  inset: -4% -30px -3% auto;
  width: min(63%, 780px);
  transform: translate(var(--gate-x, 0), var(--gate-y, 0));
}
.hero-art::before, .hero-art::after {
  content: "";
  position: absolute;
  inset: 10% auto auto 50%;
  transform: translateX(-50%);
  width: min(90%, 600px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid #eac68e38;
}
.hero-art::after { inset-block-start: 15%; width: min(77%, 510px); border-style: dashed; border-color: #eac68e29; }
.hero-art img {
  position: relative;
  z-index: 1;
  mask-image: radial-gradient(ellipse 54% 55% at 50% 49%, #000 48%, transparent 100%);
}
.hero[data-motion="active"] .hero-art::after { animation: gate-orbit 100s linear infinite; }
@keyframes gate-orbit { to { transform: translateX(-50%) rotate(360deg); } }
.motion-control {
  position: absolute;
  z-index: 2;
  bottom: 22px;
  right: 0;
  background: #0a0b12bb;
  border: 1px solid #eac68e59;
  color: var(--gold);
  min-height: 38px;
  border-radius: 4px;
  padding: 7px 12px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.realms-section { position: relative; isolation: isolate; background: radial-gradient(ellipse at 50% 24%, #232032, #10111b 67%); }
.realms-section::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: min(600px, 100%);
  opacity: .28;
  background: url("assets/path.webp") center 42% / cover no-repeat;
  mask-image: linear-gradient(transparent, #000 37%, transparent);
}
.realm-nav { gap: clamp(8px, 1.2vw, 18px); padding: 6px 2px 3px; }
.realm-nav a {
  min-height: clamp(136px, 20vw, 242px);
  border-radius: 48% 48% 6px 6px / 27% 27% 6px 6px;
  transform: translateY(0);
  transition: transform .28s, box-shadow .28s, border-color .28s;
}
.realm-nav img {
  object-position: center 46%;
  transform: scale(1.04);
  filter: saturate(.86) brightness(.82);
  transition: filter .32s, transform .48s;
}
.realm-nav a::after {
  background: linear-gradient(180deg, #08091116 0%, transparent 45%, #080911 100%);
  box-shadow: inset 0 0 22px #08091170;
}
.realm-nav a:hover, .realm-nav a[aria-selected="true"] {
  transform: translateY(-4px);
  box-shadow: 0 7px 30px #eac68e26, inset 0 -3px var(--gold);
}
.realm-nav a:hover img, .realm-nav a[aria-selected="true"] img { filter: saturate(1.15) brightness(1.18); transform: scale(1.1); }
.realm-nav span { text-align: center; text-shadow: 0 2px 13px #000; }
.realm-detail:not([hidden]) { animation: realm-arrive .35s ease-out both; }
@keyframes realm-arrive { from { opacity: .55; transform: translateY(6px); } }
.preview-link { display: inline-flex; gap: 8px; color: var(--gold); font-size: 14px; padding: 10px 0 1px; }
.preview-link:hover { text-decoration: underline; }

.tarot-gallery {
  background: radial-gradient(ellipse at 50% 48%, #26213c 0%, #151525 52%, #0d0e18 84%);
  border-bottom: 1px solid var(--line);
}
.tarot-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 5vw, 68px);
}
.tarot-gallery-card { min-width: 0; }
.tarot-gallery-card img {
  width: min(100%, 224px);
  height: auto;
  margin-inline: auto;
  border: 1px solid #eac68e65;
  border-radius: 6px;
  box-shadow: 0 14px 42px #070810a6;
}
.tarot-gallery-card figcaption {
  margin-top: 19px;
  padding: 13px 0 0;
  border-top: 1px solid var(--line);
}
.tarot-gallery-card h3 { margin-bottom: 7px; font-size: clamp(22px, 2.5vw, 32px); }
.tarot-gallery-card h3 span { margin-left: 8px; color: var(--gold); font: 500 14px/1.4 var(--sans); }
.tarot-gallery-card p { color: var(--muted); font-size: 15px; line-height: 1.75; }

@media (max-width: 520px) {
  .tarot-gallery-grid { grid-template-columns: 1fr; gap: 22px; }
  .tarot-gallery-card { display: grid; grid-template-columns: clamp(86px, 28vw, 120px) 1fr; align-items: center; gap: 18px; }
  .tarot-gallery-card figcaption { margin-top: 0; padding-top: 0; border-top: 0; }
  .tarot-gallery-card p { font-size: 14px; }
}

@media (max-width: 1000px) {
  .hero-inner { min-height: 590px; }
}
@media (max-width: 760px) {
  .hero-inner { min-height: 579px; }
  .hero::before { background-position: center 32%; opacity: .6; }
  .hero-art { inset: 0 -18px auto; width: auto; height: 388px; }
  .hero-art::before { width: min(83%, 385px); }
  .hero-art::after { width: min(71%, 335px); }
  .hero-copy { padding-bottom: 55px; }
  .motion-control { bottom: 8px; min-height: 32px; padding: 5px 9px; }
  .realm-nav a { min-height: clamp(103px, 29vw, 210px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero[data-motion="active"] .hero-art::after, .realm-detail:not([hidden]) { animation: none; }
  .hero-art { transform: none; }
  .realm-nav a, .realm-nav img { transition: none; }
}
