/*
 * Microsoft 365-Inspired Cocovox Landing Page Theme
 * Combines MS365's clean, professional design patterns with Cocovox brand colors
 *
 * COLOR ARCHITECTURE:
 * - Text/surface/border colors use canonical CSS variables from design-tokens.css
 *   (--text-primary, --surface-card, --border-color-default, etc.)
 * - Dark mode is automatic via the theme system — no per-rule overrides needed
 * - Brand accent colors (#2D5B3E, #42c99f, #2bb5a8, etc.) stay hardcoded — they're mode-independent
 * - Landing-specific layout colors (header glass, hero gradient, etc.) use --landing-* variables
 */

/* ===== MS365 DESIGN SYSTEM WITH COCOVOX COLORS ===== */

:where(:root) {

  /* Logo color for dark theme - light for visibility */
  --color-logo: oklch(96% 0.00 90); /* Fallback: hsl(0, 0%, 95%) */;
  /* Cocovox Brand Colors (maintained) */
  --ms365-primary: var(--color-primary, oklch(82% 0.14 186); /* Fallback: hsl(175, 75%, 50%) */);
  /* Cocovox teal */
  --ms365-secondary: var(--color-secondary, oklch(81% 0.15 77); /* Fallback: hsl(38, 90%, 60%) */);
  /* Cocovox gold */
  --ms365-accent: var(--color-accent, oklch(81% 0.14 176); /* Fallback: hsl(168, 70%, 55%) */);
  /* Cocovox mint */

  /* MS365-style depth and elevation system */
  --ms365-elevation-1: 0 1.6px 3.6px 0 rgba(0, 0, 0, 0.13), 0 0.3px 0.9px 0 rgba(0, 0, 0, 0.11);
  --ms365-elevation-2: 0 3.2px 7.2px 0 rgba(0, 0, 0, 0.13), 0 0.6px 1.8px 0 rgba(0, 0, 0, 0.11);
  --ms365-elevation-3: 0 6.4px 14.4px 0 rgba(0, 0, 0, 0.13), 0 1.2px 3.6px 0 rgba(0, 0, 0, 0.11);
  --ms365-elevation-4: 0 12.8px 28.8px 0 rgba(0, 0, 0, 0.13), 0 2.4px 7.2px 0 rgba(0, 0, 0, 0.11);
  --ms365-elevation-5: 0 25.6px 57.6px 0 rgba(0, 0, 0, 0.13), 0 4.8px 14.4px 0 rgba(0, 0, 0, 0.11);

  /* MS365 spacing system (4px base unit) */
  --ms365-space-xs: 4px;
  --ms365-space-s: 8px;
  --ms365-space-m: 16px;
  --ms365-space-l: 24px;
  --ms365-space-xl: 32px;
  --ms365-space-xxl: 48px;
  --ms365-space-xxxl: 64px;

  /* MS365 typography scale */
  --ms365-font-size-hero: 68px;
  --ms365-font-size-display: 42px;
  --ms365-font-size-title: 32px;
  --ms365-font-size-subtitle: 24px;
  --ms365-font-size-heading: 20px;
  --ms365-font-size-subheading: 16px;
  --ms365-font-size-body: 14px;
  --ms365-font-size-caption: 12px;

  /* MS365 font weights */
  --ms365-font-weight-light: 300;
  --ms365-font-weight-regular: 400;
  --ms365-font-weight-semibold: 600;
  --ms365-font-weight-bold: 700;

  /* MS365 border radius */
  --ms365-radius-none: 0;
  --ms365-radius-small: 4px;
  --ms365-radius-medium: 8px;
  --ms365-radius-large: 12px;
  --ms365-radius-xlarge: 16px;
  --ms365-radius-circular: 50%;

  /* MS365 transitions */
  --ms365-duration-fast: 100ms;
  --ms365-duration-normal: 200ms;
  --ms365-duration-slow: 300ms;
  --ms365-duration-slower: 400ms;
  --ms365-easing-default: cubic-bezier(0.42, 0, 0.58, 1);
  --ms365-easing-accelerate: cubic-bezier(0.9, 0.1, 1, 0.2);
  --ms365-easing-decelerate: cubic-bezier(0.1, 0.9, 0.2, 1);

  /* Brand accent color — tracks theme button color; falls back to forest green on default theme */
  --botanical-primary: var(--button-primary-background, #2D5B3E);

  /* Alternating section background — used 10x in LandingContent */
  --surface-alt: #f5f7f7;

  /* Landing-specific layout colors (no canonical equivalent) */
  --landing-header-bg: rgba(255, 255, 255, 0.98);
  --landing-header-bg-scrolled: rgba(255, 255, 255, 0.95);
  --landing-header-border: rgba(0, 0, 0, 0.05);
  --landing-hero-gradient: linear-gradient(180deg, #ffffff 0%, #f8fafa 50%, #f0f4f4 100%);
  --landing-section-alt-bg: linear-gradient(180deg, #fafbfb 0%, #f5f7f7 100%);
  --landing-card-border: rgba(0, 0, 0, 0.04);
  --landing-card-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 0 2px rgba(0, 0, 0, 0.06);
  --landing-card-shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
  --landing-shimmer-color: rgba(255, 255, 255, 0.2);
}

/* Landing-specific dark overrides — :where() for zero specificity per project convention */
:where(.dark) {
  --botanical-primary: var(--button-primary-background, #2D5B3E);
  --surface-alt: #1a1e23;

  --landing-header-bg: rgba(21, 24, 28, 0.98);
  --landing-header-bg-scrolled: rgba(21, 24, 28, 0.95);
  --landing-header-border: rgba(255, 255, 255, 0.1);
  --landing-hero-gradient: linear-gradient(180deg, #15181c 0%, #1a1e23 50%, #1f2328 100%);
  --landing-section-alt-bg: #1a1e23;
  --landing-card-border: var(--border-color-default);
  --landing-card-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --landing-card-shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.2);
  --landing-shimmer-color: rgba(255, 255, 255, 0.05);
}

/* ===== GLOBAL MS365 STYLES FOR LANDING PAGE ===== */

.ms365-landing {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  background: var(--surface-background);
  color: var(--text-primary);
}

/* ===== MS365 HEADER/NAVIGATION ===== */

.ms365-header {
  background: var(--landing-header-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--landing-header-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: box-shadow var(--ms365-duration-normal) var(--ms365-easing-default),
    background-color var(--ms365-duration-normal) var(--ms365-easing-default);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.ms365-header.scrolled {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  background: var(--landing-header-bg-scrolled);
}

.ms365-nav {
  display: flex !important;
  gap: 2rem;
  align-items: center;
}

.ms365-nav-item {
  position: relative;
  padding: 0.5rem 0;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: color 200ms ease;
  display: inline-block;
}

.ms365-nav-item::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--color-primary, #2D5B3E);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms cubic-bezier(0.42, 0, 0.58, 1);
}

.ms365-nav-item:hover {
  color: var(--color-primary, #2D5B3E);
}

.ms365-nav-item:hover::after {
  transform: scaleX(1);
}

/* ===== MS365 HERO SECTION ===== */

.ms365-hero {
  position: relative;
  padding: 80px 0 100px;
  min-height: 600px;
  background: var(--landing-hero-gradient);
  overflow: hidden;
}

.ms365-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  right: -50%;
  bottom: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(45, 91, 62, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(227, 162, 61, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(66, 201, 159, 0.04) 0%, transparent 50%);
  animation: ms365-float 30s ease-in-out infinite;
  pointer-events: none;
}

.ms365-hero::after {
  content: '';
  position: absolute;
  top: 20%;
  right: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(45, 91, 62, 0.05) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(40px);
  animation: ms365-pulse 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ms365-float {

  0%,
  100% {
    transform: translateX(0) scale(1);
  }

  50% {
    transform: translateX(30px) scale(1.05);
  }
}

@keyframes ms365-pulse {

  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(1.1);
  }
}

.ms365-hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.ms365-hero-title {
  /* WCAG 1.4.4 compliant: rem anchor ensures 200% zoom scaling */
  font-size: clamp(2.5rem, 1.5rem + 2.5vw, 4.25rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: transparent;
  background: linear-gradient(135deg,
      #2D5B3E 0%,
      #42c99f 50%,
      #2D5B3E 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: ms365-fade-up 0.6s cubic-bezier(0.42, 0, 0.58, 1);
}

/* Hero title dark mode: solid text instead of gradient */
:where(.dark) .ms365-hero-title {
  color: var(--text-primary);
  -webkit-text-fill-color: var(--text-primary);
  background: none;
  background-clip: unset;
  -webkit-background-clip: unset;
}

.ms365-hero-subtitle {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  animation: ms365-fade-up 0.6s cubic-bezier(0.42, 0, 0.58, 1) 100ms both;
}

@keyframes ms365-fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== MS365 BUTTONS ===== */

.ms365-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 16px;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 150ms cubic-bezier(0.42, 0, 0.58, 1),
    box-shadow 150ms cubic-bezier(0.42, 0, 0.58, 1),
    background 150ms cubic-bezier(0.42, 0, 0.58, 1);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  min-height: 48px;
}

.ms365-button-primary {
  background: linear-gradient(135deg,
    var(--button-primary-background, #2D5B3E) 0%,
    var(--button-primary-background-hover, #0d6b5d) 100%);
  color: var(--button-primary-text, white);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--button-primary-background, #2D5B3E) 25%, transparent);
}

.ms365-button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--button-primary-background, #2D5B3E) 35%, transparent);
  background: linear-gradient(135deg,
    var(--button-primary-background-hover, #0d6b5d) 0%,
    var(--button-primary-background, #2D5B3E) 100%);
}

.ms365-button-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px color-mix(in srgb, var(--button-primary-background, #2D5B3E) 20%, transparent);
}

.ms365-button-secondary {
  background: transparent;
  color: var(--button-primary-background, #2D5B3E);
  border: 2px solid var(--border-color-default, #2D5B3E);
  padding: 10px 30px;
  /* Adjust for border */
}

.ms365-button-secondary:hover {
  background: color-mix(in srgb, var(--button-primary-background, #2D5B3E) 8%, transparent);
  border-color: var(--button-primary-background-hover, #239089);
  color: var(--button-primary-background-hover, #239089);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--button-primary-background, #2D5B3E) 15%, transparent);
}

.ms365-button-secondary:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px color-mix(in srgb, var(--button-primary-background, #2D5B3E) 10%, transparent);
}

/* Secondary button dark mode: use theme-aware border and text */
:where(.dark) .ms365-button-secondary {
  border-color: var(--border-color-default);
  color: var(--text-primary);
}

:where(.dark) .ms365-button-secondary:hover {
  border-color: var(--color-primary, #2D5B3E);
  color: var(--color-primary, #2D5B3E);
}

/* ===== MS365 CARDS ===== */

.ms365-card {
  background: var(--surface-card);
  border-radius: 12px;
  padding: 32px;
  box-shadow: var(--landing-card-shadow);
  transition: transform 200ms cubic-bezier(0.42, 0, 0.58, 1),
    box-shadow 200ms cubic-bezier(0.42, 0, 0.58, 1),
    border-color 200ms cubic-bezier(0.42, 0, 0.58, 1);
  border: 1px solid var(--landing-card-border);
  position: relative;
  overflow: hidden;
}

.ms365-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2D5B3E, #42c99f);
  opacity: 0;
  transition: opacity 200ms ease;
}

.ms365-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--landing-card-shadow-hover);
  border-color: rgba(45, 91, 62, 0.2);
}

.ms365-card:hover::before {
  opacity: 1;
}

.ms365-feature-card {
  text-align: center;
  padding: 40px 24px;
}

.ms365-card-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(135deg,
      rgba(45, 91, 62, 0.1),
      rgba(66, 201, 159, 0.08));
  color: #2D5B3E;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ms365-card-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.ms365-card-description {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== MS365 FEATURE GRID ===== */

.ms365-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--ms365-space-xl);
  padding: var(--ms365-space-xxxl) 0;
}

.ms365-feature-card {
  padding: var(--ms365-space-l);
  text-align: center;
  animation: ms365-scale-in var(--ms365-duration-slower) var(--ms365-easing-decelerate) both;
  animation-delay: calc(var(--index, 0) * 100ms);
}

@keyframes ms365-scale-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== MS365 PRICING CARDS ===== */

.ms365-pricing-card {
  background: var(--surface-card);
  border-radius: 16px;
  padding: 36px;
  position: relative;
  border: 2px solid var(--border-color-default, #e1e1e1);
  transition: transform 200ms cubic-bezier(0.42, 0, 0.58, 1),
    box-shadow 200ms cubic-bezier(0.42, 0, 0.58, 1),
    border-color 200ms cubic-bezier(0.42, 0, 0.58, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.ms365-pricing-card.popular {
  border-color: #2D5B3E;
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(45, 91, 62, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.05);
  background: linear-gradient(180deg, var(--surface-card) 0%, rgba(45, 91, 62, 0.02) 100%);
}

.ms365-pricing-card.popular::before {
  content: 'MOST POPULAR';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #2D5B3E, #2bb5a8);
  color: white;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.ms365-pricing-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1),
    0 4px 12px rgba(45, 91, 62, 0.1);
  border-color: rgba(45, 91, 62, 0.4);
}

.ms365-pricing-card.popular:hover {
  transform: scale(1.05) translateY(-8px);
}

.ms365-pricing-price {
  font-size: 48px;
  font-weight: 700;
  color: #2D5B3E;
  margin: 24px 0;
  text-align: center;
  line-height: 1;
}

.ms365-pricing-price span {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-secondary);
}

.ms365-pricing-features {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  flex: 1;
}

.ms365-pricing-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  color: var(--text-primary);
  font-size: 15px;
}

.ms365-pricing-feature-icon {
  color: #42c99f;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ===== MS365 SECTION LAYOUTS ===== */

.ms365-section {
  padding: 80px 0;
  position: relative;
}

.ms365-section-alt {
  background: var(--landing-section-alt-bg);
}

.ms365-container {
  max-width: 1400px;
  width: 90%;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 1600px) {
  .ms365-container {
    max-width: 1200px;
  }
}

.ms365-section-header {
  text-align: center;
  margin-bottom: 64px;
}

.ms365-section-title {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.ms365-section-subtitle {
  font-size: 18px;
  font-weight: 400;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .ms365-section-title {
    font-size: 32px;
  }

  .ms365-section-subtitle {
    font-size: 16px;
  }
}

/* ===== MS365 TESTIMONIAL CARDS ===== */

.ms365-testimonial {
  background: var(--surface-card);
  border-radius: var(--ms365-radius-large);
  padding: var(--ms365-space-xl);
  box-shadow: var(--ms365-elevation-1);
  position: relative;
  border-left: 4px solid var(--ms365-primary);
}

.ms365-testimonial-quote {
  font-size: var(--ms365-font-size-subheading);
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: var(--ms365-space-l);
  position: relative;
  padding-left: var(--ms365-space-xl);
}

.ms365-testimonial-quote::before {
  content: '\201C';
  position: absolute;
  left: 0;
  top: -10px;
  font-size: 48px;
  color: var(--ms365-primary);
  opacity: 0.3;
}

.ms365-testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--ms365-space-m);
}

.ms365-testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--ms365-radius-circular);
  background: linear-gradient(135deg, var(--ms365-primary), var(--ms365-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: var(--ms365-font-weight-bold);
}

/* ===== MS365 FOOTER ===== */

.ms365-footer {
  background: var(--surface-background);
  border-top: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
  padding: var(--ms365-space-xxl) 0;
}

.ms365-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr) 2fr;
  gap: var(--ms365-space-xl) var(--ms365-space-xl);
  align-items: start;
}

.ms365-footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ms365-footer-section-title {
  font-size: var(--ms365-font-size-subheading);
  font-weight: var(--ms365-font-weight-semibold);
  margin-bottom: var(--ms365-space-m);
  color: var(--text-primary);
}

.ms365-footer-link {
  display: flex;
  align-items: center;
  padding: var(--ms365-space-sm) 0;
  min-height: 44px; /* Touch target accessibility */
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--ms365-duration-fast) var(--ms365-easing-default);
}

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

/* Footer dark mode: muted text and mascot opacity */
:where(.dark) .ms365-footer-text,
:where(.dark) .ms365-footer a {
  color: var(--text-tertiary, #A6A6A6);
}

:where(.dark) .ms365-footer a:hover {
  color: var(--text-primary);
}

:where(.dark) .ms365-footer p {
  color: var(--text-tertiary, #A6A6A6);
}

:where(.dark) .ms365-footer .footer-mascot {
  opacity: 0.75;
}

:where(.dark) .ms365-footer .footer-mascot:hover {
  opacity: 0.95;
}

/* ===== MS365 ANIMATIONS ===== */

.ms365-animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--ms365-duration-slower) var(--ms365-easing-decelerate),
    transform var(--ms365-duration-slower) var(--ms365-easing-decelerate);
}

.ms365-animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== MS365 RESPONSIVE DESIGN ===== */

@media (max-width: 1024px) {
  .ms365-feature-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--ms365-space-l);
  }

  .ms365-hero-title {
    font-size: var(--ms365-font-size-display);
  }

  .ms365-section {
    padding: var(--ms365-space-xxl) 0;
  }

  .ms365-footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .ms365-hero {
    padding: var(--ms365-space-xxl) 0;
  }

  .ms365-hero-title {
    font-size: var(--ms365-font-size-title);
  }

  .ms365-hero-subtitle {
    font-size: var(--ms365-font-size-subheading);
  }

  .ms365-nav {
    display: none;
  }

  .ms365-feature-grid {
    grid-template-columns: 1fr;
  }

  .ms365-pricing-card.popular {
    transform: scale(1);
  }

  .ms365-button {
    padding: var(--ms365-space-m) var(--ms365-space-l);
  }

  .ms365-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .ms365-container {
    padding: 0 var(--ms365-space-m);
  }

  .ms365-card {
    padding: var(--ms365-space-l);
  }

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

  .ms365-button {
    padding: var(--ms365-space-sm) var(--ms365-space-m);
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }

  .ms365-footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */

@media (prefers-reduced-motion: reduce) {
  /* PERF: Using :where() for zero specificity to prevent 19K+ element style recalculations */
  :where(*) {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: more) {
  .ms365-card {
    border: 2px solid var(--text-primary);
  }

  .ms365-button-primary {
    border: 2px solid transparent;
  }

  .ms365-button-secondary {
    border-width: 3px;
  }
}

/* ===== SMOOTH SCROLL BEHAVIOR ===== */

html.ms365-smooth-scroll {
  scroll-behavior: smooth;
}

/* ===== FOCUS STYLES ===== */

.ms365-button:focus-visible,
.ms365-nav-item:focus-visible,
.ms365-card:focus-within {
  outline: 2px solid var(--ms365-primary);
  outline-offset: 2px;
}

/* ===== LOADING STATES ===== */

.ms365-loading {
  position: relative;
  overflow: hidden;
}

/* GPU-composited shimmer */
.ms365-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      var(--landing-shimmer-color),
      transparent);
  animation: ms365-shimmer 2s infinite;
  will-change: transform;
}

@keyframes ms365-shimmer {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

/* ===== FORM ELEMENTS DARK MODE ===== */

:where(.dark) .ms365-input,
:where(.dark) .ms365-select {
  background: var(--surface-card);
  border-color: var(--border-color-default);
  color: var(--text-primary);
}

:where(.dark) .ms365-input:focus,
:where(.dark) .ms365-select:focus {
  border-color: var(--color-primary, #2D5B3E);
}

/* ===== DIVIDERS DARK MODE ===== */

:where(.dark) .ms365-divider {
  border-color: var(--border-color-default);
}
