/* ==========================================================================
   BRN Global Business Services, Design System
   Tokens derived from brand brief: blue/purple palette, Sora/Inter/Space Grotesk
   ========================================================================== */

:root {
  /* --- Brand color tokens (from brief, exact hexes) --- */
  --brn-primary:         #3B82F6;   /* sky blue  */
  --brn-primary-dark:    #2563EB;   /* deeper blue */
  --brn-secondary:       #8B5CF6;   /* soft violet */
  --brn-secondary-light: #A78BFA;   /* lavender */
  --brn-accent:          #22D3EE;   /* light cyan */
  --brn-navy:            #1E40AF;   /* soft navy */
  --brn-navy-deep:       #1E3A8A;   /* deeper navy */

  --bg-white:  #FFFFFF;
  --bg-soft:   #F0F9FF;   /* ice-blue off-white */
  --bg-tint:   #EFF6FF;   /* lightest blue tint */

  --text-primary:       #1E3A5F;   /* soft navy headings */
  --text-secondary:     #475569;   /* readable medium slate */
  --text-muted:         #94A3B8;   /* light grey muted */
  --text-on-dark:       #E0F2FE;   /* light blue on dark */
  --text-on-dark-muted: #BAE6FD;   /* lighter on dark */

  --border-soft: #DBEAFE;   /* light blue border */
  --border-tint: #EFF6FF;   /* barely-there border */

  /* --- Gradients — light, airy palette --- */
  --grad-primary: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
  --grad-navy:    linear-gradient(135deg, #1E3A8A 0%, #2563EB 55%, #60A5FA 100%);
  --grad-accent:  linear-gradient(120deg, #22D3EE 0%, #3B82F6 100%);
  --grad-text:    linear-gradient(120deg, #3B82F6 0%, #8B5CF6 100%);

  /* --- Type --- */
  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-data: 'Space Grotesk', sans-serif;

  /* --- Spacing scale --- */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;

  /* --- Radius / shadow --- */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 10px 40px rgba(59, 130, 246, 0.18);

  --container-w: 1240px;
  --header-h: 80px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-white);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

::selection { background: var(--brn-secondary-light); color: #fff; }

/* Safety net: headings nested in known dark/navy-gradient containers must
   always render white. Bare h1-h6 color rules above have higher specificity
   than inherited color, so any dark-bg section needs an explicit override -
   this catches cases even if a component-specific rule is missed. */
.hero h1, .hero h2, .hero h3,
.page-hero h1, .page-hero h2, .page-hero h3,
.cta-band h1, .cta-band h2, .cta-band h3,
.site-footer h1, .site-footer h2, .site-footer h3, .site-footer h4,
.sidebar-cta h1, .sidebar-cta h2, .sidebar-cta h3 {
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--brn-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Layout helpers --- */
.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: var(--space-2xl) 0; }
.section-tight { padding: var(--space-xl) 0; }

@media (max-width: 768px) {
  .section { padding: var(--space-xl) 0; }
  .section-tight { padding: var(--space-lg) 0; }
}

.section-bg-soft { background: var(--bg-soft); }
.section-bg-tint { background: var(--bg-tint); }

.section-head {
  max-width: 680px;
  margin: 0 auto var(--space-xl);
  text-align: center;
}
.section-head.align-left { margin-left: 0; text-align: left; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-data);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brn-primary);
  background: var(--bg-tint);
  padding: 7px 16px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-sm);
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brn-accent);
}

.section-head h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  margin-bottom: var(--space-sm);
}
.section-head p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.text-gradient {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform 0.25s ease; }

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 50px rgba(59, 130, 246, 0.25); }

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border-soft);
}
.btn-outline:hover { border-color: var(--brn-primary); color: var(--brn-primary); transform: translateY(-2px); }

.btn-on-dark {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(8px);
}
.btn-on-dark:hover { background: rgba(255,255,255,0.16); transform: translateY(-2px); }

.btn-block { width: 100%; }
.btn:hover svg.arrow { transform: translateX(3px); }

/* --- Card base --- */
.card {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

/* --- Glass effect (used sparingly: hero stat strip, header on scroll) --- */
.glass {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.14);
}

/* --- Scroll reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { transition-delay: calc(var(--i, 0) * 90ms); }

/* --- Badges / pills --- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-tint);
  color: var(--brn-primary-dark);
}

/* --- Utility --- */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-sm { gap: var(--space-sm); }
.text-center { text-align: center; }
.mt-lg { margin-top: var(--space-lg); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

.skip-link {
  position: absolute;
  top: -50px;
  left: 16px;
  background: var(--brn-navy);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  z-index: 200;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 16px; }

/* ==========================================================================
   Section alternating backgrounds, blue / white / soft pattern like 247.ai
   Applied with .sec-blue / .sec-white / .sec-soft / .sec-dark
   ========================================================================== */
.sec-blue {
  background: linear-gradient(135deg, #1F2937 0%, #3B82F6 60%, #64748B 100%);
  color: #fff;
}
.sec-blue h2, .sec-blue h3, .sec-blue h4 { color: #fff; }
.sec-blue p { color: rgba(255,255,255,0.82); }

.sec-white { background: #fff; }

.sec-soft { background: #F0F4FF; }

.sec-dark {
  background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 55%, #60A5FA 100%);
  color: #fff;
}
.sec-dark h2, .sec-dark h3, .sec-dark h4, .sec-dark p { color: #fff; }

.sec-accent {
  background: linear-gradient(120deg, #F9FAFB 0%, #EDE9FE 100%);
}

/* Pricing page specific */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-lg);
}
@media (max-width: 900px) { .pricing-grid { grid-template-columns: 1fr; } }

.pricing-card {
  background: #fff;
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.pricing-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.pricing-card.featured {
  border-color: var(--brn-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15), var(--shadow-lg);
}
.pricing-card .badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--grad-primary); color: #fff;
  font-size: 0.75rem; font-weight: 700; padding: 5px 18px;
  border-radius: var(--radius-full); white-space: nowrap;
  font-family: var(--font-data);
}
.pricing-card .plan-name {
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 700;
  margin-bottom: 8px;
}
.pricing-card .plan-price {
  font-family: var(--font-data); font-size: 2.8rem; font-weight: 700;
  color: var(--brn-primary); margin: 16px 0 4px;
  display: flex; align-items: flex-start; justify-content: center; gap: 2px;
}
.pricing-card .plan-price sup { font-size: 1.2rem; margin-top: 10px; }
.pricing-card .plan-price sub { font-size: 0.95rem; align-self: flex-end; margin-bottom: 8px; color: var(--text-secondary); }
.pricing-card .plan-desc { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 24px; }
.pricing-card .plan-features { text-align: left; margin-bottom: 28px; display: flex; flex-direction: column; gap: 10px; }
.pricing-card .plan-features li { display: flex; gap: 10px; font-size: 0.9rem; align-items: flex-start; }
.pricing-card .plan-features li svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; }
.pricing-card .plan-features li.check svg { color: var(--brn-primary); }
.pricing-card .plan-features li.cross svg { color: var(--text-muted); }
.pricing-card .plan-features li.cross { color: var(--text-muted); }

/* Partners / Refer page */
.partner-types-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md);
}
@media (max-width: 900px) { .partner-types-grid { grid-template-columns: 1fr; } }
.partner-type-card {
  padding: 32px 26px; text-align: center;
}
.partner-type-card .ic {
  width: 64px; height: 64px; margin: 0 auto 20px;
  border-radius: 18px; display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; background: var(--grad-primary); color: #fff;
}
.partner-type-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.partner-type-card p { font-size: 0.9rem; color: var(--text-secondary); }

/* Careers page */
.dept-filter { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: var(--space-lg); }
.dept-filter button {
  padding: 9px 18px; border-radius: var(--radius-full); font-size: 0.86rem; font-weight: 600;
  border: 1.5px solid var(--border-soft); color: var(--text-secondary); transition: all 0.2s ease;
}
.dept-filter button.is-active, .dept-filter button:hover {
  background: var(--grad-primary); color: #fff; border-color: transparent;
}
.jobs-list { display: flex; flex-direction: column; gap: 16px; }
.job-card {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 28px; flex-wrap: wrap;
}
.job-card:hover { transform: translateX(4px); }
.job-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.job-card .meta-tags { display: flex; gap: 10px; flex-wrap: wrap; }
.job-card .tag-pill {
  font-size: 0.76rem; font-weight: 600; padding: 4px 12px;
  border-radius: var(--radius-full); background: var(--bg-tint); color: var(--brn-primary-dark);
}

/* Culture value grid */
.culture-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md);
}
@media (max-width: 900px) { .culture-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .culture-grid { grid-template-columns: 1fr; } }
.culture-card {
  padding: 28px 22px; text-align: center;
}
.culture-card .num {
  font-family: var(--font-data); font-size: 2.2rem; font-weight: 700;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 12px;
}

/* Case studies enhanced */
.cs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
@media (max-width: 980px) { .cs-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cs-grid { grid-template-columns: 1fr; } }

.cs-card { overflow: hidden; display: flex; flex-direction: column; }
.cs-card .cs-thumb {
  height: 160px;
  background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 55%, #60A5FA 100%);
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.cs-card .cs-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.cs-card .cs-cat { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--brn-primary); margin-bottom: 10px; }
.cs-card .cs-title { font-size: 1.05rem; margin-bottom: 14px; flex: 1; }
.cs-card .cs-metrics { display: flex; gap: 24px; padding-top: 16px; border-top: 1px solid var(--border-soft); margin-top: auto; }
.cs-card .cs-metrics div strong { display: block; font-family: var(--font-data); font-size: 1.5rem; font-weight: 700; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cs-card .cs-metrics div span { font-size: 0.72rem; color: var(--text-muted); }
.cs-card .read-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.86rem; font-weight: 600; color: var(--brn-primary); margin-top: 16px; }
.cs-card .read-link svg { width: 14px; height: 14px; transition: transform 0.2s ease; }
.cs-card:hover .read-link svg { transform: translateX(4px); }

/* Industry section */
.industry-tabs-wrap { position: relative; }
.industry-tab-bar {
  display: flex; gap: 0; flex-wrap: wrap; border-bottom: 2px solid var(--border-soft); margin-bottom: var(--space-lg);
}
.industry-tab-bar button {
  padding: 12px 22px; font-size: 0.9rem; font-weight: 600;
  color: var(--text-secondary); border: none; background: none;
  border-bottom: 3px solid transparent; margin-bottom: -2px; transition: all 0.2s ease;
}
.industry-tab-bar button.is-active { color: var(--brn-primary); border-bottom-color: var(--brn-primary); }
.industry-tab-bar button:hover { color: var(--brn-primary-dark); }
.industry-panel { display: none; }
.industry-panel.is-active { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); align-items: center; }
@media (max-width: 860px) { .industry-panel.is-active { grid-template-columns: 1fr; } }
.industry-panel-content h3 { font-size: 1.6rem; margin-bottom: 14px; }
.industry-panel-content p { color: var(--text-secondary); margin-bottom: var(--space-md); }
.industry-panel-visual {
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 55%, #60A5FA 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 4rem;
}
.industry-kpis { display: flex; gap: var(--space-md); flex-wrap: wrap; }
.industry-kpi { background: var(--bg-tint); padding: 16px 20px; border-radius: var(--radius-md); }
.industry-kpi strong { display: block; font-family: var(--font-data); font-size: 1.4rem; color: var(--brn-primary); }
.industry-kpi span { font-size: 0.8rem; color: var(--text-secondary); }

/* Services overview page (like 247.ai/cx-services) */
.services-overview-hero {
  background: linear-gradient(135deg, #1E40AF 0%, #3B82F6 100%);
}
.service-overview-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-md);
}
@media (max-width: 800px) { .service-overview-grid { grid-template-columns: 1fr; } }
.service-overview-card {
  display: flex; gap: 20px; padding: 28px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-overview-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.service-overview-card .ic {
  flex-shrink: 0; width: 52px; height: 52px;
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: var(--grad-primary); color: #fff;
}
.service-overview-card .ic svg { width: 26px; height: 26px; }
.service-overview-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.service-overview-card p { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 12px; }
.service-overview-card .card-link { font-size: 0.84rem; font-weight: 600; color: var(--brn-primary); display: inline-flex; align-items: center; gap: 4px; }
.service-overview-card .card-link svg { width: 13px; height: 13px; transition: transform 0.2s ease; }
.service-overview-card:hover .card-link svg { transform: translateX(3px); }

/* Contact page file upload */
.file-upload-area {
  border: 2px dashed var(--border-tint);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  position: relative;
}
.file-upload-area:hover, .file-upload-area.drag-over { border-color: var(--brn-primary); background: var(--bg-tint); }
.file-upload-area input[type=file] { position: absolute; top:0;left:0;right:0;bottom:0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.file-upload-area .ic { width: 44px; height: 44px; margin: 0 auto 12px; background: var(--bg-tint); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--brn-primary); }
.file-upload-area .ic svg { width: 22px; height: 22px; }
.file-upload-area p { font-size: 0.9rem; color: var(--text-secondary); }
.file-upload-area strong { color: var(--brn-primary); }
.file-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.file-list .file-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--bg-soft); border-radius: 8px; font-size: 0.84rem; }
.file-list .file-item svg { width: 16px; height: 16px; color: var(--brn-primary); flex-shrink: 0; }
.file-list .file-item .remove-file { margin-left: auto; cursor: pointer; color: var(--text-muted); }

/* Enquiry type radio selector */
.enquiry-type-grid { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.enquiry-radio input { display: none; }
.enquiry-radio label {
  display: flex; align-items: center; gap: 8px; padding: 10px 18px;
  border-radius: var(--radius-full); border: 1.5px solid var(--border-soft);
  cursor: pointer; font-size: 0.88rem; font-weight: 500;
  transition: all 0.2s ease;
}
.enquiry-radio label svg { width: 16px; height: 16px; }
.enquiry-radio input:checked + label {
  border-color: var(--brn-primary); background: var(--bg-tint); color: var(--brn-primary-dark);
}

/* Fix browser default visited link colors leaking into nav */
a:visited { color: inherit; }
.nav-link:visited { color: var(--text-primary); }
.nav-link.is-active:visited,
.nav-link.is-active { color: var(--brn-primary-dark) !important; }
/* Ensure ONLY the explicitly marked active link gets the blue */
.nav-main .nav-link:not(.is-active):visited { color: var(--text-primary); }
