:root {
  --bg: #0c0c10;
  --bg-elevated: #15151b;
  --border: #242430;
  --text: #e8e6e3;
  --text-dim: #9b98a3;
  --accent: #b9a6ff;
  --accent-dim: #6b5fa3;
  --radius: 2px;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ---------- Layout ---------- */

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

/* ---------- Header ---------- */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 12, 16, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.logo span {
  color: var(--accent);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.lang-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  flex-shrink: 0;
}

.lang-toggle button {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-toggle button.active {
  background: var(--accent);
  color: #15121f;
  font-weight: 600;
}

.lang-toggle button:not(.active):hover {
  color: var(--text);
}

.nav-links a {
  font-size: 0.92rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
}

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

.nav-toggle {
  display: none;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  /* A floor, not a fixed height — on a short screen (or a longer heading,
     in either language) the box grows to fit its content instead of
     clipping it. "height" alone would cap it and silently cut off
     whatever doesn't fit; min-height never does that. */
  min-height: max(480px, 86vh);
  display: flex;
  align-items: flex-end;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.85;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12,12,16,0.1) 0%, rgba(12,12,16,0.3) 55%, var(--bg) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  /* Top padding matters most in the edge case the box has just grown to
     fit a long heading with no slack left — it keeps the text from
     sitting flush against the very top edge of the photo. */
  padding: 48px 32px 64px;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin: 0 0 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  max-width: 720px;
}

.hero p {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 0 28px;
}

.hero-links {
  display: flex;
  gap: 16px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 12px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #15121f;
  border-color: var(--accent);
  font-weight: 600;
}

.btn-primary:hover {
  background: #cabaff;
  border-color: #cabaff;
}

.btn-ghost {
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Section headings ---------- */

.section {
  padding: 90px 0;
}

.section-tight {
  padding: 60px 0;
}

.section-head {
  margin-bottom: 48px;
}

.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin: 0 0 12px;
  font-weight: 600;
}

.section-head p {
  color: var(--text-dim);
  max-width: 560px;
  margin: 0;
}

/* ---------- Gallery grid ---------- */

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

.art-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.art-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-3px);
}

.art-thumb {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bg-elevated);
}

.art-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

/* Shaped canvases (round, heart...): show the whole photo, never cropped. A square canvas is the normal case and keeps the usual frame. */
.art-card[data-shape]:not([data-shape="square"]) .art-thumb img {
  object-fit: contain;
  padding: 6px;
}

.art-card:hover .art-thumb img {
  transform: scale(1.04);
}

/* UV / normal light toggle */

.uv-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: flex;
  background: rgba(12, 12, 16, 0.78);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(4px);
}

.uv-toggle button {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease, color 0.2s ease;
}

.uv-toggle button.active {
  background: var(--accent);
  color: #15121f;
  font-weight: 600;
}

.uv-toggle button:not(.active):hover {
  color: var(--text);
}

.art-info {
  padding: 16px 18px 18px;
}

.art-title {
  font-size: 0.98rem;
  font-weight: 600;
  margin: 0 0 4px;
}

.art-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.tag {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--text-dim);
}

.tag-available {
  color: #8be0b0;
  border-color: #2f5540;
}

.tag-unavailable {
  color: var(--text-dim);
  border-color: var(--border);
}

.tag-outcome {
  margin-left: 6px;
}

.tag-sold {
  color: #e0c98b;
  border-color: #554a2f;
}

.tag-collab {
  color: #8fd3d9;
  border-color: #2f5560;
}

.tag-gift {
  color: var(--accent);
  border-color: #4a3f7a;
}

.empty-note {
  color: var(--text-dim);
  font-size: 0.95rem;
  border: 1px dashed var(--border);
  padding: 28px;
  border-radius: var(--radius);
}

.gallery-grid .empty-note {
  grid-column: 1 / -1;
  margin: 0;
}

/* ---------- Category filter bar ---------- */

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.filter-btn {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-dim);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.filter-btn.active {
  background: var(--accent);
  color: #15121f;
  border-color: var(--accent);
  font-weight: 600;
}

.filter-btn:not(.active):hover {
  border-color: var(--accent-dim);
  color: var(--text);
}

/* ---------- Lightbox ---------- */

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

.lightbox.open {
  display: flex;
}

.lightbox-inner {
  max-width: 1000px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

/* The stage is a fixed-size box the photo is centred in, so rotating it
   never makes the caption and buttons jump around. js/main.js sets the
   photo's max size each time it rotates, so a turned photo always fits. */
.lightbox-stage {
  position: relative;
  width: 100%;
  height: min(66vh, 800px);
  overflow: hidden;      /* a zoomed photo stays inside its box, never over the caption */
  touch-action: pan-x pan-y; /* no page pinch-zoom here: pinching zooms the photo (see js/main.js) */
  cursor: zoom-in;
  user-select: none;
  -webkit-user-select: none;
}
.lightbox-stage.is-zoomed { cursor: grab; }
.lightbox-stage.is-zoomed.gesture { cursor: grabbing; }
/* Follow the finger/cursor directly while pinching or dragging. */
.lightbox-stage.gesture img { transition: none !important; }

.lightbox img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border: 1px solid var(--border);
  transition: transform 0.25s ease;
}

.lightbox-rotate {
  display: flex;
  gap: 10px;
}

.lightbox-rotate button,
.lightbox-share {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-dim);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}

.lightbox-rotate button:hover,
.lightbox-share:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Previous / next piece: round arrows at the left and right edge of the photo area. */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  background: rgba(8, 8, 10, 0.72);
  color: var(--text);
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.lightbox-nav:hover { color: var(--accent); border-color: var(--accent); }
.lightbox-prev { left: 4px; }
.lightbox-next { right: 4px; }

/* Video: the piece's MP4 plays in the viewer in place of the photo. */
.lightbox-video-player {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  background: #000;
  object-fit: contain;
}
.lightbox.video-on .lightbox-video-player { display: block; }
.lightbox.video-on .lightbox-stage { cursor: default; touch-action: auto; }
.lightbox.video-on .lightbox-stage img { visibility: hidden; }
/* Nothing to turn or zoom while a video is showing, and the caption text would cover the controls. */
.lightbox.video-on [data-rotate],
.lightbox.video-on .lightbox-zoom { display: none; }
.lightbox.video-on .lightbox-desc-text { display: none; }
.lightbox-video-btn.on { color: var(--accent); border-color: var(--accent); }

/* Small play badge on the thumbnail of a piece that has a video. */
.video-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(12, 12, 16, 0.78);
  color: #fff;
  pointer-events: none;
}

/* Small badge on the thumbnail of a piece with several photos: how many. */
.photo-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 9px;
  border-radius: 14px;
  background: rgba(12, 12, 16, 0.78);
  color: #fff;
  font-size: 0.72rem;
  pointer-events: none;
}

/* Description over the photo: white text with a black glow, no box. Fixed in
   place (doesn't turn or zoom with the photo) and never blocks pinch/drag. */
.lightbox-desc-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 100%;
  overflow: hidden;
  z-index: 4;
  padding: 0 18px 16px;
  text-align: center;
  white-space: pre-line;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
  line-height: 1.45;
  color: #fff;
  text-shadow:
    0 0 3px #000, 0 0 6px #000, 0 0 10px #000,
    0 0 16px rgba(0, 0, 0, 0.95), 0 0 26px rgba(0, 0, 0, 0.9);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}
.lightbox-desc-text.show { opacity: 1; visibility: visible; }

.lightbox-desc.on { color: var(--accent); border-color: var(--accent); }

/* "?" tips: a dark panel in the middle of the photo. Never blocks pinch/drag. */
.lightbox-help-text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  width: min(440px, calc(100% - 32px));
  max-height: calc(100% - 24px);
  overflow: hidden;
  padding: 14px 18px;
  background: rgba(12, 12, 16, 0.9);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.5;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}
.lightbox-help-text.show { opacity: 1; visibility: visible; }
.lightbox-help-text ul { list-style: none; margin: 0; padding: 0; }
.lightbox-help-text li { padding: 3px 0; }
.lightbox-help-text strong { color: var(--accent); font-weight: 600; }
.lightbox.video-on .lightbox-help-text { display: none; }
.lightbox.help-on .lightbox-desc-text { display: none; }
.lightbox-help.on { color: var(--accent); border-color: var(--accent); }

/* Zoom button: magnifier with a plus; shows a minus while zoomed in. */
.lightbox-zoom .icon-out { display: none; }
.lightbox-zoom.zoomed .icon-in { display: none; }
.lightbox-zoom.zoomed .icon-out { display: block; }
.lightbox-zoom.zoomed { color: var(--accent); border-color: var(--accent); }

/* Share button: shows a tick for a moment after the link has been copied. */
.lightbox-share .icon-done { display: none; }
.lightbox-share.done .icon-share { display: none; }
.lightbox-share.done .icon-done { display: block; }
.lightbox-share.done { color: var(--accent); border-color: var(--accent); }

.lightbox-caption {
  text-align: center;
}

.lightbox-caption h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.lightbox-caption p {
  color: var(--text-dim);
  font-size: 0.88rem;
  margin: 0;
}

.lightbox-uv-toggle {
  display: none;
  gap: 10px;
}

.lightbox-uv-toggle.show {
  display: flex;
}

.lightbox-uv-toggle button {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-dim);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.lightbox-uv-toggle button.active {
  background: var(--accent);
  color: #15121f;
  border-color: var(--accent);
  font-weight: 600;
}

/* Numbered buttons for a piece's extra photos (built by js/main.js). */
.lightbox-photos {
  display: none;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.lightbox-photos.show {
  display: flex;
}

.lightbox-photos button {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-dim);
  font-size: 0.78rem;
  border-radius: 50%;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.lightbox-photos button.active {
  background: var(--accent);
  color: #15121f;
  border-color: var(--accent);
  font-weight: 600;
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 10; /* above the photo, so a tap on the X is never swallowed by it */
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--text-dim);
  cursor: pointer;
  line-height: 1;
  background: rgba(8, 8, 10, 0.6);
  border-radius: 50%;
}

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

/* ---------- About / Contact content ---------- */

.prose {
  max-width: 680px;
  color: var(--text-dim);
  font-size: 1.02rem;
}

.prose p {
  margin: 0 0 20px;
}

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

/* Blog page */
.blog-intro { color: var(--text-dim); max-width: 680px; margin: 0 0 32px; }
.blog-subhead { font-size: 1.05rem; margin: 0 0 16px; color: var(--text); }
.blog-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 44px;
}
.blog-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.blog-link:hover { border-color: var(--accent-dim); transform: translateY(-2px); }
.blog-link-title { font-weight: 600; }
.blog-link-desc { color: var(--text-dim); font-size: 0.92rem; }
.blog-link-url { color: var(--accent); font-size: 0.78rem; margin-top: auto; }
.blog-entry {
  max-width: 720px;
  margin-bottom: 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.blog-photo { display: block; width: 100%; height: auto; max-height: 520px; object-fit: cover; }
.blog-body { padding: 22px 26px; }
.blog-date { color: var(--text-dim); font-size: 0.8rem; letter-spacing: 0.04em; margin-bottom: 4px; }
.blog-body h3 { margin: 0 0 12px; font-size: 1.2rem; }
.blog-body p { color: var(--text-dim); margin: 0 0 14px; overflow-wrap: anywhere; }
.blog-body p:last-child { margin-bottom: 0; }
.blog-body a { color: var(--accent); }

/* Help page */
.help-intro { color: var(--text-dim); margin: 0 0 14px; }
.help-tabs { display: flex; gap: 10px; margin-bottom: 28px; }
.help-block { margin-bottom: 26px; }
.help-block h3 { color: var(--text); font-size: 1.05rem; margin: 0 0 10px; }
.help-block ul { margin: 0; padding-left: 20px; }
.help-block li { margin-bottom: 8px; }
.help-panel[hidden] { display: none; }

.contact-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 36px;
  border-radius: var(--radius);
  max-width: 480px;
}

.contact-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.contact-card p {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin: 0 0 20px;
}

.contact-email {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 600;
  word-break: break-all;
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-note {
  color: var(--text-dim);
  font-size: 0.82rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a {
  color: var(--text-dim);
  font-size: 0.82rem;
}

.footer-links a:hover {
  color: var(--accent);
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .nav {
    padding: 18px 20px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .nav-right {
    width: 100%;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 20px;
  }
  .wrap {
    padding: 0 20px;
  }
  .hero {
    min-height: max(480px, 70vh);
  }
  .lightbox {
    padding-top: 64px;
    padding-bottom: 20px;
  }
  .lightbox-stage {
    /* leave room below the photo for the caption and the buttons */
    height: max(200px, calc(100vh - 300px));
  }
  .section {
    padding: 56px 0;
  }
}

/* Phones: no arrow buttons in the photo viewer — swiping does the job. */
@media (max-width: 640px) {
  .lightbox-nav { display: none; }
  .lightbox-desc-text { padding: 0 12px 10px; font-size: 0.9rem; }
}
