/* The Katmanya wing: the map's floors and the creature pages. Builds on style.css. */

/* ---------- map ---------- */
.map-intro, .map-floors { grid-template-columns: minmax(0, 1fr); justify-items: center; align-content: start; }
.map-art { width: 100%; max-width: 980px; margin: 0; }

.map-floor-list { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 980px; display: grid; gap: 12px; }
.map-floor {
  --band: var(--paper);
  display: grid;
  grid-template-columns: 150px 4.5rem 1fr;
  align-items: start;
  gap: 0 1.2em;
  padding: 1em 1.2em;
  background: var(--band);
  border: 3px solid var(--ink);
  border-radius: 12px;
  box-shadow: var(--shadow);
  scroll-margin-top: 96px;
}
/* top to bottom: sky, town, walls, bazaar soil, castle stone, deep stone, the forge's glow */
.map-floor:nth-child(1) { --band: #CFE6F0; }
.map-floor:nth-child(2) { --band: #F6E3C4; }
.map-floor:nth-child(3) { --band: #EAD9B8; }
.map-floor:nth-child(4) { --band: #E2C79A; }
.map-floor:nth-child(5) { --band: #CDB8A2; }
.map-floor:nth-child(6) { --band: #B9A495; }
.map-floor:nth-child(7) { --band: #3A3456; color: var(--paper); }
.map-floor:target { outline: 5px solid var(--tomato); outline-offset: 4px; }
.map-floor__art { grid-row: span 2; width: 100%; height: auto; border: 3px solid var(--ink); border-radius: 8px; }
.map-floor__height { grid-row: span 2; margin: 0; font: 900 2.4rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.map-floor__places { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 0.35em 1em; }
.map-floor__places dt { font: 800 1.05rem/1.4 var(--font-display); }
.map-floor__places dd { margin: 0; }
.map-floor__stories { grid-column: 3; margin: 0.6em 0 0; font: 700 0.95rem/1.4 var(--font-display); }
.map-floor__stories a { color: inherit; text-decoration-thickness: 2px; }
.map-sea { max-width: 980px; margin: 0; }

/* ---------- creature page ---------- */
html:has(body.creature) { scroll-snap-type: none; }
.creature-hero .hero__art { width: min(100%, 520px); }
.creature-hero .hero__title { max-width: 14ch; }
.creature__concept { font: 800 1.1rem/1 var(--font-display); }

.levels { grid-template-columns: minmax(0, 1fr); justify-items: center; align-content: start; gap: 0; }
.creature-more { grid-template-columns: minmax(0, 1fr); justify-items: center; align-content: start; }
.creature-more .card { width: 100%; max-width: 46rem; transform: none; }
.creature__model { margin: 1.4em 0; }
.levels__tabs { display: flex; gap: 8px; }
.levels__tabs[hidden] { display: none; }
.levels__tab {
  font: 800 1rem/1 var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.7em 1.1em;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 10px 10px 0 0;
  cursor: pointer;
}
.levels__tab[aria-selected="true"] { color: var(--paper); }
#tab-baslangic[aria-selected="true"] { background: var(--teal); }
#tab-ileri[aria-selected="true"] { background: var(--plum); }
.levels__tab:focus-visible { outline: 3px solid var(--tomato); outline-offset: 3px; }
.levels__panel { width: 100%; max-width: 46rem; scroll-margin-top: 96px; }
.levels__panel + .levels__panel { margin-top: 28px; }
.levels--tabs .levels__panel + .levels__panel { margin-top: 0; }
.levels__panel .card { max-width: none; transform: none; }
.levels__panel h3 { margin-top: 1.2em; color: var(--tomato); }
.levels--tabs .levels__panel h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 820px) {
  .map-floor { grid-template-columns: 96px 1fr; gap: 0 0.8em; padding: 0.8em 0.9em; }
  .map-floor__art { grid-row: auto; }
  .map-floor__height { align-self: center; }
  .map-floor__places, .map-floor__stories { grid-column: 1 / -1; margin-top: 0.6em; }
  .map-floor__height { grid-row: auto; font-size: 1.8rem; }
  .map-floor__places { grid-template-columns: 1fr; gap: 0.1em; }
  .map-floor__places dd { margin-bottom: 0.5em; }
  .creature-hero .hero__art { width: 80%; justify-self: center; }
}
