/* Development on Demand page */

/* ---------- Editorial hero ---------- */

.dev-hero {
  position: relative;
  padding: calc(var(--header-h) + 40px) 0 0;
  overflow: hidden;
}

.dev-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(40% 50% at 100% 30%, rgba(52, 89, 166, 0.1), transparent 70%),
    radial-gradient(30% 40% at 0% 0%, rgba(52, 89, 166, 0.06), transparent 70%);
}

.dev-hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dev-hero-meta {
  display: none;
  gap: 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
}

.dev-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dev-hero-meta span::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

.dev-title {
  margin-top: 32px;
  font-size: clamp(44px, 7.6vw, 116px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.dev-title .accent {
  color: var(--blue);
}

.dev-hero-row {
  display: grid;
  gap: 40px;
  margin-top: 40px;
  align-items: end;
}

.dev-hero-row .page-sub {
  margin-top: 0;
}

/* Expert on demand widget */

.finder {
  width: 100%;
  max-width: 480px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 40px 80px -40px rgba(37, 63, 122, 0.45);
}

.finder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

.finder-head .live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #16a34a;
}

.finder-head .live::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

.finder-input {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(52, 89, 166, 0.25);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(52, 89, 166, 0.06);
}

.finder-input svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--blue);
}

.finder-query {
  min-height: 1.4em;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
}

.finder-caret {
  width: 2px;
  height: 20px;
  margin-left: -10px;
  background: var(--blue);
  animation: caret-blink 1s steps(1) infinite;
}

@keyframes caret-blink {
  50% { opacity: 0; }
}

/* Idle, searching and result states share one spot so the card never changes height */
.finder-stage {
  display: grid;
  margin-top: 12px;
}

.finder-stage > * {
  grid-area: 1 / 1;
  transition: opacity 0.35s ease, transform 0.5s var(--ease);
}

.finder-idle {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 16px;
}

.finder-idle-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.finder.is-searching .finder-idle,
.finder.has-result .finder-idle {
  opacity: 0;
  transform: translateY(-6px);
}

.finder-result {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: var(--surface);
  opacity: 0;
  transform: translateY(8px);
}

.finder.has-result .finder-result {
  opacity: 1;
  transform: none;
}

.finder-match {
  display: flex;
  align-items: center;
  gap: 12px;
}

.finder-avatar {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--blue-600));
  color: var(--white);
}

.finder-avatar svg {
  width: 20px;
  height: 20px;
}

.finder-match strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
}

.finder-match small {
  display: block;
  font-size: 13px;
  color: var(--ink-2);
}

.finder-check {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  font-size: 12px;
  font-weight: 700;
  color: #15803d;
  white-space: nowrap;
}

.finder-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.finder-tags span {
  padding: 5px 11px;
  border: 1px solid rgba(52, 89, 166, 0.2);
  border-radius: 999px;
  background: var(--white);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--blue);
}

.finder-searching {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  opacity: 0;
}

.finder.is-searching .finder-searching {
  opacity: 1;
}

.finder-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(52, 89, 166, 0.2);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin-fast 0.7s linear infinite;
}

@keyframes spin-fast {
  to { transform: rotate(360deg); }
}

/* Technology ticker */

.ticker {
  margin-top: 72px;
  padding: 26px 0;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: marquee 48s linear infinite;
}

.ticker-group {
  display: flex;
  align-items: center;
  gap: 40px;
  padding-right: 40px;
}

.ticker-word {
  font-size: clamp(40px, 6.4vw, 96px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(52, 89, 166, 0.45);
  transition: color 0.3s ease;
}

.ticker-word.fill {
  color: var(--ink);
  -webkit-text-stroke: 0;
}

.ticker-word:hover {
  color: var(--blue);
  -webkit-text-stroke-color: var(--blue);
}

.ticker-star {
  flex: none;
  width: 28px;
  height: 28px;
  color: var(--blue);
}

.ticker:hover .ticker-track {
  animation-play-state: paused;
}

/* ---------- Challenge: skill coverage ---------- */

.dev-split {
  display: grid;
  gap: 48px;
  align-items: center;
}

.dev-split .section-title {
  margin-top: 8px;
}

.dev-text p {
  max-width: 560px;
  margin-top: 22px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-2);
}

.dev-question {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 560px;
  margin-top: 28px;
  padding: 18px 20px;
  border-left: 3px solid var(--blue);
  border-radius: 4px 16px 16px 4px;
  background: var(--blue-50);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
}

.coverage {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--white);
  box-shadow: 0 40px 80px -48px rgba(37, 63, 122, 0.4);
}

.coverage-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.coverage-toggle::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: var(--ink);
  transition: transform 0.5s var(--ease), background-color 0.4s ease;
}

.coverage.is-covered .coverage-toggle::before {
  transform: translateX(100%);
  background: var(--blue);
}

.coverage-toggle button {
  position: relative;
  z-index: 1;
  padding: 11px 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  transition: color 0.3s ease;
}

.coverage-toggle button[aria-pressed='true'] {
  color: var(--white);
}

.coverage-group {
  margin-top: 22px;
}

.coverage-label {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.skill-grid.processes {
  grid-template-columns: repeat(4, 1fr);
}

.skill {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 52px;
  padding: 8px;
  border: 1.5px dashed rgba(11, 13, 18, 0.18);
  border-radius: 14px;
  background: var(--white);
  font-size: 14px;
  font-weight: 700;
  color: rgba(11, 13, 18, 0.4);
  text-align: center;
  transition:
    background-color 0.45s ease,
    border-color 0.45s ease,
    color 0.45s ease,
    transform 0.45s var(--ease);
  transition-delay: calc(0.05s * var(--i, 0));
}

.skill svg {
  flex: none;
  width: 14px;
  height: 14px;
}

.skill .ic-check { display: none; }
.skill .ic-gap { color: var(--amber, #f5a524); }

.skill.base,
.coverage.is-covered .skill {
  border-style: solid;
  border-color: transparent;
  background: var(--blue-50);
  color: var(--blue);
}

.skill.base .ic-check,
.coverage.is-covered .skill .ic-check { display: block; }

.skill.base .ic-gap,
.coverage.is-covered .skill .ic-gap { display: none; }

.coverage.is-covered .skill:not(.base) {
  transform: scale(1.03);
  background: var(--blue);
  color: var(--white);
}

.coverage.is-covered .skill:not(.base) {
  animation: settle 0.5s var(--ease) forwards;
  animation-delay: calc(0.05s * var(--i, 0) + 0.45s);
}

@keyframes settle {
  to { transform: none; }
}

.coverage-meter {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.coverage-bar {
  flex: 1;
  height: 8px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface);
}

.coverage-bar span {
  display: block;
  height: 100%;
  width: 10%;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--blue), var(--blue-300));
  transition: width 0.9s var(--ease) 0.2s;
}

.coverage.is-covered .coverage-bar span {
  width: 100%;
}

.coverage-value {
  min-width: 48px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

/* ---------- Partners: statement + range ---------- */

.partners {
  text-align: center;
}

.partners .section-title {
  max-width: 960px;
  margin: 8px auto 0;
}

.partners-text {
  max-width: 680px;
  margin: 28px auto 0;
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-2);
}

.range {
  max-width: 980px;
  margin: 56px auto 0;
  padding: 28px 24px 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  text-align: left;
}

.range-ends {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  font-weight: 700;
}

.range-ends span:last-child {
  text-align: right;
  color: var(--blue);
}

.range-track {
  position: relative;
  height: 10px;
  margin: 18px 0 16px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(11, 13, 18, 0.12), var(--blue));
}

.range-track::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border: 4px solid var(--white);
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 6px 16px -4px rgba(37, 63, 122, 0.6);
  animation: range-sweep 6s var(--ease) infinite alternate;
}

@keyframes range-sweep {
  from { left: 4%; }
  to { left: 96%; }
}

.range-ticks {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.range-ticks span {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

.range-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.range-foot .tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 600;
}

.range-foot .tag svg {
  width: 15px;
  height: 15px;
  color: var(--blue);
}

/* ---------- Bento ---------- */

.bento {
  display: grid;
  gap: 16px;
}

.bento-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
}

.bento-card h3 {
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.bento-card p {
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-2);
}

.bento-card p + p {
  margin-top: 12px;
}

/* Industries */

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

.industry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  font-size: 15px;
  font-weight: 600;
  transition: border-color 0.3s ease, transform 0.4s var(--ease), box-shadow 0.4s ease;
}

.industry:hover {
  border-color: rgba(52, 89, 166, 0.3);
  box-shadow: 0 16px 30px -20px rgba(37, 63, 122, 0.45);
  transform: translateY(-2px);
}

.industry .dropdown-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.industry:last-child {
  grid-column: 1 / -1;
}

/* Org chart */

.org {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  padding: 8px 0 4px;
}

.org-lead {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  padding: 12px 18px 12px 12px;
  border-radius: 18px;
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 20px 40px -20px rgba(11, 13, 18, 0.6);
}

.org-lead .dropdown-icon {
  background: rgba(255, 255, 255, 0.12);
}

.org-lead .dropdown-icon img {
  width: 20px;
  height: auto;
  filter: brightness(0) invert(1);
}

.org-lead strong,
.org-dev strong {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
}

.org-lead small {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.org-trunk {
  position: relative;
  width: 2px;
  height: 28px;
  overflow: hidden;
  background: rgba(52, 89, 166, 0.25);
}

.org-team {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  gap: 8px;
}

.org-team::before {
  content: '';
  position: absolute;
  top: 0;
  left: 16.66%;
  right: 16.66%;
  height: 2px;
  background: rgba(52, 89, 166, 0.25);
}

.org-dev {
  display: grid;
  justify-items: center;
}

.org-drop {
  position: relative;
  width: 2px;
  height: 26px;
  overflow: hidden;
  background: rgba(52, 89, 166, 0.25);
}

.org-card {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 100%;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  text-align: center;
}

.org-card .finder-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue-50);
  color: var(--blue);
}

.org-card .finder-avatar svg {
  width: 17px;
  height: 17px;
}

.org-dev strong {
  font-size: 13px;
}

.drip {
  position: absolute;
  left: 0;
  width: 2px;
  height: 14px;
  border-radius: 2px;
  background: var(--blue);
  animation: drip 1.8s linear infinite;
  animation-delay: var(--p, 0s);
}

.drip.up {
  animation-direction: reverse;
}

@keyframes drip {
  from { top: -14px; }
  to { top: 100%; }
}

.org-caption {
  margin-top: 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
}

/* Closing dark card */

.bento-cta {
  justify-content: space-between;
  border-color: transparent;
  color: var(--white);
  background:
    radial-gradient(60% 90% at 100% 0%, rgba(52, 89, 166, 0.55), transparent 65%),
    var(--ink);
}

.bento-cta blockquote {
  max-width: 880px;
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.bento-cta blockquote span {
  color: var(--blue-300);
}

.bento-cta-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.bento-cta-foot p {
  margin: 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- Breakpoints ---------- */

@media (max-width: 639px) {
  .dev-hero-row .page-actions .btn {
    flex: 1 1 100%;
    justify-content: space-between;
  }

  .dev-hero-row .page-actions .btn-light {
    justify-content: center;
  }

  .ticker {
    margin-top: 56px;
    padding: 18px 0;
  }

  .ticker-group {
    gap: 24px;
    padding-right: 24px;
  }

  .ticker-star {
    width: 20px;
    height: 20px;
  }

  .skill {
    min-height: 46px;
    font-size: 12.5px;
  }

  .skill svg {
    display: none !important;
  }

  .range-ticks span:nth-child(2),
  .range-ticks span:nth-child(4),
  .range-ticks span:nth-child(5) {
    display: none;
  }

  .bento-card {
    padding: 22px;
  }

  .industry {
    min-width: 0;
    gap: 10px;
    padding: 12px;
    font-size: 14px;
  }

  .industry .dropdown-icon {
    width: 34px;
    height: 34px;
  }

  .org-dev strong {
    font-size: 12px;
  }

  .org-card {
    padding: 10px 4px;
  }

  .finder-match strong {
    font-size: 14px;
  }

  .finder-match small {
    font-size: 12px;
  }

  .coverage-toggle button {
    font-size: 13px;
    padding: 10px 6px;
  }
}

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

@media (min-width: 768px) {
  .dev-hero-meta {
    display: flex;
  }

  /* 3 tiles on the first row, 2 wider tiles on the second, so no empty slot */
  .industries {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .industry {
    grid-column: span 2;
  }

  .industry:nth-child(n + 4),
  .industry:last-child {
    grid-column: span 3;
  }

  .range {
    padding: 36px 40px 28px;
  }

  .bento-card {
    padding: 36px;
  }
}

@media (min-width: 1024px) {
  .dev-hero-row {
    grid-template-columns: 1fr auto;
    gap: 64px;
  }

  .finder {
    width: 460px;
  }

  .dev-split {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 96px;
  }

  .bento {
    grid-template-columns: repeat(12, 1fr);
  }

  .bento-industry {
    grid-column: span 7;
  }

  .bento-industry .industries {
    order: 2;
    margin-top: auto;
  }

  .bento-industry .industry {
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 124px;
    padding: 18px;
  }

  .bento-lead {
    grid-column: span 5;
  }

  .bento-cta {
    grid-column: 1 / -1;
    min-height: 320px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track,
  .range-track::after,
  .drip,
  .finder-caret,
  .finder-spinner {
    animation: none;
  }
}
