/* Harta expoziției: plain CSS, no build step. Palette shared with tools/export_map.py. */

@font-face {
  font-family: "Basier Square";
  src: url("fonts/BasierSquare-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Basier Square";
  src: url("fonts/BasierSquare-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Basier Square";
  src: url("fonts/BasierSquare-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Basier Square";
  src: url("fonts/BasierSquare-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f7f6f2;
  --ink: #1c1c1a;
  --muted: #6e6e6a;
  --subtle: #9a9a96;
  --hair: #cecdc8;
  --stone: #141413;

  --hair-15: rgb(206 205 200 / 0.15);
  --hair-30: rgb(206 205 200 / 0.3);
  --hair-40: rgb(206 205 200 / 0.4);
  --paper-4: rgb(247 246 242 / 0.04);
  --paper-6: rgb(247 246 242 / 0.06);
  --paper-8: rgb(247 246 242 / 0.08);
  --paper-25: rgb(247 246 242 / 0.25);
  --paper-70: rgb(247 246 242 / 0.7);
  --paper-80: rgb(247 246 242 / 0.8);
  --paper-90: rgb(247 246 242 / 0.9);

  --font: "Basier Square", ui-sans-serif, system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html,
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--stone);
  color: var(--paper);
}

body {
  font: 400 16px/1.5 var(--font);
}

h1,
h2,
p,
ol,
figure {
  margin: 0;
}

ol {
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* Frame ------------------------------------------------------------------ */

.app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

.header {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hair-15);
}

.header-text {
  min-width: 0;
}

.eyebrow {
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--subtle);
}

.title {
  margin-top: 2px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  letter-spacing: -0.025em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.floor-switch {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  padding: 2px;
  border: 1px solid var(--hair-30);
}

.floor-switch button {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.025em;
  color: var(--paper-80);
  transition:
    color 150ms,
    background-color 150ms;
}

.floor-switch button:hover {
  background: var(--paper-8);
  color: var(--paper);
}

.floor-switch button[aria-selected="true"] {
  background: var(--paper);
  color: var(--ink);
}

.body {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}

/* Map -------------------------------------------------------------------- */

.map-area {
  position: relative;
  order: 1;
  flex: 0 0 58%;
  min-height: 0;
}

.map-pad {
  position: absolute;
  inset: 0;
  padding: 12px;
}

.sheet {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--paper);
  box-shadow:
    0 0 0 1px var(--hair-40),
    0 24px 80px rgb(0 0 0 / 0.45);
}

.sheet svg {
  display: block;
  width: 100%;
  height: 100%;
}

.map-zoom {
  transform-origin: 0 0;
  transform-box: view-box;
  transition: transform 650ms var(--ease-out);
}

.hotspot {
  cursor: pointer;
  outline: none;
}

.hotspot .ring,
.hotspot .ring-outer {
  fill: none;
  stroke: transparent;
  stroke-width: 0;
  pointer-events: none;
  transition:
    r 150ms,
    stroke-width 150ms;
}

.hotspot.is-active:not(.is-selected) .ring {
  stroke: var(--ink);
  stroke-width: 1.35;
}

.hotspot.is-active:not(.is-selected) .ring-outer {
  stroke: var(--paper);
  stroke-width: 1.1;
}

.hotspot.is-selected .ring,
.hotspot.is-selected .ring-outer {
  display: none;
}

.marker {
  pointer-events: none;
}

.marker text {
  font-family: var(--font);
  font-weight: 500;
}

.map-pulse {
  animation: map-pulse 550ms var(--ease-out) both;
}

@keyframes map-pulse {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Detail card (overlay on the map) ---------------------------------------- */

.detail {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  max-height: 45%;
  overflow-y: auto;
  padding: 16px 20px;
  border: 1px solid var(--paper-25);
  background: var(--stone);
  box-shadow: 0 24px 64px rgb(0 0 0 / 0.6);
}

.detail[hidden],
.detail-artist[hidden],
.detail-notes[hidden] {
  display: none;
}

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.detail-text {
  min-width: 0;
}

.detail-eyebrow {
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--subtle);
}

.detail-title {
  margin-top: 6px;
  font-size: 20px;
  line-height: 28px;
  font-weight: 500;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.detail-artist {
  margin-top: 6px;
  font-style: italic;
  color: var(--paper-80);
}

.detail-notes {
  margin-top: 10px;
  max-width: 36rem;
  color: var(--paper-70);
  text-wrap: pretty;
}

.detail-close {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: -6px -8px 0 0;
  color: var(--paper-70);
  transition: color 150ms;
}

.detail-close:hover {
  color: var(--paper);
}

.detail-close svg {
  width: 20px;
  height: 20px;
}

/* Work list -------------------------------------------------------------- */

.rail {
  position: relative;
  order: 2;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  border-top: 1px solid var(--hair-15);
}

.rail-label {
  margin-bottom: 12px;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--subtle);
}

.rail-list {
  display: flex;
  flex-direction: column;
}

.rail-item {
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--hair-15);
  text-align: left;
  transition: background-color 150ms;
}

.rail-item:hover {
  background: var(--paper-4);
}

.rail-item.is-active {
  background: var(--paper-6);
}

.rail-num {
  flex-shrink: 0;
  width: 24px;
  margin-top: 2px;
  text-align: right;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--subtle);
}

.rail-item.is-active .rail-num {
  color: var(--paper);
}

.rail-text {
  min-width: 0;
  flex: 1;
}

.rail-title {
  display: block;
  font-size: 14px;
  line-height: 1.375;
  color: var(--paper-90);
}

.rail-item.is-active .rail-title {
  color: var(--paper);
}

.rail-sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  line-height: 16px;
  font-style: italic;
  color: var(--subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail-error {
  padding: 12px 4px;
  font-size: 14px;
  line-height: 20px;
  color: var(--paper-70);
}

/* Breakpoints ------------------------------------------------------------ */

@media (min-width: 640px) {
  .floor-switch button {
    padding: 0 16px;
  }
}

@media (min-width: 768px) {
  .header {
    padding: 16px 24px;
  }

  .title {
    font-size: 20px;
    line-height: 28px;
  }

  .body {
    flex-direction: row;
  }

  .map-area {
    order: 2;
    flex: 1 1 auto;
  }

  .map-pad {
    padding: 16px;
  }

  .detail {
    left: auto;
    right: 16px;
    bottom: 16px;
    width: 24rem;
    padding: 20px 24px;
  }

  .detail-title {
    font-size: 24px;
    line-height: 32px;
  }

  .rail {
    order: 1;
    flex: none;
    width: 17rem;
    border-top: 0;
    border-right: 1px solid var(--hair-15);
  }
}

@media (min-width: 1024px) {
  .map-pad {
    padding: 32px;
  }

  .detail {
    right: 32px;
    bottom: 32px;
    width: 28rem;
  }

  .detail-title {
    font-size: 30px;
    line-height: 36px;
  }

  .rail {
    width: 22rem;
    padding: 20px;
  }
}

/* Print: the sheet alone, A4 landscape ------------------------------------ */

@media print {
  @page {
    size: A4 landscape;
    margin: 0;
  }

  html,
  body {
    background: white !important;
  }

  .no-print {
    display: none !important;
  }

  .app,
  .body,
  .map-area,
  .map-pad {
    display: block;
    position: static !important;
    height: auto !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .print-sheet {
    position: static !important;
    width: 297mm !important;
    height: 210mm !important;
    margin: 0 !important;
    box-shadow: none !important;
  }

  .print-sheet svg {
    width: 297mm;
    height: 210mm;
  }

  .map-zoom {
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
