/* Landing page */

html, body.home { height: 100%; }
body.home { overflow: hidden; }

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: pinch-zoom;
  opacity: 0;
  transition: opacity 0.9s;
}
.gl-ready #scene { opacity: 1; }
.dial, .mods, .hint, .credit { opacity: 0; transition: opacity 0.9s; }
.gl-ready .dial, .gl-ready .mods, .gl-ready .hint, .gl-ready .credit { opacity: 1; }
#scene.grab { cursor: grabbing; }
.no-gl #scene, .no-gl .dial, .no-gl .mods, .no-gl .hint, .no-gl .credit { display: none; }

.home .nav { position: fixed; left: 0; right: 0; background: rgba(255, 255, 255, 0.9); }

.hero {
  position: fixed;
  inset: 54px 0 0;
  display: flex;
  align-items: center;
  pointer-events: none;
}
.hero-in {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
  transform: translateY(var(--pull, 0px));
}
.hero-in > * { max-width: 400px; opacity: 0; animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.hero-in > :nth-child(1) { animation-delay: 0.05s; }
.hero-in > :nth-child(2) { animation-delay: 0.13s; }
.hero-in > :nth-child(3) { animation-delay: 0.21s; }
.hero-in > :nth-child(4) { animation-delay: 0.29s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero-in > * { opacity: 1; animation: none; } }
.hero h1 { font-size: 52px; margin: 0; }
.hero h1 span { font-size: 28px; }
.hero .role { margin: 8px 0 0; font-size: 18px; color: var(--soft); }
.hero .tag { margin: 22px 0 0; font-size: 19px; line-height: 1.55; color: var(--text); text-wrap: balance; }
.cta { margin: 28px 0 0; display: flex; gap: 12px; }
.btn {
  pointer-events: auto;
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid #c9ced6;
  border-radius: 4px;
  color: var(--text);
  background: #fff;
  font-size: 15.5px;
}
.btn:hover { border-color: var(--text); text-decoration: none; }
.btn.solid { background: #14213d; border-color: #14213d; color: #fff; }
.btn.solid:hover { background: #000; border-color: #000; }

/* morph slider */

.dial {
  position: fixed;
  left: var(--cx, 69%);
  bottom: var(--ctl, max(7vh, calc(50vh - 380px)));
  transform: translate(-50%, calc(var(--pull, 0px) * 0.6));
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14.5px;
  color: var(--soft);
  white-space: nowrap;
}
.dial label { cursor: pointer; transition: color 0.3s; }
[data-scene="brain"] .dial .a, [data-scene="net"] .dial .b { color: var(--text); }
.dial input {
  -webkit-appearance: none;
  appearance: none;
  width: 190px;
  height: 20px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.dial input::-webkit-slider-runnable-track { height: 1px; background: #aab1bc; }
.dial input::-moz-range-track { height: 1px; background: #aab1bc; }
.dial input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  margin-top: -6px;
  border-radius: 50%;
  background: #14213d;
  border: 0;
}
.dial input::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: #14213d; border: 0; }

/* input modality */

.mods {
  position: fixed;
  left: var(--cx, 69%);
  bottom: calc(var(--ctl, max(7vh, calc(50vh - 380px))) + 35px);
  transform: translate(-50%, calc(var(--pull, 0px) * 0.6));
  display: flex;
  align-items: center;
  --g: 18px;
  gap: var(--g);
  font-size: 14.5px;
  color: var(--soft);
  white-space: nowrap;
}
.mods .grp { display: flex; align-items: center; gap: var(--g); }
/* when one row does not fit, inputs and outputs take a row each (home.js decides) */
.mods.stack { flex-direction: column; align-items: flex-start; gap: 0; }
.mods.stack .lab { min-width: 3.1em; }
.mods.stack .sep { display: none; }
.mods.stack button { padding: 5px 1px; }
.mods .lab { color: #9aa1ad; }
.mods button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 9px 1px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.mods button:hover { color: var(--text); }
.mods i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  box-sizing: border-box;
  transition: background 0.3s, border-color 0.3s;
}
.mods [data-mod-pick="0"] i { border-color: #ed730f; }
.mods [data-mod-pick="1"] i { border-color: #05948c; }
.mods [data-mod-pick="2"] i { border-color: #8c45d9; }
.mods [data-mod-pick="3"] i { border-color: #61a61a; }
[data-mod="0"] .mods [data-mod-pick="0"], [data-mod="1"] .mods [data-mod-pick="1"], [data-mod="2"] .mods [data-mod-pick="2"], [data-mod="3"] .mods [data-mod-pick="3"] { color: var(--text); }
[data-mod="0"] .mods [data-mod-pick="0"] i { background: #ed730f; }
[data-mod="1"] .mods [data-mod-pick="1"] i { background: #05948c; }
[data-mod="2"] .mods [data-mod-pick="2"] i { background: #8c45d9; }
[data-mod="3"] .mods [data-mod-pick="3"] i { background: #61a61a; }
.mods .sep { width: 1px; height: 13px; background: #d0d5dc; }
.mods [data-out-pick="0"] i { border-color: #d9294d; }
.mods [data-out-pick="1"] i { border-color: #1a73f0; }
[data-out="0"] .mods [data-out-pick="0"], [data-out="1"] .mods [data-out-pick="1"] { color: var(--text); }
[data-out="0"] .mods [data-out-pick="0"] i { background: #d9294d; }
[data-out="1"] .mods [data-out-pick="1"] i { background: #1a73f0; }

#region {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 6;
  padding: 2px 8px;
  font-size: 13.5px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 3px;
  white-space: nowrap;
  pointer-events: none;
}

.hint, .credit {
  position: fixed;
  transform: translateY(calc(var(--pull, 0px) * 0.6));
  bottom: 18px;
  margin: 0;
  font-size: 13px;
  color: #9aa1ad;
  pointer-events: none;
}
.hint { right: max(24px, calc(50% - 466px)); }
@media (hover: none) { .hint .hov { display: none; } }
.credit { left: max(24px, calc(50% - 466px)); }

@media (min-width: 1600px) and (min-height: 900px) {
  .home .nav-in, .hero-in { max-width: 1240px; }
  .hint { right: max(24px, calc(50% - 596px)); }
  .credit { left: max(24px, calc(50% - 596px)); }
  .hero-in > * { max-width: 450px; }
  .hero h1 { font-size: 60px; }
  .hero h1 span { font-size: 32px; }
  .hero .role { font-size: 20px; }
  .hero .tag { font-size: 21px; }
}

@media (max-width: 1000px) {
  .credit { display: none; }
}

/* short and wide: a phone held sideways */
@media (max-height: 520px) and (min-aspect-ratio: 115/100) {
  .hero-in { padding-bottom: 64px; }
  .hero-in > * { max-width: 300px; }
  .hero h1 { font-size: 34px; }
  .hero h1 span { font-size: 20px; }
  .hero .role { font-size: 14.5px; margin-top: 4px; }
  .hero .tag { font-size: 15.5px; margin-top: 10px; }
  .cta { margin-top: 14px; }
  .btn { padding: 6px 14px; font-size: 14.5px; }
  .dial { bottom: 8px; font-size: 13px; }
  .mods { bottom: 28px; font-size: 13px; --g: 11px; }
  .mods .lab, .hint, .credit { display: none; }
  .mods.stack { align-items: center; }
}

@media (max-aspect-ratio: 115/100) {
  .hero { inset: 48px 0 0; align-items: flex-end; }
  .hero-in { padding: 0 20px 144px; }
  .hero-in > * { max-width: none; }
  .hero h1 { font-size: 36px; }
  .hero h1 span { font-size: 22px; display: inline; margin-left: 10px; }
  .hero .role { font-size: 15.5px; margin-top: 4px; }
  .hero .tag { font-size: 16.5px; margin-top: 12px; }
  .cta { margin-top: 16px; }
  .dial { left: 50%; bottom: 32px; font-size: 13.5px; gap: 10px; }
  .mods { left: 50%; bottom: 60px; font-size: 13px; --g: 11px; }
  .no-gl .hero { align-items: center; }
  .no-gl .hero-in { padding-bottom: 6vh; }
  .mods button { gap: 5px; }
  .dial input { width: 130px; }
  .hint, .credit { display: none; }
}

@media (max-width: 380px) {
  .mods { --g: 8px; font-size: 12px; }
}

@media (max-width: 340px) {
  .mods { --g: 6px; font-size: 11px; }
  .mods button { gap: 3px; }
  .dial input { width: 110px; }
}
