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

/* Image comparison slider (not in Figma): the homepage Spaghetti Routes divider and handle over two screenshots. */
.rt-ic {
  display: flex;
  justify-content: center;
  width: 100%;
}
.rt-ic,
.rt-ic *,
.rt-ic *::before,
.rt-ic *::after {
  box-sizing: border-box;
}

/* Wider screens: a white card with the screenshots rising out of its bottom edge, like the page's other visuals. */
.rt-ic--panel {
  padding: 72px 8% 0;
  border-radius: 20px;
  background: #fff;
}

.rt-ic-frame {
  position: relative;
  width: 100%;
  max-width: 1080px;
  overflow: hidden;
  border-radius: 14px;
  cursor: ew-resize;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.rt-ic--panel .rt-ic-frame {
  border-radius: 14px 14px 0 0;
}

.rt-ic-img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.rt-ic-dim {
  filter: brightness(0.9);
}
.rt-ic-left {
  clip-path: inset(0 calc(100% - var(--split)) 0 0);
}

.rt-ic-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split);
  width: 5px;
  translate: -50% 0;
  background: #fff;
  box-shadow: -5px 0 12px rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

.rt-ic-handle {
  position: absolute;
  top: 50%;
  left: var(--split);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  translate: -50% -50%;
  border-radius: 50%;
  background: #fff;
  filter: drop-shadow(0 4px 2px rgba(0, 0, 0, 0.25));
  cursor: ew-resize;
  transition: scale 200ms ease;
}
.rt-ic-handle svg {
  width: 18px;
  height: auto;
}
.rt-ic-frame:hover .rt-ic-handle,
.rt-ic-frame.is-dragging .rt-ic-handle {
  scale: 1.08;
}
.rt-ic-handle:focus-visible {
  outline: 3px solid var(--rt-yellow-200);
  outline-offset: 3px;
}

/* Phones: no card, the screenshots fill the column (layout not in Figma). */
@media (max-width: 767px) {
  .rt-ic--panel {
    padding: 0;
    background: none;
  }
  .rt-ic--panel .rt-ic-frame {
    border-radius: 12px;
  }
  .rt-ic-handle {
    width: 44px;
    height: 44px;
  }
  .rt-ic-handle svg {
    width: 14px;
  }
  .rt-ic-divider {
    width: 4px;
  }
}

