/*
Theme Name: Maxthorne Press
Theme URI: https://maxthornepress.com
Author: Maxthorne Press
Author URI: https://maxthornepress.com
Description: A fast editorial block theme for Maxthorne Press and The Complete Book of Indoor Plant Cultivation.
Version: 3.0.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 8.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: maxthorne-press
*/

:root {
  --mp-ink: #171915;
  --mp-paper: #f7f4ec;
  --mp-paper-deep: #eee9dd;
  --mp-green: #24463a;
  --mp-green-dark: #173128;
  --mp-lime: #d9ef77;
  --mp-rule: rgba(23, 25, 21, .16);
  --mp-shadow: 0 24px 70px rgba(19, 35, 29, .16);
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
a { text-underline-offset: .18em; }
.wp-site-blocks { overflow: hidden; }

.mp-eyebrow {
  font-size: .76rem;
  font-weight: 760;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.mp-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--mp-rule);
}

.mp-hero::before {
  content: "";
  position: absolute;
  width: 36rem;
  height: 36rem;
  right: -12rem;
  top: -17rem;
  border: 1px solid rgba(217, 239, 119, .22);
  border-radius: 50%;
  box-shadow: 0 0 0 7rem rgba(217, 239, 119, .035), 0 0 0 14rem rgba(217, 239, 119, .025);
  pointer-events: none;
}

.mp-hero h1 { text-wrap: balance; }
.mp-hero-copy { max-width: 43rem; }
.mp-subtitle { max-width: 40rem; }

.mp-sales-hero h1 {
  font-size: clamp(2.7rem, 5.7vw, 5.5rem);
  max-width: 58rem;
}

.mp-sales-hero .mp-kicker {
  font-family: var(--wp--preset--font-family--display);
  font-size: clamp(1.25rem, 2.3vw, 2rem);
  line-height: 1.2;
}

.mp-book-stage {
  position: relative;
  min-height: 34rem;
  display: grid;
  place-items: center;
}

.mp-book-stage::after {
  content: "";
  position: absolute;
  inset: 15% 4% 4%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217,239,119,.26), rgba(217,239,119,0) 67%);
  filter: blur(6px);
}

.mp-book-cover {
  position: relative;
  z-index: 1;
  width: min(100%, 24rem);
  filter: drop-shadow(0 38px 35px rgba(0,0,0,.26));
  transform: rotate(1.5deg);
  transition: transform .35s ease;
}

.mp-book-cover--detail { width: min(100%, 20rem); }
.mp-book-cover { height: auto; object-fit: contain; display: block; margin-inline: auto; }
.mp-book-cover img { width: 100%; height: auto; object-fit: contain; }

.mp-format-badge {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: .3rem .7rem;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .06em;
}

.mp-price { font-size: clamp(1.5rem, 3vw, 2.2rem); font-family: var(--wp--preset--font-family--display); font-weight: 700; }
.mp-price small { font-family: var(--wp--preset--font-family--body); font-size: .78rem; font-weight: 500; opacity: .75; }

.mp-book-cover:hover { transform: rotate(0) translateY(-5px); }

.mp-button .wp-block-button__link,
.wp-block-button.mp-button .wp-block-button__link {
  box-shadow: 0 8px 0 rgba(0,0,0,.14);
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.mp-button .wp-block-button__link:hover,
.wp-block-button.mp-button .wp-block-button__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 11px 0 rgba(0,0,0,.12);
}

.mp-proof-strip { border-top: 1px solid rgba(255,255,255,.13); }
.mp-proof-item { border-right: 1px solid rgba(255,255,255,.13); }
.mp-proof-item:last-child { border-right: 0; }
.mp-proof-number { font-family: var(--wp--preset--font-family--display); }

.mp-card {
  height: 100%;
  border: 1px solid var(--mp-rule);
  border-radius: 16px;
  background: rgba(255,255,255,.48);
  box-shadow: 0 12px 34px rgba(27,38,31,.055);
}

.mp-article-card { position: relative; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.mp-article-card:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(27,38,31,.11); }
.mp-article-card a::after { content: ""; position: absolute; inset: 0; }
.mp-article-card a { text-decoration: none; }
.mp-article-card .mp-card-topic { color: var(--mp-green); font-size: .73rem; font-weight: 780; letter-spacing: .12em; text-transform: uppercase; }
.mp-article-card .mp-read-more { font-size: .9rem; font-weight: 750; color: var(--mp-green); }

.mp-toc { counter-reset: chapter; }
.mp-toc-row {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1rem 0;
  border-top: 1px solid var(--mp-rule);
}
.mp-toc-row:last-child { border-bottom: 1px solid var(--mp-rule); }
.mp-toc-number { color: var(--mp-green); font-weight: 780; }
.mp-toc-blur { position: relative; user-select: none; }
.mp-toc-blur .mp-toc-row { filter: blur(5px); opacity: .38; }
.mp-toc-blur::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--wp--preset--font-family--display);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 700;
  color: var(--mp-green-dark);
  background: linear-gradient(90deg, transparent, rgba(247,244,236,.9) 20%, rgba(247,244,236,.9) 80%, transparent);
}

.mp-banner { border-radius: 16px; overflow: hidden; box-shadow: var(--mp-shadow); }
.mp-banner img { display: block; width: 100%; height: auto; }

.mp-nav { display: flex; align-items: center; gap: clamp(.85rem, 2.3vw, 2rem); font-size: .9rem; font-weight: 680; }
.mp-nav a { color: inherit; text-decoration: none; }
.mp-nav a:hover { text-decoration: underline; }
.mp-nav .mp-lang { border: 1px solid currentColor; border-radius: 999px; padding: .18rem .62rem; font-size: .74rem; letter-spacing: .08em; }
.mp-mobile-nav { display: none; position: relative; }
.mp-mobile-nav summary { cursor: pointer; font-weight: 750; list-style: none; }
.mp-mobile-nav summary::-webkit-details-marker { display: none; }
.mp-mobile-nav .mp-mobile-panel { position: absolute; z-index: 20; right: 0; top: 2.2rem; min-width: 15rem; padding: 1rem; border: 1px solid var(--mp-rule); border-radius: 10px; background: var(--mp-paper); box-shadow: var(--mp-shadow); }
.mp-mobile-nav a { display: block; padding: .55rem .2rem; color: var(--mp-ink); text-decoration: none; }

.mp-button-row { display: flex; flex-wrap: wrap; gap: .85rem; align-items: center; }
.mp-button-row > * { margin: 0 !important; }
.mp-button-secondary { display: inline-block; border: 1px solid currentColor; border-radius: 5px; padding: .82rem 1.2rem; font-weight: 700; text-decoration: none; }

.mp-language-switcher { display: inline-flex; gap: .5rem; }

.mp-topic-number {
  display: inline-grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--mp-green);
  color: white;
  font-size: .78rem;
  font-weight: 700;
}

.mp-sample-frame {
  border-radius: 13px;
  border: 1px solid var(--mp-rule);
  box-shadow: var(--mp-shadow);
  overflow: hidden;
  background: white;
}

.mp-author-rule { width: 4rem; height: 2px; background: var(--mp-lime); }

.mp-offer {
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 22px;
  box-shadow: var(--mp-shadow);
}

.mp-checklist { list-style: none; padding-left: 0; }
.mp-checklist li { position: relative; padding-left: 1.85rem; margin-bottom: .75rem; }
.mp-checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--mp-lime); font-weight: 800; }

.mp-notice {
  border-left: 3px solid var(--mp-green);
  background: rgba(36,70,58,.06);
}

.mp-faq details {
  padding: 1.2rem 0;
  border-top: 1px solid var(--mp-rule);
}
.mp-faq summary { cursor: pointer; font-family: var(--wp--preset--font-family--display); font-size: 1.18rem; font-weight: 700; }
.mp-faq details:last-child { border-bottom: 1px solid var(--mp-rule); }

.mp-newsletter input[type="email"] {
  min-height: 3.25rem;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 6px;
  background: rgba(255,255,255,.08);
  color: #fff;
  padding: 0 .9rem;
}

.mp-newsletter button {
  min-height: 3.25rem;
  border: 0;
  border-radius: 6px;
  background: var(--mp-lime);
  color: var(--mp-ink);
  font-weight: 760;
  padding: 0 1.2rem;
  cursor: pointer;
}

.woocommerce div.product div.images img { border-radius: 14px; }
.woocommerce button.button.alt,
.woocommerce a.button.alt,
.woocommerce #respond input#submit.alt {
  background: var(--mp-green);
  color: #fff;
  border-radius: 5px;
  padding: 1em 1.35em;
}
.woocommerce button.button.alt:hover,
.woocommerce a.button.alt:hover { background: var(--mp-green-dark); }

@media (max-width: 781px) {
  .mp-hero { text-align: center; }
  .mp-hero-copy, .mp-subtitle { margin-inline: auto; }
  .mp-book-stage { min-height: 26rem; }
  .mp-book-cover { width: min(72vw, 20rem); }
  .mp-book-cover--detail { width: min(64vw, 17rem); }
  .mp-proof-item { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.13); }
  .mp-proof-item:last-child { border-bottom: 0; }
  .mp-proof-strip { grid-template-columns: 1fr 1fr !important; }
  .mp-nav { display: none; }
  .mp-mobile-nav { display: block; }
  .mp-sales-hero h1 { font-size: clamp(2.45rem, 12vw, 4.2rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
