/* ==========================================================================
   Spadel + DEVIN Purpose Book — Bulgarian (Cyrillic) web edition
   ==========================================================================
   Typography: headings in Lora, a Cyrillic-capable serif chosen as the
   closest match to the original book's Fraunces (which has no Cyrillic);
   body and UI text in Noto Sans, the family devin-bg.com uses. Heading
   sizes follow the original PDF, which sets display type large and loose.
   Brand names are rendered as the real Spadel / DEVIN logos (see
   "Brand logos" below), not typed text.
   ========================================================================== */

:root {
  --navy: #272f5e;
  --cream: #faf8e3;
  --orange: #fab347;
  --orange-deep: #eda93e;
  --coral: #ea4855;
  --blue-deep: #233a88;
  --green: #c3daa6;
  --pink: #fad4cb;
  --pink-bg: #fcdbd4;
  --blue: #8fbae4;
  --tan: #fdd496;

  --font-display: "Lora", Georgia, "Times New Roman", serif;
  --font-body: "Noto Sans", Arial, Helvetica, sans-serif;

  --nav-h: 64px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--cream);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; }

section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 6vw calc(var(--nav-h) + 40px);
  overflow: hidden;
}

.page-badge {
  position: absolute;
  top: 50%;
  right: 22px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}

.on-photo .page-badge,
.on-dark .page-badge { background: var(--cream); color: var(--navy); }

/* ---------- footer nav ---------- */
.book-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--nav-h);
  background: var(--cream);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid rgba(39,47,94,.08);
}

.book-nav ol {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 0 16px;
  max-width: 1100px;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.book-nav ol::-webkit-scrollbar { display: none; }

.book-nav li { display: flex; align-items: center; gap: 18px; white-space: nowrap; }

.book-nav a {
  color: var(--navy);
  opacity: .45;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  transition: opacity .2s ease;
}

.book-nav a:hover { opacity: .75; }

.book-nav li.active a { opacity: 1; }

.book-nav .rule {
  width: 46px;
  height: 1px;
  background: var(--navy);
  opacity: .35;
  flex: none;
}

/* ==========================================================================
   Section variants
   ========================================================================== */

/* -- Cover -- */
#cover {
  background: url("../img/cover-hands.jpg") center 38% / cover no-repeat;
  color: var(--cream);
  align-items: flex-start;
  padding-bottom: 40px;
  min-height: 100vh;
}
.cover-mark {
  width: min(400px, 68vw);
  aspect-ratio: 240 / 358.4;
  background: url("../img/cover-loop.svg") center / 100% 100% no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 20px;
  text-align: center;
}
.cover-mark .cover-brands { font-size: clamp(1.5rem, 4vw, 2.1rem); }

.cover-mark .rule { width: 60px; height: 1.5px; background: var(--cream); opacity: .85; }
.cover-mark h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.3vw, 2.35rem);
  line-height: 1.1;
  line-height: 1.2;
  margin: 0;
}

/* -- Table of contents -- */
#toc {
  background-color: var(--green);
  background-image: var(--drop-pattern);
  background-size: 540px 344px;
  align-items: center;
}
.toc-mark {
  margin: 0 auto;
  width: min(420px, 78vw);
  aspect-ratio: 380 / 430;
  background: var(--cream);
  border-radius: 50% / 42%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 20px;
}
.toc-mark h2 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin: 0 0 6px;
}
.toc-mark .rule { width: 60px; height: 2px; background: var(--navy); opacity: .5; margin-bottom: 10px; }
.toc-mark a { color: var(--navy); text-decoration: none; font-size: clamp(1.05rem, 1.8vw, 1.3rem); font-weight: 500; }
.toc-mark a:hover { text-decoration: underline; }

/* -- Photo hero (Spadel's purpose / vision / values / purpose in action) -- */
.hero-photo {
  color: var(--cream);
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero-photo .circle {
  width: min(540px, 86vw);
  aspect-ratio: 283 / 293.2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8%;
  background:
    url("../img/hero-loop.svg") center / 100% 100% no-repeat,
    radial-gradient(closest-side, rgba(10,20,30,.4) 0%, rgba(10,20,30,.26) 60%, rgba(10,20,30,0) 100%);
}
.hero-photo h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.3rem, 4.6vw, 4rem);
  line-height: 1.08;
  margin: 0;
  text-shadow: 0 2px 14px rgba(0,0,0,.4), 0 1px 3px rgba(0,0,0,.5);
}
#hero-purpose { background: url("../img/purpose-girl-rock.jpg") center / cover no-repeat; align-items: flex-end; }
#hero-purpose .circle { margin-right: 8vw; }
/* Longest hero title — one step smaller so "Корпоративната" fits the loop */
#hero-purpose h2 { font-size: clamp(2rem, 3.6vw, 3.2rem); }
#hero-vision { background: url("../img/vision-eye.jpg") center / cover no-repeat; align-items: flex-end; }
#hero-vision .circle { margin-right: 8vw; }
#hero-values { background: url("../img/values-hands-water.jpg") center / cover no-repeat; align-items: flex-end; }
#hero-values .circle { margin-right: 8vw; }
#hero-action { background: url("../img/action-mud-boots.jpg") center / cover no-repeat; align-items: flex-end; }
#hero-action .circle { margin-right: 8vw; }

/* -- Quote pages -- */
.quote-page {
  align-items: center;
  text-align: center;
  color: var(--cream);
}
.quote-page .quote-mark {
  width: clamp(56px, 7vw, 92px);
  height: auto;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}
.quote-page blockquote {
  margin: 0;
  max-width: 720px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.6vw, 3rem);
  line-height: 1.2;
  line-height: 1.3;
}
.quote-page .kicker {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.6vw, 2.1rem);
  margin-bottom: clamp(1rem,3vw,2rem);
}

#quote-question {
  background: #29509e url("../img/quote-pattern.svg") center / cover no-repeat;
}

#quote-phrase {
  background: radial-gradient(ellipse at center, rgba(10,20,20,.45) 0%, rgba(10,20,20,.2) 60%, rgba(10,20,20,.12) 100%), url("../img/phrase-trees.jpg") center / cover no-repeat;
  text-shadow: 0 2px 18px rgba(0,0,0,.45), 0 1px 3px rgba(0,0,0,.5);
}
#quote-phrase .quote-mark { width: clamp(80px, 10vw, 130px); filter: drop-shadow(0 2px 10px rgba(0,0,0,.35)); }
#quote-phrase blockquote {
  max-width: 880px;
  font-size: clamp(2.2rem, 5.2vw, 4.6rem);
  line-height: 1.08;
}

/* -- What is a purpose (concentric rings) -- */
#what-is-purpose {
  background: var(--orange);
  color: var(--cream);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  padding-top: calc(56px + 40px);
}
#what-is-purpose .copy h2 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.4vw, 4.4rem);
  line-height: 1.02;
  margin: 0 0 20px;
}
#what-is-purpose .copy .rule { width: 50px; height: 2px; background: var(--cream); opacity: .8; margin-bottom: 20px; }
#what-is-purpose .copy p { max-width: 480px; line-height: 1.5; font-size: clamp(1.05rem, 1.5vw, 1.3rem); }

.rings {
  position: relative;
  width: min(540px, 100%);
  aspect-ratio: 396 / 445;
  margin: 0 auto;
  color: var(--cream);
  container-type: inline-size;
}
.rings svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring-label {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(.95rem, 4.4cqw, 1.6rem);
  line-height: 1.15;
}

/* -- Co-creating (word cloud + flow) -- */
#cocreate {
  background: var(--coral);
  color: var(--cream);
}
.cocreate-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 4vw;
  align-items: center;
}
.cocreate-copy h2 {
  font-size: clamp(2rem, 3.8vw, 3.4rem);
  line-height: 1.05;
  margin: 0 0 14px;
}
.cocreate-copy .subtitle { font-size: clamp(1.05rem, 1.6vw, 1.35rem); margin: 0 0 clamp(16px, 3vh, 36px); }
.cocreate-copy .journey { margin-left: 2vw; }

.journey {
  position: relative;
  width: min(480px, 100%, 44vh);
  min-width: 300px;
  aspect-ratio: 324 / 320;
  container-type: inline-size;
}
.journey svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.journey-line { fill: none; stroke: var(--navy); stroke-width: 4.1; }
.journey-dots circle { fill: var(--cream); }
.journey ol { list-style: none; margin: 0; padding: 0; }
.journey li {
  position: absolute;
  transform: translateY(-50%);
  font-size: clamp(.85rem, 3.9cqw, 1.1rem);
  line-height: 1.25;
}
.journey .j-end { max-width: 34%; text-align: right; font-weight: 700; color: var(--navy); }
.journey .j-in { max-width: 30%; text-align: right; }
.journey .j-out { max-width: 50%; }

.wordcloud { width: min(560px, 100%, 62vh); height: auto; margin: 0 auto; display: block; overflow: visible; }
.wordcloud text { fill: var(--cream); font-family: var(--font-body); font-weight: 400; text-anchor: middle; dominant-baseline: auto; }
.wordcloud text[transform] { text-anchor: middle; dominant-baseline: central; }

/* -- Six-panel grid (What does it mean) -- */
#meaning {
  padding: 0 0 var(--nav-h);
  min-height: 100vh;
}
.meaning-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: repeat(2, 1fr);
  min-height: calc(100vh - var(--nav-h));
}
.meaning-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(20px, 3vh, 48px) clamp(20px, 2.6vw, 48px);
}
/* Original sets these panel titles in a heavy geometric sans, not the serif */
.meaning-cell h3 {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(1.8rem, 2.8vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.meaning-cell p { max-width: 36em; font-size: clamp(.95rem, 1.02vw, 1.08rem); line-height: 1.5; margin: 0; }
.meaning-cell.intro { justify-content: center; }
.meaning-cell.intro h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 4.6vw, 4.4rem);
  letter-spacing: -0.01em;
  max-width: 7em;
}
.m-white { background: #fff; }
.m-green { background: var(--green); }
.m-pink { background: var(--pink); }
.m-tan { background: var(--tan); }
.m-blue { background: var(--blue); }
.m-cream { background: var(--cream); }

/* -- Manifesto -- */
#manifesto {
  background: url("../img/manifesto-bark.jpg") left center / cover no-repeat;
  align-items: flex-end;
}
.manifesto-badge {
  position: absolute;
  top: 56px;
  left: 6vw;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  color: var(--cream);
}
/* Tall cream oval traced from page 9 of the PDF. The Bulgarian text is
   long, so the oval is taller than one screen and the page scrolls past
   it (no inner scrollbar). Type is sized in container-query units, so the
   wrapping — and therefore the fit inside the curve — is the same at every
   width. */
#manifesto { padding-top: 40px; padding-bottom: calc(var(--nav-h) + 40px); }
.manifesto-mark {
  --oval-w: clamp(540px, 44vw, 700px);
  width: var(--oval-w);
  aspect-ratio: 289.7 / 512.8;
  margin-right: 5vw;
  background: url("../img/manifesto-oval.svg") center / 100% 100% no-repeat;
  container-type: inline-size;
  display: flex;
  align-items: center;
  justify-content: center;
  /* % padding would resolve against the section, not the oval */
  padding: 0 calc(var(--oval-w) * .16);
}
.manifesto-mark .scroll {
  font-size: 3.6cqw;
  line-height: 1.42;
  text-align: center;
}
.manifesto-mark p { margin: 0 0 .75em; }
.manifesto-mark .claim { font-family: var(--font-display); font-weight: 700; font-size: 1.12em; line-height: 1.3; margin-top: 1em; }

/* -- Vision focus areas -- */
#vision-detail {
  /* Same blob artwork as page 4, in the orange pair used on page 11 of the PDF */
  background: #f9b346 url("../img/vision-pattern.svg") center / cover no-repeat;
  color: var(--cream);
  text-align: center;
  align-items: center;
}
#vision-detail .eyebrow { font-size: clamp(1.2rem, 2vw, 1.7rem); font-weight: 800; margin: 0 0 20px; }
#vision-detail .rule { width: 1.5px; height: clamp(36px, 6vh, 64px); background: var(--cream); opacity: .9; margin: 0 auto 24px; }
#vision-detail .statement {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 3.9vw, 3.9rem);
  line-height: 1.1;
  max-width: 1240px;
  margin: 0 auto clamp(24px, 5vh, 48px);
}
#vision-detail .focus-title { font-family: var(--font-body); font-weight: 800; font-size: clamp(1.2rem, 2vw, 1.7rem); margin: 0 0 clamp(16px, 3vh, 28px); }
.focus-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  max-width: 1150px;
  margin: 0 auto;
}
.focus-grid .icon { width: auto; height: clamp(48px, 7vh, 72px); margin: 0 auto 12px; display: block; }
.focus-grid strong { display: block; font-weight: 800; font-size: clamp(1rem, 1.3vw, 1.2rem); margin-bottom: 2px; }
.focus-grid span { font-size: clamp(.92rem, 1.1vw, 1.05rem); display: block; line-height: 1.3; }

/* -- Values quadrants -- */
/* Page 13 follows the PDF: four colour quadrants, each with its line
   illustration (traced from the PDF) above a heavy-sans title and list,
   and a tall cream teardrop in the middle carrying the section title.
   Quadrant colours are the PDF's exact values — the illustrations use
   background-coloured fills to knock out lines, so they must match. */
#values-detail { padding: 0; min-height: 100vh; }
.values-grid {
  --grid-h: calc(100vh - var(--nav-h));
  --drop-h: calc(var(--grid-h) * .52);
  --drop-w: calc(var(--drop-h) * 195.1 / 297.3);
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  min-height: var(--grid-h);
}
.values-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: clamp(18px, 3vh, 36px) 4vw clamp(18px, 3vh, 32px);
}
/* keep text clear of the teardrop in the middle */
.values-cell.v-tan, .values-cell.v-green { padding-right: calc(var(--drop-w) / 2 + 3vw); }
.values-cell.v-blue, .values-cell.v-pink { padding-left: calc(var(--drop-w) / 2 + 3vw); }
.values-cell .illus { height: clamp(90px, 19vh, 210px); width: auto; margin-bottom: clamp(10px, 2vh, 22px); }
.values-cell h3 {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(1.1rem, 1.6vw, 1.5rem);
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
.values-cell ul { list-style: none; margin: 0; padding: 0; text-align: left; max-width: 34em; }
.values-cell li { position: relative; padding-left: 1.1em; font-size: clamp(.95rem, 1.15vw, 1.15rem); line-height: 1.35; margin-bottom: 2px; }
.values-cell li::before { content: "•"; position: absolute; left: 0; }
.v-tan { background: #fdd396; }
.v-blue { background: #8fbae3; }
.v-green { background: #c0daa7; }
.v-pink { background: #fad4cb; }
.values-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -46%);
  height: var(--drop-h);
  width: var(--drop-w);
  background: url("../img/values-drop.svg") center / 100% 100% no-repeat;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  /* % padding would resolve against the grid, not the drop */
  padding: 0 calc(var(--drop-w) * .1) calc(var(--drop-h) * .2);
  z-index: 3;
}
.values-center h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.3rem, 2.1vw, 2.1rem);
  line-height: 1.1;
  margin: 0;
}
.values-center .brand-pair { font-size: .85em; margin-top: .2em; }

/* -- Impact / purpose in action detail (page 15) --
   A fixed-ratio stage in the PDF's coordinate space: --pt is one PDF point
   in CSS px, and every block is placed with --l/--t/--w in points, so the
   composition (and the text wrapping) matches the original at any size. */
#impact {
  background-color: #fad4cb;
  background-image: var(--drop-pattern-pink);
  background-size: 540px 344px;
  padding: 0 0 var(--nav-h);
  justify-content: center;
}
.impact-stage {
  position: relative;
  width: min(100%, calc((100vh - var(--nav-h)) * 842 / 565));
  aspect-ratio: 842 / 565;
  margin: 0 auto;
  container-type: inline-size;
  --pt: calc(100cqw / 842);
  color: var(--navy);
  text-align: center;
}
.impact-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.impact-lines line { stroke: var(--navy); stroke-width: .9; }
.ip {
  position: absolute;
  left: calc(var(--pt) * var(--l));
  top: calc(var(--pt) * var(--t));
  width: calc(var(--pt) * var(--w));
  font-size: calc(var(--pt) * 13);
  line-height: 1.22;
  font-weight: 500;
}
.ip img { display: block; margin: 0 auto; height: auto; }
.ip p { margin: 0; }
.ip-bio p { margin-top: calc(var(--pt) * 13); font-size: calc(var(--pt) * 14); }
.ip-center h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: calc(var(--pt) * 30);
  line-height: 1.12;
}
.ip-more {
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--navy);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--pt) * 12);
}
.ip-more p { font-family: var(--font-display); font-weight: 700; font-size: calc(var(--pt) * 12.5); line-height: 1.15; }
.ip-pct strong { display: block; font-family: var(--font-display); font-weight: 700; font-size: calc(var(--pt) * 44); line-height: 1; margin-bottom: calc(var(--pt) * 4); }
.ip-natural p { font-size: calc(var(--pt) * 14); }
.ip-aws p { margin-top: calc(var(--pt) * 20); }
.ip-co2 p { margin-top: calc(var(--pt) * 4); font-size: calc(var(--pt) * 13.5); }
.ip-iso { font-size: calc(var(--pt) * 10.5); }
.ip-iso strong { display: block; font-weight: 700; margin-bottom: calc(var(--pt) * 2); }

/* -- Contact -- */
#contact {
  background: var(--navy);
  color: var(--cream);
  align-items: center;
  text-align: center;
  gap: clamp(24px, 5vh, 48px);
}
.contact-intro h2 { font-family: var(--font-display); font-size: clamp(2.4rem, 4.6vw, 3.6rem); margin: 0 0 12px; }
.contact-intro .rule { width: 60px; height: 2px; background: var(--cream); opacity: .6; margin: 0 auto 18px; }
.contact-intro p { margin: 0; font-size: clamp(1.05rem, 1.5vw, 1.3rem); line-height: 1.5; }
.contact-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 4vw, 56px);
}
.contact-mark {
  width: min(320px, 78vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--cream);
  color: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 30px;
}
.contact-mark .contact-logo { font-size: 2.4rem; }
.contact-mark .brand-devin.contact-logo { height: 1.4em; }
.contact-mark p { margin: 0; font-size: 1.02rem; line-height: 1.55; }
.contact-mark a { color: var(--navy); font-weight: 700; text-decoration: none; }
.contact-mark a:hover { text-decoration: underline; }

/* ==========================================================================
   Brand logos
   ==========================================================================
   Logos are sized in em so they scale with whatever text they sit in.
   On light surfaces they render in full brand colour; on photos and dark
   or saturated fills they switch to a single-colour knockout (mask +
   currentColor) so they stay legible, the same way the text around them does.
   ========================================================================== */
.brand {
  display: inline-block;
  height: 1em;
  vertical-align: -0.12em;
  background: var(--logo) center / contain no-repeat;
}
.brand-spadel { --logo: url("../img/spadel-logo.svg"); aspect-ratio: 99 / 48; height: 1.7em; vertical-align: -0.5em; }
.brand-devin  { --logo: url("../img/devin-logo.png"); aspect-ratio: 852 / 339; height: 1.02em; vertical-align: -0.16em; }

.brand-pair { display: inline-flex; align-items: center; gap: .3em; white-space: nowrap; vertical-align: middle; }
.brand-pair .brand { vertical-align: 0; }
/* Match DEVIN's width to the Spadel wordmark so the two read as equals */
.brand-pair .brand-devin { height: 1.4em; }
.brand-pair .brand-spadel { margin-top: .12em; }

.on-photo .brand,
.on-dark .brand,
#what-is-purpose .brand,
#vision-detail .brand {
  background: currentColor;
  -webkit-mask: var(--logo) center / contain no-repeat;
  mask: var(--logo) center / contain no-repeat;
}
/* Filters run before masking, so the shadow goes on the wrapper, not the
   masked logo itself — matches the text-shadow on the photo headings. */
.on-photo .brand-pair { filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)) drop-shadow(0 2px 12px rgba(0,0,0,.35)); }
.hero-photo .brand-pair { font-size: .9em; margin-top: .12em; }

/* Cream card sitting on a photo — back to full colour */
#manifesto .manifesto-mark .brand-pair { filter: none; }
#manifesto .manifesto-mark .brand,
#contact .contact-mark .brand {
  background: var(--logo) center / contain no-repeat;
  -webkit-mask: none;
  mask: none;
}

/* ==========================================================================
   Patterns (inline SVG data-uris) — drawn once, reused as backgrounds
   ========================================================================== */
:root {
  --drop-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='540' height='344' viewBox='0 0 540 344'%3E%3Cpath transform='translate(135 22)' d='M0 0C9 14 88 104 88 166A88 88 0 0 1-88 166C-88 104-9 14 0 0Z' fill='%23ffffff' opacity='.2'/%3E%3Cpath transform='translate(405 194)' d='M0 0C9 14 88 104 88 166A88 88 0 0 1-88 166C-88 104-9 14 0 0Z' fill='%23ffffff' opacity='.2'/%3E%3Cpath transform='translate(405 -150)' d='M0 0C9 14 88 104 88 166A88 88 0 0 1-88 166C-88 104-9 14 0 0Z' fill='%23ffffff' opacity='.2'/%3E%3C/svg%3E");
  --drop-pattern-pink: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='540' height='344' viewBox='0 0 540 344'%3E%3Cpath transform='translate(135 22)' d='M0 0C9 14 88 104 88 166A88 88 0 0 1-88 166C-88 104-9 14 0 0Z' fill='%23fbdbd3'/%3E%3Cpath transform='translate(405 194)' d='M0 0C9 14 88 104 88 166A88 88 0 0 1-88 166C-88 104-9 14 0 0Z' fill='%23fbdbd3'/%3E%3Cpath transform='translate(405 -150)' d='M0 0C9 14 88 104 88 166A88 88 0 0 1-88 166C-88 104-9 14 0 0Z' fill='%23fbdbd3'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  section { padding: 40px 6vw calc(var(--nav-h) + 30px); }

  #what-is-purpose { grid-template-columns: 1fr; text-align: center; padding-top: 40px; }
  #what-is-purpose .copy .rule { margin-left: auto; margin-right: auto; }
  #what-is-purpose .copy p { margin-left: auto; margin-right: auto; }

  .cocreate-grid { grid-template-columns: 1fr; }
  .journey { margin: 0 auto; }
  .wordcloud { margin-top: 30px; width: min(420px, 100%); }

  .meaning-grid { grid-template-columns: 1fr; grid-template-rows: none; }
  .meaning-cell { padding: 34px 8vw; }

  .values-grid { grid-template-columns: 1fr; grid-template-rows: none; background: #8fbae3; }
  .values-center { position: static; transform: none; width: min(240px, 62vw); height: auto; aspect-ratio: 195.1 / 297.3; margin: 28px auto; order: -1; padding: 0 16px 60px; }
  .values-cell.v-tan, .values-cell.v-green, .values-cell.v-blue, .values-cell.v-pink { padding: 36px 7vw; }

  .focus-grid { grid-template-columns: repeat(2, 1fr); row-gap: 30px; }

  /* Phones: the stage is too small to read, so blocks stack in order */
  #impact { padding: 40px 6vw calc(var(--nav-h) + 30px); }
  .impact-stage { width: 100%; aspect-ratio: auto; --pt: 1.25px; display: flex; flex-direction: column; align-items: center; gap: 30px; }
  .impact-lines { display: none; }
  .ip { position: static; width: min(100%, 320px); }
  .ip-center { order: -1; }
  .ip-more { width: 150px; }

  .manifesto-mark { width: 90vw; aspect-ratio: auto; margin: 110px auto 40px; padding: 9vw 7vw; background: var(--cream); border-radius: 44% / 9%; }
  .manifesto-mark .scroll { font-size: clamp(.85rem, 3.6vw, 1rem); line-height: 1.5; }
  #manifesto { justify-content: center; }
  .manifesto-badge { left: 50%; transform: translateX(-50%); text-align: center; }

  /* Pushed toward the top of the frame: centering vertically put the
     cream text directly over the skin-tone hands in several of the hero
     photos (esp. #hero-purpose), which killed contrast on narrow crops. */
  .hero-photo { align-items: center !important; justify-content: flex-start !important; padding-top: 12vh !important; }
  .hero-photo .circle { margin: 0 !important; }

  /* Badge is absolute-positioned against the section box, which can be much
     taller than the viewport once content stacks on mobile — top:50% then
     drifts into arbitrary content instead of staying in a safe corner. */
  .page-badge { top: 16px; right: 16px; transform: none; }
}

@media (max-width: 560px) {
  .book-nav ol { gap: 10px; justify-content: flex-start; }
  .book-nav .rule { width: 20px; }
  .book-nav a { font-size: 12px; }
}
