:root {
  --ink: #20223a;
  --muted: #5b637d;
  --paper: #fff8ef;
  --cream: #fffdf7;
  --sky: #93d2ff;
  --blue: #2274c7;
  --green: #16996f;
  --pink: #f35d83;
  --purple: #7357d7;
  --line: #1e2238;
  --border: 3px solid var(--line);
  --shadow: 6px 6px 0 #1e2238;
  --font-large: clamp(30px, 5vw, 54px);
  --font-base: 18px;
  --font-small: 13px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(#82c5f8 0 520px, #bfe5ff 820px, #fffaf1 1280px, #fbf8ec 100%);
  font-family: "Courier New", "Lucida Console", monospace;
  font-size: var(--font-base);
  line-height: 1.65;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: 150px;
  height: 52px;
  background:
    linear-gradient(#fff 0 0) 24px 18px / 42px 22px no-repeat,
    linear-gradient(#fff 0 0) 58px 8px / 56px 32px no-repeat,
    linear-gradient(#fff 0 0) 100px 24px / 34px 16px no-repeat;
  opacity: .72;
  image-rendering: pixelated;
}

body::before {
  top: 84px;
  left: 5vw;
}

body::after {
  top: 130px;
  right: 7vw;
  transform: scale(.82);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
summary,
.btn,
.flow-cue,
.option-grid label {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

img {
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2 {
  font-size: var(--font-large);
  line-height: 1.12;
  letter-spacing: 0;
}

h3,
summary,
.brand,
.btn,
.comment-card strong,
legend {
  font-size: var(--font-base);
  line-height: 1.35;
}

.fine-print,
.eyebrow,
.top-nav,
.faq p,
.site-footer,
.field span,
.option-grid label,
input {
  font-size: var(--font-small);
}

.section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 84px 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 28px));
  margin: 14px auto 0;
  padding: 10px 14px;
  background: rgba(255, 253, 247, .9);
  border: var(--border);
  box-shadow: 4px 4px 0 var(--line);
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
}

.brand img {
  width: 32px;
  height: 32px;
  display: block;
  border: 0;
  box-shadow: none;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 700;
}

.top-nav a:hover,
.site-footer a:hover {
  color: var(--blue);
}

.hero {
  display: grid;
  min-height: auto;
  padding-top: 50px;
  padding-bottom: 56px;
  text-align: center;
}

.hero-copy {
  display: grid;
  gap: 22px;
  justify-items: center;
  max-width: 900px;
  margin: 0 auto;
}

.eyebrow {
  width: fit-content;
  padding: 5px 9px;
  color: var(--blue);
  background: #ffffffa8;
  border: 3px solid currentColor;
  box-shadow: 3px 3px 0 currentColor;
  font-weight: 900;
}

.lead {
  color: var(--muted);
  max-width: 820px;
}

.hero-actions,
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 18px;
  border: var(--border);
  box-shadow: 4px 4px 0 var(--line);
  font-weight: 900;
  cursor: pointer;
}

.btn.primary {
  color: #fff;
  background: var(--purple);
}

.btn.secondary {
  background: var(--paper);
}

.btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--line);
}

.value-strip {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 22px;
  color: #fff;
  background: var(--green);
  border: var(--border);
  box-shadow: var(--shadow);
  font-weight: 900;
  text-align: center;
}

.section-heading {
  display: grid;
  gap: 16px;
  margin-bottom: 38px;
}

.mode-row {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  margin-top: 34px;
}

.mode-row.cocreate {
  grid-template-columns: minmax(0, 1fr) minmax(0, .82fr);
}

.comment-card,
.signup-form,
.faq details,
.install {
  background: var(--cream);
  border: var(--border);
  box-shadow: var(--shadow);
}

.comment-card {
  padding: 18px;
}

.team-card {
  overflow: hidden;
}

.review .comment-card {
  color: #4930b7;
  background: #f5f1ff;
}

.cocreate .comment-card {
  color: #0f7d61;
  background: #effbf5;
}

.fan .comment-card {
  color: #d92f63;
  background: #fff1f5;
}

.card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.card-top img {
  width: 56px;
  height: 56px;
}

.team-stage {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 172px;
  margin: 4px 0 14px;
  padding: 12px 10px 4px;
}

.ai-poster {
  position: relative;
  width: min(100%, 260px);
  min-height: 92px;
  padding: 12px;
  color: var(--ink);
  background: #fffdf7;
  border: var(--border);
  box-shadow: 4px 4px 0 currentColor;
}

.ai-poster span {
  display: block;
  margin-bottom: 10px;
  font-weight: 900;
}

.ai-poster i {
  display: block;
  height: 8px;
  margin-top: 8px;
  background: currentColor;
  opacity: .22;
}

.ai-poster i:nth-child(3) {
  width: 76%;
}

.ai-poster i:nth-child(4) {
  width: 54%;
}

.team-actors {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 18px;
  min-height: 58px;
  width: 100%;
}

.team-actors .agent {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.review-card .agent-a {
  animation: reviewNod 2.6s ease-in-out infinite;
}

.review-card .agent-b {
  animation: reviewNod 2.6s ease-in-out .35s infinite;
}

.cocreate-card .ai-poster::before,
.cocreate-card .ai-poster::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 24px;
  background: #fff1a9;
  border: var(--border);
  box-shadow: 2px 2px 0 currentColor;
  animation: notePulse 2.8s ease-in-out infinite;
}

.cocreate-card .ai-poster::before {
  right: -14px;
  top: 12px;
}

.cocreate-card .ai-poster::after {
  left: -14px;
  bottom: 14px;
  animation-delay: .6s;
}

.cocreate-card .agent-a {
  animation: createLean 2.5s ease-in-out infinite;
}

.cocreate-card .agent-b {
  animation: createLean 2.5s ease-in-out .35s infinite reverse;
}

.stage-note,
.heart {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  background: #fff;
  border: var(--border);
  font-weight: 900;
  line-height: 1;
}

.note-left {
  left: 18%;
  top: -8px;
  animation: noteFloat 2.6s ease-in-out infinite;
}

.note-right {
  right: 18%;
  top: -4px;
  animation: noteFloat 2.6s ease-in-out .5s infinite;
}

.fan-card .agent-a {
  animation: fanBounce 1.1s ease-in-out infinite;
}

.fan-card .agent-b {
  animation: fanBounce 1.1s ease-in-out .2s infinite;
}

.heart {
  width: auto;
  height: auto;
  color: var(--pink);
  background: transparent;
  border: 0;
  text-shadow: 2px 2px 0 #fff;
  animation: heartRise 2.3s ease-in-out infinite;
}

.heart-a {
  left: 20%;
  bottom: 36px;
}

.heart-b {
  left: 52%;
  bottom: 44px;
  animation-delay: .45s;
}

.heart-c {
  right: 20%;
  bottom: 34px;
  animation-delay: .9s;
}

.mode-copy {
  display: grid;
  gap: 12px;
  padding: 8px 0;
}

.mode-copy h3 {
  color: var(--ink);
}

.mode-copy p,
.faq p,
.fine-print {
  color: var(--muted);
}

.flow-demo {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr);
  gap: 24px;
  align-items: center;
}

.plugin-mock {
  position: relative;
  display: grid;
  gap: 10px;
}

.mock-cursor {
  position: absolute;
  z-index: 5;
  width: 0;
  height: 0;
  border-left: 13px solid var(--ink);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  filter: drop-shadow(2px 2px 0 #fff);
  transform: rotate(18deg);
  transition: top .35s ease, left .35s ease;
  animation: cursorTap 1.4s ease-in-out infinite;
}

.mock-answer {
  display: grid;
  gap: 10px;
  padding: 18px;
  background: var(--cream);
  border: var(--border);
  box-shadow: var(--shadow);
}

.mock-answer-head {
  color: var(--green);
  font-weight: 900;
}

.mock-answer p {
  color: var(--muted);
}

.mock-answer button {
  justify-self: center;
  min-height: 42px;
  padding: 8px 18px;
  color: #fff;
  background: var(--purple);
  border: var(--border);
  box-shadow: 4px 4px 0 var(--line);
  font: inherit;
  font-weight: 900;
}

.mock-team-picker {
  display: flex;
  justify-self: center;
  gap: 4px;
  padding: 2px;
  background: rgba(32, 34, 58, .04);
  border: 1px solid rgba(32, 34, 58, .18);
  border-radius: 8px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .25s ease, transform .25s ease;
}

.mock-team-picker span {
  padding: 2px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: var(--font-small);
  opacity: .65;
}

.mock-team-picker .active {
  opacity: 1;
  background: rgba(32, 34, 58, .1);
  border-color: rgba(32, 34, 58, .22);
  font-weight: 900;
}

.mock-comments {
  overflow: hidden;
  background: rgba(255, 253, 247, .72);
  border: var(--border);
  box-shadow: var(--shadow);
  opacity: 1;
  transform: translateY(0);
  transition: opacity .3s ease, transform .3s ease, max-height .35s ease;
}

.mock-mode-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(32, 34, 58, .14);
}

.mock-mode-bar > div:first-child {
  flex: 1;
  min-width: 0;
}

.mock-mode-bar strong,
.mock-mode-bar span,
.mock-avatar span,
.mock-comment-body p,
.mock-comment-body button,
.mock-action-row button,
.flow-cue {
  font-size: var(--font-small);
}

.mock-mode-bar strong {
  display: block;
}

.mock-mode-bar > div:first-child span {
  display: block;
  color: var(--muted);
}

.mock-pills {
  display: flex;
  gap: 4px;
  padding: 2px;
  background: rgba(32, 34, 58, .04);
  border: 1px solid rgba(32, 34, 58, .18);
  border-radius: 8px;
}

.mock-pills span {
  padding: 2px 8px;
  opacity: .62;
  border: 1px solid transparent;
  border-radius: 6px;
}

.mock-pills .active {
  opacity: 1;
  background: rgba(32, 34, 58, .1);
  border-color: rgba(32, 34, 58, .22);
  font-weight: 900;
}

.mock-comment-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(32, 34, 58, .12);
}

.mock-extra-row {
  display: none;
}

.plugin-mock[data-step="3"] .mock-extra-row,
.plugin-mock[data-step="4"] .mock-extra-row {
  display: flex;
}

.mock-avatar {
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 56px;
  flex: 0 0 auto;
  color: var(--muted);
}

.mock-avatar img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  animation: fanBounce 2.8s ease-in-out infinite;
}

.mock-comment-row:nth-child(3) .mock-avatar img {
  animation-delay: -.9s;
}

.mock-comment-body {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.mock-comment-body p {
  color: var(--ink);
}

.mock-comment-body button,
.mock-action-row button {
  margin-top: 6px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  opacity: .58;
  font-family: inherit;
  cursor: pointer;
}

.mock-action-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
}

.mock-action-row button:first-child {
  padding: 3px 9px;
  border: 1px solid rgba(32, 34, 58, .22);
  border-radius: 6px;
  opacity: .78;
  font-weight: 900;
}

.mock-input {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  background: #fff;
  border: var(--border);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .3s ease, transform .3s ease, max-height .35s ease;
}

.mock-input span {
  color: var(--green);
  font-size: var(--font-small);
  font-weight: 900;
}

.mock-input p {
  min-height: 28px;
  color: var(--ink);
  font-size: var(--font-small);
}

.plugin-mock[data-step="1"] .mock-comments,
.plugin-mock[data-step="1"] .mock-input {
  max-height: 0;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.plugin-mock[data-step="1"] .mock-team-picker {
  opacity: 1;
  transform: translateY(0);
}

.plugin-mock[data-step="1"] .mock-cursor {
  top: 118px;
  left: 55%;
}

.plugin-mock[data-step="2"] .mock-cursor {
  top: 235px;
  left: 50%;
}

.plugin-mock[data-step="3"] .mock-cursor {
  top: 390px;
  left: 22%;
}

.plugin-mock[data-step="4"] .mock-cursor {
  top: 300px;
  left: 78%;
}

.plugin-mock[data-step="3"] .mock-pills span:nth-child(2) {
  opacity: 1;
  background: rgba(32, 34, 58, .1);
  border-color: rgba(32, 34, 58, .22);
  font-weight: 900;
}

.plugin-mock[data-step="3"] .mock-pills .active {
  opacity: .62;
  background: transparent;
  border-color: transparent;
}

.plugin-mock[data-step="3"] .mock-action-row button:first-child,
.plugin-mock[data-step="4"] .mock-comment-row:first-of-type .mock-comment-body button {
  opacity: 1;
  animation: actionPulse 1.2s ease-in-out infinite;
}

.plugin-mock[data-step="4"] .mock-input {
  max-height: 120px;
  opacity: 1;
  transform: translateY(0);
}

.flow-cues {
  display: grid;
  gap: 12px;
}

.flow-cue {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
  padding: 14px;
  background: var(--cream);
  border: var(--border);
  box-shadow: 4px 4px 0 var(--line);
  color: var(--muted);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.flow-cue:hover,
.flow-cue.active {
  background: #fff;
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--line);
}

.flow-cues span,
.flow-cue span {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  grid-row: 1 / span 2;
  flex: 0 0 auto;
  color: #fff;
  background: var(--blue);
  border: var(--border);
  font-weight: 900;
}

.flow-cue strong,
.flow-cue em {
  display: block;
  font-style: normal;
}

.flow-cue strong {
  color: var(--ink);
}

.flow-cue em {
  color: var(--muted);
  line-height: 1.45;
}

.install {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 32px;
}

.install div {
  display: grid;
  gap: 14px;
}

.signup-form {
  display: grid;
  gap: 24px;
  padding: 24px;
}

.field {
  display: grid;
  gap: 8px;
  font-weight: 900;
}

input[type="email"],
.other-option input[type="text"] {
  min-height: 44px;
  width: 100%;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  border: var(--border);
  font-family: inherit;
}

fieldset {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  padding: 0;
  font-weight: 900;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.option-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 10px;
  background: #fff;
  border: 3px solid #c6d3e6;
  cursor: pointer;
}

.option-grid label:has(input:checked) {
  border-color: var(--green);
  box-shadow: 3px 3px 0 var(--green);
}

input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.other-option {
  grid-column: 1 / -1;
}

.other-option input[type="text"] {
  flex: 1;
  min-height: 34px;
  border-color: #c6d3e6;
}

.form-success {
  color: var(--green);
  font-weight: 900;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq details {
  padding: 18px;
}

.faq summary {
  font-weight: 900;
  cursor: pointer;
}

.faq p {
  margin-top: 10px;
}

.site-footer {
  display: grid;
  gap: 18px;
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto 28px;
  padding: 24px;
  color: var(--ink);
  background: var(--cream);
  border: var(--border);
  box-shadow: 4px 4px 0 var(--line);
}

.site-footer strong {
  font-size: var(--font-base);
}

.legal-page {
  display: grid;
  gap: 24px;
  max-width: 900px;
}

.legal-page article {
  display: grid;
  gap: 10px;
  padding: 22px;
  background: var(--cream);
  border: var(--border);
  box-shadow: 4px 4px 0 var(--line);
}

.legal-page h2 {
  font-size: var(--font-base);
}

.legal-page a {
  color: var(--blue);
  font-weight: 900;
}

@keyframes reviewNod {
  0%, 100% {
    transform: translateY(0);
  }
  45% {
    transform: translateY(4px);
  }
}

@keyframes notePulse {
  0%, 100% {
    transform: rotate(-2deg) scale(1);
  }
  50% {
    transform: rotate(2deg) scale(1.06);
  }
}

@keyframes noteFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes createLean {
  0%, 100% {
    transform: translateX(0) rotate(0deg);
  }
  50% {
    transform: translateX(4px) rotate(2deg);
  }
}

@keyframes fanBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes heartRise {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(.8);
  }
  25%, 70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-34px) scale(1.2);
  }
}

@keyframes cursorTap {
  0%, 100% {
    transform: rotate(18deg) translate(0, 0);
  }
  50% {
    transform: rotate(18deg) translate(3px, 3px);
  }
}

@keyframes actionPulse {
  0%, 100% {
    filter: none;
  }
  50% {
    filter: drop-shadow(0 0 5px rgba(115, 87, 215, .45));
  }
}

@media (max-width: 980px) {
  .install {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .section {
    padding: 58px 0;
  }

  .hero {
    min-height: auto;
    padding-top: 36px;
  }

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

  .comment-card,
  .flow-cue,
  .signup-form,
  .faq details,
  .install {
    box-shadow: 4px 4px 0 var(--line);
  }

  .mock-mode-bar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .mock-pills {
    display: none;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 44px 0;
  }

  .hero {
    padding-top: 24px;
    padding-bottom: 40px;
  }

  .hero-actions {
    width: 100%;
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .section-heading {
    margin-bottom: 24px;
  }

  /* Agent Teams: tighten card and shrink images */
  .mode-row {
    gap: 12px;
  }

  .comment-card {
    padding: 12px;
  }

  .card-top img {
    width: 40px;
    height: 40px;
  }

  .team-stage {
    min-height: 120px;
  }

  .team-actors .agent {
    width: 40px;
    height: 40px;
  }

  /* How It Works: shrink flow-cues to a numbered strip */
  .flow-demo {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 10px;
  }

  .flow-cues {
    gap: 6px;
  }

  .flow-cue {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
  }

  .flow-cue span {
    grid-row: auto;
    width: 22px;
    height: 22px;
    font-size: 11px;
  }

  .flow-cue strong,
  .flow-cue em {
    display: none;
  }

  .signup-form {
    padding: 16px;
  }

  .mock-comment-row {
    gap: 8px;
    margin: 0 10px;
  }

  .mock-avatar {
    width: 44px;
  }

  .mock-avatar img {
    width: 32px;
    height: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
