/* =====================================================================
   PLOTNUA · PREMIUM SUPPLIER GALLERY · v1
   Design approved by founder 30 Oct 2026 (prototype v0.2). First page:
   discovery-garden-retreat.html, built by atlas-tools/build-supplier-gallery.py.
   v0.1 30 Oct 2026, design approved by founder 30 Oct 2026.
   v0.2 30 Oct 2026: focused featured card, larger imagery, typographic
        directory entries, per-Discovery headings (wording only).
   v1.2 31 Oct 2026: unified supplier section (headline figures, makers'
        websites row, explorer continuation heading); preview, not deployed.
   ---------------------------------------------------------------------
   One component, per-Discovery data. Everything is scoped to .pn-sg, so
   the file is inert on any page that does not carry the component. Uses
   the site's --p4-* identity tokens with literal fallbacks.

   IMAGE RULE: supplier images are shown WHOLE and UNALTERED (OGNYX and
   Irish Sauna Company grants). Each sits in a fixed-shape "mount" with a
   narrow mat: object-fit:contain, never cover; the image is never rounded,
   filtered, scaled on hover or overlaid. The mount's shape comes from the
   builder (--sg-mount-ratio), chosen so the featured images are as large
   as possible without losing a pixel.

   Motion: one 3px card lift on fine pointers only; nothing under
   prefers-reduced-motion. Carousel is native scroll-snap (no library).
   ===================================================================== */

.pn-sg{
  --sg-canvas:var(--p4-anth,#1B1C1E);
  --sg-card:var(--p4-deep,#2C2E30);
  --sg-mount:var(--p4-well,#2D2E31);
  --sg-ivory:var(--p4-ivory,#F2EBE0);
  --sg-lime:var(--p4-lime,#E7DED0);
  --sg-stone:var(--p4-stone,#C2BDB5);
  --sg-bronze:var(--p4-bronze-text,#B39272);
  --sg-terra:var(--p4-terra-text,#CF8566);
  --sg-line:var(--p4-line,#3A3B3E);
  --sg-line2:var(--p4-line2,#4A4B4F);
  --sg-serif:var(--p4-serif,'Instrument Serif',Georgia,serif);
  --sg-sans:var(--p4-sans,'Hanken Grotesk',system-ui,sans-serif);
  --sg-r:24px;
  --sg-gap:clamp(16px,1.8vw,28px);
  --sg-edge:1px solid rgba(194,189,181,.06);
  --sg-shadow:0 1px 2px rgba(0,0,0,.18),0 30px 60px -34px rgba(0,0,0,.7);
  --sg-shadow-hi:0 1px 2px rgba(0,0,0,.2),0 40px 80px -36px rgba(0,0,0,.8);
  --sg-max:1240px;
  --sg-pad-x:clamp(16px,3vw,40px);
  --sg-mat:10px;                       /* narrow mat: keeps the card's rounded corner off the photograph */
  --sg-inner:clamp(20px,1.8vw,28px);   /* card text inset */
  background:var(--sg-canvas);
  color:var(--sg-lime);
  font-family:var(--sg-sans);
  padding:clamp(56px,8vw,128px) 0 clamp(56px,7vw,112px);
  scroll-margin-top:96px;
  overflow:hidden;               /* the track bleeds right; nothing else may */
}
.pn-sg *, .pn-sg *::before, .pn-sg *::after{ box-sizing:border-box; }
/* Inside a Discovery's .article column the gallery stays in the column, so its
   content lines up with the page's own text by construction. The JS measures
   the distance from the column to the right edge of the window (--sg-bleed-r)
   and lets the track run out to that edge, as approved. Without JS the track
   simply stays inside the column. */
.article > .pn-sg{ overflow:visible; }
.article > .pn-sg .pn-sg-wrap{ max-width:none; padding:0; }
.article > .pn-sg .pn-sg-track{ padding-inline-start:0; scroll-padding-inline-start:0;
  margin-right:calc(-1 * var(--sg-bleed-r, 0px)); }
body:has(.article > .pn-sg){ overflow-x:clip; }   /* belt and braces: never a horizontal page scroll */
/* the next section brings its own top spacing */
.pn-sg:has(+ .article-section), .pn-sg:has(+ script + .article-section){ padding-bottom:0; }
.pn-sg-vh{ position:absolute; inline-size:1px; block-size:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.pn-sg-wrap{ max-width:var(--sg-max); margin:0 auto; padding:0 var(--sg-pad-x); }

/* ---- head ------------------------------------------------------------- */
.pn-sg-head{ display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:24px 40px; margin:0 0 clamp(28px,3.5vw,48px); }
.pn-sg-kicker{ display:block; font:700 12px/1.2 var(--sg-sans); letter-spacing:.18em; text-transform:uppercase; color:var(--sg-bronze); margin:0 0 18px; }
.pn-sg-h2{ font:400 clamp(36px,4.4vw,64px)/1.02 var(--sg-serif); letter-spacing:-.015em; color:var(--sg-ivory); margin:0; text-wrap:balance; }
.pn-sg-intro{ font-size:clamp(18px,1.4vw,21px); line-height:1.55; color:var(--sg-ivory); margin:18px 0 0; max-width:640px; }
.pn-sg-note{ font-size:15px; line-height:1.6; color:var(--sg-stone); margin:12px 0 0; max-width:640px; }
.pn-sg-controls{ display:flex; align-items:center; gap:12px; }

.pn-sg-arrow{ inline-size:48px; block-size:48px; border-radius:50%; border:1px solid var(--sg-line2); background:transparent; color:var(--sg-ivory);
  display:inline-grid; place-items:center; cursor:pointer; padding:0; transition:border-color .2s, color .2s, opacity .2s; }
.pn-sg-arrow svg{ inline-size:18px; block-size:18px; }
.pn-sg-arrow:hover:not(:disabled){ border-color:var(--sg-terra); color:var(--sg-terra); }
.pn-sg-arrow:disabled{ opacity:.32; cursor:default; }
.pn-sg-arrow[hidden]{ display:none; }

.pn-sg-all{ font:600 16px/1 var(--sg-sans); color:var(--sg-ivory); background:transparent; border:0; border-bottom:1px solid var(--sg-terra);
  padding:14px 0 6px; margin-left:12px; cursor:pointer; white-space:nowrap; }
.pn-sg-all:hover{ color:var(--sg-terra); }
/* v1.1: "View all" as an in-page link (directory mode "explorer"): same look as the button,
   without the page's own link underline */
.pn-sg .pn-sg-controls a.pn-sg-all, .pn-sg .pn-sg-card--end a.pn-sg-all{ display:inline-block; text-decoration:none; color:var(--sg-ivory); }
.pn-sg .pn-sg-controls a.pn-sg-all:hover, .pn-sg .pn-sg-card--end a.pn-sg-all:hover{ color:var(--sg-terra); }

.pn-sg :is(a,button):focus-visible, .pn-sg-track:focus-visible{ outline:2px solid var(--sg-terra); outline-offset:3px; border-radius:6px; }

/* ---- carousel track ---------------------------------------------------- */
.pn-sg-track{ list-style:none; margin:0; padding:4px var(--sg-pad-x) 48px;
  display:grid; grid-auto-flow:column; grid-auto-columns:var(--sg-card-w);
  gap:var(--sg-gap);
  --sg-card-w:calc((min(100vw, var(--sg-max)) - 2 * var(--sg-pad-x) - 2.35 * var(--sg-gap)) / 3.35);
  overflow-x:auto; overscroll-behavior-x:contain; scroll-snap-type:x mandatory; scroll-behavior:smooth;
  padding-inline-start:max(var(--sg-pad-x), calc((100vw - var(--sg-max)) / 2 + var(--sg-pad-x)));
  scroll-padding-inline-start:max(var(--sg-pad-x), calc((100vw - var(--sg-max)) / 2 + var(--sg-pad-x)));
  scrollbar-width:none; }
.pn-sg-track::-webkit-scrollbar{ display:none; }
.pn-sg-track > li{ scroll-snap-align:start; min-width:0; display:flex; }

/* ---- the mount (shared by featured cards and directory thumbnails) ---- */
/* Fixed geometry, so nothing shifts while an image loads; the whole image
   is always visible. */
.pn-sg-mount{ position:relative; aspect-ratio:var(--sg-mount-ratio, 1 / 1); min-block-size:0; overflow:hidden;
  background:var(--sg-mount); border-radius:calc(var(--sg-r) - var(--sg-mat)); }
.pn-sg-mount img{ position:absolute; inset:var(--sg-mat); inline-size:calc(100% - 2 * var(--sg-mat)); block-size:calc(100% - 2 * var(--sg-mat));
  object-fit:contain; object-position:center; display:block; }

/* ---- featured card: photograph, name, description, location, Explore -- */
.pn-sg-card{ position:relative; display:flex; flex-direction:column; inline-size:100%;
  background:var(--sg-card); border:var(--sg-edge); border-radius:var(--sg-r); box-shadow:var(--sg-shadow); overflow:hidden;
  transition:transform .3s ease, box-shadow .3s ease; }
@media (hover:hover) and (pointer:fine){
  .pn-sg-card:hover{ transform:translateY(-3px); box-shadow:var(--sg-shadow-hi); }
}
.pn-sg-fig{ margin:0; padding:var(--sg-mat) var(--sg-mat) 0; }   /* the mount sits a mat-width inside the card */
.pn-sg-card .pn-sg-mount{ --sg-mat:0px; background:transparent; border-radius:0; }   /* image fills the mount; the card is the mat. Square corners: the card's 24px curve passes outside the 10px-inset image, so no pixel is clipped */
.pn-sg-fig figcaption{ padding:0 calc(var(--sg-inner) - var(--sg-mat)); }

/* image credit + medium label: always present wherever an image appears */
.pn-sg-cap{ display:flex; justify-content:space-between; align-items:center; gap:12px; margin:6px 0 0;
  font-size:12.5px; line-height:1.4; letter-spacing:.04em; color:var(--sg-stone); }
.pn-sg-kind{ text-transform:uppercase; letter-spacing:.14em; font-weight:700; font-size:11px; color:var(--sg-bronze); }
.pn-sg-cap a{ display:inline-flex; align-items:center; min-block-size:24px; color:var(--sg-stone); text-decoration:underline;
  text-decoration-color:var(--sg-line2); text-underline-offset:4px; }
.pn-sg-cap a:hover{ color:var(--sg-ivory); text-decoration-color:var(--sg-ivory); }

.pn-sg-body{ display:flex; flex-direction:column; flex:1; padding:clamp(10px,1vw,14px) var(--sg-inner) clamp(18px,1.8vw,24px); }
.pn-sg-tags{ display:flex; flex-wrap:wrap; gap:8px; margin:0 0 10px; }
.pn-sg-tag{ font:700 11px/1 var(--sg-sans); letter-spacing:.14em; text-transform:uppercase; padding:7px 10px; border-radius:999px;
  border:1px solid var(--sg-line2); color:var(--sg-stone); }
.pn-sg-tag--sponsored{ border-color:var(--sg-bronze); color:var(--sg-bronze); }   /* RESERVED: no sponsored data exists */
.pn-sg-name{ font:400 clamp(28px,2.4vw,36px)/1.05 var(--sg-serif); letter-spacing:-.01em; color:var(--sg-ivory); margin:0; }
.pn-sg-desc{ font-size:16px; line-height:1.55; color:var(--sg-lime); margin:8px 0 0; }
.pn-sg-loc{ font-size:14.5px; line-height:1.45; color:var(--sg-lime); margin:12px 0 0; }
.pn-sg-loc b{ font-weight:700; font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--sg-bronze); margin-right:8px; }
.pn-sg-rel{ font-size:13.5px; line-height:1.5; color:var(--sg-stone); margin:12px 0 0; }
.pn-sg-cta{ margin:auto 0 0; padding-top:14px; }
.pn-sg-cta a{ display:inline-flex; align-items:center; gap:10px; min-block-size:44px; font:600 16px/1.2 var(--sg-sans);
  color:var(--sg-terra); text-decoration:none; }
.pn-sg-cta a span{ border-bottom:1px solid rgba(207,133,102,.55); padding-bottom:2px; }
.pn-sg-cta a:hover{ color:var(--sg-ivory); }
.pn-sg-cta a:hover span{ border-bottom-color:var(--sg-ivory); }
.pn-sg-cta svg{ inline-size:14px; block-size:14px; flex:none; }

/* the closing card in the carousel: an invitation, not a product */
.pn-sg-card--end{ background:transparent; box-shadow:none; border:1px solid var(--sg-line2); justify-content:flex-end; padding:clamp(24px,2.4vw,36px); }
.pn-sg-card--end:hover{ box-shadow:none; }
.pn-sg-end-n{ font:400 clamp(72px,8vw,120px)/.8 var(--sg-serif); color:var(--sg-terra); margin:0 0 18px; }
.pn-sg-end-t{ font:400 clamp(26px,2.2vw,32px)/1.1 var(--sg-serif); color:var(--sg-ivory); margin:0 0 20px; }
.pn-sg-card--end button{ align-self:flex-start; }
.pn-sg .pn-sg-card--end p.pn-sg-end-n, .pn-sg .pn-sg-card--end p.pn-sg-end-t{ font-family:var(--sg-serif); font-weight:400; }   /* outranks the Discovery identity layer's paragraph font */

/* ---- full directory (View all): an editorial index ----------------------- */
.pn-sg-grid-wrap{ margin-top:clamp(8px,1vw,16px); scroll-margin-top:96px; }   /* clear the sticky header after View all */
.pn-sg-grid-wrap > summary{ list-style:none; display:inline-block; cursor:pointer; font:600 16px/1 var(--sg-sans); color:var(--sg-ivory);
  border-bottom:1px solid var(--sg-terra); padding:14px 0 6px; }
.pn-sg-grid-wrap > summary::-webkit-details-marker{ display:none; }
.pn-sg-grid-wrap[open] > summary{ margin-bottom:8px; }
.pn-sg.is-enhanced .pn-sg-grid-wrap > summary{ display:none; }   /* with JS the header and end-card buttons drive it */
.pn-sg-grid-head{ display:flex; flex-wrap:wrap; justify-content:space-between; align-items:end; gap:12px 32px; padding:clamp(28px,3vw,40px) 0 clamp(8px,1vw,12px); border-top:1px solid var(--sg-line); }
.pn-sg-h3{ font:400 clamp(26px,2.4vw,36px)/1.1 var(--sg-serif); color:var(--sg-ivory); margin:0; outline:none; }
.pn-sg-grid{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:clamp(28px,4vw,64px); }
.pn-sg-grid > li{ display:flex; min-width:0; border-top:1px solid var(--sg-line); }
.pn-sg-grid > li:nth-child(-n+2){ border-top:0; }

.pn-sg-entry{ display:grid; grid-template-columns:clamp(112px,11vw,148px) minmax(0,1fr); gap:clamp(18px,2vw,28px); inline-size:100%; padding:clamp(22px,2.4vw,32px) 0; align-items:start; }
.pn-sg-entry.is-text{ grid-template-columns:minmax(0,1fr); }
.pn-sg-thumb{ margin:0; }
.pn-sg-thumb .pn-sg-mount{ --sg-mount-ratio:1 / 1; --sg-mat:6px; border-radius:12px; }
.pn-sg-entry .pn-sg-name{ font-size:clamp(26px,2.1vw,32px); }
.pn-sg-entry .pn-sg-desc{ font-size:15.5px; max-width:52ch; }
/* a maker without licensed imagery: the name carries the entry. A thin
   terracotta rule marks the start, the way an index entry would. No frame,
   no placeholder, no invented visual. */
.pn-sg-entry.is-text .pn-sg-entry-body{ border-left:2px solid var(--sg-terra); padding-left:clamp(18px,2vw,24px); }
.pn-sg-facts{ display:grid; gap:6px; margin:14px 0 0; }
.pn-sg-facts > div{ display:grid; grid-template-columns:7.5em minmax(0,1fr); gap:12px; font-size:14px; line-height:1.45; }
.pn-sg-facts dt{ font-weight:700; font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--sg-bronze); padding-top:2px; }
.pn-sg-facts dd{ margin:0; color:var(--sg-lime); }
.pn-sg-entry .pn-sg-cap{ justify-content:flex-start; gap:14px; margin-top:12px; }
.pn-sg-entry .pn-sg-cta{ padding-top:8px; }
.pn-sg-entry .pn-sg-cta a{ font-size:15px; }

/* ---- v1.2 UNIFIED SECTION (founder approval 31 Oct 2026, preview) ----------
   data-sg-unified: the gallery and the Maker Explorer that follows it read as ONE
   supplier section. The gallery carries the only heading, introduction and the
   headline figures; the explorer continues it under "Browse every product".
   Nothing here touches maker-explorer.css (shared, pinned) or the images. */
.pn-sg-figs{ list-style:none; margin:clamp(24px,2.6vw,32px) 0 0; padding:0; display:flex; flex-wrap:wrap;
  border-top:1px solid var(--sg-terra); max-width:760px; }
.pn-sg-figs > li{ flex:1 1 0; min-width:0; padding:16px 18px 2px 0; }
.pn-sg-figs > li + li{ padding-left:18px; border-left:1px solid var(--sg-line2); }
.pn-sg-fig{ display:block; font:400 clamp(30px,2.8vw,40px)/1 var(--sg-serif); color:var(--sg-ivory); }
.pn-sg .pn-sg-figs span.pn-sg-fig{ font-family:var(--sg-serif); font-weight:400; }   /* outranks the Discovery identity layer's span font */
.pn-sg-fig-l{ display:block; margin-top:8px; font-size:13px; line-height:1.4; color:var(--sg-stone); }

/* every maker's own website, A to Z (Garden Retreat): a quiet line under the gallery */
.pn-sg-sites{ display:flex; flex-wrap:wrap; align-items:baseline; gap:10px 28px; padding:clamp(18px,2vw,24px) 0 0;
}
.pn-sg-sites-h{ margin:0; font:700 11px/1.2 var(--sg-sans); letter-spacing:.16em; text-transform:uppercase; color:var(--sg-bronze); }
.pn-sg .pn-sg-sites ul{ list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:6px 22px; }
.pn-sg-sites li{ display:inline-flex; align-items:center; gap:10px; }
.pn-sg .pn-sg-sites a{ display:inline-flex; align-items:center; gap:7px; min-block-size:32px; font:500 15px/1.2 var(--sg-sans);
  color:var(--sg-lime); text-decoration:none; }
.pn-sg-sites a span{ border-bottom:1px solid var(--sg-line2); padding-bottom:2px; }
.pn-sg .pn-sg-sites a:hover{ color:var(--sg-terra); }
.pn-sg-sites a:hover span{ border-bottom-color:var(--sg-terra); }
.pn-sg-sites svg{ inline-size:11px; block-size:11px; flex:none; opacity:.7; }
.pn-sg-sites-rel{ font:700 10px/1 var(--sg-sans); letter-spacing:.12em; text-transform:uppercase; color:var(--sg-stone);
  border:1px solid var(--sg-line2); border-radius:999px; padding:5px 8px; }
.pn-sg[data-sg-unified] .pn-sg-track{ padding-bottom:clamp(28px,3vw,40px); }

/* the hairline between the gallery and the explorer (DISC-008 Option B rule, moved here
   from an inline <style> in v1.2; values unchanged) */
.pn-sg[data-sg-transition="rule"] ~ #explore-makers{ border-top:1px solid var(--rule, #4A4B4F); padding-top:min(72px, 8vw); }
@media (max-width:720px){ .pn-sg[data-sg-transition="rule"] ~ #explore-makers{ padding-top:44px; } }

/* the explorer as the section's continuation: a sub-heading, not a second section */
.pn-sg[data-sg-unified] ~ #explore-makers[data-mx-continuation] > .mx-cont-h{
  margin:0 0 clamp(18px,2vw,26px); font:400 clamp(28px,2.6vw,38px)/1.1 var(--p4-serif,'Instrument Serif',Georgia,serif); letter-spacing:-.01em;
  color:var(--p4-ivory,#F2EBE0); max-width:none; }
@media (max-width:720px){
  .pn-sg-figs{ flex-wrap:wrap; }
  .pn-sg-figs > li{ flex:1 1 40%; padding:14px 12px 4px 0; }
  .pn-sg-figs > li + li{ padding-left:12px; }
  .pn-sg-figs > li:nth-child(3){ border-left:0; padding-left:0; }
  .pn-sg-fig-l{ font-size:12.5px; }
  .pn-sg-sites{ flex-direction:column; gap:10px; }
  .pn-sg .pn-sg-sites a{ min-block-size:44px; font-size:16px; }
}

/* ---- responsive --------------------------------------------------------- */
@media (max-width:1024px){
  .pn-sg-track{ --sg-card-w:calc((100vw - var(--sg-pad-x) - 1.4 * var(--sg-gap)) / 2.3); }
  .pn-sg-grid{ grid-template-columns:minmax(0,1fr); }
  .pn-sg-grid > li:nth-child(2){ border-top:1px solid var(--sg-line); }
}
@media (max-width:720px){
  .pn-sg{ --sg-inner:20px; padding-top:56px; }
  .pn-sg-head{ grid-template-columns:1fr; margin-bottom:24px; }
  .pn-sg-intro{ margin-top:14px; }
  .pn-sg-controls{ justify-content:space-between; }
  .pn-sg-all{ margin-left:auto; }
  /* one prominent card, the next one visible at the edge */
  .pn-sg-track{ --sg-card-w:calc(100vw - 2 * var(--sg-pad-x) - 36px); padding-bottom:32px; }
  .pn-sg-name{ font-size:28px; }
  .pn-sg-desc{ font-size:15.5px; }
  .pn-sg-cta{ padding-top:10px; }
  /* mobile: each card fits its own content; no stretched empty band above the link */
  .pn-sg-track{ align-items:start; }
  .pn-sg-track > li{ display:block; }
  .pn-sg-cta{ margin-top:6px; }
  .pn-sg-entry{ grid-template-columns:88px minmax(0,1fr); gap:16px; padding:22px 0; }
  .pn-sg-facts > div{ grid-template-columns:6.5em minmax(0,1fr); }
  /* data-sg-fit="tight" (opt-in per Discovery; founder correction 30 Oct 2026):
     the whole image stays visible, but any spare band in the mount sits above the
     image, never between the image and its credit; and every card in the row,
     including the end card, takes the same height, with the Explore link aligned. */
  .pn-sg[data-sg-fit="tight"] .pn-sg-card .pn-sg-mount img{ object-position:center bottom; }
  .pn-sg[data-sg-fit="tight"] .pn-sg-track{ align-items:stretch; }
  .pn-sg[data-sg-fit="tight"] .pn-sg-track > li{ display:flex; }
}
@media (max-width:380px){
  .pn-sg-arrow{ inline-size:44px; block-size:44px; }
  .pn-sg-entry.has-img{ grid-template-columns:minmax(0,1fr); }
  .pn-sg-entry.has-img .pn-sg-thumb{ max-inline-size:160px; }
}
@media (prefers-reduced-motion:reduce){
  .pn-sg-track{ scroll-behavior:auto; }
  .pn-sg-card, .pn-sg-arrow{ transition:none; }
  .pn-sg-card:hover{ transform:none; }
}
@media (forced-colors:active){
  .pn-sg-card, .pn-sg-arrow, .pn-sg-tag{ border:1px solid CanvasText; }
}
