/* Obscure Technologies: the home page. The canvas is fixed behind the stage; the words scroll over it. */
#world { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: 0; transition: opacity var(--d4) var(--ease-arrive); pointer-events: none; }
html.world-live #world { opacity: 1; }
html:not(.has-3d) #world, html:not(.has-3d) .hud { display: none; }
.stage { position: relative; }
.stage > section { position: relative; z-index: 2; }
.scrim { position: fixed; inset: 0; z-index: 1; pointer-events: none; will-change: opacity; background: linear-gradient(90deg, rgba(238, 240, 242, 0.97) 0%, rgba(238, 240, 242, 0.92) 24%, rgba(238, 240, 242, 0.6) 38%, rgba(238, 240, 242, 0) 56%); }
html:not(.has-3d) .scrim { display: none; }
.after { position: relative; z-index: 4; background: var(--paper); }
.hud { position: fixed; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }

/* hero */
.hero { min-height: 100svh; display: flex; align-items: flex-end; padding: calc(var(--head-h) + 4svh) 0 7svh; }
.hero__wrap { width: min(var(--wrap), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.hero__copy { max-width: min(44vw, 700px); }
.hero__h { font-size: clamp(40px, min(5.5vw, 8.4svh), 90px); line-height: 0.98; font-weight: var(--w-light); letter-spacing: -0.035em; text-wrap: balance; }
.hero .lead { margin-top: clamp(20px, 2.4vw, 32px); max-width: 28em; color: var(--ink-2); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 30px; margin-top: clamp(28px, 3.4vw, 44px); }
.hero__cue { margin-top: clamp(40px, 6svh, 72px); color: var(--ink-3); }
html.has-3d .hero__copy { transition: opacity 320ms var(--ease-arrive) 140ms, transform 420ms var(--ease-arrive) 140ms; }
html.has-3d .hero__copy[data-on="0"] { opacity: 0; transform: translate3d(0, -14px, 0); pointer-events: none; transition: opacity 130ms ease-out, transform 130ms ease-out; }
.hero__still { display: none; }
/* without the 3D (no WebGL, or reduced motion) the hero and each beat carry a still, rendered from the same scene */
html:not(.has-3d) .hero { position: relative; overflow: hidden; isolation: isolate; margin-top: calc(var(--head-h) * -1); }
html:not(.has-3d) .hero__still { display: block; position: absolute; inset: 0; z-index: -1; }
html:not(.has-3d) .hero__still img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 50%; }
html:not(.has-3d) .hero__still::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(238, 240, 242, 0.97) 0%, rgba(238, 240, 242, 0.92) 24%, rgba(238, 240, 242, 0.6) 38%, rgba(238, 240, 242, 0) 56%); }

/* the journey */
.journey { height: 270svh; }   /* hero 100 to 104 + journey 270 + pull-back 24 = at most 398svh, inside the 400vh the sequence is allowed */
.beats { height: 100%; display: grid; grid-template-rows: repeat(6, minmax(0, 1fr)); }
.beat { display: flex; align-items: center; }
.beat__wrap { width: min(var(--wrap), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.beat__text { max-width: min(30rem, 33vw); opacity: 0; transform: translate3d(0, 14px, 0); transition: opacity 130ms ease-out, transform 130ms ease-out; }
.beat__text[data-on="1"] { opacity: 1; transform: none; transition: opacity 320ms var(--ease-arrive) 140ms, transform 420ms var(--ease-arrive) 140ms; }
html:not(.has-3d) .beat__text { opacity: 1; transform: none; }
.beat__tag { color: var(--ink-3); margin-bottom: 14px; }
.beat__h { font-size: clamp(30px, 3.4vw, 52px); line-height: 1.04; font-weight: var(--w-light); letter-spacing: -0.03em; text-wrap: balance; }
.beat__p { margin-top: 16px; color: var(--ink-2); font-size: 17px; max-width: 30em; }
.beat__v { margin-top: 14px; font-size: 15px; color: var(--ink-2); max-width: 32em; }
.beat__v b { font-weight: 500; color: var(--ink); }
.beat__v a { color: var(--violet-deep); text-underline-offset: 4px; }
.t-signal { color: var(--signal-ink); font-weight: 500; }
.t-teal { color: var(--teal-deep); font-weight: 500; }
.t-grey { color: var(--ink-3); font-weight: 500; }
.pullback { height: 24svh; }
.beat__still { display: none; margin: 0; }
html:not(.has-3d) .journey { height: auto; }
html:not(.has-3d) .beats { display: block; height: auto; }
html:not(.has-3d) .beat { display: block; padding: clamp(36px, 5vw, 72px) 0; border-top: 1px solid var(--rule); }
html:not(.has-3d) .beat__wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: center; }
html:not(.has-3d) .beat__text { grid-column: 1 / span 5; max-width: none; }
html:not(.has-3d) .beat__still { display: block; grid-column: 7 / span 6; }
html:not(.has-3d) .beat__still img { width: 100%; height: auto; border-radius: var(--radius); background: var(--paper-2); }
html:not(.has-3d) .pullback { display: none; }
html:not(.has-3d) .matcher { min-height: 0; padding-bottom: 8px; }
html:not(.has-3d) .matcher__bench { display: none; }
html:not(.has-3d) .phone-cap, html:not(.has-3d) .win-shade { display: none; }
.journey__note { position: absolute; left: var(--gutter); bottom: 3svh; color: var(--ink-3); }

/* callouts over the canvas */
.callout { position: absolute; left: 0; top: 0; will-change: transform, opacity; opacity: 0; visibility: hidden; transition: opacity 130ms ease-out, visibility 0s linear 130ms; }
.callout[data-on="1"] { opacity: 1; visibility: visible; transition: opacity 320ms var(--ease-arrive) 140ms, visibility 0s; }
.callout__node { position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--paper); transition: background var(--d2) var(--ease-arrive), border-color var(--d2) var(--ease-arrive); }
.callout__line { position: absolute; left: 0; bottom: 6px; width: 1px; height: var(--lead, 58px); background: var(--ink); opacity: 0.55; transform-origin: 0 100%; will-change: transform; transition: background var(--d2) var(--ease-arrive); }
.callout__body { will-change: transform; position: absolute; left: -1px; bottom: calc(var(--lead, 58px) + 6px); display: grid; gap: 3px; padding: 0 0 8px 12px; white-space: nowrap; }
.callout__tag { font-weight: 500; font-size: 13px; color: var(--ink); }
.callout__vend { font-size: 15px; color: var(--ink-2); }
/* in the overview the label is the column heading below, so the callout is a ring and a hairline that drops to it */
.callout.is-match .callout__body { display: none; }
.callout.is-match .callout__line { bottom: auto; top: 6px; height: 100px; transform-origin: 0 0; opacity: 0.4; }   /* drawn 100px tall; the script scales it down to the column heading */
.callout.is-match[data-armed="on"] .callout__node { background: var(--teal); border-color: var(--teal); }
.callout.is-match[data-armed="on"] .callout__line { background: var(--teal); opacity: 0.85; }

/* the matcher: the bench above, the six columns below, each under its station */
.matcher { min-height: max(100svh, 800px); padding-top: calc(var(--head-h) + 12px); display: flex; flex-direction: column; }
.matcher__top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 40px; align-items: end; }
html.has-3d .matcher__top { opacity: 0; transform: translate3d(0, 16px, 0); transition: opacity 320ms var(--ease-arrive), transform 420ms var(--ease-arrive); }
html.has-3d .matcher__top[data-docked="1"] { opacity: 1; transform: none; }
.matcher__top h2 { font-size: clamp(32px, 3.4vw, 52px); line-height: 1.04; }
.matcher__top p { grid-column: 1; color: var(--ink-2); font-size: 17px; max-width: 38em; }
.where { grid-column: 2; grid-row: 1 / span 2; align-self: end; display: grid; gap: 6px; font-size: 15px; font-weight: 500; }
.where select { min-height: 46px; padding: 0 14px; border: 0; border-radius: var(--radius); background-color: var(--paper-2); box-shadow: inset 0 0 0 1px var(--paper-3); font-weight: 400; min-width: 220px; }
.matcher__bench { height: clamp(200px, 26svh, 250px); flex: none; margin-top: 10px; }
.matcher__cols { flex: 1; align-content: start; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 18px; padding-top: 18px; position: relative; }
.matcher__sum { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; padding: 18px 0 36px; font-size: 17px; }
.matcher__sum p { max-width: none; color: var(--ink-2); }

@media (max-width: 1180px) {
  .hero__copy { max-width: 52vw; }
  .beat__text { max-width: 42vw; }
}
@media (max-width: 900px) {
  .matcher__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 28px; }
}

.phone-cap, .win-shade { display: none; }
.phone-cap { position: fixed; left: 0; right: 0; top: calc(var(--head-h) + var(--win-h) - 38px); height: 38px; z-index: 3; padding: 0 var(--gutter) 8px; background: linear-gradient(to top, color-mix(in srgb, var(--paper) 92%, transparent), transparent); font-size: 13px; opacity: 0; transition: opacity var(--d3) var(--ease-arrive); pointer-events: none; }
.phone-cap[data-on="1"] { opacity: 1; }
.phone-cap span { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 8px; opacity: 0; transition: opacity 150ms ease-out; }
.phone-cap span.is-on { opacity: 1; }
/* under the 3D window, content dissolves over 30px instead of being cut off mid-line */
.win-shade { position: fixed; left: 0; right: 0; top: calc(var(--head-h) + var(--win-h)); height: 30px; z-index: 3; pointer-events: none; background: linear-gradient(to bottom, var(--paper), color-mix(in srgb, var(--paper) 0%, transparent)); transition: opacity var(--d3) var(--ease-arrive); }

/* phones: the canvas is a window at the top, the words scroll beneath it */
@media (max-width: 760px) {
  :root { --win-h: 38svh; }   /* the 3D window: this size for the whole page */
  #world { inset: var(--head-h) 0 auto 0; height: var(--win-h); width: 100%; z-index: 3; transition: opacity var(--d3) var(--ease-arrive); }
  html.past-stage #world, html.past-stage .phone-cap, html.past-stage .win-shade { opacity: 0; pointer-events: none; }
  html { scroll-padding-top: calc(var(--head-h) + var(--win-h) + 16px); }
  .hud, .scrim { display: none; }
  .hero { min-height: 0; padding: calc(var(--head-h) + var(--win-h) + 14px) 0 20px; display: block; }
  .hero__copy { max-width: none; }
  .hero__h { font-size: clamp(32px, min(10vw, 5.3svh), 46px); }
  .hero .lead { font-size: clamp(16.5px, min(4.7vw, 2.3svh), 19px); margin-top: 16px; }
  .hero__actions { margin-top: 22px; gap: 12px 24px; }
  .hero__cue { display: none; }
  .journey { height: auto; }
  .pullback { display: none; }
  .beats { display: block; height: auto; }
  .beat { display: block; padding: 10px 0 0; }
  .beat__text { max-width: none; }
  .beat__tag { margin-bottom: 6px; }
  .beat__h { font-size: clamp(24px, min(7vw, 3.3svh), 32px); }
  .beat__p { font-size: clamp(14.5px, min(4vw, 1.9svh), 16.5px); line-height: 1.45; margin-top: 8px; }
  .beat__v { font-size: clamp(13px, min(3.5vw, 1.65svh), 14px); line-height: 1.45; margin-top: 8px; }
  .matcher { min-height: 0; padding-top: 24px; margin-top: 28px; }   /* the gap above keeps the last journey line wholly under the window when a jump parks the matcher below it */
  .matcher__top { grid-template-columns: 1fr; opacity: 1 !important; transform: none !important; }
  .where { grid-column: 1; grid-row: auto; margin-top: 14px; }
  .matcher__bench { display: none; }
  .matcher__cols { grid-template-columns: 1fr; row-gap: 26px; }
  .journey__note { position: static; padding: 10px var(--gutter) 24px; }
  body.home { overflow-x: clip; }
  .phone-cap, .win-shade { display: block; }
  html:not(.has-3d) .hero { display: block; margin-top: 0; padding: 0 0 36px; }
  html:not(.has-3d) .hero__still { position: static; margin: 0 0 22px; }
  html:not(.has-3d) .hero__still img { height: auto; aspect-ratio: 4 / 3; object-position: 68% 50%; }
  html:not(.has-3d) .hero__still::after { display: none; }
  html:not(.has-3d) .beat__wrap { display: block; }
  html:not(.has-3d) .beat__still { margin-top: 22px; }
}

/* the sections after the stage */
.logos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.logos a { display: grid; place-items: center; height: 116px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; transition: background var(--d2) ease, color var(--d2) ease; }
.logos a .logo { max-width: 78%; }
.logos a:hover { background: color-mix(in srgb, var(--violet) 7%, transparent); color: var(--violet-deep); }
.gets { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.gets > div { grid-column: span 3; padding-top: 22px; border-top: 1px solid var(--ink); }
.gets h3 { margin-bottom: 10px; font-size: 21px; }
.gets p { color: var(--ink-2); font-size: 16px; }
.podcast { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: end; }
.podcast h2 { grid-column: 1 / span 7; }
.podcast p { grid-column: 9 / span 4; color: var(--fg-2); }
.podcast .btn { grid-column: 9 / span 4; margin-top: 22px; justify-self: start; }

@media (max-width: 1020px) {
  .logos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gets > div { grid-column: span 6; margin-bottom: 30px; }
  .podcast h2, .podcast p, .podcast .btn { grid-column: 1 / -1; }
  .podcast p { margin-top: 18px; }
}
@media (max-width: 640px) {
  .logos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logos a { height: 92px; }
  .gets > div { grid-column: 1 / -1; }
}
