/*
 * 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;
}

/* ---------------------------------------------------------------------------
 * "Works especially well for these industries": a horizontal carousel of photo cards, each linking
 * to its industry page. Not in Figma: flag for design review. The track runs full bleed (cards
 * start in line with the content column and run off the right edge); native scrolling with snap,
 * plus prev/next buttons.
 * ------------------------------------------------------------------------- */
.rt-ind {
  --ind-col: 1113px;
  --ind-pad: max(24px, calc((100% - var(--ind-col)) / 2));
  position: relative;
  padding: 112px 0 120px;
  overflow: hidden;
  background: #f3f5ff;
  color: var(--rt-text-primary);
  font-family: var(--rt-font-body);
  -webkit-font-smoothing: antialiased;
}

.rt-ind *,
.rt-ind *::before,
.rt-ind *::after {
  box-sizing: border-box;
}

.rt-ind-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding: 0 var(--ind-pad);
  margin-bottom: 40px;
}

.rt-ind-title {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 720px;
}

.rt-ind-h2 {
  margin: 0;
  font-family: var(--rt-font-display);
  font-weight: 700;
  font-size: clamp(2.25rem, 1rem + 3vw, 3.25rem);
  line-height: 1.15;
  text-wrap: balance;
}

.rt-ind-sub {
  margin: 0;
  font-size: 18px;
  line-height: 26px;
  color: #3c4151;
}

.rt-ind-nav {
  display: flex;
  flex: none;
  gap: 10px;
}

.rt-ind-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1.5px solid rgba(55, 76, 210, 0.28);
  border-radius: 50%;
  background: #fff;
  color: var(--rt-indigo-100);
  cursor: pointer;
  transition:
    background-color 160ms,
    border-color 160ms,
    color 160ms,
    opacity 160ms;
}

.rt-ind-btn--prev svg {
  rotate: 180deg;
}

.rt-ind-btn:hover:not(:disabled) {
  border-color: var(--rt-indigo-100);
  background: var(--rt-indigo-100);
  color: #fff;
}

.rt-ind-btn:focus-visible {
  outline: 2px solid var(--rt-indigo-100);
  outline-offset: 3px;
}

.rt-ind-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* ---- Track ---- */
.rt-ind-track {
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 6px var(--ind-pad) 24px;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--ind-pad);
  scrollbar-width: none;
}

.rt-ind-track::-webkit-scrollbar {
  display: none;
}

.rt-ind-item {
  flex: none;
  width: 300px;
  scroll-snap-align: start;
}

.rt-ind-card {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 20px;
  background: #dfe3f7;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(31, 54, 167, 0.1);
  isolation: isolate;
}

.rt-ind-photo,
.rt-ind-photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.rt-ind-photo img {
  object-fit: cover;
  transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* legibility gradient under the copy */
.rt-ind-photo::after {
  content: "";
  position: absolute;
  inset: 40% 0 0;
  background: linear-gradient(to bottom, rgba(10, 16, 52, 0), rgba(10, 16, 52, 0.82));
}

.rt-ind-copy {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 22px;
}

.rt-ind-name {
  font-family: var(--rt-font-display);
  font-weight: 700;
  font-size: 24px;
  line-height: 30px;
}

.rt-ind-text {
  font-size: 15px;
  line-height: 21px;
  color: rgba(255, 255, 255, 0.86);
}

.rt-ind-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 7px 12px 7px 16px;
  border-radius: 999px;
  background: #fff;
  font-family: var(--rt-font-heading);
  font-weight: 700;
  font-size: 14px;
  line-height: 18px;
  color: var(--rt-indigo-100);
}

.rt-ind-cta svg {
  transition: transform 200ms ease;
}

a.rt-ind-card:hover .rt-ind-photo img {
  transform: scale(1.05);
}

a.rt-ind-card:hover .rt-ind-cta svg {
  transform: translateX(3px);
}

a.rt-ind-card:focus-visible {
  outline: 3px solid var(--rt-indigo-100);
  outline-offset: 3px;
}

@media (max-width: 767px) {
  .rt-ind {
    padding: 80px 0 88px;
  }
  .rt-ind-head {
    margin-bottom: 28px;
  }
  .rt-ind-sub {
    font-size: 16px;
    line-height: 24px;
  }
  /* the buttons move under the subtitle (beside the headline they'd crowd it); swiping works too */
  .rt-ind-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .rt-ind-btn {
    width: 40px;
    height: 40px;
  }
  .rt-ind-item {
    width: min(72vw, 280px);
  }
  .rt-ind-track {
    gap: 14px;
  }
}

@media (max-width: 599px) {
  .rt-ind {
    --ind-pad: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rt-ind * {
    transition: none !important;
  }
}

