/*
 * Design tokens from the Routific Website Figma file (variables on node 7166:92349).
 * Code components render inside Shadow DOM, so tokens are declared on :host as well as :root
 * (:root covers the local preview and Webflow's own page; :host covers the shadow tree).
 */
:host,
:host {
  /* Brand */
  --rt-indigo-100: #374cd2;
  --rt-indigo-200: #667afa;
  --rt-yellow-200: #ffad0a;
  --rt-yellow-border: #b97b01;
  --rt-turquoise: #45c4d7;
  --rt-primary-500: #326bfc;
  --rt-primary-600: #1750e3;
  --rt-hero-blue: #1f36a7;
  --rt-hero-lilac: #eceefb;

  /* Text */
  --rt-text-primary: #282828;
  --rt-text-secondary: #676d7e;
  --rt-text-tertiary: #9da1af;

  /* Route colours */
  --rt-route-violet: #7547bf;
  --rt-route-pink: #ff85a9;
  --rt-route-sky: #269ed1;
  --rt-route-lilac: #a770db;

  /* Type — Proxima Nova is expected to be loaded by the Webflow site (Adobe Fonts);
     Plus Jakarta Sans and Figtree are loaded from Google Fonts by useDocumentFonts(). */
  --rt-font-display: "Plus Jakarta Sans", system-ui, sans-serif;
  --rt-font-heading: "Figtree", system-ui, sans-serif;
  --rt-font-body: "proxima-nova", "Proxima Nova", "Figtree", system-ui, sans-serif;
  --rt-font-ui: "SF Pro Text", -apple-system, "Inter", system-ui, sans-serif;

  /* Radii */
  --rt-radius-md: 8px;
  --rt-radius-lg: 16px;

  /* Vector map (Hero/showcase/MapBase.tsx): Mapbox-light look of the current Routific UI */
  --map-land: #edeff3;
  --map-street: #fcfdfe;
  --map-park: #d3e9d1;
  --map-water: #b3caf3;
  --map-industrial: #f2e4c6;
  --map-highway: #aab3c7;
  --map-highway-edge: #fcfdfe;
}

/* ---------------------------------------------------------------------------
 * Integration directory (Integrations page). Not in Figma: flag for design review.
 * ------------------------------------------------------------------------- */
.rt-id {
  padding: 112px 24px;
  background: #fff;
  font-family: var(--rt-font-body);
  color: var(--rt-text-primary);
  -webkit-font-smoothing: antialiased;
}
.rt-id--bare {
  padding: 24px 0 96px;
  background: transparent;
}
.rt-id *,
.rt-id *::before,
.rt-id *::after {
  box-sizing: border-box;
}
.rt-id-inner {
  max-width: 1180px;
  margin: 0 auto;
}
.rt-id-head {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.rt-id-eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #e3e8ff;
  font-family: var(--rt-font-heading);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rt-indigo-100);
}
.rt-id-h2 {
  margin: 0;
  font-family: var(--rt-font-display);
  font-weight: 700;
  font-size: clamp(2rem, 1.2rem + 2vw, 3rem);
  line-height: 1.2;
  text-wrap: balance;
}
.rt-id-sub {
  margin: 16px 0 0;
  font-family: var(--rt-font-heading);
  font-size: clamp(1.0625rem, 0.95rem + 0.3vw, 1.1875rem);
  line-height: 1.6;
  color: #3c4152;
  text-wrap: pretty;
}

.rt-id-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 36px 0 32px;
}
.rt-id-chip {
  padding: 9px 18px;
  border: 1px solid #dfe4fb;
  border-radius: 999px;
  background: #fff;
  font-family: var(--rt-font-heading);
  font-weight: 600;
  font-size: 15px;
  color: #3c4152;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.rt-id-chip:hover {
  border-color: #b9c3f6;
}
.rt-id-chip.is-on {
  border-color: var(--rt-indigo-100);
  background: var(--rt-indigo-100);
  color: #fff;
}
.rt-id-chip:focus-visible {
  outline: 2px solid var(--rt-primary-500);
  outline-offset: 2px;
}

.rt-id-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  grid-auto-flow: row dense; /* filtered views never leave holes next to a wide card */
  margin: 0;
  padding: 0;
  list-style: none;
}
.rt-id-item {
  display: flex;
  animation: rt-id-in 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes rt-id-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.rt-id-item.is-wide {
  grid-column: span 2;
}
.rt-id-item.is-wide .rt-id-card {
  background: linear-gradient(135deg, #f6f7ff 0%, #fff 60%);
}
.rt-id-item.is-wide .rt-id-card p {
  max-width: 560px;
}
.rt-id-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 24px 24px 22px;
  border: 1px solid #e7eaf6;
  border-radius: 20px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}
.rt-id-card.is-link:hover {
  border-color: #cfd6fb;
  box-shadow: 0 14px 32px rgba(31, 54, 167, 0.1);
  transform: translateY(-2px);
}
.rt-id-card.is-link:focus-visible {
  outline: 2px solid var(--rt-primary-500);
  outline-offset: 3px;
}
.rt-id-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.rt-id-logo {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 10px;
  border: 1px solid #eef0f6;
  border-radius: 14px;
  background: #fff;
}
.rt-id-logo svg,
.rt-id-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.rt-id-via {
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f3fb;
  font-family: var(--rt-font-heading);
  font-weight: 600;
  font-size: 12.5px;
  color: var(--rt-text-secondary);
  white-space: nowrap;
}
.rt-id-card h3 {
  margin: 0;
  font-family: var(--rt-font-heading);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.3;
}
.rt-id-card p {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--rt-text-secondary);
  text-wrap: pretty;
}
.rt-id-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 16px;
  font-family: var(--rt-font-heading);
  font-weight: 700;
  font-size: 15px;
  color: var(--rt-indigo-100);
}
.rt-id-more svg {
  width: 16px;
  height: 16px;
  transition: transform 160ms ease;
}
.rt-id-card.is-link:hover .rt-id-more svg {
  transform: translateX(3px);
}
.rt-id-card-more {
  border-style: dashed;
  border-color: #c3cbef;
  background: #f7f8fe;
}
.rt-id-plus {
  border-color: transparent;
  background: var(--rt-indigo-100);
  color: #fff;
}
.rt-id-note {
  margin: 32px 0 0;
  font-family: var(--rt-font-heading);
  font-size: 16px;
  color: var(--rt-text-secondary);
  text-align: center;
}
.rt-id-note a {
  font-weight: 700;
  color: var(--rt-indigo-100);
  text-decoration: none;
}
.rt-id-note a:hover {
  text-decoration: underline;
}

@media (max-width: 1023px) {
  .rt-id-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 599px) {
  .rt-id {
    padding: 80px 16px;
  }
  .rt-id-item.is-wide {
    grid-column: auto;
  }
  .rt-id-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  .rt-id * {
    animation: none !important;
    transition: none !important;
  }
}

