/* Team & Workspaces, Agency Sub-Accounts, the pricing Agency tab, and the
   homepage callout that links both. Builds on flagship.css tokens and the
   scale-integrations.css page sections. */

.agency-requirement {
  display: grid;
  align-items: center;
  gap: 18px 28px;
  margin: 0 0 22px;
  padding: 22px 26px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  background: var(--lilac);
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.agency-requirement-badge {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

.agency-requirement strong { display: block; font-size: 19px; letter-spacing: -0.02em; }
.agency-requirement p { margin: 4px 0 0; color: #3a3450; font-size: 15px; line-height: 1.45; }
.agency-requirement .button { white-space: nowrap; }

.agency-tier-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.agency-tier {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.agency-tier--featured { border: 2px solid var(--coral); box-shadow: 0 18px 44px rgba(255, 111, 97, 0.16); }

.agency-tier-flag {
  position: absolute;
  top: -13px;
  left: 24px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.agency-tier small.agency-tier-label {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.agency-tier h3 { margin: 10px 0 4px; font-size: 26px; letter-spacing: -0.04em; }
.agency-tier-price { margin: 14px 0 2px; font-size: clamp(40px, 4.4vw, 56px); font-weight: 640; letter-spacing: -0.06em; line-height: 1; }
.agency-tier-price small { margin-left: 4px; color: var(--muted); font-size: 16px; font-weight: 500; letter-spacing: 0; }
.agency-tier-unit { margin: 8px 0 0; font-size: 15px; font-weight: 620; }
.agency-tier-unit span { color: var(--green); }

.agency-tier ul { display: grid; gap: 10px; margin: 22px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); list-style: none; }
.agency-tier li { position: relative; padding-left: 26px; color: #3f403b; font-size: 15px; line-height: 1.4; }
.agency-tier li::before { position: absolute; top: 1px; left: 0; content: "✓"; color: var(--green); font-weight: 700; }

.agency-price-note { max-width: 70ch; margin: 18px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

.agency-upgrade-path {
  display: grid;
  gap: 24px;
  margin-top: 22px;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--navy);
  color: #fff;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

.agency-upgrade-path h3 { margin: 10px 0 12px; font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.045em; line-height: 1.05; }
.agency-upgrade-path p { margin: 0; color: rgba(255, 255, 255, 0.72); font-size: 16px; line-height: 1.5; }
.agency-upgrade-path .eyebrow { color: rgba(255, 255, 255, 0.72); }
.agency-upgrade-path .eyebrow::before { background: var(--coral); }
.agency-upgrade-path .button-row { margin-top: 20px; }

.upgrade-steps { display: grid; gap: 10px; margin: 0; padding: 0; counter-reset: upgrade-step; list-style: none; }
.upgrade-steps li {
  display: grid;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  counter-increment: upgrade-step;
  font-size: 15px;
  line-height: 1.4;
  grid-template-columns: 32px minmax(0, 1fr);
}

.upgrade-steps li::before {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
  content: counter(upgrade-step);
  font-family: "Geist Mono", monospace;
  font-size: 13px;
  font-weight: 700;
}

.upgrade-steps strong { color: #fff; }
.upgrade-steps--light li { border-color: var(--line); background: #fff; color: var(--ink); }
.upgrade-steps--light strong { color: var(--ink); }

.agency-learn-more { margin: 22px 0 0; text-align: center; font-size: 16px; }
.agency-learn-more a { font-weight: 620; }

/* Feature pages */
.feature-hero-panel {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
}

.feature-hero-panel > small { color: rgba(255, 255, 255, 0.6); font-family: "Geist Mono", monospace; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }

.workspace-mock { display: grid; gap: 10px; margin-top: 16px; }
.workspace-mock-row {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  grid-template-columns: 38px minmax(0, 1fr) auto;
}

.workspace-mock-avatar { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; font-size: 14px; font-weight: 700; }
.workspace-mock-row strong { display: block; font-size: 15px; letter-spacing: -0.02em; }
.workspace-mock-row small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.workspace-mock-tag { padding: 5px 10px; border-radius: 999px; background: var(--soft); font-family: "Geist Mono", monospace; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.workspace-mock-tag--plus { background: var(--lime); }
.workspace-mock-tag--owner { background: var(--ink); color: #fff; }
.workspace-mock-tag--paused { background: var(--pink); }

.role-grid { display: grid; gap: 14px; margin-top: 40px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.role-card { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; }
.role-card:nth-child(1) { background: var(--ink); color: #fff; border-color: var(--ink); }
.role-card small { font-family: "Geist Mono", monospace; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.7; }
.role-card h3 { margin: 30px 0 10px; font-size: 26px; }
.role-card p { margin: 0; font-size: 15px; line-height: 1.45; opacity: 0.8; }
.role-card ul { display: grid; gap: 7px; margin: 16px 0 0; padding: 0; list-style: none; font-size: 14px; }
.role-card li { padding-left: 20px; position: relative; }
.role-card li::before { position: absolute; left: 0; content: "–"; opacity: 0.6; }

.app-chip-groups { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 40px; }
.app-chip-group { padding: 28px; border-radius: var(--radius-md); background: var(--soft); }
.app-chip-group:nth-child(2) { background: var(--cream); }
.app-chip-group h3 { margin: 0 0 6px; font-size: 24px; }
.app-chip-group p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.45; }
.app-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.app-chips li { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 13px; font-weight: 560; }

.feature-faq { padding-top: clamp(40px, 6vw, 80px); }
.feature-faq h2 { max-width: 860px; margin: 0 auto 26px; font-size: clamp(34px, 4vw, 52px); }
.feature-faq .faq-list p { margin: 0 0 22px; color: var(--muted); font-size: 16px; line-height: 1.55; }

/* Homepage callout */
.home-team-agency { padding: clamp(56px, 7vw, 96px) 0; background: var(--navy); color: #fff; }
.home-team-agency-heading { display: grid; align-items: end; gap: 24px; margin-bottom: 36px; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); }
.home-team-agency-heading h2 { max-width: 14ch; margin: 10px 0 0; font-size: clamp(38px, 5vw, 66px); letter-spacing: -0.055em; line-height: 0.98; }
.home-team-agency-heading p { margin: 0; color: rgba(255, 255, 255, 0.72); font-size: 18px; line-height: 1.5; }
.home-team-agency .eyebrow { color: rgba(255, 255, 255, 0.72); }
.home-team-agency .eyebrow::before { background: var(--coral); }

.home-team-agency-grid,
.feature-cross-link { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.home-team-agency-card {
  display: flex;
  flex-direction: column;
  min-height: 330px;
  padding: clamp(26px, 3.4vw, 40px);
  border-radius: var(--radius-lg);
  color: var(--ink);
  text-decoration: none;
  transition: transform 180ms var(--ease-out), box-shadow 180ms ease;
}

.home-team-agency-card:hover { box-shadow: 0 20px 44px rgba(0, 0, 0, 0.24); transform: translateY(-3px); }
.home-team-agency-card--team { background: var(--lime); }
.home-team-agency-card--agency { background: var(--lilac); }
.home-team-agency-card small { font-family: "Geist Mono", monospace; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }
.home-team-agency-card h3 { max-width: 16ch; margin: 18px 0 12px; font-size: clamp(28px, 3vw, 40px); letter-spacing: -0.05em; line-height: 1; }
.home-team-agency-card p { max-width: 44ch; margin: 0; color: #3f403b; font-size: 16px; line-height: 1.5; }
.home-team-agency-card ul { display: grid; gap: 7px; margin: 20px 0 0; padding: 0; list-style: none; font-size: 14px; font-weight: 560; }
.home-team-agency-card li::before { content: "✓ "; color: var(--green); }
.home-team-agency-card em { margin-top: auto; padding-top: 24px; font-style: normal; font-weight: 640; }

@media (max-width: 900px) {
  .agency-tier-grid, .role-grid { grid-template-columns: 1fr; }
  .agency-upgrade-path, .home-team-agency-heading { grid-template-columns: 1fr; }
  .agency-requirement { grid-template-columns: auto minmax(0, 1fr); }
  .agency-requirement .button { grid-column: 1 / -1; justify-self: start; }
  .agency-tier--featured { order: -1; }
}

@media (max-width: 700px) {
  .app-chip-groups, .home-team-agency-grid, .feature-cross-link { grid-template-columns: 1fr; }
  .home-team-agency-card { min-height: 0; }
  .agency-requirement { grid-template-columns: 1fr; padding: 20px; }
  .agency-requirement-badge { display: none; }
  .agency-requirement .button { width: 100%; justify-content: center; white-space: normal; }
}

.owner-only-list li { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 15px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 12px; font-size: 14px; }
.owner-only-list li span:last-child { color: var(--lime); font-weight: 700; }

.pricing-simple-agency-head { max-width: 760px; margin: 0 auto 34px; text-align: center; }
.pricing-simple-agency-head h2 { margin: 14px 0 12px; font-size: clamp(38px, 5vw, 64px); letter-spacing: -0.055em; line-height: 0.98; }
.pricing-simple-agency-head p { margin: 0; color: var(--muted); font-size: clamp(16px, 1.8vw, 19px); line-height: 1.5; }
