/* ==========================================================================
   OFF-PISTE WEALTH - MASTER PRODUCTION STYLESHEET
   Modern, Ultra-Responsive, Accessible Design System (WCAG 2.1 AA Compliant)
   Brand Authority: Authorized & Regulated by the Financial Conduct Authority (FCA FRN: 955277)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS & ROOT VARIABLES
   -------------------------------------------------------------------------- */
:root {
  /* Brand Core Colors (WCAG AA Calibrated) */
  --primary: #6b3fa0;             /* Master Brand Purple - High Contrast (4.7:1 on white) */
  --primary-light: #8058b0;       /* Original Brand Purple Accent */
  --primary-dark: #4a2176;        /* Deep Royal Purple for Headings/Footers */
  --primary-subtle: #f6f2fb;      /* Tinted Background Purple */
  --primary-gradient: linear-gradient(135deg, #6b3fa0 0%, #4a2176 100%);
  
  /* Deep Teal Secondary (Darkened from legacy #2ACCC8 to #0E7490 for WCAG 4.8:1 AA Compliance) */
  --secondary: #0e7490;           /* Deep Teal / Cyan */
  --secondary-hover: #155e75;     /* Darker Teal for Interactive Hover States */
  --secondary-subtle: #ecfeff;    /* Light Cyan Tint for Badges/Pills */
  --secondary-light: #06b6d4;     /* Accent Bright Teal for Dark Backgrounds */

  /* Supporting Financial Accents */
  --royal-blue: #1d4ed8;          /* Trust Royal Blue */
  --royal-blue-subtle: #eff6ff;   /* Soft Blue Tint */
  --accent-gold: #b45309;         /* Rich Amber/Gold for Ratings/Accreditations */
  --accent-gold-subtle: #fef3c7;  /* Soft Gold Tint */
  --success: #047857;             /* Emerald 700 */
  --success-subtle: #ecfdf5;
  --danger: #b91c1c;              /* Crimson 700 */

  /* Neutral Slate Surface & Typography Scale */
  --text-primary: #0f172a;        /* Slate 900 */
  --text-secondary: #334155;      /* Slate 700 */
  --text-muted: #64748b;          /* Slate 500 */
  --text-inverse: #ffffff;
  
  --bg-body: #ffffff;
  --bg-surface: #f8fafc;          /* Slate 50 */
  --bg-surface-elevated: #ffffff;
  --bg-alt: #f1f5f9;              /* Slate 100 */
  --bg-dark: #0f172a;             /* Slate 900 */
  --bg-darker: #090d16;

  /* Borders & Dividers */
  --border-subtle: #e2e8f0;       /* Slate 200 */
  --border-strong: #cbd5e1;       /* Slate 300 */
  --border-focus: #6b3fa0;

  /* Typography Stacks */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-heading: 'Montserrat', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Elevation Shadows */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 20px rgba(107, 63, 160, 0.2);

  /* Border Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Layout Constraints */
  --container-max: 1280px;
  --container-pad: 1.5rem;
  --header-height: 80px;

  /* Standard Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   2. ACCESSIBILITY MODES & SYSTEM PREFERENCES
   -------------------------------------------------------------------------- */
/* High Contrast Mode */
html[data-contrast="high"] {
  --primary: #000000;
  --primary-light: #222222;
  --primary-dark: #000000;
  --secondary: #004d40;
  --secondary-hover: #000000;
  --text-primary: #000000;
  --text-secondary: #000000;
  --text-muted: #222222;
  --bg-body: #ffffff;
  --bg-surface: #ffffff;
  --bg-alt: #f0f0f0;
  --border-subtle: #000000;
  --border-strong: #000000;
}

html[data-contrast="high"] a {
  text-decoration: underline !important;
}

html[data-contrast="high"] .card,
html[data-contrast="high"] .btn,
html[data-contrast="high"] header,
html[data-contrast="high"] footer {
  border: 2px solid #000000 !important;
}

/* Dynamic Font Scaling */
html[data-font-scale="large"] {
  font-size: 112.5%; /* 18px base */
}

html[data-font-scale="xlarge"] {
  font-size: 125%; /* 20px base */
}

/* Native Reduced Motion Support (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

html[data-reduced-motion="true"] *,
html[data-reduced-motion="true"] *::before,
html[data-reduced-motion="true"] *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

/* --------------------------------------------------------------------------
   3. RESET & BASE ELEMENTS (Mobile-First, No Horizontal Scroll)
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 100%; /* 16px */
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-body);
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1.5rem);
}

/* Strict requirement: No overflow hidden/auto on html or body to preserve sticky header */
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip; /* Fixes horizontal overflow without disabling position: sticky */
  word-break: break-word;
  overflow-wrap: break-word;
}

img, picture, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover, a:focus-visible {
  color: var(--primary-dark);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.75rem;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(2rem, 4.5vw + 0.5rem, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.6rem, 3vw + 0.5rem, 2.35rem);
}

h3 {
  font-size: clamp(1.25rem, 2vw + 0.3rem, 1.65rem);
}

h4 {
  font-size: 1.2rem;
}

p {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

p:last-child {
  margin-bottom: 0;
}

ul, ol {
  padding-inline-start: 1.5rem;
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

li {
  margin-bottom: 0.5rem;
}

strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Keyboard Focus Rings (WCAG AA Compliance) */
:focus-visible {
  outline: 3px solid var(--primary-light);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* Skip to Content Accessible Link */
.skip-link {
  position: absolute;
  top: -100px;
  inset-inline-start: 1rem;
  background: var(--primary);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  z-index: 99999;
  transition: top var(--transition-fast);
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* --------------------------------------------------------------------------
   4. UTILITY CLASSES & CONTAINERS
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.container-narrow {
  max-width: 860px;
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  padding-block: clamp(3rem, 6vw, 5.5rem);
  position: relative;
}

.section-alt {
  background-color: var(--bg-surface);
}

.section-primary {
  background: var(--primary-gradient);
  color: #ffffff;
}

.section-primary h1,
.section-primary h2,
.section-primary h3,
.section-primary p {
  color: #ffffff;
}

.section-dark {
  background-color: var(--bg-dark);
  color: #ffffff;
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark p {
  color: #f1f5f9;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin-inline: auto;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.badge-purple {
  background-color: var(--primary-subtle);
  color: var(--primary);
  border: 1px solid rgba(107, 63, 160, 0.2);
}

.badge-teal {
  background-color: var(--secondary-subtle);
  color: var(--secondary);
  border: 1px solid rgba(14, 116, 144, 0.2);
}

.badge-gold {
  background-color: var(--accent-gold-subtle);
  color: var(--accent-gold);
  border: 1px solid rgba(180, 83, 9, 0.2);
}

.badge-white {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  backdrop-filter: blur(8px);
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 992px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Flex Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-sm { gap: 0.75rem; }
.gap-md { gap: 1.5rem; }
.gap-lg { gap: 2.5rem; }

/* --------------------------------------------------------------------------
   5. TOP UTILITY / ACCESSIBILITY BAR
   -------------------------------------------------------------------------- */
.top-bar {
  background-color: var(--bg-dark);
  color: #e2e8f0;
  font-size: 0.85rem;
  padding-block: 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.fca-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #94a3b8;
}

.fca-tag strong {
  color: #ffffff;
}

.top-contact-link {
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.top-contact-link:hover {
  color: #38bdf8;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Accessible Tool Bar */
.a11y-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-full);
}

.a11y-btn {
  background: transparent;
  color: #e2e8f0;
  border-radius: var(--radius-full);
  min-width: 28px;
  height: 28px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  padding: 0 0.3rem;
}

.a11y-btn:hover,
.a11y-btn.active {
  background-color: var(--primary);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   6. HEADER & STICKY NAVIGATION (Pinned at all times, no slide-away)
   -------------------------------------------------------------------------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: box-shadow var(--transition-fast);
}

header.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  position: relative;
}

/* Brand Logo */
.brand-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  min-width: 0;
}

.brand-logo-img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--primary-dark);
  line-height: 1.15;
}

.brand-subtext {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Desktop Navigation Menu */
.desktop-nav {
  display: none;
}

@media (min-width: 1024px) {
  .desktop-nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
  }
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.5rem 0.25rem;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
  border-radius: var(--radius-full);
}

/* Header CTAs */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Hamburger Toggle Button (Touch Target >= 48px) */
.mobile-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.mobile-nav-toggle:hover {
  background-color: var(--bg-alt);
  color: var(--primary);
}

@media (min-width: 1024px) {
  .mobile-nav-toggle {
    display: none;
  }
}

.hamburger-icon {
  width: 24px;
  height: 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-fast);
}

.mobile-nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.mobile-nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Navigation Drawer */
.mobile-nav-drawer {
  display: none;
  position: fixed;
  top: var(--header-height);
  inset-inline: 0;
  bottom: 0;
  background: #ffffff;
  padding: 1.5rem;
  overflow-y: auto;
  z-index: 999;
  border-top: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-xl);
}

.mobile-nav-drawer.open {
  display: block;
}

@media (min-width: 1024px) {
  .mobile-nav-drawer {
    display: none !important;
  }
}

.mobile-nav-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  text-decoration: none;
  transition: background-color var(--transition-fast);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background-color: var(--primary-subtle);
  color: var(--primary);
}

.mobile-contact-card {
  padding: 1rem;
  background-color: var(--bg-alt);
  border-radius: var(--radius-md);
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   7. BUTTONS & INTERACTIVE ELEMENTS (Ergonomic Touch Targets >= 48px)
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 0.75rem 1.4rem;
  min-height: 48px; /* Ergonomic touch target */
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(107, 63, 160, 0.25);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--primary-dark);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(107, 63, 160, 0.35);
}

.btn-secondary {
  background-color: var(--secondary);
  color: #ffffff;
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background-color: var(--secondary-hover);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-outline-white {
  background-color: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-outline-white:hover,
.btn-outline-white:focus-visible {
  background-color: #ffffff;
  color: var(--primary-dark);
}

.btn-lg {
  padding: 0.9rem 1.8rem;
  font-size: 1.05rem;
  min-height: 52px;
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  min-height: 38px;
  font-size: 0.85rem;
}

.btn-full {
  width: 100%;
}

/* --------------------------------------------------------------------------
   8. HERO SECTION & KEY VALUE PROPOSITIONS
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(3rem, 7vw, 6rem);
  background: radial-gradient(circle at top right, rgba(107, 63, 160, 0.08), transparent 50%),
              radial-gradient(circle at bottom left, rgba(14, 116, 144, 0.05), transparent 50%),
              var(--bg-body);
  border-bottom: 1px solid var(--border-subtle);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3.5rem;
  }
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-title {
  margin-bottom: 1.25rem;
}

.hero-title .text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 2rem;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
  width: 100%;
}

.trust-badges-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  width: 100%;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.trust-item svg {
  color: var(--primary);
  flex-shrink: 0;
}

/* Hero Media Wrapper (CLS Guarded) */
.hero-media-wrapper {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-subtle);
  background-color: var(--primary-dark);
}

.hero-media-card {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-banner-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.2) 0%, rgba(15, 23, 42, 0.75) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.75rem;
  color: #ffffff;
}

.hero-media-overlay h3 {
  color: #ffffff;
  margin-bottom: 0.25rem;
  font-size: 1.3rem;
}

.hero-media-overlay p {
  color: #e2e8f0;
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   9. CARDS, GRIDS & FEATURE PANELS
   -------------------------------------------------------------------------- */
.card {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
  display: flex;
  flex-direction: column;
  position: relative;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(107, 63, 160, 0.3);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background-color: var(--primary-subtle);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}

.card-icon.teal {
  background-color: var(--secondary-subtle);
  color: var(--secondary);
}

.card-icon.gold {
  background-color: var(--accent-gold-subtle);
  color: var(--accent-gold);
}

.card-title {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.card-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  flex-grow: 1;
}

.card-footer-link {
  margin-top: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
}

.card-footer-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   10. INTERACTIVE CALCULATORS & FINANCIAL SIMULATORS
   -------------------------------------------------------------------------- */
.calculator-card {
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 992px) {
  .calc-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
  }
}

.calc-controls {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.form-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-val-display {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--primary);
  font-size: 1.1rem;
}

/* Custom Range Input */
.calc-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: var(--bg-alt);
  border-radius: var(--radius-full);
  outline: none;
}

.calc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(107, 63, 160, 0.4);
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.calc-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: var(--primary-dark);
}

.calc-range::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(107, 63, 160, 0.4);
}

/* Calculator Output Panel */
.calc-results-panel {
  background: linear-gradient(145deg, var(--bg-dark) 0%, #1a1a36 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.calc-output-stat {
  margin-bottom: 1.5rem;
}

.calc-stat-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 0.25rem;
}

.calc-stat-value {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: #38bdf8;
  line-height: 1.1;
}

.calc-stat-value.primary-highlight {
  color: #c084fc;
}

.calc-breakdown-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-block: 1rem;
}

.calc-breakdown-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
  color: #cbd5e1;
}

.calc-breakdown-item strong {
  color: #ffffff;
}

.calc-disclaimer {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 1rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   11. COMPARISON TABLES (Independent vs Restricted Advice)
   -------------------------------------------------------------------------- */
.table-responsive-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background-color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: start;
  font-size: 0.95rem;
  min-width: 600px;
}

.comparison-table th,
.comparison-table td {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.comparison-table th {
  background-color: var(--bg-surface);
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
}

.comparison-table th.highlight-col {
  background-color: var(--primary-subtle);
  color: var(--primary-dark);
}

.comparison-table td.highlight-col {
  background-color: rgba(107, 63, 160, 0.03);
  font-weight: 600;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

/* --------------------------------------------------------------------------
   12. ACCORDIONS (FAQ & Service Deep Dives)
   -------------------------------------------------------------------------- */
.accordion-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.accordion-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background-color: #ffffff;
  overflow: hidden;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.accordion-item.active {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.accordion-trigger {
  width: 100%;
  padding: 1.25rem 1.5rem;
  text-align: start;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}

.accordion-trigger:hover {
  color: var(--primary);
}

.accordion-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--primary);
  transition: transform var(--transition-base);
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-panel {
  display: none;
  padding: 0 1.5rem 1.5rem 1.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.accordion-item.active .accordion-panel {
  display: block;
}

/* --------------------------------------------------------------------------
   13. TESTIMONIALS & CASE STUDIES
   -------------------------------------------------------------------------- */
.testimonial-card {
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.testimonial-rating {
  display: flex;
  gap: 0.25rem;
  color: var(--accent-gold);
  margin-bottom: 1rem;
}

.testimonial-quote {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.author-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary-subtle);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
}

.author-info h4 {
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.author-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   14. FORMS & INPUTS (Accessible, Validated, Explicit Labels)
   -------------------------------------------------------------------------- */
.contact-form-wrapper {
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-md);
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  color: var(--text-primary);
  background-color: #ffffff;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(107, 63, 160, 0.15);
  outline: none;
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-help-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* --------------------------------------------------------------------------
   15. MODAL SYSTEM (Discovery Call Booking & Dialogs)
   -------------------------------------------------------------------------- */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-backdrop.open {
  display: flex;
}

.modal-content {
  background: #ffffff;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius-xl);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-xl);
  position: relative;
  animation: modalSlideUp var(--transition-base);
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  inset-inline-end: 1.25rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  background-color: var(--bg-surface);
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background-color: var(--bg-alt);
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   16. BACK TO TOP BUTTON (Strict Requirement: >= 48px, aria-label, smoothly scrolls)
   -------------------------------------------------------------------------- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  inset-inline-end: 2rem;
  width: 52px;
  height: 52px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 50%;
  background-color: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(107, 63, 160, 0.4);
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base), background-color var(--transition-fast);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(107, 63, 160, 0.5);
}

/* --------------------------------------------------------------------------
   17. REGULATORY NOTICE & COMPLIANCE BANNER
   -------------------------------------------------------------------------- */
.fca-regulatory-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-inline-start: 4px solid var(--primary);
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  margin-block: 2rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.fca-regulatory-box p {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.fca-regulatory-box p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   18. SITE FOOTER (Comprehensive Multi-Column Architecture)
   -------------------------------------------------------------------------- */
footer.site-footer {
  background-color: var(--bg-dark);
  color: #cbd5e1;
  padding-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 3rem;
  }
}

.footer-brand-col p {
  color: #94a3b8;
  font-size: 0.95rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  max-width: 320px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
  position: relative;
}

.footer-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-link {
  color: #94a3b8;
  font-size: 0.9rem;
  transition: color var(--transition-fast), padding-inline-start var(--transition-fast);
}

.footer-link:hover {
  color: #38bdf8;
  padding-inline-start: 4px;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: #94a3b8;
  margin-bottom: 0.85rem;
}

.footer-contact-item svg {
  flex-shrink: 0;
  color: #38bdf8;
  margin-top: 0.2rem;
}

/* Footer Bottom Regulatory & Copyright */
.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  font-size: 0.8rem;
  color: #94a3b8;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-legal-links a {
  color: #94a3b8;
}

.footer-legal-links a:hover {
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   19. RESPONSIVE BREAKPOINT REFINEMENTS (Fluid Typography & Spacing)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  :root {
    --container-pad: 1rem;
    --header-height: 72px;
  }

  .btn {
    width: 100%;
  }

  .hero-cta-group .btn {
    width: 100%;
  }

  .top-bar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-bar-right {
    width: 100%;
    justify-content: space-between;
  }
}
