/* The four lower chapters form one illustrated story.
 * Record/share choices are explicit button states; scroll only adds depth.
 * Original prose is kept in ordinary document flow at every viewport size.
 */

.explanation-section,
.story-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.explanation-section,
.area-section {
  padding-block: 104px;
}
.lower-scene {
  position: relative;
  min-width: 0;
  isolation: isolate;
}
.scene-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 3;
}
.scene-heading .mini-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--green);
}
.scene-number {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: 24px;
  line-height: 1;
  color: #5a7869;
}
[data-scene-depth] {
  transform: translate3d(0, var(--scene-shift, 0px), 0)
    rotate(var(--scene-turn, 0deg));
  transform-origin: 50% 65%;
}
.scene-light {
  position: absolute;
  inset: 0 auto auto 0;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, #fffefaa0, #fffefa00 72%);
  pointer-events: none;
  opacity: 0;
  z-index: 1;
}
.is-pointer-active .scene-light {
  opacity: 0.45;
}
.scene-actions,
.scene-caption {
  position: relative;
  z-index: 3;
}
.demo-status,
.scene-caption {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

/* 01 / Separate keepsakes settle into a shared folio. */
.connection-demo {
  align-self: center;
  width: 100%;
  padding: 24px 24px 26px;
  border: 1px solid #d6e3cb;
  border-radius: 32px;
  background: #edf4e7;
  text-align: center;
  overflow: hidden;
}
.record-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1.24;
  margin-top: 6px;
  perspective: 1000px;
  z-index: 2;
}
.record-foundation {
  position: absolute;
  inset: auto -4% 0;
  transform: translateY(10px) scale(0.92);
  opacity: 0.83;
  transition:
    transform 650ms var(--ease),
    opacity 500ms;
}
.record-foundation img {
  width: 100%;
  height: auto;
}
.record-threads {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  stroke: #6d9676;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0;
  transition:
    stroke-dashoffset 650ms var(--ease),
    opacity 350ms;
}
.record-token {
  position: absolute;
  width: 29%;
  max-width: 155px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  z-index: 2;
  transition: transform 650ms var(--ease);
  transform-origin: 50% 60%;
}
.record-token .record-art {
  width: 100%;
  height: auto;
}
.record-token > span {
  margin-top: -7px;
  padding: 4px 11px;
  border: 1px solid #d5dec8;
  border-radius: 30px;
  background: #fffdf7f0;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 500;
  transition: transform 650ms var(--ease);
}
.token-map {
  left: 2%;
  top: 9%;
  transform: rotate(-13deg);
}
.token-photo {
  right: 0;
  top: 15%;
  transform: rotate(11deg);
}
.token-note {
  left: 35%;
  top: -1%;
  transform: rotate(4deg);
}
.record-center {
  position: absolute;
  left: 50%;
  bottom: 1%;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 15px;
  border: 1px solid #234f3e;
  border-radius: 40px;
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 6px 14px #153e3514;
  opacity: 0;
  transform: translate(-50%, 9px) scale(0.96);
  transition:
    transform 500ms var(--ease),
    opacity 350ms;
  white-space: nowrap;
  font-size: 12px;
}
.record-center .brand-mark {
  width: 20px;
  height: 24px;
  color: var(--lime);
}
.record-center > .icon {
  width: 14px;
  height: 14px;
  color: var(--lime);
}
.is-connected .record-foundation {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.is-connected .token-map {
  transform: translate(72%, 91%) rotate(-8deg) scale(0.68);
}
.is-connected .token-photo {
  transform: translate(-72%, 78%) rotate(8deg) scale(0.68);
}
.is-connected .token-note {
  transform: translate(2%, 132%) rotate(2deg) scale(0.68);
}
/* Only the artwork gets smaller; its readable label stays at the same size. */
.is-connected .record-token > span {
  transform: scale(1.470588);
}
.is-connected .record-threads {
  opacity: 0.7;
  stroke-dashoffset: 0;
}
.is-connected .record-center {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}
.connection-demo .button {
  min-height: 46px;
  margin-top: 24px;
  font-size: 12px;
  min-width: 174px;
}
.connection-demo .demo-status {
  max-width: 340px;
  min-height: 38px;
  margin: 13px auto 0;
}

/* 02 / The original album never opens or becomes public. Only its postcard moves. */
.privacy-section {
  padding-block: 90px;
  background: #eee8f6;
  border-block: 1px solid #e3dced;
}
.privacy-section .section-title > span {
  color: #685598;
}
.privacy-demo {
  width: 100%;
  text-align: center;
}
.privacy-toggle,
.area-controls {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: stretch;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  padding: 4px;
  border: 1px solid #cdc2dc;
  border-radius: 30px;
  background: #fffdf7a8;
}
.privacy-toggle button,
.area-controls button {
  min-height: 44px;
  padding: 10px 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: transparent;
  border-radius: 24px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  transition:
    background 180ms,
    color 180ms;
}
.privacy-toggle button .icon,
.area-controls button .icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}
.privacy-toggle button[aria-pressed="true"],
.area-controls button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--white);
}
.privacy-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1.4;
  margin: 17px 0 23px;
  perspective: 1200px;
}
.private-album {
  position: absolute;
  left: -5%;
  top: 0;
  width: 80%;
  height: 100%;
  z-index: 2;
}
.private-folio-art {
  width: 100%;
  height: auto;
}
.album-label {
  position: absolute;
  bottom: 2%;
  left: 18%;
  width: 66%;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.album-label b {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.album-label > span {
  font-size: 11px;
  color: #695f75;
}
.private-seal {
  position: absolute;
  left: 16%;
  top: 7%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid #fffdf7b0;
  border-radius: 24px;
  background: #fffdf7;
  color: var(--green);
  box-shadow: 0 4px 12px #50406b08;
  font-size: 10px;
}
.private-seal .icon {
  width: 13px;
  height: 13px;
}
.shared-postcard {
  position: absolute;
  right: 2%;
  top: 22%;
  width: 32%;
  padding: 9px 9px 12px;
  border: 1px solid #d4c5e2;
  border-radius: 5px;
  background: var(--paper);
  box-shadow:
    0 4px 6px #5d4f7010,
    0 18px 32px #5d4f7012;
  z-index: 3;
  opacity: 0.28;
  transform: translate(-26%, 13%) rotate(-7deg) scale(0.87);
  transform-origin: 25% 70%;
  transition:
    transform 600ms var(--ease),
    opacity 450ms;
}
.shared-postcard > img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  background: #edf4e6;
  border-radius: 2px;
}
.shared-postcard > span {
  display: block;
  margin-top: 9px;
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: clamp(17px, 1.8vw, 23px);
  line-height: 1.05;
}
.shared-postcard > i {
  position: absolute;
  right: -10px;
  top: -10px;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 2px solid #eee8f6;
  border-radius: 50%;
  background: var(--ink);
  color: var(--lime);
  opacity: 0;
  transition: opacity 250ms;
}
.shared-postcard > i .icon {
  width: 15px;
  height: 15px;
}
.share-bridge {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  stroke: #807097;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transition: opacity 250ms;
}
.share-bridge path:first-child {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 600ms var(--ease);
}
.is-sharing .shared-postcard {
  opacity: 1;
  transform: translate(0, 0) rotate(7deg) scale(1);
}
.is-sharing .share-bridge,
.is-sharing .shared-postcard > i {
  opacity: 1;
}
.is-sharing .share-bridge path:first-child {
  stroke-dashoffset: 0;
}
.privacy-demo > p {
  max-width: 360px;
  min-height: 40px;
  margin: auto;
  font-size: 12px;
  line-height: 1.65;
  color: #62556f;
}
.privacy-demo > .mini-label {
  display: block;
  margin-top: 14px;
  color: #75638c;
  font-size: 9px;
  letter-spacing: 0.1em;
}

/* 03 / One legible neighborhood, three conceptual area layers. */
.area-demo {
  padding: 24px 24px 20px;
  background: #eaf3ef;
  border: 1px solid #d1e1d9;
  border-radius: 32px;
  text-align: center;
  overflow: hidden;
}
.area-illustration {
  position: relative;
  z-index: 2;
  margin: 5px -12px 9px;
  aspect-ratio: 640 / 460;
}
.area-map-art {
  width: 100%;
  height: auto;
}
.area-layer {
  opacity: 0;
  transition: opacity 360ms;
  pointer-events: none;
}
[data-area-view="places"] [data-area-layer="places"],
[data-area-view="movement"] [data-area-layer="movement"],
[data-area-view="patterns"] [data-area-layer="patterns"] {
  opacity: 1;
}
[data-area-flow] {
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--scene-progress, 1));
}
/* A chosen movement layer stays complete after its finite entrance, even
 * when the scene's earlier decorative scroll reveal has not reached its end. */
[data-area-revealed="true"] [data-area-flow] {
  stroke-dashoffset: 0;
}
.area-controls {
  border-color: #cadbd2;
}
.area-controls button {
  padding-inline: 12px;
}
.area-demo .scene-caption {
  margin: 14px auto 0;
  min-height: 39px;
  max-width: 350px;
  font-size: 11px;
}

/* 04 / Original seven steps now act as an illustrated chapter selector. */
.ecosystem-section {
  position: relative;
  padding-block: 94px;
  background: var(--ink);
  color: var(--white);
}
.network-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  grid-template-areas: "intro art" "picker art";
  column-gap: clamp(40px, 6vw, 88px);
  row-gap: 28px;
  align-items: start;
}
.network-intro {
  grid-area: intro;
}
.network-visual {
  grid-area: art;
  align-self: center;
}
.network-picker {
  grid-area: picker;
}
.ecosystem-section .section-title > span {
  color: var(--lime);
}
.ecosystem-section .eyebrow {
  color: #b4d9aa;
}
.ecosystem-section .section-lead {
  color: #c2d5c9;
  max-width: 550px;
  font-size: 14px;
}
.flywheel-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.flywheel-step {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 49px;
  padding: 12px 12px;
  border-top: 1px solid #fffdf728;
  border-radius: 0;
  background: transparent;
  color: #d3e1d5;
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
  scroll-margin-block: calc(var(--header) + 12px) 20px;
  transition:
    background 180ms,
    color 180ms;
}
.flywheel-step:last-child {
  border-bottom: 1px solid #fffdf728;
}
.flywheel-step b {
  font-size: 10px;
  font-weight: 500;
  color: #a4bead;
}
.flywheel-step > .icon {
  width: 17px;
  height: 17px;
  opacity: 0.4;
  transition:
    transform 180ms,
    opacity 180ms;
}
.flywheel-step[aria-pressed="true"] {
  color: var(--ink);
  background: var(--lime);
  border-color: var(--lime);
  border-radius: 8px;
}
.flywheel-step[aria-pressed="true"] b {
  color: var(--green);
}
.flywheel-step[aria-pressed="true"] > .icon {
  opacity: 1;
}
.flywheel-step[aria-pressed="true"] + .flywheel-step {
  border-top-color: transparent;
}
.flywheel-step:focus-visible {
  outline-color: var(--white);
  outline-offset: 4px;
}
.network-visual {
  padding: 24px 20px 0;
  border: 1px solid #e8efdc;
  border-radius: 32px;
  background: #f1f4e8;
  color: var(--ink);
  overflow: hidden;
}
.network-topline {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-inline: 3px;
  color: var(--green);
  font-size: 10px;
}
.network-topline .mini-label {
  font-size: 9px;
  letter-spacing: 0.1em;
}
.network-topline > span:last-child {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.network-stage {
  position: relative;
  z-index: 2;
  margin: 12px -12px 6px;
  aspect-ratio: 3 / 2;
}
.network-picture,
.network-picture > img {
  width: 100%;
  height: 100%;
  position: relative;
}
.network-picture > img {
  object-fit: contain;
  object-position: 50% 50%;
}
.network-visual figcaption {
  position: relative;
  z-index: 3;
  min-height: 75px;
  display: flex;
  align-items: center;
  gap: 13px;
  margin-inline: -20px;
  padding: 17px 23px;
  background: #e2e9d5;
  border-top: 1px solid #d7e1c9;
}
.network-caption-mark {
  display: grid;
  place-items: center;
  flex: 0 0 33px;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--lime);
}
.network-caption-mark .icon {
  width: 16px;
  height: 16px;
}
.network-visual figcaption p {
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: -0.015em;
}

@media (hover: hover) and (pointer: fine) {
  .privacy-toggle button:not([aria-pressed="true"]):hover,
  .area-controls button:not([aria-pressed="true"]):hover {
    background: #e0eadb;
  }
  .flywheel-step:not([aria-pressed="true"]):hover {
    background: #ffffff0d;
    color: var(--white);
  }
  .flywheel-step:hover > .icon {
    transform: translateX(3px);
    opacity: 1;
  }
}
@media (max-width: 1180px) {
  .explanation-section,
  .story-split {
    gap: 40px;
  }
  .connection-demo,
  .area-demo {
    padding-inline: 18px;
  }
  .network-layout {
    column-gap: 40px;
  }
  .privacy-toggle button,
  .area-controls button {
    padding-inline: 11px;
  }
}
@media (max-width: 960px) {
  .explanation-section,
  .story-split {
    gap: 32px;
  }
  .explanation-section,
  .area-section {
    padding-block: 75px;
  }
  .privacy-section {
    padding-block: 70px;
  }
  .record-token > span {
    font-size: 11px;
    margin-top: -3px;
  }
  .connection-demo .demo-status {
    min-height: 56px;
  }
  .privacy-toggle {
    padding: 3px;
    gap: 2px;
  }
  .privacy-toggle button,
  .area-controls button {
    padding-inline: 9px;
    font-size: 10px;
    gap: 5px;
  }
  .privacy-toggle button .icon,
  .area-controls button .icon {
    width: 13px;
    height: 13px;
    flex-basis: 13px;
  }
  .private-seal {
    top: 3%;
  }
  .album-label {
    bottom: 0;
  }
  .shared-postcard {
    padding: 7px 7px 10px;
  }
  .network-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    grid-template-areas: "intro intro" "picker art";
    column-gap: 30px;
    row-gap: 30px;
  }
  .network-intro .section-lead {
    max-width: 650px;
  }
  .network-visual {
    padding: 20px 14px 0;
  }
  .network-visual figcaption {
    margin-inline: -14px;
    padding-inline: 18px;
  }
  .network-topline .mini-label {
    font-size: 8px;
    letter-spacing: 0.07em;
  }
  .network-stage {
    margin-inline: -8px;
  }
}
@media (max-width: 760px) {
  .explanation-section,
  .story-split {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 34px;
  }
  .explanation-section,
  .area-section,
  .privacy-section {
    padding-block: 60px;
  }
  .connection-demo,
  .privacy-demo,
  .area-demo {
    width: 100%;
    max-width: 550px;
    margin-inline: auto;
  }
  .connection-demo,
  .area-demo {
    padding: 22px 22px 24px;
    border-radius: 25px;
  }
  .scene-heading .mini-label {
    font-size: 9px;
  }
  .record-token > span {
    font-size: 11px;
    margin-top: -7px;
  }
  .connection-demo .button {
    margin-top: 24px;
    min-height: 46px;
    padding-inline: 21px;
  }
  .connection-demo .demo-status {
    min-height: 38px;
  }
  .privacy-toggle button,
  .area-controls button {
    font-size: 11px;
    padding-inline: 13px;
    gap: 7px;
  }
  .privacy-toggle button .icon,
  .area-controls button .icon {
    width: 15px;
    height: 15px;
    flex-basis: 15px;
  }
  .privacy-stage {
    margin-top: 22px;
    margin-bottom: 26px;
  }
  .private-seal {
    top: 8%;
  }
  .album-label {
    bottom: 2%;
  }
  .shared-postcard > span {
    font-size: 22px;
  }
  .shared-postcard {
    padding: 9px 9px 12px;
  }
  .ecosystem-section {
    padding-block: 60px;
  }
  .network-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "intro" "art" "picker";
    gap: 28px;
  }
  .network-visual {
    width: 100%;
    max-width: 550px;
    margin-inline: auto;
    padding: 22px 18px 0;
    border-radius: 25px;
  }
  .network-topline .mini-label {
    font-size: 9px;
    letter-spacing: 0.1em;
  }
  .network-visual figcaption {
    margin-inline: -18px;
    padding: 16px 20px;
    min-height: 72px;
  }
  .network-picker {
    max-width: 550px;
    width: 100%;
    margin-inline: auto;
  }
  .flywheel-list {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
  }
  .flywheel-step {
    grid-template-columns: 18px minmax(0, 1fr);
    min-height: 63px;
    height: 100%;
    padding: 10px 10px;
    gap: 7px;
    border: 1px solid #fffdf72a;
    border-radius: 9px;
    font-size: 11px;
    line-height: 1.4;
  }
  .flywheel-step:last-child {
    grid-column: 1 / -1;
    min-height: 49px;
    grid-template-columns: 18px minmax(0, 1fr) 18px;
    border-bottom: 1px solid #fffdf72a;
  }
  .flywheel-step > .icon {
    display: none;
  }
  .flywheel-step:last-child > .icon {
    display: block;
  }
}
@media (max-width: 390px) {
  .connection-demo,
  .area-demo {
    padding-inline: 16px;
  }
  .record-token > span {
    font-size: 11px;
    padding: 3px 9px;
    margin-top: -3px;
  }
  .record-center {
    padding: 7px 11px;
    font-size: 11px;
  }
  .privacy-toggle button,
  .area-controls button {
    padding-inline: 9px;
    gap: 5px;
    font-size: 10px;
  }
  .privacy-toggle button .icon,
  .area-controls button .icon {
    width: 13px;
    height: 13px;
    flex-basis: 13px;
  }
  .shared-postcard {
    padding: 6px 6px 9px;
  }
  .shared-postcard > span {
    font-size: 17px;
    margin-top: 6px;
  }
  .album-label b {
    font-size: 14px;
  }
  .album-label > span {
    font-size: 10px;
  }
  .network-topline .mini-label {
    font-size: 8px;
  }
}

/* Motion preferences change presentation, never availability or consent. */
@media (max-width: 960px), (pointer: coarse) {
  [data-scene-depth] {
    transform: none;
  }
  .scene-light {
    display: none;
  }
  [data-area-flow] {
    stroke-dashoffset: 0;
  }
}
html[data-motion="reduced"] [data-scene-depth] {
  transform: none;
}
html[data-motion="reduced"] .scene-light {
  display: none;
}
html[data-motion="reduced"] [data-area-flow] {
  stroke-dashoffset: 0;
}
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="full"]) [data-scene-depth] {
    transform: none;
  }
  html:not([data-motion="full"]) .scene-light {
    display: none;
  }
  html:not([data-motion="full"]) [data-area-flow] {
    stroke-dashoffset: 0;
  }
}
@media print {
  .explanation-section,
  .story-split,
  .network-layout {
    display: block;
  }
  .connection-demo,
  .privacy-demo,
  .area-demo,
  .network-visual {
    max-width: 110mm;
    margin: 20pt auto;
    break-inside: avoid;
  }
  .ecosystem-section {
    background: white;
    color: #153e35;
    padding-block: 20pt;
  }
  .ecosystem-section .section-lead,
  .ecosystem-section .eyebrow,
  .ecosystem-section .section-title > span,
  .flywheel-step,
  .flywheel-step b {
    color: #153e35;
  }
  .flywheel-step {
    background: none;
    border-color: #d6e0d3;
  }
  [data-scene-depth] {
    transform: none;
  }
  .scene-light {
    display: none;
  }
}
