/* ═══════════════════════════════════════════════════
   PLAINSAIL — Design System
   Award-winning trust administration platform
   ═══════════════════════════════════════════════════ */

/* ─── Google Fonts ─── */
/* Fonts loaded via <link> in HTML <head> for performance — see preconnect hints */

/* ─── Design Tokens ─── */
:root {
  /* Colour — Navy */
  --navy-950: #021F31;

  /* Colour — Cyan Accent */
  --cyan-500: #00FFFF;
  --cyan-400: #00FFFF;

  /* Colour — Scale */
  --blue-600: #021F31;
  --blue-500: #021F31;
  --blue-400: #021F31;
  --blue-300: #B4BEC5;
  --blue-200: #F0F3F6;
  --blue-100: #F0F3F6;
  --blue-50:  #F0F3F6;

  /* Colour — Semantic */
  --success: #528C2D;
  --warning: #D4894F;
  --error:   #C44B3B;

  /* Colour — Text */
  --text-secondary: rgba(2,31,49,0.65);

  /* Typography */
  --font-display: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-body:    'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    'DM Sans', 'Helvetica Neue', Arial, sans-serif;

  /* Spacing */
  --section-py:    7rem;
  --section-py-sm: 4.5rem;
  --container-max: 80rem;
  --container-px:  clamp(1.5rem, 4vw, 3rem);

  /* Shadows */
  --shadow-card:       0 1px 3px rgba(2,31,49,0.06), 0 8px 24px rgba(2,31,49,0.04);
  --shadow-card-hover: 0 4px 12px rgba(2,31,49,0.08), 0 16px 40px rgba(2,31,49,0.06);
  --shadow-glow:       0 0 40px rgba(0,255,255,0.12);

  /* Border radius */
  --radius-card:   0.75rem;
  --radius-button: 0.5rem;
  --radius-full:   9999px;

  /* Motion */
  --ease-out-expo: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 200ms;
  --duration-med:  300ms;
  --duration-slow: 600ms;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
body { font-family: var(--font-body); font-optical-sizing: none; color: #000; background: #fff; line-height: 1.7; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--cyan-500); outline-offset: 2px; border-radius: 2px; }
button { font: inherit; cursor: pointer; border: none; background: none; }
button:focus-visible { outline: 2px solid var(--cyan-500); outline-offset: 2px; border-radius: 2px; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; }
h3, h4 { font-weight: 600; }
::selection { background: rgba(0,255,255,0.2); color: var(--navy-950); }

/* ─── Typography Scale ─── */
.t-display-xl { font-size: clamp(2.8rem, 5vw, 4.5rem); line-height: 1.05; letter-spacing: -0.03em; font-weight: 900; }
.t-display-lg { font-size: clamp(2.2rem, 4vw, 3.5rem); line-height: 1.1; letter-spacing: -0.025em; }
.t-display-md { font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1.15; letter-spacing: -0.02em; }
.t-display-sm { font-size: clamp(1.4rem, 2vw, 1.875rem); line-height: 1.2; letter-spacing: -0.015em; }
.t-body-lg    { font-size: 1.125rem; line-height: 1.7; }
.t-body-md    { font-size: 1rem; line-height: 1.7; }
.t-body-sm    { font-size: 0.875rem; line-height: 1.6; }
.t-caption    { font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.5; letter-spacing: 0.05em; }
.t-eyebrow    { font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--navy-950); }
.t-eyebrow-light { font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--cyan-500); }

/* ─── Layout ─── */
.container { max-width: var(--container-max); margin: 0 auto; padding-left: var(--container-px); padding-right: var(--container-px); }
.container-narrow { max-width: 48rem; margin: 0 auto; padding-left: var(--container-px); padding-right: var(--container-px); }
.section-padding { padding-top: var(--section-py-sm); padding-bottom: var(--section-py-sm); }
@media (min-width: 1024px) { .section-padding { padding-top: var(--section-py); padding-bottom: var(--section-py); } }

.hide-mobile  { display: none; }
.hide-desktop { display: block; }
@media (min-width: 640px) { .hide-mobile { display: block; } .hide-desktop { display: none; } }

.grid-2   { display: grid; grid-template-columns: 1fr; gap: 0.5rem; }
.grid-3   { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-4   { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-5   { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-2-1 { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.grid-3-2 { display: grid; grid-template-columns: 1fr; gap: 2rem; }

@media (max-width: 639px) {
  .grid-2 > * { order: unset !important; }
}
@media (min-width: 640px) {
  .grid-2   { grid-template-columns: repeat(2, 1fr); }
  .grid-4   { grid-template-columns: repeat(2, 1fr); }
  .grid-5   { grid-template-columns: repeat(2, 1fr); }
  .grid-3-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .grid-3   { grid-template-columns: repeat(2, 1fr); }
  .grid-2-1 { grid-template-columns: 3fr 2fr; gap: 3rem; }
  .grid-3-2 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .grid-2   { gap: 2rem; }
  .grid-3   { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .grid-4   { grid-template-columns: repeat(4, 1fr); gap: 2rem; }
  .grid-5   { grid-template-columns: repeat(5, 1fr); gap: 1.5rem; }
  .grid-2-1 { grid-template-columns: 3fr 2fr; gap: 4rem; }
}

/* ─── Backgrounds & Textures ─── */
.bg-navy    { background: var(--navy-950); color: #fff; }
.bg-white   { background: #fff; }
.bg-muted   { background: #F0F3F6; }
.bg-blue  { background: var(--blue-50); }

.grain-overlay::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 128px; opacity: 0.04; pointer-events: none;
}

.radial-glow {
  background: radial-gradient(ellipse at 30% 50%, rgba(0,255,255,0.03), var(--navy-950) 70%);
}
.radial-glow-center {
  background: radial-gradient(ellipse at 50% 100%, rgba(0,255,255,0.03), var(--navy-950) 70%);
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-body); font-weight: 500; border-radius: var(--radius-button);
  transition: all var(--duration-fast) ease-out; cursor: pointer;
  min-height: 44px; white-space: nowrap;
}
.btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--cyan-500), 0 0 0 4px rgba(0,255,255,0.25); }
.btn .arrow { transition: transform var(--duration-fast) ease-out; }
.btn:hover .arrow { transform: translateX(2px); }

.btn-md { padding: 0.75rem 1.5rem; font-size: 0.9375rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; min-height: 48px; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; min-height: 40px; }

.btn-primary   { background: var(--navy-950); color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.btn-primary:hover { background: #021F31; box-shadow: 0 4px 12px rgba(2,31,49,0.3); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.btn-secondary { background: transparent; border: 2px solid rgba(0,255,255,0.5); color: rgba(255,255,255,0.9); }
.btn-secondary:hover { border-color: var(--cyan-500); color: #fff; }
.btn-dark      { background: var(--navy-950); color: #fff; border: 2px solid var(--navy-950); }
.btn-dark:hover { background: var(--navy-950); }
.btn-ghost     { background: transparent; color: var(--navy-950); }
.btn-ghost:hover { color: var(--navy-950); text-decoration: underline; text-underline-offset: 4px; }

/* ─── Cards ─── */
.card {
  background: #fff; border-radius: var(--radius-card);
  box-shadow: var(--shadow-card); border: 1px solid transparent;
  transition: all var(--duration-med) var(--ease-out-expo);
}
.card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); border-color: rgba(2,31,49,0.12); }
.card-flat { background: #fff; border-radius: var(--radius-card); }

/* ─── Badges ─── */
.badge {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.375rem 0.875rem; border-radius: var(--radius-full);
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.02em;
}
.badge-glass { background: rgba(0,255,255,0.08); backdrop-filter: blur(8px); color: var(--cyan-500); border: 1px solid rgba(0,255,255,0.15); }
.badge-outline { background: var(--blue-50); color: var(--navy-950); border: 1px solid var(--blue-200); }
.badge-dark { background: rgba(2,31,49,0.08); color: var(--navy-950); }
.badge-blue { background: rgba(2,31,49,0.06); color: var(--navy-950); }

/* ─── Navigation ─── */
[id] { scroll-margin-top: 5rem; }
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1.25rem 0; transition: all var(--duration-med) ease-out;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(255,255,255,0.97); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom-color: #F0F3F6; padding: 0.75rem 0; box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.nav.scrolled.has-subnav {
  border-bottom-color: transparent; box-shadow: none;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; position: relative; }

.nav-links { display: none; align-items: center; gap: 2rem; margin: 0 auto; }
@media (min-width: 1024px) { .nav-links { display: flex; padding-right: 9rem; } }
@media (min-width: 1024px) { .nav-links .nav-cta { position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%); } }

.nav-link {
  font-size: 0.875rem; font-weight: 500; transition: color var(--duration-fast) ease;
  color: rgba(255,255,255,0.75);
}
.nav-link:hover { color: #fff; }
.nav.scrolled .nav-link { color: var(--text-secondary); }
.nav.scrolled .nav-link:hover { color: var(--navy-950); }

/* Mega menu */
.mega-menu-trigger { position: relative; }
.mega-menu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(4px);
  padding-top: 1rem; opacity: 0; pointer-events: none; transition: opacity var(--duration-fast) ease, transform var(--duration-fast) ease;
}
.mega-menu-trigger:hover .mega-menu { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.mega-menu-inner {
  background: #fff; border-radius: 0.75rem; box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  border: 1px solid #F0F3F6; padding: 1.5rem; width: 640px;
}
.mega-menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.mega-menu-item { padding: 0.75rem; border-radius: 0.5rem; transition: background var(--duration-fast) ease; }
.mega-menu-item:hover { background: var(--blue-50); }
.mega-menu-item h4 { font-family: var(--font-body); font-size: 0.875rem; font-weight: 500; color: var(--navy-950); transition: color var(--duration-fast) ease; }
.mega-menu-item:hover h4 { color: var(--navy-950); }
.mega-menu-item p { font-size: 0.75rem; color: var(--text-secondary); margin-top: 0.25rem; }

/* Mobile menu */
.mobile-toggle { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: #fff; }
.nav.scrolled .mobile-toggle { color: var(--navy-950); }
@media (min-width: 1024px) { .mobile-toggle { display: none; } }

.mobile-menu {
  position: fixed; inset: 0; z-index: 200; background: var(--navy-950);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem;
  opacity: 0; pointer-events: none; transition: opacity var(--duration-med) ease;
  will-change: opacity;
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu a { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: #fff; transition: color var(--duration-fast) ease; }
.mobile-menu a:hover { color: var(--cyan-500); }
.mobile-close { position: absolute; top: 1.25rem; right: 1.5rem; color: #fff; min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; transition: transform var(--duration-fast) ease; }
.mobile-close:hover { transform: rotate(90deg); }

/* ─── Logo ─── */
.logo { display: flex; align-items: center; gap: 0.625rem; text-decoration: none; transition: opacity var(--duration-fast) ease; }
.logo:hover { opacity: 0.85; }
.logo-img { height: 3rem; width: auto; display: block; transition: opacity var(--duration-fast) ease; }
.logo-text { font-family: var(--font-body); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; }
.logo-text .accent { color: var(--cyan-500); }
.logo-light .logo-text { color: #fff; }
.logo-dark .logo-text { color: var(--navy-950); }
.logo-light .logo-img path { fill: #fff; transition: fill var(--duration-fast) ease; }
.logo-light .logo-img rect { stroke: #fff; fill: none; transition: stroke var(--duration-fast) ease; }
.logo-dark .logo-img path { fill: var(--navy-950); transition: fill var(--duration-fast) ease; }
.logo-dark .logo-img rect { stroke: var(--navy-950); fill: none; transition: stroke var(--duration-fast) ease; }
.logo-light .logo-img .sail-mark { stroke: #fff; transition: stroke var(--duration-fast) ease; }
.logo-dark .logo-img .sail-mark { stroke: var(--navy-950); transition: stroke var(--duration-fast) ease; }
.nav.scrolled .logo-text .accent { color: var(--navy-950); }
@media (max-width: 768px) { .logo-img { height: 2.25rem; } }

/* ─── Sail Mark SVG ─── */
.sail-mark { width: 22px; height: 26px; flex-shrink: 0; }

/* ─── Footer ─── */
.footer { background: var(--navy-950); border-top: 2px solid var(--cyan-500); padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; margin-bottom: 3.5rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr repeat(3, 1fr) 1fr; } }
.footer h5, .footer-heading { font-family: var(--font-body); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #B4BEC5; margin-bottom: 1rem; }
.footer a { font-size: 0.8125rem; color: #B4BEC5; transition: color var(--duration-fast) ease; display: block; padding: 0.25rem 0; }
.footer a:hover { color: var(--cyan-500); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.06); padding-top: 1.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.footer-bottom p { font-size: 0.75rem; color: #B4BEC5; }

/* ─── Scroll Animations ─── REMOVED (rebrand) */

/* ─── Float Animation ─── */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.float { animation: float 4s ease-in-out infinite; }
.float-delayed { animation: float 4s ease-in-out 1s infinite; }
.float-slow { animation: float 5s ease-in-out 2s infinite; }

/* ─── Dashboard Mockup ─── */
.mockup-wrapper {
  border-radius: 0.75rem; overflow: hidden; border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 0 80px rgba(0,255,255,0.08), 0 25px 50px -12px rgba(0,0,0,0.5);
  transform: perspective(1200px) rotateY(-3deg) rotateX(1deg);
  transition: transform 0.6s var(--ease-out-expo);
}
.mockup-wrapper:hover { transform: perspective(1200px) rotateY(-1deg) rotateX(0.5deg); }
.mockup-chrome { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem; background: rgba(0,0,0,0.3); }
.mockup-dot { width: 10px; height: 10px; border-radius: 50%; }
.mockup-url { flex: 1; margin-left: 0.75rem; background: rgba(255,255,255,0.06); border-radius: 0.375rem; padding: 0.25rem 0.75rem; font-family: var(--font-mono); font-size: 0.6875rem; color: #B4BEC5; }
.mockup-body { padding: 1rem; background: #F0F3F6; }
.mockup-sidebar { width: 10rem; background: #fff; border-radius: 0.5rem; padding: 0.75rem; flex-shrink: 0; }
.mockup-sidebar-item { padding: 0.5rem 0.625rem; border-radius: 0.375rem; font-size: 0.6875rem; margin-bottom: 0.125rem; color: var(--text-secondary); }
.mockup-sidebar-item.active { font-weight: 600; color: var(--navy-950); background: var(--blue-50); }
.mockup-content { flex: 1; min-width: 0; }
.mockup-stat { background: #fff; border-radius: 0.5rem; padding: 0.75rem; }
.mockup-stat-label { font-size: 0.625rem; color: var(--text-secondary); margin-bottom: 0.25rem; }
.mockup-stat-value { font-size: 1.125rem; font-weight: 700; color: var(--navy-950); }
.mockup-stat-change { font-family: var(--font-mono); font-size: 0.625rem; color: var(--text-secondary); margin-top: 0.25rem; }
.mockup-table { background: #fff; border-radius: 0.5rem; overflow: hidden; }
.mockup-table-head { display: grid; grid-template-columns: 2fr 1.5fr 1fr 1fr; padding: 0.625rem 0.75rem; font-size: 0.625rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); border-bottom: 1px solid #F0F3F6; }
.mockup-table-row { display: grid; grid-template-columns: 2fr 1.5fr 1fr 1fr; padding: 0.625rem 0.75rem; font-size: 0.6875rem; color: var(--text-secondary); border-bottom: 1px solid #F0F3F6; align-items: center; }
.mockup-table-row .name { font-weight: 600; color: var(--navy-950); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mockup-status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); display: inline-block; margin-right: 6px; }
.mockup-review-due { color: var(--navy-950); font-weight: 600; }

/* ─── Comparison Table ─── */
.comparison-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.comparison-table th { text-align: left; font-family: var(--font-body); font-size: 0.875rem; font-weight: 600; padding: 0 1.5rem 1rem; }
.comparison-table .col-factor { color: var(--text-secondary); width: 25%; }
.comparison-table .col-incumbent { color: var(--text-secondary); background: #F0F3F6; border-radius: var(--radius-card) var(--radius-card) 0 0; }
.comparison-table .col-plainsail { color: var(--navy-950); background: var(--blue-50); border-radius: var(--radius-card) var(--radius-card) 0 0; }
.comparison-table td { font-size: 0.875rem; padding: 1rem 1.5rem; border-bottom: 1px solid #F0F3F6; }
.comparison-table td:first-child { font-weight: 500; color: var(--navy-950); }
.comparison-table td:nth-child(2) { color: var(--text-secondary); background: #F0F3F6; }
.comparison-table td:nth-child(3) { color: var(--navy-950); font-weight: 500; background: var(--blue-50); }
.comparison-table tr:last-child td { border-bottom: none; }

/* ─── Testimonial ─── */
.quote-mark { font-family: var(--font-display); font-size: 4.5rem; line-height: 1; color: var(--navy-950); }
.quote-text { font-family: var(--font-display); font-style: italic; color: var(--navy-950); line-height: 1.5; }

/* ─── Stat Counter ─── */
.stat-number { font-family: var(--font-display); font-size: 3.75rem; color: var(--navy-950); }

/* ─── Article prose ─── */
.prose p { font-size: 1.125rem; line-height: 1.7; color: #021F31; margin-bottom: 1.5rem; }
.prose h2 { font-size: 1.5rem; line-height: 1.4; color: var(--navy-950); margin: 3rem 0 1rem; }
.prose ul { margin: 0 0 1.5rem 1.25rem; padding: 0; list-style: disc; }
.prose ul li { font-size: 1.125rem; line-height: 1.7; color: #021F31; margin-bottom: 0.5rem; }
.prose ul li:last-child { margin-bottom: 0; }
.prose strong { font-weight: 600; color: var(--navy-950); }
.prose blockquote { border-left: 4px solid var(--navy-950); background: var(--blue-50); padding: 1.25rem 1.5rem; border-radius: 0 var(--radius-card) var(--radius-card) 0; margin: 2rem 0; }
.prose blockquote p { font-style: italic; color: var(--navy-950); margin-bottom: 0; }

/* ─── Form inputs ─── */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--navy-950); margin-bottom: 0.375rem; }
.form-label .optional { font-weight: 400; color: var(--text-secondary); }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 0.75rem 1rem; font-family: var(--font-body); font-size: 0.875rem;
  color: var(--navy-950); background: #fff; border: 1px solid #F0F3F6; border-radius: 0.5rem;
  transition: all var(--duration-fast) ease;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--navy-950); box-shadow: 0 0 0 3px rgba(2,31,49,0.12);
}
.form-input::placeholder, .form-textarea::placeholder { color: #B4BEC5; }
.form-error { font-size: 0.75rem; color: var(--error); margin-top: 0.25rem; }

/* ─── Scrollbar ─── */
html { scrollbar-width: thin; scrollbar-color: #B4BEC5 transparent; }

/* ─── Timeline ─── */
.timeline { position: relative; padding-left: 3.5rem; max-width: 40rem; }
.timeline::before { content: ''; position: absolute; left: calc(0.6875rem + 0.6875rem - 1px); top: 0; bottom: 0; width: 2px; background: var(--blue-200); }
.timeline-item { position: relative; margin-bottom: 3rem; padding-bottom: 0; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot { position: absolute; left: -2.8125rem; top: 0.25rem; width: 1.375rem; height: 1.375rem; border-radius: 50%; background: var(--navy-950); box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--blue-200); z-index: 1; }
.timeline-dot::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 0.375rem; height: 0.375rem; border-radius: 50%; background: var(--cyan-500); }

/* ─── Step cards ─── */
.step-number { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--navy-950); color: #fff; font-weight: 700; font-size: 1.125rem; display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem; }

/* ─── Utilities ─── */
.text-white  { color: #fff; }
.text-navy   { color: var(--navy-950); }
.text-blue { color: var(--navy-950); }
.text-blue-accent { color: var(--cyan-500); }
.text-muted  { color: var(--text-secondary); }
.text-light  { color: var(--text-secondary); }
.text-faint  { color: rgba(255,255,255,0.75); }
.text-center { text-align: center; }
.text-balance { text-wrap: balance; }

.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-14 { margin-bottom: 3.5rem; }
.mb-16 { margin-bottom: 4rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }

.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }

.relative { position: relative; }
.z-10 { z-index: 10; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-10 { gap: 2.5rem; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.sr-only:focus { position: static; width: auto; height: auto; padding: 1rem; margin: 0; overflow: visible; clip: auto; white-space: normal; background: var(--navy-950); color: #fff; z-index: 999; }

.hidden { display: none !important; }
@media (min-width: 640px)  { .sm-show { display: block !important; } .sm-flex { display: flex !important; } }
@media (min-width: 768px)  { .md-show { display: block !important; } .md-flex { display: flex !important; } .md-hide { display: none !important; } }
@media (min-width: 1024px) { .lg-show { display: block !important; } .lg-flex { display: flex !important; } .lg-hide { display: none !important; } }

.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

.block { display: block; }
.inline-flex { display: inline-flex; }

.rounded-card { border-radius: var(--radius-card); }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: var(--radius-full); }
.rounded-xl { border-radius: 0.75rem; }

.border-blue { border-top: 3px solid var(--navy-950); }
.divider { width: 60px; height: 2px; background: var(--blue-200); }

.check-icon { color: var(--navy-950); flex-shrink: 0; margin-top: 2px; width: 18px; height: 18px; }

/* ─── Decorative circles (hero) ─── */
.deco-circle { position: absolute; border-radius: 50%; border: 1px solid rgba(0,255,255,0.14); pointer-events: none; }
.deco-circle-1 { width: 600px; height: 600px; right: -10%; top: 10%; }
.deco-circle-2 { width: 450px; height: 450px; right: -5%; top: 15%; border-color: rgba(0,255,255,0.09); }

/* ─── Platform page: smooth scroll ─── */
html { scroll-behavior: smooth; }

/* ─── Platform page: module nav strip ─── */
.module-nav-strip {
  background: rgba(255,255,255,0.97); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid #F0F3F6; box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  position: sticky; top: 64px; z-index: 40;
}

/* ─── Platform page: module nav hover ─── */
[href^="#mod-"]:hover { background: var(--blue-50) !important; color: var(--navy-950) !important; }

/* ─── Platform page: module nav links ─── */
.mod-nav-link {
  padding: 0.5rem 1rem; border-radius: 2rem; font-size: 0.8125rem; font-weight: 500;
  color: var(--navy-950); text-decoration: none; white-space: nowrap; transition: background 0.2s;
  flex-shrink: 0;
}
.mod-nav-link:hover { background: var(--blue-50); color: var(--navy-950); }
.mod-nav-link.active { background: var(--blue-50); color: var(--navy-950); }
.module-nav-strip > div::-webkit-scrollbar { display: none; }

/* ─── Platform page: responsive stacking ─── */
@media (max-width: 768px) {
  [style*="grid-template-columns:repeat(2"] { grid-template-columns: 1fr !important; }
  [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; gap: 2rem !important; }
  [style*="min-height:420px"] { min-height: 260px !important; }
  [style*="min-height:280px"] { min-height: 180px !important; }
  .module-nav-strip > div {
    display: grid !important; grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.375rem !important; padding: 0.625rem 1rem !important;
    overflow-x: visible !important;
  }
  .mod-nav-link {
    font-size: 0.75rem; padding: 0.5rem 0.25rem;
    text-align: center; border-radius: 0.5rem;
    background: #F0F3F6; border: 1px solid #F0F3F6;
  }
  .mod-nav-link:hover { border-color: var(--blue-200); }
}

/* ─── Client Logo Carousel ─── */
.logo-carousel {
  overflow: hidden;
  position: relative;
  width: 100%;
  --carousel-speed: 45s;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.logo-carousel::before,
.logo-carousel::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 8rem;
  z-index: 2;
  pointer-events: none;
}
.logo-carousel::before {
  left: 0;
  background: linear-gradient(90deg, #fff 0%, transparent 100%);
}
.logo-carousel::after {
  right: 0;
  background: linear-gradient(270deg, #fff 0%, transparent 100%);
}
.logo-carousel-row {
  overflow: hidden;
}
.logo-carousel-track {
  display: flex;
  align-items: center;
  gap: 5rem;
  width: max-content;
  animation: logo-scroll var(--carousel-speed) linear infinite;
  padding: 0.25rem 0;
}
.logo-carousel-track--reverse {
  animation-name: logo-scroll-reverse;
  animation-duration: 36s;
}
.logo-carousel:hover .logo-carousel-track {
  animation-play-state: paused;
}
.logo-carousel-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  padding: 0 0.5rem;
}
.logo-carousel-item img {
  height: 100%;
  width: auto;
  max-width: 10rem;
  object-fit: contain;
  filter: none;
  opacity: 0.7;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.logo-carousel-item img:hover {
  opacity: 1;
  transform: scale(1.08);
}
/* Dark-bg logos: shown in a navy pill so white text is visible */
.logo-carousel-item--dark {
  background: var(--navy-950);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  height: auto;
}
.logo-carousel-item--dark img {
  height: 1.75rem;
  filter: opacity(0.7);
}
.logo-carousel-item--dark img:hover {
  filter: opacity(1);
  transform: scale(1.05);
}
@keyframes logo-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes logo-scroll-reverse {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* ─── Testimonial Client Logo ─── */
.testimonial-logo {
  height: 1.5rem;
  width: auto;
  max-width: 7rem;
  object-fit: contain;
  margin-bottom: 0.5rem;
  display: block;
}

/* ─── Case Study Card Logo ─── */
.cs-card-logo {
  height: 2rem;
  width: auto;
  max-width: 10rem;
  object-fit: contain;
  display: block;
}
/* Case study card hover lift */
.cs-card {
  display: block;
  text-decoration: none;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #fff;
  border: 1px solid #F0F3F6;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cs-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.10);
}
.cs-card-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.5rem;
  min-height: 10rem;
}
.cs-card-body {
  padding: 1.75rem;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.cs-card-stat {
  font-size: 1.75rem;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1;
}
.cs-card-stat-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.cs-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--navy-950);
  margin: 1rem 0 0.5rem;
  line-height: 1.4;
}
.cs-card-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.cs-card-cta {
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 1.25rem;
  display: inline-block;
}

/* ─── Case Study Hero Logo ─── */
.cs-hero-logo {
  display: block;
  height: 2.5rem;
  width: auto;
  max-width: 10rem;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.65;
  margin-top: 2rem;
  transition: opacity 0.3s ease;
}
.cs-hero-logo:hover { opacity: 0.9; }
.cs-hero-logo--noinvert {
  filter: none;
  opacity: 0.85;
}
@media (max-width: 768px) {
  .cs-hero-logo { height: 2rem; max-width: 8rem; }
}

/* ─── Integration Hub & Spoke ─── */
.int-hub-container {
  position: relative; max-width: 700px; margin: 0 auto;
  aspect-ratio: 7/5; /* matches SVG viewBox */
}
.int-lines {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none;
}
.int-line {
  stroke: var(--cyan-500); stroke-width: 1.5;
  stroke-dasharray: 6 4; opacity: 0.7;
}
.int-hub-centre {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 6rem; height: 6rem; border-radius: 50%;
  background: #fff;
  border: 2px solid var(--blue-300);
  box-shadow: 0 0 0 6px rgba(0,255,255,0.08), 0 0 0 14px rgba(0,255,255,0.04), 0 4px 24px rgba(0,0,0,0.08);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 5;
}
.int-node {
  position: absolute; z-index: 4;
  background: #fff; border: 1px solid #F0F3F6; border-radius: 0.75rem;
  padding: 0.75rem 1rem; display: flex; flex-direction: column;
  align-items: center; gap: 0.5rem; text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: all 0.3s ease; cursor: default;
  min-width: 6rem;
}
.int-node:hover {
  border-color: var(--blue-300); transform: scale(1.06);
  box-shadow: 0 4px 20px rgba(0,255,255,0.15);
}
.int-node-name { font-size: 0.75rem; font-weight: 600; color: var(--navy-950); white-space: nowrap; }
.int-node-logo { width: auto; height: 1.5rem; object-fit: contain; }
.int-node-cat {
  font-size: 0.5625rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--blue-500);
  background: var(--blue-50); padding: 0.125rem 0.375rem;
  border-radius: 3px; line-height: 1;
}

/* ─── Mobile: logo carousel + integration hub ─── */
@media (max-width: 768px) {
  .logo-carousel { gap: 1.5rem; }
  .logo-carousel::before,
  .logo-carousel::after { width: 3rem; }
  .logo-carousel-track { gap: 2rem; }
  .logo-carousel-item { height: 2rem; padding: 0 0.375rem; }
  .logo-carousel-item img { max-width: 7rem; }
  .logo-carousel-item--dark { padding: 0.375rem 0.75rem; border-radius: 0.375rem; }
  .logo-carousel-item--dark img { height: 1.25rem; }

  /* Integration hub → grid on mobile */
  .int-hub-container {
    aspect-ratio: auto; min-height: auto;
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem; padding: 0 1rem; max-width: 400px;
  }
  .int-lines { display: none; }
  .int-hub-centre { display: none; }
  .int-node {
    position: static !important; transform: none !important;
    padding: 0.75rem; min-width: auto;
  }
  .int-node-logo { height: 1.25rem; }
  .int-node-name { font-size: 0.625rem; }
}
@media (max-width: 480px) {
  .logo-carousel-track { gap: 1.5rem; }
  .logo-carousel-item { height: 1.5rem; }
  .logo-carousel-item img { max-width: 5.5rem; }
  .logo-carousel-item--dark { padding: 0.25rem 0.5rem; }
  .logo-carousel-item--dark img { height: 1rem; }
}

/* ─── Reduced motion ─── */
/* ─── Jira Service Desk embed ─── */
.jsd-embed {
  border-radius: var(--radius-card, 1rem);
  overflow: hidden;
  border: 1px solid #F0F3F6;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  margin-top: 2.5rem;
}
.jsd-embed-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 1rem 1.5rem;
  background: var(--blue-50, #F0F3F6);
  border-bottom: 1px solid #F0F3F6;
}
.jsd-embed iframe {
  width: 100%;
  min-height: 700px;
  border: none;
  display: block;
}
.jsd-embed-fallback {
  padding: 0.75rem 1.5rem;
  background: #F0F3F6;
  border-top: 1px solid #F0F3F6;
  text-align: center;
}

/* ─── DocsBot support widget overrides ─── */
#docsbotai-root {
  --docsbot-chat-bot-font-family: 'DM Sans', sans-serif;
  font-family: 'DM Sans', sans-serif;
  z-index: 9999;
}
#docsbotai-root button[aria-label],
#docsbotai-root .docsbot-chat-btn {
  box-shadow: 0 4px 14px rgba(2, 31, 49, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#docsbotai-root button[aria-label]:hover,
#docsbotai-root .docsbot-chat-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(2, 31, 49, 0.45);
}
#docsbotai-root .docsbot-chat-inner-container {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(2, 31, 49, 0.18);
  border: 1px solid #F0F3F6;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .float, .float-delayed, .float-slow { animation: none; }
  .hero-word, .hero-subtitle { opacity: 1; animation: none; }
  html { scroll-behavior: auto; }
}

/* ─── Dark background button overrides ─── */
.bg-navy .btn-primary {
  background: var(--cyan-500);
  color: var(--navy-950);
  font-weight: 600;
}
.bg-navy .btn-primary:hover {
  background: #33FFFF;
  box-shadow: 0 4px 20px rgba(0,255,255,0.3);
}

/* ─── Nav CTA: cyan on dark header, navy on scrolled white header ─── */
.nav .nav-cta.btn-primary {
  background: var(--cyan-500);
  color: var(--navy-950);
  font-weight: 600;
}
.nav .nav-cta.btn-primary:hover {
  background: #33FFFF;
  box-shadow: 0 4px 20px rgba(0,255,255,0.3);
}
.nav.scrolled .nav-cta.btn-primary {
  background: var(--navy-950);
  color: #fff;
  font-weight: 500;
}
.nav.scrolled .nav-cta.btn-primary:hover {
  background: #021F31;
  box-shadow: 0 4px 12px rgba(2,31,49,0.3);
}

/* ─── Dark section eyebrows ─── */
.bg-navy .t-eyebrow,
.bg-navy .t-eyebrow-light {
  color: var(--cyan-500);
}

/* ─── Dark section stat numbers ─── */
.bg-navy .stat-number {
  color: var(--cyan-500);
}

/* ─── Navigation active state ─── */
.nav-link.active { color: var(--cyan-500); }
.nav.scrolled .nav-link.active { color: var(--navy-950); }

/* ─── Horizontal rules ─── */
hr {
  border: none;
  border-top: 1px solid var(--blue-200);
  margin: 2rem 0;
}

/* ─── Homepage hero height ─── */
.hero-home { min-height: 100vh; }
@media (max-width: 767px) {
  .hero-home { min-height: auto; }
}

/* ─── Hero word-reveal animation ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-word {
  display: inline-block;
  opacity: 0;
  animation: fadeUp 0.5s var(--ease-out-expo) forwards;
}

.hero-word:nth-child(1)  { animation-delay: 0.1s; }
.hero-word:nth-child(2)  { animation-delay: 0.15s; }
.hero-word:nth-child(3)  { animation-delay: 0.2s; }
.hero-word:nth-child(4)  { animation-delay: 0.25s; }
.hero-word:nth-child(5)  { animation-delay: 0.3s; }
.hero-word:nth-child(6)  { animation-delay: 0.35s; }
.hero-word:nth-child(7)  { animation-delay: 0.4s; }
.hero-word:nth-child(8)  { animation-delay: 0.45s; }
.hero-word:nth-child(9)  { animation-delay: 0.5s; }
.hero-word:nth-child(10) { animation-delay: 0.55s; }

.hero-subtitle {
  opacity: 0;
  animation: fadeUp 0.6s var(--ease-out-expo) forwards;
  animation-delay: 0.6s;
}

/* ─── Hero quotes section ─── */
.hero-quotes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
  padding: 2rem 0;
}

.hero-quote-text {
  font-family: var(--font-display);
  font-size: 1rem;
  font-style: italic;
  color: var(--navy-950);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.hero-quote-text::before {
  content: "\201C";
  color: var(--navy-950);
  font-weight: 700;
  font-style: normal;
  margin-right: 0.1em;
}

.hero-quote-text::after {
  content: "\201D";
  color: var(--navy-950);
  font-weight: 700;
  font-style: normal;
  margin-left: 0.05em;
}

/* Desktop: hide carousel arrows */
.hero-quotes-arrow { display: none; }

@media (max-width: 767px) {
  .hero-quotes-wrapper { display: flex; align-items: center; }
  .hero-quotes {
    display: block;
    overflow: hidden;
    gap: 0;
    padding: 0.75rem 0;
    min-height: 4.5rem;
    position: relative;
    flex: 1;
  }
  .hero-quote {
    padding: 0 0.25rem;
    opacity: 0;
    transition: opacity 0.4s ease;
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
  }
  .hero-quote.active { opacity: 1; }
  .hero-quote-text { font-size: 0.9375rem; margin-bottom: 0; }

  .hero-quotes-arrow {
    display: flex;
    flex-shrink: 0;
    width: 28px; height: 28px;
    align-items: center; justify-content: center;
    border: none;
    background: none;
    color: #B4BEC5;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
  }
  .hero-quotes-arrow:hover { color: var(--navy-950); }
}

/* ─── Landscape image section ─── */
.section-landscape {
  width: 100%;
  line-height: 0;
  overflow: hidden;
}

.section-landscape img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(85%) contrast(1.05);
  object-fit: cover;
}

@media (min-width: 1024px) {
  .section-landscape img {
    max-height: 500px;
    object-fit: cover;
    object-position: center 40%;
  }
}

@media (max-width: 767px) {
  .section-landscape img {
    max-height: 250px;
    object-fit: cover;
    object-position: center 30%;
  }
}

/* ─── About hero with landscape background ─── */
.about-hero {
  position: relative;
  overflow: hidden;
}

.about-hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(2,31,49,0.85), rgba(2,31,49,0.92)),
    url('../images/hero-landscape.jpg') center 40% / cover no-repeat;
  filter: grayscale(85%) contrast(1.05);
}

/* ─── Guide page active nav ─── */
.guide-nav a:hover,
.guide-nav a.active {
  color: var(--navy-950);
  background: var(--blue-50);
  border-left-color: var(--navy-950);
}

/* ─── Guide callout info ─── */
.guide-callout--info {
  background: var(--blue-50);
  border-left: 3px solid var(--navy-950);
  color: var(--navy-950);
}
