/* vetroal.se/korsett - egen layout ovanpa hardcopy.css. Ljusbla himmel-variant. */

:root {
  --himmel-1: #cfeaf9;
  --himmel-2: #a9d3ef;
  --himmel-3: #e9f5fd;
  --fonster: #cfe1f2;
  --fonster-inre: #f6fbff;
  --ram-ljus: #f2f9ff;
  --ram-mork: #274a6e;
  --titel-1: #1f4e79;
  --titel-2: #3a8ce8;
  --text: #142438;
  --text-dov: #46607d;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--himmel-1) 0%, var(--himmel-2) 55%, var(--himmel-3) 100%);
  background-attachment: fixed;
  color: var(--text);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 12px;
  box-sizing: border-box;
}

.wrap { width: 100%; max-width: 1040px; position: relative; z-index: 1; }

/* fonstren tonas ljusbla ovanpa hardcopy.css */
.window { background: var(--fonster); }
.window-body { background: var(--fonster-inre); color: var(--text); }

h1 { font-size: 22px; text-align: left; margin: 0 0 2px; color: var(--titel-1); }
h1 .ar { color: var(--text-dov); font-weight: normal; font-size: 16px; }
.material { margin: 0 0 2px; color: var(--text-dov); font-style: italic; }
.credit { margin: 0 0 14px; color: var(--text-dov); font-size: 12px; }

.layout { display: flex; gap: 16px; align-items: stretch; }
.viewer-panel { flex: 1 1 62%; min-width: 0; display: flex; flex-direction: column; }
.side-panel   { flex: 1 1 38%; min-width: 240px; }

#viewer-container {
  position: relative;
  width: 100%;
  height: 520px;
  background: #16222e;                 /* moerk yta bakom 3D sa aluminium laeser */
  border: 2px inset #d4d0c8;
  overflow: hidden;
}
#viewer-container canvas { display: block; }
#loading { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #cfd3d8; font-size: 13px; letter-spacing: 0.04em; }

.controls-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-top: 8px; }
.hint { font-size: 11px; color: var(--text-dov); }
.control-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.btn { font-family: inherit; font-size: 12px; padding: 3px 10px; background: #d6e6f5; border: 2px outset #f2f9ff; cursor: pointer; color: var(--titel-1); }
.btn:active { border-style: inset; }

.foto-rad { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 18px; align-items: flex-start; justify-content: center; }
.foto-rad figure { margin: 0; flex: 0 1 auto; max-width: 460px; text-align: center; }
.foto-rad img,
.foto-rad video {
  max-width: 100%;                     /* aldrig fast bredd OCH hojd ihop */
  max-height: 72vh;
  width: auto;
  height: auto;                        /* behall alltid proportioner, aldrig trycka ihop */
  display: block;
  margin: 0 auto;
  border: 2px inset #bcd6ec;
  background: #dcebf8;
}
.foto-rad figcaption { font-size: 11px; color: var(--text-dov); margin-top: 6px; line-height: 1.4; }

.sub-window { height: 100%; box-sizing: border-box; }
.beskrivning { margin: 0 0 12px; line-height: 1.5; color: var(--text); }
.beskrivning:last-child { margin-bottom: 0; }

/* diskreta moln/gnistor mot himlen */
#stars { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.star { position: absolute; width: 2px; height: 2px; background: #ffffff; border-radius: 50%; opacity: 0.35; animation: tw var(--dur, 4s) ease-in-out var(--delay, 0s) infinite; }
.star.big { width: 3px; height: 3px; }
.star.small { width: 1px; height: 1px; }
@keyframes tw { 0%,100% { opacity: 0.1; } 50% { opacity: 0.5; } }

@media (max-width: 760px) {
  .layout { flex-direction: column; }
  #viewer-container { height: 380px; }
}
