/*
 * Base page chrome: document, brain canvas, top bar, logo, buttons,
 * section dots and the "scroll" cue. Layout of the sections themselves is in
 * scenes.css; the no-JavaScript layout is in static.css.
 */

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
}

/* The page never scrolls in the animated experience, so hide the scrollbar everywhere. */
html {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar {
  display: none;
}

/* Added by js/main.js while the stepped experience is active. */
html.locked,
html.locked body {
  overflow: hidden;
  height: 100%;
  overscroll-behavior: none;
}

:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

/* Full-screen canvas where the 3D brain is drawn (js/brain-renderer.js). */
#brain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

/* ---------- top bar and logo ---------- */

#topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 64px);
  box-sizing: border-box;
}

#brand {
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -.01em;
  line-height: 1;
  color: var(--fg);
}
#brand .l2 {                     /* the "2" is red */
  color: var(--logo-red);
}
#brand .li {                     /* the "i": red dot over an azure stem, made with a clipped gradient */
  display: inline-block;
  color: transparent;
  background: linear-gradient(var(--logo-red) 0 var(--dot), var(--logo-blue) var(--dot) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: .65rem 1.3rem;
  border-radius: 999px;
  font: 600 .95rem/1.2 var(--font);
  text-decoration: none;
  cursor: pointer;
  background: var(--btn);
  color: var(--btn-fg);
  border: 1px solid var(--btn);
  transition: background .2s, border-color .2s, transform .1s;
}
.btn:hover {
  background: var(--btn-hover);
  border-color: var(--btn-hover);
}
.btn:active {
  transform: scale(.98);
}
.btn.ghost {                     /* secondary action: outline only */
  background: transparent;
  color: var(--fg);
  border-color: var(--field-line);
}
.btn.ghost:hover {
  background: var(--line);
  border-color: var(--fg);
}
.btn.disabled {                  /* not available yet (e.g. contributor platform) */
  opacity: .45;
  cursor: not-allowed;
  background: transparent;
  color: var(--fg);
  border-color: var(--field-line);
}
.btn.disabled:hover {
  background: transparent;
  border-color: var(--field-line);
}
#join {                          /* "Join the waitlist" in the top bar */
  padding: .5rem 1.1rem;
}

/* ---------- section dots (right edge) ---------- */

#dots {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 50;
}
#dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--muted);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: all .3s;
}
#dots button.on {
  background: var(--fg);
  border-color: var(--fg);
  transform: scale(1.25);
}

/* ---------- scroll cue: a thin line with a drop sliding down, hidden after the first move ---------- */

#cue {
  position: fixed;
  left: 50%;
  bottom: 22px;
  width: 2px;
  height: 54px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  z-index: 30;
  pointer-events: none;
  transition: opacity .5s;
}
#cue::after {
  content: "";
  position: absolute;
  left: 0;
  top: -14px;
  width: 2px;
  height: 14px;
  background: var(--fg);
  animation: cue-drop 1.8s ease-in infinite;
}
#cue.off {
  opacity: 0;
}
@keyframes cue-drop {
  to { top: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  #cue::after { animation: none; }
  .btn:active { transform: none; }
}

/* ---------- legal line ---------- */
/* Small identification line at the bottom of the animated page: company and a link to the privacy page. */
#legal {
  position: fixed;
  left: 16px;
  bottom: 10px;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  gap: .2rem .9rem;
  max-width: calc(100vw - 32px);
  font-size: .72rem;
  line-height: 1.3;
  color: var(--muted);
}
#legal a,
#legal button {
  color: inherit;
  text-decoration: underline;
}
#legal button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}
@media (max-width: 700px) {
  #legal {
    display: block;                 /* the text runs on, so the full legal line takes three short lines */
    bottom: 6px;
    font-size: .62rem;
    line-height: 1.25;
  }
  #legal a,
  #legal button {
    margin-left: .4em;
  }
}
