/* ==========================================================================
   Agencies page
   Built from the home page materials: hero kicker, display type, bento,
   console frame, CLI, stats, quote, and final CTA. This file only adds
   the portfolio-specific layouts.
   ========================================================================== */

.page-hero {
  position: relative;
  padding: calc(var(--nav-h) + clamp(48px, 7vw, 92px)) 0 clamp(24px, 4vw, 48px);
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 58% 42% at 50% 0%, rgba(124, 58, 237, 0.28), transparent 68%),
    radial-gradient(ellipse 36% 28% at 82% 18%, rgba(59, 130, 246, 0.14), transparent 70%);
  pointer-events: none;
}

.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 20%, transparent 75%);
  pointer-events: none;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero .section-head {
  margin-bottom: 0;
}

.page-hero .h-display {
  max-width: 11em;
}

/* The home hero animates these in on a long delay meant for the scroll story. */
.page-hero .hero-kicker,
.page-hero .hero-actions,
.page-hero .hero-note {
  animation: none;
}

.page-hero .hero-actions {
  margin-top: 28px;
}

.cms-strip.is-plain {
  margin-top: 22px;
  padding-top: 0;
  border-top: 0;
  justify-content: center;
}

.page-hero .console-wrap {
  margin-top: clamp(40px, 6vw, 72px);
}

/* ----- Portfolio console ----- */
.agency-console .cs-top,
.agency-console .cs-selectors,
.agency-console .cs-actions {
  min-width: 0;
}

.agency-console .cs-selectors {
  flex: 1;
}

.agency-console .cs-pill {
  min-width: 0;
}

.agency-console #agencySiteUrl {
  overflow: hidden;
  text-overflow: ellipsis;
}

.agency-avatars {
  display: flex;
  margin-right: 4px;
}

.agency-avatars i {
  width: 26px;
  height: 26px;
  margin-left: -7px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid #090d19;
  background: var(--grad);
  font-style: normal;
  font-size: 0.58rem;
  font-weight: 600;
  color: #fff;
}

.agency-avatars i:first-child {
  margin-left: 0;
}

.agency-avatars i:nth-child(2) {
  background: linear-gradient(135deg, #38bdf8, #6366f1);
}

.agency-avatars i:nth-child(3) {
  background: linear-gradient(135deg, #34d399, #0ea5e9);
}

.agency-avatars .more {
  background: #1c2436;
  color: var(--text-2);
}

.agency-body {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 520px;
}

.agency-side,
.agency-main,
.agency-sites,
.agency-tiles,
.agency-tile,
.act-row {
  min-width: 0;
}

.agency-side {
  border-right: 1px solid var(--line);
  background: rgba(4, 6, 12, 0.35);
  padding-bottom: 12px;
}

.agency-side-label {
  padding: 16px 16px 8px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.agency-sites {
  display: grid;
  gap: 2px;
  padding: 0 8px;
}

.agency-site {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-align: left;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.agency-site b {
  margin-left: auto;
  color: var(--text-3);
  font-weight: 500;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.agency-site:hover {
  background: rgba(255, 255, 255, 0.04);
}

.agency-site.on {
  border-color: rgba(139, 92, 246, 0.32);
  background: rgba(139, 92, 246, 0.1);
}

.agency-main {
  padding: 18px;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(59, 130, 246, 0.08), transparent 60%);
}

.agency-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.agency-toolbar h3 {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.agency-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--green-300);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}

.agency-status.is-draft {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.1);
  color: var(--amber-300);
}

.agency-status.is-draft .dot {
  background: var(--amber);
  box-shadow: none;
}

.agency-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.agency-tile {
  display: flex;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.028);
}

.agency-tile .icon-wrap {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.14);
  color: var(--violet-300);
}

.agency-tile .icon-wrap .icon {
  width: 16px;
  height: 16px;
}

.agency-tile .ttl {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.agency-tile .meta {
  margin-top: 2px;
  color: var(--text-3);
  font-size: 0.78rem;
  line-height: 1.4;
}

.agency-activity {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(4, 6, 12, 0.28);
  overflow: hidden;
}

.agency-activity h4 {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.act-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  color: var(--text-2);
  font-size: 0.88rem;
}

.act-row:first-of-type {
  border-top: 0;
}

.act-row strong {
  color: var(--text);
  font-weight: 600;
}

.act-row .ago {
  margin-left: auto;
  color: var(--text-3);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.avatar {
  width: 26px;
  height: 26px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 600;
}

.avatar.a2 { background: linear-gradient(135deg, #38bdf8, #6366f1); }
.avatar.a3 { background: linear-gradient(135deg, #f59e0b, #ef4444); }

/* ----- Comparison, capabilities, process ----- */
.band {
  background:
    radial-gradient(ellipse 46% 32% at 12% 0%, rgba(139, 92, 246, 0.12), transparent 70%),
    linear-gradient(180deg, var(--ink-0), var(--ink-1) 42%, var(--ink-0));
}

.bento-card.is-flat,
.bento-card.is-cap {
  min-height: 0;
}

.bento-card.is-flat {
  grid-column: span 6;
}

.bento-card.is-cap {
  grid-column: span 4;
  gap: 14px;
}

.bento-card.is-cap h3 {
  font-size: 1.22rem;
}

.bento-card.b-pain {
  background:
    radial-gradient(ellipse 80% 55% at 0% 0%, rgba(248, 113, 113, 0.09), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
}

.bento-card.b-gain {
  background:
    radial-gradient(ellipse 80% 55% at 100% 0%, rgba(16, 185, 129, 0.1), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
}

.split-list {
  list-style: none;
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.split-list li {
  display: flex;
  gap: 12px;
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.5;
}

.split-icon {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.split-icon .icon {
  width: 15px;
  height: 15px;
}

.b-pain .split-icon { color: #fca5a5; }
.b-gain .split-icon { color: var(--green-300); }

.cap-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.12);
  color: var(--violet-300);
}

.cap-icon .icon {
  width: 18px;
  height: 18px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-2);
  font-size: 0.8rem;
}

.chip .icon {
  width: 13px;
  height: 13px;
  color: var(--violet-300);
}

.step-num {
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  color: var(--violet-300);
}

/* ----- Pricing table ----- */
.price-table {
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
  overflow: hidden;
}

.price-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.15fr;
  gap: 16px;
  align-items: center;
  padding: 18px 24px;
  border-top: 1px solid var(--line);
}

.price-row:first-child {
  border-top: 0;
  padding-top: 16px;
  padding-bottom: 16px;
  background: rgba(255, 255, 255, 0.025);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.price-row:first-child .is-us {
  color: var(--violet-300);
}

.price-label {
  font-weight: 500;
  letter-spacing: -0.015em;
}

.price-row:first-child span:nth-child(n + 2) {
  text-align: right;
}

.price-other,
.price-us {
  text-align: right;
}

.price-other.is-bad {
  color: #fca5a5;
}

.price-other {
  color: var(--text-3);
}

.price-us {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--green-300);
  font-weight: 600;
}

.price-us .icon {
  width: 15px;
  height: 15px;
}

.fine-print {
  margin-top: 18px;
  text-align: center;
  color: var(--text-3);
  font-size: 0.85rem;
  line-height: 1.5;
}

.fine-print a {
  color: var(--text-2);
}

.fine-print a:hover {
  color: var(--violet-300);
}

/* ----- Quote ----- */
.quote-feature {
  max-width: 820px;
}

.quote-feature .quote {
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1.45;
}

/* ----- Responsive ----- */
@media (max-width: 1000px) {
  .bento-card.is-cap { grid-column: span 6; }
}

@media (max-width: 860px) {
  .agency-body { grid-template-columns: minmax(0, 1fr); }
  .agency-side {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .agency-sites {
    display: flex;
    gap: 8px;
    padding: 0 12px 14px;
    overflow-x: auto;
  }
  .agency-site {
    flex: none;
    width: auto;
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.03);
  }
  .agency-site b { display: none; }
  .agency-avatars { display: none; }
  .bento-card.is-flat { grid-column: span 12; }
  .agency-tiles { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .price-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
  }
  .price-label,
  .price-row:first-child span:first-child {
    grid-column: 1 / -1;
    text-align: left;
  }
  .price-other,
  .price-us,
  .price-row:first-child span {
    text-align: left;
    justify-content: flex-start;
  }
  .bento-card.is-cap { grid-column: span 12; }
  .page-hero .hero-actions .btn { width: 100%; }
}
