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

/* ---------------------------------------------------------------------------
 * About us (not in Figma: homepage design language, flag for design review)
 * ------------------------------------------------------------------------- */
.rt-ab {
  font-family: var(--rt-font-body);
  color: var(--rt-text-primary);
  -webkit-font-smoothing: antialiased;
}
.rt-ab *,
.rt-ab *::before,
.rt-ab *::after {
  box-sizing: border-box;
}
.rt-ab-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-ab-sub {
  margin: 18px auto 0;
  max-width: 640px;
  font-family: var(--rt-font-heading);
  font-size: clamp(1.0625rem, 0.95rem + 0.3vw, 1.1875rem);
  line-height: 1.6;
  color: #d6dcff;
  text-wrap: pretty;
}
.rt-ab-sub-dark {
  color: #3c4152;
}

/* ---- Hero: dark navy, the spinning globe (Globe.tsx), the mission and stats on it ---- */
.rt-ab-hero {
  position: relative;
  overflow: hidden;
  padding: var(--pad-top, 180px) 24px 0;
  background:
    radial-gradient(1200px 500px at 50% 0%, rgba(102, 122, 250, 0.22), rgba(102, 122, 250, 0) 70%),
    linear-gradient(to bottom, #0f1546 0%, #131b52 100%);
  color: #fff;
  text-align: center;
}
/* a few stars */
.rt-ab-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 26% 64%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 78% 18%, rgba(255, 255, 255, 0.65), transparent),
    radial-gradient(1px 1px at 88% 52%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 64% 34%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1.5px 1.5px at 40% 12%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1px 1px at 6% 48%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1px 1px at 94% 30%, rgba(255, 255, 255, 0.4), transparent);
  pointer-events: none;
}
.rt-ab-hero-copy {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
}
.rt-ab-eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding: 6px 14px;
  border: 1px solid rgba(143, 160, 255, 0.35);
  border-radius: 999px;
  background: rgba(102, 122, 250, 0.14);
  font-family: var(--rt-font-heading);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #c7cffd;
}
.rt-ab-h1 {
  margin: 0;
  font-family: var(--rt-font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 1.3rem + 3.2vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.rt-ab-globe {
  position: relative;
  height: clamp(260px, 32vw, 460px);
  margin: 40px -24px 0;
}
.rt-ab-globe canvas {
  display: block;
  width: 100%;
  height: 100%;
  /* the globe sinks into the mission band */
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
}
.rt-ab-mission {
  position: relative;
  margin: 0 -24px;
  padding: 24px 24px 104px;
  background: #131b52;
}
.rt-ab-mission-h {
  max-width: 880px;
  margin: 0 auto;
  font-family: var(--rt-font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 1.1rem + 1.8vw, 2.75rem);
  line-height: 1.25;
  text-wrap: balance;
}
.rt-ab-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 980px;
  margin: 48px auto 0;
  padding: 0;
  list-style: none;
}
.rt-ab-stat {
  padding: 26px 24px 24px;
  border: 1px solid rgba(143, 160, 255, 0.28);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(102, 122, 250, 0.16), rgba(102, 122, 250, 0.04));
  text-align: left;
}
.rt-ab-stat-n {
  margin: 0;
  font-family: var(--rt-font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 1.8rem + 1.6vw, 3.25rem);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.rt-ab-stat:nth-child(1) .rt-ab-stat-n { color: #6fe0ee; }
.rt-ab-stat:nth-child(2) .rt-ab-stat-n { color: #9fb0ff; }
.rt-ab-stat:nth-child(3) .rt-ab-stat-n { color: #7ee0bd; }
.rt-ab-stat-n span {
  margin-left: 8px;
  font-family: var(--rt-font-heading);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
}
.rt-ab-stat-l {
  margin: 10px 0 0;
  font-family: var(--rt-font-heading);
  font-size: 16px;
  color: #d6dcff;
}

/* ---- Values ---- */
.rt-ab-values {
  max-width: 1180px;
  margin: 0 auto;
  padding: 120px 24px 40px;
  text-align: center;
}
.rt-ab-values-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}
.rt-ab-value {
  position: relative;
  padding: 30px 30px 32px;
  border: 1px solid #e7eaf6;
  border-radius: 24px;
  background: #fff;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.rt-ab-value:hover {
  border-color: #cfd6fb;
  box-shadow: 0 16px 36px rgba(31, 54, 167, 0.1);
  transform: translateY(-3px);
}
.rt-ab-value-icon {
  display: block;
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
}
.rt-ab-value-n {
  position: absolute;
  top: 28px;
  right: 30px;
  font-family: var(--rt-font-display);
  font-weight: 700;
  font-size: 15px;
  color: #c3cbef;
}
.rt-ab-value h3 {
  margin: 0;
  font-family: var(--rt-font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.3;
}
.rt-ab-value p {
  margin: 10px 0 0;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--rt-text-secondary);
  text-wrap: pretty;
}

/* ---- Origin story: photo + timeline ---- */
.rt-ab-story {
  max-width: 1180px;
  margin: 0 auto;
  padding: 120px 24px 40px;
}
.rt-ab-story-head {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}
.rt-ab-story-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: start;
  gap: 64px;
}
.rt-ab-photo {
  margin: 0;
}
.rt-ab-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 465 / 398;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 24px 56px rgba(31, 54, 167, 0.16);
}
.rt-ab-photo figcaption {
  margin-top: 14px;
  font-family: var(--rt-font-heading);
  font-weight: 600;
  font-size: 15px;
  color: var(--rt-text-secondary);
}
.rt-ab-timeline {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rt-ab-timeline li {
  position: relative;
  padding: 0 0 36px 44px;
}
.rt-ab-timeline li.is-last {
  padding-bottom: 0;
}
/* the route between the stops */
.rt-ab-timeline li::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 26px;
  bottom: -2px;
  border-left: 2.5px dashed #c3cbef;
}
.rt-ab-timeline li.is-last::before {
  display: none;
}
.rt-ab-dot {
  position: absolute;
  left: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  border: 3px solid var(--rt-indigo-100);
  border-radius: 50%;
  background: #fff;
}
.rt-ab-timeline li.is-last .rt-ab-dot {
  border-color: var(--rt-yellow-200);
  background: var(--rt-yellow-200);
  box-shadow: 0 0 0 6px rgba(255, 173, 10, 0.2);
}
.rt-ab-step-label {
  margin: 0;
  font-family: var(--rt-font-heading);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rt-indigo-100);
}
.rt-ab-timeline h3 {
  margin: 4px 0 0;
  font-family: var(--rt-font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.3;
}
.rt-ab-step-text {
  margin: 8px 0 0;
  font-size: 17px;
  line-height: 1.6;
  color: #3c4152;
  text-wrap: pretty;
}

/* ---- Motion: base styles are the final state ---- */
@keyframes rt-ab-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.rt-ab-animate .rt-ab-hero-copy > * {
  animation: rt-ab-up 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.rt-ab-animate .rt-ab-h1 { animation-delay: 80ms; }
.rt-ab-animate .rt-ab-sub { animation-delay: 160ms; }

/* ---- Tablet / phone (layouts not in Figma) ---- */
@media (max-width: 899px) {
  .rt-ab-stats,
  .rt-ab-values-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }
  .rt-ab-story-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .rt-ab-photo {
    max-width: 520px;
  }
}
@media (max-width: 599px) {
  .rt-ab-hero {
    padding: calc(var(--pad-top, 180px) - 60px) 16px 0;
  }
  .rt-ab-globe {
    margin: 32px -16px 0;
  }
  .rt-ab-mission {
    margin: 0 -16px;
    padding: 16px 16px 72px;
  }
  .rt-ab-values,
  .rt-ab-story {
    padding: 88px 16px 24px;
  }
}

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

