/* The scroll journey (lab/journey.js): one tall section with a sticky full-screen stage. Used on the home page (as
   section#products, after "What GTS does") and on its own in lab/journey.html. Everything is scoped to .journey. */
.journey{position:relative;z-index:15;height:4000vh;background:#030406;color:#fff;font-family:"Google Sans Flex",system-ui,sans-serif}
.journey__stage{position:sticky;top:0;height:100vh;height:100svh;overflow:hidden;background:#030406}
.journey canvas.journey__gl{position:absolute;inset:0;width:100%;height:100%;display:block;opacity:0;transition:opacity .6s ease}
.journey canvas.journey__gl.ready{opacity:1}   /* faded in once the globe on the screens is there, so it never pops in late */
/* chapter copy, bottom left */
.journey .chap{position:absolute;left:var(--gutter);bottom:clamp(40px,8vh,90px);width:min(520px,42vw);pointer-events:none;z-index:5}
.journey .chap article{position:absolute;left:0;bottom:0;width:100%}
.journey .chap article > *{opacity:0;transform:translateY(18px);transition:opacity .7s ease,transform .9s cubic-bezier(.2,.8,.2,1)}
.journey .chap article.on > *{opacity:1;transform:none}
.journey .chap article.on > :nth-child(2){transition-delay:.08s} .journey .chap article.on > :nth-child(3){transition-delay:.16s} .journey .chap article.on > :nth-child(4){transition-delay:.24s}
.journey .eyebrow{display:flex;align-items:center;gap:12px;font-size:13px;font-weight:500;letter-spacing:.02em;color:rgba(255,255,255,.82);margin:0 0 18px}
.journey .eyebrow::before{content:"";width:30px;height:6px;border-radius:3px;background:var(--blue)}
.journey .chap h2{margin:0;font-size:clamp(30px,2.8vw,48px);font-weight:300;letter-spacing:-.025em;line-height:1.06;text-shadow:0 2px 24px rgba(0,0,0,.6)}
.journey .chap p.lede{margin:0;max-width:none;font-size:clamp(14px,1vw,16px);font-weight:400;line-height:1.5;color:rgba(0,0,0,.8)}
/* the paragraph and its button sit on a white card */
.journey .chap .box{margin-top:18px;padding:20px 22px 22px;border-radius:0;background:#fff;color:#000;box-shadow:0 12px 40px rgba(0,0,0,.28)}
/* the story's buttons: the same as the buttons across the site (34px tall, 240px long, text left, the long arrow right,
   which slides out and back in on hover) */
.journey .jbtn{display:inline-flex;align-items:center;justify-content:space-between;gap:28px;height:34px;min-width:240px;padding:0 20px 0 24px;margin-top:18px;border-radius:999px;background:#000;color:#fff;font:inherit;font-size:12px;line-height:1;text-decoration:none;pointer-events:auto;transition:background .3s cubic-bezier(.2,.8,.2,1)}
.journey .jbtn .arrs{position:relative;flex:none;width:28px;height:10px;overflow:hidden}
.journey .jbtn .arrs svg{position:absolute;inset:0;width:28px;height:10px;fill:none;stroke:currentColor;stroke-width:1.2;transition:transform .55s cubic-bezier(.2,.8,.2,1)}
.journey .jbtn .arrs svg:last-child{transform:translateX(-115%)}
.journey .jbtn:hover{background:var(--blue)}
.journey .jbtn:hover .arrs svg:first-child{transform:translateX(115%)} .journey .jbtn:hover .arrs svg:last-child{transform:none}
.journey .chap article:not(.on) .jbtn{pointer-events:none}
/* data cards that pop up on things in the scene, with a blurred backing */
.journey .card{position:absolute;left:0;top:0;z-index:6;min-width:190px;max-width:270px;padding:14px 16px 13px;border-radius:14px;
  background:rgba(10,16,34,.42);backdrop-filter:blur(16px) saturate(1.2);-webkit-backdrop-filter:blur(16px) saturate(1.2);
  border:1px solid rgba(255,255,255,.12);box-shadow:0 10px 40px rgba(0,0,0,.35);pointer-events:none;
  opacity:0;transform-origin:0 100%;transition:opacity .45s ease}
.journey .card.on{opacity:1}
.journey .card .k{font-size:11px;font-weight:500;letter-spacing:.06em;text-transform:uppercase;color:rgba(255,255,255,.6)}
.journey .card .v{margin-top:6px;font-size:28px;font-weight:300;letter-spacing:-.02em;line-height:1}
.journey .card .s{margin-top:8px;font-size:12px;line-height:1.4;color:rgba(255,255,255,.72)}
.journey .card::before{content:"";position:absolute;left:-7px;bottom:-7px;width:10px;height:10px;border-radius:50%;background:var(--blue);box-shadow:0 0 0 4px rgba(0,102,255,.25),0 0 14px #3d8bff}
/* the frozen moment at the accident: a faint cold wash over everything */
.journey .freeze{position:absolute;inset:0;z-index:4;pointer-events:none;background:radial-gradient(ellipse at center,rgba(0,0,0,0) 40%,rgba(0,10,40,.45));opacity:0;transition:opacity .6s}
.journey .freeze.on{opacity:1}
.journey .jhint{position:absolute;right:var(--gutter);bottom:28px;z-index:5;margin:0;font-size:12px;color:rgba(255,255,255,.5);transition:opacity .5s}
/* a subtle dark wash behind the chapter copy, so it reads over the scene */
.journey .shade{position:absolute;left:0;bottom:0;width:72vw;height:78vh;pointer-events:none;z-index:4;background:radial-gradient(ellipse 70% 64% at 0% 100%,rgba(0,0,0,.78),rgba(0,0,0,.45) 42%,rgba(0,0,0,0) 100%);opacity:0;transition:opacity .9s ease}
.journey .shade.on{opacity:1}
/* floating over the car once he is in: a frosted pill */
.journey .pill{position:absolute;left:0;top:0;z-index:6;padding:12px 24px;border-radius:999px;background:rgba(255,255,255,.12);backdrop-filter:blur(14px) saturate(1.2);-webkit-backdrop-filter:blur(14px) saturate(1.2);
  border:1px solid rgba(255,255,255,.2);box-shadow:0 8px 30px rgba(0,0,0,.25);color:#fff;font-size:14px;font-weight:400;letter-spacing:.01em;white-space:nowrap;pointer-events:none;opacity:0;transition:opacity .7s ease}
.journey .pill.on{opacity:1}
/* a device without 3D: the opening copy over a plain dark background, nothing broken */
.no-3d .journey{height:100vh;background:radial-gradient(ellipse at 70% 20%,#0d2a66,#030406 60%)}
.no-3d .journey__stage{background:transparent}
.no-3d .journey .chap article:first-child > *{opacity:1;transform:none} .no-3d .journey .chap article:first-child .jbtn{display:none}
.no-3d .journey .shade{opacity:1} .no-3d .journey .jhint,.no-3d .journey canvas.journey__gl{display:none}

/* ?shot: stills for the site, scene only */
.shot .journey .chap,.shot .journey .card,.shot .journey .shade,.shot .journey .jhint,.shot .journey .pill,.shot .soundbtn{display:none!important}

/* "Products" at the top left through the journey (the opening shows it above its heading instead) */
.journey .jtag{position:absolute;z-index:6;left:var(--gutter);top:clamp(96px,12vh,118px);margin:0;pointer-events:none;text-shadow:0 1px 12px rgba(0,0,0,.6);
  opacity:0;transform:translateY(-8px);transition:opacity .7s ease,transform .9s cubic-bezier(.2,.8,.2,1)}
.journey .jtag.on{opacity:1;transform:none}
.shot .journey .jtag,.no-3d .journey .jtag{display:none}

/* the opening's two buttons: play the opening, or skip past the whole journey */
.journey .jactions{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}
.journey .jactions .jbtn{margin-top:0;white-space:nowrap}   /* the same length as the other buttons in the story: text left, arrow right */
.journey .chap article:first-child{width:min(640px,calc(100vw - 2 * var(--gutter)))}
.journey .jbtn--grey{background:#e4e6ea;color:#111}
.journey .jbtn--grey:hover{background:#111;color:#fff}
.journey .chap article:not(.on) .jactions{pointer-events:none}

/* phones held upright: black above and below; the scene in a shorter, wider frame just below the "Products" / Go back row
   (journey.js sets --jtop and --jh); the chapter text in white on black underneath, each staying until the next arrives */
@media (max-width:760px) and (orientation:portrait){
  .journey__stage{background:#000}
  .journey canvas.journey__gl{top:var(--jtop,0);height:var(--jh,75%);bottom:auto}
  .journey .shade,.journey .jhint{display:none}
  .journey .chap{left:0;right:0;top:calc(var(--jtop,0px) + var(--jh,75%) + var(--jgap,14px) - 10px);bottom:0;width:auto;height:auto;background:#000;color:#fff;pointer-events:auto;z-index:7}
  .journey .chap article,.journey .chap article:first-child{left:0;top:0;bottom:auto;width:auto;right:0;padding:18px var(--gutter) 0}
  .journey .chap article:not(.on){pointer-events:none}
  .journey .chap .eyebrow{color:rgba(255,255,255,.82);margin-bottom:8px;font-size:12px}
  /* "Products": in the first chapter's text at the start; as you scroll it moves up to the top, so it leaves the text then */
  .journey .chap article.on:first-child .eyebrow{transition:opacity .5s ease,transform .6s cubic-bezier(.2,.8,.2,1)}
  .journey .jtag.on ~ .chap article:first-child .eyebrow{opacity:0;transform:translateY(-8px)}
  .journey .chap h2{font-size:clamp(19px,5.4vw,24px);line-height:1.15;text-shadow:none;color:#fff}
  .journey .chap .box{margin:0;padding:0;background:none;box-shadow:none}
  .journey .chap p.lede{display:block;margin-top:10px;font-size:13px;line-height:1.5;color:rgba(255,255,255,.72)}   /* each chapter's paragraph, under its heading */
  .journey .jbtn{margin-top:14px;background:#fff;color:#000}
  .journey .jbtn:hover{background:var(--blue);color:#fff}
  .journey .jactions{margin-top:14px;gap:8px}
  .journey .card{min-width:0;max-width:200px;padding:10px 12px;transform-origin:0 0}
  .journey .card .v{font-size:20px}
  .journey .card .s{font-size:11px}
}

