/* ==========================================================================
   Section rhythm: agent (dark), nodes (light), editors (light),
   models (dark), workflows (dark), outro.
   ========================================================================== */

.section {
  margin-top: 120px;
}

.section__head {
  margin-bottom: 52px;
}

.section__head .lead {
  margin-top: 18px;
}

.section__head.center {
  text-align: center;
}

.section__head.center .lead {
  margin-inline: auto;
}

.section__head.center .eyebrow {
  margin-bottom: 16px;
  display: block;
  justify-content: center;
}

/* --- design agent -------------------------------------------------------- */

.section--agent {
  background: var(--paper-2);
  margin-top: 0;
  padding-block: 140px 120px;
}

.agent__grid {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 72px;
  align-items: center;
}

.agent__copy .display--md {
  margin-top: 20px;
}

.agent__copy .lead {
  margin-top: 20px;
  color: var(--text-dim);
}

.agent__feats {
  margin-top: 44px;
}

.agent__feats li {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.agent__feats li:last-child {
  border-bottom: 1px solid var(--line);
}

.agent__feats h3 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.agent__feats p {
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.65;
}

/* --- node graph (light) ---------------------------------------------------- */

.nodes__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 56px;
  align-items: center;
}

.nodes__matrix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Mini node card: mirrors the product's node styling (dark card, mono
   uppercase label, hairline header, mint/blue port dots). */
.ncard {
  padding: 16px 16px 14px;
  border-radius: var(--radius-2xl);
  background: #14141c;
  color: var(--dark-text);
  box-shadow: 0 16px 32px -16px rgba(20, 20, 40, 0.35);
}

.ncard__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.ncard__label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dark-dim);
}

.ncard__ports {
  display: inline-flex;
  gap: 5px;
}

/* Port colours match the product canvas (image mint, text blue). */
.ncard__port {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid #b2ffd6;
}

.ncard__port--text {
  border-color: #b2ccff;
}

.ncard p {
  color: var(--dark-faint);
  font-size: 12px;
  line-height: 1.55;
}

/* --- editors: secondary batch shot ------------------------------------------ */

.editors__secondary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 56px;
  align-items: center;
  max-width: 1000px;
  margin: 80px auto 0;
}

.editors__batch-copy h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.editors__batch-copy p {
  margin-top: 12px;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.7;
}

/* --- models wall (dark) -------------------------------------------------- */

.section--models {
  background: var(--dark);
  color: var(--dark-text);
  margin-top: 0;
  padding-block: 140px 120px;
}

.models__grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 80px;
  align-items: start;
}

.models__head {
  position: sticky;
  top: 80px; /* clear the nav bar */
}

.models__head .eyebrow {
  color: var(--mint-dark);
}

.models__head .eyebrow::before {
  background: var(--mint-dark);
}

.models__head .display--md {
  margin-top: 20px;
}

.models__head .lead {
  margin-top: 20px;
  color: var(--dark-dim);
}

.models__stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  align-items: center;
}

.models__list {
  display: flex;
  flex-direction: column;
}

.models-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 20px;
  align-items: center;
  padding: 24px 8px;
  border-top: 1px solid var(--dark-line);
  cursor: pointer;
  transition: padding-left 0.3s var(--ease);
}

.models-item:last-child {
  border-bottom: 1px solid var(--dark-line);
}

.models-item:hover,
.models-item.is-active {
  padding-left: 16px;
}

.models-item__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark-dim);
  transition: color 0.3s var(--ease);
}

.models-item.is-active .models-item__icon {
  color: var(--mint-dark);
}

.models-item__icon svg {
  width: 30px;
  height: 30px;
}

.models-item__name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  transition: color 0.3s var(--ease);
}

.models-item.is-active .models-item__name {
  color: var(--mint-dark);
}

.models-item__desc {
  margin-top: 4px;
  color: var(--dark-dim);
  font-size: 13px;
  line-height: 1.65;
}

/* Preview: active model's output image */
.models__preview {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--dark-2);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.7);
}

.models__preview::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--dark-line);
  border-radius: inherit;
  pointer-events: none;
}

.models__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition:
    opacity 0.5s var(--ease),
    transform 0.5s var(--ease);
}

.models__preview img.is-visible {
  opacity: 1;
  transform: none;
}

/* --- professional tools (light) ------------------------------------------- */

.tools__stage {
  max-width: 1000px;
  margin-inline: auto;
}

/* Tool chips: a plain wrapped row below the stage shot, never overlaid. */

.tool-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.tool-chip {
  padding: 8px 14px;
  border-radius: var(--radius-lg);
  background: var(--paper);
  border: 1px solid var(--line-mid);
  box-shadow:
    0 1px 0 rgba(20, 20, 40, 0.04),
    0 8px 24px -8px rgba(20, 20, 40, 0.2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink-2);
  cursor: default;
  white-space: nowrap;
  transition:
    background-color 0.2s var(--ease),
    color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.tool-chip:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -8px rgba(20, 20, 40, 0.3);
}

/* --- workflows / gallery (dark) ------------------------------------------- */

.section--gallery {
  background: var(--dark);
  color: var(--dark-text);
  margin-top: 0;
  padding-block: 140px 110px;
}

.section--gallery .section__head .lead {
  color: var(--dark-dim);
}

/* Waterfall masonry grid */
.gallery {
  column-count: 4;
  column-gap: 16px;
}

.tile {
  position: relative;
  display: block;
  margin-bottom: 16px;
  break-inside: avoid;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  background: var(--dark-2);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: border-color 0.25s var(--ease);
}

.tile:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.tile img {
  width: 100%;
  height: auto;
  transition:
    transform 0.6s var(--ease),
    filter 0.6s var(--ease);
}

.tile:hover img {
  transform: scale(1.04);
}

.tile__overlay {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 36px 14px 14px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.88) 10%,
    rgba(0, 0, 0, 0.4) 60%,
    transparent
  );
  color: var(--paper);
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.tile:hover .tile__overlay,
.tile:focus-within .tile__overlay {
  opacity: 1;
  transform: translateY(0);
}

.tile__name {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.4;
}

.tile__action {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--mint);
  transition:
    color 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.tile__action:hover {
  color: var(--mint-hover);
  transform: translateX(2px);
}

@media (hover: none) {
  .tile__overlay {
    opacity: 1;
    transform: none;
  }
}

.gallery__note {
  margin-top: 36px;
  color: var(--dark-faint);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-align: center;
}

.gallery__viewall {
  margin-top: 28px;
  text-align: center;
}

.gallery__viewall a {
  display: inline-block;
  padding: 10px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--dark-line);
  color: var(--dark-text);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition:
    border-color 0.2s var(--ease),
    background-color 0.2s var(--ease),
    color 0.2s var(--ease);
}

.gallery__viewall a:hover {
  border-color: var(--mint-dark);
  background: var(--mint-dark);
  color: var(--dark);
}

@media (max-width: 720px) {
  .gallery__viewall {
    text-align: left;
  }
}

/* --- closing outro: full-bleed dark band ---------------------------------- */

.section--outro {
  margin-top: 0;
  background: var(--dark);
  color: var(--dark-text);
  padding-block: 140px 72px;
}

.outro {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
}

/* "Start creating" italic accent: now in Inter italic */
.outro__serif {
  font-family: var(--font);
  font-style: italic;
  font-size: clamp(1.1rem, 2.4vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--mint-dark);
}

.outro .display--sm {
  margin-top: 16px;
  color: var(--dark-text);
}

.outro__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

/* Outro primary: mint filled, Adobe-style highlight CTA */
.outro .btn--primary {
  background: var(--mint-dark);
  color: var(--dark);
  box-shadow: 0 4px 24px rgba(0, 201, 112, 0.25);
}

.outro .btn--primary:hover {
  background: var(--mint);
  color: var(--ink);
  box-shadow: 0 8px 32px rgba(0, 201, 112, 0.35);
}

.outro .btn--quiet {
  border-color: var(--dark-line);
  color: var(--dark-text);
}

.outro .btn--quiet:hover {
  border-color: var(--dark-text);
  background: rgba(255, 255, 255, 0.06);
  color: var(--dark-text);
}

.outro__note {
  margin-top: 24px;
  color: var(--dark-faint);
  font-size: 12px;
}

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

@media (max-width: 1000px) {
  .agent__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .nodes__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .editors__secondary {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-top: 56px;
  }

  .models__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .models__head {
    position: static;
  }

  .models__stage {
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 32px;
  }

  .gallery {
    column-count: 3;
  }

  .tool-chip {
    display: none;
  }
}

@media (max-width: 720px) {
  .section {
    margin-top: 80px;
  }

  .section--agent,
  .section--models,
  .section--gallery {
    margin-top: 0;
    padding-block: 96px 80px;
  }

  .nodes__matrix {
    grid-template-columns: 1fr;
  }

  .models__stage {
    grid-template-columns: 1fr;
  }

  .models__preview {
    order: -1;
    aspect-ratio: 16 / 10;
  }

  .gallery {
    column-count: 2;
    column-gap: 10px;
  }

  .tile {
    margin-bottom: 10px;
  }

  .section--outro {
    padding-block: 96px 56px;
  }

  .gallery__note {
    text-align: left;
  }

  .models-item {
    grid-template-columns: 44px 1fr;
    gap: 16px;
    padding: 20px 0;
  }

  .models-item__icon {
    width: 44px;
    height: 44px;
  }

  .models-item__icon svg {
    width: 24px;
    height: 24px;
  }
}
