/*
  PUBLIC LANDING (redesign PR 6): the signed-out front door. Page-scoped (loaded through
  content_for :head by pages/landing), so only arrangement lives here; the button, stat row, card,
  tier chip and form controls are the cataloged components. No gradients, no illustration: the
  product captures are the imagery. One filled button in the hero (the trial) and one in the closing band
  (components/_closing_band); Sign in is a secondary button in the top bar.
*/

.p-landing-h2 {
  font-size: var(--text-2xl);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

.p-landing-h3 {
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
}

.p-landing-sub {
  max-width: var(--measure-lede);
  margin-top: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--text-base);
}

/* ---------- Hero ---------- */

.p-landing-hero {
  padding-block: var(--space-12) var(--space-10);
  background: var(--color-surface);
}

/* Text left, the product capture right, so the headline, the one action and the product share the
   first screen. The text column is the narrower one: the capture needs width to stay legible. */
.p-landing-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: var(--space-10);
}

.p-landing-hero__text {
  min-width: 0;
}

.p-landing-hero__title {
  margin-top: var(--space-3);
  font-size: var(--text-3xl);
  line-height: var(--leading-tight);
}

.p-landing-hero__lede {
  margin-top: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
}

.p-landing-hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.p-landing-hero__note {
  margin-top: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.p-landing-hero__dev {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
}

/* ---------- Figures (theme-swapped product captures) ---------- */

.p-landing-figure {
  min-width: 0;
}

.p-landing-figure figcaption {
  margin-top: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* ---------- Coverage band ---------- */

.p-landing-band {
  padding-block: var(--space-8);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-sunken);
}

.p-landing-band__head {
  margin-bottom: var(--space-4);
}

/* ---------- Body sections ---------- */

.p-landing-body {
  padding-block: var(--space-12) var(--space-8);
}

.p-landing-section {
  margin-top: var(--space-16);
  scroll-margin-top: calc(var(--topbar-height) + var(--space-4));
}

.p-landing-section__head {
  margin-bottom: var(--space-6);
}

.p-landing-section__head .p-landing-h2 {
  margin-top: var(--space-1);
}

.p-landing-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-8);
}

.p-landing-values > div {
  padding-top: var(--space-4);
  border-top: 2px solid var(--color-border-strong);
}

.p-landing-values p,
.p-landing-steps p {
  margin-top: var(--space-2);
  color: var(--color-text-muted);
}

.p-landing-pillars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.p-landing-pillar .p-landing-h3 {
  margin-top: var(--space-1);
}

.p-landing-pillar p:not(.u-overline) {
  margin-top: var(--space-2);
  color: var(--color-text-muted);
}

.p-landing-answers {
  margin-top: var(--space-4);
  padding: var(--space-3) 0 0 var(--space-4);
  border-top: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: var(--text-md);
}

.p-landing-answers li + li {
  margin-top: var(--space-1-5);
}

.p-landing-figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}

.p-landing-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
  padding: 0;
  list-style: none;
}

.p-landing-steps li {
  /* Media object: the number in a fixed column, top-aligned with the title; text fills the rest. */
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: var(--space-3);
  align-items: start;
  align-content: start;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.p-landing-steps li > :not(.p-landing-steps__num) {
  grid-column: 2;
}

.p-landing-steps li p {
  margin-top: var(--space-1);
}

.p-landing-steps__num {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  grid-row: 1 / span 2;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  color: var(--color-text-strong);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
}

/* The problem statement: one heading and one paragraph in a reading measure, no card. */
.p-landing-problem {
  max-width: var(--measure-lede);
}

.p-landing-problem p {
  margin-top: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
}

.p-landing-values {
  margin-top: var(--space-12);
}

.p-landing-pillar p.p-landing-pillar__link,
.p-landing-pillar p.p-landing-pillar__scope {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
}

.p-landing-checklist__title {
  margin-top: var(--space-8);
}

/* The checklist and the price statement side by side, so neither is a half-width column beside a
   blank half. */
.p-landing-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-8);
  align-items: stretch;
  margin-top: var(--space-8);
}

.p-landing-split .p-landing-checklist__title {
  margin-top: 0;
}

.p-landing-checklist {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding-left: var(--space-5);
  color: var(--color-text-muted);
}

.p-landing-price {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.p-landing-price p {
  margin-top: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
}

/* Two columns of whole questions: a question never splits across the column break. */
.p-landing-faq {
  column-count: 2;
  column-gap: var(--space-10);
}

.p-landing-faq > div {
  break-inside: avoid;
  margin-bottom: var(--space-6);
}

.p-landing-faq p {
  margin-top: var(--space-2);
  color: var(--color-text-muted);
}

/* ---------- Developer sign-in (local only) ---------- */

.p-landing-dev {
  margin-top: var(--space-16);
  scroll-margin-top: calc(var(--topbar-height) + var(--space-4));
}

.p-landing-dev__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 40rem;
}

.p-landing-dev__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--space-4);
}

.p-landing-dev__roles {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: 0;
  border: 0;
}

/* ---------- Tablet and phone ---------- */

@media (max-width: 64rem) {
  .p-landing-hero {
    padding-block: var(--space-10) var(--space-8);
  }

  .p-landing-hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
  }

  .p-landing-values,
  .p-landing-steps,
  .p-landing-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .p-landing-faq {
    column-count: 1;
  }

  .p-landing-section {
    margin-top: var(--space-12);
  }
}

@media (max-width: 48rem) {
  .p-landing-pillars,
  .p-landing-figures {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 40rem) {
  .p-landing-hero {
    padding-block: var(--space-8) var(--space-6);
  }

  .p-landing-hero__title {
    font-size: var(--text-2xl);
  }

  .p-landing-hero__lede {
    font-size: var(--text-base);
  }

  .p-landing-hero__cta .c-button-form,
  .p-landing-hero__cta .c-button {
    width: 100%;
  }
}

/* ---------- Copy buttons on a public page (layouts/_public_copy) ---------- */

/* The layout loads no Stimulus, so a Copy button only exists once the inline script has marked the
   wrapper ready. Without script the command is still there to select by hand. */
[data-public-copy]:not([data-ready]) .c-copy__header .c-button {
  display: none;
}

/* ---------- The agent panel (home page band and /agents hero) ---------- */

/* A card holding the connect command: the heading, one honest sentence, the copy block. */
.p-agents-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.p-agents-panel p {
  color: var(--color-text-muted);
}

.p-agents-panel__note {
  font-size: var(--text-sm);
}

/* The home band: text left, the panel right, equal height, one column on a tablet. */
.p-agents-band__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: stretch;
  gap: var(--space-10);
}

.p-agents-band__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.p-agents-band__text p {
  margin-top: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
}

.p-agents-band__text .p-landing-pillar__link {
  font-size: var(--text-base);
}

/* Sample queries: one figure per prompt, the prompt above its picture, the source below. Self-rendered
   mockups of an MCP app inside Claude, so the picture keeps its own light chrome in either theme. */
.p-agents-samples {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
  align-items: start;
}

.p-agents-sample {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
  margin: 0;
}

.p-agents-sample__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
  margin: 0;
}

.p-agents-sample__query {
  margin: 0;
  color: var(--color-text);
  font-weight: var(--weight-semibold);
}

.p-agents-sample__img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.p-agents-sample__where {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.p-agents-sample__note {
  display: block;
  font-size: var(--text-xs, var(--text-sm));
  font-style: italic;
}

/* Wide layout: each figure is a subgrid of two shared rows (prompt, picture with its caption), so a
   one-line prompt reserves the height of a two-line one and the three pictures start at the same Y,
   while each caption stays directly under its own picture. */
@media (min-width: 64.01rem) {
  .p-agents-samples {
    grid-template-rows: auto auto;
    row-gap: var(--space-3);
    align-items: stretch;
  }

  .p-agents-sample {
    display: grid;
    grid-row: span 2;
    grid-template-rows: subgrid;
  }
}

@media (max-width: 64rem) {
  .p-agents-samples {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The two-up split of the plan section: equal heights, no half-empty card. */
.p-agents-plan {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
  align-items: stretch;
}

/* One panel only (the authenticated command is shown only while connections are open): full width,
   never a lone half-width card beside a blank half. */
.p-agents-plan--single {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 64rem) {
  .p-agents-band__grid,
  .p-agents-plan {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
  }
}

/* A command wraps inside the panel instead of scrolling sideways; the copied text is unchanged. */
.p-agents-panel .c-copy__code,
.p-agents-wrap .c-copy__code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
