/* Picture-led places, stories and people (Ben, 5 November 2026).
   Faces and paintings lead; lists become tiles and chips. Hover touches are warm and slow,
   and Quiet view or reduced motion keeps everything still. */

/* ---------- shared tiles ---------- */
.picture-section{margin:46px 0 0}
.picture-section>h2{font:400 clamp(28px,2.6vw,35px)/1.2 var(--display);margin:0 0 24px}
.face-tiles,.place-cards{list-style:none;margin:0;padding:0;display:grid;gap:30px 22px}
.face-tiles{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
.place-cards{grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}
.face-tile{display:block;text-decoration:none}
.face-tile-art{display:block;overflow:hidden;border:1px solid #d4b47a33;background:#0f212b;transition:border-color .6s,box-shadow .6s}
.face-tile-art img{display:block;width:100%;height:auto;aspect-ratio:4/5;object-fit:cover;object-position:50% 25%;transition:transform 1.4s cubic-bezier(.2,.7,.2,1),filter .8s}
.face-tile strong{display:block;font:400 21px/1.2 var(--display);margin-top:12px}
.face-tile small{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:var(--muted);font-size:15px;line-height:1.4;margin-top:5px}
.chip{display:inline-flex;align-items:center;min-height:44px;padding:0 16px;margin:0 10px 10px 0;border:1px solid #d4b47a55;border-radius:999px;text-decoration:none;font-size:17px;transition:border-color .4s,background .4s}
.picture-chips>div{display:flex;flex-wrap:wrap}

/* ---------- the painted-map inset ---------- */
.map-inset{display:grid;grid-template-columns:minmax(0,1fr);margin-top:26px;text-decoration:none;border:1px solid #d4b47a44;background:#07131e;overflow:hidden;max-width:520px}
.map-inset-art{position:relative;display:block;aspect-ratio:3/2;background-repeat:no-repeat;transition:background-size 1.6s cubic-bezier(.2,.7,.2,1)}
.map-inset-art::after{content:"";position:absolute;inset:0;box-shadow:inset 0 0 60px 18px #07131e}
.map-inset-art i{position:absolute;width:16px;height:16px;border-radius:50%;transform:translate(-50%,-50%);background:#ffd98a;box-shadow:0 0 0 5px #ffd98a33,0 0 26px 8px #ffb44a99;animation:pm-pulse 3.2s ease-in-out infinite;z-index:1}
.map-inset-text{display:block;padding:14px 18px 16px;font-size:18px}
.map-inset-text small{display:block;color:var(--brass);font-size:14px;letter-spacing:.04em;margin-bottom:3px}
.world-expansion .map-inset{margin:0 0 34px}
@keyframes pm-pulse{50%{box-shadow:0 0 0 8px #ffd98a22,0 0 34px 12px #ffb44aaa}}

/* ---------- place pages: the painting leads, the neighbourhood spreads out ---------- */
.place-profile>*,.place-neighbourhood>*,.story-pictures,.story-pictures>*{min-width:0;max-width:100%}
.scene{overflow:hidden}
.place-profile.world-article{grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:30px 70px}
.place-profile .world-portrait{margin-top:20px}
.place-profile .world-portrait img{aspect-ratio:4/3;object-fit:cover}
.place-profile>.place-neighbourhood{grid-column:1/-1}
.place-profile .place-neighbourhood>section,.place-profile .place-neighbourhood>nav{margin-top:46px}
.place-profile .place-neighbourhood h2{font:400 clamp(28px,2.6vw,35px)/1.2 var(--display);margin:0 0 24px}
.place-profile .place-neighbourhood h3{font-size:22px;font-weight:400;color:var(--brass);margin:0 0 14px}
.place-profile .place-building-list{grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}
.place-profile .place-building img{transition:transform 1.4s cubic-bezier(.2,.7,.2,1)}
.place-profile .place-building{overflow:clip}
.place-profile .place-people-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:30px 22px}
.place-profile .place-person{display:block;border:0;padding:0;margin:0}
.place-profile .place-person-image{display:block;overflow:hidden;border:1px solid #d4b47a33}
.place-profile .place-person-image img{display:block;width:100%;height:auto;aspect-ratio:4/5;object-fit:cover;object-position:50% 25%;transition:transform 1.4s cubic-bezier(.2,.7,.2,1),filter .8s}
.place-profile .place-person h3{font:400 21px/1.2 var(--display);color:var(--ink);margin:12px 0 0}
.place-profile .place-person h3 a{text-decoration:none}
.place-profile .place-person p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:var(--muted);font-size:15px;line-height:1.4;margin:5px 0 0}
.place-profile .place-person .place-art-note,.place-profile .place-building-list .place-art-note{display:none}
.place-profile .place-nearby ul,.place-profile .place-particulars ul,.place-profile .place-siblings ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap}
.place-profile .place-nearby a,.place-profile .place-particulars a,.place-profile .place-siblings a{display:inline-flex;align-items:center;min-height:44px;padding:0 16px;margin:0 10px 10px 0;border:1px solid #d4b47a55;border-radius:999px;text-decoration:none;font-size:17px}

/* ---------- stories inside place and character pages become picture cards ---------- */
.world-page .world-stories .story-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:34px 26px}
.world-page .world-stories .story-row{display:flex;flex-direction:column;gap:0;padding:0;border:0}
.world-page .world-stories .story-art{min-height:0;border:1px solid #d4b47a2e}
.world-page .world-stories .story-art img{height:auto;aspect-ratio:3/2;transition:transform 1.4s cubic-bezier(.2,.7,.2,1)}
.world-page .world-stories .story-row h2{font-size:24px;margin:10px 0 8px}
.world-page .world-stories .story-row p{font-size:17px}
.world-page .world-stories .cast-line{display:none}

/* ---------- story pages: play here, then meet the cast ---------- */
.story-player{max-width:1220px;margin:0 0 56px}
.player-poster{position:relative;display:block;width:100%;aspect-ratio:16/9;padding:0;border:1px solid #d4b47a44;background:#07131e;cursor:pointer;overflow:clip;color:var(--ink);font:inherit;text-align:left}
.player-poster img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform 2.4s cubic-bezier(.2,.7,.2,1),filter .8s;filter:brightness(.82)}
.player-poster::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 45%,#07131ee0)}
.player-button{position:absolute;left:50%;top:46%;width:92px;height:92px;transform:translate(-50%,-50%);border-radius:50%;background:#07131ecc;border:1px solid #ffd98a99;box-shadow:0 0 0 10px #ffd98a14,0 0 60px 14px #ffb44a44;z-index:1;transition:box-shadow .6s,scale .4s}
.player-button::before{content:"";position:absolute;left:37px;top:29px;border-style:solid;border-width:17px 0 17px 28px;border-color:transparent transparent transparent #ffe3a1}
.player-label{position:absolute;left:30px;right:30px;bottom:24px;z-index:1;font:400 26px/1.25 var(--display)}
.player-label small{display:block;font:400 15px/1.4 var(--body);color:var(--muted);margin-top:6px}
.story-player iframe{display:block;width:100%;aspect-ratio:16/9;border:1px solid #d4b47a44;background:#000}
.story-pictures>.picture-section:first-child{margin-top:28px}
.story-world>h2{margin-bottom:0}
.story-world .connections{display:block;margin:30px 0 0}
.story-detail .actions .text-link{align-self:center}

/* ---------- the People page: the whole cast in a couple of screens ---------- */
.people-directory{display:flex;flex-wrap:wrap;column-gap:56px}
.people-directory>:not(.people-area){flex:1 0 100%}
.people-directory>.people-area{flex:0 1 auto;max-width:100%}
.people-directory .world-grid{display:flex;flex-wrap:wrap}
.people-directory .world-card{width:170px}
.people-directory .world-grid{grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:30px 22px}
.people-directory .world-card{border:0;padding:0;overflow:hidden}
.people-directory .world-card img{aspect-ratio:4/5;height:auto;object-fit:cover;object-position:50% 25%;border:1px solid #d4b47a33;transition:transform 1.4s cubic-bezier(.2,.7,.2,1),filter .8s}
.people-directory .world-card>div{padding-top:12px}
.people-directory .world-card h2,.people-area .world-card h2{font:400 21px/1.2 var(--display);margin:0}
.people-directory .world-card p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:15px;line-height:1.4;color:var(--muted);margin:5px 0 0}
.people-directory .world-card .source-note,.people-directory .card-invite{display:none}
.people-area{margin-top:40px}
.people-area>h2{font-size:28px;margin-bottom:18px}

/* ---------- warm, slow hover touches (pointer devices only) ---------- */
@media(hover:hover){
  .face-tile:hover .face-tile-art img,.place-profile .place-person-image:hover img,.people-directory .world-card:hover img{transform:scale(1.05);filter:brightness(1.08) sepia(.12)}
  .face-tile:hover .face-tile-art,.place-profile .place-person-image:hover{border-color:#d4b47a99;box-shadow:0 0 34px 4px #ffb44a2a}
  .people-directory .world-card p,.face-tile small{opacity:.55;transition:opacity .6s}
  .people-directory .world-card:hover p,.face-tile:hover small{opacity:1}
  .world-page .world-stories .story-art:hover img,.place-profile .place-building:hover img,.gallery-grid a:hover img{transform:scale(1.05)}
  .player-poster:hover img{transform:scale(1.03);filter:brightness(.95)}
  .player-poster:hover .player-button{scale:1.06;box-shadow:0 0 0 14px #ffd98a1f,0 0 80px 20px #ffb44a66}
  .map-inset:hover .map-inset-art{background-size:340%!important}
  .chip:hover,.place-profile .place-nearby a:hover,.place-profile .place-particulars a:hover,.place-profile .place-siblings a:hover{border-color:var(--brass);background:#d4b47a14}
}
.gallery-grid a{display:block;overflow:clip}
.gallery-grid img{transition:transform 1.4s cubic-bezier(.2,.7,.2,1)}
.button:active,.chip:active,.player-poster:active{transform:translateY(1px)}

/* ---------- homepage story shelf: arrows instead of scrollbars ---------- */
.shelf{overflow-y:hidden;scrollbar-width:none}
.shelf::-webkit-scrollbar{display:none}
.shelf-wrap{position:relative}
.shelf-nav{position:absolute;top:calc(50% - 40px);z-index:2;width:52px;height:52px;border-radius:50%;border:1px solid #d4b47a77;background:#07131ee6;color:var(--ink);font-size:24px;line-height:1;cursor:pointer;transition:opacity .4s,border-color .4s}
.shelf-nav:hover{border-color:var(--brass)}
.shelf-nav[disabled]{opacity:0;pointer-events:none}
.shelf-nav.prev{left:-22px}.shelf-nav.next{right:-22px}

/* ---------- the painted map: lamps brighten around the place you point at ---------- */
.pm-lights i{transition:scale .8s ease,filter .8s ease}
.pm-lights i.near{scale:1.45;filter:brightness(1.35)}

.quiet .map-inset-art i{animation:none}
@media(prefers-reduced-motion:reduce){
  .map-inset-art i{animation:none}
  .face-tile-art img,.place-person-image img,.world-card img,.story-art img,.player-poster img,.gallery-grid img,.map-inset-art{transition:none}
}

@media(max-width:900px){
  .place-profile.world-article{grid-template-columns:1fr}
}
@media(max-width:700px){
  .picture-section{margin-top:36px}
  .face-tiles,.place-profile .place-people-list,.place-cards,.place-profile .place-building-list,.world-page .world-stories .story-list{display:grid;grid-auto-flow:column;grid-template-columns:none;overflow-x:auto;scroll-snap-type:x mandatory;margin:0 -24px;padding:0 24px 10px;scroll-padding:0 24px;scrollbar-width:none;gap:16px}
  .face-tiles,.place-profile .place-people-list{grid-auto-columns:42%}
  .place-cards,.place-profile .place-building-list,.world-page .world-stories .story-list{grid-auto-columns:78%}
  .face-tiles>li,.place-cards>li,.place-people-list>li,.place-building-list>li,.story-list>li{scroll-snap-align:start}
  /* The painting comes first; the map inset waits until after the neighbourhood. */
  .place-profile .world-portrait{display:contents}
  .place-profile .world-portrait>a{order:-2;margin:0 -24px;width:calc(100% + 48px)}
  .place-profile .world-portrait>figcaption{order:-1;margin-top:-14px}
  .place-profile .portrait-invite{padding-left:24px;padding-right:24px}
  .place-profile .world-portrait>.map-inset{order:6;margin-top:10px}
  .place-profile>.place-neighbourhood{order:5}
  .map-inset{max-width:none}
  .story-player{margin:0 -24px 40px}
  .player-poster{border-left:0;border-right:0}
  .player-button{width:72px;height:72px}.player-button::before{left:28px;top:22px;border-width:14px 0 14px 23px}
  .player-label{left:20px;right:20px;bottom:16px;font-size:21px}
  .gallery-grid{display:grid;grid-auto-flow:column;grid-template-columns:none!important;grid-auto-columns:84%;overflow-x:auto;scroll-snap-type:x mandatory;margin:0 -24px;padding:0 24px 10px;scroll-padding:0 24px;scrollbar-width:none;gap:16px}
  .gallery-grid>figure{scroll-snap-align:start;margin:0}
  .people-directory{display:block}
  .people-directory .world-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px 12px}
  .people-directory .world-card{width:auto}
  .people-directory .world-card h2,.people-area .world-card h2{font-size:17px}
  .people-directory .world-card p{display:none}
  .shelf-nav{display:none}
}

/* ---------- pictures grow into the next page (transitions.js names them) ---------- */
@media(prefers-reduced-motion:no-preference){@view-transition{navigation:auto}}
::view-transition-group(picture){animation-duration:.8s;animation-timing-function:cubic-bezier(.2,.7,.2,1);z-index:2}
::view-transition-old(picture),::view-transition-new(picture){width:100%;height:100%;object-fit:cover;overflow:clip}
::view-transition-old(picture){animation:living-page-out .5s ease both}
::view-transition-new(picture){animation:none}

/* ---------- paintings drift closer as you scroll, headings settle (browser-native, no script) ---------- */
@supports(animation-timeline:view()){
  @media(prefers-reduced-motion:no-preference){
    /* clip, not hidden: a hidden-overflow box becomes the scroll container and freezes view() */
    .world-portrait>a,.gallery-grid a,.player-poster,.place-profile .place-building{overflow:clip}
    .world-portrait img,.gallery-grid img,.player-poster img,.place-profile .place-building img{animation:pic-drift linear both;animation-timeline:view();animation-range:entry 10% exit 90%}
    .story-extras h2,.world-page .picture-section>h2,.world-page .world-stories>h2,.place-profile .place-neighbourhood h2,.character-section>h2{animation:heading-settle linear both;animation-timeline:view();animation-range:entry 0% entry 70%}
  }
}
@keyframes pic-drift{from{scale:1}to{scale:1.09}}
@keyframes heading-settle{from{opacity:0;translate:0 22px}to{opacity:1;translate:0 0}}
.quiet .world-portrait img,.quiet .gallery-grid img,.quiet .player-poster img,.quiet .place-building img,.quiet h2{animation:none!important}
