/* pitch.css - the pitch inside the waitlist drawer (index.html #waitlist,
   with css/waitlist.css), and the arrows between it and the cosmos. Short
   slides that arrive as they scroll into view (js/pitch.js adds .is-in), in
   the cosmos's own colors. Phones get one column; from 960px the desktop has
   its own composition on a wider measure. Without pitch.js (html.pt-js
   absent) everything simply shows. */

#waitlist {
  --pt-star: #f0d5bb;
  --pt-green: #c4ddb8;
  --pt-blue: #b8cae0;
  --pt-rose: #e0b8c8;
  --pt-teal: #b8ddd8;
  --pt-night: #070517;
  --pt-spring: cubic-bezier(0.34, 1.4, 0.6, 1);
  --pt-out: cubic-bezier(0.16, 1, 0.3, 1);
  --pt-gutter: 20px;
}

/* The 14px paper cap over the top edge (style.css) would show as a strip
   across the night band; the open drawer covers everything it guards */
body.footer-open #nav-cap { visibility: hidden; }

/* -- Between the cosmos and the drawer: a quiet arrow each way ------- */
.hint-down, .pt-up {
  display: grid;
  place-items: center;
  width: 40px;
  height: 32px;
  padding: 0;
  color: var(--ink-soft);
  background: none;
  border: 0;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}
.hint-down:hover, .pt-up:hover, .hint-down:focus-visible, .pt-up:focus-visible { opacity: 1; }
.hint-down svg, .pt-up svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* under "Click a sphere | Join the waitlist", outside its box, so the
   hero's framing (js/main.js: layoutHero) is unchanged */
.hint-down {
  position: absolute;
  left: 50%;
  top: 100%;
  translate: -50% 0;
  pointer-events: auto;
}
.hint-down svg { animation: pt-nudge-down 2.6s ease-in-out infinite; }
body.mode-2d .hint-down, body.footer-open .hint-down { pointer-events: none; }
.pt-up {
  position: absolute;
  left: 50%;
  top: 10px;
  translate: -50% 0;
  z-index: 2;
}
.pt-up svg { animation: pt-nudge-up 2.6s ease-in-out infinite; }

/* -- Slides (phones first) ------------------------------------------- */
.pt-sec {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
  padding: 80px 0 8px;
}
.pt-h2 {
  max-width: 17em;
  margin: 0 0 26px;
  font-weight: 600;
  font-size: clamp(30px, 7.4vw, 44px);
  line-height: 1.06;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.pt-note {
  max-width: 34em;
  margin: 24px 0 0;
  font-style: italic;
  font-size: 19px;
  line-height: 1.4;
  color: var(--ink-soft);
}

/* a phrase that never parts at a line end */
.pt-nb { white-space: nowrap; }

/* -- Arrival: each marked element rises in once (js/pitch.js) -------- */
html.pt-js [data-pt] {
  opacity: 0;
  translate: 0 26px;
  transition: opacity 0.8s ease, translate 1s var(--pt-out);
}
html.pt-js [data-pt].is-in { opacity: 1; translate: none; }
html.pt-js .pt-gets [data-pt] { transition-delay: calc(var(--i, 0) * 70ms); }

/* -- The ideas: rows of institutions drifting past ------------------- */
.pt-ideas {
  display: grid;
  gap: 12px;
  margin: 0 calc(var(--pt-gutter) * -1);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.pt-row { overflow: hidden; }
.pt-track {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  display: flex;
  flex-wrap: wrap;
  row-gap: 10px;
}
/* each pill carries its own space after it, so the doubled row (js/pitch.js)
   loops at exactly half its width */
html.pt-js .pt-track { flex-wrap: nowrap; width: max-content; animation: pt-drift 70s linear infinite; }
html.pt-js .pt-row--rev .pt-track { animation-direction: reverse; animation-duration: 80s; }
html.pt-js .pt-row:nth-child(3) .pt-track { animation-duration: 64s; }
.pt-ideas:hover .pt-track { animation-play-state: paused; }
.pt-track li {
  flex: none;
  margin-right: 10px;
  padding: 8px 17px 9px;
  border-radius: 999px;
  font-style: italic;
  font-size: 18px;
  white-space: nowrap;
  background: color-mix(in srgb, var(--c), #fff 28%);
  border: 1px solid color-mix(in srgb, var(--c), #1b1613 14%);
  box-shadow: 0 8px 20px rgba(27, 22, 19, 0.06);
}
.pt-turn {
  position: relative;
  width: fit-content;
  margin: 36px 0 0;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(26px, 6vw, 34px);
  line-height: 1.15;
  color: var(--clay-deep);
}
.pt-turn::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--clay), var(--pt-rose), var(--pt-blue));
  transform-origin: left;
  transition: transform 1.2s var(--pt-out) 0.5s;
}
html.pt-js .pt-turn:not(.is-in)::after { transform: scaleX(0); }

/* -- A slice of the M.SOS globe, between an idea and reality ---------- */
.pt-globe {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "globe globe globe" "idea line far";
  align-items: center;
  column-gap: 12px;
  margin: 0 calc(var(--pt-gutter) * -1);
  padding: 0 var(--pt-gutter);
}
.pt-globe-canvas {
  grid-area: globe;
  display: block;
  width: 100%;
  height: 270px;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
  mask-image: linear-gradient(180deg, #000 70%, transparent);
}
.pt-globe::after {
  content: "";
  grid-area: line;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--clay), var(--pt-green), var(--pt-blue));
  opacity: 0.6;
}
.pt-end {
  margin: 0;
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  color: var(--clay-deep);
  white-space: nowrap;
}
.pt-end:first-child { grid-area: idea; }
.pt-end--far { grid-area: far; color: rgba(27, 22, 19, 0.42); }

/* -- The answer, as a sum -------------------------------------------- */
.pt-sum {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: start;
  gap: 4px;
  text-align: center;
}
.pt-sum li { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pt-sum strong { font-weight: 700; font-size: 23px; line-height: 1.1; }
.pt-sum span { max-width: 9em; font-size: 16px; line-height: 1.28; color: var(--ink-soft); }
.pt-sum .pt-op { font-family: "Lora", serif; font-size: 30px; line-height: 1; color: var(--clay); }
.pt-sum .pt-op:nth-child(6) { grid-column: 1 / -1; padding-top: 14px; }
.pt-sum .pt-real { grid-column: 1 / -1; }
.pt-sum .pt-real strong {
  font-style: italic;
  font-weight: 600;
  font-size: clamp(36px, 9vw, 52px);
  background: linear-gradient(90deg, var(--clay-deep), #b0607a, #5d7da6, #5f8a50, var(--clay-deep));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: pt-sheen 8s linear infinite;
  padding: 0 0.08em;
}
html.pt-js .pt-sum li {
  opacity: 0;
  scale: 0.7;
  transition: opacity 0.5s ease, scale 0.8s var(--pt-spring);
  transition-delay: calc(0.15s + var(--i) * 0.16s);
}
html.pt-js .pt-sum.is-in li { opacity: 1; scale: 1; }

/* -- How it works: a line that draws itself -------------------------- */
.pt-path {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0 0 0 26px;
  display: grid;
  gap: 24px;
}
.pt-path::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--clay), var(--pt-green), var(--pt-blue));
  transform-origin: top;
  transition: transform 1.6s var(--pt-out) 0.2s;
}
html.pt-js .pt-path:not(.is-in)::before { transform: scaleY(0); }
.pt-path li { display: grid; align-content: start; gap: 2px; }
.pt-path strong { font-weight: 700; font-size: 24px; line-height: 1.15; }
.pt-path span { font-size: 18px; line-height: 1.38; color: var(--ink-soft); }
html.pt-js .pt-path li {
  opacity: 0;
  translate: 0 10px;
  transition: opacity 0.6s ease, translate 0.8s var(--pt-out);
  transition-delay: calc(0.4s + var(--i) * 0.3s);
}
html.pt-js .pt-path.is-in li { opacity: 1; translate: none; }

/* -- What a founder receives ----------------------------------------- */
.pt-gets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.pt-gets li {
  --c: var(--pt-star);
  padding: 14px 18px 15px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--hairline);
  border-top: 3px solid var(--c);
  line-height: 1.32;
  transition: box-shadow 0.4s ease, opacity 0.8s ease, translate 1s var(--pt-out);
}
.pt-gets li:hover { box-shadow: 0 14px 30px rgba(27, 22, 19, 0.08); }
.pt-gets li:nth-child(4n + 2) { --c: var(--pt-green); }
.pt-gets li:nth-child(4n + 3) { --c: var(--pt-blue); }
.pt-gets li:nth-child(4n + 4) { --c: var(--pt-rose); }
.pt-gets strong { display: block; font-weight: 700; font-size: 21px; }
.pt-gets span { display: block; margin-top: 2px; font-size: 17px; color: var(--ink-soft); }
@media (min-width: 560px) and (max-width: 959px) {
  .pt-gets { grid-template-columns: repeat(2, 1fr); }
}

/* -- $0 upfront ------------------------------------------------------ */
.pt-zero-sec { text-align: center; }
.pt-zero-sec .pt-h2, .pt-zero-sec .pt-note { margin-left: auto; margin-right: auto; }
.pt-zero {
  display: inline-block;
  font-family: "Lora", serif;
  font-style: normal;
  font-weight: 400;
  font-size: 1.5em;
  line-height: 0.8;
  color: var(--clay-deep);
  text-shadow: 0 0 28px rgba(240, 213, 187, 0.9);
  transition: scale 1.1s var(--pt-spring) 0.3s, rotate 1.1s var(--pt-spring) 0.3s;
}
html.pt-js .pt-h2:not(.is-in) .pt-zero { scale: 2.4; rotate: -12deg; }

/* -- The vision, under the night sky --------------------------------- */
.pt-band {
  position: relative;
  margin: 88px calc(var(--pt-gutter) * -1) 0;
  padding: 88px var(--pt-gutter) 96px;
  color: #f4efe8;
  background:
    radial-gradient(1.2px 1.2px at 12% 18%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1px 1px at 78% 12%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1.4px 1.4px at 64% 82%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1px 1px at 30% 88%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1.2px 1.2px at 90% 54%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 6% 60%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(124, 92, 232, 0.22), transparent 70%),
    var(--pt-night);
  overflow: hidden;
}
.pt-band-in { max-width: 1040px; margin: 0 auto; }
.pt-vision-lead {
  max-width: 30em;
  margin: 0 auto 26px;
  text-align: center;
  font-style: italic;
  font-size: 20px;
  line-height: 1.4;
  color: rgba(244, 239, 232, 0.78);
}
.pt-vision {
  max-width: 19em;
  margin: 0 auto;
  text-align: center;
  font-weight: 500;
  font-size: clamp(28px, 7vw, 40px);
  line-height: 1.14;
  text-wrap: balance;
}
/* "institutions" in the star's gold with a slow glow: a solid color, since
   text clipped from a background vanishes in iOS Safari once the word is
   split into its own animated box (js/pitch.js) */
.pt-vision em {
  font-style: italic;
  color: #f3d9a8;
  animation: pt-glow 4.5s ease-in-out infinite;
}
html.pt-js .pt-vision .pt-w {
  display: inline-block;
  opacity: 0;
  translate: 0 0.4em;
  filter: blur(6px);
  transition: opacity 0.6s ease, translate 0.8s var(--pt-out), filter 0.8s ease;
  transition-delay: calc(0.2s + var(--w) * 55ms);
}
html.pt-js .pt-vision.is-in .pt-w { opacity: 1; translate: none; filter: none; }
html.pt-js .pt-vision[data-pt] { opacity: 1; translate: none; }

/* -- Desktop: one centred axis on a wider measure -------------------- */
@media (min-width: 960px) {
  #waitlist { --pt-gutter: 56px; }
  #waitlist .wl-content { padding: 0 var(--pt-gutter); }
  #waitlist .wl-sec, .pt-sec { max-width: 1120px; text-align: center; }
  .pt-sec { padding-top: 136px; }
  #waitlist .wl-sec { padding-top: 136px; }
  /* every slide stacks on the centre line */
  #waitlist .wl-sec, .pt-sec { display: flex; flex-direction: column; align-items: center; }
  .pt-h2, #waitlist .wl-h2 {
    max-width: 16em;
    margin: 0 auto 44px;
    font-size: clamp(44px, 4.4vw, 60px);
    line-height: 1.03;
  }
  .pt-note { max-width: 36em; margin: 34px auto 0; font-size: 21px; }

  /* Thought bubbles sit on the centre line beneath what they answer, their
     trail rising toward it */
  #waitlist .wl-bubble {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: auto;
    max-width: 420px;
    margin: 64px auto 0;
    text-align: center;
  }
  #waitlist .wl-dot--near { top: -21px; bottom: auto; left: calc(50% - 8px); right: auto; }
  #waitlist .wl-dot--far { top: -37px; bottom: auto; left: calc(50% + 6px); right: auto; }
  #waitlist .wl-cloud { transform-origin: 50% -20%; padding: 17px 28px 15px; }
  #waitlist .wl-cloud p { font-size: 21px; }

  /* The offer: the headline across the page, its first line whole */
  #waitlist .wl-sec--lead { padding-top: 150px; }
  #waitlist .wl-h1 {
    margin: 0 auto 26px;
    font-size: clamp(54px, 5.6vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.01em;
  }
  #waitlist .wl-h1 > [aria-hidden] { white-space: nowrap; }
  /* the turning noun's box glides to each word's width (js/pitch.js) */
  #waitlist .wl-rotor { transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
  .pt-lead-body { width: 100%; max-width: 600px; }
  #waitlist .wl-sec--lead .wl-sub { font-size: 25px; margin-bottom: 30px; }
  #waitlist .wl-signup { max-width: 600px; margin: 0 auto; text-align: left; }
  #waitlist .wl-micro { text-align: center; }
  .pt-ask .wl-cloud p { font-style: normal; font-weight: 600; font-size: 24px; }

  /* The ideas run the full width of the drawer */
  .pt-ideas { width: calc(100% + 2 * var(--pt-gutter)); gap: 16px; }
  .pt-track li { margin-right: 14px; padding: 10px 22px 11px; font-size: 23px; }
  .pt-turn { margin: 48px auto 0; font-size: 44px; }

  /* The globe between its two words, on one horizon, centred */
  .pt-globe {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(0, 3.4fr) minmax(0, 1fr);
    grid-template-areas: "idea globe far";
    align-items: end;
    column-gap: 24px;
    margin: 0;
    padding: 0;
  }
  .pt-globe::after { display: none; }
  .pt-globe-canvas { height: 400px; }
  .pt-end { padding-bottom: 34px; font-size: 30px; }
  .pt-end:first-child { justify-self: end; }
  .pt-end--far { justify-self: start; }

  /* The answer: the claim, the sum, then a line from the letter */
  .pt-answer .pt-h2 { margin-bottom: 0; }
  .pt-answer .wl-bubble { order: 3; }
  .pt-sum {
    order: 2;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 28px;
    margin-top: 64px;
  }
  .pt-sum li { flex: 0 1 auto; }
  .pt-sum strong { font-size: 38px; }
  .pt-sum span { font-size: 20px; }
  .pt-sum .pt-op, .pt-sum .pt-op:nth-child(6) { flex: 0 0 auto; padding-top: 0; font-size: 54px; }
  .pt-sum .pt-real strong { font-size: 60px; }

  /* How it works: four steps along one line, each centred on its stop */
  .pt-path { width: 100%; grid-template-columns: repeat(4, 1fr); gap: 40px; padding: 34px 0 0; text-align: center; }
  .pt-path::before {
    left: 12.5%;
    right: 12.5%;
    top: 0;
    bottom: auto;
    width: auto;
    height: 2px;
    background: linear-gradient(90deg, var(--clay), var(--pt-green), var(--pt-blue));
    transform-origin: left;
  }
  html.pt-js .pt-path:not(.is-in)::before { transform: scaleX(0); }
  .pt-path strong { font-size: 28px; }
  .pt-path span { font-size: 19px; }

  /* What a founder receives: eight cards in two rows of four, then a line
     from the letter */
  .pt-gets-sec .wl-h2 { margin-bottom: 0; }
  .pt-gets-sec .wl-bubble { order: 3; }
  .pt-gets { order: 2; width: 100%; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 56px; }
  .pt-gets li { padding: 22px 22px 24px; text-align: center; }
  .pt-gets strong { font-size: 23px; }

  .pt-zero-sec .pt-h2 { max-width: none; font-size: 68px; }

  .pt-band { margin-top: 136px; padding: 150px var(--pt-gutter) 160px; }
  .pt-vision-lead { font-size: 23px; margin-bottom: 34px; }
  .pt-vision { font-size: clamp(44px, 4.4vw, 60px); }

  /* Plain answers: a centred column of their own */
  .pt-qa-sec .wl-h2 { margin-bottom: 30px; font-size: 44px; }
  .pt-qa-sec .wl-qa { width: 100%; max-width: 760px; text-align: left; }
  .pt-qa-sec .wl-qa dt { font-size: 23px; }
  .pt-qa-sec .wl-qa dd { font-size: 19px; }

  /* The close: the founder's word, the signature, the form, one line */
  #waitlist .wl-sec--close { padding-bottom: 80px; }
  .pt-close-l, .pt-close-r { width: 100%; display: flex; flex-direction: column; align-items: center; }
  .pt-close-l .wl-h2--leap { margin-bottom: 14px; font-size: 56px; }
  .pt-close-l .wl-sub { font-size: 24px; }
  /* the signature's ink runs from a fifth of the way into its image to a
     fifth from its end, its middle 1% right of the image's: shifted back by
     that, it sits centred over the name */
  #waitlist .pt-close-l .wl-sig { margin: 6px auto 4px; translate: calc(260px * -0.0104) 0; }
  .pt-close-r .wl-signup { width: 100%; }
}

/* -- Motion ---------------------------------------------------------- */
@keyframes pt-drift { to { translate: -50% 0; } }
@keyframes pt-sheen { to { background-position: 300% 0; } }
@keyframes pt-glow {
  0%, 100% { text-shadow: 0 0 10px rgba(243, 217, 168, 0.25); }
  50% { text-shadow: 0 0 22px rgba(243, 217, 168, 0.65), 0 0 46px rgba(224, 184, 200, 0.3); }
}
@keyframes pt-nudge-down { 0%, 100% { translate: 0 -2px; } 50% { translate: 0 3px; } }
@keyframes pt-nudge-up { 0%, 100% { translate: 0 2px; } 50% { translate: 0 -3px; } }

@media (prefers-reduced-motion: reduce) {
  #waitlist *, #waitlist *::before, #waitlist *::after, .hint-down svg {
    animation: none !important;
    transition: none !important;
  }
  html.pt-js .pt-track { flex-wrap: wrap; width: auto; }
  html.pt-js #waitlist [data-pt],
  html.pt-js .pt-path li,
  html.pt-js .pt-sum li,
  html.pt-js .pt-vision .pt-w { opacity: 1 !important; translate: none !important; scale: none !important; rotate: none !important; filter: none !important; }
  html.pt-js .pt-h2 .pt-zero { scale: none !important; rotate: none !important; }
  html.pt-js .pt-turn::after, html.pt-js .pt-path::before { transform: none !important; }
}
