/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.375rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font: 600 var(--fs-small) / 1 var(--font-sans);
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}

.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover { background: var(--bg-alt); }

.btn-large {
  padding: 1rem 2rem;
  font-size: var(--fs-body);
}

/* Logo + wordmark */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

.brand img {
  width: 2rem;
  height: 2rem;
}

/* Screenshot frame. Every new screenshot is dark (PLAN.md D7), so the frame
   gives it a border and shadow to sit on the light page. */

.shot {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-shot);
  background: #0f172a;
}

.shot-narrow {
  max-width: 37.5rem;
  margin-inline: auto;
}

/* A narrower screenshot (search, call, repo): about 1000px wide on a laptop, growing with the screen */

.shot-natural {
  width: min(100%, 62.5rem);
  margin-inline: auto;
}

/* A phone around a mobile screenshot, drawn after a recent Galaxy-style Android phone:
   a thin black bezel, a brushed metal edge, buttons on the right side and a punch-hole camera */

.phone {
  position: relative;
  width: 19rem;
  padding: 0.4375rem;
  border: 3px solid transparent;
  border-radius: 2.5rem;
  background:
    linear-gradient(#050506, #050506) padding-box,
    linear-gradient(155deg, #d4d5da, #7d7e84 30%, #3a3b40 55%, #a9aab0 80%, #5c5d63) border-box;
  box-shadow: var(--shadow-shot);
}

/* The side buttons: the volume rocker, and the power button below it */
.phone::before {
  content: '';
  position: absolute;
  top: 7rem;
  right: -0.4375rem;
  width: 0.25rem;
  height: 8rem;
  border-radius: 0 0.25rem 0.25rem 0;
  background: linear-gradient(to bottom, #a3a4aa 0 3.5rem, transparent 3.5rem 5rem, #a3a4aa 5rem);
}

/* The punch-hole front camera, centered over the status bar */
.phone::after {
  content: '';
  position: absolute;
  top: 1.0625rem;
  left: 50%;
  width: 0.6875rem;
  height: 0.6875rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2c3546 0 18%, #050506 45%);
  box-shadow: 0 0 0 2px #121318;
  transform: translateX(-50%);
}

.phone img {
  width: 100%;
  border-radius: 2rem;
}

/* AI teammates: a chat that plays each bot (js/main.js) above one card per bot.
   The chat copies the app's dark look, so it reads as a recording of Zigzag. */

.bots {
  display: grid;
  gap: 1.5rem;
  max-width: 56rem;
  margin-inline: auto;
}

.bot-demo {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 20rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-shot);
  background: #0d0f12;
  color: #e6e8eb;
  font-size: 1.0625rem;
}

.bot-demo-head {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid #22262c;
  font-weight: 500;
}

.bot-demo-feed {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.625rem;
  overflow: hidden;
  padding: 1.25rem;
}

.bot-demo-name {
  margin-right: 0.5rem;
  font-weight: 500;
  color: oklch(0.78 0.14 309);
}

.bot-demo-mention {
  padding: 0.05em 0.35em;
  border-radius: 0.3em;
  background: rgb(76 110 245 / 0.22);
  color: #9db1ff;
}

.bot-demo-thinking { color: #8b949e; }

.bot-demo-task {
  margin-right: 0.75rem;
  padding: 0.15em 0.6em;
  border: 1px solid #30363d;
  border-radius: 0.5rem;
  background: #1a1d22;
}

.bot-demo-composer {
  margin: 0 1.25rem 1.25rem;
  padding: 0.875rem 1rem;
  overflow: hidden;
  border: 1px solid #2a2f36;
  border-radius: 0.75rem;
  background: #16191e;
  white-space: nowrap;
}

.bot-demo-composer:has(.bot-demo-typed:empty)::after {
  content: 'Message…';
  color: #6b7280;
}

.bot-demo-caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-inline: 1px;
  vertical-align: text-bottom;
  background: #e6e8eb;
}

/* @screambot's big announcement: covers the whole chat, as it covers every teammate's screen */
.bot-demo-banner {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: linear-gradient(135deg, rgb(37 99 235 / 0.94), rgb(124 58 237 / 0.94));
  color: #fff;
  font-size: 2.25rem;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.04);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
}

.bot-demo-banner.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.bot-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}

.bot-card {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0.375rem;
  width: 100%;
  height: 100%;
  padding: 1rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-muted);
  font: inherit;
  font-size: var(--fs-small);
  line-height: 1.4;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.bot-card:hover { border-color: var(--border-strong); }

.bot-card[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(124 58 237 / 0.15);
}

.bot-card-icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--bg-alt);
  font-size: 1.625rem;
}

.bot-card-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

/* Phones: the phone frame fits the screen, the chat is shorter, and the bot cards sit three and two */
@media (max-width: 760px) {
  .phone { width: min(17rem, 100%); }

  .bot-demo { height: 17rem; font-size: 0.9375rem; }
  .bot-demo-banner { font-size: 1.5rem; }
  /* A long command wraps onto a second line instead of running out of the composer */
  .bot-demo-composer { white-space: normal; overflow-wrap: anywhere; }

  .bot-cards { grid-template-columns: repeat(6, 1fr); gap: 0.5rem; }
  .bot-cards > li { grid-column: span 2; }
  .bot-cards > li:nth-child(4) { grid-column: 2 / 4; }
  .bot-cards > li:nth-child(5) { grid-column: 4 / 6; }
  .bot-card { padding: 0.75rem 0.25rem; font-size: 0.75rem; container-type: inline-size; }
  .bot-card-icon { width: 2.5rem; height: 2.5rem; font-size: 1.25rem; }
  /* The names shrink with their card, so the longest one, @screambot, always fits */
  .bot-card-name { font-size: min(0.9375rem, 14cqi); }
}

/* The smallest phones: the cards sit two per row, so the names keep their full size */
@media (max-width: 359px) {
  .bot-cards { grid-template-columns: repeat(4, 1fr); }
  .bot-cards > li { grid-column: span 2; }
  .bot-cards > li:nth-child(4) { grid-column: span 2; }
  .bot-cards > li:nth-child(5) { grid-column: 2 / 4; }
}