/* Arise N Shine Arts — shared base: reset, tokens, chrome, lightbox.
   Room-specific look & feel lives in each room's own stylesheet. */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body, 'Georgia', 'Times New Roman', serif);
  line-height: 1.65;
  color: var(--ink, #22201d);
  background: var(--bg, #f6f2ea);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3 {
  font-family: var(--font-display, 'Georgia', serif);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.4em;
  letter-spacing: 0.01em;
}

p {
  margin: 0 0 1em;
}

a {
  color: inherit;
}

.wrap {
  width: min(1180px, 92vw);
  margin-inline: auto;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  font-family: var(--font-body, serif);
}

/* Shared room chrome ------------------------------------------------- */
.room-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 0;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.room-nav a {
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.room-nav a:hover {
  opacity: 1;
}

.room-nav .back-link::before {
  content: '\2190\00a0';
}

.room-siblings {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.room-siblings a[aria-current='page'] {
  font-weight: 700;
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Roomier, finger-friendly top nav on phones. */
@media (max-width: 560px) {
  .room-nav {
    flex-wrap: wrap;
    gap: 0.3rem 1rem;
    padding: 1rem 0;
  }
  .room-siblings {
    gap: 0.4rem 1.2rem;
  }
  .room-siblings a,
  .room-nav .back-link {
    display: inline-block;
    padding: 0.35rem 0;
  }
}

.room-footer {
  padding: 3rem 0 4rem;
  text-align: center;
  font-size: 0.82rem;
  opacity: 0.7;
}

.room-footer a {
  color: inherit;
}

/* Visually-hidden helper for accessible labels */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

/* Work figures (defaults; rooms override spacing/frames) ------------- */
.work {
  margin: 0;
}

.work__btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  line-height: 0;
}

.work__btn:focus-visible {
  outline: 3px solid var(--focus, #c98a3a);
  outline-offset: 3px;
}

.work__img {
  width: 100%;
  height: auto;
}

.work__cap {
  display: block;
  line-height: 1.4;
}

.work__title {
  display: block;
  font-style: italic;
}

.work__meta {
  display: block;
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Shown when the works directory has no images yet. */
.empty-note {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted, #6d6252);
  font-style: italic;
  padding: clamp(2rem, 6vw, 4rem) 1rem;
  opacity: 0.85;
}

.empty-note code {
  font-style: normal;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

/* Lightbox (shared across all rooms) --------------------------------- */
body.lb-open {
  overflow: hidden;
}

.lb {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3.5rem);
  background: rgba(18, 16, 14, 0.92);
  backdrop-filter: blur(6px);
  animation: lb-fade 0.25s ease;
}

.lb[hidden] {
  display: none;
}

@keyframes lb-fade {
  from {
    opacity: 0;
  }
}

.lb__figure {
  margin: 0;
  max-width: min(1100px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.lb__img {
  max-width: 100%;
  max-height: 74vh;
  width: auto;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  background: #fff;
}

.lb__cap {
  color: #f3ece0;
  text-align: center;
  max-width: 46ch;
  font-size: 0.95rem;
}

.lb__title {
  display: block;
  font-style: italic;
  font-size: 1.25rem;
  margin-bottom: 0.15rem;
}

.lb__meta {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

.lb__note {
  display: block;
  opacity: 0.9;
}

.lb__count {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  opacity: 0.55;
}

.lb__close,
.lb__nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.lb__close {
  top: clamp(1rem, 3vw, 2rem);
  right: clamp(1rem, 3vw, 2rem);
  width: 44px;
  height: 44px;
  font-size: 1.5rem;
  line-height: 1;
}

.lb__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  font-size: 2rem;
  line-height: 1;
}

.lb__prev {
  left: clamp(0.5rem, 2vw, 2rem);
}

.lb__next {
  right: clamp(0.5rem, 2vw, 2rem);
}

.lb__close:hover,
.lb__nav:hover {
  background: rgba(255, 255, 255, 0.22);
}

.lb__nav:hover {
  transform: translateY(-50%) scale(1.06);
}

.lb__close:focus-visible,
.lb__nav:focus-visible {
  outline: 3px solid #e7c489;
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .lb__img {
    max-height: 62vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .lb {
    animation: none;
  }
}
