/* offstage.cloud: the stage and the wings, now with a rack in them.
   Paper is the house lights; --wings is offstage, where the Macs live.
   The brand ramp (violet, magenta, amber) is spent in two places only:
   the mark and the stage lip under each wings panel. Dashed guides are the
   blueprint grid every section hangs on. */

:root {
  --paper: #f3f4f8;
  --paper-2: #e9ebf2;
  --field: #ffffff;
  --ink: #1d2130;
  --ink-2: #545b70;
  --guide: #cdd1dd;
  --line: #c3c8d6;
  --wings: #17132a;
  --wings-2: #231d3e;
  --wings-guide: #3a3263;
  --wings-ink: #ece9f7;
  --wings-ink-2: #aaa4c4;
  --wings-ink-3: #8f88ad;
  --violet: #7c3aed;
  --violet-soft: #c4b5fd;
  --amber: #f5a524;
  --amber-soft: #f6c56f;
  --magenta: #d946ef;
  --refused: #a3271b;
  --ramp: linear-gradient(90deg, #7c3aed, #d946ef 50%, #f59e0b);

  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --text: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --edge: clamp(12px, 3vw, 40px);
  --pad: clamp(20px, 4vw, 56px);
  --section: clamp(64px, 9vw, 120px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: #b4b9c9 var(--paper);
  scroll-padding-top: 84px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--violet);
  color: #fff;
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
::-webkit-scrollbar-track {
  background: var(--paper);
}
::-webkit-scrollbar-thumb {
  background: #b4b9c9;
  border: 3px solid var(--paper);
  border-radius: 6px;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

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

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 20;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  font: 500 0.8125rem/1 var(--mono);
}
.skip:focus {
  top: 12px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- the blueprint grid ---------- */

.frame {
  width: min(1240px, 100% - 2 * var(--edge));
  margin-inline: auto;
  border-inline: 1px dashed var(--guide);
}

.band {
  border-top: 1px dashed var(--guide);
}

/* ---------- type ---------- */

h1 {
  margin: 0 0 28px;
  font: 800 clamp(3.25rem, 6.6vw, 6rem) / 0.9 var(--display);
  letter-spacing: 0.004em;
  text-transform: uppercase;
}

h1 span {
  color: var(--violet);
}

h2 {
  margin: 0 0 20px;
  font: 800 clamp(2.5rem, 4.6vw, 4rem) / 0.94 var(--display);
  letter-spacing: 0.006em;
  text-transform: uppercase;
}

h3 {
  margin: 0 0 6px;
  font: 600 1.1875rem/1.3 var(--text);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: 0;
  font: 500 0.8125rem/1.2 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s var(--ease-out), color 0.18s var(--ease-out), border-color 0.18s var(--ease-out);
}

.btn .icon {
  width: 16px;
  height: 16px;
  flex: none;
  transition: transform 0.25s var(--ease-out);
}
.btn:hover .icon {
  transform: translateX(3px);
}

.btn--primary {
  background: var(--ink);
  color: var(--paper);
}
.btn--primary:hover {
  background: var(--violet);
  border-color: var(--violet);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn--sm {
  min-height: 40px;
  padding: 0 16px;
}

.btn--block {
  width: 100%;
  min-height: 54px;
}

.btn[aria-busy="true"] {
  cursor: progress;
  background: var(--ink-2);
  border-color: var(--ink-2);
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px dashed var(--guide);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 68px;
  padding-inline: var(--pad);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
}

.mark {
  width: 30px;
  height: 30px;
  flex: none;
}

.brand__word {
  font: 800 1.625rem/1 var(--display);
  letter-spacing: 0.01em;
}

.brand__sub {
  margin-left: -4px;
  font: 500 1.0625rem/1 var(--text);
  color: var(--ink-2);
}

.nav__links {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.nav__links a {
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--ink-2);
  text-decoration: none;
}
.nav__links a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* ---------- hero ---------- */

.hero {
  border-top: 0;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: calc(100vh - 69px);
  min-height: calc(100svh - 69px);
}

.hero__copy {
  align-self: center;
  padding: clamp(56px, 7vw, 104px) var(--pad);
}

.lede {
  max-width: 34em;
  margin: 0 0 34px;
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--ink-2);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 26px 0 0;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.lamp {
  width: 8px;
  height: 8px;
  margin-top: 0.55em;
  flex: none;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.12);
}

/* the wings: where the Macs live */
.wings {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: clamp(32px, 5vw, 64px) clamp(16px, 3vw, 48px);
  border-left: 1px dashed var(--guide);
  background: var(--wings);
  overflow: hidden;
}

.wings::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 6px;
  background: var(--ramp);
}

/* the session: an agent run on your Mac, the hero's one moving part.
   Final state is the default, so a reduced-motion visitor (or a crawler)
   sees the finished run. */
.session {
  position: relative;
  width: 100%;
  max-width: 560px;
  border: 1px solid var(--wings-guide);
  background: var(--wings-2);
  color: var(--wings-ink);
  font: 400 0.875rem/1.5 var(--mono);
}

.session__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px dashed var(--wings-guide);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wings-ink-2);
}

.session__led {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--violet-soft);
  box-shadow: 0 0 0 3px rgb(196 181 253 / 0.16);
}

.session__state {
  margin-left: auto;
  color: #ffffff;
}

.session__log {
  margin: 0;
  padding: 10px 18px 18px;
  list-style: none;
}

.session__log li {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 12px;
  padding: 7px 0;
}

.session__log .ev {
  color: var(--violet-soft);
}

.session__log em {
  font-style: normal;
  color: var(--amber-soft);
}

.session__log .fail {
  margin-left: 8px;
  font-weight: 500;
  color: #f0a3c4;
}

.caret {
  display: inline-block;
  width: 0.6em;
  height: 1.15em;
  vertical-align: -0.2em;
  background: var(--wings-ink);
}

@media (prefers-reduced-motion: no-preference) {
  .session__log li {
    animation: line-in 0.45s var(--ease-out) both;
  }
  .session__log li:nth-child(1) { animation-delay: 0.3s; }
  .session__log li:nth-child(2) { animation-delay: 0.8s; }
  .session__log li:nth-child(3) { animation-delay: 1.4s; }
  .session__log li:nth-child(4) { animation-delay: 2.3s; }
  .session__log li:nth-child(5) { animation-delay: 2.8s; }
  .session__log li:nth-child(6) { animation-delay: 3.2s; }
  .session__log li:nth-child(7) { animation-delay: 3.6s; }
  .caret {
    animation: blink 1.1s steps(1) 3.6s infinite;
  }
}

@keyframes line-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ---------- specs ---------- */

.specs__grid,
.faq__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

.specs__head {
  padding: var(--section) var(--pad);
  border-right: 1px dashed var(--guide);
}

.specs__head h2 {
  position: sticky;
  top: 108px;
}

.specs__head p {
  max-width: 26em;
  margin: 0;
  color: var(--ink-2);
}

.spec {
  margin: 0;
  padding: var(--section) var(--pad);
}

.spec > div {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 8px 24px;
  padding: 20px 0;
  border-top: 1px dashed var(--line);
}
.spec > div:last-child {
  border-bottom: 1px dashed var(--line);
}

.spec dt {
  padding-top: 4px;
  font: 500 0.75rem/1.6 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.spec dd {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.5;
}

/* ---------- price: a wings band ---------- */

.price {
  background: var(--wings);
  color: var(--wings-ink);
  border-top: 0;
  position: relative;
}

.price::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 6px;
  background: var(--ramp);
}

.price .frame {
  border-color: var(--wings-guide);
}

.price__head {
  padding: var(--section) var(--pad) clamp(40px, 5vw, 64px);
}

.price__head h2 {
  max-width: 14ch;
  color: #ffffff;
}

.price__head p {
  max-width: 36em;
  margin: 0;
  font-size: 1.1875rem;
  color: var(--wings-ink-2);
}

.price__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px dashed var(--wings-guide);
}

.price__cols > div {
  padding: 32px var(--pad) calc(var(--section) * 0.8);
}
.price__cols > div + div {
  border-left: 1px dashed var(--wings-guide);
}

.price__cols h3 {
  font: 800 1.75rem/1 var(--display);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 12px;
}

.price__cols p {
  margin: 0;
  color: var(--wings-ink-2);
}

/* ---------- how a run works ---------- */

.how__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.how__cues {
  padding: var(--section) var(--pad);
}

.cues {
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.cues li {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 16px;
  padding: 20px 0;
  border-top: 1px dashed var(--line);
}
.cues li:last-child {
  border-bottom: 1px dashed var(--line);
}

.cue {
  padding-top: 4px;
  font: 500 0.75rem/1.6 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--violet);
}

.cues p {
  margin: 0;
  color: var(--ink-2);
}

.code {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  margin: 0;
  padding: clamp(28px, 4vw, 56px) clamp(20px, 3vw, 44px) clamp(40px, 5vw, 64px);
  border-left: 1px dashed var(--guide);
  background: var(--wings);
  color: var(--wings-ink);
}

.code::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 6px;
  background: var(--ramp);
}

.code figcaption {
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--wings-guide);
  font: 500 0.75rem/1.5 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wings-ink-2);
}

.code pre {
  margin: 0;
  overflow-x: auto;
  font: 400 0.875rem/1.75 var(--mono);
  scrollbar-color: var(--wings-guide) var(--wings);
}

.code .k {
  color: var(--violet-soft);
}
.code .s {
  color: var(--amber-soft);
}
.code .c {
  color: var(--wings-ink-3);
}

/* ---------- FAQ ---------- */

.faq__grid > h2 {
  padding: var(--section) var(--pad);
  border-right: 1px dashed var(--guide);
}

.faq__list {
  padding: var(--section) var(--pad);
}

.faq details {
  border-top: 1px dashed var(--line);
}
.faq details:last-child {
  border-bottom: 1px dashed var(--line);
}

.faq summary {
  position: relative;
  padding: 22px 44px 22px 0;
  font: 600 1.1875rem/1.35 var(--text);
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker {
  display: none;
}

/* plus that turns into a minus: two drawn bars */
.faq summary::before,
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 14px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s var(--ease-out);
}
.faq summary::after {
  transform: rotate(90deg);
}
.faq details[open] summary::after {
  transform: rotate(0deg);
}
.faq summary:hover {
  color: var(--violet);
}

.faq details p {
  max-width: 62ch;
  margin: -6px 0 0;
  padding-bottom: 24px;
  color: var(--ink-2);
}

/* ---------- waitlist ---------- */

.join__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.join__copy {
  padding: var(--section) var(--pad);
}

.join__copy h2 {
  max-width: 12ch;
}

.join__copy p {
  max-width: 30em;
  margin: 0 0 32px;
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--ink-2);
}

.join__copy .join__talk {
  margin: 0 0 14px;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
}

.join__panel {
  padding: var(--section) var(--pad);
  border-left: 1px dashed var(--guide);
}

.form__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 16px;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-2);
}

.optional {
  margin-left: 6px;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--ink-2);
  opacity: 0.85;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--field);
  color: var(--ink);
  font: 400 1rem/1.5 var(--text);
  caret-color: var(--violet);
  transition: border-color 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #6b7186;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: #9aa0b4;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgb(124 58 237 / 0.18);
}

.field [aria-invalid="true"] {
  border-color: var(--refused);
}

.field__error,
.form__error {
  margin: 8px 0 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--refused);
}

.form__error {
  margin: 0 0 16px;
}

.select {
  position: relative;
}

.select select {
  appearance: none;
  padding-right: 40px;
  cursor: pointer;
}

.select .icon {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  color: var(--ink-2);
  pointer-events: none;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__fine {
  margin: 4px 0 20px;
  font-size: 0.875rem;
  color: var(--ink-2);
}

.done {
  padding-top: 8px;
}
.done:focus {
  outline: none;
}

.done__mark {
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  color: var(--violet);
}

.done h3 {
  margin: 0 0 14px;
  font: 800 clamp(2.25rem, 3.6vw, 3rem) / 0.95 var(--display);
  text-transform: uppercase;
}

.done p {
  max-width: 30em;
  margin: 0 0 28px;
  font-size: 1.125rem;
  color: var(--ink-2);
}

.done strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: no-preference) {
  .done:not([hidden]) {
    animation: settle 0.6s var(--ease-out) both;
  }
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* ---------- footer ---------- */

.foot {
  background: var(--paper-2);
}

.foot__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 40px;
  padding: 48px var(--pad) 40px;
}

.foot__brand p {
  margin: 12px 0 0;
  color: var(--ink-2);
}

.foot__links {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 28px;
}

.foot__links a {
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
}
.foot__links a:hover {
  text-decoration: underline;
}

.foot__legal {
  grid-column: 1 / -1;
  margin: 12px 0 0;
  padding-top: 20px;
  border-top: 1px dashed var(--line);
  font-size: 0.8125rem;
  color: var(--ink-2);
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .nav__links {
    gap: 20px;
  }
}

@media (max-width: 960px) {
  .hero__grid,
  .how__grid,
  .join__grid,
  .specs__grid,
  .faq__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__grid {
    min-height: 0;
  }

  .wings,
  .code,
  .join__panel {
    border-left: 0;
    border-top: 1px dashed var(--guide);
  }

  .specs__head,
  .faq__grid > h2 {
    border-right: 0;
    padding-bottom: 0;
  }

  .specs__head h2 {
    position: static;
  }

  .spec,
  .faq__list {
    padding-top: 32px;
  }

  .join__panel {
    padding-top: 48px;
  }

  .how__cues {
    padding-bottom: 56px;
  }

  .price__cols {
    grid-template-columns: minmax(0, 1fr);
  }
  .price__cols > div {
    padding-bottom: 32px;
  }
  .price__cols > div:last-child {
    padding-bottom: calc(var(--section) * 0.8);
  }
  .price__cols > div + div {
    border-left: 0;
    border-top: 1px dashed var(--wings-guide);
  }
}

.label-short {
  display: none;
}

@media (max-width: 760px) {
  .nav__links {
    display: none;
  }
  .nav .label-long {
    display: none;
  }
  .nav .label-short {
    display: inline;
  }
  .nav__inner {
    justify-content: space-between;
  }
}

@media (max-width: 640px) {
  :root {
    --edge: 0px;
    --pad: 16px;
  }

  .frame {
    border-inline: 0;
  }

  /* on a phone the copy alone fills the first screen */
  .hero__copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - 69px);
    min-height: calc(100svh - 69px);
    padding-top: 32px;
    padding-bottom: 32px;
  }

  h1 {
    font-size: clamp(3.25rem, 14vw, 4.5rem);
  }

  .lede {
    font-size: 1.0625rem;
  }

  .cta-row .btn {
    flex: 1 1 100%;
  }

  .wings {
    padding: 28px 16px 40px;
  }

  .session {
    font-size: 0.8125rem;
  }

  .session__log li {
    grid-template-columns: 4.75rem minmax(0, 1fr);
    gap: 10px;
  }

  .form__row {
    grid-template-columns: minmax(0, 1fr);
  }

  .spec > div,
  .cues li {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .foot__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .brand__word {
    font-size: 1.5rem;
  }
}
