/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: #fff;
  color: #000;
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
}
a { color: #000; }
a:hover { color: #555; }
button {
  font: inherit; letter-spacing: inherit; text-transform: inherit;
  background: none; border: 0; padding: 0; color: inherit; cursor: pointer;
}
img { display: block; max-width: 100%; }
.muted { color: #6b6b6b; }
.prose { text-transform: none; letter-spacing: 0.02em; margin: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
body.no-scroll { overflow: hidden; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20; background: #fff;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 12px 24px;
}
.icon-btn { width: 44px; height: 44px; display: flex; align-items: center; }
.site-nav { display: flex; gap: 20px; font-size: 18px; flex-wrap: wrap; justify-content: center; }
.site-nav a { min-height: 44px; display: flex; align-items: center; color: #767676; text-decoration: none; }
.site-nav a[aria-current="page"], .site-nav a:hover { color: #000; }
.site-name { justify-self: end; font-size: 14px; }
.site-name[role="button"] { cursor: pointer; }
.site-name[role="button"]:hover { color: #555; }
/* White full-screen panel opened by clicking MARCO; click anywhere to close */
.name-panel { position: fixed; inset: 0; z-index: 60; background: #fff; cursor: pointer; outline: none; animation: lb-in .2s ease-out;
  display: flex; align-items: center; justify-content: center; padding: 24px; }
.name-panel[hidden] { display: none; }
/* Centered glowing line (black with a soft dark glow), with a slow soft pulse.
   2026-11-17: 30% smaller than the first version (was clamp(22px, 5.5vw, 64px)) and black instead of red. */
.name-panel-text {
  margin: 0; text-align: center; color: #000;
  font-size: clamp(15.4px, 3.85vw, 44.8px); line-height: 1.15; letter-spacing: .06em;
  text-shadow: 0 0 6px rgba(0, 0, 0, .35), 0 0 16px rgba(0, 0, 0, .25), 0 0 36px rgba(0, 0, 0, .15);
  animation: name-glow 3s ease-in-out infinite;
}
@keyframes name-glow {
  0%, 100% { text-shadow: 0 0 6px rgba(0, 0, 0, .35), 0 0 16px rgba(0, 0, 0, .25), 0 0 36px rgba(0, 0, 0, .15); }
  50%      { text-shadow: 0 0 8px rgba(0, 0, 0, .45), 0 0 22px rgba(0, 0, 0, .32), 0 0 50px rgba(0, 0, 0, .2); }
}
@media (prefers-reduced-motion: reduce) { .name-panel-text { animation: none; } }

/* Full-screen menu */
.menu {
  position: fixed; inset: 0; z-index: 40; background: #fff;
  padding: 12px 24px; display: none; flex-direction: column; gap: 48px;
}
.menu.open { display: flex; }
.menu nav { display: flex; flex-direction: column; gap: 16px; font-size: 32px; }
.menu nav a { text-decoration: none; }

@media (max-width: 600px) {
  .site-header { grid-template-columns: auto 1fr auto; gap: 8px; padding: 8px 16px; }
  .site-nav { gap: 14px; font-size: 14px; }
  .site-name { font-size: 12px; }
}
/* Phones: the links don't fit on one line, so they live in the + menu instead */
@media (max-width: 480px) {
  .site-nav { display: none; }
}

/* ---------- Work grid ---------- */
.work { padding: 40px 24px 96px; max-width: 1760px; margin: 0 auto; }
.grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 56px 24px; }
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px)  { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 16px; } }
@media (max-width: 480px)  { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.tile { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.tile-img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #f3f3f3;
  transition: opacity .2s;
}
.tile:hover .tile-img { opacity: .85; }
.tile-media { display: block; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; background: #f3f3f3; }
.tile-empty {
  width: 100%; aspect-ratio: 1 / 1; background: #f3f3f3;
  display: flex; align-items: center; justify-content: center; font-size: 11px; color: #6b6b6b;
}
.tile-label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.4; }
.tile-code { font-size: 11px; color: #6b6b6b; }

/* ---------- Project viewer (the pop-up) ---------- */
.viewer {
  position: fixed; inset: 0; z-index: 30; background: #fff;
  display: none; flex-direction: column;
}
.viewer.open { display: flex; }

.viewer-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 24px; border-bottom: 1px solid #000; font-size: 14px;
}
.viewer-title { font-size: 18px; }
.viewer-nav { display: flex; align-items: center; gap: 20px; }
.viewer-nav button { min-height: 44px; }

.viewer-body {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) 360px;
}
.stage-wrap { display: flex; flex-direction: column; min-height: 0; padding: 24px; gap: 16px; }
.stage {
  position: relative; flex: 1; min-height: 0; background: #f3f3f3;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  touch-action: pan-y;
}
.stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.stage-empty { font-size: 12px; color: #6b6b6b; }

.stage img { cursor: zoom-in; }

/* prev/next strips at the edges (the middle of the photo opens full screen) */
.stage-btn {
  position: absolute; top: 0; bottom: 0; width: 76px;
  display: flex; align-items: center; padding: 0 16px;
}
.stage-btn.prev { left: 0; justify-content: flex-start; cursor: w-resize; }
.stage-btn.next { right: 0; justify-content: flex-end; cursor: e-resize; }
.stage-btn span {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid #000; opacity: 0; transition: opacity .15s;
}
.stage:hover .stage-btn span, .stage-btn:focus-visible span { opacity: 1; }
@media (hover: none) { .stage-btn span { opacity: 1; } }

/* ---------- Full-screen photo ---------- */
/* Overlay over the whole page: the page behind goes blurry and only the photo shows,
   sized by JS to the largest it can be on the screen (edge to edge), centred.
   Clicking the photo closes it. */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  animation: lb-in .2s ease-out;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  display: block; flex: none; max-width: none; outline: none;
  cursor: zoom-out; user-select: none; -webkit-user-drag: none;
}
/* "X EXIT" and ← → in the site's black text colour (no glow). X EXIT uses the header-link type
   (18px, uppercase, spaced); the arrows are drawn at the same height and stroke as its capital letters. */
.lb-exit, .lb-arrow {
  position: absolute; z-index: 1; min-height: 44px; display: flex; align-items: center;
  font-size: 18px; color: #000;
}
/* X EXIT: 10% larger than the header links (18px → 19.8px) and 0.4cm further in from the top and left.
   Arrows: 1.5cm further in from each side (closer to the photo). Arrow size unchanged. */
.lb-exit { top: calc(12px + .4cm); left: calc(24px + .4cm); font-size: 19.8px; }
.lb-arrow { top: 50%; transform: translateY(-50%); min-width: 44px; }
.lb-arrow svg { width: 1.5em; height: .72em; overflow: visible; }
.lb-arrow.prev { left: calc(24px + 1.5cm); justify-content: flex-start; }
.lb-arrow.next { right: calc(24px + 1.5cm); justify-content: flex-end; }
.lb-exit:hover, .lb-arrow:hover { color: #555; }   /* same hover grey as the site's links */
.lb-arrow[hidden] { display: none; }
@media (max-width: 600px) {
  .lb-exit { top: calc(8px + .4cm); left: calc(16px + .4cm); font-size: 15.4px; }   /* 14px + 10% */
  .lb-arrow { font-size: 14px; }
  .lb-arrow.prev { left: calc(16px + 1.5cm); }
  .lb-arrow.next { right: calc(16px + 1.5cm); }
}
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lightbox { animation: none; } }

.stage-meta { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 12px; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.thumb { flex: 0 0 64px; width: 64px; height: 64px; background: #f3f3f3; overflow: hidden; opacity: .5; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb[aria-current="true"] { opacity: 1; outline: 1px solid #000; outline-offset: -1px; }

.viewer-info {
  border-left: 1px solid #000; padding: 24px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 20px; font-size: 14px; line-height: 1.6;
}
.info-row { display: grid; grid-template-columns: 80px 1fr; gap: 16px; }

@media (max-width: 900px) {
  .viewer { overflow-y: auto; }
  .viewer-body { display: block; flex: none; }
  .stage-wrap { padding: 16px; }
  .stage { height: 62vh; flex: none; }
  .viewer-info { border-left: 0; border-top: 1px solid #000; padding: 24px 16px 48px; }
  .viewer-bar { padding: 8px 16px; }
  .viewer-title { font-size: 14px; width: 100%; order: 2; }
  .viewer-nav { width: 100%; justify-content: space-between; order: 1; }
}

/* ---------- Content pages (About / Services / Shop) ---------- */
.page { padding: 40px 24px 96px; max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 96px; }
.page-head { display: flex; flex-direction: column; gap: 32px; padding-top: 40px; }
.page-head h1 { margin: 0; font-size: 40px; font-weight: 400; line-height: 1.3; letter-spacing: 0.04em; max-width: 920px; }
@media (max-width: 600px) { .page-head h1 { font-size: 28px; } .page { gap: 64px; } }
/* Paragraph directly under a page headline (Magazine page): same body text as the Shop/About paragraphs,
   same gap below the headline as any section, and no wider than the headline itself */
.page-intro { font-size: 14px; line-height: 1.7; max-width: 920px; margin-top: -2cm; }   /* sits 2cm closer to the headline than a normal section */
@media (max-width: 600px) { .page-intro { margin-top: calc(20px - 64px); } }   /* phones: same 20px gap the desktop ends up with */
.section { display: flex; flex-direction: column; gap: 16px; font-size: 14px; line-height: 1.7; }
.section-label { color: #6b6b6b; border-bottom: 1px solid #000; padding-bottom: 12px; }
.split { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.split > .media { flex: 1 1 320px; min-width: 0; background: #f3f3f3; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #6b6b6b; }
.split > .media:has(> img) { position: relative; overflow: hidden; }
.split > .media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }   /* fills the box without changing its size */
.split > .media > img[hidden] { display: none; }
.split > .text { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 24px; font-size: 14px; line-height: 1.7; }
.row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
@media (max-width: 760px) { .row { grid-template-columns: minmax(0, 1fr); gap: 8px; } }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 10px 24px; }
.links { display: flex; flex-wrap: wrap; gap: 12px 32px; }
.btn { min-height: 44px; display: inline-flex; align-items: center; padding: 0 24px; text-decoration: none; }
.btn-dark { background: #000; color: #fff; }
.btn-dark:hover { color: #ccc; }
.btn-line { border: 1px solid #000; }

/* Services accordion */
.acc details { border-top: 1px solid #000; }
.acc details:last-child { border-bottom: 1px solid #000; }
.acc summary {
  list-style: none; cursor: pointer; min-height: 72px;
  display: grid; grid-template-columns: 80px 1fr 22px; align-items: center; gap: 16px; font-size: 18px;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary svg { transition: transform .2s; }
.acc details[open] summary svg { transform: rotate(45deg); }
.acc .acc-body { display: flex; flex-wrap: wrap; gap: 24px 40px; padding: 8px 0 40px 96px; font-size: 14px; line-height: 1.7; }
@media (max-width: 600px) { .acc .acc-body { padding-left: 0; } }
/* "Includes" list on Services: each deliverable starts with a dash (the "Includes" label doesn't) */
/* The "Includes" lists were removed (2026-11-12). The paragraph keeps the exact width it had next to the list
   (the list sat beside it once there was 640px of room; below that the paragraph used the full width). */
.acc .acc-body { container-type: inline-size; }
@container (min-width: 640px) { .acc .acc-body > .prose { max-width: calc(360px + (100% - 640px) * .999); } }
.deliverables > span:not(.muted) { padding-left: calc(2ch + .12em); text-indent: calc(-2ch - .12em); }   /* wrapped lines line up under the text, not the dash */
.deliverables > span:not(.muted)::before { content: "- "; }
.deliverables > span.muted { padding-left: calc(2ch + .12em); }   /* "Includes" lines up with the item text, past the dashes */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 24px; }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px)  { .steps { grid-template-columns: minmax(0, 1fr); } }
.step-num { aspect-ratio: 1 / 1; background: #f3f3f3; display: flex; align-items: center; justify-content: center; font-size: 32px; }
/* "Start a project" pop-up (Services): same blurred background as the full-screen photos */
.project-form {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(255, 255, 255, 0.15);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  animation: lb-in .2s ease-out;
}
.project-form[hidden] { display: none; }
.pf-panel {
  width: 10cm; height: 15cm; max-width: 100%; max-height: 100%;   /* shrinks only if the screen is smaller than 10 × 15 cm */
  background: #fff; border: 1px solid #000; overflow: auto; outline: none;
}
/* The form inside the panel: headers at 14px (same as the marco@undermind.xyz button), the project box
   takes the leftover height, SUBMIT centred at the bottom */
.pf-form { height: 100%; min-height: 100%; display: flex; flex-direction: column; gap: 20px; padding: 24px; font-size: 14px; }
.pf-field { display: flex; flex-direction: column; gap: 8px; }
.pf-field input, .pf-field textarea {
  font: inherit; letter-spacing: 0.02em; text-transform: none; color: #000; background: #fff;
  border: 1px solid #000; border-radius: 0; padding: 10px 12px; width: 100%; min-height: 44px; outline: none;
}
.pf-field input:focus, .pf-field textarea:focus { box-shadow: inset 0 0 0 1px #000; }
.pf-field[data-error] input, .pf-field[data-error] textarea { border-color: #c00; box-shadow: inset 0 0 0 1px #c00; }
.pf-grow { flex: 1 1 auto; min-height: 140px; }
.pf-grow textarea { flex: 1 1 auto; resize: none; min-height: 96px; }
.pf-note { margin: 0; min-height: 0; font-size: 12px; color: #6b6b6b; text-align: center; }
.pf-note:empty { display: none; }
.pf-submit { align-self: center; flex: none; }
@media (max-width: 600px) { .pf-field input, .pf-field textarea { font-size: 16px; } }   /* 16px stops phones zooming in when typing */
/* X EXIT: same look and place as in the full-screen photo view (.lb-exit).
   The panel is always dead centre. On wide screens X EXIT sits beside it; on narrow screens (where the
   panel spans almost the full width) the same space is kept above AND below so it stays centred
   and never overlaps X EXIT. */
@media (max-width: 700px) {
  .project-form { padding: calc(12px + .4cm + 44px + 8px) 16px; }
}
@media (max-width: 600px) {
  .project-form { padding: calc(8px + .4cm + 44px + 8px) 16px; }
}
.cta { border: 1px solid #000; padding: 40px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; font-size: 24px; }

/* Shop */
.issues { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 48px 24px; }   /* 4 per row (was 3) since the Issue 4 card was added; gaps unchanged */
@media (max-width: 900px) { .issues { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .issues { grid-template-columns: minmax(0, 1fr); } }
.issue { display: flex; flex-direction: column; gap: 16px; text-align: left; }
.issue .cover { aspect-ratio: 3 / 4; background: #f3f3f3; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #6b6b6b; }
.issue .cover:has(img) { position: relative; overflow: hidden; }
.issue .cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.issue[aria-pressed="true"] .cover { outline: 1px solid #000; outline-offset: -1px; }
.issue-row { display: flex; justify-content: space-between; gap: 12px; width: 100%; }

/* focus ring only for keyboard users */
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
@media (hover: none) { .hint-keys { display: none; } }
@media (hover: hover) { .hint-swipe { display: none; } }
