/* ==========================================================================
   Design Tokens & Modern Theme Engine
   ========================================================================== */
:root {
  /* Brand Core */
  --ds-dark-base: #090d16;
  --ds-dark-surface: #0f172a;
  --ds-dark-card: #1e293b;
  
  --ds-accent-primary: #0d9488;
  --ds-accent-light: #14b8a6;
  --ds-accent-gradient: linear-gradient(135deg, #0d9488 0%, #0284c7 100%);
  --ds-hero-glow: radial-gradient(circle at 50% 0%, rgba(13, 148, 136, 0.15) 0%, rgba(9, 13, 22, 0) 70%);

  /* Light Canvas & Surfaces */
  --ds-body-bg: #f8fafc;
  --ds-card-bg: #ffffff;
  --ds-border-subtle: #e2e8f0;
  --ds-border-focus: #cbd5e1;

  /* Typography */
  --ds-font-main: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ds-text-heading: #0f172a;
  --ds-text-body: #334155;
  --ds-text-muted: #64748b;

  /* Shadows */
  --ds-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04);
  --ds-shadow-md: 0 8px 24px -4px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
  --ds-shadow-hover: 0 20px 32px -8px rgba(15, 23, 42, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
}

/* ==========================================================================
   Global Base & Typography
   ========================================================================== */
body {
  font-family: var(--ds-font-main);
  background-color: var(--ds-body-bg);
  color: var(--ds-text-body);
  line-height: 1.65;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--ds-text-heading);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.text-accent {
  color: var(--ds-accent-light) !important;
}

/* Skip link */
.skip-to-content {
  position: absolute;
  top: -45px;
  left: 1rem;
  background: var(--ds-accent-primary);
  color: #fff;
  padding: 0.5rem 1rem;
  font-weight: 600;
  border-radius: 0 0 8px 8px;
  z-index: 10000;
  transition: top 0.2s ease;
}
.skip-to-content:focus {
  top: 0;
}

/* ==========================================================================
   Navbar: High-Contrast Light Header
   ========================================================================== */
header {
  background-color: #ffffff !important;
  border-bottom: 1px solid var(--ds-border-subtle) !important;
}

/* Brand Logo */
.navbar-brand {
  font-weight: 800;
  color: var(--ds-dark-base) !important;
  letter-spacing: -0.03em;
  transition: opacity 0.2s ease;
}

.navbar-brand:hover {
  opacity: 0.9;
}

.navbar-brand .text-accent {
  color: var(--ds-accent-primary) !important;
}

/* Nav Links - Default Slate */
.navbar-nav .nav-link {
  color: var(--ds-text-body) !important;
  font-weight: 600;
  font-size: 0.925rem;
  padding: 0.5rem 0.9rem !important;
  border-radius: 8px;
  transition: all 0.2s ease;
  min-height: 44px;
}

/* Nav Links - Hover State (Teal Accent + Subtle Tinted Background) */
.navbar-nav .nav-link:hover {
  color: var(--ds-accent-primary) !important;
  background-color: rgba(13, 148, 136, 0.08) !important;
}

/* Nav Links - Active State */
.navbar-nav .nav-link.active {
  color: var(--ds-accent-primary) !important;
  background-color: rgba(13, 148, 136, 0.12) !important;
}

/* Mobile Toggler */
.navbar-toggler {
  border: 1px solid var(--ds-border-subtle);
  filter: none;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
}

/* ==========================================================================
   Hero Headshot Avatar: Dynamic Sizing & Micro-Interactions
   ========================================================================== */
:root {
  /* Change this single value to resize the avatar everywhere cleanly */
  --hero-avatar-size: 84px; /* default was 76px; adjust to 88px, 96px, etc. */
}

.hero-avatar-wrapper {
  position: relative;
  width: var(--hero-avatar-size);
  height: var(--hero-avatar-size);
  cursor: pointer;
  perspective: 600px;
}

.hero-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(45, 212, 191, 0.45);
  background-color: var(--ds-dark-card);
  box-shadow: 0 0 16px rgba(13, 148, 136, 0.3);
  
  /* Smooth hardware-accelerated transitions */
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.25s ease,
              box-shadow 0.28s ease;
  will-change: transform, box-shadow;
}

/* Hover & Focus Micro-Interaction */
.hero-avatar-wrapper:hover .hero-avatar,
.hero-avatar-wrapper:focus-within .hero-avatar {
  /* Subtle lift & scale without causing reflow */
  transform: translateY(-2px) scale(1.05);
  border-color: #2dd4bf;
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.55),
              0 0 12px rgba(45, 212, 191, 0.4);
}

/* ==========================================================================
   Avatar Status Dot & Radar Pulse Animation
   ========================================================================== */
.avatar-status-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background-color: #10b981; /* Emerald base */
  border: 2px solid #0f172a;
  border-radius: 50%;
  z-index: 2;
  transition: transform 0.25s ease;
}

/* Radar pulse wave */
.avatar-status-dot::before {
  content: "";
  position: absolute;
  inset: -2px; /* Align precisely with the border box */
  border-radius: 50%;
  background-color: inherit;
  opacity: 0.8;
  z-index: -1;
  pointer-events: none;
  animation: radar-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* GPU-accelerated wave expansion */
@keyframes radar-ping {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  75%, 100% {
    transform: scale(2.8);
    opacity: 0;
  }
}

/* Hover micro-interaction sync */
.hero-avatar-wrapper:hover .avatar-status-dot {
  transform: scale(1.15);
}

/* Accessibility: Honor reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .avatar-status-dot::before {
    animation: none;
    display: none;
  }
}

/* ==========================================================================
   Hero Section: Immersive Atmospheric Glow
   ========================================================================== */
/* .hero-section {
  background-color: var(--ds-dark-base);
  background-image: var(--ds-hero-glow);
  color: #f8fafc;
  padding: 5.5rem 0 5rem;
  position: relative;
  overflow: hidden;
} */

.hero-section {
  background-color: var(--ds-dark-base);
  /* Layer 1: Subtle radial vignette glow */
  /* Layer 2: Inlined technical grid (32px tile) */
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(13, 148, 136, 0.18) 0%, rgba(9, 13, 22, 0.95) 75%),
    url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h32v32H0V0zm1 1v30h30V1H1z' fill='%23ffffff' fill-opacity='0.025'/%3E%3Ccircle cx='1' cy='1' r='1' fill='%2314b8a6' fill-opacity='0.12'/%3E%3C/svg%3E");
  background-repeat: no-repeat, repeat;
  background-size: 100% 100%, 32px 32px;
  position: relative;
  overflow: hidden;
  padding: 5.5rem 0 5rem;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(13, 148, 136, 0.4), transparent);
}

.hero-section h1 {
  color: #ffffff;
  font-weight: 800;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  letter-spacing: -0.04em;
}

.hero-section .lead {
  color: #94a3b8;
  font-size: 1.15rem;
  line-height: 1.7;
}

.not-found-section {
  display: grid;
  min-height: min(680px, calc(100vh - 180px));
  place-items: center;
  overflow: hidden;
  padding: 5rem 0;
  position: relative;
  text-align: center;
  background-color: var(--ds-dark-base);
  background-image:
    radial-gradient(circle at 50% 0%, rgba(13, 148, 136, 0.18) 0%, rgba(9, 13, 22, 0.95) 75%),
    url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h32v32H0V0zm1 1v30h30V1H1z' fill='%23ffffff' fill-opacity='0.025'/%3E%3C/svg%3E");
  background-repeat: no-repeat, repeat;
  background-size: 100% 100%, 32px 32px;
}

.not-found-content {
  margin: 0 auto;
  max-width: 720px;
  position: relative;
  z-index: 1;
}

.not-found-section h1 {
  color: #ffffff;
}

.not-found-section .lead {
  color: #94a3b8;
  font-size: 1.15rem;
}

.not-found-section .metric-badge {
  background: rgba(20, 184, 166, 0.15);
  color: #2dd4bf;
  border-color: rgba(45, 212, 191, 0.3);
}

.not-found-code {
  color: rgba(45, 212, 191, 0.12);
  font-size: clamp(9rem, 28vw, 18rem);
  font-weight: 800;
  letter-spacing: -0.09em;
  line-height: 0.9;
  margin: 0 0 -0.1em;
  user-select: none;
}

/* ==========================================================================
   Hero Highlight Card High-Contrast Text Fix
   ========================================================================== */
.hero-highlight-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.5);
  color: #e2e8f0; /* Default high-contrast light slate */
}

/* Explicit heading and item title contrast */
.hero-highlight-card h2 {
  color: #ffffff !important;
}

.hero-highlight-card strong {
  color: #f8fafc !important; /* Bright white-slate for bold labels */
}

/* Fix for the description text inside the list items */
.hero-highlight-card li div,
.hero-highlight-card li {
  color: #cbd5e1 !important; /* Slate 300 - WCAG AA compliant on dark surfaces */
  line-height: 1.55;
  font-size: 0.95rem;
}

/* Checkmark accent brightness */
.hero-highlight-card .text-accent {
  color: #2dd4bf !important; /* Brighter teal (#2dd4bf) for dark background visibility */
}

/* ==========================================================================
   Buttons with Modern Micro-Interactions
   ========================================================================== */
.btn-accent:not(.wp-block-button) {
  background: var(--ds-accent-gradient);
  color: #ffffff !important;
  font-weight: 600;
  border: 1px solid var(--ds-accent-gradient);
  padding: 0.75rem 1.6rem;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: -0.01em;
}

.btn-accent:not(.wp-block-button):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(13, 148, 136, 0.45);
  color: #ffffff;
}

.btn-accent:not(.wp-block-button):active {
  transform: translateY(0);
}

.btn-outline-custom:not(.wp-block-button) {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.btn-outline-custom:not(.wp-block-button):hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  transform: translateY(-1px);
}
.btn-outline {
  background: rgba(255, 255, 255, 1);
  border: 1px solid rgba(70, 70, 70, 0.75);
  color: rgba(70, 70, 70, 0.75);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.btn-outline:hover {
  background: rgb(70, 70, 70);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Solid Accent Variant */
header .btn-outline-custom:not(.wp-block-button) {
  background: var(--ds-accent-gradient) !important;
  border: none !important;
  color: #ffffff !important;
  font-weight: 600;
  padding: 0.45rem 1.1rem !important;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.25);
  transition: all 0.2s ease;
}

header .btn-outline-custom:not(.wp-block-button):hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.4);
  color: #ffffff !important;
}

/* Light context secondary button */
.btn-outline-dark-custom {
  background: #ffffff;
  border: 1px solid var(--ds-border-subtle);
  color: var(--ds-text-heading);
  font-weight: 600;
  padding: 0.65rem 1.35rem;
  border-radius: 10px;
  box-shadow: var(--ds-shadow-sm);
  transition: all 0.2s ease;
}

.btn-outline-dark-custom:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

/* ==========================================================================
   Badges, Pills & Accents
   ========================================================================== */
.metric-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(13, 148, 136, 0.12);
  color: var(--ds-accent-primary);
  border: 1px solid rgba(13, 148, 136, 0.2);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  text-transform: uppercase;
}

/* Hero badge variation */
.hero-section .metric-badge {
  background: rgba(20, 184, 166, 0.15);
  color: #2dd4bf;
  border-color: rgba(45, 212, 191, 0.3);
}

/* ==========================================================================
   Cards & Surfaces
   ========================================================================== */
.feature-card {
  background: var(--ds-card-bg);
  border: 1px solid var(--ds-border-subtle);
  border-radius: 16px;
  padding: 2rem;
  height: 100%;
  box-shadow: var(--ds-shadow-sm);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(13, 148, 136, 0.3);
  box-shadow: var(--ds-shadow-hover);
}

.feature-card h3, 
.feature-card h2 {
  font-size: 1.25rem;
  margin-top: 1rem;
}

/* Featured Case Study Hero Box */
.case-highlight-card {
  background: #ffffff;
  border: 1px solid var(--ds-border-subtle);
  border-left: 5px solid var(--ds-accent-primary);
  border-radius: 16px;
  box-shadow: var(--ds-shadow-md);
  padding: 2.5rem;
}

.stat-box {
  background: var(--ds-body-bg);
  border: 1px solid var(--ds-border-subtle);
  border-radius: 12px;
  padding: 1.5rem;
}

.stat-box .stat-number {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

/* ==========================================================================
   Form Enhancements
   ========================================================================== */
.form-control, .form-select {
  font-family: var(--ds-font-main);
  background-color: #ffffff;
  border: 1px solid var(--ds-border-subtle);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  color: var(--ds-text-heading);
  transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--ds-accent-primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
  outline: none;
}

.form-label {
  font-size: 0.875rem;
  color: var(--ds-text-heading);
  margin-bottom: 0.4rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  background: #090d16 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #64748b;
}

footer a {
  color: #94a3b8 !important;
  transition: color 0.2s ease;
}

footer a:hover {
  color: var(--ds-accent-light) !important;
}

/* ==========================================================================
   Offcanvas Mobile Drawer Refinements
   ========================================================================== */
@media (max-width: 991.98px) {
  /* Clean slide-out drawer width and background */
  .offcanvas.offcanvas-end {
    width: 290px;
    background-color: #ffffff;
    border-left: 1px solid var(--ds-border-subtle);
  }

  .offcanvas-header {
    padding: 1.25rem 1.5rem;
  }

  .offcanvas-body {
    padding: 1.25rem 1.5rem;
  }

  /* Accessible mobile touch targets (48px height) */
  .offcanvas-body .navbar-nav .nav-link {
    font-size: 1rem;
    padding: 0.75rem 1rem !important;
    min-height: 48px;
    display: flex;
    align-items: center;
    border-radius: 8px;
  }

  /* Full-width touch target for the Contact button inside drawer */
  .offcanvas-body .navbar-nav .btn-outline-custom {
    min-height: 48px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Desktop Reset (Navbar-expand-lg handles layout automatically) */
@media (min-width: 992px) {
  .border-lg-0 {
    border-top: none !important;
  }
  .w-lg-auto {
    width: auto !important;
  }
}

/* ==========================================================================
   Block Theme Layout & Editor Styles
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1020;
  background-color: #ffffff !important;
  border-bottom: 1px solid var(--ds-border-subtle) !important;
}

.site-header-inner {
  min-height: 76px;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.wp-block-group.container {
  width: 100%;
  max-width: 1140px;
}

@media (min-width: 1400px) {
  .wp-block-group.container {
    max-width: 1320px;
  }
}

.site-logo {
  flex: 0 0 auto;
  margin: 0;
}

.site-logo img {
  display: block;
  width: 84px;
  height: auto;
}

.site-navigation {
  margin-left: auto;
}

.site-navigation .wp-block-navigation__container {
  gap: 0.25rem;
}

.site-navigation .wp-block-navigation-item__content {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  color: var(--ds-text-body);
  font-size: 0.925rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.site-navigation .wp-block-navigation-item__content:hover,
.site-navigation .current-menu-item > .wp-block-navigation-item__content {
  color: var(--ds-accent-primary);
  background-color: rgba(13, 148, 136, 0.08);
}

.site-navigation .nav-contact .wp-block-navigation-item__content,
.site-navigation .wp-block-navigation-item.nav-contact > .wp-block-navigation-item__content {
  background: var(--ds-accent-gradient);
  color: #ffffff;
  padding: 0.45rem 1.1rem;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.25);
}

.site-navigation .nav-contact .wp-block-navigation-item__content:hover,
.site-navigation .wp-block-navigation-item.nav-contact > .wp-block-navigation-item__content:hover {
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.4);
  transform: translateY(-1px);
}

.wp-block-button.btn-accent .wp-block-button__link {
  background: var(--ds-accent-gradient);
  border: 1px solid transparent;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
  color: #ffffff;
  font-family: var(--ds-font-main);
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 0.75rem 1.6rem;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.wp-block-button.btn-accent .wp-block-button__link:hover {
  box-shadow: 0 8px 22px rgba(13, 148, 136, 0.45);
  color: #ffffff;
  transform: translateY(-2px);
}

.wp-block-button.btn-outline-custom .wp-block-button__link {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #ffffff;
  font-family: var(--ds-font-main);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
}

.wp-block-button.btn-outline-custom .wp-block-button__link:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.hero-highlight-card .hero-avatar-wrapper {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0;
  flex: 0 0 84px;
}

.hero-highlight-card .hero-avatar-wrapper img {
  width: 84px;
  height: 84px;
  border: 2px solid rgba(45, 212, 191, 0.45);
  border-radius: 50%;
  background-color: var(--ds-dark-card);
  box-shadow: 0 0 16px rgba(13, 148, 136, 0.3);
  object-fit: cover;
}

.site-footer {
  padding: 1.5rem 0;
  background: #090d16 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #64748b;
}

.site-footer-inner {
  gap: 1rem;
}

.site-footer-inner p {
  margin: 0;
}

.site-footer a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--ds-accent-light);
}

.wp-block-columns.g-4 {
  gap: 1.5rem;
}

.wp-block-columns.g-5 {
  gap: 3rem;
}

.wp-block-group.feature-card {
  box-sizing: border-box;
}

.wp-block-image img {
  height: auto;
}

.not-found-section .wp-block-buttons {
  justify-content: center;
}

@media (max-width: 781px) {
  .site-header-inner {
    min-height: 68px;
  }

  .site-navigation .wp-block-navigation__responsive-container.is-menu-open {
    padding: 1.25rem 1.5rem;
    background-color: #ffffff;
  }

  .site-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
    align-items: stretch;
    gap: 0.25rem;
    width: 100%;
  }

  .site-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
    min-height: 48px;
    padding: 0.75rem 1rem;
  }
}