/* imagingdeepsky.com — shared stylesheet for deep-zoom object pages (2026 rebuild)
   Keeps the classic look: black ground, orange accent, white/grey text. */

:root {
  --bg: #000;
  --panel: #111;
  --line: #2a2a2a;
  --text: #e6e6e6;
  --muted: #a9a9a9;
  --accent: #ff9900;
  --link: #ffffff;
  --link-hover: #ffff00;
  --max: 1400px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--link); text-decoration: underline; }
a:hover { color: var(--link-hover); }

/* ---------- site header / nav ---------- */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}
.site-nav .brand {
  font-weight: bold;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}
.site-nav li a { text-decoration: none; color: var(--text); }
.site-nav li a:hover { color: var(--link-hover); }

/* ---------- page title ---------- */
.object-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 16px 6px;
  text-align: center;
}
.object-header h1 {
  margin: 0;
  font-size: clamp(22px, 4vw, 34px);
  color: var(--accent);
  font-weight: bold;
}
.object-header .subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.95em;
}

/* ---------- deep-zoom viewer ---------- */
.viewer-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 0 6px;
}
.deepzoom {
  width: 100%;
  height: 75vh;
  min-height: 320px;
  max-height: 900px;
  background: #000;
  border: 1px solid var(--line);
  touch-action: none;          /* let OpenSeadragon own touch gestures */
  position: relative;
}
@media (min-width: 900px) {
  .deepzoom { height: 78vh; }
}
@media (max-width: 700px) {
  /* portrait phones: shorter box so the image isn't lost in black bars */
  .deepzoom { height: 58vh; min-height: 280px; }
}
/* OpenSeadragon buttons: bigger hit targets on touch screens */
@media (pointer: coarse) {
  .deepzoom .openseadragon-container .navigator ~ div img,
  .deepzoom .openseadragon-container > div:first-child img { width: 44px !important; height: 44px !important; }
}
.deepzoom .fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.deepzoom .fallback img { max-width: 100%; max-height: 100%; }
.viewer-hint {
  text-align: center;
  color: var(--accent);
  font-size: 0.85em;
  margin: 6px 12px 0;
}
.viewer-hint .touch-only { display: none; }
body.touch .viewer-hint .mouse-only { display: none; }
body.touch .viewer-hint .touch-only { display: inline; }

/* ---------- content ---------- */
.content {
  max-width: var(--max);
  margin: 0 auto;
  padding: 8px 16px 32px;
}
.details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px 28px;
  margin: 18px 0 8px;
}
.details h2 {
  font-size: 1.05em;
  color: var(--accent);
  margin: 0 0 6px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
}
.details ul { margin: 0; padding-left: 18px; }
.details li { margin: 2px 0; }

.section { margin: 26px 0; }
.section h2 {
  font-size: 1.05em;
  color: var(--accent);
  margin: 0 0 8px;
}
.section p { margin: 0 0 10px; }
.section figure { margin: 14px 0; text-align: center; }
.section figure img {
  max-width: 100%;
  height: auto;
  border: 3px solid #333;
}
.section figcaption {
  color: var(--muted);
  font-size: 0.9em;
  margin-top: 8px;
  text-align: left;
}
.credits { font-size: 0.85em; color: var(--muted); }

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  justify-content: center;
  margin: 22px 0 10px;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
}
.links a { white-space: nowrap; }

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85em;
  padding: 10px 16px 28px;
}
.site-footer img { display: block; margin: 12px auto 0; max-width: 260px; height: auto; }

/* related images grid */
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.related-grid a { display: block; text-align: center; color: var(--text); text-decoration: none; }
.related-grid img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border: 1px solid var(--line); display: block; }
.related-grid span { display: block; padding: 6px 0 0; font-size: 0.9em; }
.related-grid a:hover span { color: var(--link-hover); }
.usage { color: var(--muted); font-size: 0.85em; text-align: center; margin: 12px 0 0; }
.section img { max-width: 100%; height: auto; }
.embed { position: relative; aspect-ratio: 16 / 9; max-width: 900px; margin: 16px auto; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
