/* Hero: announcement note, statement, buttons, setup prompt, "works with" marks and the field film. */

/* ---------- announcement ---------- */

.note {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  padding: 2px 2px 2px 12px;
  background: var(--paper);
  color: var(--ink-68);
  font-size: 13px;
  line-height: 1.5;
  text-decoration: none;
}
/* taller hit area than the pill itself */
.note::after {
  content: "";
  position: absolute;
  inset: -4px 0;
}
.note-live {
  display: block;
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live);
}
.note-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--rule);
  background: #fff;
  color: var(--ink);
  font-weight: 500;
}

/* ---------- statement ---------- */

.statement {
  margin-top: var(--sp-note-statement);
  color: var(--ink);
  font-size: var(--fs-statement);
  font-weight: 400;
  line-height: var(--lh-statement);
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.dek {
  max-width: 30em;
  margin-top: var(--sp-statement-dek);
  color: var(--ink-68);
  font-size: var(--fs-dek);
  line-height: 1.6;
  letter-spacing: -0.006em;
  text-wrap: pretty;
}

/* the buttons and the prompt bar share one shrink-wrapped column, so the bar is exactly as wide as the buttons */
.ways {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  max-width: 100%;
  margin-top: var(--sp-dek-actions);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 44px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--dur-press) var(--ease-cta);
}
.btn:active {
  transform: scale(0.985);
}

/* primary: a green face; a white tile carrying the mark rides from the left edge to the right on hover,
   while a white wash grows from the tile to fill the button. Everything on the green is Black 100. */
.btn-primary {
  gap: 12px;
  min-width: 208px;
  padding: 2px 11px 2px 2px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  clip-path: inset(2px calc(100% - 40px) 2px 2px);
  transition: clip-path var(--dur-cta) var(--ease-cta);
}
.btn-slot {
  flex: none;
  width: 38px;
  height: 38px;
}
.btn-rail {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(100% - 42px);
  height: 38px;
  pointer-events: none;
  transition: translate var(--dur-cta) var(--ease-cta);
}
.btn-tile {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: var(--logo);
  rotate: 0deg;
  transition: rotate var(--dur-cta) var(--ease-cta);
}
.btn-tile svg {
  display: block;
  width: 18px;
  height: 17px;
}
.btn-label {
  position: relative;
  z-index: 1;
  flex: 1;
  text-align: center;
  transition:
    color 0.25s ease,
    translate var(--dur-cta) var(--ease-cta);
}
.btn-primary:hover::before,
.btn-primary:focus-visible::before {
  clip-path: inset(2px);
}
.btn-primary:hover .btn-rail,
.btn-primary:focus-visible .btn-rail {
  translate: 100%;
}
.btn-primary:hover .btn-tile,
.btn-primary:focus-visible .btn-tile {
  rotate: 360deg;
}
.btn-primary:hover .btn-label,
.btn-primary:focus-visible .btn-label {
  color: var(--on-accent);
  translate: -41px;
}

/* secondary: a pale green tint with registration ticks in the corners that step inward on hover */
.btn-secondary {
  justify-content: center;
  gap: 12px;
  padding: 1px 12px;
  background: var(--accent-tint);
  color: var(--ink);
}
.btn-secondary:hover {
  background: var(--accent-tint-strong);
}
.btn-secondary::after {
  --tk: var(--tick);
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(var(--tk), var(--tk)) left top / 6.5px 1px,
    linear-gradient(var(--tk), var(--tk)) left top / 1px 6.5px,
    linear-gradient(var(--tk), var(--tk)) right top / 6.5px 1px,
    linear-gradient(var(--tk), var(--tk)) right top / 1px 6.5px,
    linear-gradient(var(--tk), var(--tk)) left bottom / 6.5px 1px,
    linear-gradient(var(--tk), var(--tk)) left bottom / 1px 6.5px,
    linear-gradient(var(--tk), var(--tk)) right bottom / 6.5px 1px,
    linear-gradient(var(--tk), var(--tk)) right bottom / 1px 6.5px;
  background-repeat: no-repeat;
  transition: background-position 0.36s var(--ease-out);
}
.btn-secondary:hover::after,
.btn-secondary:focus-visible::after {
  background-position:
    10px 8px,
    10px 8px,
    right 10px top 8px,
    right 10px top 8px,
    left 10px bottom 8px,
    left 10px bottom 8px,
    right 10px bottom 8px,
    right 10px bottom 8px;
}
.btn-arrow {
  display: block;
  flex: none;
  transition: translate var(--dur-hover) var(--ease-hover);
}
.btn-secondary:hover .btn-arrow,
.btn-secondary:focus-visible .btn-arrow {
  translate: 2px -2px;
}

/* ---------- setup prompt bar ---------- */

.promptbar {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: stretch;
  margin-top: 12px;
}

/* hatched grey surface shared by the copy button and the menu toggle */
.prompt,
.opens-toggle {
  background-color: var(--paper);
  background-image: repeating-linear-gradient(-45deg, #0b101509 0 1px, #0000 1px 4px);
  transition:
    background-color var(--dur-hover) var(--ease-hover),
    color var(--dur-hover) var(--ease-hover);
}

.prompt {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  height: 32px;
  margin: 0;
  padding: 0 11px 0 12px;
  border: 0;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
}
.prompt::after {
  content: "";
  position: absolute;
  inset: -4px 0;
}
.prompt:hover {
  background-color: #ededf0;
}
.prompt:focus-visible {
  outline-offset: -2px;
}

/* label swap: "Copy setup prompt" rises out blurred, "Setup prompt copied" rises in */
.prompt-slot {
  display: grid;
}
.prompt-label,
.prompt-said {
  grid-area: 1 / 1;
  white-space: nowrap;
  transition:
    opacity 0.2s ease-out,
    translate 0.2s ease-out,
    filter 0.2s ease-out;
}
.prompt-said {
  opacity: 0;
  filter: blur(2px);
  translate: 0 8px;
}
.prompt.is-copied .prompt-label {
  opacity: 0;
  filter: blur(2px);
  translate: 0 -8px;
}
.prompt.is-copied .prompt-said {
  opacity: 1;
  filter: none;
  translate: 0;
}

.prompt-glyph {
  display: grid;
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--ink-60);
  transition: color var(--dur-hover) var(--ease-hover);
}
.prompt:hover .prompt-glyph {
  color: var(--ink);
}
.prompt.is-copied .prompt-glyph {
  color: var(--accent-text);
}
.prompt-glyph svg {
  display: block;
  grid-area: 1 / 1;
  width: 16px;
  height: 16px;
  transition:
    opacity 0.2s var(--ease),
    scale 0.2s var(--ease),
    filter 0.2s var(--ease);
}
.prompt-glyph svg + svg,
.prompt.is-copied .prompt-glyph svg:first-child {
  opacity: 0;
  filter: blur(4px);
  scale: 0.25;
}
.prompt.is-copied .prompt-glyph svg + svg {
  opacity: 1;
  filter: none;
  scale: 1;
}

/* ---------- "open in" menu ---------- */

.opens {
  position: relative;
  display: flex;
}
.opens-toggle {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-left: 1px solid #0b101514;
  color: var(--ink-60);
  cursor: pointer;
}
.opens-toggle:hover {
  background-color: #ededf0;
  color: var(--ink);
}
.opens-toggle:focus-visible {
  outline-offset: -2px;
}
.opens-toggle svg {
  transition: rotate 0.2s var(--ease-out);
}
.opens-toggle[aria-expanded="true"] svg {
  rotate: 180deg;
}

.opens-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  min-width: 172px;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--rule);
  background: #fff;
  box-shadow: 0 8px 24px #0b101514;
  list-style: none;
  transform-origin: 100% 0;
  opacity: 1;
  translate: 0;
  scale: 1;
  transition:
    opacity 0.16s var(--ease-out),
    scale 0.42s var(--spring-36),
    translate 0.42s var(--spring-36),
    display 0.42s allow-discrete;
}
.opens-menu[hidden] {
  display: none;
  opacity: 0;
  translate: 0 -4px;
  scale: 0.97;
  transition:
    opacity 0.12s var(--ease-standard),
    scale 0.12s var(--ease-standard),
    translate 0.12s var(--ease-standard),
    display 0.12s allow-discrete;
}
@starting-style {
  .opens-menu:not([hidden]) {
    opacity: 0;
    translate: 0 -4px;
    scale: 0.97;
  }
}
.opens-menu > li {
  position: relative;
  transition:
    opacity 0.2s var(--ease-out),
    translate 0.3s var(--ease-out);
}
.opens-menu > li:nth-child(2) {
  transition-delay: 30ms;
}
.opens-menu > li:nth-child(3) {
  transition-delay: 60ms;
}
.opens-menu > li:nth-child(4) {
  transition-delay: 90ms;
}
.opens-menu > li:nth-child(5) {
  transition-delay: 0.12s;
}
@starting-style {
  .opens-menu:not([hidden]) > li {
    opacity: 0;
    translate: 0 3px;
  }
}
/* the highlight that glides between items under the pointer */
.opens-glide {
  position: absolute;
  top: 0;
  inset-inline: 6px;
  height: 0;
  background: var(--paper);
  opacity: 0;
  pointer-events: none;
  translate: 0 var(--y, 0px);
  transition:
    translate 0.2s var(--ease-out),
    height 0.2s var(--ease-out),
    opacity 0.12s var(--ease-hover);
}
.opens-glide.is-on {
  opacity: 1;
}
.opens-head {
  padding: 4px 8px 6px;
  color: var(--ink-45);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.opens-menu a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
}
.opens-menu a:focus-visible {
  outline: 0;
}
.opens-menu img {
  display: block;
  width: 14px;
  height: 14px;
  object-fit: contain;
  filter: brightness(0);
  opacity: 0.7;
  transition: opacity var(--dur-hover) var(--ease-hover);
}
.opens-menu a:hover img,
.opens-menu a:focus-visible img {
  opacity: 1;
}

/* ---------- works with ---------- */

.plugs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 22px;
}
.plugs-text {
  margin: 0;
  color: var(--ink-45);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.plugs-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}
.plugs-row span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}
.plugs-row img {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
  transition: scale var(--dur-hover) var(--ease-hover);
}
.plugs-row span:hover img {
  scale: 1.08;
}

/* ---------- the spec: an example project spec on the dark ground ---------- */

.figure {
  margin: var(--sp-actions-figure) 0 0;
}
.spec {
  overflow: hidden;
  background: var(--aivc-black);
  color: #ffffffd9;
  outline: 1px solid #0000001a;
  outline-offset: -1px;
}
.spec-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  border-bottom: 1px solid #ffffff1f;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 14px;
  letter-spacing: 0.06em;
}
.spec-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-transform: uppercase;
}
.spec-file::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent);
}
.spec-cmd {
  color: #ffffff99;
  white-space: nowrap;
}
.spec-code {
  margin: 0;
  padding: 18px 16px 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  tab-size: 2;
}
.spec-code .k {
  color: #fff;
}
/* comments in the muted-on-dark grey (8.13:1 on the dark ground) */
.spec-code .c {
  color: #b3b3b3;
}
/* variable references: green stays a surface, so it marks them as a wash under white text */
.spec-code .r {
  padding: 1px 2px;
  background: #00ff7f2e;
  color: #fff;
}
/* the figure settles from a hair over full size as the page arrives */
html.js .figure[data-reveal] {
  translate: 0;
  scale: 1.01;
  transition-duration: 1.2s;
}
html.js .figure[data-reveal].is-visible {
  scale: 1;
}

@media (width <= 600px) {
  .statement {
    letter-spacing: -0.025em;
  }
  .ways {
    display: flex;
    width: 100%;
  }
  .actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn {
    min-width: 0;
  }
  .spec-code {
    font-size: 11.5px;
  }
  .spec-cmd {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn-primary::before,
  .btn-rail,
  .btn-tile,
  .btn-label,
  .btn-arrow,
  .btn-secondary::after,
  .plugs-row img,
  .prompt,
  .prompt-glyph,
  .prompt-glyph svg,
  .prompt-label,
  .prompt-said,
  .opens-toggle svg,
  .opens-menu,
  .opens-menu[hidden],
  .opens-menu > li,
  .opens-menu a,
  .opens-menu img,
  .opens-glide {
    transition: none;
  }
  html.js .figure[data-reveal] {
    scale: 1;
    transition: none;
  }
}
