/* ---------- Tokens ---------- */
:root {
  --mg: clamp(16px, calc(16px + 4 * (100vw - 390px) / 1530), 20px);   /* page margin + column gap */
  --rg: clamp(40px, calc(40px + 40 * (100vw - 390px) / 1530), 80px);  /* index row gap */
  --ease: cubic-bezier(.455, .03, .515, .955);                         /* = GSAP power2.inOut */

  /* Feed slot: each image lives in a slot this tall; slots overlap by --overlap. */
  --slot: 75vh;  --slot: 75svh;
  --overlap: 20vh; --overlap: 20svh;
}
@media (max-aspect-ratio: 1068/798) {
  :root { --slot: 50vh; --slot: 50svh; --overlap: 11vh; --overlap: 11svh; }
}
@media (max-aspect-ratio: 695/924) {
  :root { --slot: min(44svh, calc(100vw - 2 * var(--mg))); --overlap: 5svh; }
}

body { --bg: #fff; --fg: #000; --ph: #ececec; --ar: 1; }
body[data-format="4:5"] { --ar: 0.8; }
body[data-format="2:3"] { --ar: 0.6667; }
body[data-theme="grey"] { --bg: #e9e8e4; --fg: #000; --ph: #dddcd7; }
body[data-theme="dark"] { --bg: #0b0b0b; --fg: #fff; --ph: #1c1c1c; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-gutter: stable; -webkit-tap-highlight-color: transparent; }
html.is-locked { overflow: hidden; }
body {
  margin: 0;
  min-width: 340px;
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.2 "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
p, ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; -webkit-user-drag: none; user-select: none; }
button { all: unset; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; }
.dim { opacity: .5; }

.grid {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  column-gap: var(--mg);
  padding: 0 var(--mg);
}
@media (max-width: 768px) {
  .grid { grid-template-columns: repeat(6, 1fr); }
  .desk-only { display: none !important; }
}
@media (min-width: 769px) { .mob-only { display: none !important; } }

/* Project meta: "Chair   Furniture   2/6" */
.meta span + span { margin-left: 1.4em; }
.meta .dim { opacity: .5; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0;
  z-index: 40;
  display: flex; flex-direction: column; justify-content: space-between;
  pointer-events: none;
  color: #fff;
  mix-blend-mode: difference;   /* always readable over any image */
}
.nav__top { padding-top: max(15px, env(safe-area-inset-top)); }
.nav__bottom { padding-bottom: max(16px, env(safe-area-inset-bottom)); align-items: end; }

.slot { display: grid; white-space: nowrap; }
.slot--left  { grid-column: 1 / 5; min-width: 0; }
.slot--left p { overflow: hidden; text-overflow: ellipsis; padding-right: 1em; }
.slot--title { grid-column: 5 / 11; }
.slot--about { grid-column: 11 / 14; }
.slot--right { grid-column: 14 / 17; justify-items: end; }
.slot--bl    { grid-column: 1 / 9; }
.slot--br    { grid-column: 9 / 17; justify-items: end; }
@media (max-width: 768px) {
  .slot--title { grid-column: 1 / 4; }
  .slot--about { grid-column: 4 / 5; }
  .slot--right { grid-column: 5 / 7; }
  .slot--bl    { grid-column: 1 / 4; }
  .slot--br    { grid-column: 4 / 7; }
}

.title { font: 16px/1 "Iowan Old Style", "Century Schoolbook", Georgia, serif; position: relative; top: -1px; }

/* Swap: every slot stacks its options; the body's data-view decides which one shows.
   Outgoing fades first, incoming fades in after — never both at once. */
.swap {
  grid-area: 1 / 1;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .3s var(--ease), visibility 0s linear .3s;
}
body[data-view="feed"]   .swap[data-when~="feed"],
body[data-view="index"]  .swap[data-when~="index"],
body[data-view="viewer"] .swap[data-when~="viewer"],
body[data-view="about"]  .swap[data-when~="about"] {
  opacity: 1; visibility: visible; pointer-events: auto;
  transition: opacity .3s var(--ease) .25s, visibility 0s linear 0s;
}
p.swap { pointer-events: none !important; }
@media (hover: hover) {
  .nav button:hover { opacity: .5; transition: opacity .2s var(--ease); }
}

.devbar { display: flex; gap: 1.6em; font-size: 12px; }
.devbar__group { display: flex; gap: .8em; }
.devbar button { opacity: .5; }
.devbar button[aria-pressed="true"] { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 768px) {
  .devbar { flex-direction: column; align-items: flex-end; gap: .4em; font-size: 11px; }
}

/* ---------- Media (shared by feed + index) ---------- */
.media { position: relative; display: block; background: var(--ph); overflow: hidden; aspect-ratio: var(--ar, 1); transition: background-color .5s var(--ease); }
.media img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s var(--ease); }
.media img.is-loaded { opacity: 1; }

/* ---------- Feed ---------- */
.feed { padding: calc((100vh - var(--slot)) / 2) 0; padding: calc((100svh - var(--slot)) / 2) 0; }
.feed__item {
  height: var(--slot);
  display: flex; justify-content: center; align-items: center;
  padding: 3px 0;
}
.feed__item + .feed__item { margin-top: calc(var(--overlap) * -1); }
.feed__media { height: 100%; max-width: calc(100vw - 2 * var(--mg)); will-change: transform; }

/* ---------- Index ---------- */
.index {
  position: fixed; inset: 0; z-index: 10;
  overflow-y: auto; overscroll-behavior: contain;
  visibility: hidden;
}
.index.is-open { visibility: visible; }
.index__bg { position: fixed; inset: 0; background: var(--bg); transition: background-color .5s var(--ease); }
.index__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: var(--rg) var(--mg);
  align-items: start;
  padding: calc(var(--rg) + 40px) var(--mg) calc(var(--rg) + 40px);
}
@media (max-width: 1440px) { .index__grid { grid-template-columns: repeat(7, 1fr); } }
@media (max-width: 1024px) { .index__grid { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 768px)  { .index__grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 544px)  { .index__grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Transition clones ---------- */
.fly { position: fixed; inset: 0; z-index: 15; pointer-events: none; }
.fly__img { position: absolute; left: 0; top: 0; object-fit: cover; will-change: transform; backface-visibility: hidden; }

/* ---------- Viewer ---------- */
.viewer { position: fixed; inset: 0; z-index: 20; visibility: hidden; touch-action: none; }
.viewer.is-open { visibility: visible; }
.viewer__bg { position: absolute; inset: 0; background: var(--bg); opacity: 0; }
.viewer__stage { position: absolute; inset: 0; overflow: hidden; }
.viewer__item { position: absolute; left: 0; top: 0; will-change: transform; }
.viewer__item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
html.has-mouse body[data-view="viewer"] .viewer { cursor: none; }

.cursor {
  position: fixed; left: 0; top: 0; z-index: 45;
  pointer-events: none;
  color: #fff; mix-blend-mode: difference;
  opacity: 0;
  transform: translate(-200px, -200px);
}
.cursor p { transform: translate(-50%, -50%); }
.cursor.is-on { opacity: 1; }

/* ---------- About ---------- */
.about {
  position: fixed; inset: 0; z-index: 30;
  overflow-y: auto; overscroll-behavior: contain;
  visibility: hidden; opacity: 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(17px); backdrop-filter: blur(17px);
}
.about.is-open { visibility: visible; }
.about__inner { min-height: 100%; padding-top: 63px; padding-bottom: 48px; }
.about__col { grid-column: 11 / 15; display: flex; flex-direction: column; gap: 2.4em; }
@media (max-width: 1440px) { .about__col { grid-column: 10 / 15; } }
@media (max-width: 1024px) { .about__col { grid-column: 9 / 16; } }
@media (max-width: 768px)  { .about__col { grid-column: 1 / -1; } }
.about__bio { text-indent: 2.5em; }
.about__block { display: flex; flex-direction: column; gap: .15em; }
.about__block .dim:first-child { margin-bottom: .45em; }
.about__row { display: grid; grid-template-columns: 5em 1fr; }
.about__block a:hover { opacity: .5; }

/* ---------- Intro ---------- */
.intro {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  background: var(--bg); color: var(--fg);
}
.intro p { font: 22px/1.3 "Iowan Old Style", "Century Schoolbook", Georgia, serif; white-space: nowrap; }
@media (max-width: 480px) { .intro p { white-space: normal; text-align: center; padding: 0 24px; } }
@media (max-width: 544px) { .intro p { font-size: 17px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01s !important; transition-delay: 0s !important; }
}

/* =====================================================================
   Mægazine cards: every story page is a 1:1 card. All sizes inside a card
   use container units (cqmin), so a card scales like a printed postcard:
   the same layout at 120px in the grid and 900px in the viewer.
   ===================================================================== */
:root {
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --paper: #f1ece1;
  --ink: #1d1b17;
  /* Paper grain: SVG noise, multiplied over the card */
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
body[data-theme="dark"] { --paper: #ebe5d8; }

.viewer__item { container-type: size; }
.viewer__cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 5; }

.card {
  position: absolute; inset: 0;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  container-type: size;
}
.card::after {               /* grain sits over everything, photos included: printed, not screen */
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background-image: var(--grain); background-size: 240px;
  mix-blend-mode: multiply; opacity: .32;
}
.card h2, .card h3, .card p { margin: 0; font-weight: normal; }

/* --- Photo pages (cover + image) --- */
.card__photo { position: absolute; inset: 0; overflow: hidden; }
.card__photo .card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card__over {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 6cqmin 6.5cqmin;
  color: #fff;
  background: linear-gradient(to bottom, transparent 45%, rgba(0,0,0,.5));
}
.card__kicker { font: 500 1.9cqmin/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 2.2cqmin !important; }
.card__headline { font: 7.6cqmin/1.02 var(--serif); letter-spacing: -.01em; max-width: 80%; text-wrap: balance; }
.card--image .card__over { flex-direction: row; justify-content: space-between; align-items: flex-end; background: linear-gradient(to bottom, transparent 70%, rgba(0,0,0,.45)); }
.card__caption { font: italic 2.7cqmin/1.3 var(--serif); max-width: 70%; }
.card__count { font: 500 1.9cqmin/1 var(--sans); letter-spacing: .14em; }

/* --- Text pages --- */
.card--text {
  display: grid;
  grid-template: "head" auto "body" 1fr "foot" auto / 1fr;
  row-gap: 3.4cqmin;
  padding: 6cqmin 7cqmin 5.4cqmin;
}
.card__head, .card__foot {
  display: flex; justify-content: space-between; gap: 2cqmin;
  font: 500 1.75cqmin/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
}
.card__head { grid-area: head; padding-bottom: 1.8cqmin; border-bottom: .22cqmin solid var(--ink); }
.card__foot { grid-area: foot; padding-top: 1.8cqmin; border-top: .12cqmin solid color-mix(in srgb, var(--ink) 40%, transparent); }
.card__foot span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .55; }
.card__foot span:last-child { white-space: nowrap; }
.card__body {
  grid-area: body;
  overflow: hidden; min-height: 0;
  font: 4.3cqmin/1.4 var(--serif);
  hyphens: auto; -webkit-hyphens: auto;
  text-wrap: pretty;
}
.card__body p + p { text-indent: 1.4em; }
.card__stand { font-style: italic; font-size: 5.4cqmin; line-height: 1.22; margin-bottom: 3cqmin !important; text-indent: 0 !important; text-wrap: balance; }
.card__stand + p { text-indent: 0 !important; }
.card__heading { font: italic 5cqmin/1.2 var(--serif); margin-bottom: 1.8cqmin !important; }
.card__drop::first-letter { float: left; font-size: 3.15em; line-height: .82; padding: .07em .09em 0 0; }
.card__post { display: none; grid-area: post; }
.card.is-over .card__body { box-shadow: inset 0 -1.2cqmin 0 #d33; }   /* text too long for this page */

/* --- Postcard style: printed edge around photos; text pages get a stamp side --- */
body[data-card="postcard"] .card { --paper: #f4f0e6; box-shadow: inset 0 0 0 .3cqmin rgba(0,0,0,.06); }
body[data-card="postcard"] .card__photo { inset: 4.2cqmin; }
body[data-card="postcard"] .card--cover .card__over { padding: 5cqmin; }
body[data-card="postcard"] .card--text {
  grid-template: "head head" auto "body post" 1fr "foot foot" auto / 1fr 26cqmin;
  column-gap: 0;
}
body[data-card="postcard"] .card__body { font-size: 3.55cqmin; padding-right: 4cqmin; border-right: .15cqmin solid color-mix(in srgb, var(--ink) 45%, transparent); }
body[data-card="postcard"] .card__stand { font-size: 4.3cqmin; }
body[data-card="postcard"] .card__heading { font-size: 4.1cqmin; }
body[data-card="postcard"] .card__post {
  display: flex; flex-direction: column; align-items: flex-end;
  padding-left: 4cqmin; position: relative;
}
.card__stamp {
  width: 15cqmin; aspect-ratio: 5 / 6; padding: 1cqmin;
  background: #fff; transform: rotate(2.5deg);
  box-shadow: 0 .3cqmin .8cqmin rgba(0,0,0,.12);
  /* perforated edge */
  -webkit-mask: radial-gradient(circle at center, transparent .55cqmin, #000 .6cqmin) -0.8cqmin -0.8cqmin / 1.6cqmin 1.6cqmin, linear-gradient(#000, #000) content-box;
  -webkit-mask-composite: source-over;
}
.card__stamp img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.75) contrast(1.05); }
.card__postmark {
  position: absolute; top: 9cqmin; right: 9cqmin;
  width: 14cqmin; aspect-ratio: 1; border-radius: 50%;
  border: .3cqmin solid color-mix(in srgb, var(--ink) 55%, transparent);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .6cqmin;
  font: 500 1.35cqmin/1 var(--sans); letter-spacing: .12em; text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 60%, transparent);
  transform: rotate(-14deg);
  mix-blend-mode: multiply;
}
.card__post i { display: block; width: 100%; margin-top: auto; border-bottom: .15cqmin solid color-mix(in srgb, var(--ink) 40%, transparent); }
.card__post i + i { margin-top: 4.4cqmin; }

/* ---------- Proof sheet (index.html?sheet) ---------- */
body[data-view="sheet"] { background: #ddd9d0; }
.sheet { padding: 32px 24px 64px; display: grid; gap: 40px; }
.sheet__title { font: 15px/1.2 var(--serif); margin-bottom: 10px; }
.sheet__title .dim { font: 12px var(--sans); margin-left: .8em; }
.sheet__row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.sheet__card { position: relative; aspect-ratio: var(--ar); container-type: size; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
@media (max-width: 900px) { .sheet__row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Flowing stories: preface, byline, continued paragraphs, bio ---------- */
.card__label { font: 600 1.75cqmin/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1.4cqmin !important; text-indent: 0 !important; }
.card__label--end { margin-top: 3.4cqmin !important; padding-top: 2cqmin; border-top: .12cqmin solid color-mix(in srgb, var(--ink) 35%, transparent); }
.card__pre { margin-bottom: 3.4cqmin; }
.card__pre .card__stand { margin-bottom: 1.4cqmin !important; }
.card__by { font: 2.5cqmin/1.3 var(--sans); letter-spacing: .02em; opacity: .55; text-indent: 0 !important; }
.card__body .card__pre + p, .card__body h3 + p, .card__body .card__label + p, .card__body p.cont { text-indent: 0 !important; }
.card__body p b { font-weight: 600; }
.card__bio { font-style: italic; font-size: .86em; }
.card__heading { margin-top: 1.2cqmin !important; }
.card__body > :first-child { margin-top: 0 !important; }
.card__dot { opacity: .6; }
.card__credit { font: 500 1.5cqmin/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; font-style: normal; opacity: .7; margin-left: .6em; white-space: nowrap; }

/* ---------- Framed image page: paper margin, double rule, caption underneath (like an illustration plate) ---------- */
.card--image.is-framed .card__photo { inset: 8cqmin 8cqmin 18cqmin; border: .9cqmin double var(--ink); background: var(--paper); }
.card--image.is-framed .card__img { inset: 1.4cqmin; width: calc(100% - 2.8cqmin); height: calc(100% - 2.8cqmin); }
.card__under {
  position: absolute; left: 8cqmin; right: 8cqmin; bottom: 7cqmin; z-index: 2;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 3cqmin;
  color: var(--ink);
}
.card__under .card__caption { max-width: 78%; }

/* ---------- mema.studio test (28.10): plans, sketches and boards are shown whole, never cropped ---------- */
.card--image.is-framed .card__img { object-fit: contain; }

/* ---------- mema.studio (28.10, v6): same menu as the home page ---------- */
.brand { position: fixed; inset: 0 0 auto; z-index: 41; padding-top: max(15px, env(safe-area-inset-top)); pointer-events: none; }
.brand__logo { grid-column: 5 / 11; pointer-events: auto; font: 16px/1 "Iowan Old Style", "Century Schoolbook", Georgia, serif; color: #3A6EA5; text-decoration: none; position: relative; top: -1px; justify-self: start; }
.brand__logo span { font-style: italic; }
body[data-theme="dark"] .brand__logo { color: #7FA6D6; }
@media (max-width: 768px) { .brand__logo { grid-column: 1 / 4; } }
.about { background: var(--bg) !important; color: var(--fg); }
.about__inner.mm { min-height: 100%; display: flex; flex-direction: column; align-items: center; padding: 0 20px; }
.mm__list { list-style: none; margin: auto 0; padding: 0; text-align: center; display: grid; gap: clamp(18px, 3.4vh, 34px); }
.mm__list a { font: 400 clamp(26px, 4.2vh, 36px)/1 "Helvetica Neue", Helvetica, Arial, sans-serif; letter-spacing: -.01em; text-decoration: none; color: inherit; }
.mm__list a:hover { color: #3A6EA5; }
.mm__list a.mm__lab { color: #3A6EA5; }
.mm__talk { margin-bottom: 44px; min-width: 280px; text-align: center; padding: 22px 48px; border-radius: 999px; background: #3A6EA5; color: #fff; font: 500 22px/1 "Helvetica Neue", Helvetica, Arial, sans-serif; text-decoration: none; }


/* v7 (28.10): smooth blue → lemon breath; no layout jump from the scrollbar */
html { scrollbar-gutter: stable; }
.talk { animation: talk-breathe 3.2s ease-in-out 1s infinite alternate; }
.talk:hover { animation-play-state: paused; }
@keyframes talk-breathe { from { background: #3A6EA5; color: #fff; } to { background: #FFFFB0; color: #541F38; } }
@media (prefers-reduced-motion: reduce) { .talk { animation: none; } }

/* v11: LAB back in the menu as an outlined pill with small corners */
.mm__list a.mm__lab { display: inline-block; color: #3A6EA5; border: 1.5px solid currentColor; border-radius: 6px; padding: 12px 24px 14px; opacity: 1; }

/* v13 (28.10): calmer breathing in the portfolio colours; no blue */
.talk { border: 1.5px solid #3A2A21; animation: breathe-cream-yellow 3.6s ease-in-out 1s infinite alternate !important; }
@keyframes breathe-cream-yellow { from { background: #FBF7F0; color: #3A2A21; } to { background: #FFFFB0; color: #3A2A21; } }
.breathe { border: 1.5px solid #8E3B27; animation: breathe-cream-rust 3.6s ease-in-out 1s infinite alternate !important; }
@keyframes breathe-cream-rust { from { background: #FBF7F0; color: #3A2A21; } to { background: #8E3B27; color: #FBF7F0; } }
.closing .talk { border-color: #FBF7F0; }
@media (prefers-reduced-motion: reduce) { .talk, .breathe { animation: none !important; } .talk { background: #FFFFB0; color: #3A2A21; } .breathe { background: #FBF7F0; color: #3A2A21; } }

/* v14 (28.10): one breathing for all animated pills: rust red <-> lemon yellow, cream text throughout */
.talk, .breathe { border: 0 !important; color: #FBF7F0 !important; animation: breathe-rust-yellow 3.6s ease-in-out 1s infinite alternate !important; }
@keyframes breathe-rust-yellow { from { background: #8E3B27; } to { background: #FFFFB0; } }
@media (prefers-reduced-motion: reduce) { .talk, .breathe { animation: none !important; background: #8E3B27 !important; } }

/* v15 (28.10): animated pills swap rust and yellow: background and text change together */
.talk, .breathe { border: 0 !important; animation: breathe-swap 3.6s ease-in-out 1s infinite alternate !important; }
@keyframes breathe-swap { from { background: #8E3B27; color: #FFFFB0; } to { background: #FFFFB0; color: #8E3B27; } }
@media (prefers-reduced-motion: reduce) { .talk, .breathe { animation: none !important; background: #8E3B27 !important; color: #FFFFB0 !important; } }

/* v16 (28.10): only the menu Contact pill breathes (blue <-> lemon, as at first); LAB pill and band Contact are static blue outlines */
.breathe, .closing .talk { animation: none !important; background: transparent !important; color: #3A6EA5 !important; border: 1.5px solid currentColor !important; border-radius: 6px !important; }
.breathe:hover, .closing .talk:hover { background: #3A6EA5 !important; color: #fff !important; }
.closing .talk { color: #7FA6D6 !important; }
.closing .talk:hover { background: #7FA6D6 !important; color: #3A2A21 !important; }
.menu .talk, .mm__talk { border: 0 !important; animation: breathe-blue 3.2s ease-in-out 1s infinite alternate !important; }
@keyframes breathe-blue { from { background: #3A6EA5; color: #fff; } to { background: #FFFFB0; color: #541F38; } }
@media (prefers-reduced-motion: reduce) { .menu .talk, .mm__talk { animation: none !important; background: #3A6EA5 !important; color: #fff !important; } }

/* v17 (28.10): band Contact = filled cream pill (round); menu Contact breathes blue -> brown, white capitals */
.closing .talk { background: #FBF7F0 !important; color: #3A2A21 !important; border: 0 !important; border-radius: 999px !important; }
.closing .talk:hover { background: #FFFFB0 !important; color: #3A2A21 !important; }
.menu .talk, .mm__talk { color: #fff !important; text-transform: uppercase; letter-spacing: .14em; font-size: 17px !important; animation: breathe-blue-brown 4s ease-in-out 1s infinite alternate !important; }
@keyframes breathe-blue-brown { from { background: #3A6EA5; } to { background: #3A2A21; } }
@media (prefers-reduced-motion: reduce) { .menu .talk, .mm__talk { animation: none !important; background: #3A6EA5 !important; } }

/* ma-rius (03.11.2026): title on feed and overview tiles when VIEWER.titles is set (typographic covers look alike) */
.index__thumb, .feed__media { container-type: inline-size; }
.index__over { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 4cqi; padding: 8cqi; color: #f4eee2; text-align: left; pointer-events: none; background: linear-gradient(to bottom, transparent 45%, rgba(1,7,54,.55)); }
.index__kicker { font: 500 4.2cqi/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.index__headline { font: 9cqi/1.08 var(--serif); letter-spacing: -.01em; text-wrap: balance; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.feed__over { padding: 7cqi; }
.feed__over .index__kicker { font-size: 2.6cqi; }
.feed__over .index__headline { font-size: 6.4cqi; max-width: 85%; }
/* Tiles with titles need room to read: fewer columns than the photo grid (ma-rius 03.11.2026) */
.has-titles .index__grid { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1440px) { .has-titles .index__grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1024px) { .has-titles .index__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .has-titles .index__grid { grid-template-columns: repeat(2, 1fr); } }

/* ma-rius (03.11.2026): the date / price line top left on covers and tiles */
.card--cover .card__kicker { position: absolute; top: 6cqmin; left: 6.5cqmin; margin: 0 !important; }
.index__over .index__kicker { position: absolute; top: 8cqi; left: 8cqi; }
.feed__over .index__kicker { top: 7cqi; left: 7cqi; }

/* ma-rius "news" card style: neutral newspaper page, framed; only "Continue" / "End" in the footer */
body[data-card="news"] .card { --paper: #fbfaf6; --ink: #1a1a1a; }
body[data-card="news"] .card--text {
  grid-template: "body" 1fr "foot" auto / 1fr;
  padding: 6.2cqmin 6.6cqmin 5cqmin;   /* 09.11.2026: a bit less margin (was 7.5 8 5.5) */
  box-shadow: inset 0 0 0 2.6cqmin var(--paper), inset 0 0 0 2.75cqmin rgba(0,0,0,.18);   /* fine frame inside the margin */
}
body[data-card="news"] .card__head, body[data-card="news"] .card__post { display: none; }
body[data-card="news"] .card__foot { justify-content: flex-end; border-top: 0; padding-top: 0; font-weight: 400; opacity: .7; }
body[data-card="news"] .card__foot span:first-child { display: none; }
body[data-card="news"] .card__body { font: 4.7cqmin/1.42 var(--serif); text-align: left; }   /* 09.11.2026: larger (was 4.1) */
body[data-card="news"] .card__body p + p { text-indent: 0; margin-top: 1.6cqmin; }
body[data-card="news"] .card__heading { font-style: normal; font-weight: 600; font-size: 5cqmin; padding-bottom: 1.2cqmin; border-bottom: .15cqmin solid rgba(0,0,0,.25); }
body[data-card="news"] .card__stand { font-size: 5.6cqmin; }
body[data-card="news"] .card__drop::first-letter { float: none; font-size: inherit; padding: 0; }
body[data-card="news"] .card--image.is-framed .card__under { color: var(--ink); }

/* ---------- ma-rius, 09.11.2026 ---------- */
/* menu: a small gap between the offers and the reading pages (Writings, RAQ) */
.mm__list li.menu-gap { margin-top: clamp(16px, 3vh, 30px); }
/* the view switch: pills at the bottom centre (Feed · Overview; Close while a story is open) */
.pillbar { position: fixed; left: 0; right: 0; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 42; display: grid; justify-items: center; pointer-events: none; }
.pills { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .92); box-shadow: 0 0 0 1px rgba(1, 7, 54, .08), 0 6px 20px rgba(1, 7, 54, .10); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.pill { display: inline-block; padding: 10px 18px; border: 0; border-radius: 999px; background: none; color: #010736; font: 500 13px/1 "Helvetica Neue", Helvetica, Arial, sans-serif; letter-spacing: .02em; cursor: pointer; }
.pill.is-on { background: #0d1c42; color: #fff; cursor: default; }   /* 11.11.2026: navy like the selected tabs (was logo blue #3A6EA5) */
@media (hover: hover) { button.pill:hover { background: rgba(58, 110, 165, .12); } }
body[data-view="about"] .pillbar { display: none; }
/* 09.11.2026 (evening): no postcard frame and no grain on photos (cover, image cards); text cards keep the paper texture */
body[data-card="news"] .card--cover::after, body[data-card="news"] .card--image::after { display: none; }
/* news text cards: more air above a heading that follows text (the first item on a card stays at the top) */
body[data-card="news"] .card__body > * + .card__heading { margin-top: 4.4cqmin !important; }
/* only the headline on a card: no section / place line above it (cover, feed, overview) */
.card--cover .card__kicker, .index__kicker { display: none; }
/* overview + feed titles: room for descenders (g, y, p), which the 5-line clamp cut off */
.index__headline { padding-bottom: .14em; }

/* ma-rius 09.11.2026: story intro screen in the logo blue, like the other pages */
.intro p { color: #3A6EA5; }

/* ma-rius 09.11.2026, phones: Menu stays at the right edge (date/time slots are hidden there);
   the bottom label line (title, section, page count) is hidden, the pills and the card footer carry that now */
@media (max-width: 768px) {
  .slot--about { grid-column: 6 / 7; justify-items: end; }
  .nav__bottom { display: none; }
}

/* 11.11.2026, phones: the menu bar at the bottom in the lightest blue (#e7ecf5), logo left, Menu/Close right, as on the
   regular pages; the top logo and Menu are hidden. The pills sit just above the bar; fitRect (viewer.js) leaves room. */
.storybar { display: none; }
@media (max-width: 768px) {
  .brand, .nav__top .slot--about { display: none; }
  /* 11.11.2026: date and time stay at the top on phones, as on the other pages */
  .nav__top .desk-only { display: grid !important; }
  .nav__top .slot--left { grid-column: 1 / 4; }
  .nav__top .slot--right { grid-column: 4 / 7; justify-items: end; }
  /* 17.11.2026: the empty title slot shared columns 1–3 with the date and pushed the time into a second row */
  .nav__top .slot--title { display: none; }
  .nav__top .slot--left, .nav__top .slot--right { grid-row: 1; align-self: center; }
  .storybar { display: grid; position: fixed; left: 0; right: 0; bottom: 0; z-index: 43; align-items: center; padding-top: 14px; padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); background: #e7ecf5; }
  .storybar__logo { grid-column: 1 / 4; font: 16px/1 "Iowan Old Style", "Century Schoolbook", Georgia, serif; color: #3A6EA5; text-decoration: none; }
  .storybar__menu { grid-column: 4 / 7; justify-items: end; }
  .storybar__menu .swap { border: 0; padding: 4px 0; background: none; color: #010736; cursor: pointer; font: 700 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
  .storybar { background: var(--bg, #fff); box-shadow: 0 -1px 0 rgba(13, 28, 66, .14), 0 -6px 18px rgba(1, 7, 54, .06); }   /* 11.11.2026 (final): white, line + soft shadow */
  .pillbar { bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
  .about__inner.mm { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
  /* the open menu: items anchored at the bottom above the Contact button, as on the other pages */
  .mm__list { margin: auto 0 32px; }
  .mm__talk { margin-bottom: 28px; }
  .index__grid { padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px)); }
}

/* ma-rius 09.11.2026 (evening): readability. "In short" as a heading, larger footer (page number + Continue) */
body[data-card="news"] .card__pre .card__label { font: 600 5cqmin/1.2 var(--serif); letter-spacing: 0; text-transform: none; margin-bottom: 1.8cqmin !important; }
body[data-card="news"] .card__foot { font-size: 3cqmin; letter-spacing: .08em; opacity: .8; }

/* phones: the feed tiles use the full width (4:5), and the open card is a plain paper sheet across the whole width
   (no frame line, less margin, larger text; the card width itself comes from fitRect in viewer.js) */
@media (max-aspect-ratio: 695/924) {
  :root { --slot: min(66svh, calc((100vw - 2 * var(--mg)) * 1.25)); --overlap: 4svh; }
}
@media (max-width: 768px) {
  body[data-card="news"] .card--text { box-shadow: none; padding: 5cqmin 5.4cqmin 4.4cqmin; }
  body[data-card="news"] .card__body { font-size: 5.1cqmin; }
  body[data-card="news"] .card__heading { font-size: 5.6cqmin; }
  body[data-card="news"] .card__stand { font-size: 6cqmin; }
  body[data-card="news"] .card__pre .card__label { font-size: 5.6cqmin; }
  body[data-card="news"] .card__foot { font-size: 3.6cqmin; }
}

/* ma-rius 09.11.2026: Menu / Close in the top row in bold caps, as on the regular pages (ma-rius.css .nav__menu) */
.slot--about .swap { font: 700 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
/* date and time in the corners: caps, normal weight, as on the regular pages (ma-rius.css .nav__corner) */
.slot--left .meta, .slot--right .meta { font: 500 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; }

/* ma-rius 09.11.2026 (late): polaroid covers. The card stays 4:5; the square photo (1:1) sits in a cream frame
   (5% on top and sides) and the headline moves to the cream strip below it, dark on cream, no gradient.
   Applies to the cover card, the feed tiles and the overview tiles. Other image pages stay full-bleed. */
body[data-format="4:5"][data-card="news"] .card--cover .card__photo,
body[data-format="4:5"][data-card="news"] .feed__media,
body[data-format="4:5"][data-card="news"] .index__thumb { background: #f4f0e6; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
/* photo: square, 5% from the top and sides */
body[data-format="4:5"][data-card="news"] .card--cover .card__img { inset: 5cqmin auto auto 5cqmin; width: 90cqmin; height: 90cqmin; }
body[data-format="4:5"][data-card="news"] .feed__media img,
body[data-format="4:5"][data-card="news"] .index__thumb img { position: absolute; top: 5cqi; left: 5cqi; width: 90cqi; height: 90cqi; }
/* headline: in the strip under the photo (95% → 125% of the width) */
body[data-format="4:5"][data-card="news"] .card--cover .card__over {
  inset: 95cqmin 0 0 0; padding: 0 5cqmin; justify-content: center; background: none; color: #1a1a1a;
}
body[data-format="4:5"][data-card="news"] .card--cover .card__headline { font-size: 5.2cqmin; line-height: 1.12; max-width: none;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
body[data-format="4:5"][data-card="news"] .feed__over,
body[data-format="4:5"][data-card="news"] .index__over {
  inset: 95cqi 0 0 0; padding: 0 5cqi; justify-content: center; background: none; color: #1a1a1a;
}
body[data-format="4:5"][data-card="news"] .feed__over .index__headline { font-size: 5.2cqi; line-height: 1.12; max-width: none; -webkit-line-clamp: 3; }
body[data-format="4:5"][data-card="news"] .index__over .index__headline { font-size: 6.4cqi; line-height: 1.1; -webkit-line-clamp: 3; }

/* 11.11.2026, wide screens: logo on the content's left edge, Menu on its right edge (1040px content, as on the other pages);
   date and time in the outer corners, hidden below 1280px */
@media (min-width: 769px) {
  .brand.grid, .nav__top.grid { grid-template-columns: 1fr minmax(0, calc(1040px - 2 * var(--mg))) 1fr; column-gap: 0; }
  .nav__top > * { grid-row: 1; }
  .brand__logo { grid-column: 2; justify-self: start; }
  .nav__top .slot--left { grid-column: 1; }
  .nav__top .slot--title { grid-column: 2; }
  .nav__top .slot--about { grid-column: 2; justify-self: end; justify-items: end; }
  .nav__top .slot--right { grid-column: 3; justify-items: end; }
}
@media (min-width: 769px) and (max-width: 1279px) { .nav__top .slot--left, .nav__top .slot--right { display: none !important; } }

/* 11.11.2026: the logo is italic everywhere (as in ma-rius.css) */
.brand__logo, .storybar__logo { font-style: italic; }

/* 11.11.2026: menu Contact & About cycles through the site's blues only (was blue → brown), as on the other pages (ma-rius.css) */
.menu .talk, .mm__talk { color: #fff !important; animation: breathe-blues 6s ease-in-out 1s infinite alternate !important; }
@keyframes breathe-blues { 0% { background: #0d1c42; } 50% { background: #22396f; } 100% { background: #3A6EA5; } }
@media (prefers-reduced-motion: reduce) { .menu .talk, .mm__talk { animation: none !important; background: #0d1c42 !important; } }
