/* ─────────────────────────────────────────────
   Tokens
───────────────────────────────────────────── */
:root {
  --bg:          #ffffff;
  --ink:         #1c1c1c;
  --ink-mid:     #5a5a5a;
  --ink-light:   #aaa;
  --green:       #3c5629;
  --green-hover: #2e4220;
  --panel-bg:    #ffffff;
  --border:      rgba(0,0,0,0.09);
  --header-h:    52px;
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --font-serif:  'Playfair Display', Georgia, serif;
  --font-sans:   'Quattrocento Sans', system-ui, sans-serif;
}

/* ─────────────────────────────────────────────
   Reset
───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* ─────────────────────────────────────────────
   Home / Hero
───────────────────────────────────────────── */
.page {
  position: fixed;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 500ms var(--ease);
}
.page.active {
  opacity: 1;
  pointer-events: all;
}

.page-home { background: #111; }

.hero-image-wrap { position: absolute; inset: 0; }
.hero-image {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  opacity: 0;
  transition: opacity 900ms var(--ease);
}
.hero-image.loaded { opacity: 1; }
.hero-gradient {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, transparent 25%),
    linear-gradient(to top,    rgba(0,0,0,0.55) 0%, transparent 55%);
}
.hero-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hero-hamburger {
  color: white;
  opacity: 0.85;
  font-size: 1.4rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}
.hero-hamburger:hover { opacity: 1; }
.site-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.92);
}
.hero-cta-wrap {
  position: absolute;
  bottom: 10%; left: 50%;
  transform: translateX(-50%);
}
.hero-cta {
  background: none;
  border: 1px solid rgba(255,255,255,0.55);
  color: rgba(255,255,255,0.9);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding: 0.85rem 2.8rem;
  transition: background 250ms, border-color 250ms, color 250ms;
  white-space: nowrap;
}
.hero-cta:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.9);
  color: white;
}

/* ─────────────────────────────────────────────
   Shell (main app after entering)
───────────────────────────────────────────── */
.shell {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  opacity: 0;
  transition: opacity 500ms var(--ease);
}
.shell.visible {
  opacity: 1;
  pointer-events: all;
}
.shell.hidden {
  pointer-events: none;
}

/* ─────────────────────────────────────────────
   Shell header + tabs
───────────────────────────────────────────── */
.shell-header {
  height: var(--header-h);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  z-index: 20;
  gap: 1rem;
}

.shell-logo {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: none;
  border: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.shell-logo:hover { color: var(--green); }

.shell-tabs {
  display: flex;
  gap: 0.1rem;
  align-items: center;
}
.tab-btn {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-light);
  padding: 0.4rem 0.55rem;
  white-space: nowrap;
  transition: color 200ms;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--ink-mid); }
.tab-btn.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.shell-hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--ink-mid);
  padding: 0.3rem;
  line-height: 1;
}

/* ─────────────────────────────────────────────
   Mobile nav overlay
───────────────────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}
.mobile-nav.open { display: flex; }

.mobile-nav-close {
  position: absolute;
  top: 1.2rem; right: 1.5rem;
  background: none; border: none;
  font-size: 1.2rem;
  color: var(--ink-mid);
}
.mobile-tab-btn {
  background: none; border: none;
  font-family: var(--font-serif);
  font-size: 1.7rem;
  color: var(--ink);
  transition: color 200ms;
}
.mobile-tab-btn:hover { color: var(--green); }
.mobile-tab-btn.active { color: var(--green); }

/* ─────────────────────────────────────────────
   Tab content area
───────────────────────────────────────────── */
.tab-content {
  display: none;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.tab-content.active {
  display: flex;
  flex-direction: column;
}

/* ─────────────────────────────────────────────
   Portfolio tab — gallery + product views
───────────────────────────────────────────── */
.portfolio-view {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}
.portfolio-view.active {
  display: flex;
}

/* Gallery footer slide */
.gallery-footer-slide {
  height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  width: 100%;
  padding: 0 2rem;
}
.gallery-footer-rule {
  width: 60px;
  border: none;
  border-top: 1px solid var(--ink-light);
  opacity: 0.4;
  margin: 0;
}
.gallery-footer-name {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 400;
  font-style: italic;
  color: var(--ink-light);
  letter-spacing: 0.02em;
  margin: 0;
}

/* Gallery counter */
.gallery-counter {
  position: absolute;
  bottom: 1rem;
  right: 1.2rem;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: var(--ink-light);
  pointer-events: none;
  z-index: 5;
}
#view-gallery, #view-available-gallery { position: relative; }

/* Scroll container — free fluid scroll */
.gallery-scroll {
  flex: 1;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.gallery-scroll::-webkit-scrollbar { display: none; }

/* Work slides */
.work-slide {
  height: calc(100svh - var(--header-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 1.5rem;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
}
.work-slide.visible {
  opacity: 1;
  transform: translateY(0);
}
.work-slide-image-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  cursor: pointer;
}
.work-slide-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 4px 32px rgba(0,0,0,0.12);
  transition: box-shadow 300ms var(--ease), transform 300ms var(--ease);
}
.work-slide-image:hover {
  box-shadow: 0 8px 48px rgba(0,0,0,0.18);
  transform: scale(1.005);
}
.work-slide-footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 1.1rem;
  gap: 0.2rem;
}
.work-slide-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}
.work-slide-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0.02em;
  text-align: center;
  cursor: pointer;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 200ms, border-color 200ms;
}
.work-slide-title:hover {
  color: var(--green);
  border-bottom-color: var(--green);
}
.sold-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c0392b;
  flex-shrink: 0;
}
.work-slide-year {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--ink-light);
}

/* ─────────────────────────────────────────────
   Product page (inside portfolio tab)
───────────────────────────────────────────── */
.product-bar {
  height: var(--header-h);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 0.8rem;
  border-bottom: 1px solid var(--border);
}
.product-bar-back {
  background: none; border: none;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mid);
  padding: 0.5rem;
  transition: color 200ms;
}
.product-bar-back:hover { color: var(--ink); }

.product-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.product-image-wrap {
  width: 100%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
}
.product-image {
  max-width: 100%;
  max-height: 70vw;
  object-fit: contain;
  box-shadow: 0 8px 48px rgba(0,0,0,0.14);
}
.product-info {
  padding: 2rem 1.5rem 5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.product-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
}
.product-year {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--ink-light);
  text-transform: uppercase;
}
.product-divider {
  height: 1px;
  background: var(--border);
  margin: 0.25rem 0;
}
.product-details {
  font-size: 0.85rem;
  color: var(--ink-mid);
  letter-spacing: 0.02em;
  line-height: 1.6;
}

.product-statement {
  font-size: 0.9rem;
  color: var(--ink-mid);
  line-height: 1.85;
  font-style: italic;
  border-left: 2px solid #ddd;
  padding-left: 1rem;
}
.product-statement:empty { display: none; }

.product-price-row {
  display: flex;
  align-items: baseline;
  padding: 0.5rem 0;
}
.product-price {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--ink);
}
.product-price.sold {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-style: italic;
  color: var(--ink-light);
}
.product-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Desktop: two-column product */
@media (min-width: 780px) {
  .product-layout {
    flex-direction: row;
    overflow: hidden;
  }
  .product-image-wrap {
    flex: 1 1 55%;
    padding: 3rem;
    max-height: 100%;
  }
  .product-image {
    max-height: 100%;
    max-width: 100%;
  }
  .product-info {
    flex: 0 0 380px;
    padding: 3rem 3rem 3rem 2.5rem;
    overflow-y: auto;
    border-left: 1px solid var(--border);
  }
}
@media (min-width: 1100px) {
  .product-info { flex: 0 0 420px; }
}

/* ─────────────────────────────────────────────
   Prose pages (Exhibitions etc.)
───────────────────────────────────────────── */
.prose-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
  overflow-y: auto;
}
.prose-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 1.5rem;
}
.prose-empty {
  font-size: 0.9rem;
  color: var(--ink-light);
  font-style: italic;
}

/* ─────────────────────────────────────────────
   About page
───────────────────────────────────────────── */
.about-page {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 3rem 1.5rem 5rem;
}

.about-section {
  max-width: 860px;
  margin: 0 auto 4rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 680px) {
  .about-section {
    flex-direction: row;
    align-items: flex-start;
    gap: 3rem;
  }
  .about-image-wrap {
    flex: 0 0 260px;
  }
}

.about-image-wrap img {
  width: 100%;
  object-fit: cover;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.about-text p {
  font-size: 0.95rem;
  color: var(--ink-mid);
  line-height: 1.9;
}

.about-closing {
  max-width: 860px;
  margin: 2rem auto 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}

.about-closing-image-wrap {
  width: 260px;
  flex-shrink: 0;
}

.about-closing-img {
  width: 100%;
  object-fit: cover;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

.about-closing-bio {
  font-size: 0.95rem;
  color: var(--ink-mid);
  line-height: 1.9;
}

@media (max-width: 480px) {
  .about-closing-image-wrap {
    width: 100%;
  }
}

/* ─────────────────────────────────────────────
   Contact page
───────────────────────────────────────────── */
.contact-page {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 3rem 1.5rem 5rem;
}

.contact-section {
  max-width: 540px;
  margin: 0 auto 3rem;
}
.contact-section-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.contact-section-sub {
  font-size: 0.85rem;
  color: var(--ink-light);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.contact-divider {
  max-width: 540px;
  margin: 0 auto 3rem;
  height: 1px;
  background: var(--border);
}

/* Newsletter row */
.newsletter-row {
  display: flex;
  gap: 0.6rem;
}
.newsletter-row .form-input {
  flex: 1;
}
.btn-subscribe {
  background: var(--green);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.7rem 1.4rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 200ms;
  flex-shrink: 0;
}
.btn-subscribe:hover { background: var(--green-hover); }

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.form-label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mid);
}
.form-input {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--ink);
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.7rem 0.9rem;
  outline: none;
  width: 100%;
  transition: border-color 200ms;
}
.form-input:focus { border-color: var(--green); }
.form-textarea { resize: vertical; min-height: 120px; }

/* ─────────────────────────────────────────────
   Cart sheet
───────────────────────────────────────────── */
.cart-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 60;
  background: var(--panel-bg);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 52px rgba(0,0,0,0.16);
  transform: translateY(100%);
  transition: transform 420ms var(--ease);
  max-height: 92svh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.cart-sheet.open { transform: translateY(0); }

.cart-sheet-inner {
  padding: 0 1.5rem 3rem;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}
.cart-sheet-inner::before {
  content: '';
  display: block;
  width: 36px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 1rem auto 1.5rem;
}
.cart-close {
  position: absolute;
  top: 0.8rem; right: 0.8rem;
  background: none; border: none;
  font-size: 1rem;
  color: var(--ink-light);
  padding: 0.4rem;
  line-height: 1;
  transition: color 200ms;
}
.cart-close:hover { color: var(--ink); }

.cart-heading {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 1.4rem;
}
.cart-item {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}
.cart-item-thumb {
  width: 64px; height: 64px;
  object-fit: cover;
  flex-shrink: 0;
  background: #ffffff;
}
.cart-item-info { flex: 1; }
.cart-item-title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--ink);
}
.cart-item-meta {
  font-size: 0.75rem;
  color: var(--ink-light);
  margin-top: 0.2rem;
  line-height: 1.5;
}
.cart-item-price {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--ink);
  flex-shrink: 0;
}
.cart-lines {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}
.cart-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--ink-mid);
}
.cart-line.total {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--ink);
  padding-top: 0.7rem;
  border-top: 1px solid var(--border);
  margin-top: 0.3rem;
}
.cart-shipping-note {
  font-size: 0.72rem;
  color: var(--ink-light);
  font-style: italic;
  margin-bottom: 1.5rem;
}
.cart-actions {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.apple-pay-wrap { min-height: 0; }

@media (min-width: 768px) {
  .cart-sheet {
    left: auto;
    max-width: 420px;
    border-radius: 18px 18px 0 0;
  }
}

/* ─────────────────────────────────────────────
   Buttons
───────────────────────────────────────────── */
.btn-primary,
.btn-checkout,
.btn-add-to-cart {
  display: block;
  width: 100%;
  padding: 1rem;
  background: var(--green);
  color: white;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: none;
  border-radius: 4px;
  text-align: center;
  transition: background 200ms var(--ease);
}
.btn-primary:hover,
.btn-checkout:hover,
.btn-add-to-cart:hover { background: var(--green-hover); }
.btn-checkout:disabled {
  background: var(--ink-light);
  cursor: not-allowed;
}

.btn-continue,
.btn-inquire {
  display: block;
  width: 100%;
  padding: 0.9rem;
  background: none;
  color: var(--ink-mid);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  border-radius: 4px;
  text-align: center;
  transition: border-color 200ms, color 200ms;
}
.btn-continue:hover,
.btn-inquire:hover {
  border-color: var(--ink-mid);
  color: var(--ink);
}

/* ─────────────────────────────────────────────
   Dimmer
───────────────────────────────────────────── */
.dimmer {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 350ms var(--ease);
}
.dimmer.active {
  opacity: 1;
  pointer-events: all;
}

/* ─────────────────────────────────────────────
   Toast
───────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--green);
  color: white;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  padding: 0.85rem 1.8rem;
  border-radius: 4px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  z-index: 200;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 300ms var(--ease), transform 300ms var(--ease);
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─────────────────────────────────────────────
   Exhibitions
───────────────────────────────────────────── */
.exhibition {
  padding-top: 1.5rem;
  max-width: 600px;
}

.exhibition-header {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
}

.exhibition-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.exhibition-dates {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-light);
}

.exhibition-venue {
  font-size: 0.82rem;
  color: var(--ink-mid);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.exhibition-body {
  font-size: 0.92rem;
  color: var(--ink-mid);
  line-height: 1.9;
  margin-bottom: 1rem;
}

.exhibition-reception {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin-top: 1.5rem;
}

/* ─────────────────────────────────────────────
   Mobile responsive
───────────────────────────────────────────── */
@media (max-width: 640px) {
  .shell-tabs { display: none; }
  .shell-hamburger { display: block; }
  .about-page,
  .contact-page { padding: 2rem 1rem 4rem; }
}
