/* ========================================================
   integrations.css — Incode Integrations Page
   Design system: light background (#F9F9F9), Rethink Sans display font,
   DM Sans body, blue accent #0054FF
   ======================================================== */

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Palette */
  --color-background:    #F9F9F9;
  --color-black:         #000000;
  --color-white:         #F9F9F9;
  --color-true-white:    #FFFFFF;
  --color-rich-black:    #000000;
  --color-off-white:     #EBECEF;
  --color-foreground:    #3A3E4B;
  --color-blue:          #0054FF;
  --color-blue-600:      #0048E6;
  --color-blue-100:      #E5F0FF;
  --color-blue-eyebrow:  #CCE1FF;
  --color-grey-on-white: #6E758C;
  --color-grey-on-black: #C6C8D2;
  --color-border-light:  #EBECEF;

  /* Typography */
  --font-display: 'Rethink Sans', ui-sans-serif, system-ui, sans-serif;
  --font-sans:    'DM Sans', ui-sans-serif, system-ui, sans-serif;

  /* Layout */
  --max-w: 1280px;
  --px: 1.25rem;

  /* Radius */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
}

@media (min-width: 1024px) { :root { --px: 2rem; } }

body {
  background: var(--color-background);
  color: var(--color-foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.6;
}

::selection { background: var(--color-blue); color: #F9F9F9; }

img { display: block; max-width: 100%; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--px);
}

.section {
  position: relative;
  width: 100%;
  padding-block: 3rem;
}
@media (min-width: 640px)  { .section { padding-block: 4rem; } }
@media (min-width: 768px)  { .section { padding-block: 5rem; } }

.section--light    { background: var(--color-background); color: var(--color-foreground); }
.section--white    { background: var(--color-true-white); color: var(--color-foreground); }
.section--offwhite { background: rgba(235,236,239,0.4);   color: var(--color-foreground); border-bottom: 1px solid var(--color-border-light); }
.section--dark     { background: var(--color-rich-black); color: #ffffff; }

/* ---------- Typography ---------- */
.page-heading {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  font-size: 55px;
  line-height: 61px;
  text-wrap: balance;
  color: var(--color-black);
  margin-top: 1.25rem;
}

.section-heading {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  line-height: 1.1;
  text-wrap: balance;
  color: var(--color-black);
  margin-top: 20px;
  margin-bottom: 0;
}
.section--dark .section-heading { color: #ffffff; }

.body-text {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-grey-on-white);
  max-width: 42rem;
  margin-top: 1.25rem;
}

/* ---------- Eyebrow badge ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  border: 1px solid;
  padding: 0.25rem 0.875rem;   /* py-1 px-3.5 */
  font-size: 0.875rem;          /* text-sm = 14px */
  font-weight: 500;
  font-family: var(--font-sans);
  line-height: 1.4;
  letter-spacing: 0;
}
.eyebrow--light {
  border-color: rgba(0, 84, 255, 0.18);
  background: rgba(0, 84, 255, 0.07);
  color: var(--color-blue);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--r-md);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.625rem 1.25rem;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1.2;
}
.btn--primary {
  background-color: #0054FF;
  color: #F9F9F9;
  border: none;
}
.btn--primary:hover { background-color: #0048E6; }

.btn--secondary {
  background: var(--color-background);
  color: var(--color-foreground);
  border-color: var(--color-border-light);
}
.btn--secondary:hover { border-color: var(--color-foreground); }

.btn--outline-white {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.30);
}
.btn--outline-white:hover { background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.55); }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1) var(--delay, 0s),
              transform 0.6s cubic-bezier(0.16,1,0.3,1) var(--delay, 0s);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--color-border-light);
  background: var(--color-true-white);  /* #FFFFFF — cards inside are #F9F9F9 so they sit */
}

.hero .container {
  padding-top: 8rem;
  padding-bottom: 4rem;
  width: 100%;
}
@media (min-width: 640px) { .hero .container { padding-top: 9rem; padding-bottom: 5rem; } }
@media (min-width: 768px) { .hero .container { padding-top: 10rem; padding-bottom: 6rem; } }

.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1.1fr 1fr;
    gap: 4rem;
  }
}

.hero-content { display: flex; flex-direction: column; }

.hero-sub {
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  line-height: 28px;
  letter-spacing: -0.01em;
  color: #70758B;
  max-width: 30rem;
}

.hero-content .btn { margin-top: 2rem; width: fit-content; }

/* Partner ecosystem animation */
.hero-animation {
  display: flex;
  justify-content: center;
}

.pea-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 360px;
  margin-inline: auto;
  opacity: 0;
  transform: translateY(8px);
  animation: pea-mount 600ms ease-out 300ms forwards;
}

@keyframes pea-mount {
  to { opacity: 1; transform: translateY(0); }
}

.pea-card {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 140px;
  border-radius: var(--r-xl);
  border: 1px solid rgba(0,0,0,0.06);
  background: var(--color-background);   /* #F9F9F9 — sits on white hero */
  padding: 1.5rem;
  box-shadow: 0 24px 48px -28px rgba(10,15,30,0.18);
}

.pea-incode-logo {
  max-height: 44px;
  max-width: 55%;
  object-fit: contain;
  margin: auto;
}

.pea-connector {
  display: flex;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.pea-connector span {
  display: block;
  width: 1px;
  height: 100%;
  background: rgba(0,0,0,0.15);
}

.pea-partner-viewport {
  position: relative;
  width: 100%;
  height: 3.5rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pea-partner-logo {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: 80%;
  height: auto;
  object-fit: contain;
}
.pea-partner-logo.entering {
  animation: pea-slide-in 350ms cubic-bezier(0.32,0.72,0,1) forwards;
}
.pea-partner-logo.exiting {
  animation: pea-slide-out 350ms cubic-bezier(0.32,0.72,0,1) forwards;
}

@keyframes pea-slide-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pea-slide-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-20px); }
}

/* ---------- STATS STRIP ---------- */
.stats-strip {
  min-height: 280px;
  display: flex;
  align-items: center;
  background: var(--color-true-white);
  border-bottom: 1px solid var(--color-border-light);
}

.stats-strip .container { padding-block: 3rem; }
@media (min-width: 640px) { .stats-strip .container { padding-block: 0; } }

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem 0;
}
@media (min-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
  }
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-inline: 0;
}
@media (min-width: 640px) {
  .stat { padding-inline: 2.5rem; }
  .stat:not(:first-child) { border-left: 1px solid var(--color-border-light); }
  .stat:first-child { padding-left: 0; }
}

.stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.025em;
  background: linear-gradient(90deg, #111111 0%, #006AFF 55%, #006AFF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  margin-top: 0.625rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-grey-on-white);
}
@media (min-width: 640px) { .stat-label { font-size: 0.875rem; } }

/* ---------- CATEGORIES GRID ---------- */
.categories-grid {
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .categories-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .categories-grid { grid-template-columns: repeat(4, 1fr); } }

.cat-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--r-xl);
  border: 1px solid var(--color-border-light);
  background: var(--color-true-white);
  padding: 1.5rem;
}
@media (min-width: 640px) { .cat-card { padding: 1.75rem; } }

.cat-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.cat-icon-wrap {
  display: flex;
  height: 2.5rem;
  width: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: var(--color-blue-100);
  flex-shrink: 0;
}

.cat-icon {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  background-color: #006AFF;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--color-border-light);
  background: rgba(235,236,239,0.70);
  padding: 0.25rem 0.625rem;
  font-size: 0.625rem;
  font-weight: 400;
  color: var(--color-grey-on-white);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 1.5rem;
  align-self: flex-start;
}

.cat-card-title {
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--color-black);
}
@media (min-width: 768px) { .cat-card-title { font-size: 1rem; } }

.cat-card-desc {
  margin-top: 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-grey-on-white);
  flex: 1;
}

/* ---------- MARKETPLACE ---------- */
.marketplace-wrapper { margin-top: 2.5rem; }

.search-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.search-label { position: relative; flex: 1; width: 100%; max-width: 28rem; }
.search-input {
  height: 2.75rem;
  width: 100%;
  border-radius: var(--r-md);
  border: 1px solid var(--color-border-light);
  background: var(--color-background);
  padding: 0 1rem;
  font-size: 0.875rem;
  color: var(--color-foreground);
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.15s;
}
.search-input::placeholder { color: var(--color-grey-on-white); }
.search-input:focus { border-color: var(--color-foreground); }

.search-btn {
  height: 2.75rem;
  flex-shrink: 0;
  font-size: 0.875rem;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.pill {
  border-radius: 999px;
  border: 1px solid var(--color-border-light);
  background: var(--color-background);
  color: var(--color-grey-on-white);
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.pill:hover, .pill--active {
  border-color: var(--color-foreground);
  color: var(--color-foreground);
}

.marketplace-note {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--color-grey-on-white);
}

.marketplace-meta {
  margin-top: 1.5rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
}
.result-count {
  font-size: 0.8125rem;
  color: var(--color-grey-on-white);
}
.result-count strong { color: var(--color-foreground); font-weight: 600; }

.integrations-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px)  { .integrations-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .integrations-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .integrations-grid { grid-template-columns: repeat(4, 1fr); } }

.int-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-xl);
  border: 1px solid var(--color-border-light);
  background: var(--color-true-white);
  padding: 1.75rem;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.int-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 84, 255, 0.30);
  box-shadow: 0 8px 22px -14px rgba(0,84,255,0.35);
}

.int-card-logo-wrap {
  height: 1.75rem;
  display: flex;
  align-items: center;
}
.int-card-logo {
  height: auto;
  width: auto;
  object-fit: contain;
  object-position: left;
  max-height: 18px;
  max-width: 80px;
}
.int-card-logo--regular { max-height: 24px; max-width: 110px; }

.int-card-initials {
  height: 1.75rem;
  width: 1.75rem;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: 700;
  font-family: var(--font-sans);
}

.int-card-name {
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--color-black);
}

.int-card-desc {
  margin-top: 0.625rem;
  flex: 1;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-grey-on-white);
}

.int-card-tags {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.int-tag {
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--color-border-light);
  background: rgba(235,236,239,0.70);
  padding: 0.25rem 0.625rem;
  font-size: 0.625rem;
  font-weight: 400;
  color: var(--color-grey-on-white);
}

.int-empty {
  border-radius: var(--r-xl);
  border: 1px dashed var(--color-border-light);
  background: rgba(235,236,239,0.40);
  padding: 4rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-grey-on-white);
}

/* ---------- TECH PARTNER CTA ---------- */

/* Partner section eyebrow — dark bg, blue-tinted pill */
.eyebrow--partner {
  /* Exact values from source: text-blue-eyebrow + blue border/bg */
  color: #CCE1FF;
  border-color: lab(41.8723% 34.8271 -91.5787 / 0.25);
  background-color: lab(41.8723% 34.8271 -91.5787 / 0.1);
}

/* Centered partner header */
.partner-header {
  text-align: center;
  max-width: 52rem;
  margin-inline: auto;
  margin-bottom: 3rem;
}
.partner-header .section-heading {
  color: #ffffff;
  font-size: clamp(2rem, 4.5vw, 3rem);
  letter-spacing: -0.025em;
  margin-top: 0.875rem;
}

/* Partner description — no side margin/max-width restriction */
.partner-desc {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-grey-on-black);
  margin-top: 1.25rem;
  /* No margin-inline or max-width — fills the centered container naturally */
}

/* 3-col feature cards */
.feature-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px)  { .feature-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .feature-cards { grid-template-columns: repeat(3, 1fr); } }

.feature-card {
  border-radius: var(--r-xl);
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature-icon-wrap {
  display: flex;
  height: 2.5rem;
  width: 2.5rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: rgba(0,84,255,0.18);
}

.feature-card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: #ffffff;
  line-height: 1.3;
}

.feature-card-body {
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--color-grey-on-black);
}

/* DsIcon: CSS mask technique */
.ds-icon {
  display: block;
  width: 1rem;
  height: 1rem;
  background-color: var(--color-blue);
  -webkit-mask-image: var(--icon-url);
  mask-image: var(--icon-url);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* ---------- BOTTOM CTA ---------- */
/* Bottom CTA sits inside the same dark area but with a top rule */
.section--dark + .section--dark {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 4rem;
}

.bottom-cta-grid {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 768px) { .bottom-cta-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- BOTTOM CTA — two plain columns, vertical divider ---------- */

/* Remove the full-width section border-top; the grid itself carries the line */
.section--dark + .section--dark { border-top: none; padding-top: 0; }

.bottom-cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  /* Top rule at container width — not full-bleed */
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 3rem;
}

/* No card styling — just plain column containers */
.cta-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Vertical divider between columns */
.cta-card:first-child {
  padding-right: 3rem;
  border-right: 1px solid rgba(255,255,255,0.12);
}
.cta-card:last-child {
  padding-left: 3rem;
}

.cta-card-heading {
  margin-top: 0;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: 1.25rem;
  line-height: 1.2;
  color: #ffffff;
}
@media (min-width: 640px) { .cta-card-heading { font-size: 1.5rem; } }

.cta-card-body {
  margin-top: 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-grey-on-black);
  flex: 1;
}

.cta-btn-wrap { margin-top: 1.5rem; }

/* CTA buttons are smaller: 0.75rem */
.cta-btn-wrap .btn { font-size: 0.75rem; padding: 0.5rem 1rem; }

@media (max-width: 639px) {
  .bottom-cta-grid { grid-template-columns: 1fr; }
  .cta-card:first-child { padding-right: 0; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.12); padding-bottom: 2.5rem; }
  .cta-card:last-child { padding-left: 0; padding-top: 2.5rem; }
}
