/* Steve Roseman Glass — shared styles for all pages */
:root {
  --bg: #000;
  --text: #f2f2f0;
  --muted: #a8a8a4;
  --accent: #e8a36b;
  --max: 960px;
  --headline: clamp(1.5rem, 3.4vw, 2.1rem); /* home page headline + tagline */
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
}

a { color: inherit; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header / nav ---------- */
.site-header {
  border-bottom: 1px solid #222;
  padding: 22px 0 14px;
}

.site-title {
  display: block;
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  text-decoration: none;
  margin-bottom: 12px;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 26px;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* ---------- Page content ---------- */
main { padding: 36px 0 60px; }

h1, h2 {
  font-weight: 300;
  line-height: 1.25;
  margin: 0 0 20px;
}

h1 { font-size: var(--headline); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-top: 36px; }

.hero { margin: 0 0 28px; }

.hero img {
  display: block;
  width: 100%;
  height: auto;
}

.tagline {
  font-size: var(--headline); /* same as h1 */
  font-weight: 300;
  line-height: 1.25;
  margin: 0 0 32px;
}

.home-heading {
  font-size: 1.6rem; /* matches .site-title, home page only */
  letter-spacing: 0.04em;
}

.gallery-intro {
  font-size: 1.6rem; /* matches .site-title */
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.25;
  margin: 0 0 32px;
}

/* ---------- Body text (Process, About, etc.) ---------- */
.prose p {
  margin: 0 0 1.2em;
}

.prose h2 { margin: 44px 0 16px; }

.prose h2.small-heading {
  font-size: 1.35rem;
  font-weight: 400;
  margin: 36px 0 12px;
}

.prose ol,
.prose ul {
  margin: 0 0 1.4em;
  padding-left: 1.4em;
}

.prose li { margin-bottom: 0.5em; }

.prose a {
  color: var(--accent);
  text-underline-offset: 3px;
}

.prose a:hover { color: var(--text); }

.prose .closing {
  font-size: 1.3rem;
  font-weight: 300;
  margin-top: 1.6em;
}

/* ---------- Image row ---------- */
/* Photos sit side by side at the same height, each keeping its own shape
   (nothing is cropped). Each <li> carries --r = image width / height. */
.image-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 16px;
}

.image-row li {
  flex: var(--r, 1) 1 0;
  min-width: 0;
}

.image-row img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 760px) {
  .image-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
  }
}

/* ---------- Gallery page: one row per available piece ---------- */
.image-row.piece {
  margin: 0 0 40px;
  max-height: 420px;
}

.image-row.piece li {
  max-width: 420px;
}

.image-row.piece img {
  max-height: 420px;
  object-fit: contain;
}

@media (max-width: 760px) {
  .image-row.piece {
    max-height: none;
  }
  .image-row.piece li {
    max-width: none;
  }
  .image-row.piece img {
    max-height: none;
  }
}

/* ---------- Gallery page: grid of frontal thumbnails ---------- */
.gallery-grid-empty {
  display: block;
}

.muted-note {
  color: var(--muted);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 0 0 20px;
}

.tile {
  display: block;
  aspect-ratio: 4 / 3;
  background: #0a0a0a;
  border: 1px solid #1c1c1c;
  overflow: hidden;
}

.tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.tile:hover img {
  transform: scale(1.04);
  opacity: 0.92;
}

@media (max-width: 760px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* ---------- Piece detail pages ---------- */
.piece-nav {
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin: 0 0 18px;
}

.piece-nav a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.piece-nav a:hover {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.piece-nav-bottom {
  margin: 8px 0 0;
}

.piece-title {
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 400;
  margin: 0 0 28px;
}

.piece-identifier {
  margin: 10px 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  opacity: 0.6;
  text-align: right;
}

/* ---------- Site map page ---------- */
.sitemap-list,
.sitemap-list ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.sitemap-list ul {
  padding-left: 24px;
  margin-top: 8px;
}

.sitemap-list li {
  margin-bottom: 14px;
}

.sitemap-list a {
  text-decoration: underline;
  text-decoration-color: #3a3a38;
}

/* ---------- About photo ---------- */
.about-photo {
  margin: 20px 0 32px;
}

.about-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid #222;
  padding: 22px 0 40px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Lightbox (piece detail pages) ---------- */
.image-row.piece img.zoomable {
  cursor: zoom-in;
}

.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.lightbox-overlay.is-open {
  display: flex;
}

.lightbox-overlay .lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: zoom-out;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 24px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 6px 10px;
}

.lightbox-close:hover {
  color: var(--accent);
}

/* ---------- Newsletter signup (gallery page) ---------- */
.newsletter-signup {
  margin: 20px 0 32px;
}

.newsletter-signup-lead {
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
}

.newsletter-signup-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 440px;
  margin: 8px 0 0;
}

.newsletter-signup-form input[type="email"] {
  flex: 1 1 220px;
  padding: 10px 12px;
  background: #0b0906;
  border: 1px solid #3a342a;
  border-radius: 2px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}

.newsletter-signup-form input[type="email"]::placeholder {
  color: var(--muted);
}

.newsletter-signup-form input[type="submit"] {
  padding: 10px 18px;
  background: #8ec9e8;
  color: #000;
  border: 0;
  border-radius: 2px;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  font-weight: 400;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.newsletter-signup-form input[type="submit"]:hover {
  opacity: 0.85;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- "I want this piece" button ---------- */
.want-piece {
  margin: 28px 0 0;
}

.want-piece-lead {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--muted);
}

.want-piece-link {
  display: inline-block;
  padding: 12px 22px;
  background: var(--accent);
  color: #000;
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  border-radius: 2px;
  font-weight: 400;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.want-piece-link:hover {
  opacity: 0.85;
}

/* ---------- Contact form ---------- */
.contact-form {
  max-width: 520px;
  margin: 8px 0 0;
}

.piece-context {
  background: #16130d;
  border: 1px solid #2a2419;
  color: var(--text);
  padding: 12px 16px;
  margin: 0 0 24px;
  font-size: 0.95rem;
  border-radius: 2px;
}

.piece-context strong {
  color: var(--accent);
  font-weight: 400;
}

.form-field {
  margin: 0 0 20px;
}

.form-field label {
  display: block;
  margin: 0 0 6px;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}

.form-field input,
.form-field textarea {
  width: 100%;
  background: #0d0d0c;
  border: 1px solid #333;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  padding: 10px 12px;
  border-radius: 2px;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-field textarea {
  resize: vertical;
  min-height: 260px;
}

.form-honeypot {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

.piece-context {
  display: flex;
  gap: 16px;
  align-items: center;
}

.piece-context[hidden] {
  display: none;
}

.piece-context img {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

.contact-submit {
  display: inline-block;
  background: var(--accent);
  color: #000;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding: 12px 26px;
  border-radius: 2px;
  cursor: pointer;
}

.contact-submit:hover {
  opacity: 0.85;
}

.contact-submit:disabled {
  opacity: 0.5;
  cursor: default;
}

.form-status {
  margin: 16px 0 0;
  font-size: 0.95rem;
}

.form-status.success { color: #8fbf8f; }
.form-status.error { color: #d98888; }
