/* ============================================================================
   Kolumbán Rita — Warm Editorial Gallery
   One stylesheet: tokens · base · type · components · responsive · motion
   ========================================================================== */

/* ----- Fonts (self-hosted variable woff2) -------------------------------- */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/fraunces-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/fraunces-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* True italic Fraunces (weight axis) — pull-quotes + hero accent use font-style:
   italic; without these the browser would synthesize a faux slant. */
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/fraunces-latin-wght-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/fraunces-latin-ext-wght-italic.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'InterV';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'InterV';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Display-only brush script for the painted book page (Caveat, SIL OFL).
   The ONE script webfont — used for theme words + palette caption, never body. */
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/caveat-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/caveat-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ----- Tokens ------------------------------------------------------------ */
:root {
  /* warm paper canvas + tinted neutrals */
  --paper: #faf6ef;
  --paper-2: #f3ecde;
  --paper-3: #ece2d0;
  --card: #fffdf8;
  --ink: #283943;
  --ink-soft: #5b6a72;
  --line: rgba(40, 57, 67, 0.14);
  --line-strong: rgba(40, 57, 67, 0.28);

  /* brand accents */
  --teal: #2f8f7b; /* decorative / fills */
  --teal-deep: #1f6a5a; /* interactive text + button bg (AA on paper / white on it) */
  --teal-tint: #dcefe8;
  --terra: #c2563a; /* warm accent */
  --terra-deep: #a8472b;
  --terra-tint: #f6e3da;

  /* type */
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'InterV', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --script: 'Caveat', 'Segoe Script', 'Bradley Hand', cursive; /* display-only hand lettering */

  --step--1: clamp(0.82rem, 0.79rem + 0.16vw, 0.92rem);
  --step-0: clamp(1.02rem, 0.98rem + 0.22vw, 1.15rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.5rem);
  --step-2: clamp(1.45rem, 1.3rem + 0.75vw, 2rem);
  --step-3: clamp(1.75rem, 1.5rem + 1.25vw, 2.7rem);
  --step-4: clamp(2.1rem, 1.7rem + 2vw, 3.6rem);
  --step-5: clamp(2.6rem, 1.9rem + 3.4vw, 5.2rem);

  /* spacing (fluid) */
  --sp-1: 0.5rem;
  --sp-2: 0.85rem;
  --sp-3: 1.25rem;
  --sp-4: 2rem;
  --sp-5: clamp(2.5rem, 1.8rem + 3vw, 4.5rem);
  --sp-6: clamp(3.5rem, 2.4rem + 5vw, 7rem);
  --sp-7: clamp(5rem, 3rem + 8vw, 10rem);

  --wrap: 1240px;
  --wrap-narrow: 760px;
  --radius: 4px;
  --radius-lg: 10px;
  --shadow: 0 1px 2px rgba(40, 57, 67, 0.06), 0 12px 30px -18px rgba(40, 57, 67, 0.28);
  --shadow-lift: 0 2px 6px rgba(40, 57, 67, 0.08), 0 26px 50px -24px rgba(40, 57, 67, 0.36);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 0.5s;

  /* expanded muted artist paint palette — scroll-bloom on konyvek.html */
  --paint-teal: #2f8f7b; /* anchor cool (brand) */
  --paint-terra: #c2563a; /* anchor warm (brand) */
  --paint-ochre: #c79a4e; /* sunlit margin wash */
  --paint-rose: #c08a86; /* dusty rose */
  --paint-sage: #8fa07c; /* ambient sage */
  --paint-indigo: #5d6b8a; /* dark-band glow */
  /* saturated variants — DECORATION ONLY (strokes, splatters, gesture blobs,
     vivid swatches). Never used for any text colour, so AA is unaffected. */
  --paint-teal-vivid: #1f9e84;
  --paint-terra-vivid: #d9532f;
  --paint-ochre-vivid: #e0a83f;
  --paint-rose-vivid: #d56f7e;
  --paint-sage-vivid: #7fae5e;
  --paint-indigo-vivid: #4d63b0;
  /* deep, AA-legible per-theme tones — used ONLY for the spread numerals (large
     display text), so the coloured "01–04" reads clearly over its own pigment.
     (teal already has --teal-deep.) */
  --paint-rose-deep: #8f4d54;
  --paint-indigo-deep: #3f4f7a;
  --paint-sage-deep: #566a3c;
  --paint-o: 0.22; /* on-paper bloom opacity (per-blob overridable; margins only, AA-safe) */
  --paint-o-ink: 0.34; /* dark-band bloom opacity (screen blend on dark ink) */
  /* alpha brush-edge mask for the painted-in cover wipe (feTurbulence-frayed) */
  --brush-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='220' viewBox='0 0 320 220' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='0'%3E%3Cstop offset='0' stop-color='%23000' stop-opacity='1'/%3E%3Cstop offset='0.4' stop-color='%23000' stop-opacity='1'/%3E%3Cstop offset='0.55' stop-color='%23000' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='%23000' stop-opacity='0'/%3E%3C/linearGradient%3E%3Cfilter id='r' x='-20%25' y='-30%25' width='140%25' height='160%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.014 0.05' numOctaves='2' seed='7' result='n'/%3E%3CfeDisplacementMap in='SourceGraphic' in2='n' scale='40' xChannelSelector='R' yChannelSelector='G'/%3E%3C/filter%3E%3C/defs%3E%3Crect width='320' height='220' fill='url(%23g)' filter='url(%23r)'/%3E%3C/svg%3E");
}

/* ----- Reset / base ------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* contain the off-canvas mobile nav drawer (translateX(100%)) so it can't
     create horizontal scroll; clip (not hidden) keeps the sticky header working */
  overflow-x: clip;
}
body {
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img,
picture,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: var(--teal-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s var(--ease);
}
a:hover {
  color: var(--terra-deep);
}
:focus-visible {
  outline: 2.5px solid var(--teal-deep);
  outline-offset: 3px;
  border-radius: 2px;
}
::selection {
  background: var(--teal-tint);
  color: var(--ink);
}

/* ----- Typography -------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 460;
  line-height: 1.08;
  letter-spacing: -0.012em;
  color: var(--ink);
  text-wrap: balance;
  /* long Hungarian compound words must break/hyphenate, else their min-content
     width overflows narrow phones and the end is clipped by body{overflow-x:hidden} */
  overflow-wrap: break-word;
  hyphens: auto;
}
h1 {
  font-size: var(--step-5);
  font-weight: 420;
}
h2 {
  font-size: var(--step-4);
}
h3 {
  font-size: var(--step-2);
  line-height: 1.15;
}
h4 {
  font-size: var(--step-1);
}
p,
li,
blockquote {
  text-wrap: pretty;
  overflow-wrap: break-word;
  hyphens: auto;
}
.lead {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-soft);
  font-weight: 380;
}
.eyebrow {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-deep);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: '';
  width: 1.8em;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.eyebrow.center::before {
  display: none;
}

/* ----- Layout ------------------------------------------------------------ */
.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}
.wrap.narrow {
  width: min(100% - 2.5rem, var(--wrap-narrow));
}
.section {
  padding-block: var(--sp-7);
}
.section.tight {
  padding-block: var(--sp-6);
}
/* the contact CTA sits directly above the dark footer — trim its bottom padding
   so the two dark blocks don't sandwich a big empty void */
.section.tight.section--contact {
  padding-bottom: var(--sp-4);
}
.section--paper2 {
  background: var(--paper-2);
}
.section--ink {
  background: var(--ink);
  color: var(--paper);
}
.section--ink h1,
.section--ink h2,
.section--ink h3 {
  color: var(--paper);
}
.section--ink .lead {
  color: rgba(250, 246, 239, 0.78);
}
.section-head {
  max-width: 56ch;
  margin-bottom: var(--sp-5);
  display: grid;
  gap: var(--sp-2);
}
.section-head.center {
  margin-inline: auto;
  text-align: center;
  justify-items: center;
}

/* ----- Buttons ----------------------------------------------------------- */
.btn {
  --bg: var(--teal-deep);
  --fg: #fff;
  font-family: var(--sans);
  font-size: var(--step-0);
  font-weight: 560;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.95em 1.5em;
  border: 1px solid var(--bg);
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.2s var(--ease);
}
.btn:hover {
  color: var(--fg);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.btn .arrow {
  transition: transform 0.25s var(--ease);
}
.btn:hover .arrow {
  transform: translateX(4px);
}
.btn--terra {
  --bg: var(--terra-deep);
}
.btn--ghost {
  --bg: transparent;
  --fg: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover {
  --fg: var(--teal-deep);
  border-color: var(--teal-deep);
  box-shadow: none;
}
.btn--light {
  --bg: var(--paper);
  --fg: var(--ink);
}
/* Floating back-to-top — built in JS, present on every page. Hidden until the
   visitor is ~a screenful down (.show toggled in main.js). Sits below the header
   (z-index:200) and the mobile drawer. */
.to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 90;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--teal-deep);
  border-radius: 999px;
  background: var(--teal-deep);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: translateY(0.75rem);
  pointer-events: none;
  box-shadow: var(--shadow);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), background 0.2s var(--ease);
}
.to-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.to-top:hover {
  background: var(--ink);
  border-color: var(--ink);
  transform: translateY(-2px);
}
.to-top:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  .to-top {
    transition: opacity 0.3s var(--ease);
    transform: none;
  }
  .to-top.show,
  .to-top:hover {
    transform: none;
  }
}
.textlink {
  font-weight: 560;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  text-decoration: none;
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 1px;
}
.textlink .arrow {
  transition: transform 0.25s var(--ease);
}
.textlink:hover .arrow {
  transform: translateX(3px);
}

/* ----- Skip link --------------------------------------------------------- */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 0.7em 1.2em;
  border-radius: 0 0 var(--radius) 0;
  font-weight: 600;
}
.skip:focus {
  left: 0;
}

/* ----- Header / nav ------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.scrolled {
  border-bottom-color: var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-block: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}
.brand img {
  height: 34px;
  width: auto;
}
.brand b {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.32rem;
  letter-spacing: -0.01em;
}
/* keep the wordmark on one line where the full horizontal nav sits beside it;
   below 901px the drawer frees the row, and a wrap-capable brand avoids pushing
   the menu button off very narrow phones */
@media (min-width: 901px) {
  .brand b {
    white-space: nowrap;
  }
}
.brand span {
  display: block;
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 2.1rem);
  list-style: none;
  padding: 0;
  margin-left: auto; /* push the link group + language switch to the right of the brand */
}
.nav-links a {
  font-size: 0.96rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  position: relative;
  padding-block: 0.3em;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background: var(--teal-deep);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav-links a:hover::after,
.nav-links a[aria-current='page']::after {
  transform: scaleX(1);
}
.nav-links a[aria-current='page'] {
  color: var(--teal-deep);
}
/* the CTA is an <a> inside .nav-links — restore button colours over the nav link colour */
.nav-links a.btn,
.nav-links a.btn:hover {
  color: var(--fg);
}
.nav-links a.btn::after {
  display: none;
}
.nav-cta {
  margin-left: 0.5rem;
}
/* ---- Language switch (HU / EN) — always visible in the header ---- */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: none;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 55%, transparent);
}
.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.05em;
  padding: 0.2em 0.5em;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--ink-soft);
  text-decoration: none;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.lang-switch a:hover {
  color: var(--ink);
}
.lang-switch a[aria-current='true'] {
  background: var(--teal-deep);
  color: #fff;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}
.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}
.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ----- Hero -------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(2.5rem, 1rem + 6vw, 6rem) var(--sp-6);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
}
.hero-copy {
  display: grid;
  gap: var(--sp-3);
  max-width: 38ch;
}
.hero h1 {
  margin-block: 0.1em 0.05em;
}
.hero .accent {
  color: var(--terra-deep);
  font-style: italic;
}
.hero-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em 0.9em;
  font-size: var(--step--1);
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  text-transform: uppercase;
  font-weight: 600;
}
.hero-roles li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.9em;
}
.hero-roles li + li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}
.hero-figure {
  position: relative;
}
.hero-figure img {
  width: 100%;
  height: clamp(340px, 52vw, 600px);
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
}
.hero-figure::after {
  /* painterly frame accent */
  content: '';
  position: absolute;
  inset: auto -14px -14px auto;
  width: 62%;
  height: 62%;
  border: 1.5px solid var(--teal);
  border-radius: var(--radius-lg);
  z-index: -1;
}

/* ----- Hero slideshow: crossfade stack + controls ----------------------- */
.hero-figure[data-hero-rotator] {
  isolation: isolate; /* keep controls above frames, ::after frame behind */
}
/* base frame stays in flow (defines the box height via .hero-figure img);
   the others stack on top and crossfade by opacity */
.hero-figure .hero-frame:not(.is-base) {
  position: absolute;
  inset: 0;
  height: 100%;
  opacity: 0;
  box-shadow: none; /* only the base carries --shadow-lift → no stacked shadows */
  transition: opacity 1.2s var(--ease);
}
.hero-figure .hero-frame.is-active {
  opacity: 1;
}
.hero-ui {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--sp-3);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0 var(--sp-3);
  pointer-events: none; /* only the dots themselves are interactive */
}
.hero-ui > * {
  pointer-events: auto;
}
.hero-dot:focus-visible {
  outline: 2px solid var(--terra-deep);
  outline-offset: 2px;
}
.hero-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.hero-dot {
  width: 0.62rem;
  height: 0.62rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 65%, var(--terra-deep) 35%);
  opacity: 0.6;
  cursor: pointer;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), background 0.2s var(--ease);
}
.hero-dot:hover {
  opacity: 0.9;
}
.hero-dot.is-current {
  background: var(--terra-deep);
  opacity: 1;
  transform: scale(1.25);
}
/* No-JS fallback: keep the static first frame, hide the (inert) controls */
html:not(.js) .hero-ui {
  display: none;
}

/* ----- Generic media + cards -------------------------------------------- */
figure {
  margin: 0;
}
.frame {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--paper-3);
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.frame.hoverable:hover img {
  transform: scale(1.04);
}

/* ----- Featured book (home) — "Milyen szín lennél?" --------------------- */
.feature-book {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(1.75rem, 4vw, 4.5rem);
  align-items: center;
}
.feature-copy {
  display: grid;
  gap: var(--sp-3);
  max-width: 46ch;
}
/* photo trio: first image spans the top, the other two sit side-by-side below */
.covers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.6rem, 1.5vw, 1rem);
  align-content: start;
}
.covers button {
  padding: 0;
  border: 0;
  background: var(--paper-3);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  width: 100%;
  aspect-ratio: 1 / 1;
}
.covers button:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 3 / 2;
}
.covers button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease);
}
.covers button:hover img {
  transform: scale(1.05);
}
/* two stacked feature rows with breathing room between them */
.feature-books {
  display: grid;
  gap: clamp(3rem, 7vw, 6rem);
}
/* alternating row: copy on the left, covers on the right — keep copy on the wider track */
.feature-book--reverse {
  grid-template-columns: 1.08fr 0.92fr;
}
.feature-book--reverse .feature-copy {
  order: 1;
}
.feature-book--reverse .covers {
  order: 2;
}

/* ----- Books / shop ------------------------------------------------------ */
.book {
  display: grid;
  grid-template-columns: 0.68fr 1.32fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
  padding-block: var(--sp-6);
  border-top: 1px solid var(--line);
}
.book:first-of-type {
  border-top: 0;
}
.book-figures {
  position: sticky;
  top: 90px;
  display: grid;
  gap: var(--sp-3);
  justify-items: start;
}
.book-figures figure {
  margin: 0;
}
.book-figures button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: var(--radius);
}
/* images shown at their TRUE proportions (aspect-ratio is set inline per image) — never cropped */
.book-figures img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  background: var(--card);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.book-cover {
  width: 100%;
}
.book-cover img {
  box-shadow: var(--shadow-lift);
}
.book-previews {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
  width: 100%;
}
.book-previews img {
  box-shadow: var(--shadow);
}
.book-figures button:hover img {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}
.book-body {
  display: grid;
  gap: var(--sp-3);
}
.book-body .price {
  font-family: var(--serif);
  font-size: var(--step-2);
  color: var(--teal-deep);
}
.book-body .price small {
  font-family: var(--sans);
  font-size: var(--step--1);
  color: var(--ink-soft);
  font-weight: 500;
}
.book-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em 0.8em;
  font-size: var(--step--1);
}
.tag {
  background: var(--teal-tint);
  color: var(--teal-deep);
  padding: 0.35em 0.8em;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.tag--terra {
  background: var(--terra-tint);
  color: var(--terra-deep);
}
/* "coming soon" tag — muted, with a hover/focus tooltip (title= is the fallback) */
.tag--soon {
  position: relative;
  background: var(--line);
  color: var(--ink-soft);
  cursor: help;
}
.tag--soon::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  transform: translate(-50%, 4px);
  padding: 0.3em 0.7em;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  z-index: 6;
}
.tag--soon::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 3px);
  transform: translate(-50%, 4px);
  border: 5px solid transparent;
  border-top-color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  z-index: 6;
}
.tag--soon:hover::after,
.tag--soon:focus-visible::after,
.tag--soon:hover::before,
.tag--soon:focus-visible::before {
  opacity: 1;
  transform: translate(-50%, 0);
}
.tag--soon:focus-visible {
  outline: 2px solid var(--teal-deep);
  outline-offset: 2px;
}

/* ----- Order form -------------------------------------------------------- */
.order {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.2rem, 3vw, 2rem);
  box-shadow: var(--shadow);
  display: grid;
  gap: var(--sp-3);
}
.order h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: var(--step-0);
  letter-spacing: 0.01em;
}
.field {
  display: grid;
  gap: 0.4em;
}
.field label {
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--ink-soft);
}
.field input,
.field textarea {
  font: inherit;
  font-size: 0.96rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.7em 0.85em;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal-deep);
  box-shadow: 0 0 0 3px var(--teal-tint);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}
.order .hint {
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.order .hint a {
  white-space: nowrap;
}
[hidden] {
  display: none !important;
}

/* ===== Könyvek storefront (editorial showcase) + book detail pages =========
   Bolder, on-brand: larger display type, editorial asymmetry, dramatic covers.
   Built strictly on existing tokens — no new colour system. */

/* ----- Storefront listing (konyvek.html) -------------------------------- */
.store-intro {
  max-width: 44rem;
}
.store-intro h1 {
  font-size: clamp(2.6rem, 1.7rem + 4vw, 5rem);
  line-height: 1.05;
}
.store-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
/* editorial asymmetry: the second panel drops on desktop */
.store-card:nth-child(even) {
  margin-top: var(--sp-6);
}
.store-card {
  display: grid;
  gap: var(--sp-3);
}
.store-card-media {
  display: block;
  border-radius: var(--radius-lg);
}
.store-cover {
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.store-card-media:hover .store-cover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
}
.store-card-body {
  display: grid;
  gap: var(--sp-2);
  justify-items: start;
}
.store-title {
  font-size: var(--step-3);
  line-height: 1.08;
}
.store-title a {
  text-decoration: none;
  color: inherit;
  background-image: linear-gradient(var(--teal-deep), var(--teal-deep));
  background-size: 0% 1.5px;
  background-repeat: no-repeat;
  background-position: left 92%;
  transition: background-size 0.4s var(--ease), color 0.3s var(--ease);
}
.store-card-media:hover ~ .store-card-body .store-title a,
.store-title a:hover {
  color: var(--teal-deep);
  background-size: 100% 1.5px;
}
.store-blurb {
  color: var(--ink-soft);
  font-size: var(--step-0);
  max-width: 44ch;
}
.store-actions {
  margin-top: var(--sp-1);
}

/* ----- Breadcrumb (detail pages) ---------------------------------------- */
.crumb {
  display: flex;
  align-items: center;
  gap: 0.6em;
  flex-wrap: wrap;
  font-size: var(--step--1);
  color: var(--ink-soft);
  padding-top: var(--sp-4);
}
.crumb a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.crumb a:hover {
  color: var(--teal-deep);
  border-color: currentColor;
}
.crumb [aria-current] {
  color: var(--ink);
  font-weight: 600;
}

/* ----- Book detail hero ------------------------------------------------- */
.book-hero {
  padding-top: var(--sp-4);
}
.book-hero-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.book-hero-media {
  justify-self: center;
  width: 100%;
  max-width: 440px;
}
.book-hero-media button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: var(--radius);
}
.book-hero-media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.book-hero-media button:hover img {
  transform: translateY(-4px) scale(1.01);
}
.book-hero-copy {
  display: grid;
  gap: var(--sp-3);
  align-content: center;
}
.book-hero-title {
  font-size: clamp(2.6rem, 1.8rem + 4vw, 5.2rem);
  line-height: 1.03;
}
/* The "én | alkotás | öngondoskodás" lockup is long — keep it from overflowing. */
.book-hero-title.enalk-title {
  font-size: clamp(2rem, 1.4rem + 3vw, 3.4rem);
}
/* Co-authored byline under the title/subtitle (Bársonyon book hero). */
.book-byline {
  font-family: var(--sans);
  font-size: var(--step-0);
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0;
}

/* ----- Book detail: preview gallery, TOC, price, quote, author ---------- */
.book-gallery .gallery {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.toc-box {
  display: grid;
  gap: var(--sp-3);
}
.toc-list {
  list-style: none;
  display: grid;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
}
.toc-list li {
  position: relative;
  padding-left: 1.8em;
  font-size: var(--step-0);
  line-height: 1.5;
}
/* painterly organic marker (echoes the watercolour blobs) */
.toc-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 0.7em;
  height: 0.7em;
  background: var(--terra);
  border-radius: 47% 53% 60% 40% / 55% 45% 58% 42%;
}
/* contributors list on the Rólam page — reuses the watercolour-blob marker */
.people-list {
  list-style: none;
  display: grid;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
}
.people-list li {
  position: relative;
  padding-left: 1.8em;
  font-size: var(--step-0);
  line-height: 1.55;
}
.people-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 0.7em;
  height: 0.7em;
  background: var(--terra);
  border-radius: 47% 53% 60% 40% / 55% 45% 58% 42%;
}
.people-list strong {
  color: var(--ink);
}
.price-box {
  display: grid;
  gap: var(--sp-2);
  justify-items: start;
  margin-bottom: var(--sp-4);
}
.price-box .price {
  font-family: var(--serif);
  font-size: var(--step-2);
  color: var(--teal-deep);
}
.price-box .price small {
  font-family: var(--sans);
  font-size: var(--step--1);
  color: var(--ink-soft);
  font-weight: 500;
}
.sample-link {
  margin-bottom: var(--sp-3);
}
.reader-quote {
  position: relative;
  font-family: var(--serif);
  font-size: var(--step-2);
  line-height: 1.35;
  font-style: italic;
  color: var(--ink);
  border-left: 4px solid var(--terra);
  padding: var(--sp-2) 0 var(--sp-2) var(--sp-4);
  margin: 0 0 var(--sp-2);
  max-width: 42ch;
}
.reader-quote p {
  font-size: inherit;
  margin: 0;
}
.reader-quote::before {
  content: '\201C';
  position: absolute;
  left: 0.15em;
  top: -0.12em;
  font-size: 3em;
  line-height: 1;
  color: var(--terra-tint);
  z-index: -1;
}
.reader-quote cite {
  display: block;
  margin-top: 0.6em;
  font: 600 var(--step--1) / 1 var(--sans);
  font-style: normal;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.author-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-4);
  align-items: start;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
}
.author-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--paper-3);
}
.author-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Rita's portrait is a 4:5 upper-body crop; keep the round avatar on her face */
  object-position: top;
  display: block;
}
.author-note-body {
  display: grid;
  gap: var(--sp-2);
  justify-items: start;
}
.back-shop {
  margin-top: var(--sp-5);
}

/* ----- Storefront / detail responsive ----------------------------------- */
@media (max-width: 900px) {
  .store-grid,
  .book-hero-grid {
    grid-template-columns: 1fr;
  }
  .store-card:nth-child(even) {
    margin-top: 0;
  }
  .book-hero-media {
    order: -1;
    max-width: 340px;
  }
}
@media (max-width: 640px) {
  .author-note {
    grid-template-columns: 1fr;
    gap: var(--sp-3);
  }
}

/* ----- Project gallery (index) ------------------------------------------ */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1.6rem, 3vw, 2.6rem) clamp(1rem, 2.5vw, 1.8rem);
}
.proj-card {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
}
.proj-card.feature {
  grid-column: span 6;
}
.proj-card .frame {
  aspect-ratio: 4/3;
  box-shadow: var(--shadow);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.proj-card.feature .frame {
  aspect-ratio: 16/10;
}
.proj-card:hover .frame,
.proj-card:focus-visible .frame {
  box-shadow: var(--shadow-lift);
  transform: translateY(-4px);
}
.cap-over {
  font-family: var(--sans);
  font-size: var(--step--1);
  letter-spacing: 0.03em;
  color: var(--ink-soft);
}
.cap-over b {
  color: var(--teal-deep);
  font-weight: 600;
}
.cap-title {
  font-family: var(--serif);
  font-size: var(--step-0);
  font-weight: 500;
  line-height: 1.25;
  color: var(--ink);
  /* clamp to 2 lines and reserve that height so every card aligns (no CLS) */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
  transition: color var(--dur) var(--ease);
}
.proj-card.feature .cap-title {
  font-size: var(--step-1);
}
.proj-card:hover .cap-title,
.proj-card:focus-visible .cap-title {
  color: var(--teal-deep);
}

/* ----- Project detail ---------------------------------------------------- */
.proj {
  padding-block: var(--sp-6);
  border-top: 1px solid var(--line);
  scroll-margin-top: 90px;
}
/* the first detail article sits exactly at the paper2 background change — that
   colour shift already separates it, so the hairline on top reads as a stray line */
.section--paper2 .proj:first-of-type {
  border-top: 0;
}
/* Landing cue for the project you jump to from an index card. The heading tint
   is static so it survives prefers-reduced-motion; the soft wash is a one-shot
   fade that draws the eye then settles (the global reduced-motion block at the
   foot of this file collapses the animation to nothing). */
.proj:target {
  animation: proj-land 1.6s var(--ease) both;
}
.proj:target .proj-head h2 {
  color: var(--teal-deep);
}
@keyframes proj-land {
  from {
    background-color: var(--teal-tint);
  }
  to {
    background-color: transparent;
  }
}
.proj-head {
  display: grid;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}
.proj-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em 1.4em;
  font-size: var(--step--1);
  color: var(--ink-soft);
  padding: var(--sp-2) 0;
  border-block: 1px solid var(--line);
}
.proj-facts b {
  color: var(--ink);
  font-weight: 600;
}
.proj-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}
.proj-story p {
  margin-bottom: 1em;
}
.proj-quote {
  font-family: var(--serif);
  font-size: var(--step-1);
  line-height: 1.4;
  font-style: italic;
  color: var(--ink);
  border-left: 3px solid var(--teal);
  padding-left: var(--sp-3);
  margin-top: var(--sp-3);
}
.proj-quote cite {
  display: block;
  margin-top: 0.6em;
  font: 600 var(--step--1) / 1 var(--sans);
  font-style: normal;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-2);
}
.gallery button {
  padding: 0;
  border: 0;
  background: var(--paper-3);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), opacity 0.3s var(--ease);
}
.gallery button:hover img {
  transform: scale(1.05);
}
/* Story galleries: JS (fitGalleries) shows exactly enough photos to match the
   story-text height, then stretches the visible rows to fill it so the columns
   end together. Every thumbnail stays in the DOM, so the lightbox covers all. */
.proj-gallery button {
  position: relative;
}
/* before JS runs (.js set synchronously), cap height so there's no tall flash */
.js .proj-gallery:not(.is-fitted) button:nth-child(n + 9) {
  display: none;
}
/* once fitted, the 1fr grid rows set tile height — drop the square ratio */
.proj-gallery.is-fitted button {
  aspect-ratio: auto;
}
/* the last visible tile carries a "+N" badge that opens the full lightbox */
.proj-gallery button.is-more::after {
  content: attr(data-more);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--ink) 58%, transparent);
  color: var(--paper);
  font: 600 var(--step-2) / 1 var(--serif);
  letter-spacing: 0.01em;
  transition: background var(--dur) var(--ease);
}
.proj-gallery button.is-more:hover::after {
  background: color-mix(in srgb, var(--ink) 42%, transparent);
}

/* ----- Lightbox ---------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--ink) 92%, black);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}
.lightbox.open {
  opacity: 1;
  visibility: visible;
}
.lightbox img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  transform: scale(0.97);
  transition: transform 0.35s var(--ease);
}
.lightbox.open img {
  transform: scale(1);
}
.lb-btn {
  position: absolute;
  background: rgba(250, 246, 239, 0.1);
  color: var(--paper);
  border: 1px solid rgba(250, 246, 239, 0.3);
  width: 52px;
  height: 52px;
  border-radius: 999px;
  font-size: 1.5rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s var(--ease);
}
.lb-btn:hover {
  background: rgba(250, 246, 239, 0.22);
  color: var(--paper);
}
.lb-close {
  top: 1.2rem;
  right: 1.2rem;
}
.lb-prev {
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
}
.lb-next {
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
}
.lb-count {
  position: absolute;
  bottom: 1.3rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(250, 246, 239, 0.8);
  font-size: var(--step--1);
  letter-spacing: 0.1em;
}

/* ----- Inline PDF viewer (publications) --------------------------------- */
.pdfbox {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  padding: clamp(0.5rem, 3vw, 2.4rem);
  background: color-mix(in srgb, var(--ink) 92%, black);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}
.pdfbox.open {
  opacity: 1;
  visibility: visible;
}
.pdfbox-panel {
  width: min(100%, 1000px);
  height: min(94vh, 100%);
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  transform: scale(0.98);
  transition: transform 0.35s var(--ease);
}
.pdfbox.open .pdfbox-panel {
  transform: none;
}
.pdfbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex: none;
  padding: 0.55rem 0.7rem 0.55rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.pdfbox-title {
  font-weight: 600;
  font-size: var(--step--1);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.pdfbox-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: none;
}
.pdfbox-open {
  font-size: var(--step--1);
  white-space: nowrap;
}
.pdfbox-close {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s var(--ease);
}
.pdfbox-close:hover {
  background: var(--paper-2);
}
.pdfbox-frame {
  flex: 1;
  width: 100%;
  border: 0;
  background: var(--paper-2);
}

/* ----- Services / workshops --------------------------------------------- */
.svc {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding-block: var(--sp-6);
  border-top: 1px solid var(--line);
}
.svc:nth-child(even) .frame {
  order: 2;
}
.svc:first-of-type {
  border-top: 0;
  /* the section-head margin already separates this from the intro — drop the full
     --sp-6 top padding so the first workshop flows out of the lead, not a void */
  padding-top: var(--sp-3);
}
.svc .frame {
  aspect-ratio: 5/4;
}
.svc-body {
  display: grid;
  gap: var(--sp-2);
  max-width: 52ch;
}
.svc-num {
  font-family: var(--serif);
  font-size: var(--step-3);
  color: var(--teal);
  line-height: 1;
}
.svc-meta {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terra-deep);
}

/* ----- Cards row (services teaser / projects teaser) -------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(1rem, 2.5vw, 1.8rem);
}
.card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  text-decoration: none;
  color: inherit;
}
.card .frame {
  aspect-ratio: 4/3;
}
.card h3 {
  font-size: var(--step-1);
  /* reserve two lines so the meta / excerpt below aligns across a card row */
  min-height: 2.3em;
}
.card p {
  color: var(--ink-soft);
  font-size: 0.98rem;
}

/* ----- Press / testimonials --------------------------------------------- */
.press {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.2rem, 3vw, 2.2rem);
}
.press-item {
  display: grid;
  gap: var(--sp-2);
}
.press-item .frame {
  aspect-ratio: 3/2;
}
.press-item h3 {
  font-size: var(--step-1);
}
.press-item p {
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.press-item .src {
  font-size: var(--step--1);
  color: var(--ink-soft);
}

/* ----- Interviews (Rólam) ----------------------------------------------- */
.interviews {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.2rem, 3vw, 2rem);
}
@media (max-width: 900px) {
  .interviews {
    grid-template-columns: 1fr;
  }
}
.interview {
  --accent: var(--teal);
  display: grid;
  gap: var(--sp-2);
  align-content: start;
  padding: clamp(1.4rem, 3vw, 2rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.interview:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}
/* rotating paint-palette accent (decorative border only) */
.interview:nth-child(4n + 1) {
  --accent: var(--paint-teal);
}
.interview:nth-child(4n + 2) {
  --accent: var(--paint-terra);
}
.interview:nth-child(4n + 3) {
  --accent: var(--paint-ochre);
}
.interview:nth-child(4n + 4) {
  --accent: var(--paint-rose);
}
.interview-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  font: 600 var(--step--1) / 1 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.interview-pub {
  color: var(--ink);
}
.interview-date::before {
  content: '·';
  margin: 0 0.6em;
  color: var(--line-strong);
}
.interview-title {
  font-size: var(--step-1);
  line-height: 1.2;
}
.interview-quote {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--ink);
}
.interview-link {
  margin-top: var(--sp-1);
}
.interview-link .textlink {
  font-size: var(--step--1);
  color: var(--teal-deep);
}
@media (prefers-reduced-motion: reduce) {
  .interview {
    transition: none;
  }
  .interview:hover {
    transform: none;
  }
}

/* ----- Credentials (Szakmai háttér) ------------------------------------- */
.creds {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 2.5vw, 1.5rem);
  margin: 0;
}
@media (max-width: 760px) {
  .creds {
    grid-template-columns: 1fr;
  }
}
.cred {
  --accent: var(--paint-teal);
  display: grid;
  gap: var(--sp-1);
  align-content: start;
  padding: clamp(1.2rem, 2.6vw, 1.6rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.cred:nth-child(4n + 2) {
  --accent: var(--paint-terra);
}
.cred:nth-child(4n + 3) {
  --accent: var(--paint-ochre);
}
.cred:nth-child(4n + 4) {
  --accent: var(--paint-rose);
}
.cred dt {
  font: 600 var(--step-0) / 1.25 var(--sans);
  color: var(--ink);
}
.cred dd {
  margin: 0;
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--ink-soft);
}
.creds-note {
  max-width: 64ch;
  margin-top: clamp(1.4rem, 3vw, 2rem);
  font-size: var(--step--1);
  line-height: 1.6;
  color: var(--ink-soft);
}
.creds-note .textlink {
  color: var(--teal-deep);
}

/* ----- Bibliography (Kötetek) ------------------------------------------- */
.biblio {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(0.8rem, 2vw, 1.2rem);
  max-width: 72ch;
}
.biblio-item {
  display: grid;
  gap: 0.35em;
  padding: clamp(1.1rem, 2.4vw, 1.5rem) clamp(1.2rem, 2.6vw, 1.6rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.biblio-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}
.biblio-title {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--step-1);
  line-height: 1.3;
  color: var(--ink);
}
.biblio-title .textlink {
  color: inherit;
}
.biblio-meta {
  margin: 0;
  font: 600 var(--step--1) / 1.3 var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
@media (prefers-reduced-motion: reduce) {
  .biblio-item {
    transition: none;
  }
  .biblio-item:hover {
    transform: none;
  }
}

/* ----- Publications ------------------------------------------------------ */
/* ----- Publikáció letöltés (e-mail kapu) --------------------------------- */
.lead-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(1.4rem, 4vw, 3rem);
  align-items: center;
  margin-bottom: var(--sp-5);
  padding: clamp(1.2rem, 3vw, 2rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.lead-feature__cover {
  margin: 0;
}
.lead-feature__cover img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.lead-feature__body {
  display: grid;
  gap: var(--sp-2);
}
.lead-feature__body h2 {
  font-size: var(--step-2);
}
.lead-feature__body > p {
  color: var(--ink-soft);
  max-width: 46ch;
}
.lead-gate,
.preorder-gate {
  display: grid;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}
.lead-gate .field,
.preorder-gate .field {
  max-width: 22rem;
}
.lg-consent {
  font-size: var(--step--1);
  color: var(--ink-soft);
  max-width: 44ch;
}
.lead-gate__actions {
  margin-top: 0.2rem;
}
.lg-ok {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em;
  font-weight: 560;
  color: var(--teal-deep);
}
.lg-err {
  font-size: var(--step--1);
  color: var(--terra-deep);
}
/* Műhely contact form — shared form the "Érdeklődöm" buttons scroll to. */
.contact-form {
  display: grid;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}
.contact-form input[readonly] {
  color: var(--ink-soft);
  background: var(--paper-2);
  cursor: default;
}
#muhely-erdeklodes {
  scroll-margin-top: 90px;
}
@media (max-width: 560px) {
  .contact-form .form-row {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 780px) {
  .lead-feature {
    grid-template-columns: 1fr;
  }
}

.pub {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--sp-3);
  align-items: baseline;
  padding-block: var(--sp-4);
  border-top: 1px solid var(--line);
}
.pub .year {
  font-family: var(--serif);
  font-size: var(--step-2);
  color: var(--teal);
}
.pub-main {
  display: grid;
  gap: 0.4em;
}
.pub-main h2 {
  font-size: var(--step-1);
}
.pub-main .authors {
  font-size: var(--step--1);
  color: var(--ink-soft);
  letter-spacing: 0.03em;
}
.pub-main p {
  color: var(--ink-soft);
  font-size: 0.98rem;
  max-width: 72ch;
}

/* ----- About ------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(1.5rem, 5vw, 4.5rem);
  align-items: start;
}
.portrait {
  position: sticky;
  top: 90px;
}
.portrait img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  aspect-ratio: 4/5;
  object-fit: cover;
  background: var(--paper-3);
}
.prose {
  max-width: 64ch;
  display: grid;
  gap: 1em;
}
.prose p {
  font-size: var(--step-0);
}
.prose h3 {
  margin-top: 0.6em;
}
.placeholder-note {
  font-size: var(--step--1);
  color: var(--terra-deep);
  background: var(--terra-tint);
  border-radius: var(--radius);
  padding: 0.5em 0.8em;
  display: inline-block;
}

/* ----- Contact band ------------------------------------------------------ */
.contact-band {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-4);
  align-items: center;
}
.contact-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8em 1.8em;
  font-size: var(--step-0);
}
.contact-list a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  gap: 0.5em;
  align-items: center;
}
.contact-list a:hover {
  color: var(--terra);
}

/* ----- Footer ------------------------------------------------------------ */
.site-footer {
  background: var(--ink);
  color: rgba(250, 246, 239, 0.82);
  padding-block: 0 var(--sp-4);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr 1.1fr;
  gap: var(--sp-4) var(--sp-5);
  align-items: start;
  padding-top: var(--sp-4);
  border-top: 1px solid rgba(250, 246, 239, 0.12);
}
.footer-brand .brand b {
  color: var(--paper);
}
.footer-brand .brand span {
  color: rgba(250, 246, 239, 0.6);
}
.footer-brand p {
  margin-top: var(--sp-2);
  max-width: 34ch;
  font-size: var(--step--1);
  line-height: 1.6;
  color: rgba(250, 246, 239, 0.62);
}
.footer-col h2 {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(250, 246, 239, 0.5);
  margin-bottom: var(--sp-2);
}
.footer-nav,
.footer-contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55em;
  font-size: var(--step--1);
}
/* page links in two compact rows instead of one tall column */
.footer-nav {
  grid-template-columns: 1fr 1fr;
  gap: 0.55em 1.4em;
}
.footer-contact a {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.footer-contact .ico-line {
  width: 1.1em;
  height: 1.1em;
  flex: none;
  color: var(--teal);
}
.site-footer a {
  color: rgba(250, 246, 239, 0.82);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--paper);
}
/* circular social icon buttons */
.footer-social {
  list-style: none;
  margin: var(--sp-2) 0 0;
  padding: 0;
  display: flex;
  gap: 0.6em;
}
.footer-social a {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid rgba(250, 246, 239, 0.22);
  transition: color 0.2s var(--ease), background 0.2s var(--ease),
    border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.footer-social .ico {
  width: 1.15rem;
  height: 1.15rem;
}
.footer-social a:hover {
  color: #fff;
  background: var(--teal-deep);
  border-color: var(--teal-deep);
  transform: translateY(-2px);
}
.footer-social li:last-child a:hover {
  background: var(--terra-deep);
  border-color: var(--terra-deep);
}
.footer-bottom {
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid rgba(250, 246, 239, 0.16);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-2);
  font-size: var(--step--1);
  color: rgba(250, 246, 239, 0.6);
}

/* ----- Cookie consent banner --------------------------------------------- */
/* Fixed to the bottom on first visit until the visitor chooses. Non-modal — it never
   blocks the page. Injected by main.js, which publishes its height as --consent-h so the
   floating back-to-top button lifts clear of it. z-index sits above content + .to-top(90)
   but below the full-screen lightbox(100)/pdfbox(110) overlays. */
.consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 95;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1) var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.18);
  transform: translateY(110%);
  transition: transform 0.35s var(--ease);
}
.consent.is-in {
  transform: none;
}
.consent__text {
  margin: 0;
  max-width: 60ch;
  font-size: var(--step--1);
  line-height: 1.5;
}
.consent__text a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.consent__actions {
  display: flex;
  gap: var(--sp-1);
  flex-shrink: 0;
}
.consent .btn {
  white-space: nowrap;
}
/* the ghost (reject) button needs light ink on the dark banner — same size as accept */
.consent .btn--ghost {
  --fg: var(--paper);
  border-color: color-mix(in srgb, var(--paper) 55%, transparent);
}
.consent .btn--ghost:hover {
  --fg: var(--ink);
  background: var(--paper);
  border-color: var(--paper);
}
/* lift the floating back-to-top button above the banner while it is shown */
.has-consent .to-top {
  bottom: calc(var(--consent-h, 4rem) + clamp(1rem, 3vw, 2rem) + 0.75rem);
}
@media (max-width: 640px) {
  .consent {
    gap: var(--sp-1);
  }
  .consent__actions {
    width: 100%;
  }
  .consent__actions .btn {
    flex: 1;
    justify-content: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  .consent {
    transition: none;
  }
}

/* ----- Legal / privacy page ---------------------------------------------- */
.legal h2 {
  margin-top: 0.4em;
}
.legal ul {
  margin: 0;
  padding-left: 1.25em;
  display: grid;
  gap: 0.4em;
}
.legal-meta {
  font-size: var(--step--1);
  color: color-mix(in srgb, var(--ink) 60%, transparent);
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
}
.legal-table th,
.legal-table td {
  text-align: left;
  padding: 0.5em 0.7em;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  vertical-align: top;
}
.legal-table th {
  font-weight: 640;
}

/* ----- Motion / reveal --------------------------------------------------- */
.reveal {
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
/* hidden state only when JS is active, so content is never invisible without it */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}
.reveal.d1 {
  transition-delay: 0.08s;
}
.reveal.d2 {
  transition-delay: 0.16s;
}
.reveal.d3 {
  transition-delay: 0.24s;
}

/* ----- Artful motion (landing page) ------------------------------------- */
/* Directional / scale reveal variants — reuse the .reveal → .in observer.
   Placed after .js .reveal so the equal-specificity transform wins; the
   opacity:0 from .js .reveal still applies, so these fade *and* travel. */
.js .reveal--left {
  transform: translateX(-26px);
}
.js .reveal--right {
  transform: translateX(26px);
}
.js .reveal--scale {
  transform: scale(0.965) translateY(16px);
}
.js .reveal--left.in,
.js .reveal--right.in,
.js .reveal--scale.in {
  transform: none;
}

/* Signature: hand-drawn underline on the hero accent word "önismeret".
   Absolutely positioned → zero layout impact (CLS-safe). */
.accent {
  position: relative;
  display: inline-block;
}
.accent-underline {
  position: absolute;
  left: -1%;
  bottom: -0.16em;
  width: 102%;
  height: 0.4em;
  overflow: visible;
  pointer-events: none;
  color: var(--terra-deep);
}
.accent-underline path {
  fill: none;
}
/* Draw only with JS, once the hero copy reveals; otherwise show it complete. */
.js .accent-underline path {
  stroke-dasharray: 230;
  stroke-dashoffset: 230;
}
.js .hero-copy.in .accent-underline path {
  animation: draw-accent 0.9s var(--ease) 0.45s forwards;
}
@keyframes draw-accent {
  to {
    stroke-dashoffset: 0;
  }
}

/* Hero photo + frame settle — transform only, opacity stays 1 to protect LCP. */
.js .hero-figure img {
  transform: scale(1.05);
  transition: transform 1.1s var(--ease);
}
.js .hero-figure.in img {
  transform: none;
}
.js .hero-figure::after {
  opacity: 0;
  transform: translate(-6px, -6px);
  transition: opacity 0.7s var(--ease) 0.35s, transform 0.9s var(--ease) 0.35s;
}
.js .hero-figure.in::after {
  opacity: 1;
  transform: none;
}

/* Eyebrow rule draws in with its section. */
.js .reveal .eyebrow::before {
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.55s var(--ease) 0.1s;
}
.js .reveal.in .eyebrow::before {
  transform: scaleX(1);
}

/* Primary button: subtle paint-swipe wash behind the label on hover. */
.btn {
  position: relative;
  z-index: 0;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: color-mix(in srgb, var(--bg) 78%, #fff);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s var(--ease);
}
.btn:hover::before {
  transform: scaleX(1);
}
.btn--ghost::before,
.btn--light::before {
  display: none;
}

/* Cards deepen their shadow on hover (pairs with the existing image zoom).
   Shadow-only — a transform lift would collide with .reveal--scale on .card. */
.card .frame {
  transition: box-shadow 0.35s var(--ease);
}
.card:hover .frame {
  box-shadow: var(--shadow-lift);
}

/* ----- Scroll paint (konyvek.html only, scoped under body.has-paint) ------ */
/* Watercolor blobs that bloom up as they scroll into view and drift/fade as
   they leave, plus a brushstroke "paint-in" wipe on below-the-fold covers.
   Decorative, aria-hidden, pointer-events:none, GPU-only (opacity/transform),
   CLS-free (out of flow), and fully removed under prefers-reduced-motion. */

/* Each painted section becomes its own stacking context; real content (.wrap)
   sits above the paint layer. position:relative + isolation never create a
   scroll container, so the sticky .book-figures column is unaffected. */
.has-paint .section {
  position: relative;
  isolation: isolate;
}
.has-paint .section > .wrap {
  position: relative;
  z-index: 1;
}

/* full-width, full-height decorative layer — sibling of .wrap, never in flow */
.paint-field {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: clip; /* clip drift to the section; never adds scroll (not a scroll container) */
  pointer-events: none;
}

.blob {
  position: absolute;
  width: clamp(180px, 22vw, 380px);
  aspect-ratio: 1;
  border-radius: 47% 53% 60% 40% / 55% 45% 58% 42%;
  background: radial-gradient(closest-side, var(--c, var(--paint-teal)), transparent 72%);
  filter: blur(18px);
  opacity: 0;
  transform: scale(0.6);
  mix-blend-mode: multiply; /* pigment soaks into the warm paper, never bleaches text */
  will-change: opacity, transform;
}
.paint-field--ink .blob {
  mix-blend-mode: screen; /* glow on the dark contact band instead of going muddy */
}

/* palette */
.b-teal   { --c: var(--paint-teal); }
.b-terra  { --c: var(--paint-terra); }
.b-ochre  { --c: var(--paint-ochre); }
.b-rose   { --c: var(--paint-rose); }
.b-sage   { --c: var(--paint-sage); }
.b-indigo { --c: var(--paint-indigo); }
/* saturated variants — decoration only (gesture blobs, vivid swatches) */
.b-teal-v   { --c: var(--paint-teal-vivid); }
.b-terra-v  { --c: var(--paint-terra-vivid); }
.b-ochre-v  { --c: var(--paint-ochre-vivid); }
.b-rose-v   { --c: var(--paint-rose-vivid); }
.b-sage-v   { --c: var(--paint-sage-vivid); }
.b-indigo-v { --c: var(--paint-indigo-vivid); }

/* art-directed placement — every dense centre lives in an OUTER margin or a
   heading band, never under running body text (which stays inside .wrap, z-index:1) */
.p1 { top: 1%;    left: 0%;    width: clamp(200px, 19vw, 360px); --o: 0.24; }   /* head, left */
.p2 { top: 4%;    right: 1%;   width: clamp(170px, 17vw, 320px); --o: 0.20; }   /* head, right */
.p3 { top: 20%;   left: -4%;   width: clamp(280px, 30vw, 520px); --o: 0.24; }   /* book 1, left, large */
.p4 { top: 30%;   right: 1%;   width: clamp(180px, 17vw, 320px); --o: 0.19; }   /* book 1, right dab */
.p5 { top: 54%;   right: -4%;  width: clamp(280px, 30vw, 520px); --o: 0.24; }   /* book 2, right, large */
.p6 { top: 63%;   left: 1%;    width: clamp(200px, 20vw, 360px); --o: 0.20; }   /* book 2, left */
.p7 { top: 85%;   left: 5%;    width: clamp(180px, 17vw, 320px); --o: 0.18; }   /* lower accent */
.pi1 { bottom: -8%; left: 2%;  width: clamp(240px, 28vw, 500px); --o: var(--paint-o-ink); } /* ink band glow, left */
.pi2 { bottom: -4%; right: 4%; width: clamp(190px, 20vw, 360px); --o: calc(var(--paint-o-ink) * 0.75); } /* ink band glow, right */

/* PRIMARY: scroll-driven bloom — each blob is its own view() subject, so it
   blooms→peaks→fades as it personally crosses the viewport (no JS, compositor). */
@keyframes paint-bloom {
  0%   { opacity: 0;            transform: scale(0.6) translateY(10px); }
  30%  { opacity: var(--o, 0.16); transform: scale(1.02) translateY(0); }
  68%  { opacity: var(--o, 0.16); transform: scale(1.06); }
  100% { opacity: 0;            transform: scale(1.16) translateY(-12px); }
}
@supports (animation-timeline: view()) {
  .has-paint .blob {
    animation: paint-bloom 1ms linear both; /* explicit non-zero duration for Firefox */
    animation-timeline: view();
    animation-range: entry 0% exit 100%;
  }
  /* slight per-blob phase offsets so they don't pulse in lockstep */
  .has-paint .blob:nth-of-type(2n) { animation-range: entry 8% exit 96%; }
  .has-paint .blob:nth-of-type(3n) { animation-range: entry 14% exit 92%; }
}

/* FALLBACK: engines without scroll-driven animations (e.g. stable Firefox) get a
   dedicated non-unobserving observer (main.js) that toggles .paint-in on enter
   AND exit, so they still bloom in and fade out. */
@supports not (animation-timeline: view()) {
  .has-paint .blob {
    transition: opacity 0.8s var(--ease), transform 0.9s var(--ease);
  }
  .has-paint .blob.paint-in {
    opacity: var(--o, 0.16);
    transform: scale(1.03);
  }
}

/* PAINTED-IN COVERS: only covers JS marks .paint-cover (below the fold at load,
   after decode) are masked — the LCP/og:image first cover is never touched. */
.js .paint-cover img {
  -webkit-mask-image: var(--brush-mask);
          mask-image: var(--brush-mask);
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-size: 300% 140%;
          mask-size: 300% 140%;
  -webkit-mask-position: 100% 50%; /* hidden: container sits in the transparent tail */
          mask-position: 100% 50%;
  box-shadow: none; /* avoid a floating shadow of an invisible book during the wipe */
  will-change: mask-position;
}
.js .book.reveal.in .paint-cover img {
  animation: cover-paint 0.9s var(--ease) 0.12s both;
}
@keyframes cover-paint {
  from { -webkit-mask-position: 100% 50%; mask-position: 100% 50%; box-shadow: 0 0 0 0 rgba(40, 57, 67, 0); }
  60%  { box-shadow: var(--shadow-lift); }
  to   { -webkit-mask-position: 0% 50%;   mask-position: 0% 50%;   box-shadow: var(--shadow-lift); }
}

/* mobile: the layout collapses and side margins shrink — thin (don't kill) the paint.
   The watercolour stays on phones, just smaller, fewer, and lighter so it never
   crowds the narrow text column or taxes the GPU. */
@media (max-width: 900px) {
  .has-paint .blob { --o: 0.12; }
  .has-paint .paint-field--bg .blob:nth-of-type(n + 4) { display: none; } /* keep ~3 */
}
@media (max-width: 640px) {
  /* keep the field visible (no display:none); tune the blobs for a ~390px column */
  .has-paint .blob {
    width: clamp(120px, 40vw, 220px);
    filter: blur(12px);                /* cheaper blur on mobile GPUs */
    --o: 0.12;                         /* low multiply opacity → body text stays crisp */
  }
  .has-paint .p3,
  .has-paint .p5 { width: clamp(200px, 55vw, 300px); } /* the two big gestures, scaled down */
  .has-paint .paint-field--bg .blob:nth-of-type(n + 3) { display: none; } /* keep ~2 per section */
}

/* ----- Könyvek: orchestrated editorial entrances (scoped .has-paint) -----
   Reuse the .reveal → .in observer; each spread "assembles" — figures slide
   from the left, copy from the right. opacity/transform only (CLS-safe),
   hidden states .js-gated, scoped to .has-paint so other pages are untouched. */

/* Pin the containers (cancel the block-level .reveal fade) so the CHILDREN
   carry the motion and the sticky figures column never lurches. */
.has-paint .section-head.reveal,
.has-paint .book.reveal,
.has-paint .contact-band.reveal {
  transform: none;
}
.js .has-paint .section-head.reveal,
.js .has-paint .book.reveal,
.js .has-paint .contact-band.reveal {
  opacity: 1;
}

/* Section-head: eyebrow → h1 → lead cascade (underline draws via existing rule) */
.js .has-paint .section-head.reveal > .palette-echo,
.js .has-paint .section-head.reveal > .eyebrow,
.js .has-paint .section-head.reveal > h1,
.js .has-paint .section-head.reveal > h2,
.js .has-paint .section-head.reveal > .lead {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .has-paint .section-head.reveal.in > .palette-echo { opacity: 1; transform: none; }
.js .has-paint .section-head.reveal.in > .eyebrow { opacity: 1; transform: none; transition-delay: 0.08s; }
.js .has-paint .section-head.reveal.in > h1 { opacity: 1; transform: none; transition-delay: 0.09s; }
.js .has-paint .section-head.reveal.in > h2 { opacity: 1; transform: none; transition-delay: 0.09s; }
.js .has-paint .section-head.reveal.in > .lead { opacity: 1; transform: none; transition-delay: 0.18s; }

/* Each book: figures from the left, body from the right (one block each) */
.js .has-paint .book.reveal .book-figures {
  opacity: 0;
  transform: translateX(-26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .has-paint .book.reveal .book-body {
  opacity: 0;
  transform: translateX(26px);
  transition: opacity 0.7s var(--ease) 0.14s, transform 0.7s var(--ease) 0.14s;
}
.js .has-paint .book.reveal.in .book-figures,
.js .has-paint .book.reveal.in .book-body {
  opacity: 1;
  transform: none;
}

/* Preview thumbs: one gentle coordinated settle */
.js .has-paint .book.reveal .book-previews > figure {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s var(--ease) 0.2s, transform 0.6s var(--ease) 0.2s;
}
.js .has-paint .book.reveal.in .book-previews > figure {
  opacity: 1;
  transform: none;
}

/* Coexistence with the cover-paint wipe: the mask-wipe book (book 2) fades its
   figures in place so the brush wipe is the sole horizontal gesture. Desktop
   only, so it doesn't out-specify the mobile up-fade below. */
@media (min-width: 901px) {
  .js .has-paint .book.reveal .book-figures:has(.paint-cover) {
    transform: none;
    transition: opacity 0.7s var(--ease);
  }
}

/* Contact band: heading block from the left, contact list from the right */
.js .has-paint .contact-band.reveal > div {
  opacity: 0;
  transform: translateX(-22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .has-paint .contact-band.reveal > .contact-list {
  opacity: 0;
  transform: translateX(22px);
  transition: opacity 0.7s var(--ease) 0.12s, transform 0.7s var(--ease) 0.12s;
}
.js .has-paint .contact-band.reveal.in > div,
.js .has-paint .contact-band.reveal.in > .contact-list {
  opacity: 1;
  transform: none;
}

/* Mobile: book collapses to one column — swap side-slides for a gentle up-fade
   (no horizontal travel → no overflow). */
@media (max-width: 900px) {
  .js .has-paint .book.reveal .book-figures,
  .js .has-paint .book.reveal .book-body,
  .js .has-paint .contact-band.reveal > div,
  .js .has-paint .contact-band.reveal > .contact-list {
    transform: translateY(18px);
  }
  .js .has-paint .book.reveal.in .book-figures,
  .js .has-paint .book.reveal.in .book-body,
  .js .has-paint .contact-band.reveal.in > div,
  .js .has-paint .contact-band.reveal.in > .contact-list {
    transform: none;
  }
}

/* ============================================================================
   "Milyen szín lennél?" — Az önismeret színei (painted scroll-journey)
   Bespoke to konyv-milyen-szin-lennel.html (body.msz, buildMilyenSzinJourney).
   Builds on the existing .has-paint engine: .blob + paint-bloom, the .reveal→.in
   observer, and the --brush-mask cover-wipe (generalised here into .brush-reveal).
   Page-scoped, additive primitives only — nothing else on the site drifts.
   ========================================================================== */

/* a11y utility: real heading text sits behind the hand-lettered title image */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* full-viewport "spreads": one watercolour gesture per turn of the page.
   Relaxes to natural height on phones so it never becomes an endless sparse
   scroll (decorative paint also collapses ≤640px via existing rules). */
/* colour & play lift: bolder ambient paint + the spine needs a positioned host */
.msz {
  --paint-o: 0.26; /* up from 0.22 — page-wide a touch more colour (still AA-safe, margins only) */
}
.msz #main {
  position: relative; /* offset parent for the full-height .thread-field spine */
}
.msz .spread {
  min-height: 100svh;
  display: grid;
  align-content: center;
}
@media (max-width: 700px) {
  .msz .spread {
    min-height: auto;
  }
}

/* hand-lettered display type — the ONE script webfont, display use only */
.lettered {
  font-family: var(--script);
  font-weight: 600;
  line-height: 1.04;
}

/* reusable brush "paint-in" wipe — generalised from .paint-cover. Any element
   tagged `.brush-reveal data-reveal` masks itself with the frayed feTurbulence
   brush and wipes left→right the moment the reveal observer marks it `.in`.
   No new observer, no new JS — it rides the existing .reveal pipeline. */
.js .brush-reveal {
  -webkit-mask-image: var(--brush-mask);
          mask-image: var(--brush-mask);
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-size: 300% 140%;
          mask-size: 300% 140%;
  -webkit-mask-position: 100% 50%;
          mask-position: 100% 50%;
  will-change: mask-position;
}
.js .brush-reveal.in {
  animation: brush-wipe 1s var(--ease) 0.08s both;
}
@keyframes brush-wipe {
  from { -webkit-mask-position: 100% 50%; mask-position: 100% 50%; }
  to   { -webkit-mask-position: 0% 50%;   mask-position: 0% 50%; }
}
/* engines without mask support must never hide the content */
@supports not ((mask-image: none) or (-webkit-mask-image: none)) {
  .js .brush-reveal {
    -webkit-mask-image: none;
            mask-image: none;
  }
}

/* --- HERO: the cover opens --- */
.msz .book-hero {
  padding-top: var(--sp-5);
}
.lettered-title {
  margin: 0;
  line-height: 1;
}
.title-script {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
}
.hero-actions {
  align-items: center;
}
/* coral "downloadable supplements" stamp — echoes the cover badge */
.badge {
  display: inline-grid;
  place-items: center;
  text-align: center;
  width: 8.6em;
  height: 8.6em;
  padding: 0.7em;
  border-radius: 50%;
  background: var(--terra);
  color: #fff;
  font: 600 var(--step--1) / 1.18 var(--sans);
  letter-spacing: 0.02em;
  transform: rotate(-8deg);
  box-shadow: var(--shadow);
}

/* --- "Önismeret" anchor: the emotional centre + signature wipe --- */
.onismeret-spread {
  text-align: center;
}
.onismeret-inner {
  display: grid;
  justify-items: center;
  gap: var(--sp-3);
}
.onismeret-figure {
  margin: 0;
  width: min(80%, 460px);
}
.onismeret-figure img {
  display: block;
  width: 100%;
  height: auto;
}
.onismeret-lead {
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--step-2);
  line-height: 1.4;
  color: var(--ink);
  max-width: 28ch;
}

/* ============================================================================
   Scroll-drawn brush lines — the colour spine + per-section branch strokes
   Both reuse the draw-accent trick: a pathLength=1 path with stroke-dashoffset
   1 (hidden) → 0 (drawn). The spine draws down the page as you scroll the whole
   document (scroll(root)); branches ink in as their spread enters view (view()).
   Decoration only: aria-hidden, pointer-events:none, z-0 below .wrap, no text
   colour changes — AA is untouched. vector-effect keeps strokes a constant px.
   ========================================================================== */

/* --- the colour spine --- */
.thread-field {
  position: absolute;
  inset: 0 auto 0 0;
  width: clamp(40px, 7vw, 96px);
  z-index: 0; /* behind .wrap (z-index:1) — always under the text */
  pointer-events: none;
  overflow: visible;
}
.thread {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.thread-path {
  fill: url(#thread-grad); /* a tapered ribbon fill, not a stroke — reads as a brush */
}
.msz #thread-grad stop:nth-child(1) { stop-color: var(--paint-teal-vivid); }
.msz #thread-grad stop:nth-child(2) { stop-color: var(--paint-rose-vivid); }
.msz #thread-grad stop:nth-child(3) { stop-color: var(--paint-indigo-vivid); }
.msz #thread-grad stop:nth-child(4) { stop-color: var(--paint-sage-vivid); }
.msz #thread-grad stop:nth-child(5) { stop-color: var(--paint-ochre-vivid); }
.msz #thread-grad stop:nth-child(6) { stop-color: var(--paint-terra-vivid); }
/* paint the ribbon down the page as you scroll — a clip-path wipe (crisp brush
   front, no dash/tear; a page-tall mask would fray to nothing). JS-gated so the
   finished ribbon shows without JS. */
.js .thread { clip-path: inset(0 0 100% 0); }
@supports (animation-timeline: scroll()) {
  .js .thread {
    animation: spine-wipe 1ms linear both;
    animation-timeline: scroll(root block);
  }
}
@keyframes spine-wipe {
  from { clip-path: inset(0 0 100% 0); }
  to   { clip-path: inset(0 0 0 0); }
}

/* --- playful splatter clusters --- */
.splatter {
  position: absolute;
  width: clamp(120px, 16vw, 220px);
  height: clamp(120px, 16vw, 220px);
}
.splatter i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: calc(var(--s, 1) * 16px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--c), transparent 70%);
  mix-blend-mode: multiply;
}
.js .splatter i {
  opacity: 0;
  transform: scale(0.2);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}
.js .splatter.in i { opacity: 0.72; transform: scale(1); }
.js .splatter.in i:nth-child(2) { transition-delay: 0.06s; }
.js .splatter.in i:nth-child(3) { transition-delay: 0.12s; }
.js .splatter.in i:nth-child(4) { transition-delay: 0.18s; }
.js .splatter.in i:nth-child(5) { transition-delay: 0.24s; }
.sp-a       { top: 18%; right: 9%; }
.sp-b       { top: 56%; left: 5%; }
.sp-c       { top: 16%; right: 7%; }
.sp-d       { top: 18%; left: 7%; }
.sp-palette { bottom: 6%; right: 12%; }

/* mobile: the spine stays a real (if slim) ribbon, and the branch strokes /
   splatters come back scaled down + softened so they frame the narrow column
   instead of crowding it. They live in .paint-field, now kept visible ≤640px. */
@media (max-width: 640px) {
  .thread-field { width: clamp(20px, 9vw, 40px); } /* visible ribbon, not a hairline */

  .splatter { width: clamp(90px, 22vw, 140px); height: clamp(90px, 22vw, 140px); }
  .js .splatter.in i { opacity: 0.6; }
}

/* --- "Lapozz bele": real book spreads woven in, still lightbox-wired --- */
.leaf-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
}
.leaf-gallery button {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: var(--radius);
}
.leaf-gallery img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* --- order "Vidd haza": deliberately the calmest band --- */
.msz .order-spread {
  background: var(--paper-2);
}
/* a quiet 6-dot echo of the palette the reader just assembled — carries the
   painted world one step into the order zone so the hand-lettered journey doesn't
   cut coldly to the serif form. Decorative, sits above the eyebrow. */
.palette-echo {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: var(--sp-3);
}
.palette-echo i {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--c);
  opacity: 0.9;
}

/* ----- "Olvasói vélemények": four readers become four colours ----------- */
/* Masonry so four quotes of very different length (incl. Boróka's four
   paragraphs) pack by height instead of being forced into equal grid rows. */
.voices {
  columns: 2;
  column-gap: var(--sp-4);
}
@media (max-width: 640px) {
  .voices { columns: 1; }
}

/* a .reader-quote retuned for a SET of four: calmer body size, per-reader
   colour via --vc (an AA-legible "deep" tone), framed as a soft paper card. */
.reader-quote--voice {
  font-size: var(--step-0);         /* down from --step-2 → no wall of italic */
  line-height: 1.55;
  max-width: none;                  /* fill the masonry column */
  break-inside: avoid;              /* never split a card across the column gap */
  -webkit-column-break-inside: avoid;
  margin: 0 0 var(--sp-4);
  padding: var(--sp-3) var(--sp-3) var(--sp-3) var(--sp-4);
  border-left-color: var(--vc, var(--terra));
  background: var(--card);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow);
  isolation: isolate;               /* own stacking context: keeps the z-index:-1
                                       quote mark ABOVE the new card background */
}
.reader-quote--voice::before {
  color: color-mix(in srgb, var(--vc, var(--terra)) 24%, transparent);
}
.reader-quote--voice p + p {
  margin-top: 0.7em;                /* space Boróka's paragraphs */
}
.reader-quote--voice cite {
  color: var(--vc, var(--ink-soft));/* the signature literally carries the colour */
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.reader-quote--voice cite::before { /* the reader, as a painted colour chip */
  content: '';
  width: 0.7em;
  height: 0.7em;
  flex: none;
  border-radius: 55% 45% 58% 42% / 55% 45% 55% 45%;
  background: var(--vc-soft, var(--vc));
}

/* ----- Letölthető mellékletek (worksheet downloads) ---------------------- */
/* The 15 printable book worksheets, presented as a calm two-column download
   list so the painted journey keeps its paper-and-ink rhythm. Sage is the
   section's accent (matches the splatter + the "download" affordance). The
   section background comes from .section--paper2 on the host <section>. */
/* A QR code printed in the book deep-links to #mellekletek — clear the sticky
   header so the section title isn't tucked underneath on arrival. */
.worksheet-spread {
  scroll-margin-top: 90px;
}
.worksheet-downloads {
  margin-top: var(--sp-4);
}
.worksheet-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}
@media (min-width: 600px) {
  .worksheet-list {
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem 1rem;
  }
}
.worksheet-dl {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.25;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease),
    transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.worksheet-dl__label {
  flex: 1 1 auto;
}
.worksheet-dl__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--paint-sage-vivid) 16%, transparent);
  color: var(--paint-sage-deep);
  font-size: 1.05rem;
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
    transform 0.25s var(--ease);
}
a.worksheet-dl:hover,
a.worksheet-dl:focus-visible {
  border-color: color-mix(in srgb, var(--paint-sage-vivid) 55%, var(--line-strong));
  background: color-mix(in srgb, var(--paint-sage-vivid) 8%, var(--paper));
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -18px rgba(40, 57, 67, 0.5);
}
a.worksheet-dl:hover .worksheet-dl__icon,
a.worksheet-dl:focus-visible .worksheet-dl__icon {
  background: var(--paint-sage-vivid);
  color: var(--paper);
  transform: translateY(2px);
}
.worksheet-dl--pending {
  opacity: 0.55;
}
.worksheet-all-wrap {
  margin: var(--sp-4) 0 0;
  text-align: center;
}

/* ===== "Lapozz bele" — the interactive book reader (Nyitott könyv) ========
   A flat editorial open-book reader. Progressive enhancement: without .js the
   leaves stack into a plain vertical preview; with .js one spread shows at a
   time, the painted cover opens with a hinge, and spreads cross-slide. All the
   `multiply` decoration lives on aria-hidden pseudo-layers INSIDE the leaves,
   and `isolation:isolate` on the root is the one-line guard against the known
   mix-blend-mode / .wrap greying gotcha. */
.reader-sub {
  margin-top: var(--sp-2);
  color: var(--ink-soft);
}
.msz-reader {
  isolation: isolate; /* contain blend modes — keeps the page behind crisp */
  margin: var(--sp-5) auto 0;
  max-width: 920px;
}

/* --- the book stage --- */
.reader-stage {
  position: relative;
  width: min(100%, 880px);
  margin-inline: auto;
  aspect-ratio: 2 / 1; /* an open spread = two square pages */
  perspective: 2200px;
  perspective-origin: 50% 42%;
  border-radius: 4px;
}
.reader-stage:focus-visible {
  outline: 2px solid var(--teal-deep);
  outline-offset: 8px;
}
.reader-book {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.reader-leaves {
  position: absolute;
  inset: 0;
}

/* --- a spread (two pages) --- */
.reader-leaf {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.99);
  transition: opacity 0.5s var(--ease), transform 0.55s var(--ease);
  box-shadow: 0 1px 2px rgba(40, 57, 67, 0.06), 0 26px 50px -28px rgba(40, 57, 67, 0.4);
  border-radius: 4px;
}
.js .reader-leaf.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  z-index: 2;
  animation: leaf-settle 0.55s var(--ease);
}
@keyframes leaf-settle {
  from {
    transform: rotate(0.7deg) translateY(5px);
  }
  to {
    transform: none;
  }
}

/* --- a single page (real scan + paper craft) --- */
.leaf-page {
  position: relative;
  overflow: hidden;
  background: var(--paper);
}
.leaf-page img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* scans are square -> no distortion in a square cell */
  display: block;
}
.leaf-page--l {
  border-radius: 4px 0 0 4px;
  box-shadow: inset -24px 0 30px -24px rgba(40, 57, 67, 0.3);
}
.leaf-page--r {
  border-radius: 0 4px 4px 0;
  box-shadow: inset 24px 0 30px -24px rgba(40, 57, 67, 0.3);
}
/* deckled / pressed paper edge + tooth */
.leaf-deckle {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), inset 0 0 26px -10px rgba(40, 57, 67, 0.22);
}
.leaf-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: multiply;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px;
}

/* --- the binding gutter (motion-responsive via --drag) --- */
.reader-gutter {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: calc(34px + var(--drag, 0) * 26px);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(40, 57, 67, 0.16) 42%,
    rgba(40, 57, 67, 0.04) 50%,
    rgba(40, 57, 67, 0.16) 58%,
    transparent
  );
}
.js .msz-reader.is-spread .reader-gutter {
  opacity: 1;
}

/* --- per-page zoom control (binds to the existing lightbox) --- */
.leaf-zoom {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(250, 246, 239, 0.84);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1;
  display: none;
  place-items: center;
  cursor: zoom-in;
  z-index: 5;
  opacity: 0.82;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.js .leaf-zoom {
  display: grid;
}
.leaf-page--l .leaf-zoom {
  left: 10px;
  right: auto;
}
.leaf-zoom:hover,
.leaf-zoom:focus-visible {
  opacity: 1;
  transform: scale(1.08);
}

/* --- the closed cover (opens with one hinge) --- */
.reader-cover {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 25%;
  width: 50%; /* a centred square in the 2:1 stage */
  transform-origin: left center;
  transform: rotateY(0deg);
  transition: transform 0.72s var(--ease), opacity 0.45s var(--ease) 0.18s;
  z-index: 6;
  backface-visibility: hidden;
}
.reader-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 3px 5px 5px 3px;
  box-shadow: var(--shadow-lift), -1px 0 0 rgba(40, 57, 67, 0.12);
}
.js .msz-reader.is-open .reader-cover {
  transform: rotateY(-122deg);
  opacity: 0;
  pointer-events: none;
}
/* a slim embossed spine on the bound (left) edge */
.reader-spine {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 22px;
  display: grid;
  place-items: center;
  gap: 0.4rem;
  background: linear-gradient(90deg, rgba(40, 57, 67, 0.16), rgba(40, 57, 67, 0.02));
  border-radius: 3px 0 0 3px;
  overflow: hidden;
}
.reader-spine b,
.reader-spine i {
  writing-mode: vertical-rl;
  font-style: normal;
  font-family: var(--serif);
  font-size: 0.52rem;
  letter-spacing: 0.04em;
  color: rgba(40, 57, 67, 0.55);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  white-space: nowrap;
}
.reader-spine i {
  font-size: 0.46rem;
  color: rgba(40, 57, 67, 0.4);
}
/* a near-subliminal dog-ear inviting touch (paused on engage) */
.reader-dogear {
  position: absolute;
  top: 0;
  right: 0;
  width: 30px;
  height: 30px;
  z-index: 2;
  background: linear-gradient(225deg, rgba(40, 57, 67, 0.16), rgba(255, 255, 255, 0.7) 55%, transparent 56%);
  border-radius: 0 5px 0 0;
}
.js .msz-reader:not(.is-open) .reader-dogear {
  animation: reader-dogear 3.6s var(--ease) infinite;
}
.msz-reader:hover .reader-dogear,
.reader-stage:focus-within .reader-dogear {
  animation-play-state: paused;
}
@keyframes reader-dogear {
  0%,
  82%,
  100% {
    transform: none;
  }
  90% {
    transform: translate(-3px, 3px) rotate(-3deg);
  }
}
.reader-open-hint {
  position: absolute;
  left: 50%;
  bottom: -2.4rem;
  transform: translateX(-50%);
  font-family: var(--script);
  font-size: 1.2rem;
  color: var(--teal-deep);
  white-space: nowrap;
  transition: opacity 0.4s var(--ease);
}
.reader-open-hint .arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease);
}
.msz-reader:hover .reader-open-hint .arrow {
  transform: translateX(3px);
}
.js .msz-reader.is-open .reader-open-hint {
  opacity: 0;
}

/* --- the closing CTA leaf --- */
.reader-leaf--cta {
  grid-template-columns: 1fr;
  place-items: center;
  background: var(--paper-2);
  text-align: center;
}
.cta-leaf {
  max-width: 30rem;
  padding: var(--sp-4);
  display: grid;
  justify-items: center;
  gap: 0.4rem;
}
.cta-leaf h3 {
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  line-height: 1.04;
  margin: 0;
}
.cta-leaf p {
  color: var(--ink-soft);
  margin: 0.2rem 0 var(--sp-2);
}
.cta-leaf .btn {
  margin-top: var(--sp-1);
}

/* --- controls (JS only) --- */
.reader-controls {
  display: none;
}
.js .reader-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin-top: var(--sp-5);
}
.reader-disc {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}
.reader-disc:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  background: #fff;
}
.reader-disc:disabled {
  opacity: 0.32;
  cursor: default;
  transform: none;
  box-shadow: none;
}
.reader-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.reader-seg {
  display: block;
  padding: 8px 3px;
  background: none;
  border: 0;
  cursor: pointer;
}
.reader-seg span {
  display: block;
  width: 26px;
  height: 7px;
  border-radius: 47% 53% 60% 40% / 55% 45% 58% 42%;
  background: var(--line-strong);
  opacity: 0.5;
  transition: background 0.4s var(--ease), opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.reader-progress li:nth-child(1) .reader-seg[aria-current="true"] span {
  background: var(--paint-teal-vivid);
}
.reader-progress li:nth-child(2) .reader-seg[aria-current="true"] span {
  background: var(--paint-rose-vivid);
}
.reader-progress li:nth-child(3) .reader-seg[aria-current="true"] span {
  background: var(--paint-indigo-vivid);
}
.reader-progress li:nth-child(4) .reader-seg[aria-current="true"] span {
  background: var(--paint-sage-vivid);
}
.reader-progress li:nth-child(5) .reader-seg[aria-current="true"] span {
  background: var(--paint-terra-vivid);
}
.reader-seg[aria-current="true"] span {
  opacity: 1;
  transform: scaleX(1.12);
}
.reader-seg:hover span {
  opacity: 0.85;
}

/* --- compact numeric meter (the full 164-page album has too many spreads for dots) --- */
.reader-controls--compact {
  gap: 1rem;
}
.reader-meter {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: min(52vw, 240px);
}
.reader-count {
  font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  white-space: nowrap;
}
.reader-track {
  position: relative;
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.reader-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--paint-teal-vivid), var(--paint-rose-vivid));
  transition: width 0.45s var(--ease);
}

/* CTA under the Publications album preview → on to the full album page */
.reader-cta {
  margin-top: var(--sp-4);
  text-align: center;
}

/* --- no-JS fallback: the same scans, simply stacked --- */
html:not(.js) .reader-cover,
html:not(.js) .reader-gutter,
html:not(.js) .leaf-zoom {
  display: none;
}
html:not(.js) .reader-stage {
  aspect-ratio: auto;
  perspective: none;
  height: auto;
}
html:not(.js) .reader-book {
  position: static;
}
html:not(.js) .reader-leaves {
  position: static;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
html:not(.js) .reader-leaf {
  position: relative;
  inset: auto;
  opacity: 1;
  visibility: visible;
  aspect-ratio: 2 / 1;
}
html:not(.js) .reader-leaf--cta {
  aspect-ratio: auto;
}

/* --- reader responsive --- */
@media (max-width: 900px) {
  .reader-disc {
    width: 44px;
    height: 44px;
  }
}
@media (max-width: 640px) {
  /* Mobile: one full-width square page per view (a real-book pager in JS), a plain
     vertical stack without JS. The cover fades open instead of hinging. */
  .reader-stage {
    aspect-ratio: 1 / 1;
  }
  /* the text-heavy CTA flows to its natural height so nothing clips at any width */
  .js .msz-reader.is-cta .reader-stage {
    aspect-ratio: auto;
  }
  .js .msz-reader.is-cta .reader-book,
  .js .msz-reader.is-cta .reader-leaves,
  .js .msz-reader.is-cta .reader-leaf--cta {
    position: static;
  }

  /* --- JS pager: collapse the spread to one cell and overlap both pages --- */
  .js .reader-leaf {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
  }
  .js .reader-leaf .leaf-page {
    grid-area: 1 / 1; /* --l and --r share the square; one is revealed at a time */
    opacity: 0;
    transform: translateX(7%);
    pointer-events: none;
    transition: opacity 0.42s var(--ease), transform 0.46s var(--ease);
  }
  .js .msz-reader.pg-l .reader-leaf.is-active .leaf-page--l,
  .js .msz-reader.pg-r .reader-leaf.is-active .leaf-page--r {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    z-index: 1;
  }
  /* square corners + a soft all-round inner edge (not the desktop L/R half-vignette) */
  .js .reader-leaf .leaf-page--l,
  .js .reader-leaf .leaf-page--r {
    border-radius: 4px;
    box-shadow: inset 0 0 30px -24px rgba(40, 57, 67, 0.3);
  }
  /* the cross-fade carries the turn; skip the spread's settle bounce */
  .js .reader-leaf.is-active {
    animation: none;
  }
  .reader-leaf--cta {
    grid-template-rows: 1fr;
  }

  /* a single ⤢ zoom control, pinned bottom-right whichever page shows */
  .js .reader-leaf .leaf-zoom {
    top: auto;
    bottom: 10px;
    right: 10px;
    left: auto;
    width: 34px;
    height: 34px;
  }
  .js .reader-leaf .leaf-page--l .leaf-zoom {
    left: auto;
    right: 10px;
  }

  /* the cover fills the square and fade-shrinks open */
  .reader-cover {
    left: 0;
    width: 100%;
  }
  .js .msz-reader.is-open .reader-cover {
    transform: translateY(-10px) scale(0.98);
  }
  .reader-gutter {
    display: none;
  }
  .js .reader-controls {
    margin-top: var(--sp-4);
    gap: 0.7rem;
  }

  /* --- no-JS fallback: the same scans, simply stacked vertically --- */
  html:not(.js) .reader-leaf {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
    aspect-ratio: 1 / 2;
  }
  html:not(.js) .leaf-page--l {
    border-radius: 4px 4px 0 0;
    box-shadow: inset 0 -24px 30px -24px rgba(40, 57, 67, 0.3);
  }
  html:not(.js) .leaf-page--r {
    border-radius: 0 0 4px 4px;
    box-shadow: inset 0 24px 30px -24px rgba(40, 57, 67, 0.3);
  }
}

/* reduced motion: settle the reader (the global * rule kills the timings; these
   make sure the cover never stays mid-hinge and the dog-ear/curl don't loop) */
@media (prefers-reduced-motion: reduce) {
  .js .msz-reader.is-open .reader-cover {
    transform: none !important;
  }
  .reader-dogear {
    animation: none !important;
  }
  .js .reader-leaf.is-active {
    animation: none !important;
  }
  .js .reader-leaf .leaf-page {
    transition: none !important;
  }
}

/* ----- Responsive -------------------------------------------------------- */
@media (max-width: 900px) {
  .hero-grid,
  .feature-book,
  .book,
  .svc,
  .proj-layout,
  .about-grid,
  .contact-band {
    grid-template-columns: 1fr;
  }
  /* reverse row outranks .feature-book above, so reset it explicitly; stack covers-first */
  .feature-book--reverse {
    grid-template-columns: 1fr;
  }
  .feature-book--reverse .covers,
  .feature-book--reverse .feature-copy {
    order: 0;
  }
  .book-figures,
  .portrait {
    position: static;
  }
  .book-figures {
    max-width: 560px;
    justify-self: center;
  }
  .svc:nth-child(even) .frame {
    order: 0;
  }
  .hero-figure {
    order: -1;
  }
  /* the painterly offset frame reads as a stray box once the photo goes full-width */
  .hero-figure::after {
    display: none;
  }
  .proj-card,
  .proj-card.feature {
    grid-column: span 6;
  }
  /* Hungarian nav labels stop fitting beside the brand below ~960px — switch to
     the off-canvas drawer here (was 640px), so the brand never has to wrap. */
  .nav-links {
    position: fixed;
    /* explicit height: header's backdrop-filter makes this the containing block,
       so `bottom:0` would only span the header — use viewport height instead */
    top: 0;
    right: 0;
    height: 100vh;
    height: 100dvh;
    width: min(80vw, 320px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 1.4rem;
    padding: 6rem 2rem 2rem;
    background: var(--paper);
    box-shadow: -20px 0 60px -30px rgba(40, 57, 67, 0.5);
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .nav-open .nav-links {
    transform: none;
  }
  .nav-links a {
    font-size: 1.15rem;
  }
  .nav-toggle {
    display: flex;
    z-index: 60;
    order: 2;
  }
  /* nav-links is the off-canvas drawer here (out of flow), so the visible row is
     brand · language switch · hamburger — group the switch + toggle to the right. */
  .lang-switch {
    order: 1;
    margin-left: auto;
  }
  .nav {
    gap: 0.75rem;
  }
  .nav-cta {
    margin: 0;
  }
  /* dim + lock the page behind the open drawer (closes on click via main.js) */
  .nav-open::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 40;
    background: color-mix(in srgb, var(--ink) 42%, transparent);
    backdrop-filter: blur(1px);
    animation: scrim-in 0.3s var(--ease);
  }
}
@keyframes scrim-in {
  from {
    opacity: 0;
  }
}
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .footer-brand p {
    max-width: 52ch;
  }
}
@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-4);
  }
}
@media (max-width: 640px) {
  .proj-grid {
    gap: 1.4rem;
  }
  .proj-card,
  .proj-card.feature {
    grid-column: 1 / -1;
  }
  .proj-card.feature .frame {
    aspect-ratio: 4/3;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .pub {
    grid-template-columns: 1fr;
    gap: var(--sp-2);
  }
  .gallery {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  /* New artful-motion effects: force settled, visible end state, no motion. */
  .accent-underline path {
    animation: none !important;
    stroke-dashoffset: 0 !important;
  }
  .js .reveal--left,
  .js .reveal--right,
  .js .reveal--scale,
  .js .hero-figure img {
    transform: none !important;
  }
  .js .hero-figure::after {
    opacity: 1 !important;
    transform: none !important;
  }
  .js .reveal .eyebrow::before {
    transform: none !important;
  }
  /* Scroll paint: remove the decorative layer entirely (no motion, no contrast risk) */
  .has-paint .paint-field,
  .has-paint .blob {
    display: none !important;
  }
  /* Painted-in covers: drop the mask so the cover is always fully shown */
  .js .paint-cover img {
    -webkit-mask-image: none !important;
            mask-image: none !important;
    animation: none !important;
    box-shadow: var(--shadow-lift) !important;
  }
  /* Orchestrated entrances: force every new child hidden-state visible+settled.
     (The .reveal reset above does NOT cover these children — without this they
     would stay opacity:0 and be permanently hidden. Keep this list in sync with
     any future child hidden-state added to the orchestration block.) */
  .js .has-paint .section-head.reveal > .palette-echo,
  .js .has-paint .section-head.reveal > .eyebrow,
  .js .has-paint .section-head.reveal > h1,
  .js .has-paint .section-head.reveal > h2,
  .js .has-paint .section-head.reveal > .lead,
  .js .has-paint .book.reveal .book-figures,
  .js .has-paint .book.reveal .book-body,
  .js .has-paint .book.reveal .book-previews > figure,
  .js .has-paint .contact-band.reveal > div,
  .js .has-paint .contact-band.reveal > .contact-list {
    opacity: 1 !important;
    transform: none !important;
  }
  /* Painted journey: drop the brush mask (content always shown) and settle the
     palette swatches. Lettered type + the .blob field are already static/hidden
     by the rules above. Keep this list in sync with the journey block. */
  .js .brush-reveal {
    -webkit-mask-image: none !important;
            mask-image: none !important;
    animation: none !important;
  }
  /* The scroll-drawn spine lives outside .paint-field (survives the hide above),
     so settle it to the finished ribbon — colour kept, no motion. */
  .js .thread {
    animation: none !important;
    clip-path: inset(0 0 0 0) !important;
  }
}

/* ============================================================================
   body.falra — "Falra festett álmok" mural photo-journey (buildFalraJourney)
   A documentary sibling to body.msz: it reuses the spread / thread / brush-reveal
   / .reveal / .msz-reader primitives, but the dominant medium is the REAL
   landscape mural photo (full-bleed, with an overlaid legibility card) instead of
   abstract watercolour blobs. Parallel .falra rules (msz selectors untouched).
   ========================================================================== */
.falra { --paint-o: 0.24; } /* margins-only colour wash, AA-safe */
.falra #main { position: relative; } /* offset parent for the .thread-field spine */
.falra .spread {
  min-height: 100svh;
  display: grid;
  align-content: center;
}
@media (max-width: 700px) {
  .falra .spread { min-height: auto; }
}
.falra .book-hero { padding-top: var(--sp-5); }

/* the year-timeline spine — 7 stops, one per year of the chronicle */
.falra #thread-grad stop:nth-child(1) { stop-color: var(--paint-teal-vivid); }
.falra #thread-grad stop:nth-child(2) { stop-color: var(--paint-rose-vivid); }
.falra #thread-grad stop:nth-child(3) { stop-color: var(--paint-indigo-vivid); }
.falra #thread-grad stop:nth-child(4) { stop-color: var(--paint-sage-vivid); }
.falra #thread-grad stop:nth-child(5) { stop-color: var(--paint-ochre-vivid); }
.falra #thread-grad stop:nth-child(6) { stop-color: var(--paint-terra-vivid); }
.falra #thread-grad stop:nth-child(7) { stop-color: var(--paint-rose-vivid); }

/* --- HERO: the printed title lockup, rebuilt as live text --- */
.falra-lockup {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 0 var(--sp-2);
  line-height: 0.9;
}
.falra-display {
  font-family: var(--sans);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: clamp(2rem, 1.2rem + 3.3vw, 3.5rem);
  color: color-mix(in srgb, var(--terra) 42%, var(--ink));
}
.falra-script {
  font-size: clamp(3rem, 1.9rem + 5vw, 5.4rem);
  color: var(--terra);
  margin-top: -0.16em;
  margin-left: 0.04em;
}
.falra .book-cover--wide { border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-lift); }
.falra .book-cover--wide img { border-radius: inherit; }

/* --- THE YEAR CHRONICLE: full-bleed mural + an overlaid legibility card --- */
.year-spread {
  position: relative;
  overflow: clip;
  isolation: isolate; /* contain blends; keep the page behind crisp */
  color: var(--ink);
}
.year-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.year-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
/* a soft paper fade on the text side — deepens the card, lets the mural breathe
   on the other side. Text legibility itself comes from the .year-inner card. */
.year-veil { position: absolute; inset: 0; pointer-events: none; }
.year-veil.veil-left {
  background: linear-gradient(90deg, color-mix(in srgb, var(--paper) 36%, transparent), transparent 58%);
}
.year-veil.veil-right {
  background: linear-gradient(270deg, color-mix(in srgb, var(--paper) 36%, transparent), transparent 58%);
}
.year-spread .wrap { position: relative; z-index: 1; }
.year-inner {
  max-width: 31rem;
  padding: clamp(1.4rem, 1rem + 2vw, 2.5rem);
  border-radius: 16px;
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  -webkit-backdrop-filter: blur(8px) saturate(1.05);
          backdrop-filter: blur(8px) saturate(1.05);
  box-shadow: 0 1px 2px rgba(40, 57, 67, 0.08), 0 30px 60px -34px rgba(40, 57, 67, 0.5);
  border: 1px solid color-mix(in srgb, #fff 55%, transparent);
}
.year-inner.to-right { margin-left: auto; }
.year-num {
  display: block;
  font-size: clamp(2.6rem, 1.8rem + 3.4vw, 4.4rem);
  color: var(--c, var(--teal-deep));
  line-height: 0.86;
}
.year-word {
  margin: 0.12em 0 0.3em;
  font-family: var(--script);
  font-weight: 600;
  font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.7rem);
  color: var(--ink);
  line-height: 1.06;
}
.year-line {
  margin: 0;
  color: var(--ink);
  opacity: 0.82;
  font-size: var(--step-0);
}
.year-progress { display: flex; gap: 0.5rem; margin-top: var(--sp-3); }
.year-progress i {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: var(--c);
  opacity: 0.22;
  transform: scale(0.76);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.year-progress i.on { opacity: 0.92; transform: none; }

/* phones: stop overlapping — the mural becomes a block image, the card sits under it */
@media (max-width: 700px) {
  .falra .year-spread { display: block; padding-block: var(--sp-5); }
  .year-photo {
    position: relative;
    aspect-ratio: 1.41 / 1;
    border-radius: 12px;
    overflow: hidden;
  }
  .year-veil { display: none; }
  .year-inner {
    margin: calc(-1 * var(--sp-5)) auto 0;
    width: min(100%, 31rem);
    position: relative;
    z-index: 1;
    background: var(--card);
    -webkit-backdrop-filter: none;
            backdrop-filter: none;
  }
  .year-inner.to-right { margin-left: auto; margin-right: auto; }
}

/* --- MURAL CLIMAX GALLERY (a mosaic of further walls, lightbox-zoomable) --- */
.falra .mural-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: var(--sp-2);
}
.falra .mural-grid button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1.41 / 1;
  box-shadow: 0 18px 36px -26px rgba(40, 57, 67, 0.5);
}
.falra .mural-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease);
}
.falra .mural-grid button:hover img,
.falra .mural-grid button:focus-visible img { transform: scale(1.05); }

/* --- READER: landscape album spreads (two facing pages per leaf).
   Keyed on the reader class — not body.falra — so the Publications album
   preview (which isn't a .falra page) gets the same landscape geometry. --- */
.msz-reader--wide { max-width: 1120px; }
.msz-reader--wide .reader-stage { width: min(100%, 1040px); aspect-ratio: 2.83 / 1; }
@media (max-width: 640px) {
  .msz-reader--wide .reader-stage { aspect-ratio: 1.42 / 1; }
  html:not(.js) .msz-reader--wide .reader-leaf { aspect-ratio: 1 / 1.42; }
}

/* --- READER: portrait spreads (two 4:5 pages per leaf) for the upcoming book.
   Keyed on the reader class (like --wide), so the geometry travels with the markup.
   Interior scans are 4:5 (ratio 0.8): two side by side ≈ 1.6/1 desktop, one page
   0.8/1 on the mobile single-page view — so object-fit:cover crops ~nothing. --- */
.msz-reader--tall { max-width: 760px; }
.msz-reader--tall .reader-stage { width: min(100%, 720px); aspect-ratio: 1.6 / 1; }
html:not(.js) .msz-reader--tall .reader-leaf { aspect-ratio: 1.6 / 1; }
@media (max-width: 640px) {
  .msz-reader--tall .reader-stage { aspect-ratio: 0.8 / 1; }
  html:not(.js) .msz-reader--tall .reader-leaf { aspect-ratio: 1 / 1.6; }
}

/* --- PROGRAM VOICES (two foreword voices, side by side) --- */
.falra .voices {
  columns: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: var(--sp-3);
  align-items: start;
}
.falra .reader-quote--voice cite { display: block; }
.falra .reader-quote--voice cite span {
  display: block;
  margin-top: 0.2rem;
  font-style: normal;
  font-weight: 400;
  font-size: var(--step--1);
  color: var(--ink);
  opacity: 0.66;
}

/* a hand-lettered chronicle heading, echoing the album's script title */
.falra .chronicle-title { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); }
