/* =====================================================
   KAFE MISHKA — shared styles for every page
   =====================================================

   CHANGING FONTS (this one file changes the whole site):
   1. In the @import line below, replace "Manrope" with the
      font name from fonts.google.com (spaces become +),
      e.g. family=Cormorant+Garamond:wght@400;500;700
   2. In --font-head / --font-body, put the same name in quotes.
   Fonts that also support Cyrillic (needed for "Кафе"):
     "Manrope", "Cormorant Garamond", "Unbounded", "Playfair Display",
     "EB Garamond", "Onest", "Inter", "PT Sans"                    */
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --font-head: "Manrope", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;

  /* COLORS */
  --bg:      #f4efe6;   /* warm cream paper */
  --ink:     #1f1c19;   /* soft black text */
  --muted:   #8a8178;   /* grey-brown for small text */
  --line:    #ddd5c8;   /* thin dividers */
  --accent:  #9c5a3c;   /* terracotta, like fired clay */
  --hero-ink: #ffffff;  /* title color on the hero photo */
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header / navigation ---------- */
header {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; flex-wrap: wrap;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.logo { font-family: var(--font-head); font-weight: 800; font-size: 22px;
        letter-spacing: -0.03em; }
.logo span { font-weight: 400; color: var(--muted); font-size: 16px;
             letter-spacing: 0; margin-left: 10px; }
nav { display: flex; gap: 22px; flex-wrap: wrap; font-size: 12px;
      text-transform: uppercase; letter-spacing: 0.1em; }
nav a { color: var(--muted); transition: color .2s; }
nav a:hover, nav a.here { color: var(--ink); }

/* ---------- Hero (homepage photo) ---------- */
.hero {
  position: relative;
  margin-top: 32px;
  min-height: 66vh;
  display: flex;
  align-items: flex-start;            /* title sits at the TOP ... */
  justify-content: flex-start;        /* ... and LEFT, on the sky   */
  padding: 40px;
  background-color: #d9cdb9;
  background-image: url("hero.jpg");
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.hero::after {   /* subtle film grain */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  opacity: .18; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.hero h1 {
  position: relative; z-index: 1;
  color: var(--hero-ink);
  font-weight: 800;
  font-size: clamp(48px, 9vw, 124px);
  line-height: .9;
  letter-spacing: -0.05em;
}

.intro { max-width: 600px; margin: 56px 0 72px; font-size: 19px; }
.intro strong { display: block; font-family: var(--font-head);
                font-size: 30px; line-height: 1.2; letter-spacing: -0.03em;
                margin-bottom: 14px; }

/* ---------- Homepage: clickable section rows ---------- */
.rows a {
  display: grid; grid-template-columns: 60px 1fr 2fr 40px;
  gap: 24px; align-items: baseline;
  padding: 36px 0;
  border-top: 1px solid var(--line);
  transition: color .2s, padding-left .3s;
}
.rows a:last-child { border-bottom: 1px solid var(--line); }
.rows a:hover { color: var(--accent); padding-left: 10px; }
.rows .num { font-size: 12px; color: var(--muted); letter-spacing: .1em; }
.rows h2 { font-size: 36px; }
.rows p { color: var(--muted); max-width: 480px; }
.rows .arrow { font-size: 22px; text-align: right; }

/* ---------- Inner pages ---------- */
.page-title { padding: 72px 0 24px; }
.page-title h1 { font-size: clamp(44px, 7vw, 88px); }
.page-title p { max-width: 560px; margin-top: 16px; font-size: 18px; color: var(--muted); }

.subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 8px; }
.subnav a {
  font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  border: 1px solid var(--line); padding: 7px 14px; border-radius: 100px;
  transition: background .2s, color .2s;
}
.subnav a:hover { background: var(--ink); color: var(--bg); }

.block {
  padding: 56px 0;
  border-top: 1px solid var(--line);
  margin-top: 32px;
  scroll-margin-top: 20px;
}
.block h2 { font-size: 34px; margin-bottom: 10px; }
.block > p { max-width: 560px; color: var(--muted); }
.soon { margin-top: 14px; font-size: 12px; color: var(--muted);
        text-transform: uppercase; letter-spacing: .1em; }

/* ---------- Zine cards ---------- */
.zines { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 28px; }
.zine {
  border: 1px solid var(--line); padding: 28px;
  display: flex; flex-direction: column; gap: 10px;
}
.zine h3 { font-size: 26px; }
.zine p { color: var(--muted); font-size: 15px; }
.button {
  align-self: flex-start; margin-top: 8px;
  font-size: 12px; text-transform: uppercase; letter-spacing: .1em;
  background: var(--ink); color: var(--bg);
  padding: 11px 20px; border-radius: 100px; border: 0; cursor: pointer;
  font-family: var(--font-body);
  transition: background .2s;
}
.button:hover { background: var(--accent); }
.button.ghost { background: none; color: var(--muted); border: 1px solid var(--line); }

/* ---------- Heyzine zine covers (open as a pop-up) ---------- */
.zine .fp-thumb {
  width: 100%; max-width: 280px; height: auto;
  box-shadow: 0 12px 30px rgba(0,0,0,.12);
  transition: transform .35s;
}
.zine a:hover .fp-thumb { transform: translateY(-4px) rotate(-1deg); }
.zine-cover-empty {
  width: 100%; max-width: 280px; aspect-ratio: 3 / 4;
  background: var(--line); display: flex; align-items: center; justify-content: center;
  font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
}

/* ---------- Portfolio tiles (one cover per section) ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 24px; margin-top: 40px; }
.tile { display: block; }
.tile .cover {
  aspect-ratio: 4 / 5; overflow: hidden;
  background: var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em;
}
.tile .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.tile.ready, a.tile { cursor: pointer; }
.tile.ready:hover .cover img, a.tile:hover .cover img { transform: scale(1.04); }
.tile h3 { font-size: 22px; margin-top: 14px; }
.tile .count { font-size: 12px; color: var(--muted);
               text-transform: uppercase; letter-spacing: .1em; }
.tile.ready:hover .count, a.tile:hover .count { color: var(--accent); }
/* hover label over a cover (e.g. the coffee table book) */
.tile .cover { position: relative; }
.cover-hover {
  position: absolute; inset: 0; display: flex; align-items: flex-end;
  padding: 18px; color: #fff; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  background: linear-gradient(transparent 55%, rgba(0,0,0,.55));
  opacity: 0; transition: opacity .35s;
}
.tile:hover .cover-hover { opacity: 1; }
.tile .sub { display: block; font-size: 15px; margin-top: 2px; }
.tile .sub em { color: var(--muted); font-style: normal; }

/* two zine covers side by side inside one tile */
.cover.pair { gap: 8px; padding: 18px; }
.cover.pair img { width: 48%; height: auto; object-fit: contain; box-shadow: 0 8px 20px rgba(0,0,0,.15); }
.cover.pair .zine-cover-empty { width: 48%; font-size: 10px; }

/* ---------- Collapsible stories (spreads) ---------- */
details.story { border-top: 1px solid var(--line); }
details.story:last-child { border-bottom: 1px solid var(--line); }
details.story summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 24px 0;
  font-family: var(--font-head); font-weight: 700;
  font-size: 24px; letter-spacing: -0.02em;
}
details.story summary::-webkit-details-marker { display: none; }
details.story summary::after { content: "+"; font-weight: 400; color: var(--muted);
                               transition: transform .3s; }
details.story[open] summary::after { transform: rotate(45deg); }
details.story img { width: 100%; margin-bottom: 28px; cursor: zoom-in; }
.stories { margin-top: 28px; }

/* ---------- Photo grid ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 28px; }
.grid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
            cursor: zoom-in; transition: opacity .25s; }
.grid img:hover { opacity: .85; }

/* ---------- Lightbox (big dark photo viewer) ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15, 14, 13, .96);
  display: none; align-items: center; justify-content: center;
}
.lightbox.on { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; }
.lb-btn {
  position: absolute; background: none; border: 0; cursor: pointer;
  color: #ece6dc; font-size: 40px; line-height: 1; padding: 16px; opacity: .7;
}
.lb-btn:hover { opacity: 1; }
.lb-close { top: 12px; right: 16px; }
.lb-prev  { left: 8px; }
.lb-next  { right: 8px; }

/* ---------- Scroll-in animation ---------- */
.reveal { opacity: 0; transform: translateY(28px);
          transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Sticky section menu (Trip & Transform) ---------- */
.spy {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  padding: 12px 0;
}
.spy::-webkit-scrollbar { display: none; }
.spy a {
  flex: none;
  font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  padding: 7px 14px; border-radius: 100px; color: var(--muted);
  transition: background .3s, color .3s;
}
.spy a:hover { color: var(--ink); }
.spy a.active { background: var(--ink); color: var(--bg); }
.spy.lower a { text-transform: none; letter-spacing: 0; font-size: 14px; }  /* keeps titles exactly as typed */

/* Chapter headers (Vol. 1 / Vol. 2) */
.chapter { padding: 88px 0 24px; scroll-margin-top: 60px; }
.chapter .kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); }
.chapter h2 { font-size: clamp(36px, 5vw, 60px); margin: 8px 0 12px; }
.chapter > p { max-width: 560px; color: var(--muted); }
.block { scroll-margin-top: 60px; }

/* ---------- Spreads: big, side-scrolling strip ---------- */
.strip {
  display: flex; gap: 20px; overflow-x: auto;
  scroll-snap-type: x mandatory; padding: 28px 0 14px;
  margin-right: -24px; padding-right: 24px;
}
.strip figure { flex: none; width: min(860px, 88vw); scroll-snap-align: start; }
.strip img { width: 100%; cursor: zoom-in; box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.strip figcaption { margin-top: 12px; display: flex; gap: 14px; align-items: baseline;
                    font-size: 13px; font-weight: 700; letter-spacing: -0.01em; }
.strip .fig-num { font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: .1em; }
.strip-bar { display: none; justify-content: space-between; align-items: center; gap: 12px;
             margin-top: 8px; }
.strip-hint { font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.strip-arrows { display: flex; gap: 8px; }
.strip-arrows button {
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: none; color: var(--ink); font-size: 16px;
  transition: background .2s, color .2s;
}
.strip-arrows button:hover { background: var(--ink); color: var(--bg); }

/* ---------- "More from the trip" cards ---------- */
.more { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 28px; }
.more .tile .cover { aspect-ratio: 1 / 1; }

/* ---------- Ceramics: floating zig-zag layout ---------- */
.float { display: flex; flex-direction: column; gap: 72px; margin-top: 40px; }
.float .piece { width: 44%; }
.float .piece img { width: 100%; cursor: zoom-in; }
.float .piece.z0 { align-self: flex-start; width: 46%; }
.float .piece.z1 { align-self: flex-end;   width: 38%; margin-top: -140px; }
.float .piece.z2 { align-self: center;     width: 52%; }
.float .piece.z3 { align-self: flex-start; width: 36%; margin-left: 8%; }
.float .piece.z4 { align-self: flex-end;   width: 44%; margin-right: 6%; margin-top: -160px; }
.series { width: 100%; }
.series h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .12em;
             color: var(--accent); font-weight: 700; margin-bottom: 14px; }
.series .row { display: flex; flex-wrap: wrap; gap: 16px; }
.series .row img { flex: none; height: 340px; width: auto; max-width: 100%; object-fit: contain; cursor: zoom-in; }

/* ---------- Varied-scale flow (Ceramics, Film Photos) ---------- */
.flow { display: flex; flex-direction: column; gap: 64px; padding-top: 64px; }
.piece-flow.left   { align-self: flex-start; }
.piece-flow.right  { align-self: flex-end; }
.piece-flow.center { align-self: center; }
.piece-flow img { width: 100%; cursor: zoom-in; will-change: transform; }
@media (max-width: 700px) { .flow { gap: 36px; } .bunch { columns: 2; column-gap: 8px; } .bunch img { margin-bottom: 8px; } }

/* ---------- Ceramics sections ---------- */
.cer-section { padding: 56px 0 0; margin: 0; border: 0; }
.cer-section:first-child { padding-top: 32px; }
.cer-title { font-size: clamp(28px, 3.6vw, 40px); font-weight: 600; margin-bottom: 20px;
             text-transform: none; position: relative; z-index: 2; }
.cer-section .flow { gap: 48px; }
.cap { break-inside: avoid; margin-bottom: 10px; }
/* "natural": photos keep the sizes you gave them */
.natural { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.natural img { width: 100%; cursor: zoom-in; }
.natural > img { flex: none; }
@media (max-width: 700px) { .natural > img { min-width: 40%; } }
.cap img { margin-bottom: 0; }
.cap figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
.cer-subtitle { font-size: 20px; font-style: italic; font-weight: 500;
                letter-spacing: -0.01em; margin: 36px 0 14px; color: var(--accent); }
.cer-caption { margin-top: 12px; font-size: 13px; color: var(--muted); letter-spacing: .02em; }
.cer-section .float { margin-top: 0; }
/* tight grouped cluster: photos keep their shape, packed in columns */
.bunch { columns: 3 220px; column-gap: 10px; }
.bunch img { width: 100%; margin-bottom: 10px; break-inside: avoid; cursor: zoom-in; }
/* one straight row, all the same height */
.row { display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); gap: 10px; }
.row img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; cursor: zoom-in; }
/* one photo with a caption */
.single { max-width: 560px; }
.single img { width: 100%; cursor: zoom-in; }

footer {
  padding: 48px 0 64px; margin-top: 64px;
  border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}

@media (max-width: 700px) {
  .hero { padding: 24px; min-height: 52vh; }
  .rows a { grid-template-columns: 1fr 30px; gap: 8px; }
  .rows .num { grid-column: 1 / -1; }
  .rows p { grid-column: 1 / -1; }
  .zines { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 28px 14px; }
  .more { grid-template-columns: repeat(2, 1fr); }
  .float { gap: 40px; }
  .float .piece[class*="z"] { width: 78%; margin: 0; }
  .float .piece.z1, .float .piece.z4 { align-self: flex-end; }
  .series .row img { height: 200px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}
