/* MOONART Books: shared styles for all pages (tokens, top bar + menu, footer, inner page parts) */
:root {
  --brown: #846256;
  --cream: #E7E2CF;
  --paper: #FCFBF9;
  --warm-grey: #B1AB9F;
  --pink: #E41A4B;
  --ink: #4E3730;
  --deep: #2E2320;
  --muted: #6E5A52;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-move: cubic-bezier(.58, 0, .07, 1);
  --ease-fade: cubic-bezier(.33, 0, .2, 1);

  --f-ui: 'Heebo', system-ui, sans-serif;
  --f-book: 'Frank Ruhl Libre', 'David', serif;
  --grain: 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='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.mab-ltr { direction: ltr; unicode-bidi: isolate; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Smooth wheel scrolling (Lenis) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- Top bar: menu, phone, socials ---------- */
.topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 30;
  height: 48px; padding: 0 clamp(16px, 4vw, 56px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--warm-grey);
  color: var(--paper);
  font-family: var(--f-ui);
}
.topbar.is-sticky { position: sticky; }
.tb-nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); }
.tb-nav a { color: inherit; text-decoration: none; font-size: 15px; font-weight: 500; padding: 6px 0; background: linear-gradient(currentColor, currentColor) no-repeat right bottom / 0% 1.5px; transition: background-size 180ms var(--ease-out); }
.tb-nav a[aria-current="page"], .tb-nav a:focus-visible { background-size: 100% 1.5px; }
.tb-end { display: flex; align-items: center; gap: 16px; }
.tb-phone { font-size: 16px; font-weight: 500; color: inherit; text-decoration: none; direction: ltr; unicode-bidi: isolate; }
.tb-social { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tb-social a {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brown); color: var(--paper);
  transition: background-color .16s var(--ease-fade);
}
.tb-social svg { width: 14px; height: 14px; fill: currentColor; }
.topbar a:focus-visible, .tb-burger:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }
.tb-burger { display: none; width: 40px; height: 40px; margin-inline-start: -8px; border: 0; background: none; color: inherit; cursor: pointer; }
.tb-burger span { display: block; width: 22px; height: 2px; margin: 5px auto; background: currentColor; border-radius: 2px; }
@media (hover: hover) and (pointer: fine) {
  .tb-nav a:hover { background-size: 100% 1.5px; }
  .tb-social a:hover { background: var(--pink); }
}
@media (max-width: 860px) {
  .tb-nav, .tb-phone { display: none; }
  .tb-burger { display: block; }
  .tb-social { gap: 6px; }
  .tb-social a { width: 26px; height: 26px; }
}

/* Full screen menu (phones) */
.menu-panel {
  position: fixed; inset: 0; z-index: 70;
  background: var(--deep); color: var(--paper);
  display: flex; flex-direction: column; padding: 18px 24px 32px;
  font-family: var(--f-ui);
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path 520ms var(--ease-move), visibility 0s linear 520ms;
}
.menu-panel.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path 520ms var(--ease-move); }
.menu-close { align-self: flex-start; width: 44px; height: 44px; border: 0; background: none; color: inherit; font-size: 30px; line-height: 1; cursor: pointer; }
.menu-panel nav { margin-top: 28px; display: grid; gap: 6px; }
.menu-panel nav a { color: inherit; text-decoration: none; font-weight: 800; font-size: clamp(30px, 9vw, 42px); line-height: 1.3; }
.menu-panel nav a[aria-current="page"] { color: #F27A98; }
.menu-panel .mp-foot { margin-top: auto; display: grid; gap: 14px; }
.menu-panel .mp-foot .tb-phone { display: inline-block; justify-self: start; font-size: 22px; }
.menu-panel a:focus-visible, .menu-close:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .menu-panel, .menu-panel.is-open { transition: none; } }

/* ---------- Inner pages ---------- */
.page-body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--f-ui); overflow-x: hidden; }
.page-body::after { content: ""; position: fixed; inset: 0; z-index: 50; pointer-events: none; background: var(--grain); background-size: 160px; mix-blend-mode: multiply; opacity: .12; }
.page-hero {
  background: radial-gradient(120% 95% at 50% 30%, #F3EFE2 0%, var(--cream) 60%, #D9D1BA 100%);
  padding: clamp(40px, 7svh, 72px) 20px clamp(48px, 8svh, 84px);
}
.page-hero .ph-inner { max-width: 1200px; margin: 0 auto; }
.page-hero .ph-logo { display: inline-block; }
.page-hero .ph-logo img { width: clamp(130px, 13vw, 180px); height: auto; display: block; }
.page-hero .ph-crumbs { margin-top: clamp(26px, 4svh, 40px); font-size: 14px; color: var(--muted); }
.page-hero .ph-crumbs a { color: inherit; }
.page-hero h1 { margin: 8px 0 0; font-weight: 800; font-size: clamp(36px, 5vw, 64px); line-height: 1.08; letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
.page-hero h1 em { font-style: normal; color: var(--pink); }
.page-hero .ph-lead { margin: 14px 0 0; max-width: 56ch; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.6; color: var(--muted); text-wrap: pretty; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Book type chips */
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-block; padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(132, 98, 86, .3); color: var(--ink); text-decoration: none; font-size: 15px; transition: background-color 160ms var(--ease-fade), border-color 160ms var(--ease-fade); }
.chips a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chips a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (max-width: 600px) {
  /* one row of type chips that scrolls sideways */
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -20px; padding: 2px 20px; }
  .chips::-webkit-scrollbar { display: none; }
  .chips a { white-space: nowrap; }
  .gallery-sec .g-meta { display: block; }
  .gallery-sec .g-count { display: block; margin-top: 12px; }
}
@media (hover: hover) and (pointer: fine) { .chips a:not([aria-current]):hover { border-color: var(--brown); background: rgba(132, 98, 86, .08); } }

/* Gallery of books */
.gallery-sec { padding: clamp(40px, 7svh, 72px) 0 clamp(72px, 12svh, 120px); }
.gallery-sec .g-meta { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.gallery-sec .g-count { font-size: 15px; color: var(--muted); }
.gallery { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 2vw, 24px); }
.gallery button {
  display: block; width: 100%; padding: 0; border: 0; border-radius: 6px; cursor: zoom-in;
  aspect-ratio: 1; background: radial-gradient(80% 80% at 50% 45%, #F7F3EA, #E9E3D2);
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.gallery img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gallery button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.gallery button:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) { .gallery button:hover { transform: translateY(-4px); box-shadow: 0 18px 32px -20px rgba(78, 55, 48, .45); } }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(30, 22, 19, .88); padding: 24px; opacity: 0; visibility: hidden; transition: opacity 220ms var(--ease-fade), visibility 0s linear 220ms; }
.lightbox.is-open { opacity: 1; visibility: visible; transition: opacity 220ms var(--ease-fade); }
.lightbox img { max-width: min(92vw, 720px); max-height: 82svh; width: auto; height: auto; transform: scale(.96); transition: transform 300ms var(--ease-out); }
.lightbox.is-open img { transform: none; }
.lightbox button { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(252, 251, 249, .25); background: rgba(252, 251, 249, .08); color: var(--paper); font-size: 22px; cursor: pointer; display: grid; place-items: center; }
.lightbox button:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }
.lightbox .lb-close { top: 18px; left: 18px; }
.lightbox .lb-prev { right: 18px; top: 50%; translate: 0 -50%; }
.lightbox .lb-next { left: 18px; top: 50%; translate: 0 -50%; }
@media (prefers-reduced-motion: reduce) { .lightbox, .lightbox img { transition: none; } }

/* Call to action band */
.cta-band { background: var(--deep); color: var(--paper); padding: clamp(56px, 9svh, 96px) 20px; }
.cta-band .cb-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { margin: 0; font-weight: 800; font-size: clamp(28px, 3.2vw, 44px); line-height: 1.15; text-wrap: balance; }
.cta-band h2 span { color: #F27A98; }
.btn-main {
  display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 28px; border-radius: 999px;
  background: var(--pink); color: #fff; text-decoration: none; font: 500 17px var(--f-ui);
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}
.btn-main svg { width: 18px; height: 18px; }
.btn-main:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
.btn-main:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .btn-main:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -12px rgba(228, 26, 75, .6); } }

/* ---------- Articles ---------- */
.post-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 24px; }
.post-card a { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; background: #fff; border: 1px solid rgba(78, 55, 48, .1); border-radius: 6px; overflow: hidden; transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out); }
.post-card .pc-img { aspect-ratio: 4 / 3; background: radial-gradient(80% 80% at 50% 45%, #F7F3EA, #E3DCC8); overflow: hidden; }
.post-card .pc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card .pc-img img.is-mockup { object-fit: contain; scale: 1.15; }
.post-card .pc-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card h3 { margin: 0; font-weight: 800; font-size: 22px; line-height: 1.2; color: var(--ink); text-wrap: balance; }
.post-card p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }
.post-card .pc-more { margin-top: auto; padding-top: 8px; font-size: 15px; font-weight: 500; color: var(--pink); }
.post-card a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .post-card a:hover { transform: translateY(-4px); box-shadow: 0 18px 32px -20px rgba(78, 55, 48, .45); } }

.article { padding: clamp(40px, 7svh, 72px) 20px clamp(72px, 12svh, 120px); }
.article .a-inner { max-width: 720px; margin: 0 auto; }
.article .a-figure { margin: 0 0 36px; border-radius: 6px; overflow: hidden; aspect-ratio: 16 / 9; background: radial-gradient(80% 80% at 50% 45%, #F7F3EA, #E3DCC8); }
.article .a-figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article .a-figure img.is-mockup { object-fit: contain; }
.article p, .article li { font-size: clamp(18px, 1.35vw, 20px); line-height: 1.8; color: var(--ink); text-wrap: pretty; }
.article p { margin: 0 0 1.1em; }
.article .a-lead { font-family: var(--f-book); font-weight: 500; font-size: clamp(22px, 2vw, 27px); line-height: 1.5; color: var(--ink); }
.article h2 { margin: 1.6em 0 .5em; font-weight: 800; font-size: clamp(26px, 2.4vw, 32px); line-height: 1.2; color: var(--ink); }
.article h3 { margin: 1.3em 0 .4em; font-weight: 800; font-size: 21px; color: var(--brown); }
.article ul { margin: 0 0 1.2em; padding: 0; list-style: none; display: grid; gap: 6px; }
.article ul li { position: relative; padding-inline-start: 22px; }
.article ul li::before { content: ""; position: absolute; inset-inline-start: 0; top: .72em; width: 8px; height: 8px; background: var(--pink); }
.article blockquote { margin: 1.6em 0; padding: 4px 22px; border-inline-start: 3px solid var(--pink); font-family: var(--f-book); font-size: 23px; line-height: 1.5; color: var(--ink); }
.article .a-sign { font-family: var(--f-book); font-size: 22px; color: var(--brown); }
.faq { margin: 0 0 1.4em; border-top: 1px solid rgba(78, 55, 48, .15); }
.faq details { border-bottom: 1px solid rgba(78, 55, 48, .15); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 0; display: flex; justify-content: space-between; gap: 16px; align-items: center; font-weight: 800; font-size: 19px; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; border-inline-end: 2px solid var(--brown); border-bottom: 2px solid var(--brown); rotate: 45deg; translate: 0 -3px; transition: rotate 220ms var(--ease-out), translate 220ms var(--ease-out); }
.faq details[open] summary::after { rotate: -135deg; translate: 0 3px; }
.faq summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.faq details p { margin: 0 0 18px; }
.a-more { padding: 0 20px clamp(72px, 12svh, 110px); }
.a-more .wrap > h2 { margin: 0 0 22px; font-weight: 800; font-size: clamp(26px, 2.4vw, 32px); color: var(--ink); }

/* ---------- About ---------- */
.about-sec { padding: clamp(48px, 8svh, 88px) 20px; }
.about-sec .ab-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.about-sec .ab-photo { position: sticky; top: 80px; border-radius: 4px; overflow: hidden; aspect-ratio: 734 / 1024; max-width: 440px; justify-self: start; }
.about-sec .ab-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-sec h2 { margin: 1.4em 0 .5em; font-weight: 800; font-size: clamp(26px, 2.4vw, 34px); color: var(--ink); }
.about-sec h2:first-child { margin-top: 0; }
.about-sec p { margin: 0 0 1em; font-size: clamp(18px, 1.35vw, 20px); line-height: 1.8; color: var(--ink); text-wrap: pretty; }
.about-sec .ab-tags { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.about-sec .ab-tags li { padding: 6px 14px; border-radius: 999px; background: var(--cream); font-size: 15px; color: var(--ink); }
.about-sec .ab-sign { margin-top: 1.6em; font-family: var(--f-book); font-size: 24px; color: var(--brown); }
@media (max-width: 860px) {
  .about-sec .ab-grid { grid-template-columns: 1fr; }
  .about-sec .ab-photo { position: static; order: -1; max-width: 340px; }
}

/* Home: latest articles */
.mab-blog { background: var(--paper); padding: clamp(72px, 12svh, 120px) 20px; }
.mab-blog .bl-head { max-width: 1200px; margin: 0 auto 28px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.mab-blog h2 { margin: 0; font-weight: 800; font-size: clamp(34px, 3.6vw, 52px); line-height: 1.1; color: var(--ink); }
.mab-blog .bl-all { color: var(--ink); font-weight: 500; font-size: 17px; text-decoration: none; padding-bottom: 4px; background: linear-gradient(var(--pink), var(--pink)) no-repeat right bottom / 100% 2px; }
.mab-blog .bl-all:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.mab-blog .post-grid { max-width: 1200px; margin: 0 auto; }

/* ---------- Reveal once (content stays visible without JS) ---------- */
.js-reveal.is-armed .rv { opacity: 0; translate: 0 16px; transition: opacity 600ms var(--ease-out), translate 700ms var(--ease-out); transition-delay: calc(min(var(--i, 0), 8) * 70ms); }
.js-reveal.is-in .rv { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) { .js-reveal.is-armed .rv { opacity: 1; translate: 0 0; transition: none; } }

/* ---------- Footer ---------- */
.mab-footer { background: var(--deep); color: var(--paper); padding: 56px clamp(20px, 5vw, 64px) 28px; font-family: var(--f-ui); }
.mab-footer .ft-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; align-items: start; }
.mab-footer .ft-logo { width: 220px; height: auto; display: block; }
.mab-footer p { margin: 14px 0 0; font-size: 15px; line-height: 1.6; color: rgba(252, 251, 249, .8); max-width: 34ch; }
.mab-footer h3 { margin: 0 0 12px; font-size: 15px; font-weight: 800; letter-spacing: .02em; }
.mab-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mab-footer a { color: inherit; text-decoration: none; font-size: 15px; }
.mab-footer a:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }
@media (hover: hover) { .mab-footer ul a:hover { text-decoration: underline; text-underline-offset: 4px; } }
.mab-footer .ft-phone { font-size: 22px; font-weight: 500; direction: ltr; unicode-bidi: isolate; display: inline-block; }
.mab-footer .tb-social { display: flex; justify-self: start; margin-top: 14px; }
.mab-footer .tb-social a { background: rgba(252, 251, 249, .14); }
.mab-footer .ft-bottom { max-width: 1200px; margin: 40px auto 0; padding-top: 18px; border-top: 1px solid rgba(252, 251, 249, .2); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: rgba(252, 251, 249, .75); }
@media (max-width: 760px) { .mab-footer .ft-inner { grid-template-columns: 1fr; } }

/* ---------- Article opening: the cover photo shrinks on scroll and docks in the top bar (ANIMTD header-cover-photo-shrinks) ---------- */
.topbar.is-article { height: 60px; display: grid; grid-template-columns: auto auto 1fr auto; grid-template-areas: "burger nav dock end"; column-gap: 24px; }
.topbar.is-article .tb-burger { grid-area: burger; }
.topbar.is-article .tb-nav { grid-area: nav; }
.topbar.is-article .tb-dock { grid-area: dock; justify-self: end; }
.topbar.is-article .tb-end { grid-area: end; }
.topbar.is-article::after { content: ""; position: absolute; bottom: 0; inset-inline: 0; height: 1px; background: rgba(46, 35, 32, .18); opacity: var(--line, 0); }
.tb-dock { width: 0; height: 44px; overflow: hidden; }
.dock-chip {
  width: var(--dock-w, 320px); height: 44px; padding: 0; border: 0; background: none; color: var(--deep); cursor: pointer;
  display: flex; align-items: center; gap: 12px; text-align: right; font-family: var(--f-ui);
}
.dock-thumb { flex: none; width: 56px; height: 40px; border-radius: 4px; }
.dock-text { display: grid; min-width: 0; opacity: var(--chip, 0); }
.dock-text b { font-weight: 500; font-size: 15px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: linear-gradient(currentColor, currentColor) no-repeat right bottom / 0% 1px; transition: background-size 240ms var(--ease-out); }
.dock-text small { font-size: 13px; color: var(--deep); opacity: .75; }
.dock-chip:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .dock-chip:hover .dock-text b { background-size: 100% 1px; } }

.art-head { background: radial-gradient(120% 95% at 50% 30%, #F3EFE2 0%, var(--cream) 60%, #D9D1BA 100%); padding: 28px 20px clamp(36px, 6svh, 56px); }
.art-head .ah-inner { max-width: 1200px; margin: 0 auto; }
.art-head .ph-crumbs { margin: 0 0 18px; }
.cover-slot { height: clamp(240px, 42svh, 420px); border-radius: 4px; overflow: hidden; background: #E3DCC8; }
.cover-slot img, .cover-fly img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-slot img.is-mockup, .cover-fly img.is-mockup { object-fit: contain; }
.art-head h1 { margin: 32px 0 0; font-weight: 800; font-size: clamp(36px, 4.6vw, 64px); line-height: 1.08; letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
.art-head .ah-meta { margin: 12px 0 0; font-size: 16px; color: var(--muted); }
.art-head .ah-meta b { font-weight: 500; color: var(--pink); }
/* While the effect runs: the real heading keeps its place (and stays for screen readers), the flying copies are what you see */
.art-head.is-live .cover-slot { background: none; }
.art-head.is-live h1 { color: transparent; }
.cover-fly {
  position: fixed; z-index: 31; border-radius: 4px; overflow: hidden; background: #E3DCC8; pointer-events: none;
  --s: .27px;
  box-shadow:
    0 calc(653 * var(--s)) calc(250 * var(--s)) 0 rgba(0, 0, 0, .01),
    0 calc(367 * var(--s)) calc(220 * var(--s)) 0 rgba(0, 0, 0, .05),
    0 calc(163 * var(--s)) calc(163 * var(--s)) 0 rgba(0, 0, 0, .09),
    0 calc(41 * var(--s)) calc(90 * var(--s)) 0 rgba(0, 0, 0, .10);
}
.title-fly { position: fixed; z-index: 31; transform-origin: right top; pointer-events: none; font-family: var(--f-ui); font-weight: 800; letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
.article.after-head { padding-top: clamp(32px, 5svh, 56px); }
@media (max-width: 860px) {
  .topbar.is-article { grid-template-columns: auto 1fr auto; grid-template-areas: "burger . dock"; column-gap: 12px; }
  .topbar.is-article .tb-end { display: none; }
  .dock-thumb { width: 40px; height: 30px; }
  .dock-text small { display: none; }
  .dock-text b { font-size: 14px; }
  .art-head h1 { margin-top: 22px; }
}

/* Top bar end: studio logo (link to the main MOONART site), phone, WhatsApp */
.tb-studio { display: flex; align-items: center; padding-inline-end: 16px; border-inline-end: 1px solid rgba(46, 35, 32, .2); }
.tb-studio img { height: 22px; width: auto; display: block; }
.tb-wa { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--deep); color: var(--paper); transition: background-color .16s var(--ease-fade), transform .16s var(--ease-out); }
.tb-wa svg { width: 18px; height: 18px; fill: currentColor; }
.tb-wa:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) { .tb-wa:hover { background: #25A244; } .tb-studio:hover img { opacity: .8; } }
.menu-panel .mp-foot .tb-wa { justify-self: start; width: 44px; height: 44px; }
.menu-panel .mp-foot .tb-studio { justify-self: start; border: 0; padding: 10px 14px; border-radius: 6px; background: var(--paper); }
@media (max-width: 860px) { .tb-studio img { height: 18px; } .tb-studio { padding-inline-end: 12px; } }

/* Footer: link to the main studio site with its logo */
.mab-footer .ft-studio { display: flex; align-items: center; gap: 10px; margin-top: 18px; width: max-content; color: rgba(252, 251, 249, .75); font-size: 14px; }
.mab-footer .ft-studio img { height: 30px; width: auto; display: block; transition: opacity .16s var(--ease-fade); }
@media (hover: hover) { .mab-footer .ft-studio:hover img { opacity: .8; } }

/* ---------- Skip link: hidden until a keyboard user reaches it ---------- */
.skip-link {
  position: fixed; top: 8px; inset-inline-start: 8px; z-index: 90;
  padding: 10px 18px; border-radius: 999px; background: var(--deep); color: var(--paper);
  font: 500 15px var(--f-ui); text-decoration: none;
  transform: translateY(-160%); transition: transform 160ms var(--ease-out);
}
.skip-link:focus { transform: none; outline: 2px solid var(--pink); outline-offset: 2px; }
main:focus { outline: none; }

/* ---------- Legal pages ---------- */
.article a { color: var(--pink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.article a:hover { text-decoration-thickness: 2px; }
.legal h2 { font-size: clamp(22px, 2vw, 26px); }
.legal .legal-date { margin-top: 2.4em; padding-top: 1.2em; border-top: 1px solid rgba(78, 55, 48, .18); font-size: 15px; color: var(--muted); }

/* ---------- Accessibility menu (button bottom-left, panel above it) ---------- */
.a11y-btn {
  position: fixed; bottom: 16px; left: 16px; z-index: 60;
  display: grid; place-items: center; width: 52px; height: 52px; padding: 0;
  border: 2px solid var(--paper); border-radius: 50%;
  background: var(--deep); color: var(--paper); cursor: pointer;
  box-shadow: 0 8px 22px -8px rgba(46, 35, 32, .55);
  transition: transform 160ms var(--ease-out), background 160ms;
}
.a11y-btn svg { width: 28px; height: 28px; fill: currentColor; }
.a11y-btn:hover { background: var(--ink); }
.a11y-btn:active { transform: scale(.94); }
.a11y-btn:focus-visible, .a11y-panel :focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }
.a11y-panel {
  position: fixed; bottom: 80px; left: 16px; z-index: 61;
  width: min(330px, calc(100vw - 32px)); max-height: calc(100vh - 100px); overflow: auto;
  padding: 20px; border-radius: 16px; background: var(--paper); color: var(--ink);
  font-family: var(--f-ui); box-shadow: 0 24px 60px -18px rgba(46, 35, 32, .55);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 180ms var(--ease-fade), transform 220ms var(--ease-out), visibility 0s linear 220ms;
}
.a11y-panel.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.a11y-panel h2 { margin: 0 0 14px; font-size: 18px; font-weight: 800; color: var(--deep); }
.a11y-close { position: absolute; top: 12px; left: 12px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); font-size: 16px; cursor: pointer; }
.a11y-close:hover { background: var(--cream); }
.a11y-size { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; padding: 10px 12px; border-radius: 10px; background: #F3EFE6; font-size: 15px; font-weight: 500; }
.a11y-size div { display: flex; gap: 6px; }
.a11y-size button { width: 36px; height: 36px; border: 1px solid rgba(78, 55, 48, .25); border-radius: 8px; background: var(--paper); color: var(--deep); font: 500 17px var(--f-ui); cursor: pointer; }
.a11y-size button:disabled { opacity: .35; cursor: default; }
.a11y-size output { min-width: 3.2em; text-align: center; font-size: 14px; color: var(--muted); }
.a11y-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 0; list-style: none; }
.a11y-opts button {
  width: 100%; min-height: 48px; padding: 8px 10px; border: 1px solid rgba(78, 55, 48, .22); border-radius: 10px;
  background: var(--paper); color: var(--ink); font: 400 15px/1.3 var(--f-ui); text-align: start; cursor: pointer;
  transition: background 140ms, border-color 140ms;
}
.a11y-opts button:hover { border-color: var(--brown); }
.a11y-opts button[aria-pressed="true"] { background: var(--deep); border-color: var(--deep); color: var(--paper); font-weight: 500; }
.a11y-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; font-size: 14px; }
.a11y-foot a { color: var(--brown); }
.a11y-reset { border: 0; background: none; padding: 4px 0; color: var(--pink); font: 500 14px var(--f-ui); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* What each option does */
html.a11y-contrast { --ink: #000; --deep: #000; --muted: #222; --brown: #3E2A23; --warm-grey: #4A453D; --pink: #A80028; }
html.a11y-contrast body { color: #000; }
html.a11y-links a { text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: 3px; outline: 2px dashed currentColor; outline-offset: 2px; }
html.a11y-font body, html.a11y-font body *:not(svg):not(svg *) { font-family: Arial, 'Heebo', sans-serif !important; letter-spacing: .01em; }
html.a11y-still *, html.a11y-still *::before, html.a11y-still *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html.a11y-still .js-reveal .rv { opacity: 1 !important; transform: none !important; }
@media (max-width: 560px) { .a11y-btn { width: 48px; height: 48px; bottom: 12px; left: 12px; } .a11y-panel { left: 12px; bottom: 70px; } }
@media print { .a11y-btn, .a11y-panel, .skip-link { display: none; } }
