:root {
  --bg: #f8f6f1;
  --paper: #fffdfa;
  --text: #25211d;
  --muted: #6d645b;
  --line: #ded7cc;
  --accent: #6c4f35;
  --accent-dark: #42301f;
  --sold: #504944;
  --max: 1240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.6;
}

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

a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.logo {
  font-size: 1.38rem;
  letter-spacing: 0.03em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
}

.nav a:hover { text-decoration: underline; }

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 38px 26px 70px;
}

.hero {
  display: grid;
  grid-template-columns: 0.84fr 1.16fr;
  gap: 46px;
  align-items: center;
  margin: 12px 0 46px;
}

.hero h1 {
  font-size: clamp(2.15rem, 4vw, 3.55rem);
  line-height: 1.06;
  margin: 0 0 18px;
  font-weight: normal;
}

.hero p {
  font-size: 1.11rem;
  color: var(--muted);
  margin: 0 0 22px;
}

.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button,
.form-button {
  display: inline-block;
  padding: 11px 18px;
  border: 1px solid var(--accent);
  color: var(--paper);
  background: var(--accent);
  text-decoration: none;
  border-radius: 2px;
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
}

.button.secondary {
  color: var(--accent-dark);
  background: transparent;
}

.button:hover,
.form-button:hover {
  filter: brightness(0.96);
}

.featured-image,
.painting-main-image,
.about-image {
  border: 1px solid var(--line);
  background: #eee8dd;
  box-shadow: 0 12px 34px rgba(0,0,0,0.09);
}

.featured-caption {
  color: var(--muted);
  font-size: 1.02rem;
  margin-top: 9px;
  text-align: center;
}

.intro-line {
  max-width: 820px;
  color: var(--muted);
  margin: -14px 0 28px;
  font-size: 1.06rem;
}

.section-heading,
.page-title h1 {
  margin: 0 0 22px;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.12;
  font-weight: normal;
}

.page-title {
  max-width: 860px;
  margin-bottom: 32px;
}

.page-title p {
  color: var(--muted);
  font-size: 1.1rem;
}

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

.painting-card {
  background: var(--paper);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.painting-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.09);
}

.painting-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  border-bottom: 1px solid var(--line);
}

.card-text {
  padding: 15px 16px 18px;
}

.card-text h2 {
  font-size: 1.18rem;
  line-height: 1.25;
  margin: 0 0 6px;
  font-weight: normal;
}

.card-text p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.96rem;
}

.price-line {
  color: var(--text);
  font-size: 1rem;
  margin: 0 0 8px;
  font-weight: bold;
}

.status-badge {
  display: inline-block;
  font-size: 0.88rem;
  color: var(--paper);
  background: var(--accent);
  padding: 2px 8px;
  margin-right: 6px;
  border-radius: 2px;
}

.status-badge.sold {
  background: var(--sold);
}

.view-details {
  color: var(--accent-dark);
  font-size: 0.92rem;
  font-style: italic;
}

.painting-page {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(330px, 0.78fr);
  gap: 34px;
  align-items: start;
}

.painting-info {
  background: rgba(255, 253, 250, 0.78);
  border-left: 1px solid var(--line);
  padding: 18px 0 18px 30px;
}

.painting-info h1 {
  font-size: clamp(2rem, 3.7vw, 2.75rem);
  line-height: 1.12;
  font-weight: normal;
  margin: 0 0 10px;
}

.meta {
  color: var(--muted);
  margin-bottom: 16px;
}

.detail-price {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 12px 14px;
  margin: 18px 0 20px;
}

.detail-price p { margin: 0; }

.availability {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 18px;
}

.email-fallback {
  color: var(--muted);
  font-size: 0.98rem;
  margin: 12px 0 18px;
}

.form-panel,
.contact-card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 22px;
  margin-top: 20px;
}

.form-panel h2,
.contact-card h2 {
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  line-height: 1.15;
  font-weight: normal;
  margin: 0 0 12px;
}

.form-row { margin-bottom: 14px; }

label {
  display: block;
  margin-bottom: 5px;
  color: var(--text);
}

input,
textarea {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

.hidden-field {
  position: absolute;
  overflow: hidden;
  clip: rect(0 0 0 0);
  height: 1px;
  width: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
}

.form-note {
  color: var(--muted);
  font-size: 0.95rem;
}

.content-section,
.content-narrow {
  max-width: 820px;
}

.content-section {
  border-top: 1px solid var(--line);
  margin-top: 58px;
  padding-top: 36px;
}

.content-section h2,
.content-narrow h1,
.about-text h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
  font-weight: normal;
  margin: 0 0 12px;
}

.content-section p,
.content-narrow p,
.about-text p {
  font-size: 1.07rem;
}

.home-contact {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 24px;
  max-width: 820px;
  margin-top: 58px;
}

.home-contact h2 {
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  line-height: 1.15;
  font-weight: normal;
  margin: 0 0 10px;
}

.about-page {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 38px;
  align-items: start;
}

.about-image-caption {
  margin-top: 9px;
  color: var(--muted);
  text-align: center;
  font-size: 0.96rem;
}

.contact-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 22px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 30px 22px;
  color: var(--muted);
  text-align: center;
}

.footer-link { color: var(--muted); }

.small-link { font-size: 0.96rem; }

@media (max-width: 900px) {
  .hero,
  .painting-page,
  .about-page {
    grid-template-columns: 1fr;
  }

  .painting-info {
    border-left: none;
    border-top: 1px solid var(--line);
    padding: 24px 0 0;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .header-inner { display: block; }

  .nav {
    justify-content: flex-start;
    margin-top: 10px;
  }
}

@media (max-width: 560px) {
  main { padding: 24px 16px 48px; }

  .header-inner { padding: 15px 16px; }

  .gallery-grid { grid-template-columns: 1fr; }

  .button,
  .form-button {
    width: 100%;
    text-align: center;
  }
}

.about-contact {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 18px 20px;
  margin-top: 24px;
}

.about-contact h2 {
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  line-height: 1.15;
  font-weight: normal;
  margin: 0 0 10px;
}

.about-contact p {
  margin: 8px 0;
}


/* v9 correction: make the About page portrait display at a useful size. */
.about-page > div:first-child {
  max-width: 420px;
}

.about-image {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.about-image-caption {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}


/* v10 correction: better portrait source and slightly larger display. */
.about-page > div:first-child {
  max-width: 420px;
}

.about-image {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.about-image-caption {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}


.price-separator {
  color: var(--muted);
  margin: 0 4px;
}

.detail-price p {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}


/* v11 contact polish */
.contact-card > p {
  margin: 8px 0;
}

.about-contact a,
.contact-card a {
  word-break: break-word;
}


/* v13 painting image lightbox and zoom viewer */
.image-enlarge-note {
  margin-top: 10px;
  font-size: 0.95rem;
  color: var(--muted);
  text-align: center;
}

.painting-main-image[data-lightbox="painting"] {
  cursor: zoom-in;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(20, 16, 12, 0.94);
  z-index: 9999;
  padding: 20px;
}

.lightbox-overlay.is-open {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
}

.lightbox-toolbar {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lightbox-btn {
  font: inherit;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.12);
  color: #fff;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.lightbox-btn:hover,
.lightbox-btn:focus {
  background: rgba(255,255,255,0.22);
}

.lightbox-stage {
  overflow: auto;
  display: grid;
  place-items: center;
  min-height: 0;
}

.lightbox-image {
  max-width: 96vw;
  max-height: 78vh;
  transform-origin: center center;
  transition: transform 120ms ease;
  box-shadow: 0 20px 70px rgba(0,0,0,0.55);
}

.lightbox-caption {
  color: rgba(255,255,255,0.82);
  text-align: center;
  margin: 0;
  font-size: 0.95rem;
}

@media (max-width: 700px) {
  .lightbox-overlay {
    padding: 12px;
  }

  .lightbox-image {
    max-height: 72vh;
  }

  .lightbox-caption {
    font-size: 0.85rem;
  }
}
