/* Candi's story: the full-biography dialog opened from "Read Candi's story" on the homepage.
   Loaded after style.css. Element-level rules are scoped with :where(#story-dialog) so they keep
   the specificity they were designed with and never reach the rest of the page. Motion: story.js. */
#story-dialog {
  --ivory: #f8f5ef; --porcelain: #fbf9f5; --espresso: #2a231b; --cocoa: #574737; --bronze: #7c5f33; --gold: #b0894f; --gold-light: #d9bc84; --line: rgba(100,78,50,.21);
  --display: "Playfair Display", Georgia, serif; --reading: "Hanken Grotesk", system-ui, sans-serif; --settle: cubic-bezier(.22,.61,.36,1); --silk: cubic-bezier(.65,.05,.25,1);
}
:where(#story-dialog) *, :where(#story-dialog) *::before, :where(#story-dialog) *::after { box-sizing: border-box; }
:where(#story-dialog) :is(button, a) { -webkit-tap-highlight-color: transparent; }
:where(#story-dialog) button { cursor: pointer; font: inherit; color: inherit; }
:where(#story-dialog) a { color: var(--bronze); text-underline-offset: 5px; }
:where(#story-dialog) :is(button, a, [tabindex="0"]):focus-visible { outline: 2px solid var(--bronze); outline-offset: 4px; }
:where(#story-dialog) [tabindex="-1"]:focus { outline: none; }
:where(#story-dialog) ::selection { color: var(--espresso); background: #e7dfd1; }
:where(#story-dialog) svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
:where(#story-dialog) img { display: block; max-width: 100%; }
:where(#story-dialog) :is(figure, p) { margin: 0; }
:where(#story-dialog) strong { color: var(--espresso); font-weight: 600; }
html.has-story { overflow: hidden; }
#story-dialog { font: 400 17px/1.7 var(--reading); width: min(1380px,calc(100vw - 64px)); height: min(960px,calc(100svh - 64px)); max-width: none; max-height: none; padding: 0; margin: auto; border: 0; border-radius: 4px; color: var(--espresso); background: var(--ivory); overflow: hidden; box-shadow: 0 32px 100px -24px rgba(42,35,27,.28); }
#story-dialog::backdrop { background: rgba(42,35,27,.3); backdrop-filter: blur(14px); }
#story-dialog[open] { animation: story-arrive 600ms var(--settle) both; }
#story-dialog[open]::backdrop { animation: veil-arrive 480ms ease both; }
#story-dialog.is-closing { animation: story-leave 280ms ease both; pointer-events: none; }
#story-dialog.is-closing::backdrop { animation: veil-leave 280ms ease both; }
@keyframes story-arrive { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes story-leave { from { opacity: 1; } to { opacity: 0; transform: translateY(8px); } }
@keyframes veil-arrive { from { opacity: 0; } to { opacity: 1; } }
@keyframes veil-leave { from { opacity: 1; } to { opacity: 0; } }
.story-rail { position: relative; z-index: 3; height: 76px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding-inline: 32px; column-gap: 30px; background: var(--porcelain); border-bottom: 1px solid var(--line); }
.story-label { color: var(--bronze); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }
.chapter-nav { display: flex; position: relative; height: 100%; align-items: center; gap: 24px; }
.chapter-nav button { position: relative; min-height: 44px; min-width: 44px; border: 0; background: none; padding: 10px 0; font-size: 13px; color: var(--cocoa); white-space: nowrap; transition: color 160ms ease; }
.chapter-nav button::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 240ms var(--settle); }
.chapter-nav button:hover, .chapter-nav button[aria-current] { color: var(--bronze); }
.chapter-nav button[aria-current] { font-weight: 600; }
.chapter-nav button[aria-current]::after { transform: scaleX(1); }
.rail-actions { justify-self: end; display: flex; align-items: center; gap: 18px; }
.motion-control { min-height: 44px; min-width: 44px; padding: 8px 0; border: 0; background: none; color: var(--bronze); font-size: 12px; }
.motion-control:hover { color: var(--espresso); }
.motion-control:disabled { color: var(--cocoa); cursor: default; }
.close-story { display: flex; align-items: center; gap: 13px; min-height: 44px; border: 0; background: none; padding: 8px 0 8px 12px; font-size: 14px; }
.close-story svg { width: 18px; height: 18px; }
.close-story:hover { color: var(--bronze); }
.reading-track { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.reading-track span { display: block; height: 100%; background: linear-gradient(90deg,var(--gold),#9e8fcb,#7fa8df,#6fc2ae,var(--gold)); transform-origin: left; transform: scaleX(var(--reading-progress,0)); }
.story-scroll { height: calc(100% - 76px); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--gold) var(--ivory); }
.story-scroll:focus-visible { outline-offset: -4px; }
.story-scroll::-webkit-scrollbar { width: 5px; }
.story-scroll::-webkit-scrollbar-thumb { background: var(--gold); }
.story-scroll::-webkit-scrollbar-track { background: var(--ivory); }
/* A single continuous photographic field spans all chapters. */
.story-article { position: relative; isolation: isolate; }
.story-canvas { position: sticky; top: 0; height: var(--scene-height,760px); margin-bottom: calc(-1 * var(--scene-height,760px)); z-index: 0; overflow: hidden; pointer-events: none; background: var(--ivory); }
.scene-layer { position: absolute; inset: 0; opacity: 0; background: var(--ivory); transition: opacity 900ms var(--settle); }
.scene-layer img { width: 100%; height: 100%; object-fit: contain; object-position: left center; filter: blur(16px); transform: scale(1.025); transition: filter 900ms var(--settle), transform 900ms var(--settle); }
/* A photograph resolves out of the ivory: opacity, focus, and a settling breath of scale. */
.scene-layer.is-active { opacity: 1; transition: opacity 1500ms var(--settle) 100ms; }
.scene-layer.is-active img { filter: blur(0); transform: none; transition: filter 1900ms var(--settle) 100ms, transform 3000ms var(--settle) 100ms; }
/* Keep the original portrait's right edge behind the ivory reading field. */
.layer-practice img { width: 58%; object-fit: cover; object-position: center 40%; }
.chapter-veil { position: absolute; z-index: 2; inset: 76px 0 0; background: var(--ivory); opacity: 0; pointer-events: none; transition: opacity 900ms var(--settle); }
.is-veiled .chapter-veil { opacity: 1; transition: opacity 300ms ease-out; }
/* Each line settles in once, on time rather than on scroll distance, so it never rests half-visible. */
html.story-script #story-dialog:not(.is-still) .story-unit { opacity: 0; translate: 0 18px; transition: opacity 1100ms var(--settle) var(--reveal-delay,0ms), translate 1400ms var(--settle) var(--reveal-delay,0ms); }
html.story-script #story-dialog:not(.is-still) .story-unit.is-revealed { opacity: 1; translate: 0 0; }
#story-dialog.is-resetting *, #story-dialog.is-resetting *::after { transition: none !important; }
.layer-whole-person img, .layer-invitation img { object-position: right center; }
/* Center Candi in the visible photographic field, with less empty room to her right. */
.layer-whole-person img { position: relative; left: 8%; }
.scene-layer::after { content: ""; position: absolute; inset: 0; }
/* Clear the text-facing environment; never blur or symmetrically erase a person. */
.layer-heritage::after { background: linear-gradient(90deg,transparent 39%,var(--ivory) 59%); }
.layer-whole-person::after { background: linear-gradient(90deg,var(--ivory) 38%,rgba(248,245,239,.94) 42%,transparent 53%); }
.layer-practice::after { background: linear-gradient(90deg,transparent 38%,rgba(248,245,239,.88) 49%,var(--ivory) 56%); }
.layer-invitation::after { background: linear-gradient(90deg,var(--ivory) 47%,rgba(248,245,239,.94) 49%,transparent 58%); }
.story-chapter { position: relative; z-index: 1; min-height: var(--scene-height,760px); padding-bottom: 104px; }
.scene-visual { display: none; }
.scene-media { position: relative; height: 100%; }
.scene-media img { width: 100%; height: 100%; object-fit: cover; }
/* Each reading column sits centred in the ivory field beside its photograph, with as much
   room to the dialog's edge as to the photo. A field ends where the photo starts to show through its ivory fade. */
.story-chapter { --field-start: 49%; --field-end: 100%; --measure: 600px; --gap: clamp(40px, 5.5%, 92px); }
/* Heritage: the pale window light beside the chair can sit behind text, so its field starts nearer the chair. */
.heritage { --field-start: 44%; --measure: 640px; }
.whole-person { --field-start: 0%; --field-end: 40%; --measure: 460px; }
.practice { --field-start: 48%; --measure: 580px; }
.closing { --field-start: 0%; --field-end: 50%; --measure: 540px; }
.scene-copy { --copy-width: min(var(--measure), calc(var(--field-end) - var(--field-start) - 2 * var(--gap))); position: relative; isolation: isolate; width: var(--copy-width); margin-left: calc(var(--field-start) + (var(--field-end) - var(--field-start) - var(--copy-width)) / 2); padding: 48px 0 96px; }
/* Desktop stage. The photographs and all four chapters stay pinned to the reading field
   (each sticky, each netting zero height); the article's height supplies the scroll.
   Only composition.js moves the copy, so native scrolling never fights it. */
#story-dialog.story-staged .story-article { height: var(--story-length); }
#story-dialog.story-staged .story-chapter { position: sticky; top: 0; height: var(--scene-height); min-height: 0; margin-bottom: calc(-1 * var(--scene-height)); padding: 0; pointer-events: none; -webkit-mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 28px), transparent); }
#story-dialog.story-staged .biography .bridge-passage { margin-top: 56px; }
#story-dialog.story-staged .scene-copy { position: absolute; top: 0; left: 0; padding-block: 0; opacity: 0; visibility: hidden; pointer-events: auto; will-change: transform, opacity; transition: opacity 700ms var(--settle), visibility 0s linear 700ms; }
#story-dialog.story-staged .story-chapter.is-current .scene-copy { opacity: 1; visibility: visible; transition: opacity 1000ms var(--settle) 800ms, visibility 0s; }
#story-title { font: 400 clamp(38px,3.35vw,50px)/1.13 var(--display); letter-spacing: -.027em; margin: 0 0 31px; text-wrap: balance; }
#story-title em { display: block; color: var(--bronze); font-weight: 400; }
.biography { color: var(--cocoa); font-size: 17px; line-height: 1.75; }
.biography p + p { margin-top: 27px; }
.name-translation { display: block; font: italic 400 clamp(27px,2.3vw,33px)/1.38 var(--display); color: var(--bronze); margin: 26px 0; letter-spacing: -.013em; }
.heartbeat { display: block; }
.biography .bridge-passage { margin-top: 76px; padding-top: 28px; border-top: 1px solid var(--line); font: 400 24px/1.55 var(--display); color: var(--espresso); }
.bridge-passage strong { font-weight: 500; }
.chapter-heading { margin: 0 0 28px; font: 400 clamp(36px,3.25vw,47px)/1.15 var(--display); letter-spacing: -.02em; text-wrap: balance; }
.chapter-heading em { color: var(--bronze); font-weight: 400; }
.whole-person .scene-copy, .closing .scene-copy { padding-top: 130px; padding-bottom: 120px; }
.dimensions { margin-top: 40px !important; font: 400 clamp(34px,3.2vw,47px)/1.22 var(--display); letter-spacing: -.022em; color: var(--espresso); }
.dimensions strong { font-weight: 400; }
.dimensions strong > span { display: block; }
.dimensions strong > span:nth-child(2) { padding-left: 11%; }
.dimensions strong > span:nth-child(3) { margin-top: 8px; }
.dimensions em { color: var(--bronze); font-weight: 400; }
.practice .scene-copy { padding-top: 92px; padding-bottom: 110px; }
.practice-introduction { font: 400 25px/1.5 var(--display); color: var(--espresso); }
.practice-passage { margin-top: 32px; }
.practice-passage p { padding-block: 25px; border-top: 1px solid var(--line); }
.practice-passage p + p { margin-top: 0; }
.closing .scene-copy { padding-top: 140px; }
.closing-statement { font: 400 clamp(37px,3.4vw,49px)/1.2 var(--display); color: var(--espresso); letter-spacing: -.025em; text-wrap: balance; }
/* Desktop keeps the statement on its three spoken lines. */
@media (min-width: 901px) { .statement-line { display: block; } }
.story-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 25px; margin-top: 34px; }
.story-actions a { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 52px; text-decoration: none; font-size: 13px; font-weight: 600; }
.action-primary { background: var(--gold); color: #2a1d06; padding: 14px 20px; border-radius: 3px; transition: background 180ms ease; }
.action-primary:hover { background: var(--gold-light); }
.action-secondary { border-bottom: 1px solid var(--gold); color: var(--bronze); }
.action-secondary:hover { color: var(--espresso); }
.back-to-start { border: 0; background: none; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 12px 0; margin-top: 48px; color: var(--cocoa); font-size: 13px; }
.back-to-start svg { width: 17px; height: 17px; }
.back-to-start:hover { color: var(--bronze); }
@media (max-width: 1100px) {
  .story-rail { column-gap: 20px; padding-inline: 24px; }
  .chapter-nav { gap: 16px; }
  .story-chapter { --gap: clamp(32px, 4.2%, 60px); }
  .heritage { --field-start: 42%; }
  .practice { --field-start: 46%; }
  #story-title { font-size: 38px; }
  .name-translation { font-size: 28px; }
  .story-actions { gap: 16px; }
}
@media (max-width: 900px) {
  #story-dialog { width: calc(100vw - 32px); height: calc(100svh - 32px); }
  .story-rail { height: 112px; grid-template-columns: 1fr auto; grid-template-rows: 56px 56px; padding-inline: 24px; column-gap: 12px; }
  .story-label { grid-column: 1; grid-row: 1; }
  .rail-actions { grid-column: 2; grid-row: 1; }
  .rail-actions { gap: 12px; }
  .motion-control { font-size: 11px; white-space: nowrap; }
  .chapter-nav { grid-column: 1/-1; grid-row: 2; justify-content: space-between; gap: 12px; }
  .chapter-nav button::after { bottom: 4px; }
  .story-scroll { height: calc(100% - 112px); }
  .chapter-veil { top: 112px; }
  .story-canvas { display: none; }
  .scene-copy::before { display: none; }
  .story-chapter { display: flex; flex-direction: column; min-height: 0; padding-bottom: 48px; }
  .scene-copy, .whole-person .scene-copy, .practice .scene-copy, .closing .scene-copy { order: 0; width: auto; margin: 0; padding: 42px 7% 40px; }
  .scene-visual { display: block; order: 1; position: relative; height: 420px; margin: 0; overflow: hidden; }
  html.story-script #story-dialog:not(.is-still) .scene-visual img { opacity: 0; filter: blur(16px); transform: scale(1.025); transition: opacity 1700ms var(--settle), filter 2200ms var(--settle), transform 3000ms var(--settle); }
  html.story-script #story-dialog:not(.is-still) .scene-visual.photo-revealed img { opacity: 1; filter: blur(0); transform: none; }
  .scene-media img { object-position: left bottom; }
  .scene-visual::before, .scene-visual::after { content: ""; position: absolute; z-index: 1; left: 0; right: 0; pointer-events: none; }
  .scene-visual::before { top: 0; height: 12px; background: linear-gradient(var(--ivory),transparent); }
  .scene-visual::after { bottom: 0; height: 14px; background: linear-gradient(transparent,var(--ivory)); }
  .reiki-visual::after { height: 18px; }
  /* The outdoor supporting toes are close to the lower edge: soften only its last floor pixels. */
  .outdoor-visual::after { height: 2px; }
  .opening-visual { height: 520px; }
  .studio-visual { height: 380px; }
  .studio-visual img { object-position: right bottom; }
  .reiki-visual { height: clamp(400px,110vw,760px); }
  .reiki-visual .scene-media img { object-position: center 40%; }
  .outdoor-visual { height: 520px; }
  .outdoor-visual img { object-position: 85% bottom; }
  .story-chapter + .story-chapter .scene-copy { padding-top: 64px; }
  #story-title { font-size: clamp(36px,5.7vw,46px); }
  .name-translation { font-size: clamp(27px,4vw,32px); }
  .biography .bridge-passage { margin-top: 40px; }
  .dimensions { font-size: clamp(35px,5.6vw,46px); }
}
@media (max-width: 540px) {
  #story-dialog { width: 100vw; height: 100dvh; margin: 0; border-radius: 0; box-shadow: none; }
  .story-rail { padding-inline: 22px; height: 106px; grid-template-rows: 54px 52px; }
  .story-label { font-size: 11px; }
  .close-story { font-size: 13px; }
  .chapter-nav { gap: 10px; }
  .chapter-nav button { font-size: 11px; }
  .story-scroll { height: calc(100% - 106px); }
  .scene-copy, .whole-person .scene-copy, .practice .scene-copy, .closing .scene-copy { padding: 29px 26px 26px; }
  .story-chapter + .story-chapter .scene-copy { padding-top: 48px; }
  #story-title { font-size: clamp(30px,8.2vw,40px); margin-bottom: 25px; }
  .biography { line-height: 1.72; }
  .name-translation { font-size: 27px; line-height: 1.4; }
  .biography .bridge-passage { font-size: 22px; margin-top: 36px; }
  .opening-visual { height: 460px; }
  .opening-visual .scene-media img { object-position: left center; }
  .studio-visual { height: 340px; }
  .outdoor-visual { height: 450px; }
  .chapter-heading { font-size: 35px; }
  .dimensions { font-size: clamp(29px,8.3vw,36px); }
  .dimensions strong > span:nth-child(2) { padding-left: 8%; }
  .practice-introduction { font-size: 23px; }
  .closing-statement { font-size: 36px; }
  .story-actions { flex-direction: column; align-items: flex-start; }
  .story-actions .action-primary { width: 100%; }
}
@media (max-width: 350px) {
  .story-rail { padding-inline: 16px; }
  .chapter-nav { gap: 7px; }
  .scene-copy, .whole-person .scene-copy, .practice .scene-copy, .closing .scene-copy { padding-inline: 20px; }
  .dimensions { font-size: 29px; }
}
/* Shorter desktop screens (768 to 880px tall laptops): give the stage more height and set the
   longer chapters a step tighter, so a chapter opened from the rail shows its full text. */
@media (max-height: 880px) and (min-width: 901px) {
  #story-dialog { height: calc(100svh - 32px); }
  .story-rail { height: 64px; }
  .story-scroll { height: calc(100% - 64px); }
  .chapter-veil { top: 64px; }
  #story-title { font-size: min(clamp(38px,3.35vw,50px), 5.3vh); margin-bottom: 2.6vh; }
  .chapter-heading { font-size: min(clamp(36px,3.25vw,47px), 5.2vh); margin-bottom: 2.4vh; }
  .biography { font-size: 16px; line-height: 1.64; }
  .biography p + p { margin-top: 2.6vh; }
  .name-translation { font-size: min(clamp(27px,2.3vw,33px), 3.5vh); margin: 2vh 0; }
  .biography .bridge-passage, #story-dialog.story-staged .biography .bridge-passage { margin-top: 3.6vh; padding-top: 2.4vh; font-size: min(24px, 2.75vh); }
  .practice-introduction { font-size: min(25px, 2.9vh); }
  .practice-passage { margin-top: 2.2vh; }
  .practice-passage p { padding-block: 1.9vh; }
}
@media (max-width: 1100px) and (min-width: 901px) {
  /* Narrow the Reiki plate a little further so its column stays on ivory. */
  .layer-practice img { width: 56%; }
  .layer-practice::after { background: linear-gradient(90deg,transparent 36%,rgba(248,245,239,.9) 46%,var(--ivory) 51%); }
}
@media (max-width: 1100px) and (min-width: 901px) and (max-height: 880px) {
  .biography { font-size: 15px; }
}
@media (max-height: 600px) and (min-width: 901px) {
  #story-dialog { height: calc(100svh - 24px); }
  .scene-copy, .whole-person .scene-copy, .practice .scene-copy, .closing .scene-copy { padding-top: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  html.story-script #story-dialog .story-unit { opacity: 1; translate: none; transition: none; }
  html.story-script #story-dialog .scene-visual img { opacity: 1 !important; filter: none !important; transform: none !important; }
  #story-dialog[open], #story-dialog.is-closing, #story-dialog[open]::backdrop, #story-dialog.is-closing::backdrop { animation: none; }
  .chapter-nav button::after, .scene-media { transition: none; }
  .scene-layer, .scene-layer img, .chapter-veil { transition: none !important; }
  .scene-layer img { filter: none; transform: none; }
}
#story-dialog.is-still, #story-dialog.is-still::backdrop { animation: none; }
#story-dialog.is-still .scene-layer, #story-dialog.is-still .scene-layer img { transition: none; }
#story-dialog.is-still .scene-layer img { filter: none; transform: none; }
/* Explore services: the homepage passes through ivory while the story closes, then reappears at Services. */
.story-passage { position: fixed; inset: 0; z-index: 1000; background: var(--ivory); opacity: 0; pointer-events: none; transition: opacity 300ms ease-out; }
.story-passage.is-on { opacity: 1; }
.story-passage.is-leaving { opacity: 0; transition: opacity 800ms cubic-bezier(.22,.61,.36,1); }
