/* Trois Pas de Côté — home page of the 10th anniversary: one WebGL map in the middle, the ten trips in a strip at the bottom. */
:root{
 --bg:#b2c7ab;--veil:178,199,171;--ink:#22342a;--muted:#415244;--accent:#6a0c06;--accent-2:#8a1a10;--paper:#eef0e6;--line:rgba(34,52,42,.16);
 --strip-h:clamp(150px,24vh,232px);   /* tallest tile, at the right edge */
 --tile-w:calc(var(--strip-h) * 1.11);
 --gap:8px;
 --pad:clamp(20px,3.4vw,48px)
}
*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;overflow:hidden}
body{font-family:"Google Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;font-size:13px;color:var(--ink);background:var(--bg);-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;border:0;background:none;cursor:pointer;padding:0}
a:focus-visible,button:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
svg{fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}

/* background and central map */
#sky{position:fixed;inset:0;background:radial-gradient(ellipse at 66% 36%,#c2d3bb 0%,#b2c7ab 58%,#a8bea1 100%)}
.stage{position:fixed;left:0;right:0;top:0;height:calc(100dvh - var(--strip-h) * .31)}   /* between the first framing and the lowest one tried */
#scene,#poster{position:absolute;inset:0;width:100%;height:100%;display:block}
#poster{object-fit:cover;object-position:center;opacity:0;transition:opacity .9s}   /* shown only without WebGL */
.stage.nogl #poster{opacity:1}
#veil{position:fixed;inset:0;pointer-events:none;background:linear-gradient(90deg,rgba(var(--veil),.96) 0,rgba(var(--veil),.86) 300px,rgba(var(--veil),.5) 440px,rgba(var(--veil),0) 620px)}
.map-hit{position:fixed;left:32%;right:6%;top:12%;height:calc(100dvh - var(--strip-h) - 14%);z-index:3}
.map-hit{cursor:grab;-webkit-user-drag:none;user-select:none}
body.dragging,body.dragging .map-hit{cursor:grabbing}

.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* top bar */
.topbar{position:fixed;left:var(--pad);right:var(--pad);top:30px;z-index:6;display:flex;justify-content:space-between;align-items:center}
.logo{display:block;width:44px;height:44px;overflow:hidden}
.logo img{display:block;width:100%;height:100%}
.tools{display:flex;align-items:center;gap:18px}
.info{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid var(--line);border-radius:50%;transition:background .2s,border-color .2s,color .2s}
.info:hover{background:var(--ink);border-color:var(--ink);color:var(--paper)}
.info svg{width:16px;height:16px}
.sep{width:1px;height:16px;background:rgba(34,52,42,.3)}
.micro{font-size:10px;letter-spacing:.9px;font-weight:600;text-transform:uppercase}
.blog{transition:color .2s}.blog:hover{color:var(--accent)}

/* title */
.hero{position:fixed;left:calc(var(--pad) - 3px);top:98px;z-index:4;pointer-events:none}
.hero h1{font-family:"Google Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;font-weight:400;font-size:clamp(44px,5.2vw,74px);line-height:.92;letter-spacing:-.035em;margin:0}
.hero h1 .dot{color:var(--accent)}
.hero h1 .line{display:block;overflow:hidden;padding-bottom:.08em;margin-bottom:-.08em}
.hero h1 .line>span{display:block}
.hero p{width:440px;max-width:calc(100vw - 40px);margin:22px 0 0 3px;font-size:15px;line-height:1.55;color:var(--muted)}

/* strip of trips: pinned to the bottom, each image pinned by its bottom, taller towards the right */
.strip{position:fixed;left:0;right:0;bottom:0;height:calc(var(--strip-h) + 40px);overflow:hidden;z-index:5;pointer-events:none}
.track{position:absolute;left:0;bottom:0;display:flex;align-items:flex-end;transform-origin:0 100%;will-change:transform}
.tile{position:relative;flex:none;display:block;width:var(--tile-w);height:calc(var(--strip-h) * .6);margin-right:var(--gap);pointer-events:auto}
.tile-frame{position:absolute;inset:0;overflow:hidden;border-radius:2px;background:rgba(34,52,42,.08)}
.tile-frame img{position:absolute;left:0;bottom:0;width:100%;height:var(--strip-h);object-fit:cover;object-position:center bottom;filter:saturate(.85);transition:filter .35s}
.tile:hover .tile-frame img,.tile:focus-visible .tile-frame img{filter:none}
.tile-name{position:absolute;left:0;bottom:100%;padding-bottom:7px;font-size:14px;font-weight:600;letter-spacing:-.2px;white-space:nowrap;opacity:0;transform:translateY(5px);transition:opacity .25s,transform .25s}
.tile:hover .tile-name,.tile:focus-visible .tile-name{opacity:1;transform:none}

/* the button that follows the mouse over the map and the strip */
.cta{position:fixed;left:0;top:0;z-index:12;pointer-events:none;display:inline-flex;align-items:center;gap:8px;padding:9px 15px 9px 16px;border-radius:999px;
 background:linear-gradient(180deg,#771109 0%,var(--accent) 100%);color:#f6ede7;font-size:10px;font-weight:600;letter-spacing:1px;text-transform:uppercase;white-space:nowrap;
 box-shadow:0 8px 20px rgba(70,10,5,.22);opacity:0;transition:opacity .2s;will-change:transform}
.cta i{display:inline-flex}
.cta svg{width:12px;height:12px}
body.pointing .cta{opacity:1}
@media (hover:hover) and (pointer:fine){.tile{cursor:none}}

/* About panel: on the right, like the "Read" panel of the trip pages */
.about{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;background:rgba(31,52,40,.2);color:var(--ink);overflow:hidden}
.about[open]{display:flex;justify-content:flex-end;animation:aboutFade .25s ease-out}
.about::backdrop{background:transparent}
.about-panel{position:relative;display:flex;width:min(560px,100%);height:100%;background:var(--paper);border-left:1px solid var(--line);box-shadow:-24px 0 70px rgba(31,52,40,.14);animation:aboutIn .34s cubic-bezier(.2,.7,.2,1)}
.about-scroll{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:72px 58px 64px}
.about-scroll:focus{outline:none}
.about-close{position:absolute;top:20px;right:22px;z-index:1;width:38px;height:38px;display:flex;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:50%;background:rgba(247,247,237,.92);transition:background .2s,color .2s}
.about-close:hover{background:var(--ink);color:var(--paper)}
.about-close svg{width:18px;height:18px}
.about-eyebrow{margin:0;color:var(--muted)}
.about h2{font-family:"Google Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;font-weight:400;font-size:42px;line-height:1.06;letter-spacing:-1.6px;margin:14px 0 30px}
.about h2 span{color:var(--accent)}
.about-text p,.about-text li{font-family:"Google Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;font-size:16.5px;line-height:1.62}
.about-text p{margin:0 0 .85em}
.about-text h3{font-family:"Google Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;font-weight:400;font-size:23px;line-height:1.2;letter-spacing:-.5px;margin:1.6em 0 .55em}
.about-text h3:first-child{margin-top:0}
.about-text ul{margin:0 0 .85em;padding-left:1.1em}
.about-text li{margin:0 0 .45em}
.about-text li::marker{color:var(--accent)}
.about-more{margin:34px 0 0;padding-top:18px;border-top:1px solid var(--line)}
.about-more a:hover{color:var(--accent)}
.about-more span{margin-left:6px;color:var(--accent)}
@keyframes aboutFade{from{background:rgba(31,52,40,0)}}
@keyframes aboutIn{from{transform:translateX(40px);opacity:0}}

/* the button under the map on touch screens (no hover) */
.cta-static{display:none}

@media (max-width:700px){
 :root{--strip-h:clamp(118px,19vh,160px);--tile-w:calc(var(--strip-h) * 1.0)}
 .topbar{top:20px}
 .logo{width:36px;height:36px}
 .tools{gap:12px}
 .hero{top:70px}
 .hero h1{font-size:clamp(40px,12.4vw,52px);letter-spacing:-.035em}
 .hero p{width:300px;margin-top:12px;font-size:13px}
 .about-panel{width:100%;border-left:0}
 .about-scroll{padding:64px 26px 48px}
 .about h2{font-size:33px;letter-spacing:-1.2px;margin:12px 0 22px}
 .about-text p,.about-text li{font-size:15.5px}
 .about-text h3{font-size:20.5px;letter-spacing:-.4px}
 .about-close{top:14px;right:14px}
 .stage{top:220px;height:120vw}   /* until the script sizes it (phoneLayout in tpc-home.js): the map under the text, under the photos on a tall phone */
 #veil{background:linear-gradient(180deg,rgba(var(--veil),.95) 0,rgba(var(--veil),.75) 170px,rgba(var(--veil),0) 250px)}
 .map-hit{left:0;right:0;top:250px;height:calc(100vw - 20px);pointer-events:none}   /* phones: the map only turns on its own (and with the gyroscope); a swipe anywhere drives the strip */
}
@media (hover:none),(max-width:700px){
 .cta{display:none}
 .tile-name{opacity:1;transform:none;font-size:12px;padding-bottom:5px}
 .cta-static{position:fixed;left:50%;bottom:calc(var(--strip-h) + 44px);transform:translateX(-50%);z-index:6;display:inline-flex;align-items:center;gap:8px;padding:10px 16px 10px 18px;border-radius:999px;
  background:linear-gradient(180deg,#771109 0%,var(--accent) 100%);color:#f6ede7;font-size:10px;font-weight:600;letter-spacing:1px;text-transform:uppercase;white-space:nowrap;box-shadow:0 8px 20px rgba(70,10,5,.22)}
 .cta-static i{display:inline-flex}
 .cta-static svg{width:12px;height:12px}
}
@media (max-width:700px){.cta-static{display:none}}   /* phones: no button, a tap on the map or on a photo opens the trip */
@media (prefers-reduced-motion:reduce){
 .about[open],.about-panel{animation:none}
 .strip{overflow-x:auto;pointer-events:auto}
 .tile-name,.tile-frame img,#poster{transition:none}
}

/* intro: the title rises line by line, then the words, the top bar and the strip come in (the relief rises in WebGL meanwhile) */
@media (prefers-reduced-motion:no-preference){
 .hero h1 .line>span{transform:translateY(108%);animation:homeRise 1s cubic-bezier(.2,.75,.2,1) .15s forwards}
 .hero h1 .line:nth-child(2)>span{animation-delay:.27s}
 .hero p{opacity:0;transform:translateY(12px);animation:homeUp .9s cubic-bezier(.2,.75,.2,1) .6s forwards}
 .topbar{opacity:0;animation:homeFade .9s ease .35s forwards}
 .strip{opacity:0;transform:translateX(90px);animation:homeUp 1.2s cubic-bezier(.2,.75,.2,1) .75s forwards}
 .sound{opacity:0;animation:homeFade .9s ease 1.4s forwards}
}
/* no graphics card (html.still, set by tpc-renderer.js): the page appears at once, like the map */
html.still .hero h1 .line>span,html.still .hero p,html.still .topbar,html.still .strip,html.still .sound{animation:none;opacity:1;transform:none}
@keyframes homeRise{to{transform:none}}
@keyframes homeUp{to{opacity:1;transform:none}}
@keyframes homeFade{to{opacity:1}}

/* sound: bottom left, above the short tiles */
.sound{position:fixed;left:var(--pad);bottom:calc(var(--strip-h) * .58 + 46px);z-index:6;display:inline-flex;align-items:center;gap:10px;color:var(--ink)}
.sound .bars{display:inline-flex;align-items:center;justify-content:center;gap:2px;width:32px;height:32px;border:1px solid var(--line);border-radius:50%;transition:background .2s,border-color .2s,color .2s}
.sound .bars i{width:2px;height:3px;border-radius:1px;background:currentColor;transition:height .3s}
.sound:hover .bars{background:var(--ink);border-color:var(--ink);color:var(--paper)}
.sound .sound-label::after{content:"Sound off"}
.sound.on .sound-label::after{content:"Sound on"}
.sound.on .bars i{animation:homeEq .9s ease-in-out infinite alternate}
.sound.on .bars i:nth-child(2){animation-delay:-.45s}
.sound.on .bars i:nth-child(3){animation-delay:-.2s}
.sound.on .bars i:nth-child(4){animation-delay:-.65s}
@keyframes homeEq{from{height:3px}to{height:12px}}
@media (hover:none),(max-width:700px){.sound{display:none}}

/* leaving for a trip: the map dives in, then the page turns to the green of the trip's loading screen */
#leave{position:fixed;inset:0;z-index:30;background:#b2c7ab;opacity:0;pointer-events:none;transition:opacity .5s ease .4s}
body.leaving #leave{opacity:1;pointer-events:auto}
body.leaving .cta{opacity:0}
