/* Global reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Base typography and background */
:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  color: #ece1cb;
  background: #161a06;
}

body {
  margin: 0;
  background: #161a06;
}

/* Main card container */
.page {
  width: 100%;
  max-width: 500px;
  margin: 1rem auto 2rem;   /* top, left/right, bottom */
  padding: 0 0 1.5rem;      /* bottom padding for footer breathing room */
  background: #807048;
  text-align: center;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

/* Header band with sunrise image */
.page-header {
  margin: 0 0 0.5rem;
}

.header-image {
  display: block;
  width: 100%;
  height: auto;
}

/* Main content wrapper */
.main-inner {
  padding: 0 1.5rem 0;
}

/* Screen-reader only text (invisible H1) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Shared intro style for index intro and gallery subtitle */
.intro,
.page-subtitle {
  font-size: 1.15rem;
  margin: 1rem auto 0.35rem;
  max-width: 45rem;
  line-height: 1.5;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85);
}

/* Secondary intro lines */
.intro-secondary {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.7em;
  font-style: normal;
  font-weight: normal;
}

.intro-secondary-gallery {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.8em;
  font-style: normal;
  font-weight: normal;
}

/* Home page / feature page titles and subtitles */
.piece-title {
  font-size: 1.4rem;
  margin: 1rem 0 0.25rem;
}

.piece-subtitle {
  font-size: 0.9rem;
  opacity: 0.9;
  margin: 0 0 1rem;
}

/* Main artwork image */
.hero-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

/* Captions under images */
.caption {
  font-size: 0.9rem;
  color: #ece1cb;
  margin-top: 0.5rem;
}

/* Longer description block on feature pages */
.description {
  font-size: 0.95rem;
  margin: 1rem auto 0;
  text-align: left;
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  justify-items: center;
}

@media (max-width: 520px) {
  .gallery-grid {
    grid-template-columns: 1fr; /* 1 across on small screens */
  }
}

.gallery-item {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  padding: 0.75rem;
  width: 100%;
}

.gallery-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.thumb-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  margin-bottom: 0.5rem;
}

.thumb-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.thumb-caption {
  font-size: 0.8rem;
  opacity: 0.9;
  margin-top: 0.15rem;
}

/* Call-to-action row (buttons) */
.cta-row {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  grid-column: 1 / -1;  /* spans both cols when inside the gallery grid */
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  border: 1px solid #ece1cb;
  text-decoration: none;
  font-size: 0.95rem;
  transition: transform 0.08s ease-out, box-shadow 0.08s ease-out, background 0.1s;
}

.btn-primary {
  background: #ece1cb;
  color: #161a06;
  border: 1px solid #161a06;
}

.btn-secondary {
  background: transparent;
  color: #ece1cb;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

/* Links */
a:not(.btn),
a:not(.btn):visited {
  color: inherit;
}

a:hover {
  text-decoration: underline;
}

/* Footer */
.footer {
  margin-top: 2rem;
  font-size: 0.8rem;
  opacity: 0.8;
}

.footer a {
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* Feature page nav links (back to gallery / home) */
.nav-links {
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover {
  text-decoration: underline;
}

