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

/*
 * "Discover …" section links: a soft pill with the arrow in its own circle, so they read as an
 * action under the headline instead of a line of body text. Default is for light backgrounds;
 * add .rt-cta-link--on-dark on blue sections (the arrow image is already white there).
 */
.rt-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  padding: 9px 9px 9px 20px;
  border: 1.5px solid rgba(55, 76, 210, 0.28);
  border-radius: 999px;
  background: #eef0fd;
  font-family: var(--rt-font-heading);
  font-weight: 700;
  font-size: 17px;
  line-height: 22px;
  text-align: left;
  color: var(--rt-indigo-100);
  text-decoration: none;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.rt-cta-link .rt-cta-arrow {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(55, 76, 210, 0.12);
  transition: background-color 180ms ease;
}

.rt-cta-link .rt-cta-arrow img {
  display: block;
  margin: 0;
  overflow: visible;
  transition: transform 200ms ease;
}

.rt-cta-link:hover {
  border-color: var(--rt-indigo-100);
  background: #e4e8fd;
  box-shadow: 0 6px 18px rgba(55, 76, 210, 0.16);
}

.rt-cta-link:hover .rt-cta-arrow {
  background: rgba(55, 76, 210, 0.2);
}

.rt-cta-link:hover .rt-cta-arrow img {
  transform: translateX(2px);
}

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

.rt-cta-link--on-dark {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.rt-cta-link--on-dark .rt-cta-arrow {
  background: rgba(255, 255, 255, 0.2);
}

.rt-cta-link--on-dark:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.rt-cta-link--on-dark:hover .rt-cta-arrow {
  background: rgba(255, 255, 255, 0.3);
}

.rt-cta-link--on-dark:focus-visible {
  outline-color: #fff;
}

@media (max-width: 599px) {
  .rt-cta-link {
    gap: 10px;
    padding: 8px 8px 8px 16px;
    font-size: 15.5px;
    line-height: 20px;
  }
  .rt-cta-link .rt-cta-arrow {
    width: 28px;
    height: 28px;
  }
}

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

/* Testimonial attribution: avatar + name + role (src/lib/QuoteAuthor.tsx). */
.rt-qa {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  font-family: var(--rt-font-body);
}

.rt-qa-avatar {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 3px #fff, 0 4px 12px rgba(31, 54, 167, 0.18);
}

.rt-qa-initials {
  display: grid;
  place-items: center;
  font-family: var(--rt-font-heading);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}

.rt-qa-tone-0 { background: linear-gradient(135deg, var(--rt-turquoise), var(--rt-route-sky)); }
.rt-qa-tone-1 { background: linear-gradient(135deg, var(--rt-route-pink), var(--rt-route-violet)); }
.rt-qa-tone-2 { background: linear-gradient(135deg, var(--rt-indigo-200), var(--rt-route-lilac)); }
.rt-qa-tone-3 { background: linear-gradient(135deg, var(--rt-yellow-200), var(--rt-route-pink)); }

.rt-qa-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.rt-qa-name {
  font-weight: 700;
  font-size: 17px;
  line-height: 22px;
  color: #2435a1;
}

.rt-qa-role {
  font-size: 15px;
  line-height: 20px;
  color: var(--rt-text-secondary);
}

/* On blue cards (Reviews) */
.rt-qa--light .rt-qa-avatar {
  width: 44px;
  height: 44px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}
.rt-qa--light .rt-qa-initials { font-size: 15px; }
.rt-qa--light .rt-qa-name { font-size: 16px; line-height: 22px; color: #fff; }
.rt-qa--light .rt-qa-role { font-size: 14px; line-height: 19px; color: rgba(255, 255, 255, 0.75); }

@media (max-width: 767px) {
  .rt-qa-avatar { width: 48px; height: 48px; }
  .rt-qa-name { font-size: 17px; line-height: 23px; }
  .rt-qa-role { font-size: 14px; line-height: 19px; }
}

/* Shared styles for the vector map (Hero/showcase/MapBase.tsx). Colours are in tokens.css. */
.rt-map-labels text {
  font-family: var(--rt-font-heading);
  font-weight: 700;
  fill: #8a90a2;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 1.6px;
}

/* ---------------------------------------------------------------------------
 * Section (Figma 7166:89133)
 * ------------------------------------------------------------------------- */
.rt-pr {
  position: relative;
  overflow: hidden;
  font-family: var(--rt-font-heading);
  color: var(--rt-text-primary);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

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

.rt-pr-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: calc(1120px + 2 * 24px);
  margin: 0 auto;
  padding: 160px 24px 0;
}

/* ---- Title ---- */
.rt-pr-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 1030px;
  text-align: center;
}

.rt-pr-h2 {
  margin: 0;
  font-family: var(--rt-font-display);
  font-weight: 700;
  font-size: clamp(2.25rem, 1rem + 3.5vw, 3.75rem);
  line-height: 1.2;
  color: var(--rt-text-primary);
  text-wrap: balance;
}

.rt-pr-sub {
  margin: 0;
  font-size: clamp(1.0625rem, 0.9rem + 0.4vw, 1.25rem);
  line-height: 1.6;
  text-wrap: pretty;
}





/* ---------------------------------------------------------------------------
 * Showcase: a lavender panel with the four tabs, and the app frame rising out of its bottom
 * ------------------------------------------------------------------------- */
.rt-pr-showcase {
  width: 100%;
  margin-top: 20px;
}

.rt-pr-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 39px;
  overflow: hidden;
  padding: 20px 10px 0;
  border-radius: 20px;
  background: #f3f5fe;
}

.rt-pr-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.rt-pr-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  overflow: hidden;
  padding: 22px;
  border: 2px solid transparent;
  border-radius: 16px;
  background: linear-gradient(to bottom, #f4f6ff, #fff);
  font: inherit;
  color: #000;
  text-align: left;
  cursor: pointer;
  opacity: 0.5;
  transition:
    opacity 250ms ease,
    border-color 250ms ease,
    box-shadow 250ms ease;
}

/* On the published site TextNode props (the tab text) are light-DOM <span slot> elements. A click
   on them never reaches React (it can't map that target to the tab), so let it fall through to
   the button. */
.rt-pr-tab ::slotted(*) {
  pointer-events: none;
}

.rt-pr-tab:hover {
  opacity: 0.8;
}

.rt-pr-tab.is-active {
  border-color: var(--rt-indigo-100);
  opacity: 1;
  box-shadow: 0 6px 18px rgba(55, 76, 210, 0.1);
}

.rt-pr-tab:focus-visible {
  outline: 3px solid var(--rt-yellow-200);
  outline-offset: 2px;
}

.rt-pr-tab-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.rt-pr-tab-head img {
  flex: none;
  margin-top: 5.5px;
}

.rt-pr-tab-title {
  font-family: var(--rt-font-body);
  font-weight: 700;
  font-size: 24px;
  line-height: 30px;
  padding-top: 2.5px;
}

.rt-pr-tab-text {
  font-family: var(--rt-font-body);
  font-size: 18px;
  line-height: 24px;
}

/* ---- App frame: 920 × 530 in Figma units, including a 4px white border ---- */
.rt-pr-stage-wrap {
  width: 100%;
  max-width: 920px;
  container-type: inline-size;
}

.rt-pr-stage {
  --u: calc(100cqw / 920);
  position: relative;
  width: 100%;
  aspect-ratio: 920 / 530;
}

.rt-pr-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: calc(4 * var(--u)) solid #fff;
  border-bottom: 0;
  border-radius: calc(16 * var(--u)) calc(16 * var(--u)) 0 0;
  background: #e0e0e0;
  box-shadow: 0 calc(4 * var(--u)) calc(8 * var(--u)) rgba(0, 0, 0, 0.15);
}

.rt-pr-svg {
  display: block;
  width: 100%;
  height: auto;
}

.rt-pr-svg text {
  font-family: var(--rt-font-body);
}

.rt-pr-stop {
  font-size: 10px;
  font-weight: 600;
  text-anchor: middle;
  dominant-baseline: central;
  fill: #282828;
}

.rt-pr-stop-sm {
  font-size: 8.5px;
}

.rt-pr-badge {
  font-size: 11px;
  font-weight: 700;
  fill: #fff;
  text-anchor: middle;
}

.rt-pr-pill {
  font-size: 16px;
  font-weight: 600;
  fill: #fff;
}

.rt-pr-h {
  font-size: 16px;
  font-weight: 700;
  fill: #282828;
}

.rt-pr-row {
  font-size: 12px;
  font-weight: 600;
  fill: #282828;
}

.rt-pr-meta {
  font-size: 10.5px;
  fill: #3d4354;
}

.rt-pr-meta-sm {
  font-size: 9px;
}

.rt-pr-tick {
  font-size: 9px;
  fill: #9da1af;
  text-anchor: middle;
}

/* ---------------------------------------------------------------------------
 * Testimonial over a faint hex pattern (Figma 7166:92190 + bg 7166:89077)
 * ------------------------------------------------------------------------- */
.rt-pr-quote-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 120px 24px 96px;
}

.rt-pr-hexes {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* fades in and back out, so nothing is left at the section's bottom edge to clash with the next */
  background: linear-gradient(to bottom, rgba(31, 54, 167, 0), rgba(31, 54, 167, 0.16) 40%, rgba(31, 54, 167, 0.16) 55%, rgba(31, 54, 167, 0));
  mask-size: max(1909px, 140%) auto;
  mask-position: center top;
  mask-repeat: no-repeat;
  -webkit-mask-size: max(1909px, 140%) auto;
  -webkit-mask-position: center top;
  -webkit-mask-repeat: no-repeat;
  pointer-events: none;
}

.rt-pr-quote {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
  margin: 0;
  padding: 40px 36px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 40px rgba(31, 54, 167, 0.06);
}

.rt-pr-quote blockquote {
  margin: 0;
  padding-left: 20px;
  border-left: 4px solid var(--rt-yellow-200);
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.375rem);
  line-height: 1.55;
  color: var(--rt-text-primary);
}

.rt-pr-quote .rt-qa {
  margin-top: 22px;
  padding-left: 24px;
}

/* ---------------------------------------------------------------------------
 * Responsive (only the 1440 layout exists in Figma)
 * ------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .rt-pr-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .rt-pr-inner {
    padding: 96px 16px 0;
  }
  .rt-pr-panel {
    gap: 24px;
    padding: 12px 8px 0;
  }
  .rt-pr-tabs {
    gap: 8px;
  }
  .rt-pr-tab {
    padding: 14px;
  }
  .rt-pr-tab-title {
    font-size: 17px;
    line-height: 22px;
    padding-top: 1px;
  }
  .rt-pr-tab-head img {
    width: 20px;
    height: 20px;
    margin-top: 1px;
  }
  /* Descriptions only on the active tab, under the grid */
  .rt-pr-tab-text {
    display: none;
  }
  .rt-pr-quote-wrap {
    padding: 72px 16px 64px;
  }
  .rt-pr-quote {
    padding: 32px 20px;
  }
}

/* ---------------------------------------------------------------------------
 * Demo plumbing. Every animated piece is .rt-pr-a with an inline animation-name; the
 * keyframes come from Demos.tsx. Nothing animates until the section is in view.
 * ------------------------------------------------------------------------- */
.rt-pr-a {
  animation-fill-mode: both;
  animation-iteration-count: 1;
  animation-timing-function: cubic-bezier(0.45, 0, 0.2, 1);
}
.rt-pr:not(.is-playing) .rt-pr-a {
  animation-name: none !important;
}
.rt-pr .rt-hide {
  opacity: 0;
}
.rt-pr:not(.is-playing) .rt-pr-cursor {
  opacity: 0;
}
.rt-pr-box {
  transform-box: fill-box;
  transform-origin: center;
}
.rt-pr-dash path,
path.rt-pr-dash {
  stroke-dasharray: 1 2;
}
.rt-pr:not(.is-playing) .rt-pr-dash path,
.rt-pr:not(.is-playing) path.rt-pr-dash {
  stroke-dasharray: none;
}
.rt-pr-cursor {
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .rt-pr *,
  .rt-pr *::before,
  .rt-pr *::after {
    animation: none !important;
    transition: none !important;
  }
}

