/* Heavy Industry Co.
   Bond paper, technical-pen ink, pencil. One family.
   To use your licensed DIN 1451, put the .woff2 in static/fonts/ and uncomment below. */

/*
@font-face {
  font-family: "DIN 1451 Mittelschrift";
  src: url("/fonts/DIN1451-Mittelschrift.woff2") format("woff2");
  font-display: swap;
}
*/

:root {
  --paper: #000;
  --ink: #e9e9e5;
  --pencil: #8b8e91;
  --rule: #2c2e30;
  --font: "DIN 1451 Mittelschrift", "DIN 1451", "D-DIN", "Overpass", "Arial Narrow", system-ui, sans-serif;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --max: 1200px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 1.0625rem; line-height: 1.45; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 20; background: var(--paper); padding: .5rem .75rem; }

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

.site-header {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  padding: 1.1rem var(--gutter);
}
.site-nav { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; font-weight: 600; }
.site-nav a { text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }

.mark {
  position: relative; display: inline-flex; align-items: center;
  padding: .45em 1.6em; border: 1.5px solid currentColor;
  font-weight: 800; font-size: .95rem; letter-spacing: .02em; line-height: 1;
  text-decoration: none; color: inherit;
}
.mark::before, .mark::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 1.5px;
  background: linear-gradient(currentColor 0 5px, transparent 5px calc(100% - 5px), currentColor calc(100% - 5px));
}
.mark::before { left: .6em; }
.mark::after { right: .6em; }
.mark-pill { border: 1.5px solid currentColor; border-radius: 999px; padding: .12em .4em .08em; margin: 0 .04em; }

.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem;
  padding: 1.5rem var(--gutter) 2rem; border-top: 2px solid var(--ink); font-size: .875rem;
}
.site-footer .contact { display: flex; gap: 1.25rem; }

/* ---------- hero: the panorama at full width, never cropped ---------- */

.hero { background: #000; }
.hero-img { width: 100%; }

/* ---------- sections ---------- */

.section { max-width: var(--max); margin: 0 auto; padding: 3.5rem var(--gutter) 4rem; }
.section + .section { border-top: 2px solid var(--ink); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.section-title {
  margin: 0; font-size: clamp(2.25rem, 7vw, 4.25rem); font-weight: 800;
  line-height: .95; letter-spacing: -.01em; text-transform: uppercase;
}
.handle { font-weight: 600; }

/* ---------- instagram feed: the profile grid ---------- */

.feed {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
}
.tile {
  position: relative; display: block; width: 100%; padding: 0; border: 0;
  background: var(--rule); aspect-ratio: 1; cursor: pointer; overflow: hidden;
}
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile:hover img { opacity: .85; }
.tile:focus-visible { outline-offset: -3px; }
.badge {
  position: absolute; top: .5rem; right: .5rem; width: 1.35rem; height: 1.35rem;
  color: #fff; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6));
}
.badge svg { width: 100%; height: 100%; }
.feed-empty { margin: 0; font-size: 1.125rem; }
.more {
  display: block; margin: 1.5rem auto 0; padding: .65rem 1.25rem;
  background: none; border: 2px solid var(--ink); font-weight: 800; cursor: pointer;
}
.more:hover { background: var(--ink); color: var(--paper); }

/* ---------- gallery: set like a photo book ----------
   One piece per page, lots of black around it, a small caption and folio. */

.book { list-style: none; margin: 0; padding: 0; counter-reset: folio; }
.page {
  counter-increment: folio;
  min-height: 92svh;
  display: grid; grid-template-rows: 1fr auto; gap: 1.25rem;
  padding: clamp(2.5rem, 8vh, 6rem) 0 clamp(1.5rem, 4vh, 2.5rem);
}
.page + .page { border-top: 1px solid var(--rule); }
.work {
  display: grid; place-items: center; width: 100%; padding: 0; border: 0;
  background: none; cursor: zoom-in;
}
.work img { max-height: 74svh; width: auto; max-width: min(100%, 1000px); }
.plate {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  max-width: 1000px; width: 100%; margin: 0 auto;
  font-size: .8125rem; letter-spacing: .04em; color: var(--pencil);
}
.plate-title { color: var(--ink); text-transform: uppercase; font-weight: 600; }
.plate::after { content: counter(folio, decimal-leading-zero); font-variant-numeric: tabular-nums; }
.work:hover + .plate .plate-title { text-decoration: underline; }
@media (min-width: 900px) {
  .page:nth-child(even) .work img { justify-self: end; }
  .page:nth-child(odd) .work img { justify-self: start; }
  .page:first-child .work img { justify-self: center; }
}

/* ---------- shop ---------- */

.shop-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.product img { width: 100%; margin-bottom: 1rem; }
.product h3 { margin: 0 0 .4rem; font-size: 1.35rem; font-weight: 800; line-height: 1.1; text-transform: uppercase; }
.product p { margin: 0 0 .6rem; max-width: 45ch; }
.price { font-size: 1.25rem; font-weight: 800; }
.status { color: var(--pencil); }
.buy { display: inline-block; padding: .6rem 1.2rem; border: 2px solid var(--ink); font-weight: 800; text-decoration: none; }
.buy:hover, .buy:focus-visible { background: var(--ink); color: var(--paper); }

/* ---------- about ---------- */

.about-text p {
  margin: 0 0 .45em; max-width: 22ch;
  font-size: clamp(1.75rem, 5vw, 3.25rem); font-weight: 800; line-height: 1.05; letter-spacing: -.01em;
}
.notfound { font-size: 1.25rem; }

/* ---------- viewer: carousel in a full-screen dialog ---------- */

.viewer {
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #000; color: #ecede9;
  display: none; grid-template-rows: auto 1fr auto;
}
.viewer[open] { display: grid; }
.viewer::backdrop { background: #000; }
.viewer-top { display: flex; justify-content: space-between; align-items: center; padding: .9rem var(--gutter); }
.viewer-count { font-weight: 600; font-variant-numeric: tabular-nums; }
.viewer-close { background: none; border: 1.5px solid currentColor; padding: .4rem .9rem; font-weight: 800; cursor: pointer; }
.viewer :focus-visible { outline-color: #fff; }
.viewer-stage { position: relative; min-height: 0; }
.viewer-track {
  list-style: none; margin: 0; padding: 0; height: 100%;
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.viewer-track::-webkit-scrollbar { display: none; }
.viewer-track li { flex: 0 0 100%; height: 100%; scroll-snap-align: center; display: grid; place-items: center; padding: 0 var(--gutter); }
.viewer-track img, .viewer-track video { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-nav {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 2;
  width: 2.75rem; height: 2.75rem; padding: .55rem; border: 0; cursor: pointer;
  background: rgba(0, 0, 0, .55); color: #fff;
}
.viewer-nav svg { width: 100%; height: 100%; display: block; }
.viewer-nav.prev { left: .5rem; }
.viewer-nav.next { right: .5rem; }
.viewer-nav[disabled] { opacity: .25; cursor: default; }
.viewer-info { padding: .9rem var(--gutter) 1.25rem; max-height: 32vh; overflow-y: auto; }
.viewer-caption { margin: 0 0 .5rem; max-width: 60ch; white-space: pre-line; }
.viewer-caption:empty { display: none; }
.viewer-meta { margin: 0; font-size: .875rem; color: #9a9da0; display: flex; gap: 1rem; flex-wrap: wrap; }
.viewer-meta a { color: #ecede9; }
.viewer.single .viewer-nav, .viewer.single .viewer-count { visibility: hidden; }

@media (max-width: 600px) {
  .feed { margin-inline: calc(-1 * var(--gutter)); gap: 2px; }
  .viewer-nav { display: none; }
}
