/* =====================================================================
   THE WALTER GALLERY — STYLES
   ===================================================================== */

:root {
  --bg: #f7f4ef;
  --bg-soft: #efeae1;
  --ink: #1f1c18;
  --ink-soft: #5a554d;
  --line: #d9d2c5;
  --accent: #8a6d3b;
  --accent-dark: #6b5328;
  --shadow: 0 6px 28px rgba(31, 28, 24, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink);
}

a {
  color: var(--accent-dark);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
a:hover { border-bottom-color: var(--accent-dark); }

button {
  font-family: inherit;
  cursor: pointer;
}

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

/* ---------- Password Gate ---------- */
.gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2a241d 0%, #423629 100%);
  padding: 24px;
}

.gate-card {
  background: var(--bg);
  padding: 56px 48px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
}

.gate-card h1 {
  font-size: 38px;
  margin-bottom: 8px;
}

.gate-card .tagline {
  font-style: italic;
  color: var(--ink-soft);
  margin-bottom: 36px;
  font-size: 15px;
}

.gate-card label {
  display: block;
  text-align: left;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.gate-card input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  font-family: inherit;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  margin-bottom: 16px;
  outline: none;
  transition: border-color 0.2s ease;
}
.gate-card input:focus { border-color: var(--accent); }

.gate-card button {
  width: 100%;
  padding: 14px;
  background: var(--ink);
  color: var(--bg);
  border: none;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background 0.2s ease;
}
.gate-card button:hover { background: var(--accent-dark); }

.gate-error {
  color: #b03030;
  font-size: 14px;
  margin-top: 12px;
  min-height: 20px;
}

.gate-hint {
  margin-top: 24px;
  font-size: 12px;
  color: var(--ink-soft);
  font-style: italic;
}

/* ---------- App Shell ---------- */
.app { display: none; }
.app.active { display: block; }

.nav {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(150%) blur(8px);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 32px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.nav-brand {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 26px;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  color: var(--ink);
}
.nav-links { display: flex; gap: 32px; align-items: baseline; }
.nav-links button {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav-links button:hover,
.nav-links button.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* ---------- Pages ---------- */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 32px 96px;
  display: none;
}
.page.active { display: block; }

.crumbs {
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.06em;
  margin-bottom: 32px;
}
.crumbs button {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0;
  cursor: pointer;
}
.crumbs button:hover { color: var(--ink); }
.crumbs span { margin: 0 10px; }

/* ---------- Home Page ---------- */
.home-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 80px;
}
.home-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow);
}
.home-text h1 {
  font-size: 56px;
  line-height: 1.05;
  margin-bottom: 8px;
}
.home-text .subtitle {
  font-style: italic;
  color: var(--ink-soft);
  margin-bottom: 28px;
  font-size: 18px;
}
.home-text .blurb {
  font-size: 16px;
  color: var(--ink);
  white-space: pre-line;
  margin-bottom: 32px;
}
.cta-button {
  display: inline-block;
  background: var(--ink);
  color: var(--bg);
  padding: 14px 32px;
  border: none;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background 0.2s ease;
}
.cta-button:hover { background: var(--accent-dark); }

.home-stats {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 28px;
  font-size: 14px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.home-stats strong { color: var(--ink); font-weight: 600; }
.home-stats .dot { color: var(--line); }

.search-bar {
  max-width: 520px;
  margin: 0 auto 40px;
}
.search-bar input {
  width: 100%;
  padding: 14px 18px;
  font-family: inherit;
  font-size: 15px;
  background: white;
  border: 1px solid var(--line);
  outline: none;
  transition: border-color 0.2s;
}
.search-bar input:focus { border-color: var(--accent); }

@media (max-width: 800px) {
  .home-hero { grid-template-columns: 1fr; gap: 32px; }
  .home-text h1 { font-size: 40px; }
}

/* ---------- Artists Index ---------- */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-header h1 {
  font-size: 44px;
  margin-bottom: 10px;
}
.section-header p {
  color: var(--ink-soft);
  font-style: italic;
}

.artists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 40px;
}

.artist-card {
  text-align: center;
  cursor: pointer;
  transition: transform 0.25s ease;
}
.artist-card:hover { transform: translateY(-4px); }
.artist-card .photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.artist-card h3 {
  font-size: 24px;
  margin-bottom: 4px;
}
.artist-card .meta {
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

/* ---------- Artist Detail ---------- */
.artist-header {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 56px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line);
}
.artist-header .photo {
  width: 220px;
  height: 220px;
  object-fit: cover;
  box-shadow: var(--shadow);
}
.artist-header h1 {
  font-size: 42px;
  margin-bottom: 12px;
}
.artist-header .bio {
  color: var(--ink);
  font-size: 16px;
  max-width: 640px;
}

@media (max-width: 700px) {
  .artist-header { grid-template-columns: 1fr; text-align: center; }
  .artist-header .photo,
  .artist-header .artist-placeholder { margin: 0 auto; }
  .artist-header .bio { margin: 0 auto; }
}

.pieces-label {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 24px;
}

.pieces-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 36px;
}

.piece-card {
  cursor: pointer;
  transition: transform 0.25s ease;
}
.piece-card:hover { transform: translateY(-4px); }
.piece-card .image-wrap {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.piece-card .image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.piece-card:hover .image-wrap img { transform: scale(1.04); }
.piece-card h4 {
  font-size: 20px;
  font-style: italic;
  margin-bottom: 2px;
}
.piece-card .meta {
  font-size: 13px;
  color: var(--ink-soft);
}

/* ---------- Piece Detail ---------- */
.piece-detail {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: start;
}
.piece-detail .image-wrap {
  width: 100%;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}
.piece-detail .image-wrap img {
  width: 100%;
  height: auto;
}

.piece-info h1 {
  font-size: 38px;
  font-style: italic;
  margin-bottom: 6px;
}
.piece-info .by {
  color: var(--ink-soft);
  margin-bottom: 28px;
}
.piece-info .by button {
  background: none;
  border: none;
  color: var(--accent-dark);
  padding: 0;
  font-size: 16px;
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
}

.spec-list {
  margin-bottom: 28px;
  border-top: 1px solid var(--line);
}
.spec-list .spec {
  display: grid;
  grid-template-columns: 130px 1fr;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.spec-list .label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  align-self: center;
}

.piece-info .description {
  font-size: 16px;
  color: var(--ink);
  line-height: 1.7;
}

@media (max-width: 800px) {
  .piece-detail { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- Image Placeholders ---------- */
.img-placeholder {
  background: linear-gradient(135deg, #efeae1 0%, #e3dccd 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--ink-soft);
  font-family: 'Cormorant Garamond', Georgia, serif;
}
.piece-placeholder {
  width: 100%;
  height: 100%;
  aspect-ratio: 4/3;
  position: relative;
}
.piece-placeholder .placeholder-mark {
  font-size: 64px;
  font-weight: 500;
  color: var(--accent);
  opacity: 0.55;
  line-height: 1;
  margin-bottom: 12px;
}
.piece-placeholder .placeholder-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0.7;
}
.artist-placeholder {
  aspect-ratio: 1;
}
.artist-placeholder .placeholder-initials {
  font-size: 38px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.artist-card .artist-placeholder {
  width: 100%;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.artist-header .artist-placeholder {
  width: 220px;
  height: 220px;
  box-shadow: var(--shadow);
}
.artist-header .artist-placeholder .placeholder-initials {
  font-size: 64px;
}
.owner-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow);
}
.owner-placeholder .placeholder-label {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.artist-dates {
  font-style: italic;
  color: var(--ink-soft);
  margin-bottom: 16px;
  font-size: 16px;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 28px 32px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
  letter-spacing: 0.06em;
}
