/* leonfenster.com - shared styles for every page.
   Only Leon Fenster edits this file. */

:root {
  --ink: #0d0c0b;        /* page background: near black */
  --paper: #f4efe6;      /* text: warm off-white */
  --muted: #8f897f;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { background: var(--ink); color: var(--paper); }

body {
  font-family: "Spectral", Georgia, serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  animation: fade-in 0.9s ease both;
}
body.leaving { opacity: 0; transition: opacity 0.6s ease; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

a { color: inherit; text-decoration: none; }

/* ---------- Logo, top left on every page ---------- */
.logo {
  position: fixed;
  top: 22px;
  left: 26px;
  z-index: 30;
  display: block;
  width: 92px;
}
.logo img { display: block; width: 100%; height: auto; }

/* ---------- Hamburger, top right (every page except home) ---------- */
.burger {
  position: fixed;
  top: 30px;
  right: 28px;
  z-index: 40;
  width: 34px;
  height: 24px;
  background: none;
  border: 0;
  cursor: pointer;
}
.burger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--paper);
  transition: transform 0.4s ease, opacity 0.3s ease, top 0.4s ease;
}
.burger span:nth-child(1) { top: 2px; }
.burger span:nth-child(2) { top: 11px; }
.burger span:nth-child(3) { top: 20px; }
.menu-open .burger span:nth-child(1) { top: 11px; transform: rotate(45deg); }
.menu-open .burger span:nth-child(2) { opacity: 0; }
.menu-open .burger span:nth-child(3) { top: 11px; transform: rotate(-45deg); }

/* Full-screen menu that the hamburger opens */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s;
}
.menu-open .overlay { opacity: 1; visibility: visible; }
.menu-open { overflow: hidden; }

/* ---------- The column of words (menu page and hamburger menu) ---------- */
.words {
  list-style: none;
  text-align: center;
  font-size: 22px;
  line-height: 1.75;
  letter-spacing: 0.01em;
}
.words a {
  display: inline-block;
  padding: 0 0.3em;
  transition: opacity 0.3s ease;
}
.words:hover a { opacity: 0.35; }
.words a:hover, .words a:focus-visible { opacity: 1; font-style: italic; }

.menu-list { display: flex; flex-direction: column; align-items: center; }

/* The hamburger menu: artwork titles first, then the page links, smaller.
   It scrolls if the list is taller than the screen. */
.overlay { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.menu-list.with-titles { margin: auto 0; padding: 100px 24px 60px; }
.titles {
  list-style: none;
  text-align: center;
  font-size: 21px;
  line-height: 1.65;
}
.titles a { transition: opacity 0.3s ease; }
.titles:hover a { opacity: 0.35; }
.titles a:hover, .titles a:focus-visible { opacity: 1; font-style: italic; }
.with-titles .titles::after {   /* a short hand-drawn line between the two lists */
  content: "";
  display: block;
  width: 70px;
  height: 6px;
  margin: 26px auto 22px;
  opacity: 0.5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 70 6' preserveAspectRatio='none'%3E%3Cpath d='M2 3.6C20 2.2 44 4.4 68 2.6' fill='none' stroke='%23f4efe6' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.with-titles .words { font-size: 17px; line-height: 1.7; opacity: 0.75; }

/* ---------- Hand-drawn icons ----------
   Wobbly pen lines that cross at the corners; a few lines are traced a
   second time, faintly ("second"), like a pen going over them again. */
.sketch {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}
.sketch .dot { fill: currentColor; stroke: none; }
.sketch .second { opacity: 0.5; stroke-width: 1.1; }

.insta {
  display: block;
  margin-top: 22px;
  padding: 6px;
  color: var(--paper);
  opacity: 0.8;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.insta .sketch { width: 26px; height: 26px; }
.insta:hover, .insta:focus-visible { opacity: 1; transform: rotate(-6deg); }
.tools button:hover .sketch, .tools button:focus-visible .sketch { transform: rotate(-6deg); }
.tools .sketch { transition: transform 0.3s ease; }

.centre {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px;
}

/* ---------- Home page ---------- */
.home { cursor: pointer; }
.home .artwork { display: block; width: 100%; height: auto; }

/* ---------- Simple text pages (art, about, contact, shop) ---------- */
.text {
  max-width: 34em;
  text-align: center;
  font-size: 17px;
  line-height: 1.7;
}
.text h1 {
  font-weight: 300;
  font-style: italic;
  font-size: 22px;
  margin-bottom: 1.2em;
}
.text p + p { margin-top: 1em; }
.text a { text-decoration: underline; text-underline-offset: 3px; }
/* "back" to the menu (about page): like the gallery's previous / next */
.text a.back-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 2em; font-size: 18px; text-decoration: none; }
.back-link svg { width: 26px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.2; }
.back-link:hover, .back-link:focus-visible { font-style: italic; }
.soon { color: var(--muted); }

/* ---------- About page ---------- */
.text h2 { font-weight: 300; font-style: italic; font-size: 19px; margin: 2.4em 0 0.8em; }
.about-photo { display: block; width: 100%; max-width: 380px; height: auto; margin: 0 auto 2.2em; }
/* the items in a row, with | between them; a long row wraps after a | */
.makes { list-style: none; padding: 0; text-align: center; line-height: 1.9; }
.makes li { display: inline; white-space: nowrap; }
.makes li:not(:last-child)::after { content: "|"; margin: 0 0.7em; opacity: 0.5; }
.makes li:not(:last-child) { margin-right: 0; }
.makes li + li::before { content: " "; white-space: normal; }
/* Press logos: three across (two on phones); each logo's height is set in about.html */
.press { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.2em 1.6em; margin-top: 1.6em; }
.text .press a { text-decoration: none; display: block; }
.press .outlet { display: flex; align-items: center; justify-content: center; height: 50px; }
.press .outlet img { display: block; width: auto; max-width: 100%; object-fit: contain; opacity: 0.85; transition: opacity 0.2s ease; }
.press .about-it { display: block; margin-top: 0.5em; font-size: 14px; line-height: 1.4; font-style: italic; color: var(--muted); }
.press a:hover .outlet img, .press a:focus-visible .outlet img { opacity: 1; }
.press a:hover .about-it, .press a:focus-visible .about-it { color: var(--paper); }
@media (max-width: 600px) { .press { grid-template-columns: repeat(2, 1fr); gap: 2em 1.2em; } }
.about-end { margin-top: 2.6em; }

/* ---------- Talks page ---------- */
.talk-photo { display: block; width: 100%; max-width: 520px; height: auto; margin: 0 auto 1.6em; }

/* ---------- Returns, privacy, terms (draft gaps marked for Leon) ---------- */
.legal { text-align: left; }
.legal h1 { text-align: center; }
.legal .updated { text-align: center; font-size: 14px; color: var(--muted); font-style: italic; margin-bottom: 2em; }
.legal-list { padding-left: 1.2em; margin-top: 0.6em; }
.legal-list li + li { margin-top: 0.5em; }
.legal-links { text-align: center; margin-top: 3em; font-size: 14px; color: var(--muted); }
.text.legal a.back-link, .text.faq a.back-link { display: flex; width: max-content; margin-left: auto; margin-right: auto; }
mark.todo { background: #ffc94a; color: #0d0c0b; padding: 0 3px; font-style: normal; }

/* ---------- Questions page (faq.html): tap a question to open it ---------- */
.faq details { text-align: left; border-bottom: 1px solid rgba(244, 239, 230, 0.15); }
.faq summary { cursor: pointer; list-style: none; padding: 0.7em 1.8em 0.7em 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.2em; top: 0.6em; font-size: 20px; color: var(--muted); transition: transform 0.25s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { font-style: italic; }
.faq details p { padding: 0 0 1em; color: var(--paper); opacity: 0.85; }

/* ---------- Contact form (contact.html) ---------- */
.contact { width: min(440px, 100%); }
.contact h1 { font-weight: 300; font-style: italic; font-size: 22px; text-align: center; margin-bottom: 1.4em; }
.contact-form label { display: block; margin-bottom: 26px; font-size: 15px; color: var(--muted); }
.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 6px 2px 8px;
  font: inherit;
  font-size: 18px;
  color: var(--paper);
  border: 0;
  border-radius: 0;
  /* a hand-drawn line under each box */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 6' preserveAspectRatio='none'%3E%3Cpath d='M1 3.4C60 2.2 140 4.2 210 2.8S280 3.6 299 2.4' fill='none' stroke='%23f4efe6' stroke-opacity='.55' stroke-width='1.3' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") left bottom / 100% 6px no-repeat;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.contact-form textarea { resize: vertical; min-height: 130px; line-height: 1.5; }
.contact-form input:focus,
.contact-form textarea:focus { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 6' preserveAspectRatio='none'%3E%3Cpath d='M1 3.4C60 2.2 140 4.2 210 2.8S280 3.6 299 2.4' fill='none' stroke='%23f4efe6' stroke-width='1.8' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E"); }
/* the mailing list tick box (ticked to start with): a hand-drawn box with a hand-drawn tick */
.contact-form .tick {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -4px 0 30px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
  cursor: pointer;
}
.contact-form .tick input { position: absolute; opacity: 0; width: 18px; height: 18px; margin: 0; cursor: pointer; }
.contact-form .tick-box { width: 18px; height: 18px; flex: none; stroke-width: 1.4; }
.contact-form .tick-mark { stroke-width: 2; opacity: 0; transition: opacity 0.2s ease; }
.contact-form .tick input:checked + .tick-box .tick-mark { opacity: 1; }
.contact-form .tick input:focus-visible + .tick-box { outline: 1px dotted var(--paper); outline-offset: 3px; }
.contact-form .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .send {
  margin: 8px auto 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 300;
  color: var(--ink);
  padding: 9px 34px 10px;
}
.contact-form .send .pill-shape { fill: var(--paper); }
.contact-form .send:disabled { opacity: 0.5; cursor: default; }
.form-status { min-height: 1.6em; margin-top: 18px; text-align: center; font-style: italic; font-size: 16px; }
.form-status.error { color: #e8a598; }
.form-status.done { color: var(--paper); }

/* ---------- Art gallery (art.html) ---------- */
.gallery {
  --top: 92px;                                      /* room for logo and hamburger */
  --bar: calc(64px + env(safe-area-inset-bottom));  /* height of the button bar */
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

.stage { position: fixed; top: 0; left: 0; right: 0; bottom: var(--bar); }

.work {
  position: absolute;
  inset: 0;
  padding: var(--top) 24px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.45s ease;
}
.work.shown { opacity: 1; }
.work img, .work video {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.work video { width: 100%; height: 100%; }

/* "fullWidth: true": the picture fills the width and scrolls down.
   A picture shorter than the screen sits in the middle (the auto margins);
   a taller one starts at the top and scrolls. */
.work.full-width {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.work.full-width > * { flex: none; margin-top: auto; margin-bottom: auto; }
.work.full-width img,
.work.full-width video { width: 100%; height: auto; max-height: none; }

/* Guides and other pages fill everything below the logo */
.work-guide, .work-page { padding: var(--top) 0 0; }
.work iframe { display: block; width: 100%; height: 100%; border: 0; background: var(--ink); }

/* The bar: previous / title / next */
.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  height: var(--bar);
  padding: 0 14px env(safe-area-inset-bottom);
  display: grid;
  grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) minmax(max-content, 1fr);
  align-items: center;
  background: var(--ink);
}
.bar button {
  font: inherit;
  font-size: 18px;
  color: var(--paper);
  background: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  transition: opacity 0.3s ease;
}
.bar svg { fill: none; stroke: currentColor; stroke-width: 1.2; flex: none; }
.prev svg, .next svg { width: 26px; height: 13px; }
.prev { justify-self: start; }
.next { justify-self: end; }
.bar:hover button { opacity: 0.45; }
.bar button:hover, .bar button:focus-visible { opacity: 1; font-style: italic; }
.single-work .prev, .single-work .next { visibility: hidden; }

/* The two hand-drawn icons in the middle of the bar */
.tools { justify-self: center; display: flex; align-items: center; gap: 6px; }
.tools button { padding: 10px; }
.tools .sketch { width: 30px; height: 30px; stroke-width: 1.5; }
.bar [hidden] { display: none; }
.full-btn .icon-exit, .full-btn.is-full .icon-enter { display: none; }
.full-btn.is-full .icon-exit { display: block; }

/* The short description that opens above the bar */
.info {
  position: fixed;
  left: 50%;
  bottom: var(--bar);
  z-index: 15;
  width: min(36em, 100%);
  max-height: calc(100% - var(--bar) - var(--top));
  overflow-y: auto;
  padding: 30px 34px 26px;
  background: rgba(13, 12, 11, 0.94);
  font-size: 17px;
  line-height: 1.65;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 16px);
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
}
.info-open .info { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.info-title { font-weight: 300; font-style: italic; font-size: 21px; margin-bottom: 0.7em; }
.info-text p + p { margin-top: 0.9em; }
.info-text a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.info-text a:hover { font-style: italic; }
.info-text .logos { display: flex; justify-content: center; align-items: center; gap: 22px; flex-wrap: wrap; }
.info-text .logos img { display: block; height: 52px; width: auto; }
.info-text img { max-width: 100%; }
.info-text img.extra { display: block; margin: 1.6em auto 0; width: auto; max-height: 70vh; }
/* two or more photos in a row: only a small gap between them */
.info-text p:has(> img.extra) + p:has(> img.extra) { margin-top: 8px; }
.info-text p:has(> img.extra) + p:has(> img.extra) img.extra { margin-top: 0; }
.info-text .credit { display: block; margin-top: 0.4em; font-size: 13px; font-style: italic; opacity: 0.7; }
.info-close {
  position: absolute;
  top: 8px;
  right: 12px;
  font: inherit;
  font-size: 26px;
  line-height: 1;
  color: var(--paper);
  background: none;
  border: 0;
  padding: 6px;
  cursor: pointer;
}

/* ---------- Pictures in the gallery ----------
   The frame hugs the picture so clickable shapes can sit exactly on it.
   gallery.js sizes it. */
.frame {
  position: relative;
  flex: none;
  transition: width 0.4s ease, height 0.4s ease, margin 0.4s ease, transform 0.4s ease;
}
.frame img { width: 100%; height: 100%; max-width: none; max-height: none; user-select: none; -webkit-user-select: none; }
.work.full-width .frame { width: 100%; height: auto; }
.work.full-width .frame img { height: auto; }

/* Zooming: only the picture grows (gallery.js); the page itself never zooms there */
.zoomer { position: relative; width: 100%; height: 100%; transform-origin: 0 0; }
.zoomer.animate { transition: transform 0.3s ease; }
.work.full-width .zoomer { height: auto; }
.work-image { overflow: hidden; touch-action: none; }
.work-image.full-width { overflow-x: hidden; overflow-y: auto; }
.work-image.full-width:not(.zoomed) { touch-action: pan-y; }
.work-image.zoomed { cursor: grab; }
.work-image.dragging { cursor: grabbing; }
.zoomed-in .hint { opacity: 0; visibility: hidden; }

/* ---------- Clickable artworks (guide.js) ---------- */
.hotspots { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hotspots .hs { fill: transparent; cursor: pointer; }    /* invisible, never outlined */
.hotspots .dim { opacity: 0; transition: opacity 0.35s ease; pointer-events: none; }
.hotspots.spot .dim { opacity: 1; }

/* Title that follows the mouse over a clickable thing */
.hs-label {
  position: fixed;
  z-index: 25;
  max-width: 260px;
  padding: 5px 11px;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  font-style: italic;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.hs-label.on { opacity: 1; }

/* The button at the top (topButton in art.html) */
.work-links {
  position: fixed;
  top: 28px;
  left: 50%;
  z-index: 30;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
}
/* Square-ish buttons with a hand-drawn edge (the wobbly outline is an SVG) */
.pill {
  position: relative;
  display: block;
  padding: 9px 20px 10px;
  font-size: 16px;
  line-height: 1.2;
  white-space: nowrap;
  text-align: center;
  transition: transform 0.25s ease;
}
.pill > span { position: relative; }
.pill[hidden] { display: none; }
.pill-shape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: rgba(13, 12, 11, 0.6);
  stroke: var(--paper);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pill-shape path { vector-effect: non-scaling-stroke; }
.pill-shape .second { fill: none; opacity: 0.45; }
.top-button { color: var(--ink); }
.top-button .pill-shape { fill: var(--paper); }
.pill:hover, .pill:focus-visible { font-style: italic; transform: rotate(-1.5deg); }
.pill .short { display: none; }

/* The story box: on the right on computers, from the bottom on phones */
.story {
  --panel: min(420px, 36vw);
  position: fixed;
  top: var(--top);
  right: 0;
  bottom: var(--bar);
  z-index: 22;
  width: var(--panel);
  display: flex;
  flex-direction: column;
  background: rgba(13, 12, 11, 0.96);
  border-left: 1px solid rgba(244, 239, 230, 0.16);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.4s ease, visibility 0.4s;
}
.story-open .story { transform: none; visibility: visible; }
.story-grip { display: none; }
.story-close {
  position: absolute;
  top: 10px;
  right: 14px;
  z-index: 1;
  font: inherit;
  font-size: 28px;
  line-height: 1;
  color: var(--paper);
  background: none;
  border: 0;
  padding: 6px;
  cursor: pointer;
}
.story-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 34px 34px 36px;
}
.story-title {
  font-weight: 300;
  font-style: italic;
  font-size: 25px;
  line-height: 1.25;
  margin: 0 30px 0.8em 0;
}
.story-text { font-size: 17px; line-height: 1.7; }
.story-text p + p, .story-text p + figure, .story-text figure + p, .story-text figure + figure { margin-top: 1em; }
.story-text a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.story-text figure img { display: block; width: 100%; height: auto; }
.story-text figcaption { margin-top: 0.5em; font-size: 14px; font-style: italic; color: var(--muted); }
.story-text small { font-size: 14px; color: var(--muted); }
.story-print {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 1.8em;
  padding-top: 1.1em;
  border-top: 1px solid rgba(244, 239, 230, 0.25);
  font-size: 18px;
  font-style: italic;
}
.story-print[hidden] { display: none; }
.story-print .sketch { width: 30px; height: 18px; transition: transform 0.3s ease; }
.story-print:hover .sketch { transform: translateX(5px); }

/* The "click on anything in the artwork" note: big, bright and a little wonky */
.hint {
  position: fixed;
  z-index: 24;
  max-width: 250px;
  padding: 16px 20px 17px;
  background: var(--paper);
  color: var(--ink);
  font-size: 22px;
  font-style: italic;
  line-height: 1.3;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: rotate(-2.5deg) scale(0.85);
  transition: opacity 0.4s ease, visibility 0.4s, transform 0.4s ease;
}
.hint.on {
  opacity: 1;
  visibility: visible;
  transform: rotate(-2.5deg) scale(1);
  animation: hint-bob 2.4s ease-in-out 0.6s infinite;
}
@keyframes hint-bob {
  0%, 100% { transform: rotate(-2.5deg) translateY(0); }
  50% { transform: rotate(-1deg) translateY(-6px); }
}
.hint-arrow {
  position: absolute;
  width: 60px;
  height: 40px;
  color: var(--paper);
  stroke-width: 2.4;
}
.hint.beside .hint-arrow { left: -70px; top: 2px; animation: nudge-left 1.2s ease-in-out infinite; }
.hint.over .hint-arrow { left: -18px; bottom: -44px; transform: rotate(-25deg); }
@keyframes nudge-left {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-8px); }
}

/* Phones only: the "zoom in and tap on anything" box, bottom left over the picture */
.touch-hint {
  position: fixed;
  z-index: 24;
  left: 12px;
  bottom: calc(var(--bar) + 14px);
  display: none;
  align-items: center;
  gap: 10px;
  max-width: 215px;
  padding: 10px 26px 11px 11px;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  font-style: italic;
  line-height: 1.3;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.4s ease, visibility 0.4s, transform 0.4s ease;
}
.touch-hint.on { opacity: 1; visibility: visible; transform: translateY(0); }
.touch-hand { width: 26px; height: 32px; flex: none; stroke-width: 1.5; }
.touch-hand .hand { animation: hand-tap 1.6s ease-in-out infinite; }
.touch-hand .tap { opacity: 0; stroke-width: 1.3; animation: hand-tap-lines 1.6s ease-in-out infinite; }
@keyframes hand-tap {
  0%, 55%, 100% { transform: translateY(0); }
  30% { transform: translateY(3px); }
}
@keyframes hand-tap-lines {
  0%, 22%, 60%, 100% { opacity: 0; }
  32%, 45% { opacity: 1; }
}
/* the little x: its tap area reaches well beyond it, so a tap near it counts */
.touch-hint-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--ink);
  background: none;
  border: 0;
  cursor: pointer;
}
.touch-hint-close .sketch { width: 9px; height: 9px; stroke-width: 1.4; }
@media (max-width: 700px) { .touch-hint { display: flex; } }
.touch-hint[hidden] { display: none; }   /* until guide.js shows it */

/* ---------- Phones ---------- */
@media (max-width: 600px) {
  .logo { top: 16px; left: 16px; width: 66px; }
  .burger { top: 22px; right: 18px; width: 30px; }
  .words { font-size: 21px; }
  .gallery { --top: 72px; }
  .work { padding-left: var(--phone-border, 0px); padding-right: var(--phone-border, 0px); }
  .bar { padding-left: 4px; padding-right: 4px; }
  .bar button { font-size: 16px; gap: 7px; padding: 12px 8px; }
  .prev svg, .next svg { width: 20px; }
  .info { padding: 28px 22px 22px; }

  /* "see more photos" / "buy a print": one above the other between logo and menu */
  .zoom-in, .zoom-out { display: none !important; }   /* phones pinch instead */
  /* Phones: a smaller top button, with its shorter phone words */
  .work-links { top: 20px; }
  .pill { padding: 5px 13px 6px; font-size: 15px; }
  .pill .long { display: none; }
  .pill .short { display: inline; }

  /* Smaller icons in the bar */
  .tools { gap: 2px; }
  .tools button { padding: 8px; }
  .tools .sketch { width: 22px; height: 22px; stroke-width: 1.7; }

  .hint { max-width: 190px; padding: 12px 15px 13px; font-size: 18px; }
}

/* Story box from the bottom on phones and narrow screens */
@media (max-width: 700px) {
  .story {
    top: auto;
    left: 0;
    bottom: 0;
    width: 100%;
    max-height: 62vh;
    max-height: 62dvh;
    z-index: 26;
    border-left: 0;
    border-top: 1px solid rgba(244, 239, 230, 0.2);
    border-radius: 14px 14px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
    transform: translateY(100%);
    transition: transform 0.4s ease, visibility 0.4s, max-height 0.35s ease;
  }
  .story.expanded { max-height: calc(100% - 70px); }
  .story-grip {
    display: block;
    flex: none;
    width: 42px;
    height: 4px;
    margin: 9px auto 0;
    border-radius: 2px;
    background: rgba(244, 239, 230, 0.35);
  }
  .story-close { top: 6px; right: 8px; }
  .story-scroll { padding: 16px 22px 26px; }
  .story-title { font-size: 22px; }
}

/* ---------- Shop (shop.html, built by shop-page.js from shop.js) ---------- */
.shop { max-width: 1180px; margin: 0 auto; padding: 120px 24px 80px; }
.shop-head { position: relative; text-align: center; }
.shop-head h1 { font-weight: 300; font-style: italic; font-size: 24px; }
/* The £ $ € switch stays put while scrolling, so it's always at hand
   (also when a link opens the shop part way down) */
.currency {
  position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 30;
  display: flex; gap: 2px; padding: 4px 6px; border-radius: 2px;
  background: rgba(13, 12, 11, 0.88);
}
/* Computers: at the top, beside the menu, in a thin white box (phones keep
   it floating in the bottom right corner) */
@media (min-width: 601px) {
  .currency {
    top: 18px; right: 84px; bottom: auto;
    gap: 6px; padding: 2px 10px; border: 1px solid var(--paper); border-radius: 0;
    background: var(--ink);
  }
  body .currency button { font-size: 21px; padding: 2px 8px; }
}
.currency button {
  font: inherit; font-size: 17px; color: var(--paper); background: none; border: 0;
  padding: 4px 8px; cursor: pointer; opacity: 0.45; transition: opacity 0.25s ease;
}
.currency button[aria-pressed="true"] { opacity: 1; }
.currency button:hover { opacity: 1; }
.ship-to { display: block; margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.ship-to select {
  font: inherit; font-size: 15px; color: var(--paper); background: transparent; border: 0; border-radius: 0;
  margin-left: 6px; padding: 2px 18px 6px 4px; max-width: 200px; cursor: pointer; -webkit-appearance: none; appearance: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 6' preserveAspectRatio='none'%3E%3Cpath d='M1 3.4C60 2.2 140 4.2 210 2.8S280 3.6 299 2.4' fill='none' stroke='%23f4efe6' stroke-opacity='.55' stroke-width='1.3' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") left bottom / 100% 6px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1.2L5 4.8L9 1.4' fill='none' stroke='%23f4efe6' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E") right 2px center / 10px 6px no-repeat;
}
.ship-to select option { color: #000; }
.qty { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.qty .opt-label { margin: 0 6px 0 0; }
.qty button { font: inherit; font-size: 20px; line-height: 1; color: var(--paper); background: none; border: 0; padding: 2px 8px; cursor: pointer; }
.qty .q-n { min-width: 1.4em; text-align: center; font-size: 18px; }
.shop-intro { max-width: 34em; margin: 14px auto 0; text-align: center; color: var(--muted); font-size: 16px; line-height: 1.6; }
.shop-commission-note { max-width: 34em; margin: 70px auto 0; text-align: center; font-size: 17px; line-height: 1.6; }
.shop a:not(.pill), .shop-commission-note a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

.shop-section { margin-top: 70px; }
.shop-section:first-child { margin-top: 34px; }
.shop-section { scroll-margin-top: 130px; }   /* where a link to a section (or its first product) lands */
.shop-section .section-button { display: flex; justify-content: center; margin-top: 16px; }
.shop-section .section-text { max-width: 34em; margin: -14px auto 34px; text-align: center; color: var(--muted); font-size: 16px; line-height: 1.6; }
.shop-section h2 { font-weight: 300; font-style: italic; font-size: 20px; text-align: center; margin-bottom: 34px; }
.shop-section h2::after {
  content: ""; display: block; width: 60px; height: 6px; margin: 10px auto 0; opacity: 0.5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 70 6' preserveAspectRatio='none'%3E%3Cpath d='M2 3.6C20 2.2 44 4.4 68 2.6' fill='none' stroke='%23f4efe6' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 340px)); justify-content: center; gap: 56px 40px; }
.product { display: flex; flex-direction: column; align-items: flex-start; scroll-margin-top: 100px; }
.p-img { width: 100%; aspect-ratio: 1 / 1; background: #171513; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.p-img img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
/* Close-ups: on top of the picture, shown on mouse-over (computers) or a tap */
.p-img { position: relative; overflow: hidden; }
.p-img.has-closeup { cursor: zoom-in; }
.p-img .closeup {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  object-fit: cover; opacity: 0; transition: opacity 0.45s ease;
}
.p-img.show-close .closeup { opacity: 1; }
.p-img.show-close { cursor: zoom-out; }
@media (hover: hover) {
  .p-img.has-closeup:hover .closeup { opacity: 1; }
}
.p-img .lens {
  position: absolute; left: 10px; bottom: 10px; width: 26px; height: 26px;
  color: var(--paper); stroke-width: 1.8; filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.8));
  opacity: 0.85; transition: opacity 0.3s ease;
}
.p-img.show-close .lens { opacity: 0.4; }
@media (hover: hover) { .p-img.has-closeup:hover .lens { opacity: 0.4; } }
.p-title a { text-decoration: none !important; }
.product { scroll-margin-top: 96px; }   /* clear of the logo when a link jumps to it */
.p-title a:hover { font-style: italic; }
.p-title { font-weight: 300; font-size: 21px; line-height: 1.3; }
.p-text { margin-top: 8px; font-size: 15.5px; line-height: 1.6; color: rgba(244, 239, 230, 0.82); }
.p-text p + p { margin-top: 0.7em; }
.p-text strong { font-weight: 400; color: var(--paper); }

.p-options { width: 100%; margin-top: 14px; }
.opt { margin-top: 12px; }
.opt-label { font-size: 13.5px; color: var(--muted); margin-bottom: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 2px 6px; }
.chip {
  font: inherit; font-size: 15.5px; color: var(--paper); background: none; border: 0;
  padding: 3px 4px 7px; cursor: pointer; opacity: 0.55; transition: opacity 0.2s ease;
}
.chip:hover { opacity: 0.9; }
.chip[aria-pressed="true"] {
  opacity: 1; font-style: italic;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 6' preserveAspectRatio='none'%3E%3Cpath d='M2 3.4C16 2.2 36 4.2 58 2.6' fill='none' stroke='%23f4efe6' stroke-width='1.5' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") left bottom / 100% 6px no-repeat;
}
.page-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.page-number, .interest input {
  width: 130px; font: inherit; font-size: 16px; color: var(--paper); padding: 4px 2px 7px; border: 0; border-radius: 0; outline: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 6' preserveAspectRatio='none'%3E%3Cpath d='M1 3.4C60 2.2 140 4.2 210 2.8S280 3.6 299 2.4' fill='none' stroke='%23f4efe6' stroke-opacity='.55' stroke-width='1.3' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") left bottom / 100% 6px no-repeat;
  -webkit-appearance: none; appearance: none; -moz-appearance: textfield;
}
.page-number::-webkit-inner-spin-button, .interest input::-webkit-inner-spin-button { -webkit-appearance: none; }
.page-number:disabled { opacity: 0.35; }
.product .tick { position: relative; display: flex; align-items: center; gap: 9px; font-size: 15px; cursor: pointer; }
.product .tick input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; cursor: pointer; }
.product .tick-box { width: 20px; height: 20px; flex: none; stroke-width: 1.4; }
.product .tick-mark { stroke-width: 2; opacity: 0; transition: opacity 0.2s ease; }
.product .tick input:checked + .tick-box .tick-mark { opacity: 1; }

.p-price { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.p-price .amount { font-size: 22px; }
.p-detail { font-size: 14px; color: var(--muted); font-style: italic; }
.product .buy, .section-button .buy { margin-top: 14px; padding: 8px 30px 9px; border: 0; background: none; font: inherit; font-weight: 300; font-size: 16px; color: var(--ink); cursor: pointer; }
.product .buy .pill-shape, .section-button .buy .pill-shape { fill: var(--paper); }
.product .buy.soon { cursor: default; color: var(--paper); }
.product .buy.soon .pill-shape { fill: transparent; opacity: 0.5; }
.product .buy.soon:hover { font-style: normal; transform: none; }
.p-note { margin-top: 10px; font-size: 13.5px; color: var(--muted); font-style: italic; }
.p-status { min-height: 1.2em; margin-top: 6px; font-size: 14.5px; font-style: italic; color: #e8a598; }
.interest { width: 100%; margin-top: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.interest input { width: 100%; max-width: 320px; }
.interest input[name="copies"] { width: 70px; }
.interest .copies { display: flex; align-items: baseline; gap: 10px; font-size: 15px; color: var(--muted); }
.interest .trap { position: absolute; left: -9999px; width: 1px; height: 1px; }
.interest .buy { margin-top: 6px; }
.interest .p-status { color: var(--paper); }

@media (max-width: 600px) {
  .shop { padding: 96px 18px 60px; }
  .shop-section { scroll-margin-top: 92px; }   /* below the logo */
  .products { grid-template-columns: 1fr; gap: 64px; }
}
