/* Integrations page */

.integ-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.integ-grid--3 { grid-template-columns: repeat(3, 1fr); }
.integ-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.integ-card:hover {
  border-color: rgba(25, 173, 197, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.integ-card--live {
  border-color: rgba(25, 173, 197, 0.25);
  background: linear-gradient(180deg, var(--surface) 0%, var(--teal-wash) 200%);
}
.integ-card--ask {
  background: linear-gradient(180deg, var(--surface) 0%, var(--teal-wash) 100%);
  border-style: dashed;
}

.integ-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.integ-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.integ-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.integ-tag {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 2px;
}
.integ-card p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

@media (max-width: 900px) {
  .integ-grid, .integ-grid--3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .integ-grid, .integ-grid--3 { grid-template-columns: 1fr; }
}

/* SSO grid */
.sso-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.sso-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.sso-name { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; }
.sso-sub { font-size: 12.5px; color: var(--text-soft); margin-top: 2px; }
@media (max-width: 880px) {
  .sso-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .sso-grid { grid-template-columns: 1fr; }
}

/* API */
.api-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.api-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.api-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6BD7E8;
  background: rgba(25,173,197,0.16);
  border-radius: var(--r-pill);
  padding: 4px 10px;
  width: fit-content;
}
.api-card pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: rgba(255,255,255,0.85);
  line-height: 1.7;
  white-space: pre-wrap;
}
.api-card .kw { color: #FBA74A; }
.api-card .str { color: #6BD7E8; }
.api-card .cm { color: rgba(255,255,255,0.4); font-style: italic; }

@media (max-width: 900px) {
  .api-grid { grid-template-columns: 1fr; }
}

/* =========================
   Stack marquee + cards
   ========================= */
.stack-marquee {
  margin: 32px 0 40px;
  overflow: hidden;
  position: relative;
  padding: 18px 0;
  background: linear-gradient(180deg, transparent, var(--surface-subtle), transparent);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}
.stack-marquee-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 56px;
  width: max-content;
  animation: stack-scroll 32s linear infinite;
}
.stack-marquee:hover .stack-marquee-track { animation-play-state: paused; }
@keyframes stack-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.stack-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.stack-logo img,
.stack-logo svg.brand-svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
}

.stack-cards {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.stack-card {
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  text-align: center;
}
.stack-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -10px rgba(15,23,42,0.15);
  border-color: var(--teal);
}
.stack-card.active {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(25,173,197,0.18);
  background: var(--teal-wash);
}
.stack-card-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.stack-card-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.stack-card-tag {
  font-size: 10.5px;
  color: var(--text-soft);
  line-height: 1.2;
}

.stack-detail {
  position: relative;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
  min-height: 140px;
}
.stack-detail-pane {
  display: none;
  animation: stack-fade 0.25s ease;
}
.stack-detail-pane.active { display: block; }
.stack-detail-pane h3 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
}
.stack-detail-pane p {
  margin: 0;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 70ch;
}
@keyframes stack-fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1100px) {
  .stack-cards { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 640px) {
  .stack-cards { grid-template-columns: repeat(2, 1fr); }
}
