
:root {
  /* === COLOR SYSTEM === */
  /* Brand colors */
  --color-primary: #29294c;
  --color-secondary: #ff6b00;
  --color-accent: #0099ff;
  
  /* Gradient colors */
  --color-purple: #9b4dff;
  --color-magenta: #c64dd9;
  --color-pink: #ff5f83;
  --color-salmon: #ff845a;
  --color-orange: #ff9c45;
  
  /* Semantic colors */
  --color-success: #28a745;
  --color-warning: #ffc107;
  --color-error: #dc3545;
  --color-info: #17a2b8;
  
  /* UI colors */
  --color-background: #f4f4f4;
  --color-surface: #ffffff;
  --color-surface-alt: #f9f9f9;
  --color-border: #e0e0e0;
  --color-text: #29294c;
  --color-text-light: #6b7280;
  --color-text-muted: #9ca3af;
  
  /* === SPACING SYSTEM === */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  
  /* === TYPOGRAPHY === */
  --font-family-primary: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-base: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* === LAYOUT === */
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  --border-radius-xl: 20px;
  --border-radius-full: 9999px;
  
  /* === SHADOWS === */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(0, 153, 255, 0.3);
  
  /* === ANIMATION === */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Loader geometry */
  --dot-d: 8px;
  --pill-w: 40px;
  --seg-h: 8px;
  --gap: 8px;
  --cycle: 1.4s;
  --travel: 60px;
  
  /* === BREAKPOINTS === */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
}
    
/* === BASE STYLES === */
body {
  margin: 0;
  font-family: var(--font-family-primary);
  background-image: url('assets/bg.png');
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
  background-size: cover;
  background-color: var(--color-background);
  color: var(--color-text);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
}

/* === UTILITY CLASSES === */
.u-text-center { text-align: center; }
.u-text-left { text-align: left; }
.u-text-right { text-align: right; }
.u-mb-sm { margin-bottom: var(--spacing-sm); }
.u-mb-md { margin-bottom: var(--spacing-md); }
.u-mb-lg { margin-bottom: var(--spacing-lg); }
.u-p-sm { padding: var(--spacing-sm); }
.u-p-md { padding: var(--spacing-md); }
.u-p-lg { padding: var(--spacing-lg); }
.u-rounded-sm { border-radius: var(--border-radius-sm); }
.u-rounded-md { border-radius: var(--border-radius-md); }
.u-rounded-lg { border-radius: var(--border-radius-lg); }
.u-shadow-sm { box-shadow: var(--shadow-sm); }
.u-shadow-md { box-shadow: var(--shadow-md); }
.u-shadow-lg { box-shadow: var(--shadow-lg); }

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
  body {
    background-attachment: scroll;
    background-position: top;
    background-size: contain;
  }
  
  #chatPopup {
    width: 95%;
    height: 95%;
    flex-direction: column;
  }
  
  #chatRight {
    flex: 1;
    padding: var(--spacing-md);
  }
  
  #chatLeft {
    flex: none;
    height: 50%;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }
  
  .slide-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }
  
  .main-grid {
    grid-template-columns: 1fr;
  }
  
  .products {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }
}

@media (max-width: 480px) {
  #launcher {
    bottom: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-xs);
  }
  
  #chatPopup {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
  
  .slide-grid {
    grid-template-columns: 1fr;
    padding: var(--spacing-md);
  }
  
  .slide-tile {
    height: auto;
    padding: var(--spacing-md);
  }
  
  .demo-box {
    padding: var(--spacing-md);
    margin: var(--spacing-sm);
  }
  
  .product-links,
  .service-links {
    grid-template-columns: 1fr;
  }
}

/* === CHAT LAUNCHER === */
#launcher {
  position: fixed;
  bottom: var(--spacing-lg);
  left: 50%;
  transform: translateX(-50%);
  padding: var(--spacing-md) var(--spacing-lg);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  cursor: pointer;
  z-index: 9999;
  
  background: var(--color-primary);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--border-radius-full);
  border: 1px solid rgba(255, 255, 255, 0.2);
  
  box-shadow: var(--shadow-glow);
  color: var(--color-surface);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  
  transition: var(--transition-normal);
  overflow: hidden;
}

#launcher:hover {
  transform: translateX(-50%) scale(1.05);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
}

    @media (max-width: 480px) {
      #launcher {
        bottom: 16px;
      }
    }

    @keyframes siriPulse {
      0% {
        box-shadow:
          0 0 8px rgba(0, 153, 255, 0.4),
          0 0 20px rgba(0, 153, 255, 0.25),
          inset 0 0 10px rgba(255, 255, 255, 0.1);
      }

      50% {
        box-shadow:
          0 0 12px rgba(0, 153, 255, 0.6),
          0 0 28px rgba(0, 153, 255, 0.35),
          inset 0 0 12px rgba(255, 255, 255, 0.15);
      }

      100% {
        box-shadow:
          0 0 8px rgba(0, 153, 255, 0.4),
          0 0 20px rgba(0, 153, 255, 0.25),
          inset 0 0 10px rgba(255, 255, 255, 0.1);
      }
    }

    #launcher.glow {
      animation: siriPulse 2s infinite ease-in-out;
    }

    #chatPromptText {
      color: #fff;
      font-size: 18px;
    }

    #chatContainer {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      background: rgba(0, 0, 0, 0.3);
      display: none;
      justify-content: center;
      align-items: center;
      z-index: 1000;
    }

    #chatPopup {
      background: #fff;
      border-radius: 20px;
      display: flex;
      width: 95%;
      height: 90%;
      overflow: hidden;
      box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
    }

    #chatLeft {
      flex: 1;
      display: flex;
      flex-direction: column;
      padding: 20px;
      position: relative;
      border-right: 1px solid #eee;
      background: #f9f9f9;
    }

    #chatRight {
      flex: 2;
      background: #fafafa;
      padding: 30px;
      position: relative;
      display: flex;
      flex-direction: column;
      align-items: center;
      overflow: hidden;
    }

    #closeBtn {
      position: absolute;
      top: 20px;
      right: 30px;
      font-size: 30px;
      font-weight: bold;
      color: #29294c;
      cursor: pointer;
    }

    #logo {
      width: 200px;
      margin-bottom: 20px;
    }

    #messages {
      flex: 1;
      overflow-y: auto;
      padding-right: 10px;
    }

    .msg {
      padding: 10px 20px;
      margin-top: 7px;
      margin-bottom: 6px;
      border-radius: 12px;
      max-width: 95%;
      white-space: pre-wrap;
      font-size: 13px;
      word-break: break-word;
      overflow-wrap: break-word;
      line-height: 1.6;
    }
    

    .msg.bot h4 {
      margin-top: 7px;
      margin-bottom: 6px;
      font-weight: bold;
      font-size: 15px;
    }

    .msg.bot {
      animation: fadeInUp 0.4s ease;
      white-space: pre-line;
    }

    .msg.bot.loading {
      font-style: italic;
      color: #888;
      margin-top: 10px;
    }

    .typing-indicator {
      font-size: 14px;
    }

    .typing-indicator .dots {
      display: inline-block;
      width: 20px;
    }

    @keyframes fadeInUp {
      from {
        opacity: 0;
        transform: translateY(12px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .user {
      align-self: flex-end;
      background: #e6eefc;
    }

    .bot {
      align-self: flex-start;
      background: #f3f3f3;
    }

    .bot a {
      color: #3366cc;
      text-decoration: underline;
    }

    .demo-cta {
      background: #ff6b00;
      color: white;
      font-weight: bold;
      font-size: 15px;
      padding: 10px 20px;
      border: none;
      border-radius: 25px;
      cursor: pointer;
      transition: background 0.3s ease;
      position: absolute;
      top: 20px;
      right: 20px;
    }

    .demo-cta:hover {
      background: #e65c00;
    }

    #inputArea {
      position: relative;
      display: flex;
      width: 100%;
      margin-top: 12px;
    }

    #inputBox {
      flex: 1;
      padding: 12px 38px 12px 12px;
      border-radius: 30px;
      border: 1px solid rgba(0, 153, 255, 0.5);
      background: rgba(255, 255, 255, 0.08);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      color: #000;
      opacity: 0.6;
      font-size: 15px;
      font-weight: 500;
      box-shadow:
        0 0 8px rgba(0, 153, 255, 0.4),
        0 0 20px rgba(0, 153, 255, 0.25),
        inset 0 0 10px rgba(255, 255, 255, 0.1);
      outline: none;
      transition: box-shadow 0.3s ease, border-color 0.3s ease;
    }

    #inputBox::placeholder {
      color: #000;
      opacity: 0.6;
    }

    #inputBox:focus {
      border-color: rgba(0, 153, 255, 0.8);
      box-shadow:
        0 0 12px rgba(0, 153, 255, 0.6),
        0 0 28px rgba(0, 153, 255, 0.4),
        inset 0 0 12px rgba(255, 255, 255, 0.15);
    }

    #sendIcon {
      position: absolute;
      right: 10px;
      top: 50%;
      transform: translateY(-50%);
      width: 20px;
      height: 20px;
      fill: #29294C;
      cursor: pointer;
      display: none;
    }

    #slidePreview {
      width: 100%;
      height: 100%;
      padding: 20px;
      box-sizing: border-box;
      display: none;
      margin: 30px;
      position: relative;
    }

    #slidePreview h2 {
      font-size: 20px;
      font-weight: 700;
      margin-bottom: 20px;
      color: #111;
    }

    .slide-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      /* 3 per row */
      gap: 20px;
      width: 100%;
      padding: 20px;
      box-sizing: border-box;

      background-image: url('assets/PPT-bg.png');
      background-size: cover;
      background-position: center;
      border-radius: 10px;
    }

    .slide-tile {
      background: #fff;
      border-radius: 12px;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
      padding: 20px;
      text-align: center;
      transition: transform 0.2s ease;
      cursor: pointer;
      min-height: 120px;
    }

    .slide-tile:hover {
      transform: scale(1.03);
      box-shadow: 0 0 10px rgba(0,0,0,0.15);
      cursor: pointer;
    }

    .slide-tile img {
      height: 50px;
      margin-bottom: 10px;
      object-fit: contain;
    }

    .slide-tile h3 {
      margin: 0;
      font-size: 16px;
      font-weight: 600;
      color: #000;

      white-space: normal;     /* ✅ allows wrapping */
      overflow: visible;       /* ✅ shows full content */
      text-overflow: unset;    /* ✅ disables truncation */
      line-height: 1.4;        /* ✅ slightly better spacing */
    }

    #contactForm {
      display: none;
      width: 100%;
      height: 100%;
      padding: 20px;
      box-sizing: border-box;
      justify-content: center;
      align-items: center;
      color: #29294c;
    }

    #contactForm select {
      color: #29294c;
      opacity: 0.7;
    }

    #contactForm input[type="email"] {
      color: #29294c;
    }

    #contactForm input::placeholder {
      color: #29294c;
      opacity: 0.7;
    }

    .demo-box {
      background: #fff;
      padding: 28px;
      border-radius: 16px;
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
      max-width: 480px;
      width: 100%;
      text-align: center;
      box-sizing: border-box;
    }

    .demo-box input,
    .demo-box select {
      width: 100%;
      margin: 10px 0;
      padding: 12px 16px;
      font-size: 15px;
      border-radius: 24px;
      border: 1px solid #ccc;
      box-sizing: border-box;
    }

    .demo-box button {
      width: 45%;
      margin: 10px 0 0 0;
      padding: 10px 0;
      font-size: 15px;
      border-radius: 24px;
      border: none;
      background: #ff6b00;
      color: #fff;
      font-weight: bold;
      cursor: pointer;
      transition: background 0.3s ease;
    }

    .demo-box button:hover {
      background: #e55a00;
    }

    .demo-box label {
      display: flex;
      align-items: center;
      gap: 8px;
      justify-content: flex-start;
      margin-top: 12px;
      cursor: pointer;
    }

    .demo-box label input[type="checkbox"] {
      width: 12px;
      height: 12px;
      cursor: pointer;
      margin: 0;
    }

    .demo-box label span {
      line-height: 1.4;
      font-size: 14px;
      color: #29294c;
    }

    .demo-box label span a {
      color: #f57c00;
      text-decoration: none;
    }

    .demo-box label span a:hover {
      text-decoration: underline;
    }

    .demo-box img {
      display: block;
      margin: 15px auto;
      height: 50px;
    }

    .demo-box p {
      margin-top: 15px;
      font-size: 14px;
      color: #666;
    }

    .demo-box p span {
      color: #f57c00;
      font-weight: bold;
    }

    #chatPromptText.typewriter {
      display: inline-block;
      overflow: hidden;
      border-right: 2px solid rgba(255, 255, 255, 0.75);
      white-space: nowrap;
      animation:
        typing 3s steps(40, end) infinite,
        blink 0.75s step-end infinite;
      animation-direction: alternate;
      animation-timing-function: steps(40, end);
    }

    @keyframes typing {
      from {
        width: 0;
      }

      to {
        width: 100%;
      }
    }

    @keyframes blink {

      0%,
      100% {
        border-color: transparent;
      }

      50% {
        border-color: rgba(255, 255, 255, 0.75);
      }
    }

    .chat-footer {
      position: absolute;
      bottom: 20px;
      right: 30px;
      font-size: 12px;
      color: #29294c;
    }

    .submenu {
      width: 100%;
      margin: auto;
      display: flex;
      background-color: white;
      border-radius: 0.75rem;
      overflow: hidden;
      box-shadow: 0 0 10px rgba(128, 90, 213, 0.3);
      /* purple shadow */
    }

    .container {
      width: 100%;
      display: flex;
      flex-direction: column;
      background-color: white;
      border-radius: 0.75rem;
    }

    .main-grid {
      display: grid;
      grid-template-columns: 2fr 1fr;
      width: 100%;
    }

    .products,
    .services {
      padding: 1.5rem;
      border-right: 1px solid #ddd;
    }

    .section-title {
      font-size: 1.875rem;
      font-weight: bold;
      color: #29294c;
      ;
      /* indigo-100 */
      margin-bottom: 1rem;
    }

    .product-links,
    .service-links {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1rem;
    }

    .product-item,
    .service-item,
    .footer-item {
      display: flex;
      flex-direction: column;
      padding: 0.75rem;
      border-radius: 0.375rem;
      transition: background 0.3s ease;
      text-decoration: none;
    }

    .product-item:hover,
    .service-item:hover,
    .footer-item:hover {
      background-color: #fff7ed;
      /* lightOrange */
      border-radius: 0.5rem;
    }

    .item-header {
      display: flex;
      align-items: center;
    }

    .item-header p {
      margin: 0 0 0 0.5rem;
      font-weight: bold;
      font-size: 14px;
      color: #4b5563;
      /* gray-700/gray-250 */
    }

    .item-desc {
      color: #6b7280;
      /* gray-500/gray-200 */
      font-size: 12px;
      margin: 0.5rem 0 0 2.5rem;
    }

    .footer-links {
      display: grid;
      grid-template-columns: 1fr 1fr;
      background-color: #f4f7ff;
      /* purple-100 */
      padding: 1rem;
      border-radius: 0 0 0.75rem 0.75rem;
    }

    .logo-image {
      position: absolute;
      top: 0px;
      right: 15px;
      width: 145px;
      height: auto;
    }
  
    /* Chat message bubbles */
    .user-msg, .bot-msg {
      background: #fff;
      padding: 12px 16px;
      margin: 10px;
      border-radius: 12px;
      max-width: 90%;
      line-height: 1.5;
      font-size: 15px;
    }

    .user-msg {
      align-self: flex-end;
      background-color: #dcf8c6;
      color: #333;
    }

    @keyframes slideUp {
      from {
        opacity: 0;
        transform: translateY(40px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .bot-msg {
      align-self: flex-start;
      background-color: #f1f1f1;
      color: #29294C;
      animation: slideUp 0.4s ease-out;
    }

  /* Follow-up question buttons */
  .followup-btn {
    margin: 6px 4px;
    padding: 8px 12px;
    background-color: #f0f4f8;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
  }

  .followup-btn:hover {
    background-color: #e0e7ef;
  }

  /* Slide visuals */
  .slide-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 40px;
    height: 100%;
  }

  .slide-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem;
  }

  .slide-tile {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(14px);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    width: 180px;
    height: 180px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    cursor: pointer;
    text-align: center;
  }

  .slide-tile:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.2);
  }

  .slide-tile img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-bottom: 12px;

    /* Ensure visibility */
    opacity: 1 !important;
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.2));
    transition: transform 0.2s ease;
  }

  .slide-tile:hover img {
    transform: scale(1.1);
    filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.3));
  }

  /* Optional enhancement: white glow on dark SVG */
  .slide-tile img[src$=".svg"] {
    background-color: rgba(255, 255, 255, 0.1); /* soft white glow */
    border-radius: 8px;
    padding: 6px;
  }

  .slide-tile h3 {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    margin: 0;
  }

  .slide-tile img {
    transition: opacity 0.3s ease-in;
    opacity: 0;
  }

  .slide-tile img[loading] {
    opacity: 1;
  }

  @media (prefers-color-scheme: dark) {
    .slide-tile img[src$=".svg"] {
      background-color: rgba(255, 255, 255, 0.2);
    }
  }

  .inline-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 8px;
  }
  .followups {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .followup-btn {
    background-color: #eef;
    border: none;
    border-radius: 20px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
  }

  .followup-btn:hover {
    background-color: #dde;
  }

  .followup-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
    margin-bottom: 2rem;
  }

  .followup-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .followup-list li {
    color: black;
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    max-width: 500px;
    box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;
    transition: background 0.2s ease;
  }

  .followup-list li:hover {
    background: #e06f00;
    color: white;
  }

  /* Animate bot messages sliding up */
  .slide-up {
      animation: slideUp 0.4s ease-out;
  }

  @keyframes slideUp {
      from {
          opacity: 0;
          transform: translateY(30px);
      }
      to {
          opacity: 1;
          transform: translateY(0);
      }
  }

  .loading-text {
    font-style: italic;
    color: #555;
    margin: 10px 20px;
    animation: fadeInUp 0.5s ease;
  }

  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(15px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .typing-indicator {
    font-style: italic;
    opacity: 0.8;
    animation: fadeIn 0.4s ease-in-out;
  }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
  }


  /* =======  Optional size presets via data‑size  ======= */
  .copilot-loader[data-size="sm"] {
    --dot-d: 6px; --pill-w: 28px; --seg-h: 6px; --gap: 6px; --travel: 48px;
  }
  .copilot-loader[data-size="lg"] {
    --dot-d: 12px; --pill-w: 56px; --seg-h: 12px; --gap: 10px; --travel: 72px;
  }

  /* =======  Loader container  ======= */
  .copilot-loader {
    display: flex;
    gap: var(--gap);
    align-items: center;
    overflow: hidden; /* hide travel overshoot */
  }

  /* =======  Individual segment (dot or pill)  ======= */
  .seg {
    flex: 0 0 auto;
    height: var(--seg-h);
    border-radius: 9999px;
    opacity: 0;
    transform: translateX(calc(-1 * var(--travel)));
    animation: travel var(--cycle) cubic-bezier(0.4,0,0.2,1) infinite;
  }

  /* Dot vs pill geometry */
  .dot  { width: var(--dot-d); }
  .pill { width: var(--pill-w); }

  /* =======  Colours & stagger  ======= */
  .seg:nth-child(1) {
    background: var(--color-purple);
    animation-delay: calc(0 * var(--cycle) / 10);
  }
  .seg:nth-child(2) {
    background: linear-gradient(90deg, var(--color-purple) 0%, var(--color-magenta) 100%);
    animation-delay: calc(1 * var(--cycle) / 10);
  }
  .seg:nth-child(3) {
    background: var(--color-pink);
    animation-delay: calc(2 * var(--cycle) / 10);
  }
  .seg:nth-child(4) {
    background: linear-gradient(90deg, var(--color-pink) 0%, var(--color-salmon) 100%);
    animation-delay: calc(3 * var(--cycle) / 10);
  }
  .seg:nth-child(5) {
    background: var(--color-orange);
    animation-delay: calc(4 * var(--cycle) / 10);
  }

  /* =======  Keyframes  ======= */
  @keyframes travel {
    0%   { opacity: 0; transform: translateX(calc(-1 * var(--travel))); }
    10%  { opacity: 1; }
    90%  { opacity: 1; transform: translateX(var(--travel)); }
    100% { opacity: 0; transform: translateX(var(--travel)); }
  }

  /* =======  Reduced‑motion fallback  ======= */
  @media (prefers-reduced-motion: reduce) {
    .seg {
      animation: none;
      opacity: 1;
      transform: none;
    }
  }