/* Whole Life Wealth — narrative marketing layer
   Foundations and low-level components live in calculator/theme.css so the
   independently deployed calculator mirror can consume the same system. */

:root {
  --section-pad: clamp(64px, 9vw, 110px);
  --page-gutter: clamp(20px, 4vw, 40px);
  --measure-copy: 65ch;
  --book-cube-top: #f1d4c0;
  --book-cube-left: #3b5a4a;
  --book-cube-right: #4d5fcc;
  --book-ink-soft: #26241f;
  --book-ink-muted: #7a766e;
  --book-ink-quiet: #a8a294;
  --book-ink-caption: #57534a;
  --book-page-back: #d9cfba;
  --book-page-middle: #e0d7c2;
}

body { overflow-x: hidden; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.site-section {
  padding: var(--section-pad) var(--page-gutter);
}
.site-section--paper { background: var(--paper); color: var(--ink); }
.site-section--shell { background: var(--shell); color: var(--on-shell); }
.site-section--shell-deep { background: var(--shell-deep); color: var(--on-shell); }
.site-container { width: min(100%, var(--measure-wide)); margin-inline: auto; }
.site-container--copy { width: min(100%, var(--measure)); margin-inline: auto; }

.section-heading { display: grid; gap: 18px; }
.section-heading--center { justify-items: center; text-align: center; }
.section-heading__title { font-size: var(--step-h2); }
.section-heading__lede { max-width: var(--measure-copy); color: var(--ink-80); }
.site-section--shell .section-heading__title,
.site-section--shell-deep .section-heading__title { color: var(--on-shell); }
.site-section--shell .section-heading__lede,
.site-section--shell-deep .section-heading__lede { color: var(--on-shell-65); }

.button-row { display: flex; flex-wrap: wrap; gap: var(--gap-s); align-items: center; }
.button-row--center { justify-content: center; }
.btn--on-shell { background: var(--on-shell); color: var(--ink); }
.btn--on-shell:hover { background: var(--paper-raised); color: var(--ink); }
.btn--quiet-on-shell { border-color: var(--on-shell-25); color: var(--on-shell); }
.btn--quiet-on-shell:hover { border-color: var(--on-shell); color: var(--on-shell); background: rgb(239 232 220 / 10%); }

.narrative-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(24px, 5vw, 72px); }
.narrative-grid__copy { grid-column: span 7; }
.narrative-grid__media { grid-column: span 5; }
.prose { display: grid; gap: 1em; max-width: var(--measure-copy); }
.prose p { color: var(--ink-80); }

.problem-section { border-block: 1px dotted var(--ink-25); }
.problem-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-m); margin-top: var(--gap-l); }
.problem-card { padding-top: var(--gap-m); border-top: 3px solid var(--accent); }
.problem-card h3 { margin-bottom: var(--gap-s); }
.problem-card p { color: var(--ink-65); }

.framework-section { text-align: center; }
.equation {
  padding-block: var(--gap-m);
  border-block: 1px dotted currentColor;
  font: 600 clamp(14px, 2vw, 18px)/1.5 var(--font-mono);
}
.dimension-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-s); margin-top: var(--gap-l); }
.dimension-card { padding: var(--gap-m); border: 1px solid var(--ink-12); border-radius: var(--radius-card); text-align: left; }
.dimension-card::before { content: ''; display: block; width: 32px; height: 6px; margin-bottom: var(--gap-m); background: var(--dimension-color); }
.dimension-card--agency { --dimension-color: var(--agency); }
.dimension-card--vitality { --dimension-color: var(--vitality); }
.dimension-card--connection { --dimension-color: var(--connection); }

.story-section blockquote { font: italic 700 var(--step-h2)/1.15 var(--font-display); }
.story-section cite { display: block; margin-top: var(--gap-m); font: 600 var(--step-label)/1 var(--font-mono); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; }

.cta-panel { padding: clamp(32px, 6vw, 64px); border: var(--edge) solid var(--ink-25); border-radius: var(--radius-card); text-align: center; }
.cta-panel .button-row { margin-top: var(--gap-l); }

.book-landing { background: var(--shell); }
.book-hero h1,
.book-reader > div > h2,
.book-community h2 { color: var(--on-shell); }

.page-center {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 24px;
  box-sizing: border-box;
}

.order-card {
  width: 100%;
  max-width: 620px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-card);
  padding: clamp(32px, 6vw, 56px);
  text-align: center;
  background: var(--paper-raised);
}

.order-cover {
  width: 112px;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 10px 30px rgba(26, 25, 22, .22);
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--paper-edge);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.center-box { display: flex; justify-content: center; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.download-links-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 420px;
  margin-inline: auto;
  gap: var(--gap-s);
}
.mt-m { margin-top: var(--gap-m); }
.mt-l { margin-top: var(--gap-l); }

@media (max-width: 720px) {
  .narrative-grid__copy, .narrative-grid__media { grid-column: 1 / -1; }
  .problem-list, .dimension-row { grid-template-columns: 1fr; }
}

/* =============================================================================
   Book Landing Page — Semantic Section Components
   ============================================================================= */

/* ---- Hero --------------------------------------------------------------- */
.book-hero {
  min-height: 100svh;
  background-color: var(--shell);
  background-image:
    radial-gradient(ellipse at 50% 42%, rgba(241, 212, 192, 0.08) 0%, rgba(59, 90, 74, 0.04) 45%, transparent 70%),
    var(--bg-topo-shell);
  background-size: auto, 1200px 900px;
  background-position: center, center;
  color: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 72px 24px 64px;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
}

.book-hero__author-wrap {
  animation: wlwFadeUp .8s var(--ease) .05s both;
}

.book-hero__author {
  font: 700 clamp(13px, 1.6vw, 16px)/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: .24em;
  color: rgba(239, 232, 220, .6);
}

.book-hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(58px, 10vw, 112px);
  line-height: .94;
  letter-spacing: 0;
  margin: 22px 0 0;
  animation: wlwFadeUp .8s var(--ease) .16s both;
}

.book-hero__cube-wrap {
  animation: wlwFadeUp .9s var(--ease) .3s both;
  margin-top: clamp(28px, 4.5vh, 48px);
}

.book-hero__cube {
  will-change: transform;
  transition: transform .18s ease-out;
}

.book-hero__cube-float {
  animation: wlwFloat 7.5s ease-in-out infinite;
}

.book-hero__cube-svg-wrap {
  width: min(440px, 55vw);
  filter: drop-shadow(0 34px 60px rgba(0, 0, 0, .55));
  position: relative;
}

.book-hero__cube-top { animation: topGlow 12s ease-in-out infinite; }
.book-hero__cube-left { animation: leftGlow 12s ease-in-out infinite; }
.book-hero__cube-right { animation: rightGlow 12s ease-in-out infinite; }

.book-hero__cube-shimmer {
  position: absolute;
  inset: 0;
  clip-path: polygon(50% 15.38%, 76.67% 33.08%, 76.67% 67.69%, 50% 85.38%, 23.33% 67.69%, 23.33% 33.08%);
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .5) 50%, transparent 65%);
  background-size: 260% 260%;
  mix-blend-mode: overlay;
  animation: cubeShimmer 5.5s ease-in-out infinite;
  pointer-events: none;
}

.book-hero__subtitle {
  font-family: var(--font-mono);
  font-size: clamp(17px, 2.4vw, 23px);
  line-height: 1.5;
  letter-spacing: .035em;
  color: rgba(239, 232, 220, .85);
  margin: clamp(26px, 4vh, 44px) 0 0;
  max-width: 540px;
  animation: wlwFadeUp .8s var(--ease) .44s both;
}

.book-hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: clamp(28px, 4.5vh, 46px);
  animation: wlwFadeUp .8s var(--ease) .58s both;
}

/* ---- About Author -------------------------------------------------------- */
.book-author {
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse at 50% 15%, rgba(255, 255, 255, 0.45) 0%, transparent 60%),
    var(--bg-topo-paper);
  background-size: auto, 1200px 900px;
  background-position: center, center top;
  color: var(--ink);
  padding: clamp(72px, 10vw, 110px) 24px;
}

.book-author__container {
  max-width: 1060px;
  margin: 0 auto;
}

.book-author__eyebrow {
  font: 600 11px/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--book-ink-muted);
}

.book-author__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: clamp(40px, 6vw, 72px);
  margin-top: 36px;
  align-items: start;
}

.book-author__copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.book-author__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 4.2vw, 44px);
  line-height: 1.02;
  margin: 0;
}

.book-author__p {
  font-size: 17px;
  line-height: 1.72;
  margin: 0;
  color: var(--book-ink-soft);
  text-wrap: pretty;
}

.book-author__equation-wrap {
  padding: 16px 0;
  border-top: 1px dotted rgba(26, 25, 22, .35);
  border-bottom: 1px dotted rgba(26, 25, 22, .35);
}

.book-author__equation {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.book-author__photo-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
}

.book-author__photo-frame {
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-sunken);
}

.book-author__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  display: block;
}

/* ---- Chapter Reader ------------------------------------------------------ */
.book-reader {
  background: var(--shell);
  color: var(--paper);
  padding: clamp(72px, 10vw, 110px) 20px;
}

.book-reader__header {
  text-align: center;
  max-width: 660px;
  margin: 0 auto 44px;
}

.book-reader__eyebrow {
  font: 600 11px/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--book-cube-top);
}

.book-reader__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1;
  margin: 18px 0 0;
  color: var(--on-shell);
}

.book-reader__modes {
  display: inline-flex;
  align-items: center;
  margin-top: 26px;
  border: 1.5px solid rgba(239, 232, 220, .4);
  border-radius: var(--radius-pill);
  padding: 4px;
}

.book-reader__stage {
  max-width: 664px;
  margin: 0 auto;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s ease, transform .8s var(--ease);
}

.book-reader__page-back {
  position: absolute;
  inset: 0;
  transform: translate(10px, 12px);
  background: var(--book-page-back);
  border-radius: var(--radius);
}

.book-reader__page-middle {
  position: absolute;
  inset: 0;
  transform: translate(5px, 6px);
  background: var(--paper-sunken);
  border-radius: var(--radius);
}

.book-reader__card {
  position: relative;
  background: var(--paper);
  color: var(--book-ink-soft);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  padding: clamp(28px, 5vw, 48px);
}

.book-reader__viewport {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 560px;
  min-height: 420px;
}

.book-reader__strip {
  height: 100%;
  column-width: 520px;
  column-gap: 64px;
  column-fill: auto;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  position: relative;
}

.book-reader__col-head {
  break-inside: avoid;
  margin-bottom: 24px;
}

.book-reader__col-title {
  font: 600 10.5px/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--book-ink-muted);
}

.book-reader__col-sym {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  margin-top: 14px;
}

.book-reader__p {
  font-size: 15.5px;
  line-height: 1.72;
  margin: 0 0 14px;
  text-wrap: pretty;
}

.book-reader__subhead {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: 25px;
  line-height: 1.1;
  color: var(--ink);
  margin: 26px 0 14px;
  break-after: avoid;
}

.book-reader__equation-wrap {
  break-inside: avoid;
  padding: 14px 0;
  margin: 0 0 14px;
  border-top: 1px dotted rgba(26, 25, 22, .4);
  border-bottom: 1px dotted rgba(26, 25, 22, .4);
}

.book-reader__equation {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  color: var(--ink);
}

.book-reader__quote {
  break-inside: avoid;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 16px;
  padding-left: 16px;
  border-left: 2px solid var(--book-cube-top);
}

.book-reader__quote-p {
  font-size: 15.5px;
  line-height: 1.6;
  margin: 0;
}

.book-reader__quote-term {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.book-reader__figure {
  break-inside: avoid;
  margin: 6px 0 18px;
}

.book-reader__ending {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  line-height: 1.3;
  margin: 0;
  color: var(--ink);
}

.book-reader__prev-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 15%;
  cursor: w-resize;
  z-index: 3;
}

.book-reader__next-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 15%;
  cursor: e-resize;
  z-index: 3;
}

.book-reader__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

.book-reader__nav-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.book-reader__page-label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .08em;
  color: rgba(239, 232, 220, .8);
  min-width: 64px;
  text-align: center;
}

.book-reader__nav-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .05em;
  color: rgba(239, 232, 220, .4);
}

/* ---- Audio Player (Listen) ----------------------------------------------- */
#listen-pane { display: none; }
#reader-nav { display: flex; }
#read.is-listen #listen-pane { display: flex; }
#read.is-listen #reader-vp,
#read.is-listen #reader-nav { display: none; }

.book-listen__pane {
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(30px, 5vh, 54px);
  min-height: 300px;
}

.book-listen__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.book-listen__reader {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--book-ink-quiet);
}

.book-listen__title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(24px, 3.4vw, 31px);
  line-height: 1.12;
  color: var(--ink);
  margin: 0 0 8px;
}

.book-listen__desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--book-ink-caption);
  margin: 0;
  max-width: 44ch;
  text-wrap: pretty;
}

.book-listen__wave {
  position: relative;
  display: flex;
  align-items: center;
  height: clamp(72px, 10vh, 96px);
  overflow: hidden;
  cursor: pointer;
  gap: 2px;
}
.book-listen__wave:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
@media (max-width: 560px) {
  .book-listen__wave { gap: 1px; }
}

.waveform-bar {
  flex: 1;
  min-width: 1px;
  border-radius: 1px;
  background: rgba(26, 25, 22, .17);
  transition: background .12s linear;
}
.waveform-bar.is-active {
  background: var(--accent);
}

.book-listen__controls {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 26px);
}

.book-listen__play-icon { margin-left: 3px; }
.book-listen__pause-icon { display: none; }

.book-listen__time {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: .05em;
  color: var(--ink);
}

.book-listen__dur { color: var(--book-ink-quiet); }
.book-listen__spacer { flex: 1; }
.book-listen__hint {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .05em;
  color: var(--book-ink-quiet);
}

.book-listen__fallback { width: 100%; }

/* ---- Buy Book Section ---------------------------------------------------- */
.book-buy {
  background: var(--paper);
  color: var(--ink);
  padding: clamp(72px, 10vw, 110px) 24px;
}

.book-buy__container {
  max-width: 1000px;
  margin: 0 auto;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-card);
  padding: clamp(32px, 6vw, 56px);
}

.book-buy__header { text-align: center; }

.book-buy__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 4.4vw, 42px);
  line-height: 1.1;
  letter-spacing: .012em;
  margin: 18px 0 0;
}

.book-buy__options {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  margin-top: 40px;
}

.book-buy__formats-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--book-ink-muted);
}

.book-buy__divider {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 420px;
  margin-top: 26px;
}

.book-buy__divider-line {
  flex: 1;
  height: 1px;
  background: var(--paper-edge);
}

.book-buy__divider-text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--book-ink-muted);
  white-space: nowrap;
}

.book-buy__singles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  width: 100%;
  max-width: 420px;
  margin-top: 2px;
}

.book-buy__guarantee {
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
  letter-spacing: .03em;
  color: var(--book-ink-muted);
  margin: 14px 0 0;
  max-width: 420px;
}

/* ---- Stay Connected ------------------------------------------------------ */
.book-community {
  background-color: var(--shell-deep);
  background-image:
    radial-gradient(ellipse at 30% 20%, rgba(77, 95, 204, 0.06) 0%, transparent 60%),
    var(--bg-topo-shell);
  background-size: auto, 1200px 900px;
  background-position: center, center top;
  color: var(--paper);
  padding: clamp(72px, 10vw, 104px) 24px;
}

.book-community__container {
  max-width: 1000px;
  margin: 0 auto;
}

.book-community__eyebrow {
  font: 600 11px/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .22em;
  color: rgba(239, 232, 220, .75);
}

.book-community__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4.2vw, 40px);
  line-height: 1.06;
  margin: 18px 0 0;
  max-width: 640px;
}

.book-community__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(40px, 6vw, 72px);
  align-items: start;
  margin-top: clamp(36px, 5vw, 52px);
}

.book-community__label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(239, 232, 220, .6);
}

.book-community__p {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: .03em;
  color: rgba(239, 232, 220, .7);
  margin: 10px 0 0;
}

.book-community__socials {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
  align-items: flex-start;
}

/* ---- Book Footer --------------------------------------------------------- */
.book-footer {
  background: var(--shell);
  color: rgba(239, 232, 220, .5);
  padding: 46px 24px;
  text-align: center;
}

.book-footer__mark {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--book-cube-top);
  margin-bottom: 14px;
}

.book-footer__p {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.8;
  letter-spacing: .05em;
  margin: 0;
}
