/* ==========================================================
   Marlene Burling — design system + shared components
   ========================================================== */
:root {
  --coral: #d76d55;
  --gold: #e2a052;
  --sage: #80af8d;
  --sky: #6d9bb3;
  --teal: #305b6c;
  --green: #29663a;
  --forest: #112a1b;
  --forest-2: #1a3b27;
  --ivory: #f7f2e6;
  --paper: #fbf8f0;
  --ink: #1d2a22;
  --ink-soft: #4a574f;
  --line: rgba(29, 42, 34, 0.14);
  --font-head: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --font-body:
    "DM Sans", "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-hero: clamp(2.8rem, 8.2vw, 7rem);
  --fs-h2: clamp(2rem, 4.6vw, 3.8rem);
  --fs-h3: clamp(1.35rem, 2.2vw, 1.8rem);
  --fs-body: clamp(1rem, 0.35vw + 0.94rem, 1.125rem);
  --wrap: min(1200px, 92vw);
  --gap: clamp(1rem, 2.4vw, 2rem);
  --section: clamp(4.5rem, 10vw, 9rem);
  --header-h: 84px;
  --player-h: 0px;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--forest);
}
body {
  margin: 0;
  font: 400 var(--fs-body)/1.7 var(--font-body);
  color: var(--ink);
  background: var(--ivory);
  overflow-x: clip;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

html,
body {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}
main {
  flex: 1 0 auto;
}
img,
svg,
canvas {
  max-width: 100%;
  display: block;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 {
  font-size: var(--fs-hero);
}
h2 {
  font-size: var(--fs-h2);
}
h3 {
  font-size: var(--fs-h3);
  line-height: 1.2;
}
p {
  margin: 0 0 1.1em;
  max-width: 62ch;
}
a {
  color: inherit;
  text-decoration-color: var(--gold);
  text-underline-offset: 0.25em;
}
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}
.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.8rem 1rem;
  z-index: 200;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
}
.wrap {
  width: var(--wrap);
  margin-inline: auto;
}
.section {
  padding-block: var(--section);
  position: relative;
}
.dark {
  background: var(--forest);
  color: var(--ivory);
}
.dark p {
  color: rgba(247, 242, 230, 0.82);
}
.paper {
  background: var(--paper);
}
.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--coral);
  margin: 0 0 1.2rem;
}
.dark .eyebrow {
  color: var(--gold);
}
.lead {
  font-size: clamp(1.1rem, 1vw + 0.9rem, 1.35rem);
  color: var(--ink-soft);
}
.dark .lead {
  color: rgba(247, 242, 230, 0.85);
  text-align: justify;
  text-justify: inter-word;
}
.italic {
  font-family: var(--font-head);
  font-style: italic;
}
.note {
  font-size: 0.85rem;
  border-left: 3px solid var(--gold);
  padding: 0.4rem 0.9rem;
  background: rgba(226, 160, 82, 0.12);
  color: var(--ink-soft);
  border-radius: 0 6px 6px 0;
  max-width: 62ch;
}
.dark .note {
  color: rgba(247, 242, 230, 0.8);
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Buttons + links */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: 600 0.95rem var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.35s var(--ease),
    background 0.3s,
    color 0.3s,
    border-color 0.3s;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: var(--gold);
  color: var(--forest);
}
.btn-primary:hover {
  background: #efb56c;
}

.btn-secondary {
  background: transparent;
  color: var(--ivory);
  border: 2px solid var(--ivory);
  border-radius: 50px;
  padding: 0.75rem 1.4rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: var(--ivory);
  color: var(--forest);
  border-color: var(--ivory);
  transform: translateY(-2px);
}
.btn-ghost {
  border-color: currentColor;
  color: inherit;
  background: transparent;
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}
.btn-dark {
  background: var(--forest);
  color: var(--ivory);
}
.btn-dark:hover {
  background: var(--green);
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.8rem;
}
.link {
  font-weight: 600;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100%/0 2px no-repeat;
  transition: background-size 0.4s var(--ease);
  padding-bottom: 2px;
}
.link:hover,
.link:focus-visible {
  background-size: 100% 2px;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  color: var(--ivory);
  transition:
    height 0.35s var(--ease),
    background 0.35s,
    color 0.35s,
    box-shadow 0.35s;
}
.site-header.scrolled {
  height: 66px;
  background: rgba(247, 242, 230, 0.93);
  color: var(--ink);
  box-shadow:
    0 1px 0 var(--line),
    0 8px 30px rgba(17, 42, 27, 0.06);
}
@supports (backdrop-filter: blur(10px)) {
  .site-header.scrolled {
    background: rgba(247, 242, 230, 0.8);
    backdrop-filter: blur(14px) saturate(1.3);
  }
}
.nav-inner {
  width: var(--wrap);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.wordmark {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.16em;
  text-decoration: none;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 1.6vw, 1.8rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.5rem 0.1rem;
  position: relative;
}
.nav-links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.1rem;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav-links a:not(.btn):hover::after,
.nav-links a[aria-current="page"]::after {
  transform: scaleX(1);
}
.nav-links .btn {
  min-height: 42px;
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
}
.menu-btn {
  display: none;
  width: 48px;
  height: 48px;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  position: relative;
}
.menu-btn span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: currentColor;
  transition:
    transform 0.4s var(--ease),
    opacity 0.3s;
}
.menu-btn span:nth-child(1) {
  top: 18px;
}
.menu-btn span:nth-child(2) {
  top: 28px;
}
.menu-open .menu-btn span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
.menu-open .menu-btn span:nth-child(2) {
  transform: translateY(-5px) rotate(-45deg);
}
.mobile-panel {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--forest);
  color: var(--ivory);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + 1rem) 8vw 3rem;
  visibility: hidden;
  opacity: 0;
  clip-path: circle(0% at calc(100% - 40px) 40px);
  transition:
    clip-path 0.7s var(--ease),
    opacity 0.4s,
    visibility 0s 0.7s;
  overflow-y: auto;
}
.menu-open .mobile-panel {
  visibility: visible;
  opacity: 1;
  clip-path: circle(150% at calc(100% - 40px) 40px);
  transition:
    clip-path 0.7s var(--ease),
    opacity 0.3s,
    visibility 0s;
}
.mobile-panel ul {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
}
.mobile-panel li {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.5s,
    transform 0.5s var(--ease);
}
.menu-open .mobile-panel li {
  opacity: 1;
  transform: none;
  transition-delay: calc(0.15s + var(--i) * 0.06s);
}
.mobile-panel a {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;

  font-family: var(--font-head);
  font-size: clamp(1.9rem, 8vw, 2.8rem);
  padding: 0.35rem 0;
  text-decoration: none;
  min-height: 48px;
  width: 100%;
}
.mobile-panel a[aria-current="page"] {
  color: var(--gold);
  font-style: italic;
}
body.locked {
  overflow: hidden;
}
.menu-open .site-header {
  background: transparent !important;
  color: var(--ivory) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
/* Inner pages have a dark hero, so the header stays light-on-dark until scrolled. */

/* Footer */
.site-footer {
  background: var(--forest);
  color: var(--ivory);
  margin-top: auto;
  flex-shrink: 0;
  padding: clamp(3.5rem, 8vw, 6rem) 0 calc(2rem + var(--player-h));
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  background-size: 200% 100%;
  animation: sheen 8s linear infinite;
}
@keyframes sheen {
  to {
    background-position: -200% 0;
  }
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1.6fr 1.2fr;
  gap: clamp(2rem, 5vw, 4rem);
}
.site-footer h3 {
  font-size: 1rem;
  font-family: var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.1rem;
}
.site-footer li a {
  display: inline-block;
  padding: 0.35rem 0;
  text-decoration: none;
  color: rgba(247, 242, 230, 0.85);
}
.site-footer li a:hover {
  color: var(--gold);
}
.foot-bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(247, 242, 230, 0.15);
  font-size: 0.85rem;
  color: rgba(247, 242, 230, 0.65);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: space-between;
}

/* Forms */
.field {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}
.field label {
  font-weight: 600;
  font-size: 0.9rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  padding: 0.85rem 1rem;
  min-height: 48px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  transition:
    border-color 0.25s,
    box-shadow 0.25s;
}
.field textarea {
  min-height: 150px;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(41, 102, 58, 0.18);
}
.field [aria-invalid="true"] {
  border-color: #b3261e;
}
.err {
  color: #b3261e;
  font-size: 0.85rem;
  min-height: 1.2em;
}
.dark .err {
  color: #ffb4a8;
}
.check {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin-bottom: 1.2rem;
  font-size: 0.92rem;
}
.check input {
  width: 22px;
  height: 22px;
  margin-top: 0.2rem;
  accent-color: var(--green);
}
.form-status {
  padding: 0.9rem 1.1rem;
  border-radius: 10px;
  margin-top: 1rem;
  font-weight: 500;
}
.form-status[data-state="info"] {
  background: rgba(226, 160, 82, 0.2);
}
.form-status[data-state="ok"] {
  background: rgba(128, 175, 141, 0.3);
}
.form-status[data-state="error"] {
  background: rgba(215, 109, 85, 0.2);
}
.dark .form-status {
  color: var(--ivory);
}
.news-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  max-width: 560px;
}
.news-form input {
  flex: 1 1 240px;
  min-height: 52px;
  border-radius: 999px;
  border: 1.5px solid rgba(247, 242, 230, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  padding: 0 1.3rem;
  font: inherit;
}
.news-form input::placeholder {
  color: rgba(247, 242, 230, 0.6);
}

/* Cards, covers, media */
.grid {
  display: grid;
  gap: var(--gap);
}
.cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
}
.cols-4 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(1.3rem, 2.4vw, 2rem);
  transition:
    transform 0.45s var(--ease),
    box-shadow 0.45s;
}
@media (hover: hover) {
  .card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px -24px rgba(17, 42, 27, 0.35);
  }
}
.dark .card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(247, 242, 230, 0.14);
}
.cover {
  --c1: var(--green);
  --c2: var(--forest);
  position: relative;
  aspect-ratio: 2/3;
  border-radius: 4px 10px 10px 4px;
  overflow: hidden;
  background: linear-gradient(155deg, var(--c1), var(--c2));
  color: var(--ivory);
  box-shadow:
    -6px 0 0 rgba(0, 0, 0, 0.18) inset,
    0 30px 50px -22px rgba(17, 42, 27, 0.65);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12% 10%;
  transform-style: preserve-3d;
}
.cover b {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  line-height: 1.05;
}
.cover small {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.65rem;
  opacity: 0.85;
}
.cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(
    160deg,
    var(--sky),
    var(--teal) 55%,
    var(--forest)
  );
  aspect-ratio: 4/5;
}
.media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media .ph {
  position: absolute;
  inset: auto 1rem 1rem 1rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.3);
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
}
.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}
.split.flip {
  grid-template-columns: 0.95fr 1.05fr;
}
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(128, 175, 141, 0.3);
  color: var(--green);
}
.dark .tag {
  background: rgba(85, 85, 85, 0.2);
  color: #fff;
}

/* Inner page hero */
.page-hero {
  background:
    radial-gradient(120% 90% at 80% 0%, var(--teal), transparent 60%),
    linear-gradient(180deg, var(--forest-2), var(--forest));

  color: var(--ivory);
  padding: calc(var(--header-h) + clamp(4rem, 10vw, 8rem)) 0
    clamp(4rem, 9vw, 7rem);

  position: relative;
  overflow: hidden;

  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  box-sizing: border-box;
}
.page-hero h1 {
  font-size: clamp(2.4rem, 6.5vw, 5.4rem);
  max-width: 16ch;
}
.page-hero p {
  color: rgba(247, 242, 230, 0.85);
}
.hero-leaf {
  position: absolute;
  right: -6%;
  top: 12%;
  width: min(48vw, 560px);
  height: auto;
  overflow: visible;
  opacity: 0.18;
  pointer-events: none;
  animation: hero-float 9s ease-in-out infinite;
}
.hero-leaf .wing {
  fill: #f7f2e6;
  stroke: #e2a052;
  stroke-width: 0.8;
  stroke-linejoin: round;
  transform-box: view-box;
  transform-origin: 50px 50px;
  animation: hero-flap 1.1s ease-in-out infinite alternate;
}
.hero-leaf .body {
  fill: #e2a052;
}
.hero-leaf .feeler {
  fill: none;
  stroke: #e2a052;
  stroke-width: 0.8;
  stroke-linecap: round;
}

@keyframes hero-flap {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0.22);
  }
}
@keyframes hero-float {
  0%,
  100% {
    transform: translate(0, 0) rotate(-6deg);
  }
  50% {
    transform: translate(-18px, -28px) rotate(5deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-leaf,
  .hero-leaf .wing {
    animation: none;
  }
}
.word {
  display: inline-block;
}

/* Persistent podcast mini-player (lives outside <main>) */
.mini {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: var(--forest);
  color: var(--ivory);
  border-top: 1px solid rgba(226, 160, 82, 0.4);
  padding: 0.7rem max(1rem, env(safe-area-inset-right))
    calc(0.7rem + env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
  transform: translateY(110%);
  visibility: hidden;
  transition:
    transform 0.5s var(--ease),
    visibility 0s 0.5s;
}
.mini.open {
  transform: none;
  visibility: visible;
  transition: transform 0.5s var(--ease);
}
.mini-inner {
  width: var(--wrap);
  margin-inline: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1.2fr) auto minmax(120px, 2fr) auto auto;
  gap: 0.9rem;
  align-items: center;
}
.mini-art {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(150deg, var(--coral), var(--green));
}
.mini-title {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: none;
}
.mini-sub {
  margin: 0;
  font-size: 0.78rem;
  opacity: 0.75;
  max-width: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.icon-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition:
    background 0.25s,
    transform 0.25s;
}
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}
.icon-btn:active {
  transform: scale(0.92);
}
.icon-btn.play {
  background: var(--gold);
  color: var(--forest);
}
.icon-btn.play:hover {
  background: #efb56c;
}
.icon-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.seek {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}
.seek input[type="range"] {
  flex: 1;
  min-width: 0;
}
input[type="range"] {
  accent-color: var(--gold);
  height: 28px;
  cursor: pointer;
}
.vol {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.vol input {
  width: 84px;
}
.mini[data-state="loading"] .mini-sub::after {
  content: " (loading…)";
}
.mini[data-state="error"] .mini-sub {
  color: #ffb4a8;
  opacity: 1;
}
.eq {
  display: inline-flex;
  gap: 3px;
  align-items: flex-end;
  height: 18px;
}
.eq i {
  width: 3px;
  background: var(--gold);
  height: 30%;
  border-radius: 2px;
}
.is-playing .eq i {
  animation: eq 1s ease-in-out infinite;
}
.is-playing .eq i:nth-child(2) {
  animation-delay: 0.2s;
}
.is-playing .eq i:nth-child(3) {
  animation-delay: 0.4s;
}
.is-playing .eq i:nth-child(4) {
  animation-delay: 0.1s;
}
@keyframes eq {
  0%,
  100% {
    height: 25%;
  }
  50% {
    height: 100%;
  }
}

/* Mini-player layout (final): art | info | play | seek | volume | minimize | close */
.mini-inner {
  grid-template-columns:
    auto minmax(0, 1.1fr) auto minmax(140px, 2fr)
    auto auto auto;
}
.mini.collapsed .seek,
.mini.collapsed .vol {
  display: none;
}
.mini.collapsed .mini-inner {
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  grid-template-areas: none;
}
.mini .mini-min svg {
  transition: transform 0.35s var(--ease);
}
.mini.collapsed .mini-min svg {
  transform: rotate(180deg);
}

/* Shared card patterns */
.book-card {
  display: grid;
  gap: 1.1rem;
  align-content: start;
}
.book-card .cover {
  width: min(100%, 260px);
  margin-inline: auto;
}
.book-card h3 {
  margin: 0;
}
.book-card p {
  margin: 0;
  font-size: 0.97rem;
}
.meta {
  font-size: 0.82rem;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.9rem;
}
.dark .meta {
  color: rgba(247, 242, 230, 0.7);
}
.post {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.post-img {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--sage), var(--teal));
  position: relative;
}
.post-img svg {
  position: absolute;
  inset: auto -10% -30% auto;
  width: 70%;
  opacity: 0.35;
  color: var(--ivory);
  transition: transform 0.8s var(--ease);
}
@media (hover: hover) {
  .post:hover .post-img svg {
    transform: scale(1.12) rotate(4deg);
  }
}
.post-body {
  padding: 1.3rem 1.5rem 1.6rem;
  display: grid;
  gap: 0.6rem;
  align-content: start;
  flex: 1;
}
.post h3 {
  margin: 0;
}
.post p {
  margin: 0;
  font-size: 0.97rem;
}
.leaf-icon {
  width: 1em;
  height: 1em;
}
.ph-flag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(215, 109, 85, 0.18);
  color: #9c3f2b;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
}
.dark .ph-flag {
  color: #ffb9a8;
}
.site-header.force-solid {
  height: 66px;
  background: rgba(247, 242, 230, 0.93);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}

/* Lenis */
html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}
.lenis.lenis-smooth iframe {
  pointer-events: none;
}
/* Masked word reveals */
.mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0 0.04em 0.14em;
  margin-bottom: -0.14em;
}

/* Book cover polish: spine highlight + hover shine */
.cover::before {
  content: "";
  position: absolute;
  left: 5%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.35),
    rgba(255, 255, 255, 0.05)
  );
  z-index: 2;
}
.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 65%
  );
  transform: translateX(-130%);
  transition: transform 1s var(--ease);
  pointer-events: none;
}
.book-card:hover .cover::after,
.book-stage:hover .cover::after {
  transform: translateX(130%);
}

/* Back to top */
.to-top {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: calc(1.1rem + var(--player-h) + env(safe-area-inset-bottom));
  z-index: 85;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 50%;
  background: var(--forest);
  color: var(--ivory);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.9);
  box-shadow: 0 12px 30px -10px rgba(17, 42, 27, 0.6);
  transition:
    opacity 0.4s,
    transform 0.4s var(--ease),
    visibility 0s 0.4s,
    bottom 0.4s var(--ease),
    background 0.3s;
}
.to-top.show {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    opacity 0.4s,
    transform 0.4s var(--ease),
    visibility 0s,
    bottom 0.4s var(--ease),
    background 0.3s;
}
.to-top:hover {
  background: var(--green);
  transform: translateY(-3px);
}
.to-top .ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.to-top .prog {
  transition: stroke-dashoffset 0.15s linear;
}
.to-top .arrow {
  width: 20px;
  height: 20px;
  position: relative;
  transition: transform 0.35s var(--ease);
}
.to-top:hover .arrow {
  transform: translateY(-3px);
}
body.menu-open .to-top {
  opacity: 0;
  visibility: hidden;
}

/* Custom cursor (mouse only; enabled by js/cursor.js) */
.mb-cursor-dot,
.mb-cursor-ring {
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s;
}
.mb-cursor-dot {
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 1px rgba(17, 42, 27, 0.35);
}
.mb-cursor-ring {
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  box-shadow: 0 0 0 1px rgba(17, 42, 27, 0.2);
  transition:
    opacity 0.3s,
    width 0.35s var(--ease),
    height 0.35s var(--ease),
    margin 0.35s var(--ease),
    background 0.3s;
}
.cursor-on .mb-cursor-dot,
.cursor-on .mb-cursor-ring {
  opacity: 1;
}
.has-cursor,
.has-cursor * {
  cursor: none !important;
}
.has-cursor input:not([type="range"]):not([type="checkbox"]),
.has-cursor textarea {
  cursor: text !important;
}
.cursor-link .mb-cursor-ring {
  width: 68px;
  height: 68px;
  margin: -34px 0 0 -34px;
  background: rgba(226, 160, 82, 0.22);
}
.cursor-link .mb-cursor-dot {
  opacity: 0;
}
.cursor-media .mb-cursor-ring {
  width: 84px;
  height: 84px;
  margin: -42px 0 0 -42px;
  background: rgba(247, 242, 230, 0.12);
  border-color: rgba(226, 160, 82, 0.7);
}
.cursor-text .mb-cursor-ring,
.cursor-text .mb-cursor-dot {
  opacity: 0 !important;
}
.cursor-down .mb-cursor-ring {
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  background: rgba(226, 160, 82, 0.35);
}

/* Native cursor while a modal is open (the dialog sits above the custom cursor) */
.modal-open .mb-cursor-dot,
.modal-open .mb-cursor-ring {
  display: none;
}
.has-cursor.modal-open,
.has-cursor.modal-open * {
  cursor: auto !important;
}
.has-cursor.modal-open button,
.has-cursor.modal-open a,
.has-cursor.modal-open select {
  cursor: pointer !important;
}

.logo {
  height: 40px;
  width: auto;
  display: block;
}

/* Black logo when scrolled */
.site-header.scrolled .logo {
  filter: brightness(0);
}

/* Restore logo when menu is open */
.menu-open.locked .site-header.scrolled .logo {
  filter: none !important;
}

.site-footer .logo {
  height: 70px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* Explore links in two columns */
.footer-explore ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1.25rem;
  padding: 0;
  list-style: none;
}

.footer-explore li {
  min-width: 0;
}

/* Rounded-square social icons */
.social-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 1rem;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid currentColor;
  border-radius: 12px;
  color: var(--gold);
  transition:
    background 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease;
}

.social-icon svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.social-icon:hover {
  background: var(--gold);
  color: var(--forest);
  transform: translateY(-3px);
}

.social-icon:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

@media (max-width: 768px) {
  .footer-explore ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .social-icons {
    gap: 10px;
  }
}
