/* The Eastwood Atlas (atlas.js): the projects' locations after the portfolio, as a dark cartographic plate. The map
   takes about three fifths on the left, the chosen place's panel (picture, what and where it is, the ways in) and the
   index of places on the right; on narrow screens the map comes first, then the chosen place, then the index. Loaded on the homepage only when the Atlas is published (build_site.py, atlas.json). */
.eastwood-atlas{--ink:#efe9de;--story-rule:rgba(239,233,222,.14);--story-muted:#a6a094;--story-label:#c9a96e;--gold:#c9a96e;--story-stone:#1d1c1a;
 position:relative;z-index:6;background:#151514;color:var(--ink);padding:clamp(72px,11svh,128px) var(--pad,24px) clamp(72px,10svh,120px);border-top:1px solid var(--story-rule)}
.atlas-inner{max-width:1440px;margin:0 auto}
.atlas-heading{display:grid;gap:14px;max-width:760px;margin:0 0 clamp(32px,5svh,56px)}
.atlas-heading .kicker{margin:0;color:var(--gold)}
.atlas-heading h2{margin:0;font-size:var(--fs-heading-1);font-weight:var(--fw-medium,500);line-height:1.05;letter-spacing:-.03em}
.atlas-statement{margin:0;max-width:34ch;color:var(--story-muted);font-size:var(--fs-lead);line-height:1.5;text-wrap:pretty}
.atlas-body{display:grid;grid-template-columns:minmax(0,62fr) minmax(320px,38fr);gap:clamp(28px,3.4vw,56px);align-items:start}
.atlas-index{display:flex;flex-direction:column;gap:clamp(28px,4svh,40px);min-width:0}
.atlas-details{order:-1}

/* The index: one row per place, a hairline under each. The chosen place's rule draws out in gold. */
.atlas-list{list-style:none;margin:0;padding:0;border-top:1px solid var(--story-rule)}
.atlas-place{position:relative;display:flex;align-items:baseline;justify-content:space-between;gap:16px;width:100%;min-height:56px;margin:0;padding:15px 0 14px;border:0;border-bottom:1px solid var(--story-rule);background:none;color:var(--ink);font:inherit;text-align:left;cursor:pointer;-webkit-tap-highlight-color:transparent}
.atlas-place::after{content:"";position:absolute;left:0;bottom:-1px;width:0;height:1px;background:var(--gold);transition:width .6s var(--story-ease)}
.atlas-place-name{font-size:var(--fs-title);font-weight:var(--fw-medium,500);letter-spacing:-.012em;line-height:1.2;transition:color .35s ease}
.atlas-place-city{flex:none;color:var(--story-muted);font-size:var(--fs-label);font-weight:var(--fw-medium,500);letter-spacing:.16em;line-height:1;text-transform:uppercase;font-feature-settings:"case" 1}
.atlas-place[aria-pressed="true"]::after{width:100%}
.atlas-place[aria-pressed="true"] .atlas-place-city{color:var(--story-label)}
@media(hover:hover){.atlas-place:hover::after{width:100%}.atlas-place:hover .atlas-place-name{color:var(--gold)}}
.atlas-place:focus-visible{outline:1px solid var(--gold);outline-offset:4px}
.atlas-place:active .atlas-place-name{color:#7d6440}

/* The chosen place: its picture, what it is, where it is and the ways in. */
.atlas-detail{display:grid;grid-template-columns:minmax(0,1fr);gap:clamp(16px,2vw,24px);align-items:start;animation:atlas-in .7s var(--story-ease) both}
@keyframes atlas-in{from{opacity:0;transform:translate3d(0,10px,0)}}
.atlas-detail[hidden]{display:none}
.atlas-detail-media{position:relative;aspect-ratio:16/10;overflow:hidden;background:var(--story-stone)}
.atlas-detail-media img{display:block;width:100%;height:100%;object-fit:cover}
/* The Crest picture is a wide banner with its lettering on the left: show the building, as the portfolio does. */
.atlas-detail[data-id="eastwood-crest"] .atlas-detail-media img{object-position:100% 50%;transform:scale(1.22);transform-origin:100% 55%}
.atlas-detail-plate{position:absolute;inset:0;background:linear-gradient(135deg,#22211e,#1a1917)}
.atlas-detail-copy{min-width:0}
.atlas-detail-copy .kicker{color:var(--gold);margin:0}
.atlas-detail h3{margin:8px 0 10px;font-size:var(--fs-heading-3);font-weight:var(--fw-medium,500);letter-spacing:-.02em;line-height:1.1}
.atlas-address{margin:0;color:var(--story-muted);font-size:var(--fs-body-sm);line-height:1.55}
.atlas-about{margin:10px 0 0;max-width:46ch;font-size:var(--fs-body-sm);line-height:1.6;text-wrap:pretty}
.atlas-pending{margin:10px 0 0;color:var(--story-label);font-size:var(--fs-label);font-weight:var(--fw-medium,500);letter-spacing:.14em;line-height:1.4;text-transform:uppercase}
.atlas-links{display:flex;flex-wrap:wrap;gap:0 24px;margin:12px 0 0}
.atlas-link{position:relative;display:inline-flex;align-items:center;min-height:44px;color:var(--ink);font-size:var(--fs-micro);font-weight:var(--fw-medium,500);letter-spacing:.16em;line-height:1;text-transform:uppercase;font-feature-settings:"case" 1;text-decoration:none;transition:color .35s ease}
.atlas-link::after{content:"";position:absolute;left:0;bottom:12px;width:28px;height:1px;background:var(--gold);transition:width .55s var(--story-ease)}
.atlas-link:is(:hover,:focus-visible){color:var(--gold)}
.atlas-link:is(:hover,:focus-visible)::after{width:100%}
.atlas-link:focus-visible{outline:1px solid var(--gold);outline-offset:4px}

/* Without atlas.js: every place's details are listed, and neither the index (its buttons need the script) nor the
   empty map is shown. */
.eastwood-atlas:not(.is-enhanced) :is(.atlas-list,.atlas-map){display:none}
.eastwood-atlas:not(.is-enhanced) .atlas-details{display:grid;gap:clamp(28px,4svh,40px)}

/* The map: a warm, quiet ground until it has loaded, and a calm note if it cannot. */
.atlas-map{order:-1;position:relative;min-height:clamp(460px,74svh,760px);overflow:hidden;isolation:isolate;background:#151514}
/* Two classes: the map library's own stylesheet loads later and sets .maplibregl-map{position:relative}, which would
   collapse the canvas to no height. */
.atlas-map .atlas-canvas{position:absolute;inset:0;transition:opacity 1.2s ease}
/* The map's style is light until atlas.js recolours it on load: the canvas stays hidden until then (.is-ready), so the
   dark section never flashes a pale box, and the map fades in already in the page's palette. */
.atlas-map:not(.is-ready) .atlas-canvas{opacity:0}
.atlas-map-note{position:absolute;left:50%;top:50%;z-index:1;width:min(320px,calc(100% - 48px));margin:0;color:var(--story-muted);font-size:var(--fs-body-sm);line-height:1.55;text-align:center;transform:translate(-50%,-50%)}
.atlas-map-note:empty{display:none}
.atlas-map.is-ready .atlas-map-note{display:none}
.atlas-map.is-failed .atlas-canvas{display:none}
.atlas-overview{position:absolute;left:16px;top:16px;z-index:2;display:inline-flex;align-items:center;min-height:40px;padding:0 14px;border:1px solid var(--story-rule);background:rgba(21,21,20,.86);color:var(--ink);font:inherit;font-size:var(--fs-micro);font-weight:var(--fw-medium,500);letter-spacing:.16em;line-height:1;text-transform:uppercase;cursor:pointer;opacity:0;visibility:hidden;transition:opacity .4s ease,visibility 0s linear .4s,color .3s ease,border-color .3s ease}
.atlas-map.is-ready .atlas-overview{opacity:1;visibility:visible;transition:opacity .4s ease,color .3s ease,border-color .3s ease}
.atlas-overview:hover{color:var(--gold);border-color:var(--gold)}
.atlas-overview:focus-visible{outline:1px solid var(--gold);outline-offset:3px}

/* Markers: a gold lozenge with a fine white edge; the chosen one grows a little and names itself. The marker's
   button is the full 44px target. */
.atlas-marker{position:relative;display:block;width:44px;height:68px;margin:0;padding:0;border:0;background:none;cursor:pointer;-webkit-tap-highlight-color:transparent}
.atlas-marker-dot{position:absolute;left:16px;top:14px;width:12px;height:12px;background:var(--gold);box-shadow:0 0 0 1.5px #151514,0 0 0 6px rgba(201,169,110,.18);transform:rotate(45deg);transition:transform .45s var(--story-ease),box-shadow .45s ease}
/* A marker stands on its place: a fine champagne stem from the ground (the marker's foot is the exact position) to
   the lozenge, so on the tilted ground each place reads as a point in space. They rise in turn as the Atlas opens. */
.atlas-marker-stem{position:absolute;left:50%;bottom:0;width:1px;height:44px;margin-left:-.5px;background:linear-gradient(to top,rgba(201,169,110,.15),var(--gold));transform-origin:bottom}
.atlas-marker::after{content:"";position:absolute;left:50%;bottom:-3px;width:10px;height:5px;margin-left:-5px;border-radius:50%;background:rgba(201,169,110,.45)}
@media(prefers-reduced-motion:no-preference){
 .eastwood-atlas.is-enhanced:not(.is-entered) .atlas-heading>*{opacity:0;transform:translate3d(0,.5em,0)}
 .eastwood-atlas.is-enhanced .atlas-heading>*{transition:opacity .9s ease,transform 1.1s var(--story-ease)}
 .eastwood-atlas.is-enhanced .atlas-heading>:nth-child(2){transition-delay:.12s}.eastwood-atlas.is-enhanced .atlas-heading>:nth-child(3){transition-delay:.24s}
 .eastwood-atlas:not(.is-entered) .atlas-marker{visibility:hidden}
 .is-entered .atlas-marker{animation:atlas-show 0s linear both;animation-delay:calc(1.4s + var(--n,0) * .16s)}
 .is-entered .atlas-marker-stem{animation:atlas-stem 1s var(--story-ease) both;animation-delay:calc(1.4s + var(--n,0) * .16s)}
 .is-entered .atlas-marker-dot,.is-entered .atlas-marker::after{animation:atlas-rise .9s var(--story-ease) both;animation-delay:calc(1.6s + var(--n,0) * .16s)}
}
@keyframes atlas-show{from{visibility:hidden}to{visibility:visible}}
@keyframes atlas-stem{from{transform:scaleY(0)}to{transform:none}}
@keyframes atlas-rise{from{opacity:0}to{opacity:1}}
.eastwood-atlas .maplibregl-map,.atlas-marker-label{font-family:var(--font-sans)}
.atlas-marker-label{position:absolute;left:50%;bottom:calc(100% - 4px);padding:6px 10px;background:#151514;color:var(--ink);border:1px solid var(--story-rule);font-size:var(--fs-micro);font-weight:var(--fw-medium,500);letter-spacing:.14em;line-height:1;text-transform:uppercase;white-space:nowrap;box-shadow:0 1px 0 var(--story-rule);opacity:0;transform:translate(-50%,4px);transition:opacity .35s ease,transform .45s var(--story-ease);pointer-events:none}
.atlas-marker::before{content:"";position:absolute;left:50%;top:20px;width:14px;height:14px;margin:-7px;border:1px solid var(--gold);border-radius:50%;opacity:0;pointer-events:none}
.atlas-marker.is-selected{z-index:2}
.atlas-marker.is-selected .atlas-marker-dot{transform:rotate(45deg) scale(1.3);box-shadow:0 0 0 1.5px #151514,0 0 0 9px rgba(201,169,110,.22)}
/* The chosen place sends out a slow ring, so the eye finds it on the dark ground. */
.atlas-marker.is-selected::before{animation:atlas-ring 2.6s var(--story-ease) infinite}
@keyframes atlas-ring{0%{opacity:.7;transform:scale(1)}100%{opacity:0;transform:scale(3.2)}}
.atlas-marker.is-hinted .atlas-marker-dot{transform:rotate(45deg) scale(1.3)}
.atlas-marker:is(.is-selected,.is-hinted) .atlas-marker-label{opacity:1;transform:translate(-50%,0)}
@media(hover:hover){.atlas-marker:hover .atlas-marker-label{opacity:1;transform:translate(-50%,0)}.atlas-marker:hover .atlas-marker-dot{transform:rotate(45deg) scale(1.3)}}

/* The map library's own controls, brought into the page's palette. */
.eastwood-atlas .maplibregl-ctrl-group{border-radius:0;box-shadow:none;border:1px solid var(--story-rule);background:rgba(21,21,20,.86)}
.eastwood-atlas .maplibregl-ctrl-group button+button{border-top-color:var(--story-rule)}
.eastwood-atlas .maplibregl-ctrl-icon{filter:invert(.9) sepia(.2)}
.eastwood-atlas .maplibregl-ctrl.maplibregl-ctrl-attrib{font-size:var(--type-xs);line-height:1.5;background:rgba(21,21,20,.72);color:var(--story-muted)}
.eastwood-atlas .maplibregl-ctrl-attrib a{color:inherit;font-weight:var(--fw-regular,400);text-decoration:underline;text-decoration-color:rgba(201,169,110,.35);text-underline-offset:2px}
.eastwood-atlas .maplibregl-ctrl-attrib a:hover{color:var(--ink)}
.eastwood-atlas .maplibregl-ctrl-attrib-button{filter:invert(.85)}
.eastwood-atlas .maplibregl-cooperative-gesture-screen{font-family:var(--font-sans)}

@media(max-width:900px){
 .atlas-body{grid-template-columns:minmax(0,1fr)}
 .atlas-map{min-height:0;height:clamp(320px,58svh,520px);margin:0 calc(var(--pad,24px)*-1)}
 .atlas-detail{grid-template-columns:minmax(110px,38%) minmax(0,1fr)}
 .atlas-detail-media{aspect-ratio:4/3}
}
@media(max-width:420px){.atlas-detail{grid-template-columns:minmax(0,1fr)}.atlas-detail-media{aspect-ratio:16/9}}
@media(prefers-reduced-motion:reduce){.atlas-place::after,.atlas-place-name,.atlas-link,.atlas-link::after,.atlas-overview,.atlas-marker-dot,.atlas-marker-label{transition:none}.atlas-detail,.atlas-marker.is-selected::before{animation:none}}
