:root {
  /* Palette taken from the current WordPress site */
  --bg: #fbf8fe;
  --surface: #ffffff;
  --tint: #f0e4f4;        /* lavender section wash (#CCA5DB under white) */
  --lavender: #cca5db;
  --ink: #160f28;         /* deep purple-black headings */
  --ink-soft: #4b4560;
  --line: #e6dbef;
  --brand: #5d1ba8;       /* royal purple */
  --brand-ink: #ffffff;
  --accent: #6528f7;      /* violet: Donate buttons, links */
  --accent-hover: #4f00d5;
  --accent-ink: #ffffff;
  --plum: #2e0067;        /* deepest purple */
  --sun: #cca5db;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(46, 0, 103, .06), 0 12px 32px -14px rgba(46, 0, 103, .28);
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --display: "Poppins", system-ui, sans-serif;
  --script: "Bad Script", "Segoe Script", cursive;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
h1, h2 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-family: var(--display); font-weight: 600; line-height: 1.3; margin: 0 0 .5em; font-size: 1.12rem; }
p { margin: 0 0 1em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.wrap.narrow { width: min(780px, 100% - 32px); }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.tint { background: var(--tint); }
.kicker { font: 600 .78rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.lead { font-size: 1.15rem; color: var(--ink-soft); }
.small { font-size: .9rem; color: var(--ink-soft); }
.prose p { color: var(--ink-soft); }
.prose strong { color: var(--ink); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  font: 600 .95rem/1 var(--display); padding: 14px 22px; border-radius: 999px;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-1px); }
.btn-primary, .btn-donate { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover, .btn-donate:hover { background: var(--accent-hover); color: #fff; }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--plum); }
.btn-ghost-light { border-color: rgba(255,255,255,.8); color: #fff; background: transparent; }
.btn-ghost-light:hover { background: #fff; color: var(--plum); }
.btn-light:hover { background: var(--tint); color: var(--plum); }
.btn-lg { padding: 18px 30px; font-size: 1.1rem; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-right: auto; min-width: 0; }
.brand img { width: 52px; height: 52px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-short { font: 700 1.3rem var(--serif); color: var(--plum); }
.brand-long { font-size: .78rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav ul a { display: block; padding: 10px 14px; border-radius: 999px; color: var(--ink); text-decoration: none; font: 500 .93rem var(--display); }
.site-nav ul a:hover { background: var(--tint); color: var(--ink); }
.site-nav ul a[aria-current="page"] { background: var(--tint); color: var(--accent); }
.menu-toggle { display: none; }

@media (max-width: 920px) {
  .menu-toggle {
    display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px;
    border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  }
  .menu-toggle span:first-child, .menu-toggle span:first-child::before, .menu-toggle span:first-child::after {
    display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; content: "";
  }
  .menu-toggle span:first-child::before { position: absolute; top: -6px; }
  .menu-toggle span:first-child::after { position: absolute; top: 6px; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 12px 16px 20px; gap: 12px; display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; }
  .site-nav ul a { padding: 14px 16px; }
  .brand-long { display: none; }
}

/* hero */
.hero { padding: clamp(40px, 7vw, 90px) 0 clamp(48px, 8vw, 100px); position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(45deg, rgba(208, 190, 190, .95) 0%, #7136ff 70%, #5d1ba8 100%); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.eyebrow { font: 700 1.35rem/1.5 var(--script); color: #fff; max-width: 34ch; text-shadow: 0 1px 8px rgba(46, 0, 103, .3); }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 4.8rem); color: #fff; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-art { position: relative; justify-self: center; width: min(380px, 100%); }
.blob { position: absolute; inset: 8% -10% -6% 10%; background: rgba(255, 255, 255, .28); border-radius: 46% 54% 38% 62% / 52% 40% 60% 48%; transform: rotate(-6deg); }
.hero-img { position: relative; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 200px 200px var(--radius) var(--radius); box-shadow: var(--shadow); }
@media (max-width: 760px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { width: min(300px, 80%); } }

/* book launch */
.book-card { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; background: var(--surface); border-radius: calc(var(--radius) * 1.5); padding: clamp(18px, 3vw, 36px); box-shadow: var(--shadow); }
.book-img img { border-radius: var(--radius); width: 100%; }
.badge { display: inline-block; background: var(--tint); color: var(--accent); font: 600 .8rem/1 var(--display); letter-spacing: .1em; text-transform: uppercase; padding: 8px 12px; border-radius: 999px; }
.book-launch { padding-top: 0; margin-top: -40px; position: relative; }
@media (max-width: 760px) { .book-card { grid-template-columns: 1fr; } }

/* about */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.about-side { position: sticky; top: 110px; }
.quote { margin: 0; background: var(--brand); color: #fff; border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); position: relative; }
.quote { background: linear-gradient(160deg, var(--brand), var(--plum)); }
.quote::before { content: "“"; position: absolute; top: -18px; left: 22px; font: 700 6rem/1 var(--serif); color: var(--lavender); }
.quote p { font: 700 1.45rem/1.5 var(--script); margin-bottom: 18px; }
.quote cite { font-style: normal; font-weight: 700; opacity: .85; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } .about-side { position: static; } }

/* gallery */
.gallery { columns: 4 200px; column-gap: 14px; }
.gallery-item { display: block; width: 100%; padding: 0; border: 0; background: none; margin: 0 0 14px; break-inside: avoid; cursor: zoom-in; border-radius: 14px; overflow: hidden; }
.gallery-item img { width: 100%; transition: transform .3s ease; }
.gallery-item:hover img { transform: scale(1.03); }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 92vw; max-height: 92vh; }
.lightbox::backdrop { background: rgba(20, 22, 35, .85); }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 12px; }
.lb-close { position: fixed; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; font-size: 1.6rem; cursor: pointer; }

/* pillars */
.pillars { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 20px; }
.pillars.four { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.pillars.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.pillar { background: var(--surface); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); border-top: 5px solid var(--brand); }
.pillar:nth-child(2) { border-top-color: var(--accent); }
.pillar:nth-child(3) { border-top-color: var(--lavender); }
.pillar .num { font: 600 .9rem var(--display); color: var(--ink-soft); display: block; margin-bottom: 10px; }
.pillar p { color: var(--ink-soft); font-size: .98rem; }

/* media */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 28px; }
.media-card { background: var(--surface); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.media-card .outlet { font: 600 .78rem var(--display); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin-bottom: 8px; }
.media-card h3 { font-size: 1.15rem; }
.media-card p { color: var(--ink-soft); font-size: .95rem; }
.media-card .more { margin-top: auto; font-weight: 800; text-decoration: none; }

/* page hero */
.page-hero { padding: clamp(48px, 7vw, 88px) 0 clamp(28px, 4vw, 48px); border-bottom: 1px solid var(--line); background: radial-gradient(circle at 92% 10%, rgba(113, 54, 255, .22), transparent 36%), radial-gradient(circle at 70% 120%, rgba(204, 165, 219, .5), transparent 40%), var(--bg); }
.page-hero h1 { max-width: 22ch; }

.split { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.sticky-fig { margin: 0; position: sticky; top: 110px; }
.sticky-fig img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .sticky-fig { position: static; } }

/* stories */
.stories { display: grid; gap: 22px; margin-top: 36px; }
.story { display: grid; grid-template-columns: 280px 1fr; gap: 26px; background: var(--surface); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); align-items: center; }
.story:nth-child(even) { grid-template-columns: 1fr 280px; }
.story:nth-child(even) .story-img { order: 2; }
.story-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.story-copy { padding: 6px 10px; }
.story-copy p { color: var(--ink-soft); font-style: italic; }
@media (max-width: 720px) { .story, .story:nth-child(even) { grid-template-columns: 1fr; } .story:nth-child(even) .story-img { order: 0; } }

/* socials & contact */
.socials { display: flex; gap: 10px; margin-top: 10px; }
.social { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; }
.social:hover { background: var(--plum); color: #fff; }
.social svg { width: 20px; height: 20px; }
.socials.big .social { width: 50px; height: 50px; }
.contact-list { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.contact-list a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; color: inherit; word-break: break-word; }
.contact-list svg { width: 20px; height: 20px; flex: none; }
.contact-list.big a { font-size: 1.1rem; }
.contact-card { background: var(--surface); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }

/* donate page */
.donate-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.pay-card { background: var(--surface); border-radius: calc(var(--radius) * 1.3); padding: clamp(16px, 3vw, 28px); box-shadow: var(--shadow); min-height: 220px; }
.pay-iframe { width: 100%; border: 0; display: block; min-height: 600px; }
.pay-mount { display: flex; justify-content: center; }
.pay-empty, .pay-link, .pay-paypal { text-align: center; padding: 26px 10px; }
.pay-empty .contact-list { justify-content: center; }
.impact { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 10px; }
.impact li { background: var(--tint); border-radius: 12px; padding: 14px 18px; }
.impact strong { font: 700 1.3rem var(--serif); color: var(--accent); margin-right: 6px; }
@media (max-width: 860px) { .donate-grid { grid-template-columns: 1fr; } }

/* donate band */
.donate-band { background: linear-gradient(120deg, var(--plum) 0%, var(--brand) 55%, #7136ff 100%); color: #fff; padding: clamp(44px, 6vw, 72px) 0; }
.band-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.band-inner > div { max-width: 680px; }
.donate-band .kicker { color: var(--lavender); }
.donate-band p { opacity: .9; margin: 0; }

/* footer */
.site-footer { background: var(--plum); color: #e4d9f3; padding: 56px 0 0; }
.site-footer a { color: #fff; }
.site-footer h3 { color: #fff; font-size: 1rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 36px; }
.footer-brand img { width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: 14px; padding: 4px; margin-bottom: 14px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-links a { text-decoration: none; }
.site-footer .social { background: rgba(255, 255, 255, .12); }
.footer-base { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 40px; padding: 20px 0 28px; font-size: .88rem; }
.footer-base p { margin: 0; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* loading state */
#app:empty { min-height: 100vh; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* book shop */
.book-page { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.book-cover { margin: 0; position: sticky; top: 110px; }
.book-cover img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 24px; }
.product { background: var(--surface); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.product img { border-radius: 12px; margin-bottom: 10px; }
.product .price { font: 700 1.6rem var(--serif); color: var(--accent); margin: 0; }
.product p { color: var(--ink-soft); }
.ship-note { margin-top: 18px; }
@media (max-width: 860px) { .book-page { grid-template-columns: 1fr; } .book-cover { position: static; max-width: 420px; } }

/* "What we do" band: the old site's purple-to-periwinkle gradient */
.section.grad { background: linear-gradient(180deg, #5d1ba8 0%, #7b4fc4 55%, #a2badf 100%); color: #fff; }
.section.grad h2 { color: #fff; }
.section.grad .kicker { color: var(--lavender); }
.section.grad .pillar { border-top-color: var(--lavender); }
.tint { background: var(--tint); }
.section.grad .pillar { color: var(--ink); }

/* embedded Stripe checkout (Book page) */
.buy-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.qty { display: inline-flex; align-items: center; gap: 8px; font: 600 .9rem var(--display); color: var(--ink-soft); }
.qty select { font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.buy-now:disabled, .qty select:disabled { opacity: .55; cursor: default; transform: none; }
.checkout-panel { margin-top: 28px; background: var(--surface); border-radius: var(--radius); padding: clamp(16px, 3vw, 28px); box-shadow: var(--shadow); scroll-margin-top: 100px; }
.checkout-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.checkout-head h3 { margin: 0; }
#checkout-form { min-height: 120px; }
.checkout-error { color: #b3261e; font-weight: 700; }
.order-result { margin-top: 28px; border-radius: var(--radius); padding: 22px 26px; scroll-margin-top: 100px; }
.order-result.ok { background: #e7f6ec; border: 1px solid #a8d9b7; }
.order-result.warn { background: #fff4de; border: 1px solid #f0d49a; }
.order-result h2 { font-size: 1.5rem; margin-bottom: .3em; }
.order-result p { margin: 0; }

/* Book page: newest release + editions */
.book-intro { padding-bottom: 0; }
.release-section h2 { margin-bottom: 26px; }
.release { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start;
  background: var(--surface); border-radius: calc(var(--radius) * 1.4); padding: clamp(18px, 3vw, 36px); box-shadow: var(--shadow); }
.release-img img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.release-name { font: 600 clamp(1.6rem, 3vw, 2.2rem)/1.15 var(--serif); margin-bottom: 14px; }
.release .price { font: 700 1.9rem var(--serif); color: var(--accent); margin: 6px 0 12px; }
.book-desc p { color: var(--ink-soft); }
.edition-toggle { display: inline-flex; background: var(--tint); border-radius: 999px; padding: 4px; gap: 4px; margin: 4px 0 10px; }
.ed-btn { border: 0; background: transparent; color: var(--ink); font: 600 .92rem var(--display); padding: 9px 18px; border-radius: 999px; cursor: pointer; }
.ed-btn[aria-checked="true"] { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(101, 40, 247, .35); }
.ed-btn:hover:not([aria-checked="true"]) { background: #fff; }
.ed-btn:disabled { opacity: .55; cursor: default; }
.product .book-thumb img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; margin-bottom: 12px; }
.product h3 { font-size: 1.15rem; margin-bottom: 8px; }
.product .book-desc { font-size: .95rem; }
.products { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.ship-section { padding-top: 24px; padding-bottom: 8px; }
.checkout-panel { margin-top: 24px; }
@media (max-width: 860px) { .release { grid-template-columns: 1fr; } }
