/* ==========================================================================
   CTV brand colours (v4.1): Pink → Orange → Blue gradient, used selectively.
   Loaded last, so these values win over earlier theme files.
   ========================================================================== */
:root {
  --brand-grad: linear-gradient(110deg, #EC4899 0%, #F97316 50%, #2563EB 100%);
  --brand-pink: #EC4899;
  --brand-orange: #F97316;
  --brand-blue: #2563EB;

  /* Palette */
  --ink: #172554;            /* primary text */
  --navy-900: #172554;
  --navy-950: #172554;
  --text: #475569;           /* secondary text */
  --muted: #64748b;
  --surface-alt: #F8FAFC;    /* alternate section background */
  --accent-soft: #FFF1F7;    /* light accent background */

  /* Buttons and links */
  --blue-700: #1d4ed8;
  --blue-600: #2563EB;
  --blue-500: #3b82f6;
  --royal: #2563EB;
  --royal-tint: #EFF4FF;
  --grad-brand: var(--brand-grad);

  /* Navbar variables (nav.css) */
  --nav-ink: #172554;
  --nav-muted: #475569;
  --nav-accent: #2563EB;
  --nav-accent-tint: #EFF4FF;
  --nav-navy: #172554;
}
body { color: var(--text); }
h1, h2, h3, h4, h5, .section-title, .hero__title, .page-hero__title { color: var(--ink); }

/* ---------- Gradient text helper ---------- */
.grad-text, .hx-word--grad {
  background: var(--brand-grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
/* Marked hero words share one continuous gradient */
.hx-word--grad {
  background-size: calc(var(--gn, 1) * 100%) 100%;
  background-position: calc(var(--gi, 0) / max(var(--gn, 1) - 1, 1) * 100%) 0;
  padding-bottom: .06em;
}

/* ---------- Primary buttons: blue, with a gradient on hover ---------- */
.c-btn--primary, .hdr__cta, .mnav__quote, .float-btn--quote, .service-cta .c-btn {
  background: var(--brand-blue); background-size: 100% 100%; color: #fff; border-color: transparent;
  box-shadow: 0 10px 22px -12px rgba(37, 99, 235, .7);
  transition: background-color .3s ease, box-shadow .3s ease, transform .3s ease;
}
.c-btn--primary:hover, .hdr__cta:hover, .mnav__quote:hover, .float-btn--quote:hover {
  background: var(--brand-grad); color: #fff; transform: translateY(-1px);
  box-shadow: 0 14px 30px -12px rgba(236, 72, 153, .55);
}
.c-btn--ghost:hover { border-color: var(--brand-blue); color: var(--brand-blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, .08); }

/* ---------- Navigation accents ---------- */
.hdr__indicator { background: var(--brand-grad); height: 3px; }
.hdr .scroll-progress span, .scroll-progress span { background: var(--brand-grad); }
.topbar__promo strong, .topbar__promo .icon { color: var(--brand-pink); }

/* ---------- Section separators: a short gradient bar under section titles ---------- */
.section-head .section-title::after, .sadvis-show .section-title::after, .why .section-title::after {
  content: ""; display: block; width: 56px; height: 4px; margin-top: 16px; border-radius: 4px; background: var(--brand-grad);
}
.section-head[style*="center"] .section-title::after, .text-center .section-title::after { margin-left: auto; margin-right: auto; }

/* ---------- Hero: subtle brand shapes ---------- */
.hero .orb { opacity: .22 !important; filter: blur(60px); }
.hero .orb--1 { background: radial-gradient(circle, #EC4899, transparent 65%) !important; }
.hero .orb--2 { background: radial-gradient(circle, #F97316, transparent 65%) !important; }
.hero .orb--3 { background: radial-gradient(circle, #2563EB, transparent 65%) !important; }
.hero__pill { background: var(--accent-soft); border-color: #fbcfe8; color: var(--ink); }

/* ---------- Selected icons and small elements ---------- */
.services .service-card:hover .service-card__icon,
.why-card:hover .why-card__icon,
.mega2__item:hover .mega2__icon,
.offer:hover .offer__icon { background: var(--brand-grad); color: #fff; }
.services .service-card--ai .service-card__icon, .about-badge__icon, .mock-dash__head .icon, .tech-chip .icon, .mock-phone__head .icon { background: var(--brand-grad); color: #fff; }
.why-card::after { background: var(--brand-grad); }
.testimonial__avatar { background: var(--brand-grad); color: #fff; }
.timeline__step:last-child .timeline__num, .timeline__step:hover .timeline__num { background: var(--brand-grad); border-color: transparent; color: #fff; }
.case__tags li { background: var(--accent-soft); color: #be185d; }
.mock-dash__bars b { background: linear-gradient(180deg, #F97316, #EC4899 60%, #fbcfe8); }

/* ---------- Statistics: gradient numbers on clean white cards ---------- */
.stat-card .stat__num, .stat-card--lead .stat__num {
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.stat-card .stat__num span, .stat-card--lead .stat__num span { color: inherit; -webkit-text-fill-color: transparent; }
.stat-card--lead { background: #fff; border: 1px solid var(--line); }
.stat-card--lead .stat__label { color: var(--muted); }
.stat-card--lead .stat-card__icon { background: var(--brand-grad); color: #fff; }
.stat-card--lead::before { background: radial-gradient(circle, rgba(236, 72, 153, .14), transparent 70%); }
.stat-card::after { content: ""; position: absolute; left: 24px; right: 24px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand-grad); opacity: 0; transition: opacity .3s; }
.stat-card:hover::after, .stat-card--lead::after { opacity: 1; }

/* ---------- Alternate section backgrounds ---------- */
.why, .portfolio:not(.portfolio--page), .techs, .testimonials { background: var(--surface-alt) !important; }

/* ---------- Footer: MSME logo ---------- */
.footer-msme {
  margin: 22px 0 0; display: inline-block; padding: 12px 16px; border-radius: 14px; background: #fff;
  border: 1px solid var(--line); box-shadow: 0 10px 24px -18px rgba(23, 37, 84, .35);
}
.footer-msme img { display: block; width: 190px; height: auto; }

/* ==========================================================================
   Mobile: long card sections become left-to-right swipe rows
   ========================================================================== */
.swipe-dots { display: none; }
@media (max-width: 767.98px) {
  .swipe-x {
    display: flex !important; flex-wrap: nowrap !important; grid-template-columns: none !important;
    gap: 14px !important; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    margin-left: -20px !important; margin-right: -20px !important; padding: 6px 20px 14px !important;
    scroll-padding-left: 20px;
  }
  .swipe-x::-webkit-scrollbar { display: none; }
  .swipe-x > * {
    flex: 0 0 84% !important; max-width: 84% !important; width: auto !important; scroll-snap-align: start;
    margin: 0 !important; grid-column: auto !important; grid-row: auto !important;
  }
  .swipe-x > .is-hidden { display: none !important; }
  .swipe-x:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
  /* Taller content cards fill the row height evenly */
  .swipe-x > .service-card, .swipe-x > .why-card, .swipe-x > .tech-card, .swipe-x > .stat-card, .swipe-x > .industry-tile { height: auto; }
  .case-list.swipe-x > .case { flex-basis: 90% !important; max-width: 90% !important; }
  .stat-grid.swipe-x > * { flex-basis: 64% !important; max-width: 64% !important; }
  .tech-grid.swipe-x > * { flex-basis: 70% !important; max-width: 70% !important; }
  /* Timeline: horizontal steps (the vertical connecting line is hidden) */
  .timeline.swipe-x::before { display: none; }
  .timeline.swipe-x > .timeline__step { flex-basis: 72% !important; max-width: 72% !important; padding: 20px 18px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
  .timeline.swipe-x .timeline__step::before, .timeline.swipe-x .timeline__step::after { display: none; }

  .swipe-dots { display: flex; justify-content: center; gap: 6px; margin: 4px 0 0; }
  .swipe-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 999px; background: #cbd5e1; transition: width .3s ease, background-color .3s ease; }
  .swipe-dots button.is-on { width: 22px; background: var(--brand-grad); }
}
@media (prefers-reduced-motion: reduce) { .swipe-dots button { transition: none; } }

/* SadVis chatbot bubble (bottom-right): step aside while the mobile menu or the quote form is open,
   so it doesn't sit on top of their buttons. The chat itself is untouched. */
html.mnav-lock #sadvis-chatbot-frame,
body.modal-open #sadvis-chatbot-frame { visibility: hidden; }

/* Social icons: on hover the button turns blue and the icon turns white (everywhere they appear) */
.social-list a:hover, .social-list a:focus-visible,
.site-footer .social-list a:hover, .site-footer .social-list a:focus-visible,
.topbar__social a:hover, .topbar__social a:focus-visible,
.mnav__social a:hover, .mnav__social a:focus-visible {
  background: var(--brand-blue); border-color: var(--brand-blue); color: #fff !important;
}
.social-list a:hover .icon, .social-list a:focus-visible .icon,
.topbar__social a:hover .icon, .topbar__social a:focus-visible .icon,
.mnav__social a:hover .icon, .mnav__social a:focus-visible .icon { color: #fff !important; fill: currentColor; }

/* Longer testimonials: keep paragraph spacing tidy */
.testimonial__text p + p { margin-top: .7em; }

/* Long testimonials: show about seven lines, with "Read more" to open the rest */
.testimonial__text.is-clamped {
  max-height: 11.6em; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent);
  mask-image: linear-gradient(180deg, #000 72%, transparent);
}
.testimonial__more {
  align-self: flex-start; margin: -4px 0 14px; padding: 0; border: 0; background: none;
  font: inherit; font-size: .92rem; font-weight: 600; color: var(--brand-blue); cursor: pointer;
  text-decoration: underline; text-decoration-color: rgba(37, 99, 235, .35); text-underline-offset: 4px;
}
.testimonial__more:hover { text-decoration-color: currentColor; }
