/* ==========================================================================
   Visual layer: original artwork, illustrations and graphics.
   Loaded after style.css and before responsive.css.
   ========================================================================== */

/* ---------- Orbit rings around the hero book ---------- */
.orbits {
  position: absolute;
  left: 50%; top: 46%;
  width: 178%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  z-index: -1;
  pointer-events: none;
  overflow: visible;
}
.orbits ellipse,
.orbits__ring--c circle { fill: none; stroke: rgba(217, 183, 126, 0.30); stroke-width: 1; vector-effect: non-scaling-stroke; }
.orbits__ring--a ellipse { stroke-dasharray: 2 7; }
.orbits__ring--b ellipse { stroke: rgba(150, 172, 208, 0.28); }
.orbits__ring--c circle { stroke: rgba(242, 213, 168, 0.14); stroke-dasharray: 1 9; transform-origin: 300px 300px; animation: orbit-spin 140s linear infinite; }
.orbits__planet { filter: drop-shadow(0 0 6px rgba(242, 213, 168, 0.95)); }
@keyframes orbit-spin { to { transform: rotate(360deg); } }

/* ---------- Artwork frames ---------- */
.art-frame {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--c-line);
  background: #050507;
  isolation: isolate;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9);
}
.art-frame > img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.8s var(--ease-out), filter 1s var(--ease-out); }
.art-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 8, 11, 0) 50%, rgba(8, 8, 11, 0.8) 100%);
}
.art-frame:hover > img { transform: scale(1.06); filter: brightness(1.12); }
.art-frame__label {
  position: absolute; left: 18px; bottom: 16px; z-index: 2;
  font-family: var(--f-sans); font-size: 0.66rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--c-champagne);
}

/* ---------- Journey: each Part has an illustrated panel ---------- */
.part__visual { grid-column: 2; grid-row: 1; aspect-ratio: 16 / 10; }
.part:nth-child(odd of .part) .part__visual { grid-column: 1; }
.part__visual .part__numeral {
  position: absolute;
  right: 18px; top: 6px;
  z-index: 2;
  font-size: clamp(3rem, 1.8rem + 3.5vw, 5.4rem);
  -webkit-text-stroke: 1px rgba(242, 213, 168, 0.75);
}
.part__card { align-self: stretch; display: flex; flex-direction: column; justify-content: center; }

/* ---------- Glimpses: chapter artwork gallery ---------- */
.glimpses__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.glimpse { aspect-ratio: 4 / 5; display: flex; flex-direction: column; justify-content: flex-end; }
.glimpse > img { position: absolute; inset: 0; z-index: 0; }
.glimpse::after { background: linear-gradient(180deg, rgba(8, 8, 11, 0.05) 30%, rgba(8, 8, 11, 0.92) 100%); }
.glimpse__body { position: relative; z-index: 2; padding: clamp(18px, 2.2vw, 28px); display: grid; gap: 8px; }
.glimpse__chapter { font-family: var(--f-sans); font-size: 0.66rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--c-gold); }
.glimpse__title { font-family: var(--f-serif); font-weight: 400; font-size: clamp(1.45rem, 1.2rem + 0.8vw, 1.95rem); line-height: 1.1; color: var(--c-ivory); }
.glimpse__text { color: var(--c-text); font-size: 1.08rem; line-height: 1.45; max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.8s var(--ease-out), opacity 0.6s; }
.glimpse:hover .glimpse__text,
.glimpse:focus-within .glimpse__text { max-height: 8em; opacity: 1; }
.glimpse:hover { border-color: rgba(217, 183, 126, 0.6); }
@media (hover: none) { .glimpse__text { max-height: none; opacity: 1; } }

/* ---------- Icon badges ---------- */
.icon-badge {
  display: inline-grid; place-items: center;
  width: 54px; height: 54px; flex: none;
  border: 1px solid var(--c-line); border-radius: 50%;
  color: var(--c-champagne);
  background: radial-gradient(circle at 50% 35%, rgba(217, 183, 126, 0.18), rgba(13, 13, 17, 0.6) 70%);
  box-shadow: 0 0 30px -8px rgba(217, 183, 126, 0.45);
}
.icon-badge .icon { width: 24px; height: 24px; }

/* Why read: icon, number and title */
.why__item { grid-template-columns: 54px 1fr; gap: 6px 22px; }
.why__item > .icon-badge { grid-row: span 2; }
.why__title .why__num { display: block; grid-row: auto; padding: 0 0 4px; font-size: 0.72rem; letter-spacing: 0.24em; }

/* Expect cards and benefits with artwork headers */
.expect__item { padding: 0; display: flex; flex-direction: column; }
.expect__media { aspect-ratio: 16 / 8; border: 0; border-bottom: 1px solid var(--c-line-soft); box-shadow: none; }
.expect__body { padding: clamp(18px, 2.2vw, 28px); }
.benefit__media { aspect-ratio: 16 / 9; margin-bottom: 8px; box-shadow: none; }

/* Author timeline: illustrated icons on the line */
.chapter-of-life__label { display: grid; justify-items: end; align-content: start; gap: 10px; padding-top: 0; }
.chapter-of-life__label .icon-badge { width: 46px; height: 46px; }
.chapter-of-life__label .icon-badge .icon { width: 20px; height: 20px; }
.chapter-of-life::before { top: 66px; }

/* Portrait placeholder dressed with the cover's dissolved face */
.portrait__frame {
  background:
    linear-gradient(180deg, rgba(8, 8, 11, 0.25), rgba(8, 8, 11, 0.7)),
    url("../images/cosmic-background.webp") center / cover no-repeat,
    var(--c-charcoal);
}

/* ---------- Page heroes backed by artwork ---------- */
.page-hero__art { position: absolute; inset: 0; z-index: -1; }
.page-hero__art img { width: 100%; height: 100%; object-fit: cover; opacity: 0.6; }
.page-hero__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 90% at 50% 45%, rgba(8, 8, 11, 0.35), rgba(8, 8, 11, 0.85) 80%),
    linear-gradient(180deg, rgba(8, 8, 11, 0.4), transparent 30%, transparent 70%, var(--c-void));
}

/* Question section: the single point of light behind the question */
.question__art { position: absolute; inset: -34% 0 14% 0; z-index: -1; pointer-events: none; }
.question__art img {
  width: 100%; height: 100%; object-fit: cover; opacity: 0.5;
  -webkit-mask-image: radial-gradient(60% 70% at 50% 50%, #000 30%, transparent 100%);
  mask-image: radial-gradient(60% 70% at 50% 50%, #000 30%, transparent 100%);
}

/* Artwork beneath a heading in a split column */
.split-art { aspect-ratio: 4 / 3; margin-top: 26px; }

/* Finale over the golden eclipse */
.tone--fixed-eclipse {
  --tone-attach: scroll, fixed;
  --tone:
    linear-gradient(180deg, var(--c-void) 0%, rgba(8, 8, 11, 0.35) 18%, rgba(8, 8, 11, 0.25) 50%, rgba(8, 8, 11, 0.5) 82%, var(--c-void) 100%),
    url("../images/art-eclipse.webp") center / cover no-repeat;
}
@media (hover: none), (max-width: 960px) {
  .tone--fixed-eclipse { --tone-attach: scroll, scroll; }
}

/* ---------- The shape of the argument: 36-chapter spiral ---------- */
.argument { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); align-items: center; }
.argument .contents { grid-template-columns: minmax(0, 1fr); }
.spiral { position: relative; margin: 0; }
.spiral svg { display: block; width: 100%; height: auto; overflow: visible; }
.spiral__path { fill: none; stroke: url(#spiral-grad); stroke-width: 1.4; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 3.2s var(--ease-out); }
.spiral.is-visible .spiral__path,
.no-js .spiral__path { stroke-dashoffset: 0; }
.spiral__dot { cursor: pointer; transition: transform 0.4s var(--ease-out); transform-box: fill-box; transform-origin: center; }
.spiral__dot circle:first-child { opacity: 0.22; }
.spiral__dot:hover,
.spiral__dot.is-active { transform: scale(1.6); }
.spiral__dot.is-active circle:first-child { opacity: 0.6; }
.spiral__centre { font-family: var(--f-display); font-size: 30px; fill: #f2d5a8; letter-spacing: 2px; }
.spiral__caption { margin-top: 12px; min-height: 3.4em; text-align: center; }
.spiral__caption-num { display: block; font-family: var(--f-sans); font-size: 0.68rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--c-gold); }
.spiral__caption-title { display: block; font-family: var(--f-serif); font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.7rem); color: var(--c-ivory); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; margin-top: 12px; }
.legend li { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-sans); font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--c-muted); }
.legend i { width: 10px; height: 10px; border-radius: 50%; background: var(--dot); box-shadow: 0 0 10px var(--dot); }

@media (prefers-reduced-motion: reduce) {
  .orbits__ring--c circle { animation: none; }
  .spiral__path { transition: none; stroke-dashoffset: 0; }
}

/* ---------- Readability overlay on section backgrounds ----------
   Sits above every background layer (tone colour, textures, artwork)
   and below the content, so text always stays clearly legible. */
.tone::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(85% 75% at 50% 50%, rgba(8, 8, 11, 0.42), rgba(8, 8, 11, 0.22) 100%),
    linear-gradient(180deg, rgba(8, 8, 11, 0.18), rgba(8, 8, 11, 0.32));
}
.tone--fixed-face::after,
.tone--fixed-galaxy::after,
.tone--fixed-nebula::after,
.tone--fixed-eclipse::after {
  background:
    radial-gradient(80% 70% at 50% 50%, rgba(8, 8, 11, 0.58), rgba(8, 8, 11, 0.34) 100%),
    linear-gradient(180deg, rgba(8, 8, 11, 0.25), rgba(8, 8, 11, 0.4));
}
.tone--hero::after { background: linear-gradient(90deg, rgba(8, 8, 11, 0.45) 0%, rgba(8, 8, 11, 0.1) 60%); }
.tone--gold::after { background: rgba(8, 8, 11, 0.2); }
.page-hero.tone::after,
.void.tone::after { background: radial-gradient(70% 80% at 50% 50%, rgba(8, 8, 11, 0.55), rgba(8, 8, 11, 0.3)); }
.glimpse__body,
.art-frame__label { text-shadow: 0 1px 12px rgba(0, 0, 0, 0.85); }
.tone :is(p, li, h1, h2, h3, blockquote, figcaption) { text-shadow: 0 1px 14px rgba(0, 0, 0, 0.45); }
@media (max-width: 960px) {
  .tone--hero::after { background: linear-gradient(180deg, rgba(8, 8, 11, 0.1) 0%, rgba(8, 8, 11, 0.5) 55%, rgba(8, 8, 11, 0.35) 100%); }
}
