/* Shared storefront styles. Edit in core/, then `npm run sync`.
   Per-site colours/fonts come from site.config.js (theme), and anything else
   can be overridden in each site's custom.css. */

:root {
  --bg: #ffffff;
  --surface: #f5f5f4;
  --text: #111111;
  --muted: #6b6b6b;
  --accent: #111111;
  --accent-text: #ffffff;
  --border: #e4e4e2;
  --radius: 10px;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: var(--font-body);
  --max-width: 1200px;
}

* { box-sizing: border-box; }

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

h1, h2, h3 { font-family: var(--font-heading); line-height: 1.15; margin: 0 0 .5em; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }

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

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 14px max(16px, calc((100% - var(--max-width)) / 2));
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.brand { text-decoration: none; font-family: var(--font-heading); font-weight: 700; font-size: 1.35rem; letter-spacing: .02em; }
.brand img { max-height: 44px; width: auto; }

.nav { display: flex; flex-wrap: wrap; gap: 4px 18px; flex: 1; }
.nav a { text-decoration: none; color: var(--muted); font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--text); border-bottom-color: var(--accent); }

.nav-toggle { display: none; background: none; border: 0; font-size: 1.4rem; padding: 4px 8px; }

/* ---------- layout ---------- */

.main { max-width: var(--max-width); margin: 0 auto; padding: 24px 16px 64px; min-height: 60vh; }
.page-head { padding: 16px 0 24px; }
.loading, .empty { padding: 48px 0; text-align: center; }

.hero {
  margin: 0 0 32px; border-radius: var(--radius); overflow: hidden;
  background: var(--surface) var(--hero-image, none) center / cover no-repeat;
  min-height: 280px; display: flex; align-items: flex-end;
}
.hero:not([style]) { min-height: 0; }
.hero-inner { padding: 32px; max-width: 640px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
.hero p { font-size: 1.1rem; margin: 0; }
.hero[style] .hero-inner { color: #fff; text-shadow: 0 1px 12px rgba(0,0,0,.5); }

.footer {
  border-top: 1px solid var(--border);
  padding: 24px max(16px, calc((100% - var(--max-width)) / 2));
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
}

/* ---------- product grid ---------- */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; }
.card { text-decoration: none; display: block; }
.card-img {
  position: relative; aspect-ratio: 1; background: var(--surface);
  border-radius: var(--radius); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-img img { transform: scale(1.04); }
@media (hover: hover) and (pointer: fine) { .card-img:has(img[data-zoom]) { cursor: zoom-in; } }
.card-img.zooming img { transition: transform .25s ease-out; }
.card-body { padding: 10px 2px 0; }
.card-title { margin: 0; font-weight: 500; }
.card-price { margin: 2px 0 0; color: var(--muted); }
.badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--accent); color: var(--accent-text);
  font-size: .75rem; padding: 3px 8px; border-radius: 999px;
}

/* ---------- product page ---------- */

.back-link { display: inline-block; margin-bottom: 16px; color: var(--muted); text-decoration: none; }
.product { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.gallery-main { background: var(--surface); border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-main.zoomable { cursor: zoom-in; }
.gallery-main.zoomable img { transition: transform .25s ease-out; will-change: transform; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumb { width: 72px; height: 72px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: var(--surface); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active { border-color: var(--accent); }

.product-info h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.product-price { font-size: 1.25rem; margin: 0 0 20px; }
.option { margin-bottom: 16px; }
.option-name { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.option-values { display: flex; flex-wrap: wrap; gap: 8px; }
.option-value { border: 1px solid var(--border); background: var(--bg); border-radius: 8px; padding: 8px 14px; min-width: 48px; }
.option-value:hover { border-color: var(--text); }
.option-value.active { border-color: var(--accent); background: var(--accent); color: var(--accent-text); }
.option-value.unavailable:not(.active) { opacity: .45; text-decoration: line-through; }
.description { margin-top: 28px; color: var(--text); }
.description img { height: auto; }
/* Descriptions pasted into Shopify often carry fixed text colours (dark grey for a white theme); use the site's colours instead. */
.description [style*="color"] { color: inherit !important; }
.description [style*="background"] { background: transparent !important; }
.status { min-height: 1.5em; margin: 8px 0 0; }

/* ---------- buttons ---------- */

.button {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--accent); border-radius: var(--radius);
  padding: 14px 22px; text-decoration: none; font-weight: 600;
  background: none;
}
.button-primary { background: var(--accent); color: var(--accent-text); }
.button-block { width: 100%; margin-top: 8px; }
.button:disabled, .button.disabled { opacity: .45; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; text-decoration: underline; color: var(--muted); }

.error { white-space: pre-wrap; background: var(--surface); padding: 12px; border-radius: 8px; font-size: .8rem; overflow-x: auto; }

/* ---------- menu dropdowns ---------- */

.nav { align-items: center; }
.nav-item { position: relative; display: flex; } /* flex like the plain links, so all menu items line up */
.nav-parent::after { content: "▾"; font-size: .7em; margin-left: 5px; }
.nav-dropdown {
  position: absolute; top: 100%; left: -14px; z-index: 30; min-width: 200px;
  display: none; flex-direction: column; padding: 8px 0;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
}
.nav-dropdown a { padding: 8px 16px; border-bottom: 0; white-space: nowrap; }
.nav-dropdown a.active { border-bottom-color: transparent; color: var(--accent); }
.nav-item.open .nav-dropdown { display: flex; }
@media (hover: hover) and (min-width: 761px) {
  .nav-item:hover .nav-dropdown { display: flex; }
}

.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* ---------- shop category & project filter pills ---------- */

.shop-cats, .filter-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 28px; }
.shop-cats a, .filter-pills button {
  text-decoration: none; font-size: .85rem; padding: 6px 14px; background: none;
  border: 1px solid var(--border); border-radius: 999px; color: var(--muted);
}
.shop-cats a:hover, .filter-pills button:hover { color: var(--text); border-color: var(--text); }
.shop-cats a.active, .filter-pills button.active { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.block-title + .filter-pills { margin-top: 16px; }

/* ---------- project cards ---------- */

.projects { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 32px 24px; }
.project-card { display: block; text-decoration: none; }
.project-card[hidden] { display: none; }
.project-img { aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.project-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.project-card:hover .project-img img { transform: scale(1.04); }
.project-body { padding: 14px 2px 0; }
.project-body h3 { font-size: 1.15rem; margin: 0 0 6px; }
.project-body p { margin: 0 0 10px; font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.project-types { display: flex; flex-wrap: wrap; gap: 6px; }
.project-site { margin: 10px 0 0; font-size: .85rem; color: var(--text); font-weight: 600; }
.project-types span { font-size: .75rem; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; }
.block.project-back { margin-bottom: 8px; }
.post-date { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.block-postHeader { margin-bottom: 40px; }
.block-postHeader h1 { margin-bottom: 14px; }

/* ---------- content blocks (blocks.js) ---------- */

.block { margin: 0 0 64px; }
.block-title { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 8px; }
.block-intro { color: var(--muted); max-width: 720px; margin: 0 0 24px; }
.block-title + .tiles, .block-title + .videos, .block-title + .grid, .block-title + .gallery-grid, .block-title + .features { margin-top: 20px; }

.prose { max-width: 760px; }
.prose.center { margin: 0 auto; text-align: center; }
.prose h1 { font-size: clamp(2rem, 5vw, 3rem); }
.prose .project-meta { margin: -.25em 0 1.25em; }
.prose p, .prose li { color: var(--text); }
.prose img { border-radius: var(--radius); height: auto; margin: 16px 0; }
.prose a:not(.button) { color: var(--accent); }

.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.buttons.center { justify-content: center; }
.text-link { color: var(--accent); text-decoration: none; font-weight: 500; }
.text-link:hover { text-decoration: underline; }

.hero-block {
  position: relative; display: flex; align-items: flex-end; overflow: hidden;
  min-height: 60vh; padding: 48px 32px; border-radius: var(--radius);
  background: var(--surface) var(--hero-image, none) center / cover no-repeat;
}
.hero-block[style]::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.7), rgba(0,0,0,.1) 60%); }
.hero-block.center { align-items: center; justify-content: center; text-align: center; }
.hero-full { min-height: calc(100vh - 140px); }
.hero-short { min-height: 32vh; }
/* height: "image" keeps the banner at its image's own shape (set ratio: "width / height"). On narrower screens it sizes to its text instead. */
.hero-image { min-height: 0; aspect-ratio: var(--hero-ratio, 16 / 9); padding-top: 24px; padding-bottom: 24px; }
@media (max-width: 900px) { .hero-block.hero-image { aspect-ratio: auto; min-height: 0; } }
.hero-block-inner { position: relative; max-width: 820px; }
.hero-block h1 { font-size: clamp(2.2rem, 6vw, 4.2rem); margin-bottom: 12px; }
.hero-block p { font-size: clamp(1rem, 2vw, 1.25rem); margin: 0; }
.hero-block[style] .hero-block-inner { color: #fff; }
.hero-logo { width: min(720px, 90%); margin: 0 auto 28px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
.split.reverse .split-media { order: 2; }
.split-media img { width: 100%; border-radius: var(--radius); }
/* Keep the text beside a photo to a comfortable column (roughly a third of a wide page), so it wraps
   over several lines instead of running in one long line, and give its buttons room to breathe. */
.split-text { max-width: 500px; justify-self: center; }   /* a readable column, centred in its half of the row */
.split-text .buttons, .prose + .buttons { margin-top: 32px; }

.tiles { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 20px; }
.tile {
  position: relative; display: block; overflow: hidden; border-radius: var(--radius);
  aspect-ratio: 4 / 3; background: var(--surface); text-decoration: none; color: #fff;
}
.tiles-square .tile { aspect-ratio: 1; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,.35) 45%, rgba(0,0,0,0) 75%); }
.tile:hover img { transform: scale(1.05); }
.tile-text { position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 1; text-shadow: 0 1px 8px rgba(0,0,0,.6); display: flex; flex-direction: column; gap: 4px; }
.tile-title { font-family: var(--font-heading); font-size: 1.3rem; line-height: 1.2; }
.tile-sub { font-size: .95rem; opacity: .85; }
.tile-cta { font-size: .85rem; margin-top: 6px; color: var(--accent); }

.videos { display: grid; grid-template-columns: repeat(var(--cols, 2), 1fr); gap: 32px 24px; }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-cover { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; }
.video-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-play { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px; border-radius: 12px; background: rgba(0,0,0,.65); transition: background .2s; }
.video-play::after { content: ""; position: absolute; left: 27px; top: 14px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.video-cover:hover .video-play, .video-cover:focus-visible .video-play { background: #f00; }
.video-card-body { padding: 14px 2px 0; }
.video-card-body h3 { font-size: 1.15rem; margin: 0 0 6px; }
.video-card-body h3 a { text-decoration: none; }
.video-card-body p { margin: 0 0 8px; }
.video-card-body .buttons { margin-top: 12px; }
.video-caption { margin: 10px 2px 0; }

.gallery-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 16px; }
.gallery-grid figure { margin: 0; }
.gallery-grid button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.gallery-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }
.gallery-grid figcaption { color: var(--muted); font-size: .9rem; margin-top: 8px; }
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.92);
  display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out;
}
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox-close { position: absolute; top: 12px; right: 18px; background: none; border: 0; color: #fff; font-size: 2.4rem; }
.lightbox-prev, .lightbox-next {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; width: 52px; height: 52px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.45); color: #fff; font-size: 2.4rem; line-height: 1; cursor: pointer;
}
.lightbox-prev { left: 14px; }
.lightbox-next { right: 14px; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,.18); }

.features { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px 32px; }
.features li { position: relative; padding-left: 22px; }
.features li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; background: var(--accent); transform: rotate(45deg); }

.block hr { border: 0; border-top: 1px solid var(--border); }

.contact-form { display: grid; gap: 16px; max-width: 760px; margin-top: 24px; }
.contact-form label { display: grid; gap: 6px; font-size: .9rem; color: var(--muted); }
.contact-form input, .contact-form textarea {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: calc(var(--radius) / 1.5); padding: 12px 14px;
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.contact-form .button { justify-self: start; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.honeypot { position: absolute; left: -9999px; }

/* ---------- mailing list ---------- */
.signup-form { display: flex; flex-wrap: wrap; gap: 8px; max-width: 520px; margin-top: 12px; }
.signup-form input {
  flex: 1 1 200px; min-width: 0; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: calc(var(--radius) / 1.5); padding: 10px 14px;
}
.signup-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.signup-form .form-status { flex-basis: 100%; margin: 0; }
.signup-form.done input, .signup-form.done button { display: none; }
.sold-out-box { margin-top: 16px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.sold-out-box .signup-form input { background: var(--bg); }
.sold-out-title { margin: 0 0 4px; font-weight: 600; }
.sold-out-box > p.muted { margin: 0; }
.sold-out-commission { margin: 12px 0 0; }
.sold-out-commission a { color: var(--text); text-decoration: underline; }
.popup-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.popup { position: relative; width: 100%; max-width: 440px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 24px 20px; }
.popup h2 { margin: 0 0 8px; font-size: 1.4rem; padding-right: 24px; }
.popup p { margin: 0; }
.popup-sister { overflow: hidden; }
.popup-sister p + p { margin-top: 10px; }
.popup-sister p.muted { font-size: .9rem; }
.popup-sister .popup-photo { display: block; width: calc(100% + 48px); max-width: none; margin: -28px -24px 20px; aspect-ratio: 16 / 9; object-fit: cover; }
.popup-sister .popup-close { z-index: 1; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.popup-sister .buttons { margin-top: 22px; flex-direction: column; gap: 10px; }
.popup-sister .button { width: 100%; }
.popup .signup-form input { background: var(--bg); }
.popup-close { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: var(--muted); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.popup-code { font-size: 1.1em; letter-spacing: .05em; user-select: all; }

@media (max-width: 1000px) and (min-width: 761px) {
  .projects { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- mobile ---------- */

@media (max-width: 760px) {
  .site-header { flex-wrap: wrap; gap: 12px; }
  .nav-toggle { display: block; order: 2; }
  .brand { flex: 1; }
  .nav { display: none; order: 4; flex-basis: 100%; flex-direction: column; gap: 0; }
  .nav a { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .nav-open .nav { display: flex; }
  .product { grid-template-columns: 1fr; gap: 24px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .hero { min-height: 200px; }
  .hero-inner { padding: 20px; }

  .nav { align-items: stretch; }
  .nav-item { display: flex; flex-direction: column; }
  .nav-parent { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .nav-dropdown { position: static; display: none; box-shadow: none; border: 0; border-radius: 0; padding: 0 0 0 16px; }
  .nav-dropdown a { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .nav-item.open .nav-dropdown { display: flex; }

  .block { margin-bottom: 44px; }
  .hero-block { min-height: 46vh; padding: 32px 20px; }
  .hero-full { min-height: 70vh; }
  .split { grid-template-columns: 1fr; gap: 24px; }
  .split.reverse .split-media { order: 0; }
  .split-text, .split.reverse .split-text { max-width: none; justify-self: stretch; }
  .tiles, .videos { grid-template-columns: 1fr; }
  .tiles-square, .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .projects { grid-template-columns: 1fr; }
  .filter-pills { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-right: 16px; scrollbar-width: none; }
  .filter-pills button { flex: none; }
  .field-row { grid-template-columns: 1fr; }
}

.shop-note { margin: 48px 0 0; padding-top: 24px; border-top: 1px solid var(--border); color: var(--muted); text-align: center; }
.shop-note a { color: var(--text); text-decoration: underline; white-space: nowrap; }
