:root {
  --color-bg: #FAFAF7;
  --color-bg-alt: #F2EFE8;
  --color-text: #1F1F1F;
  --color-muted: #6B6B6B;
  --color-line: #E5E2DA;
  --color-accent: #2C5F4E;
  --color-accent-hover: #1F4738;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container-max: 1200px;
  --space-section: clamp(4rem, 3rem + 5vw, 8rem);
  --radius: 4px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
  height: auto;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* Transparent shield over painting images: blocks right-click "Save Image As" */
.image-shield {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: transparent;
  pointer-events: auto;
  cursor: default;
  -webkit-user-select: none;
  user-select: none;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 150ms ease;
}
a:hover { color: var(--color-accent-hover); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.25rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; }

.muted { color: var(--color-muted); }
.small { font-size: 0.9rem; }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--color-line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  gap: 1rem;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: 0.01em;
}
.brand:hover { color: var(--color-accent); }

.site-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.site-nav a {
  color: var(--color-text);
  font-size: 0.95rem;
  position: relative;
}
.site-nav a.active::after,
.site-nav a:hover::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--color-accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 36px;
  height: 36px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--color-text);
  margin: 0 auto;
  transition: transform 200ms ease, opacity 200ms ease;
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-line);
    padding: 1rem 1.5rem 1.5rem;
    gap: 1rem;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a.active::after,
  .site-nav a:hover::after { display: none; }
}

/* Hero */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-bg-alt);
}
.hero-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.85;
}
.hero-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: var(--space-section) 0;
  background: linear-gradient(to right, rgba(250,250,247,0.92), rgba(250,250,247,0.55) 60%, rgba(250,250,247,0));
}
.hero-title {
  max-width: 760px;
  font-size: clamp(2rem, 1.2rem + 3.2vw, 3.6rem);
  margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}
.btn:hover { background: var(--color-accent-hover); color: #fff; transform: translateY(-1px); }

.link-arrow { font-size: 0.95rem; }

/* Sections */
.intro {
  padding: var(--space-section) 1.5rem;
  max-width: 780px;
  text-align: center;
}
.intro p { font-size: 1.2rem; line-height: 1.7; }

.featured { padding-bottom: var(--space-section); }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
}

.featured-grid,
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 900px) {
  .featured-grid, .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .featured-grid, .gallery-grid { grid-template-columns: 1fr; }
}

.painting-card {
  cursor: pointer;
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 250ms ease;
  will-change: transform;
}
.painting-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    0 22px 48px -10px rgba(0, 0, 0, 0.45),
    0 10px 20px -6px rgba(0, 0, 0, 0.32);
  z-index: 2;
}
.painting-card .thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--color-bg-alt);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}
.featured-grid .painting-card .thumb {
  aspect-ratio: 1 / 1;
}
.painting-card a.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.painting-card .meta {
  padding: 1rem 1.1rem 1.2rem;
}
.painting-card .meta h3 {
  font-size: 1.2rem;
  margin: 0 0 0.25rem;
}
.painting-card .meta .price {
  font-family: var(--font-body);
  color: var(--color-accent);
  font-weight: 500;
  margin: 0.5rem 0 0;
}
.painting-card .meta .dims {
  font-size: 0.88rem;
  color: var(--color-muted);
  margin: 0;
}

.cspc {
  padding: var(--space-section) 1.5rem;
  text-align: center;
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}
.cspc h2 { margin-bottom: 1rem; }

/* Gallery / page heads */
.page-head {
  padding: clamp(3rem, 2rem + 3vw, 5rem) 1.5rem 2rem;
}
.page-head p { max-width: 640px; }

/* About */
.about { padding: clamp(3rem, 2rem + 3vw, 6rem) 1.5rem; }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(2rem, 1rem + 3vw, 4rem);
  align-items: start;
}
@media (max-width: 720px) {
  .about-grid { grid-template-columns: 1fr; }
}
.about-photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--color-bg-alt);
}
.about-photo.photo-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--color-bg-alt);
  border: 1px dashed var(--color-line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: 0.9rem;
}
.about-photo.photo-placeholder::after {
  content: 'Photo coming soon';
}

/* Contact */
.contact { padding: clamp(3rem, 2rem + 3vw, 5rem) 1.5rem; max-width: 720px; }
.contact-form {
  margin-top: 2rem;
  display: grid;
  gap: 1.25rem;
}
.contact-form label {
  display: grid;
  gap: 0.4rem;
}
.contact-form span {
  font-size: 0.9rem;
  color: var(--color-muted);
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  color: var(--color-text);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-color: var(--color-accent);
}
.contact-form button { justify-self: start; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}
.lightbox.open { display: flex; }
.lightbox-stage {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  max-width: 1200px;
  width: 100%;
  max-height: 90vh;
  background: var(--color-bg);
  border-radius: var(--radius);
  overflow: hidden;
}
.lightbox-views {
  position: relative;
  width: 100%;
  height: 100%;
  background: #111;
  overflow: hidden;
}
.lightbox-views .view {
  display: none;
  width: 100%;
  height: 100%;
}
.lightbox-views .view.active { display: block; }
.lightbox-views .view-painting img {
  width: 100%;
  height: 100%;
  max-height: 90vh;
  object-fit: contain;
  background: #000;
}
.view-room {
  position: relative;
  display: none;
  align-items: center;
  justify-content: center;
  background: #111;
}
.view-room.active { display: flex; }
.room-stage {
  position: relative;
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 1792 / 1024;
}
.room-stage .room-photo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.room-painting-overlay {
  position: absolute;
  display: block;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.4) inset,
    0 6px 16px -4px rgba(0,0,0,0.35),
    0 12px 30px -10px rgba(0,0,0,0.25);
  outline: 4px solid #2A2622;
  outline-offset: -4px;
  background: #111;
}
.room-note {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.25rem 0.6rem;
  background: rgba(255,255,255,0.85);
  border-radius: 999px;
  font-size: 0.8rem;
  pointer-events: none;
  white-space: nowrap;
}
.room-note:empty { display: none; }

.room-controls {
  display: none;
  margin: 0 0 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
  gap: 1rem;
  flex-direction: column;
}
.room-controls.show { display: flex; }
.room-control-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: space-between;
}
.room-control-row > span {
  flex-shrink: 0;
}
.room-control-row select {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  color: var(--color-text);
}
.color-swatches {
  display: flex;
  gap: 0.4rem;
}
.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--color-line);
  cursor: pointer;
  padding: 0;
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.color-swatch:hover { transform: scale(1.1); }
.color-swatch.active {
  box-shadow: 0 0 0 2px var(--color-bg), 0 0 0 4px var(--color-accent);
}

.view-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-line);
}
.view-tab {
  background: none;
  border: 0;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  color: var(--color-muted);
  font-family: var(--font-body);
  font-size: 0.9rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 150ms ease, border-color 150ms ease;
}
.view-tab:hover { color: var(--color-text); }
.view-tab.active {
  color: var(--color-text);
  border-bottom-color: var(--color-accent);
}

.lightbox-meta {
  padding: 2rem 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.lightbox-meta h3 { font-size: 1.6rem; margin-bottom: 0.25rem; }
.lightbox-meta .price {
  color: var(--color-accent);
  font-weight: 500;
  font-size: 1.1rem;
  margin: 0.5rem 0 1rem;
}
.lightbox-meta .btn { margin-top: auto; align-self: flex-start; }

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  z-index: 10;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 0;
  cursor: pointer;
  font-size: 1.6rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms ease;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,0.2); }
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }

@media (max-width: 800px) {
  .lightbox-stage {
    grid-template-columns: 1fr;
    grid-template-rows: 60vh auto;
    max-height: 95vh;
  }
  .lightbox-stage img { max-height: 60vh; }
  .lightbox-views { height: 60vh; }
  .lightbox-meta { padding: 1.25rem; }
}

/* Footer */
.site-footer {
  margin-top: var(--space-section);
  padding: 2.5rem 0;
  border-top: 1px solid var(--color-line);
  background: var(--color-bg);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0;
}
