/* ==========================================================================
   landing.css — chrome for the horizon scene
   ========================================================================== */

:root {
  --ink: #e6e8ea;
  --dim: #979da1;
  --reveal: 0;
  --timeline: 0;
  --hint: 1;
  --gappx: 0px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #000;
  color: var(--ink);
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Helvetica, Arial, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none;
}

/* the page is tall only so that scrolling has somewhere to go */
.scroll-track {
  height: 340vh;
  pointer-events: none;
}

#scene {
  position: fixed;
  inset: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

/* ---------- the reveal ---------- */

.reveal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: min(92vw, 46rem);
  text-align: center;
  opacity: var(--reveal);
  pointer-events: none;
  will-change: opacity;
}

.is-revealed .reveal { pointer-events: auto; }

.reveal__name {
  margin: 0;
  font-size: clamp(0.95rem, 2.6vw, 1.45rem);
  font-weight: 300;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  color: var(--ink);
  transform: translateY(calc((1 - var(--reveal)) * 0.5rem));
}

.reveal__role {
  margin: 0.9rem 0 0;
  font-size: clamp(0.62rem, 1.5vw, 0.74rem);
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  text-transform: uppercase;
  color: var(--dim);
}

.reveal__mail {
  margin: 1.8rem 0 0;
  font-size: clamp(0.78rem, 1.9vw, 0.92rem);
  letter-spacing: 0.1em;
}

.reveal__mail a i,
.reveal__mail a b,
.reveal__mail a em {
  display: none;   /* the decoys harvesters take home instead */
}

.reveal__mail a {
  font-style: normal;
  font-weight: inherit;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(230, 232, 234, 0.28);
  padding-bottom: 0.25rem;
  transition: border-color 400ms ease;
}

.reveal__mail a:hover,
.reveal__mail a:focus-visible { border-bottom-color: rgba(230, 232, 234, 0.9); }

.reveal__mail a:focus-visible {
  outline: 1px solid rgba(230, 232, 234, 0.5);
  outline-offset: 6px;
}

.reveal__links {
  list-style: none;
  margin: 1.9rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.9rem;
}

.reveal__links a {
  display: inline-block;
  padding: 0.15rem 0;
  font-size: clamp(0.62rem, 1.5vw, 0.74rem);
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  text-decoration: none;
  position: relative;
  transition: color 400ms ease;
}

.reveal__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
  transition: right 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal__links a:hover,
.reveal__links a:focus-visible { color: var(--ink); }

.reveal__links a:hover::after,
.reveal__links a:focus-visible::after { right: 0; }

.reveal__links a:focus-visible {
  outline: 1px solid rgba(230, 232, 234, 0.5);
  outline-offset: 6px;
}

/* ---------- the experience, riding just above the lower horizon ---------- */

.timeline {
  position: fixed;
  left: 0;
  right: 0;
  top: calc(50% + var(--gappx));
  z-index: 2;
  margin: 0;
  padding: 0;
  list-style: none;
  opacity: var(--timeline);
  pointer-events: none;
  will-change: opacity;
}

.timeline__item {
  position: absolute;
  left: calc(var(--x, 0.5) * 100%);
  bottom: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
  white-space: nowrap;
  text-align: center;
}

/* a tick reaching down to the dot the entry sprouts from */
.timeline__item::after {
  content: "";
  width: 1px;
  height: 0.55rem;
  margin-top: 0.1rem;
  background: linear-gradient(rgba(230, 232, 234, 0.45), rgba(230, 232, 234, 0));
}

.timeline__years {
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

.timeline__org {
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}

/* mid-width screens tighten the tracking before anything collides */
@media (max-width: 70rem) {
  .timeline__years {
    font-size: 0.54rem;
    letter-spacing: 0.12em;
    text-indent: 0.12em;
  }

  .timeline__org {
    font-size: 0.6rem;
    letter-spacing: 0.14em;
    text-indent: 0.14em;
  }
}

/* narrow screens keep the same layout, just tighter type so four
   labels can breathe across a phone */
@media (max-width: 46rem) {
  .timeline__item { gap: 0.2rem; }

  .timeline__item::after { height: 0.42rem; }

  .timeline__years {
    font-size: 0.46rem;
    letter-spacing: 0.08em;
    text-indent: 0.08em;
  }

  .timeline__org {
    font-size: 0.52rem;
    letter-spacing: 0.1em;
    text-indent: 0.1em;
  }
}

/* ---------- the nudge ---------- */

.hint {
  position: fixed;
  left: 50%;
  bottom: 2.2rem;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 0.6rem;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
  color: var(--dim);
  opacity: calc(var(--hint) * 0.75);
  pointer-events: none;
}

/* ---------- when WebGL is unavailable ---------- */

.fallback {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1;
}

.no-webgl #scene { display: none; }
.no-webgl .hint { display: none; }
.no-webgl .fallback { display: block; }

.no-webgl .fallback::before,
.no-webgl .fallback::after {
  content: "";
  position: absolute;
  left: 4vw;
  right: 4vw;
  height: 1px;
  background: linear-gradient(90deg,
    rgba(230, 232, 234, 0) 0%,
    rgba(230, 232, 234, 0.85) 12%,
    rgba(230, 232, 234, 0.85) 88%,
    rgba(230, 232, 234, 0) 100%);
}

.no-webgl .fallback::before { top: 32vh; }
.no-webgl .fallback::after { top: 68vh; }

.no-webgl .reveal { opacity: 1; pointer-events: auto; }
.no-webgl .timeline { opacity: 1; position: static; display: flex;
  flex-direction: column; align-items: center; gap: 0.34rem;
  margin-top: 2.5rem; }
.no-webgl .timeline__item { position: static; transform: none;
  flex-direction: row; align-items: baseline; gap: 0.5rem; }
.no-webgl .timeline__item::after { display: none; }
.no-webgl .scroll-track { height: 100vh; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; pointer-events: auto; }
  .timeline { opacity: 1; }
  .hint { display: none; }
  .scroll-track { height: 100vh; }
  * { transition: none !important; }
}

@media (max-width: 34rem) {
  .reveal__links {
    gap: 0.75rem 1.3rem;
  }
}

/* ---------- 404 ---------- */

.page-404 {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.page-404__code {
  margin: 0;
  font-size: clamp(0.95rem, 2.6vw, 1.45rem);
  letter-spacing: 0.42em;
  text-indent: 0.42em;
}

.page-404__line {
  width: min(60vw, 26rem);
  margin: 1.6rem auto;
  border: 0;
  border-top: 1px solid rgba(230, 232, 234, 0.85);
}

.page-404__note {
  margin: 0 0 1.6rem;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  text-transform: uppercase;
  color: var(--dim);
}

.page-404 a {
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  text-decoration: none;
  border-bottom: 1px solid rgba(230, 232, 234, 0.28);
  padding-bottom: 0.25rem;
  transition: color 400ms ease, border-color 400ms ease;
}

.page-404 a:hover { color: var(--ink); border-bottom-color: rgba(230, 232, 234, 0.9); }
