/* V1.1.3 enhancements - extend V1.0 visual language; do not redesign */

:root {
  --v11-overlay: rgba(20, 16, 14, 0.72);
  --v11-surface: hsl(var(--card, 40 20% 98%));
  --v11-ink: hsl(var(--foreground, 20 14% 12%));
  --v11-muted: hsl(var(--muted-foreground, 25 8% 40%));
  --v11-primary: #b21e2b;
  --v11-border: hsl(var(--border, 30 10% 88%));
  --v11-radius: 1rem;
}

html {
  overflow-x: clip;
}

body {
  overflow-x: clip;
}

.v11-selected,
.v11-poster-wrap,
.v11-qr-block,
.v11-bio-extra,
.v11-page {
  font-family: "DM Sans", system-ui, sans-serif;
}

.v11-selected {
  padding: clamp(3rem, 8vw, 6rem) 0;
  background: hsl(var(--background, 40 33% 98%));
}

.v11-selected .v11-container,
.v11-poster-wrap .v11-container,
.v11-page .v11-container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

@media (min-width: 768px) {
  .v11-selected .v11-container,
  .v11-poster-wrap .v11-container,
  .v11-page .v11-container {
    width: min(1120px, calc(100% - 3rem));
  }
}

.v11-eyebrow {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: hsl(var(--secondary, 150 25% 30%));
  margin-bottom: 1rem;
}

.v11-now-showing-badge {
  display: inline-flex;
  align-items: center;
  margin: 0 0 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(178, 30, 43, 0.25);
  background: rgba(178, 30, 43, 0.08);
  color: var(--v11-primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.v11-selected h2,
.v11-bio-modal h2,
.v11-interest-modal h2,
.v11-page h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--v11-ink);
  line-height: 1.15;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.v11-divider {
  width: 5rem;
  height: 0.25rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #b21e2b, #c4a574);
  margin: 0 auto 1.5rem;
}

.v11-lead {
  color: var(--v11-muted);
  font-size: clamp(1rem, 2.4vw, 1.125rem);
  line-height: 1.7;
  max-width: 42rem;
  margin: 0 auto 3rem;
  text-align: center;
}

.v11-selected-header {
  text-align: center;
  margin-bottom: 1rem;
}

.v11-works-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
}

@media (min-width: 480px) {
  .v11-works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .v11-works-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1440px) {
  .v11-works-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.v11-work-card {
  background: hsl(var(--card, 0 0% 100%));
  border: 1px solid var(--v11-border);
  border-radius: var(--v11-radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(40, 20, 20, 0.06);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.v11-work-media {
  position: relative;
  background: #f3efe8;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 0;
  padding: 0;
  cursor: zoom-in;
  width: 100%;
}

.v11-work-media picture,
.v11-work-media img {
  width: 100%;
  height: 100%;
  display: block;
}

.v11-work-media img {
  object-fit: contain;
  transition: transform 0.4s ease;
}

.v11-work-media:hover img,
.v11-work-media:focus-visible img {
  transform: scale(1.02);
}

.v11-work-body {
  padding: 1.25rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.v11-work-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.1rem, 2.5vw, 1.25rem);
  font-weight: 600;
  margin: 0;
}

.v11-btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
  min-height: 44px;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease, color 0.2s ease,
    box-shadow 0.2s ease;
}

.v11-btn:focus-visible {
  outline: 2px solid var(--v11-primary);
  outline-offset: 2px;
}

.v11-btn-primary {
  background: var(--v11-primary);
  color: #fff;
}

.v11-btn-primary:hover {
  filter: brightness(1.05);
}

.v11-btn-primary:disabled {
  opacity: 0.7;
  cursor: wait;
}

.v11-btn-ghost {
  background: transparent;
  color: var(--v11-ink);
  border: 1px solid var(--v11-border);
}

.v11-btn-ghost:hover {
  background: rgba(178, 30, 43, 0.06);
}

.v11-btn-link {
  background: transparent;
  color: var(--v11-primary);
  padding: 0;
  min-height: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

/* About biography */
.v11-bio-extra {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
}

.v11-bio-extra .v11-btn-link {
  font-size: 1rem;
}

/* Exhibition poster */
.v11-poster-wrap {
  margin-top: 3rem;
}

.v11-poster-grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 900px) {
  .v11-poster-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }
}

.v11-poster-button {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(40, 20, 20, 0.12);
}

.v11-poster-button picture,
.v11-poster-button img {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100%;
}

.v11-poster-meta h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  margin: 0 0 0.75rem;
  overflow-wrap: anywhere;
}

.v11-poster-meta p {
  margin: 0 0 0.75rem;
  color: var(--v11-muted);
  line-height: 1.6;
}

.v11-poster-meta address {
  font-style: normal;
  color: var(--v11-ink);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.v11-poster-meta a {
  color: var(--v11-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.v11-follow-note {
  margin-top: 1.25rem;
  font-size: 0.95rem;
  color: var(--v11-muted);
}

/* QR in Follow */
.v11-qr-block {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  text-align: center;
  padding: 0 0.5rem;
}

.v11-qr-frame {
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--v11-border);
  box-shadow: 0 8px 24px rgba(40, 20, 20, 0.06);
}

.v11-qr-frame img {
  width: min(168px, 56vw);
  height: auto;
  display: block;
}

@media (min-width: 768px) {
  .v11-qr-frame img {
    width: 168px;
  }
}

.v11-qr-caption {
  color: var(--v11-muted);
  font-size: 0.95rem;
  margin: 0;
}

.v11-qr-caption a {
  color: var(--v11-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Modals / lightbox */
.v11-overlay {
  position: fixed;
  inset: 0;
  z-index: 100010;
  background: var(--v11-overlay);
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(0.75rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right))
    max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
}

.v11-overlay.v11-overlay--open {
  display: flex;
}

.v11-dialog {
  background: #fffaf6;
  color: var(--v11-ink);
  width: min(560px, 100%);
  max-height: min(92dvh, 900px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 1.25rem;
  padding: 1.25rem;
  position: relative;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

@media (min-width: 480px) {
  .v11-dialog {
    padding: 1.5rem;
  }
}

.v11-lightbox-dialog {
  width: min(920px, 100%);
  background: transparent;
  box-shadow: none;
  padding: 0;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  overflow: auto;
}

.v11-lightbox-dialog img {
  max-width: 100%;
  max-height: min(72dvh, 900px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.5rem;
  background: #111;
}

.v11-lightbox-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.v11-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  border: 1px solid var(--v11-border);
  background: #fff;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.v11-lightbox-dialog .v11-close {
  position: static;
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.92);
}

.v11-form {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.v11-field {
  display: grid;
  gap: 0.35rem;
}

.v11-field label {
  font-size: 0.9rem;
  font-weight: 600;
}

.v11-field input,
.v11-field select,
.v11-field textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--v11-border);
  border-radius: 0.75rem;
  padding: 0.75rem 0.9rem;
  font: inherit;
  font-size: 16px; /* avoid iOS zoom */
  background: #fff;
  color: inherit;
}

.v11-field textarea {
  min-height: 110px;
  resize: vertical;
}

.v11-field input:focus-visible,
.v11-field select:focus-visible,
.v11-field textarea:focus-visible {
  outline: 2px solid var(--v11-primary);
  outline-offset: 1px;
}

.v11-error {
  color: #9f1239;
  font-size: 0.8rem;
  min-height: 1em;
}

.v11-field.has-error input,
.v11-field.has-error select,
.v11-field.has-error textarea {
  border-color: #9f1239;
}

.v11-hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.v11-form-note {
  font-size: 0.8rem;
  color: var(--v11-muted);
  margin: 0;
}

.v11-form-status {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.v11-form-status.is-success {
  color: #166534;
}

.v11-form-status.is-error {
  color: #9f1239;
}

.v11-artwork-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(178, 30, 43, 0.08);
  color: var(--v11-primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Secondary pages share brand without redesigning SPA */
.v11-page {
  background: hsl(40 33% 98%);
  color: var(--v11-ink);
  min-height: 100vh;
}

.v11-page-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: rgba(252, 249, 244, 0.92);
  border-bottom: 1px solid var(--v11-border);
}

.v11-page-header-inner {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.v11-page-brand {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.25rem;
  color: inherit;
  text-decoration: none;
}

.v11-page-brand span {
  color: hsl(150 25% 30%);
}

.v11-page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  justify-content: flex-end;
}

.v11-page-nav a {
  color: var(--v11-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.v11-page-nav a:hover,
.v11-page-nav a[aria-current="page"] {
  color: var(--v11-primary);
}

.v11-page-main {
  padding: clamp(2rem, 6vw, 4rem) 0 clamp(4rem, 8vw, 6rem);
}

.v11-page-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.v11-page-prose {
  max-width: 42rem;
  margin: 0 auto 2.5rem;
  color: var(--v11-muted);
  line-height: 1.75;
}

.v11-page-prose p {
  margin: 0 0 1rem;
}

.v11-page-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .v11-page-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: start;
  }
}

.v11-page-footer {
  border-top: 1px solid var(--v11-border);
  padding: 1.5rem 0 2rem;
  text-align: center;
  color: var(--v11-muted);
  font-size: 0.9rem;
}

/* Mobile header / SPA typography safety (non-destructive) */
@media (max-width: 767px) {
  #root h1,
  #root h2 {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  #root section {
    scroll-margin-top: 5.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .v11-overlay,
  .v11-dialog,
  .v11-work-media img,
  .v11-btn {
    transition: none !important;
  }
}

body.v11-modal-open {
  overflow: hidden;
}
