/* ============================================
   137Foundry — Visual Design
   Modern tech aesthetic, solo operator energy
   ============================================ */

/* --- Custom Properties --- */
:root {
  /* Foundry palette — navy/sky/teal on clean light gray */
  --color-accent: #3FA7D6;
  --color-accent-hover: #2D8DB8;
  --color-accent-subtle: rgba(63, 167, 214, 0.08);
  --color-accent-glow: rgba(63, 167, 214, 0.15);
  --color-secondary: #79B791;
  --color-secondary-hover: #68A57F;
  --color-secondary-subtle: rgba(121, 183, 145, 0.08);
  --color-heading: #003366;
  --color-btn-primary: #003366;
  --color-btn-primary-hover: #004080;

  /* Gradients */
  --gradient-brand: linear-gradient(135deg, #003366, #3FA7D6, #79B791);
  --gradient-hero: linear-gradient(135deg, #003366 0%, #3FA7D6 50%, #79B791 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(0, 51, 102, 0.03), rgba(63, 167, 214, 0.06), rgba(121, 183, 145, 0.03));
  --gradient-card-border: linear-gradient(135deg, #003366, #3FA7D6);

  /* Light mode — bright, clean, subtle blue glow */
  --bg-body: #F5F5F5;
  --bg-surface: #FFFFFF;
  --bg-surface-alt: #EEF1F4;
  --bg-nav: rgba(245, 245, 245, 0.88);
  --bg-code: #EEF1F4;
  --text-primary: #031323;
  --text-secondary: #2A3F54;
  --text-muted: #6B7D8E;
  --border-color: #D8DFE6;
  --border-color-light: #E8ECF0;
  --shadow-sm: 0 1px 3px rgba(3, 19, 35, 0.04);
  --shadow-md: 0 4px 12px rgba(3, 19, 35, 0.06);
  --shadow-lg: 0 12px 32px rgba(3, 19, 35, 0.08);
  --shadow-accent: 0 4px 20px rgba(63, 167, 214, 0.15);
  --shadow-glow: 0 0 30px rgba(63, 167, 214, 0.08);
  --focus-ring: 0 0 0 2px var(--bg-body), 0 0 0 4px var(--color-accent);

  /* Grain overlay */
  --grain: 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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.02'/%3E%3C/svg%3E");

  /* Typography */
  --font-heading: 'Satoshi', system-ui, -apple-system, sans-serif;
  --font-body: 'Switzer', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4.5rem;
  --space-4xl: 7rem;
  --space-5xl: 10rem;

  /* Layout */
  --max-width: 1200px;
  --nav-height: 64px;
  --border-radius: 6px;
  --border-radius-lg: 10px;
  --border-radius-xl: 14px;

  /* Transitions */
  --transition-fast: 120ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Dark Mode — deep navy, cool, modern --- */
[data-theme="dark"] {
  --bg-body: #0A1520;
  --bg-surface: #101E2C;
  --bg-surface-alt: #0D1925;
  --bg-nav: rgba(10, 21, 32, 0.90);
  --bg-code: #0D1925;
  --text-primary: #E8EEF4;
  --text-secondary: #A8B8C8;
  --text-muted: #607080;
  --border-color: #1A2A3A;
  --border-color-light: #152233;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-accent: 0 4px 20px rgba(91, 189, 232, 0.1);
  --shadow-glow: 0 0 30px rgba(91, 189, 232, 0.06);
  --color-accent: #5BBDE8;
  --color-accent-hover: #7DCDF0;
  --color-accent-subtle: rgba(91, 189, 232, 0.07);
  --color-accent-glow: rgba(91, 189, 232, 0.12);
  --color-secondary: #8FC9A3;
  --color-secondary-hover: #A3D6B5;
  --color-secondary-subtle: rgba(143, 201, 163, 0.07);
  --color-heading: #A8CCE8;
  --color-btn-primary: #3FA7D6;
  --color-btn-primary-hover: #5BBDE8;
  --gradient-brand: linear-gradient(135deg, #1A3D5C, #5BBDE8, #8FC9A3);
  --gradient-hero: linear-gradient(135deg, #0D1925 0%, #1A3D5C 50%, #162E40 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(91, 189, 232, 0.03), rgba(91, 189, 232, 0.05), rgba(143, 201, 163, 0.03));
  --gradient-card-border: linear-gradient(135deg, #5BBDE8, #8FC9A3);
}

/* --- Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--bg-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Subtle grain texture */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: var(--grain);
  background-repeat: repeat;
  background-size: 256px 256px;
  pointer-events: none;
  z-index: 9999;
  opacity: 1;
}

main {
  flex: 1;
  padding-top: var(--nav-height);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

a:hover {
  color: var(--color-accent);
}

/* --- Focus --- */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 3px;
}

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  background: var(--color-accent);
  color: #fff;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--border-radius);
  font-weight: 600;
  z-index: 1000;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-md);
  color: #fff;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-heading);
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 900;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}

p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-2xl);
  }
}

/* --- Navigation --- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  display: flex;
  align-items: center;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

@media (min-width: 768px) {
  .nav-inner {
    padding: 0 var(--space-2xl);
  }
}

/* Logo — image-based with light/dark variants */
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  height: 30px;
  width: auto;
}

.logo img.logo-dark { display: none; }
.logo img.logo-light { display: block; }

[data-theme="dark"] .logo img.logo-dark { display: block; }
[data-theme="dark"] .logo img.logo-light { display: none; }

/* Desktop Nav */
.nav-links {
  display: none;
  list-style: none;
  align-items: center;
  gap: var(--space-xl);
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: var(--space-xs) 0;
  position: relative;
  transition: color var(--transition-base);
  letter-spacing: 0.01em;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--color-accent);
  transition: width var(--transition-slow);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* --- Mega Menu (desktop) --- */
.has-mega {
  position: relative;
}

.has-mega > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-chevron {
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.has-mega:hover .nav-chevron,
.has-mega > a[aria-expanded="true"] .nav-chevron {
  transform: rotate(180deg);
}

.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
  z-index: 200;
  padding-top: 12px;
}

.has-mega:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.mega-menu-inner {
  display: flex;
  gap: var(--space-xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-xl);
  padding: var(--space-lg) var(--space-xl);
  box-shadow: var(--shadow-lg);
  min-width: 380px;
}

.mega-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 150px;
}

.mega-heading {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0 var(--space-sm);
  margin-bottom: var(--space-xs);
}

.mega-col a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px var(--space-sm);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--border-radius);
  transition: background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}

.mega-col a::after {
  display: none !important;
}

.mega-col a:hover {
  background: var(--color-accent-subtle);
  color: var(--color-accent);
}

.mega-col a svg {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.mega-col a:hover svg {
  color: var(--color-accent);
}

/* --- Mobile Sub-menus --- */
.mobile-has-sub {
  display: flex;
  flex-direction: column;
}

.mobile-sub-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: var(--space-sm) 0;
  cursor: pointer;
  text-align: left;
}

.mobile-sub-toggle .nav-chevron {
  transition: transform var(--transition-fast);
}

.mobile-sub-toggle[aria-expanded="true"] .nav-chevron {
  transform: rotate(180deg);
}

.mobile-sub-menu {
  display: none;
  list-style: none;
  padding-left: var(--space-md);
  margin: 0;
}

.mobile-sub-menu.is-open {
  display: block;
}

.mobile-sub-menu a {
  font-size: 0.95rem !important;
  font-weight: 400 !important;
  color: var(--text-secondary) !important;
  padding: 6px 0 !important;
}

.mobile-sub-menu a:hover {
  color: var(--color-accent) !important;
}

/* Nav CTA — proper button, not a nav link */
.nav-cta {
  display: none;
}

.nav-cta-btn {
  display: none;
  align-items: center;
  gap: var(--space-sm);
  background: var(--color-btn-primary);
  color: #fff !important;
  padding: 0.5rem 1.2rem;
  border-radius: var(--border-radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .nav-cta-btn {
    display: inline-flex;
  }
}

.nav-cta-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.12), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.nav-cta-btn:hover {
  background: var(--color-btn-primary-hover);
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-accent);
}

.nav-cta-btn:hover::before {
  opacity: 1;
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.theme-toggle:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-sun,
[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

.theme-toggle .icon-moon {
  display: block;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  width: 44px;
  height: 44px;
}

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

.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-body);
  padding: var(--space-xl) var(--space-lg);
  z-index: 99;
  overflow-y: auto;
}

.mobile-menu.is-open {
  display: block;
}

@media (min-width: 768px) {
  .mobile-menu {
    display: none !important;
  }
}

.mobile-menu-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mobile-menu-links a {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-primary);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
}

.mobile-menu-links a:hover {
  color: var(--color-accent);
}

.mobile-menu-links .nav-cta,
.mobile-menu-links .mobile-cta {
  display: inline-block;
  text-align: center;
  margin-top: var(--space-lg);
  border-bottom: none;
  font-size: 1rem;
  background: var(--color-btn-primary);
  color: #fff !important;
  padding: 0.7rem 1.4rem;
  border-radius: var(--border-radius);
  font-weight: 600;
}

/* --- Breadcrumb --- */
.breadcrumb {
  padding: var(--space-sm) 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: '/';
  margin: 0 var(--space-xs);
  color: var(--text-muted);
  opacity: 0.5;
}

.breadcrumb-item a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumb-item a:hover {
  color: var(--color-accent);
}

.breadcrumb-item [aria-current="page"] {
  color: var(--text-secondary);
  font-weight: 500;
}

/* --- Sections --- */
.section {
  padding: var(--space-3xl) 0;
  position: relative;
  overflow: hidden;
}

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

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

.section-header {
  margin-bottom: var(--space-2xl);
}

@media (min-width: 768px) {
  .section-header {
    margin-bottom: var(--space-3xl);
  }
}

.section-header h1 > svg,
.section-header h2 > svg,
.heading-icon svg {
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  stroke-width: 2.5;
}

.heading-icon {
  display: inline;
}

.section-header p {
  font-size: 1.05rem;
}

/* Divider line removed — clean headers only */

/* --- Hero --- */
.hero {
  padding: var(--space-3xl) 0;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #003366 0%, #0A4A7A 35%, #1A6B8A 60%, #2D8F7B 85%, #3D9E6E 100%);
}

[data-theme="dark"] .hero {
  background: linear-gradient(135deg, #0A1520 0%, #0D1F3A 30%, #112A4A 55%, #0E2240 75%, #091828 100%);
}

@media (min-width: 768px) {
  .hero {
    min-height: 95vh;
    display: flex;
    align-items: center;
    padding: var(--space-2xl) 0;
  }
}

/* Hero text on dark gradient */
.hero h1 {
  color: #fff;
  animation: fadeInUp 0.6s ease both;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: var(--space-xl);
  line-height: 1.7;
  animation: fadeInUp 0.6s ease 0.12s both;
}

.hero-subtitle a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.3);
  text-underline-offset: 2px;
}

.hero-subtitle a:hover {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.6);
}

/* Hero buttons on dark gradient */
.hero .btn-primary {
  background: #fff;
  color: #003366;
}

.hero .btn-primary:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #003366;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
}

.hero .btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.hero .btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.08);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  animation: fadeInUp 0.6s ease 0.24s both;
}

/* Hero entrance animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.7rem 1.4rem;
  font-family: var(--font-body);
  font-size: 0.925rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  border: none;
  min-height: 44px;
}

.btn-primary {
  background: var(--color-btn-primary);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.btn-primary:hover {
  background: var(--color-btn-primary-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-accent);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-secondary {
  background: transparent;
  color: var(--color-heading);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.btn-lg {
  padding: 0.85rem 1.8rem;
  font-size: 1rem;
}

.btn-icon {
  flex-shrink: 0;
  vertical-align: middle;
}

/* --- Cards --- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .card-wide {
    grid-column: span 2;
  }
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--space-xl) var(--space-lg);
  transition: border-color var(--transition-slow), box-shadow var(--transition-slow), transform var(--transition-slow);
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-card-border);
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.card:hover {
  border-color: var(--border-color);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transform: translateY(-3px);
  color: inherit;
}

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

.card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-subtle);
  border-radius: var(--border-radius);
  margin-bottom: var(--space-md);
  color: var(--color-accent);
  border: 1px solid var(--color-accent-glow);
}

.card-icon svg {
  width: 22px;
  height: 22px;
}

.card h3 {
  color: var(--color-heading);
}

.card p {
  color: var(--text-secondary);
  margin-bottom: 0;
  font-size: 0.925rem;
  line-height: 1.6;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-accent);
  font-weight: 500;
  font-size: 0.85rem;
  margin-top: var(--space-md);
  font-family: var(--font-heading);
  letter-spacing: 0.01em;
}

.card-link svg {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-slow);
}

.card:hover .card-link svg {
  transform: translateX(4px);
}

/* --- Scroll animations --- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-stagger.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- About Teaser --- */
.about-teaser {
  position: relative;
  border-radius: var(--border-radius-xl);
  padding: var(--space-2xl);
  background: var(--bg-surface-alt);
  border-left: 3px solid var(--color-accent);
}

@media (min-width: 768px) {
  .about-teaser {
    padding: var(--space-3xl) var(--space-3xl) var(--space-3xl) var(--space-2xl);
  }
}

.about-teaser h2 {
  margin-bottom: var(--space-md);
}

.about-teaser h2::after {
  display: none;
}

.about-teaser p {
  font-size: 1.02rem;
  line-height: 1.7;
}

/* --- CTA Section --- */
.cta-section {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-xl);
  padding: var(--space-2xl);
  text-align: center;
  overflow: hidden;
}

.cta-section::before {
  display: none;
}

@media (min-width: 768px) {
  .cta-section {
    padding: var(--space-3xl) var(--space-2xl);
  }
}

.cta-section h2 {
  color: var(--color-heading);
}

.cta-section h2::after {
  display: none;
}

.cta-section p {
  color: var(--text-secondary);
  margin: 0 auto var(--space-xl);
}

/* --- Booking Page --- */
.booking-section {
  min-height: 80vh;
  display: flex;
  align-items: center;
}

/* --- Service Page --- */
.service-page {
  padding: 0 0 var(--space-3xl);
}

.service-page .section {
  padding: var(--space-4xl) 0;
}

@media (min-width: 768px) {
  .service-page {
    padding: 0 0 var(--space-4xl);
  }
  .service-page .section {
    padding: var(--space-5xl) 0;
  }
}

/* Subpages with .container as direct child need top padding to clear nav */
.service-page > .container {
  padding-top: var(--space-3xl);
}

@media (min-width: 768px) {
  .service-page > .container {
    padding-top: var(--space-4xl);
  }
}

.service-intro {
  text-align: center;
  max-width: 80%;
  margin: 0 auto var(--space-3xl);
}

@media (min-width: 768px) {
  .service-intro {
    max-width: 800px;
  }
}

.service-intro h1 {
  margin-bottom: var(--space-lg);
}

.service-intro p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.service-section {
  margin-bottom: var(--space-3xl);
}

.service-section h2 {
  margin-bottom: var(--space-md);
}

.service-section h2::after {
  display: none;
}

.service-list {
  list-style: none;
  margin-bottom: var(--space-lg);
}

.service-list li {
  position: relative;
  padding-left: var(--space-lg);
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

.service-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.7em;
  width: 5px;
  height: 1.5px;
  background: var(--color-accent);
}

/* --- Contact Form --- */
.contact-form {
  max-width: 600px;
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 500;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
  font-size: 0.875rem;
  letter-spacing: 0.01em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: var(--focus-ring);
}

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

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

.form-status {
  padding: var(--space-md);
  border-radius: var(--border-radius);
  margin-bottom: var(--space-lg);
  font-weight: 500;
  font-size: 0.925rem;
}

.form-status.success,
.form-status-success {
  background: var(--color-accent-subtle);
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
}

.form-status.error,
.form-status-error {
  background: rgba(200, 60, 50, 0.06);
  color: #C83C32;
  border: 1px solid rgba(200, 60, 50, 0.2);
}

[data-theme="dark"] .form-status.error,
[data-theme="dark"] .form-status-error {
  color: #E8695E;
  border-color: rgba(232, 105, 94, 0.2);
  background: rgba(232, 105, 94, 0.06);
}

/* Hide the floating reCAPTCHA badge — disclosure is shown inline instead
   (permitted by Google's terms when the required notice is displayed). */
.grecaptcha-badge {
  visibility: hidden;
}

.recaptcha-disclosure {
  margin-top: var(--space-md);
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.recaptcha-disclosure a {
  color: var(--text-muted);
  text-decoration: underline;
}

/* --- Contact Info --- */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contact-info-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-secondary);
}

.contact-info-item svg {
  width: 18px;
  height: 18px;
  color: var(--color-accent);
  flex-shrink: 0;
}

.contact-info-item a {
  color: var(--text-secondary);
}

.contact-info-item a:hover {
  color: var(--color-accent);
}

/* --- Two Column --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}

@media (min-width: 768px) {
  .two-col {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
  }
}

.two-col-wide {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}

@media (min-width: 768px) {
  .two-col-wide {
    grid-template-columns: 1fr 2fr;
    gap: var(--space-3xl);
  }
}

/* --- Legal --- */
.legal-page {
  padding: var(--space-2xl) 0 var(--space-3xl);
}

.legal-page h1 {
  margin-bottom: var(--space-sm);
}

.legal-date {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: var(--font-mono);
  margin-bottom: var(--space-2xl);
}

.legal-content h2 {
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  font-size: 1.25rem;
}

.legal-content h2::after {
  display: none;
}

.legal-content p {
  margin-bottom: var(--space-md);
}

.legal-content ul {
  list-style: none;
  margin-bottom: var(--space-md);
}

.legal-content ul li {
  position: relative;
  padding-left: var(--space-lg);
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

.legal-content ul li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.7em;
  width: 5px;
  height: 1.5px;
  background: var(--color-accent);
}

/* --- Grid.js Table Overrides --- */
.gridjs-auto {
  margin: var(--space-lg) 0;
}

.gridjs-wrapper {
  border: 1px solid var(--border-color) !important;
  border-radius: var(--border-radius-lg) !important;
  overflow: hidden;
  box-shadow: var(--shadow-sm) !important;
}

.gridjs-table {
  font-family: var(--font-body) !important;
  font-size: 0.9rem !important;
}

.gridjs-thead .gridjs-th {
  background: var(--bg-surface-alt) !important;
  color: var(--color-heading) !important;
  font-family: var(--font-heading) !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  border-color: var(--border-color) !important;
  padding: 0.85rem 1rem !important;
}

.gridjs-tbody .gridjs-td {
  background: var(--bg-surface) !important;
  color: var(--text-secondary) !important;
  border-color: var(--border-color-light) !important;
  padding: 0.75rem 1rem !important;
  line-height: 1.6 !important;
}

.gridjs-tbody .gridjs-tr:hover .gridjs-td {
  background: var(--color-accent-subtle) !important;
}

/* Bold first column labels */
.gridjs-tbody .gridjs-td:first-child {
  color: var(--text-primary) !important;
  font-weight: 600 !important;
}

/* Dark mode */
[data-theme="dark"] .gridjs-wrapper {
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .gridjs-thead .gridjs-th {
  background: var(--bg-surface-alt) !important;
  color: var(--color-heading) !important;
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .gridjs-tbody .gridjs-td {
  background: var(--bg-surface) !important;
  color: var(--text-secondary) !important;
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .gridjs-tbody .gridjs-tr:hover .gridjs-td {
  background: var(--color-accent-subtle) !important;
}

[data-theme="dark"] .gridjs-tbody .gridjs-td:first-child {
  color: var(--text-primary) !important;
}

/* Hide Grid.js footer (pagination/info) when not needed */
.gridjs-footer {
  display: none !important;
}

/* --- Contact Cards (Other Ways to Reach Me) --- */
.contact-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

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

@media (min-width: 900px) {
  .contact-cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

.contact-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-xl) var(--space-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-xl);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform var(--transition-slow), box-shadow var(--transition-slow), border-color var(--transition-slow);
}

/* Gradient top-edge bar — slides in on hover */
.contact-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
}

.contact-card:not(.contact-card-static):hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: var(--color-accent-glow);
}

.contact-card:not(.contact-card-static):hover::before {
  transform: scaleX(1);
}

.contact-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--border-radius-lg);
  background: var(--color-accent-subtle);
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
  transition: background var(--transition-base), color var(--transition-base);
}

.contact-card:not(.contact-card-static):hover .contact-card-icon {
  background: var(--color-accent);
  color: #fff;
}

.contact-card-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.contact-card-value {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  word-break: break-word;
  transition: color var(--transition-base);
}

.contact-card-value small {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 2px;
}

.contact-card:not(.contact-card-static):hover .contact-card-value {
  color: var(--color-accent);
}

/* Dark mode adjustments */
[data-theme="dark"] .contact-card {
  background: var(--bg-surface);
  border-color: var(--border-color);
}

[data-theme="dark"] .contact-card:not(.contact-card-static):hover {
  box-shadow: var(--shadow-lg), 0 0 40px rgba(91, 189, 232, 0.1);
}

/* Contact cards inside dark sections */
.section-dark .contact-card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.section-dark .contact-card:not(.contact-card-static):hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2), 0 0 30px rgba(63, 167, 214, 0.15);
}

.section-dark .contact-card-icon {
  background: rgba(63, 167, 214, 0.15);
  border-color: rgba(63, 167, 214, 0.25);
  color: #5BBDE8;
}

.section-dark .contact-card:not(.contact-card-static):hover .contact-card-icon {
  background: #5BBDE8;
  color: #fff;
}

.section-dark .contact-card-label {
  color: rgba(255, 255, 255, 0.5);
}

.section-dark .contact-card-value {
  color: #fff;
}

.section-dark .contact-card-value small {
  color: rgba(255, 255, 255, 0.5);
}

.section-dark .contact-card:not(.contact-card-static):hover .contact-card-value {
  color: #5BBDE8;
}

/* Value-item cards inside dark sections */
.section-dark .value-item {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.section-dark .value-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2), 0 0 30px rgba(63, 167, 214, 0.15);
}

.section-dark .value-item h3 {
  color: #fff;
}

.section-dark .value-item p {
  color: rgba(255, 255, 255, 0.7);
}

/* --- Footer --- */
.site-footer {
  background: var(--bg-surface-alt);
  border-top: 1px solid var(--border-color);
  padding: var(--space-3xl) 0 var(--space-xl);
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
  text-align: left;
}

@media (max-width: 639px) {
  .footer-grid {
    text-align: center;
  }
  .footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .footer-brand p,
  .footer-address {
    margin-left: auto;
    margin-right: auto;
  }
  .footer-social {
    justify-content: center;
  }
  .footer-nav ul {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer-contact {
    justify-content: center;
  }
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    text-align: left;
  }
}

@media (min-width: 960px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1.8fr) repeat(3, minmax(0, 1fr));
    align-items: start;
    text-align: left;
  }
}

.footer-brand .logo {
  margin-bottom: var(--space-md);
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-address {
  font-style: normal;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-top: var(--space-sm);
}

.footer-address a {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-address a:hover {
  color: var(--color-accent);
}

.footer-social {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.footer-social a {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-social a:hover {
  color: var(--color-accent);
}

.footer-nav h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.footer-nav ul {
  list-style: none;
}

.footer-nav ul li {
  margin-bottom: var(--space-sm);
}

.footer-nav ul a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}

.footer-nav ul a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-md);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.footer-bottom a {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-bottom a:hover {
  color: var(--color-accent);
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-contact a {
  color: var(--text-muted);
}

.footer-contact a:hover {
  color: var(--color-accent);
}

/* --- Utility --- */
.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;
}

.text-accent {
  color: var(--color-accent);
}

.text-center {
  text-align: center;
}

.optional {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.85em;
}

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* ============================================
   Visual Enhancements — Gradients, Animations, SVGs
   ============================================ */

/* --- Gradient text --- */
.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}


/* When hero-bg is used outside .hero (book/contact pages), extend behind nav */
.section-has-bg {
  margin-top: calc(var(--nav-height) * -1);
  padding-top: calc(var(--nav-height) + var(--space-3xl));
}

@media (min-width: 768px) {
  .section-has-bg {
    min-height: 95vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
  }
  .section-has-bg > .container {
    width: 100%;
  }
}

/* Staggered fade-in entrance for top sections (matches homepage hero) */
.section-has-bg h1 {
  animation: fadeInUp 0.6s ease both;
}

.section-has-bg > .container > p,
.section-has-bg > .container > .two-col-wide,
.section-has-bg > .container > .booking-steps,
.section-has-bg > .container > noscript {
  animation: fadeInUp 0.6s ease 0.12s both;
}

.section-has-bg #booking-widget {
  animation: fadeInUp 0.6s ease 0.24s both;
}

/* First section entrance on any page (services, about, etc.) */
main > .section:first-child .section-header h1,
main > .section:first-child .section-header h2 {
  animation: fadeInUp 0.6s ease both;
}

main > .section:first-child .section-header p {
  animation: fadeInUp 0.6s ease 0.12s both;
}

main > .section:first-child .card-grid,
main > .section:first-child .skill-categories,
main > .section:first-child .two-col-wide {
  animation: fadeInUp 0.6s ease 0.24s both;
}

.hero-bg svg {
  position: absolute;
  width: 100%;
  height: 100%;
}

.hero .container {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* Hero grid layout */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: var(--space-xl);
}

/* Mobile: illustration on top, text below */
.hero-illustration {
  order: -1;
  animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-illustration svg {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  margin: 0 auto;
}

.hero-content {
  max-width: 560px;
}

/* Mobile: center hero text and buttons */
@media (max-width: 767px) {
  .hero-content {
    text-align: center;
    margin: 0 auto;
  }
  .hero-cta {
    justify-content: center;
  }
  .hero-illustration svg {
    max-width: 320px;
  }
}

/* Tablet+: side by side */
@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
  }
  .hero-illustration {
    order: 0;
  }
  .hero-illustration svg {
    max-width: 100%;
  }
}

/* Large screens: fluid container */
@media (min-width: 1024px) {
  .hero .container {
    max-width: none;
    padding-left: 10%;
    padding-right: 10%;
  }
  .hero-grid {
    grid-template-columns: 44% 1fr;
    gap: 6%;
  }
}

/* XL: more breathing room */
@media (min-width: 1400px) {
  .hero .container {
    padding-left: 10%;
    padding-right: 10%;
  }
  .hero-grid {
    grid-template-columns: 42% 1fr;
    gap: 8%;
  }
}

/* Reduce animation on prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .hero-illustration svg * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Legacy single hero image (kept for other pages) */
.hero-image {
  animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-image img {
  max-width: 100%;
  height: auto;
  display: block;
}

[data-theme="dark"] .hero-image img {
  mix-blend-mode: screen;
}



/* --- Gradient section backgrounds --- */
.section-gradient {
  background: var(--gradient-subtle);
  position: relative;
}

/* --- Gradient CTA section --- */
.cta-gradient {
  background: var(--color-btn-primary);
  border: none;
  position: relative;
  overflow: hidden;
}

.cta-gradient::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  opacity: 1;
}

.cta-gradient::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(63, 167, 214, 0.15) 0%, transparent 50%);
  animation: pulseGlow 8s ease-in-out infinite;
}

.cta-gradient * {
  position: relative;
  z-index: 1;
}

.cta-gradient h2 {
  color: #fff;
}

.cta-gradient p {
  color: rgba(255, 255, 255, 0.85);
}

.cta-gradient .btn-primary {
  background: #fff;
  color: var(--color-btn-primary);
}

.cta-gradient .btn-primary:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-btn-primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* --- Value props grid --- */
.value-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

@media (min-width: 768px) {
  .value-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2xl);
  }
}

.value-item {
  position: relative;
  text-align: center;
  padding: var(--space-xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-xl);
  overflow: hidden;
  transition: transform var(--transition-slow), box-shadow var(--transition-slow), border-color var(--transition-slow);
}

.value-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
}

.value-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: var(--color-accent-glow);
}

.value-item:hover::before {
  transform: scaleX(1);
}

[data-theme="dark"] .value-item:hover {
  box-shadow: var(--shadow-lg), 0 0 40px rgba(91, 189, 232, 0.1);
}

.value-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
  background: var(--color-accent-subtle);
  border: 1px solid var(--color-accent-glow);
  border-radius: var(--border-radius-lg);
  color: var(--color-accent);
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}

.value-item:hover .value-icon {
  transform: translateY(-3px);
  box-shadow: var(--shadow-accent);
}

.value-icon svg {
  width: 26px;
  height: 26px;
}

/* Numbered badge (replaces icon on homepage) */
.value-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-md);
  background: var(--gradient-brand);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(63, 167, 214, 0.3);
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}

.value-item:hover .value-number {
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(63, 167, 214, 0.5);
}

[data-theme="dark"] .value-number {
  box-shadow: 0 0 20px rgba(91, 189, 232, 0.25);
}

[data-theme="dark"] .value-item:hover .value-number {
  box-shadow: 0 0 30px rgba(91, 189, 232, 0.45);
}

.value-item h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
}

.value-item p {
  font-size: 0.925rem;
  margin: 0 auto;
}

/* --- Process Timeline (animated SVG path) --- */
.process-timeline {
  position: relative;
  min-height: 400px;
}

/* SVG canvas */
.timeline-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.timeline-svg-desktop { display: none; }
.timeline-svg-mobile { display: block; }

@media (min-width: 768px) {
  .timeline-svg-desktop { display: block; }
  .timeline-svg-mobile { display: none; }
  .process-timeline { min-height: 320px; }
}

/* Path stroke */
.timeline-path {
  stroke: var(--color-accent);
  opacity: 0.25;
  transition: stroke-dashoffset 2.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.process-timeline.is-animating .timeline-path {
  opacity: 0.4;
}

/* Drawn portion overlaid on top */
.timeline-path-drawn {
  stroke: var(--color-accent);
  opacity: 0.8;
  transition: none;
}

/* Traveling dot */
.timeline-dot {
  fill: var(--color-accent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.process-timeline.is-animating .timeline-dot {
  opacity: 1;
}

[data-theme="dark"] .timeline-path {
  opacity: 0.15;
}

[data-theme="dark"] .process-timeline.is-animating .timeline-path {
  opacity: 0.3;
}

/* Step nodes — mobile: stacked vertically */
.timeline-node {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: var(--space-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  max-width: 280px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow var(--transition-slow);
}

.timeline-node.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.timeline-node:hover {
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

/* Mobile layout: centered stack with spacing */
.timeline-node-1 { margin: 0 auto var(--space-3xl); }
.timeline-node-2 { margin: 0 auto var(--space-3xl); }
.timeline-node-3 { margin: 0 auto; }

/* Desktop layout: absolute positioning along the S-curve */
@media (min-width: 768px) {
  .process-timeline {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
  }
  .timeline-node {
    position: absolute;
    margin: 0;
  }
  .timeline-node-1 {
    top: 38%;
    left: 0;
  }
  .timeline-node-2 {
    top: 2%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
  }
  .timeline-node-2.is-revealed {
    transform: translateX(-50%) translateY(0);
  }
  .timeline-node-3 {
    bottom: 2%;
    right: 0;
  }
}

/* Number badge */
.timeline-node-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 auto var(--space-md);
  background: var(--gradient-brand);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.1rem;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(63, 167, 214, 0.3);
  transition: box-shadow var(--transition-slow);
}

.timeline-node.is-revealed .timeline-node-number {
  box-shadow: 0 0 25px rgba(63, 167, 214, 0.5);
}

[data-theme="dark"] .timeline-node-number {
  box-shadow: 0 0 20px rgba(91, 189, 232, 0.25);
}

[data-theme="dark"] .timeline-node.is-revealed .timeline-node-number {
  box-shadow: 0 0 30px rgba(91, 189, 232, 0.45);
}

.timeline-node h3 {
  margin-bottom: var(--space-sm);
}

.timeline-node p {
  font-size: 0.925rem;
  margin: 0 auto;
}

/* --- Process Scenes (SVG illustrations) --- */
.process-scenes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.process-scene {
  text-align: center;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.process-scene.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.process-scene-svg {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-lg);
}

.process-scene-svg svg {
  width: 100%;
  max-width: 280px;
  height: auto;
}

.process-scene-number {
  display: none;
  width: 36px;
  height: 36px;
  margin: 0 auto var(--space-sm);
  background: var(--gradient-brand);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 0.95rem;
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(63, 167, 214, 0.3);
}

.process-scene h3 {
  margin-bottom: var(--space-xs);
}

.process-scene p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 300px;
  margin: 0 auto;
  line-height: 1.6;
}

@media (max-width: 767px) {
  .process-scenes {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    max-width: 400px;
    margin: 0 auto;
  }
}

/* --- About photo layout --- */
.about-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

@media (min-width: 768px) {
  .about-hero-grid {
    grid-template-columns: 280px 1fr;
    gap: var(--space-3xl);
  }
}

.about-photo {
  width: 280px;
  height: 280px;
  border-radius: var(--border-radius-xl);
  object-fit: cover;
  border: 3px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  margin: 0 auto;
}

@media (min-width: 768px) {
  .about-photo {
    margin: 0;
  }
}

/* --- Tech stack / skills badges --- */
.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.35rem 0.75rem;
  background: var(--color-accent-subtle);
  border: 1px solid var(--color-accent-glow);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-accent);
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

a.tech-badge:hover {
  background: var(--color-accent-glow);
  border-color: var(--color-accent);
  transform: translateY(-1px);
}

/* --- Skill categories grid --- */
.skill-categories {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

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

@media (min-width: 1024px) {
  .skill-categories {
    grid-template-columns: repeat(3, 1fr);
  }
}

.skill-category {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-xl);
  padding: var(--space-xl) var(--space-lg);
  overflow: hidden;
  transition: transform var(--transition-slow), box-shadow var(--transition-slow), border-color var(--transition-slow);
}

/* Gradient top-edge bar — slides in on hover (matches contact cards) */
.skill-category::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
}

.skill-category:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: var(--color-accent-glow);
}

.skill-category:hover::before {
  transform: scaleX(1);
}

.skill-category h3 {
  font-size: 0.95rem;
  margin-bottom: var(--space-md);
}

.skill-category h3::after {
  display: none;
}

.skill-category h3 a {
  color: var(--color-heading);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color var(--transition-base);
}

.skill-category:hover h3 a {
  color: var(--color-accent);
}

.skill-category h3 a::after {
  content: '\2192';
  font-size: 0.85rem;
  color: var(--color-accent);
  transition: transform var(--transition-fast);
}

.skill-category:hover h3 a::after {
  transform: translateX(4px);
}

[data-theme="dark"] .skill-category:hover {
  box-shadow: var(--shadow-lg), 0 0 40px rgba(91, 189, 232, 0.1);
}

/* --- Section wave divider --- */
.wave-divider {
  width: 100%;
  height: auto;
  display: block;
  margin: -1px 0;
}

.wave-divider path {
  fill: var(--bg-surface-alt);
}

/* --- Keyframe Animations --- */
@keyframes pulseGlow {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}



/* --- Service page enhancements --- */
.service-hero {
  position: relative;
  overflow: hidden;
}

.service-hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: var(--gradient-subtle);
  pointer-events: none;
}

/* --- Glow utility --- */
.glow-sm {
  box-shadow: var(--shadow-glow);
}

/* --- Section accent border --- */
.accent-border-left {
  border-left: 3px solid transparent;
  border-image: var(--gradient-card-border) 1;
  padding-left: var(--space-lg);
}

/* ============================================
   Dark Section — used for "What I Build" on homepage
   ============================================ */
.section-dark {
  background: linear-gradient(135deg, #003366 0%, #0A4A7A 35%, #1A6B8A 60%, #2D8F7B 85%, #3D9E6E 100%);
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .section-dark {
  background: linear-gradient(135deg, #0A1520 0%, #0D1F3A 30%, #112A4A 55%, #0E2240 75%, #091828 100%);
}

/* Locked dark: always uses the deep navy palette regardless of theme */
.section-dark-locked {
  background: linear-gradient(135deg, #0A1520 0%, #0D1F3A 30%, #112A4A 55%, #0E2240 75%, #091828 100%) !important;
}

.section-dark-locked .section-svg-bg {
  color: rgba(255, 255, 255, 0.5);
}

.section-dark .section-header h1,
.section-dark .section-header h2,
.section-dark .section-header p {
  color: rgba(255, 255, 255, 0.9);
}

.section-dark .section-header h1,
.section-dark .section-header h2 {
  color: #fff;
}

/* All headings and body text inside dark sections */
.section-dark h2,
.section-dark h3 {
  color: #fff;
}

.section-dark > .container > p,
.section-dark > .container > ul,
.section-dark > .container > ul li,
.section-dark p,
.section-dark li {
  color: rgba(255, 255, 255, 0.75);
}

.section-dark a:not(.btn):not(.contact-card):not(.tech-badge) {
  color: #5BBDE8;
}

.section-dark .card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.section-dark .card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.section-dark .card::before {
  background: linear-gradient(135deg, #3FA7D6, #79B791);
}

.section-dark .card h3 {
  color: #fff;
}

.section-dark .card p {
  color: rgba(255, 255, 255, 0.7);
}

.section-dark .card-icon {
  background: rgba(63, 167, 214, 0.15);
  border-color: rgba(63, 167, 214, 0.25);
  color: #5BBDE8;
}

.section-dark .card-link {
  color: #5BBDE8;
}

/* Decorative pseudo-elements removed — gradient background only */

/* ============================================
   Stat Callout — "Did You Know" / Facts component
   ============================================ */
.stat-callout {
  background: linear-gradient(135deg, #003366 0%, #0D4A8A 100%);
  border-radius: var(--border-radius-xl);
  padding: var(--space-2xl);
  position: relative;
  overflow: hidden;
  margin: var(--space-2xl) 0;
}

[data-theme="dark"] .stat-callout {
  background: linear-gradient(135deg, #0D1925 0%, #1A2D42 100%);
}

.stat-callout::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(63, 167, 214, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.stat-callout-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #5BBDE8;
  margin-bottom: var(--space-xl);
}

.stat-callout-label svg {
  width: 36px;
  height: 36px;
}

.stat-callout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

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

@media (min-width: 768px) {
  .stat-callout-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat-item {
  text-align: center;
  position: relative;
  z-index: 1;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  margin-bottom: var(--space-xs);
  letter-spacing: -0.03em;
}

.stat-description {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
  margin: 0 auto;
}

/* Single-stat callout variant */
.stat-callout-single {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

@media (max-width: 640px) {
  .stat-callout-single {
    flex-direction: column;
    text-align: center;
  }
}

.stat-callout-single .stat-number {
  flex-shrink: 0;
  font-size: clamp(2.5rem, 6vw, 4rem);
}

.stat-callout-single .stat-text {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  line-height: 1.65;
}

.stat-callout-single .stat-text strong {
  color: #fff;
}

/* ============================================
   About Page — hero dark background
   ============================================ */
.about-hero-section {
  position: relative;
  overflow: hidden;
}

.about-hero-section .container {
  position: relative;
  z-index: 1;
}

.about-hero-section h1 {
  color: #fff;
}

.about-hero-section p {
  color: rgba(255, 255, 255, 0.85);
}

.about-hero-section .about-photo {
  border-color: rgba(255, 255, 255, 0.2);
}

/* ============================================
   About Page — better spacing
   ============================================ */
.about-hero-grid {
  margin-top: var(--space-lg);
}

@media (min-width: 768px) {
  .about-hero-grid {
    margin-top: var(--space-xl);
  }
}

/* ============================================
   Services Hub — SVG backgrounds, charts, FAQ
   ============================================ */

/* --- Section SVG backgrounds --- */
.section-svg-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  color: var(--text-muted);
}

.section-svg-bg svg {
  position: absolute;
  width: 100%;
  height: 100%;
}

.section-dark .section-svg-bg {
  color: rgba(255, 255, 255, 0.5);
}

.section-svg-bg + .container {
  position: relative;
  z-index: 1;
}

/* --- Comparison Bar Chart --- */
.chart-container {
  max-width: 700px;
  margin: 0 auto;
}

.comparison-chart {
  width: 100%;
  height: auto;
}

.chart-label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  fill: var(--color-heading);
}

.chart-legend {
  font-family: var(--font-body);
  font-size: 11px;
  fill: var(--text-muted);
}

.chart-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: var(--space-md);
  font-style: italic;
}

.section-dark .chart-label {
  fill: rgba(255, 255, 255, 0.8);
}

.section-dark .chart-legend {
  fill: rgba(255, 255, 255, 0.6);
}

.section-dark .chart-note {
  color: rgba(255, 255, 255, 0.45);
}

.bar {
  transition: width var(--transition-slow);
}

.bar-agency {
  fill: #6B7D8E;
  opacity: 0.6;
}

.bar-freelancer {
  fill: #A8B8C8;
  opacity: 0.5;
}

.bar-foundry {
  fill: #3FA7D6;
}

[data-theme="dark"] .bar-agency {
  fill: #8E6B6B;
  opacity: 0.8;
}

[data-theme="dark"] .bar-freelancer {
  fill: #C8A88E;
  opacity: 0.7;
}

[data-theme="dark"] .bar-foundry {
  fill: #5BBDE8;
}

/* --- Included Section Grid --- */
.included-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

@media (min-width: 768px) {
  .included-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
  }
}

/* Checklist */
.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.checklist li svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--color-secondary);
}

/* --- Donut Chart --- */
.included-chart {
  text-align: center;
}

.chart-heading {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: var(--space-lg);
}

.donut-chart {
  width: 200px;
  height: 200px;
  margin: 0 auto var(--space-lg);
}

.donut-segment {
  transition: opacity var(--transition-base);
}

.donut-legend {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm) var(--space-lg);
}

.donut-legend li {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

[data-theme="dark"] .legend-dot[style*="#003366"] {
  background: #A8CCE8 !important;
}

[data-theme="dark"] .donut-chart circle[stroke="#003366"] {
  stroke: #A8CCE8;
}

/* --- Stack Chart --- */
.stack-chart-container {
  max-width: 600px;
  margin: 0 auto;
}

.stack-chart {
  width: 100%;
  height: auto;
}

.stack-label {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  fill: var(--color-heading);
}

.stack-tags {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: var(--text-muted);
  text-anchor: end;
}

.stack-bar-bg {
  fill: var(--border-color);
  opacity: 0.4;
}

.stack-bar {
  transition: width var(--transition-slow);
}

[data-theme="dark"] .stack-label {
  fill: #E8EEF4;
}

[data-theme="dark"] .stack-tags {
  fill: #607080;
}

.section-dark .stack-label {
  fill: #fff;
}

.section-dark .stack-tags {
  fill: rgba(255, 255, 255, 0.5);
}

.section-dark .stack-bar-bg {
  fill: rgba(255, 255, 255, 0.1);
}

.section-dark .stack-bar[style*="#003366"] {
  fill: #A8CCE8 !important;
}

[data-theme="dark"] .stack-bar-bg {
  fill: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .stack-bar[style*="#003366"] {
  fill: #A8CCE8 !important;
}

/* --- FAQ --- */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-base), background var(--transition-base);
}

.faq-item[open] {
  border-color: var(--color-accent);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-heading);
  list-style: none;
  user-select: none;
  transition: color var(--transition-base);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--color-accent);
  flex-shrink: 0;
  margin-left: var(--space-md);
  transition: transform var(--transition-base);
}

.faq-item[open] summary::after {
  content: '\2212';
}

.faq-item summary:hover {
  color: var(--color-accent);
}

.faq-answer {
  padding: 0 var(--space-xl) var(--space-lg);
}

.faq-answer p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
  font-size: 0.95rem;
}

.faq-answer .faq-answer-cta {
  display: inline-flex;
  margin-top: var(--space-md);
}

/* FAQ inside dark sections */
.section-dark .faq-item {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.section-dark .faq-item[open] {
  border-color: rgba(63, 167, 214, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.section-dark .faq-item summary {
  color: #fff;
}

.section-dark .faq-item summary:hover {
  color: #5BBDE8;
}

.section-dark .faq-answer p {
  color: rgba(255, 255, 255, 0.75);
}

/* ============================================
   Service 2-Column Layout with SVG Illustrations
   ============================================ */

.service-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.service-2col.svg-left .service-2col-svg { order: 1; }
.service-2col.svg-left .service-2col-content { order: 2; }
.service-2col.svg-right .service-2col-content { order: 1; }
.service-2col.svg-right .service-2col-svg { order: 2; }

.service-2col-content h2 {
  margin-bottom: var(--space-md);
}

.service-2col-content h2::after {
  display: none;
}

.service-2col-svg {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Browser illustration base */
.browser-illustration {
  width: 100%;
  max-width: 480px;
  height: auto;
  filter: drop-shadow(0 8px 32px rgba(0, 0, 0, 0.15));
  --frame-bg: #f0f2f5;
  --titlebar-bg: #1e2d4a;
  --frame-border: #d0d7de;
  --urlbar-bg: #fff;
  --text-muted: #6b7685;
  --card-bg: #fff;
  --accent: #3FA7D6;
  --accent-dark: #003366;
  --secondary: #79B791;
}

[data-theme="dark"] .browser-illustration {
  filter: drop-shadow(0 8px 32px rgba(0, 0, 0, 0.4));
  --frame-bg: #1a2234;
  --titlebar-bg: #0f1724;
  --frame-border: #2a3a52;
  --urlbar-bg: #162032;
  --text-muted: #7a8ea6;
  --card-bg: #162032;
  --accent: #5BBDE8;
  --accent-dark: #A8CCE8;
  --secondary: #8FC9A3;
}

/* Phone illustration base */
.phone-illustration {
  width: 100%;
  max-width: 480px;
  height: auto;
  filter: drop-shadow(0 8px 32px rgba(0, 0, 0, 0.18));
  --frame-bg: #f0f2f5;
  --frame-border: #d0d7de;
  --card-bg: #fff;
  --text-muted: #6b7685;
  --accent: #3FA7D6;
  --accent-dark: #003366;
  --secondary: #79B791;
}

[data-theme="dark"] .phone-illustration {
  filter: drop-shadow(0 8px 32px rgba(0, 0, 0, 0.45));
  --frame-bg: #1a2234;
  --frame-border: #2a3a52;
  --card-bg: #162032;
  --text-muted: #7a8ea6;
  --accent: #5BBDE8;
  --accent-dark: #A8CCE8;
  --secondary: #8FC9A3;
}

/* SVG animation keyframes */
@keyframes browserFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes dotPop {
  0%   { r: 0; opacity: 0; }
  60%  { r: 7; }
  100% { r: 6; opacity: 1; }
}

@keyframes slideRight {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideLeft {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes barGrow {
  from { transform: scaleY(0); opacity: 0; }
  to   { transform: scaleY(1); opacity: var(--bar-opacity, 1); }
}

@keyframes gaugeGrow {
  from { stroke-dashoffset: var(--gauge-circumference, 283); }
  to   { stroke-dashoffset: var(--gauge-target, 0); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 0.8; }
}

@keyframes typeCursor {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

@keyframes rocketLift {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

@keyframes codeType {
  0%   { width: 0; opacity: 0; }
  10%  { opacity: 0.6; }
  100% { width: var(--line-w); opacity: var(--line-o); }
}

@keyframes codeLoop {
  0%, 5%    { opacity: 0; transform: translateX(-4px); }
  10%, 85%  { opacity: var(--line-o); transform: translateX(0); }
  95%, 100% { opacity: 0; transform: translateX(0); }
}

@keyframes smokeBillow {
  0%   { transform: translateY(0) scale(0.4); opacity: 0.35; }
  50%  { opacity: 0.2; }
  100% { transform: translateY(40px) scale(1.8); opacity: 0; }
}

@keyframes flameFlicker {
  0%, 100% { transform: scaleY(1) scaleX(1); opacity: 0.7; }
  25%      { transform: scaleY(1.15) scaleX(0.92); opacity: 0.85; }
  50%      { transform: scaleY(0.9) scaleX(1.08); opacity: 0.6; }
  75%      { transform: scaleY(1.1) scaleX(0.95); opacity: 0.8; }
}

.browser-illustration .traffic-light { animation: dotPop 0.4s ease both; }
.browser-illustration .traffic-light:nth-child(2) { animation-delay: 0.1s; }
.browser-illustration .traffic-light:nth-child(3) { animation-delay: 0.2s; }
.browser-illustration .featured-element,
.phone-illustration .featured-element { animation: browserFadeUp 0.6s ease 0.3s both; }

/* Tablet and smaller: stack with SVG on top, center headings + SVGs */
@media (max-width: 991px) {
  .service-2col {
    grid-template-columns: 1fr;
  }
  .service-2col .service-2col-svg {
    order: -1 !important;
  }
  .service-2col .service-2col-content {
    order: 1 !important;
  }
  .browser-illustration,
  .phone-illustration {
    max-width: 400px;
  }

  /* Stacked content pages: center headings & SVGs, left-align body text */
  .service-page .service-section h2,
  .service-page .service-2col-content h2 {
    text-align: center;
  }
  .service-page .service-2col-svg {
    justify-content: center;
  }
}

@media (max-width: 575px) {
  .browser-illustration,
  .phone-illustration {
    max-width: 320px;
  }
}

/* ============================================
   AI Model Tier Standout Section
   ============================================ */

.ai-model-showcase {
  position: relative;
  margin: var(--space-3xl) calc(-1 * ((100vw - min(100vw - 2 * var(--space-xl), var(--max-width))) / 2));
  padding: var(--space-3xl) var(--space-2xl);
  background: linear-gradient(135deg, #003366 0%, #0A4A7A 35%, #1A6B8A 60%, #2D8F7B 85%, #3D9E6E 100%);
  overflow: hidden;
}

[data-theme="dark"] .ai-model-showcase {
  background: linear-gradient(135deg, #0A1520 0%, #0D1F3A 30%, #112A4A 55%, #0E2240 75%, #091828 100%);
}

.ai-model-showcase::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(63, 167, 214, 0.12) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(121, 183, 145, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.ai-model-showcase-inner {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
}

.ai-model-showcase h2 {
  color: #fff;
  text-align: center;
  margin-bottom: var(--space-sm);
  font-size: 1.75rem;
}

.ai-model-showcase h2::after { display: none; }

.ai-model-showcase > .service-2col-content > p,
.ai-model-showcase-inner > p {
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.7;
}

.ai-model-showcase-inner > p a {
  color: #5BBDE8;
}

/* Tier grid */
.ai-tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.ai-tier-card {
  position: relative;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-xl);
  padding: var(--space-lg);
  backdrop-filter: blur(8px);
  transition: transform var(--transition-base), border-color var(--transition-base);
}

.ai-tier-card:hover {
  transform: translateY(-2px);
  border-color: rgba(63, 167, 214, 0.3);
}

.ai-tier-card--t1 { border-top: 3px solid #5BBDE8; }
.ai-tier-card--t2 { border-top: 3px solid #79B791; }
.ai-tier-card--t3 { border-top: 3px solid rgba(255, 255, 255, 0.35); }

.ai-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.ai-tier-card--t1 .ai-tier-badge { background: rgba(91, 189, 232, 0.15); color: #5BBDE8; }
.ai-tier-card--t2 .ai-tier-badge { background: rgba(121, 183, 145, 0.15); color: #8FC9A3; }
.ai-tier-card--t3 .ai-tier-badge { background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.6); }

.ai-tier-card h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: var(--space-xs);
}

.ai-tier-desc {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
  line-height: 1.5;
  margin-bottom: var(--space-md);
}

.ai-tier-providers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ai-tier-pill {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

a.ai-tier-pill {
  text-decoration: none;
}

.ai-tier-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.15);
}

.ai-tier-card--t1 .ai-tier-pill { border-color: rgba(91, 189, 232, 0.15); }
.ai-tier-card--t2 .ai-tier-pill { border-color: rgba(121, 183, 145, 0.12); }

.ai-model-note {
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  font-style: italic;
}

@media (max-width: 991px) {
  .ai-model-showcase {
    margin-left: calc(-1 * var(--space-xl));
    margin-right: calc(-1 * var(--space-xl));
  }
  .ai-tier-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575px) {
  .ai-model-showcase {
    margin-left: calc(-1 * var(--space-md));
    margin-right: calc(-1 * var(--space-md));
    padding: var(--space-2xl) var(--space-md);
  }
}

/* ============================================
   AI Tools Directory Section
   ============================================ */

.ai-tools-directory {
  margin-top: var(--space-3xl);
  padding-top: var(--space-3xl);
  border-top: 1px solid var(--border-color);
}

.ai-tools-directory > h2 {
  margin-bottom: var(--space-xs);
}

.ai-tools-directory > h2::after { display: none; }

.ai-tools-directory > p {
  color: var(--text-secondary);
  margin-bottom: var(--space-2xl);
  max-width: 700px;
}

.ai-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.ai-tools-category {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
  transition: border-color var(--transition-base);
}

.ai-tools-category:hover {
  border-color: var(--color-accent);
}

.ai-tools-category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--color-accent-subtle);
  margin-bottom: var(--space-sm);
}

.ai-tools-category-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--color-accent);
}

.ai-tools-category h3 {
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.ai-tools-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.ai-tools-list li {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 14px;
  font-size: 0.78rem;
  background: var(--bg-surface-alt);
  color: var(--text-secondary);
  border: 1px solid var(--border-color-light);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.ai-tools-list li:hover {
  background: var(--color-accent-subtle);
  color: var(--color-accent);
}

.ai-tools-list li a {
  color: inherit;
  text-decoration: none;
}

.ai-tools-list li:hover a {
  color: inherit;
}

@media (max-width: 991px) {
  .ai-tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575px) {
  .ai-tools-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   SEO Checker Tool
   ============================================ */

.seo-checker {
  position: relative;
  margin: var(--space-3xl) calc(-1 * ((100vw - min(100vw - 2 * var(--space-xl), var(--max-width))) / 2));
  padding: var(--space-3xl) var(--space-2xl);
  background: linear-gradient(135deg, #003366 0%, #0A4A7A 40%, #1A6B8A 70%, #2D8F7B 100%);
  overflow: hidden;
}

[data-theme="dark"] .seo-checker {
  background: linear-gradient(135deg, #0A1520 0%, #0D1F3A 35%, #112A4A 65%, #0E2240 100%);
}

.seo-checker::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(63, 167, 214, 0.1) 0%, transparent 60%);
  pointer-events: none;
}

.seo-checker-inner {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
}

.seo-checker h2 {
  color: #fff;
  text-align: center;
  margin-bottom: var(--space-xs);
  font-size: 1.75rem;
}

.seo-checker h2::after { display: none; }

.seo-checker-subtitle {
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  margin-bottom: var(--space-2xl);
  font-size: 0.95rem;
}

.seo-checker-form {
  display: flex;
  gap: var(--space-sm);
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
}

.seo-checker-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--border-radius-lg);
  outline: none;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.seo-checker-form input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.seo-checker-form input:focus {
  border-color: rgba(91, 189, 232, 0.5);
  background: rgba(255, 255, 255, 0.12);
}

.seo-checker-form button {
  padding: 0.75rem 1.5rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: var(--color-accent);
  border: none;
  border-radius: var(--border-radius-lg);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
}

.seo-checker-form button:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}

.seo-checker-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Loading state */
.seo-checker-loading {
  text-align: center;
  color: #fff;
  padding: var(--space-2xl) 0;
  display: none;
}

.seo-checker-loading.active { display: block; }

.seo-checker-loading p {
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  margin: var(--space-md) 0 0;
}

.seo-scanner-bar {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin: var(--space-md) auto;
  overflow: hidden;
}

.seo-scanner-bar::after {
  content: '';
  display: block;
  width: 40%;
  height: 100%;
  background: var(--color-accent);
  border-radius: 2px;
  animation: scanSlide 1.2s ease-in-out infinite;
}

@keyframes scanSlide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* Results */
.seo-checker-results {
  display: none;
}

.seo-checker-results.active { display: block; }

/* Score ring */
.seo-score-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
  flex-wrap: wrap;
}

.seo-score-ring {
  position: relative;
  width: 140px;
  height: 140px;
}

.seo-score-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.seo-score-ring .ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 8;
}

.seo-score-ring .ring-fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 408;
  stroke-dashoffset: 408;
  transition: stroke-dashoffset 1.5s ease, stroke 0.3s ease;
}

.seo-score-ring .ring-fill.good { stroke: #28c840; }
.seo-score-ring .ring-fill.ok { stroke: #febc2e; }
.seo-score-ring .ring-fill.bad { stroke: #ff5f57; }

/* Flourish pulse when the counter lands on its final value. */
.seo-score-ring.landed::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 0 0 currentColor;
  color: rgba(63, 167, 214, 0.55);
  animation: scoreRingLand 0.9s ease-out both;
}
.seo-score-ring.landed:has(.ring-fill.good)::after { color: rgba(40, 200, 64, 0.55); }
.seo-score-ring.landed:has(.ring-fill.ok)::after { color: rgba(254, 188, 46, 0.55); }
.seo-score-ring.landed:has(.ring-fill.bad)::after { color: rgba(255, 95, 87, 0.55); }

@keyframes scoreRingLand {
  0%   { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
  60%  { box-shadow: 0 0 0 18px currentColor; opacity: 0.6; }
  100% { box-shadow: 0 0 0 28px transparent;  opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .seo-score-ring.landed::after { animation: none; display: none; }
}

.seo-score-number {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.seo-score-number span {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.seo-score-number small {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0.2rem;
}

.seo-score-summary {
  display: flex;
  gap: var(--space-lg);
}

.seo-score-stat {
  text-align: center;
}

.seo-score-stat-num {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.seo-score-stat-num.pass { color: #28c840; }
.seo-score-stat-num.warn { color: #febc2e; }
.seo-score-stat-num.fail { color: #ff5f57; }

.seo-score-stat-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0.2rem;
}

/* Check items */
.seo-check-list {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.seo-check-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 0.65rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius);
  opacity: 0;
  transform: translateX(-10px);
  animation: slideRight 0.3s ease forwards;
}

.seo-check-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}

.seo-check-icon.pass { background: rgba(40, 200, 64, 0.15); color: #28c840; }
.seo-check-icon.warn { background: rgba(254, 188, 46, 0.15); color: #febc2e; }
.seo-check-icon.fail { background: rgba(255, 95, 87, 0.15); color: #ff5f57; }

.seo-check-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  min-width: 140px;
}

.seo-check-detail {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
  flex: 1;
}

.seo-checker-error {
  text-align: center;
  color: #ff5f57;
  padding: var(--space-lg);
  display: none;
}

.seo-checker-error.active { display: block; }

.seo-checker-cta {
  text-align: center;
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

.seo-checker-cta a {
  color: #5BBDE8;
  font-weight: 600;
}

@media (max-width: 991px) {
  .seo-checker {
    margin-left: calc(-1 * var(--space-xl));
    margin-right: calc(-1 * var(--space-xl));
  }
}

@media (max-width: 575px) {
  .seo-checker {
    margin-left: calc(-1 * var(--space-md));
    margin-right: calc(-1 * var(--space-md));
    padding: var(--space-2xl) var(--space-md);
  }
  .seo-checker-form {
    flex-direction: column;
  }
  .seo-check-item {
    flex-wrap: wrap;
  }
  .seo-check-label {
    min-width: auto;
  }
  .seo-score-header {
    flex-direction: column;
    gap: var(--space-lg);
  }
}

/* ============================================
   Problem / Solution Side-by-Side Cards
   ============================================ */

.problem-solution-section {
  margin-bottom: var(--space-3xl);
}

.problem-solution-section > h2 {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.problem-solution-section > h2::after { display: none; }

.problem-solution-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}

.ps-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-xl);
  padding: var(--space-lg) var(--space-lg) var(--space-xl);
  overflow: hidden;
  transition: border-color var(--transition-base), transform var(--transition-base);
}

.ps-card:hover {
  transform: translateY(-2px);
}

.ps-card--problem {
  border-top: 4px solid #ff5f57;
}

.ps-card--problem:hover { border-color: rgba(255, 95, 87, 0.4); }

.ps-card--solution {
  border-top: 4px solid #28c840;
}

.ps-card--solution:hover { border-color: rgba(40, 200, 64, 0.4); }

.ps-card-svg {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-lg);
}

.ps-card-svg svg {
  width: 100%;
  max-width: 360px;
  height: auto;
}

.ps-card h3 {
  font-size: 1.15rem;
  margin-bottom: var(--space-sm);
}

.ps-card--problem h3 { color: #ff5f57; }
.ps-card--solution h3 { color: #28c840; }

[data-theme="dark"] .ps-card--problem h3 { color: #ff7b74; }
[data-theme="dark"] .ps-card--solution h3 { color: #4ade60; }

.ps-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: var(--space-sm);
}

.ps-card .service-list {
  margin-bottom: 0;
}

/* What This Looks Like — check icons */
.feature-check-list h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feature-check-list h3::before {
  content: '';
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(40, 200, 64, 0.1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2328c840' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 13px;
  background-position: center;
  background-repeat: no-repeat;
}

@media (max-width: 767px) {
  .problem-solution-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   SEO Eval CTA Form (conditional, inside checker)
   ============================================ */

.seo-eval-cta {
  display: none;
  max-width: 560px;
  margin: 0 auto var(--space-2xl);
  padding: var(--space-xl);
  background: rgba(255, 95, 87, 0.06);
  border: 1px solid rgba(255, 95, 87, 0.15);
  border-radius: var(--border-radius-xl);
  text-align: center;
}

.seo-eval-cta.active { display: block; }

/* Slide-and-fade reveal driven from JS after the score-ring lands. */
.seo-eval-cta.active.reveal {
  animation: evalCtaReveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes evalCtaReveal {
  0%   { opacity: 0; transform: translateY(28px) scale(0.97); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .seo-eval-cta.active.reveal { animation: none; }
}

.seo-eval-cta-msg {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-xs);
  line-height: 1.4;
}

.seo-eval-cta-sub {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: var(--space-lg);
}

.seo-eval-fields {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: 400px;
  margin: 0 auto;
}

.seo-eval-fields input {
  padding: 0.6rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--border-radius);
  outline: none;
  transition: border-color var(--transition-fast);
}

.seo-eval-fields input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.seo-eval-fields input:focus {
  border-color: rgba(91, 189, 232, 0.5);
}

.seo-eval-fields button {
  padding: 0.7rem 1.2rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: #ff5f57;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.seo-eval-fields button:hover {
  background: #e8524a;
  transform: translateY(-1px);
}

.seo-eval-fields button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.seo-eval-success {
  display: none;
  padding: var(--space-lg);
  text-align: center;
}

.seo-eval-success.active { display: block; }

.seo-eval-success p {
  color: #28c840;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.seo-eval-success small {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
}

.seo-eval-error {
  color: #ff5f57;
  font-size: 0.82rem;
  margin-top: var(--space-xs);
  display: none;
}

.seo-eval-error.active { display: block; }

/* ============================================
   Tools pages — shared extensions
   ============================================ */

/* Promo card on /services/technical-seo */
.seo-checker-promo {
  position: relative;
  margin: var(--space-3xl) 0;
  padding: var(--space-2xl);
  background: linear-gradient(135deg, #003366 0%, #0A4A7A 40%, #1A6B8A 70%, #2D8F7B 100%);
  border-radius: var(--border-radius-xl);
  text-align: center;
  overflow: hidden;
}
[data-theme="dark"] .seo-checker-promo {
  background: linear-gradient(135deg, #0A1520 0%, #0D1F3A 35%, #112A4A 65%, #0E2240 100%);
}
.seo-checker-promo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(63, 167, 214, 0.15) 0%, transparent 60%);
  pointer-events: none;
}
.seo-checker-promo-inner {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
}
.seo-checker-promo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(91, 189, 232, 0.15);
  color: #5BBDE8;
  margin-bottom: var(--space-md);
}
.seo-checker-promo h2 {
  color: #fff;
  margin-bottom: var(--space-sm);
  font-size: 1.6rem;
}
.seo-checker-promo h2::after { display: none; }
.seo-checker-promo-sub {
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: var(--space-lg);
  font-size: 0.95rem;
}
.seo-checker-promo .btn-primary {
  background: #fff;
  color: #003366;
}
.seo-checker-promo .btn-primary:hover {
  background: #e8ecf0;
}

/* ============================================
   Core Web Vitals Checker
   ============================================ */
.cwv-form {
  flex-wrap: wrap;
}
.cwv-strategy-toggle {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0 var(--space-sm);
}
.cwv-strategy-toggle label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  cursor: pointer;
}
.cwv-strategy-toggle input {
  accent-color: var(--color-accent);
}
.cwv-field-summary {
  text-align: center;
  min-width: 220px;
}
.cwv-field-summary-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.35rem;
}
.cwv-field-summary-value {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 0.35rem;
}
.cwv-field-summary-value.good { color: #28c840; }
.cwv-field-summary-value.ok { color: #febc2e; }
.cwv-field-summary-value.bad { color: #ff5f57; }
.cwv-field-summary-value.none { color: rgba(255, 255, 255, 0.4); }
.cwv-field-summary-sub {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
}
.cwv-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: var(--space-xl);
}
.cwv-metric {
  position: relative;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-lg);
  animation: browserFadeUp 0.5s ease both;
}
.cwv-metric-good { border-color: rgba(40, 200, 64, 0.35); background: rgba(40, 200, 64, 0.06); }
.cwv-metric-ni { border-color: rgba(254, 188, 46, 0.35); background: rgba(254, 188, 46, 0.06); }
.cwv-metric-poor { border-color: rgba(255, 95, 87, 0.35); background: rgba(255, 95, 87, 0.06); }
.cwv-metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}
.cwv-metric-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}
.cwv-metric-source {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.cwv-metric-value {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 0.25rem;
}
.cwv-metric-good .cwv-metric-value { color: #28c840; }
.cwv-metric-ni .cwv-metric-value { color: #febc2e; }
.cwv-metric-poor .cwv-metric-value { color: #ff5f57; }
.cwv-metric-full {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0.15rem;
}
.cwv-metric-target {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.35);
}
.cwv-opps-heading {
  color: #fff;
  font-size: 1rem;
  margin: var(--space-xl) 0 var(--space-md);
  text-align: center;
  letter-spacing: 0.02em;
}
.cwv-opps-heading::after { display: none; }
.cwv-opps {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.cwv-opp-item {
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--border-radius);
  opacity: 0;
  animation: slideRight 0.4s ease forwards;
}
.cwv-opp-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  margin-bottom: 0.2rem;
}
.cwv-opp-savings {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #5BBDE8;
  margin-bottom: 0.2rem;
}
.cwv-opp-desc {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.5;
}

@media (max-width: 575px) {
  .cwv-form { flex-direction: column; }
  .cwv-strategy-toggle { justify-content: center; }
  .cwv-metrics-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
   AI Discoverability Checker — audit display
   ============================================ */
.llm-category-scores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  max-width: 840px;
  margin: 0 auto var(--space-xl);
}
.llm-cat-card {
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-lg);
  text-align: center;
  opacity: 0;
  animation: browserFadeUp 0.5s ease forwards;
}
.llm-cat-good { border-color: rgba(40, 200, 64, 0.35); }
.llm-cat-ok { border-color: rgba(254, 188, 46, 0.35); }
.llm-cat-bad { border-color: rgba(255, 95, 87, 0.35); }
.llm-cat-name {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.llm-cat-score {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  color: #fff;
  margin-bottom: 0.3rem;
}
.llm-cat-good .llm-cat-score { color: #28c840; }
.llm-cat-ok .llm-cat-score { color: #febc2e; }
.llm-cat-bad .llm-cat-score { color: #ff5f57; }
.llm-cat-sub {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: rgba(255, 255, 255, 0.45);
}

.llm-crawler-heading {
  color: #fff;
  font-size: 1rem;
  text-align: center;
  margin: var(--space-xl) 0 var(--space-md);
  grid-column: 1 / -1;
}
.llm-crawler-heading::after { display: none; }
.llm-crawler-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.5rem;
  max-width: 840px;
  margin: 0 auto var(--space-xl);
}
.llm-crawler-item {
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  opacity: 0;
  animation: browserFadeUp 0.4s ease forwards;
}
.llm-crawler-pass { border-left: 3px solid #28c840; }
.llm-crawler-warn { border-left: 3px solid #febc2e; }
.llm-crawler-fail { border-left: 3px solid #ff5f57; }
.llm-crawler-name {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
  color: #fff;
  margin-bottom: 0.1rem;
}
.llm-crawler-desc {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.25rem;
}
.llm-crawler-disposition {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.llm-crawler-pass .llm-crawler-disposition { color: #28c840; }
.llm-crawler-warn .llm-crawler-disposition { color: #febc2e; }
.llm-crawler-fail .llm-crawler-disposition { color: #ff5f57; }

.llm-check-fix {
  display: inline-block;
  margin-top: 0.25rem;
  color: #5BBDE8;
  font-weight: 600;
  font-size: 0.78rem;
  text-decoration: none;
}
.llm-check-fix:hover { text-decoration: underline; }

.llm-gen-promo {
  display: none;
  max-width: 640px;
  margin: var(--space-xl) auto 0;
  padding: var(--space-lg);
  background: rgba(63, 167, 214, 0.08);
  border: 1px solid rgba(63, 167, 214, 0.25);
  border-radius: var(--border-radius-lg);
  text-align: center;
}
.llm-gen-promo.active { display: block; animation: browserFadeUp 0.5s ease both; }
.llm-gen-promo-heading {
  font-family: var(--font-heading);
  font-weight: 700;
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.3rem;
}
.llm-gen-promo-sub {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

/* ============================================
   AI Discoverability Checker — generators
   ============================================ */
.llm-generators {
  margin: var(--space-3xl) 0;
  padding: var(--space-2xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-xl);
}
.llm-generators > h2 {
  text-align: center;
  margin-bottom: 0.35rem;
}
.llm-generators > h2::after { display: none; }
.llm-generators-sub {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: var(--space-xl);
}

.llm-gen-tabs {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}
.llm-gen-tab {
  padding: 0.55rem 1.1rem;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.llm-gen-tab:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.llm-gen-tab.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.llm-gen-panel {
  display: none;
}
.llm-gen-panel.active {
  display: block;
  animation: browserFadeUp 0.4s ease both;
}
.llm-gen-desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: var(--space-md);
}
.llm-gen-desc code {
  background: var(--bg-surface-alt);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.85em;
}

.llm-gen-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}
.llm-gen-form-stacked {
  flex-direction: column;
  gap: var(--space-md);
}
.llm-gen-form input[type="text"],
.llm-gen-form input[type="email"],
.llm-gen-form input[type="date"],
.llm-gen-form select,
.llm-gen-form textarea {
  flex: 1;
  min-width: 200px;
  padding: 0.6rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  outline: none;
  transition: border-color var(--transition-fast);
}
.llm-gen-form input:focus,
.llm-gen-form textarea:focus,
.llm-gen-form select:focus {
  border-color: var(--color-accent);
}
.llm-gen-form textarea {
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  min-height: 80px;
  width: 100%;
}
.llm-gen-form button[type="submit"],
.llm-faq-add {
  padding: 0.65rem 1.4rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: var(--color-accent);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
  align-self: flex-start;
}
.llm-gen-form button[type="submit"]:hover,
.llm-faq-add:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}
.llm-faq-add {
  background: transparent;
  color: var(--color-accent);
  border: 1px dashed var(--color-accent);
  margin-top: 0.5rem;
}
.llm-faq-add:hover {
  background: var(--color-accent-subtle);
  color: var(--color-accent);
}
.llm-faq-qa {
  padding: var(--space-md);
  background: var(--bg-body);
  border: 1px solid var(--border-color-light);
  border-radius: var(--border-radius);
  margin-bottom: var(--space-sm);
}

.llm-gen-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.llm-gen-field > label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
}
.llm-gen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.6rem;
}
.llm-gen-strategy {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.llm-gen-strategy label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.llm-schema-subtabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}
.llm-schema-subtab {
  padding: 0.4rem 0.9rem;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: var(--border-radius);
  transition: color var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}
.llm-schema-subtab:hover { color: var(--color-accent); }
.llm-schema-subtab.active {
  color: var(--color-accent);
  background: var(--color-accent-subtle);
  border-color: var(--color-accent);
}
.llm-schema-subpanel { display: none; }
.llm-schema-subpanel.active { display: flex; flex-direction: column; gap: var(--space-md); }

.llm-gen-loading {
  display: none;
  text-align: center;
  color: var(--text-secondary);
  padding: var(--space-lg) 0;
}
.llm-gen-loading.active { display: block; }
.llm-gen-loading p {
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  margin: var(--space-md) 0 0;
}
.llm-gen-loading .seo-scanner-bar {
  background: var(--border-color);
}
.llm-gen-loading .seo-scanner-bar::after {
  background: var(--color-accent);
}

.llm-gen-error {
  display: none;
  padding: 0.75rem 1rem;
  background: rgba(255, 95, 87, 0.08);
  border: 1px solid rgba(255, 95, 87, 0.25);
  border-radius: var(--border-radius);
  color: #ff5f57;
  font-size: 0.88rem;
  margin-top: var(--space-md);
}
.llm-gen-error.active { display: block; }

.llm-gen-output {
  display: none;
  margin-top: var(--space-lg);
  background: #1a1a2e;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
}
.llm-gen-output.active { display: block; animation: browserFadeUp 0.4s ease both; }
.llm-gen-output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: #0f0f1c;
}
.llm-gen-output-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.82rem;
  color: #e8ecf0;
}
.llm-gen-output-meta {
  margin-left: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #7a8ea6;
}
.llm-gen-copy {
  padding: 0.35rem 0.85rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.llm-gen-copy:hover { background: rgba(255, 255, 255, 0.2); }
.llm-gen-output pre {
  margin: 0;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  max-height: 480px;
  background: transparent;
}
.llm-gen-output code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #a8c8ff;
  white-space: pre;
  background: transparent;
}
.llm-gen-deploy {
  padding: 0.65rem 1rem;
  background: rgba(63, 167, 214, 0.08);
  border-top: 1px solid rgba(63, 167, 214, 0.2);
  color: #a8b8c8;
  font-size: 0.82rem;
}
.llm-gen-deploy code {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.1em 0.4em;
  border-radius: 3px;
  color: #5BBDE8;
  font-family: var(--font-mono);
  font-size: 0.88em;
}

@media (max-width: 575px) {
  .llm-generators { padding: var(--space-lg); }
  .llm-gen-form { flex-direction: column; }
  .llm-gen-form input,
  .llm-gen-form select { width: 100%; }
  .llm-category-scores { grid-template-columns: repeat(2, 1fr); }
  .llm-crawler-grid { grid-template-columns: 1fr; }
}

/* Radar sweep animation for SEO checker page SVG */
@keyframes radarSweep {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ============================================
   Tools landing page — 3-up card grid
   ============================================ */
.tools-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  width: 100%;
}
/* Tablet: single column at 80% width, centered */
@media (min-width: 640px) and (max-width: 991px) {
  .tools-card-grid {
    width: 80%;
    margin: 0 auto;
  }
}
/* Desktop: true 3-up row, equal columns */
@media (min-width: 992px) {
  .tools-card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.tools-card-grid .card {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.tools-card-grid .card p {
  flex: 1;
}

/* ============================================
   Agent-Readiness Audit tool
   ============================================ */
.agent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.65rem;
  max-width: 920px;
  margin: 0 auto var(--space-xl);
}
.agent-grid .llm-crawler-item {
  padding: 0.85rem 1rem;
}
.agent-grid .llm-crawler-name { font-size: 0.85rem; }
.agent-grid .llm-crawler-desc { font-size: 0.72rem; }
.agent-reason {
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.45;
}

/* ============================================
   AI Permissions Auditor tool
   ============================================ */
.perm-section-heading {
  color: #fff;
  font-size: 1rem;
  text-align: center;
  margin: var(--space-xl) 0 var(--space-md);
}
.perm-section-heading::after { display: none; }

.perm-matrix {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-width: 960px;
  margin: 0 auto var(--space-xl);
}
.perm-row {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr 1.4fr 2fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius);
  opacity: 0;
  animation: browserFadeUp 0.4s ease forwards;
}
.perm-row-head {
  background: transparent;
  border: none;
  padding: 0.4rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 700;
  opacity: 1;
  animation: none;
}
.perm-row-pass { border-left: 3px solid #28c840; }
.perm-row-warn { border-left: 3px solid #febc2e; }
.perm-row-fail { border-left: 3px solid #ff5f57; }

.perm-bot {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.perm-bot strong {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.82rem;
  color: #fff;
}
.perm-vendor {
  font-size: 0.66rem;
  color: rgba(255, 255, 255, 0.5);
}

.perm-purpose {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.perm-purpose-training   { background: rgba(255, 95, 87, 0.15);  color: #ff8a82; }
.perm-purpose-search     { background: rgba(254, 188, 46, 0.15); color: #ffd06b; }
.perm-purpose-answering  { background: rgba(40, 200, 64, 0.15);  color: #6be08c; }

.perm-disposition {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.perm-disp-pass { color: #6be08c; }
.perm-disp-warn { color: #ffd06b; }
.perm-disp-fail { color: #ff8a82; }

.perm-desc {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .perm-row {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "bot purpose"
      "disp disp"
      "desc desc";
    row-gap: 0.4rem;
  }
  .perm-row-head { display: none; }
  .perm-bot { grid-area: bot; }
  .perm-purpose-cell { grid-area: purpose; text-align: right; }
  .perm-disposition { grid-area: disp; }
  .perm-desc { grid-area: desc; }
}

/* ============================================
   Tools landing — 5-card layout adjustment
   ============================================ */
@media (min-width: 992px) {
  .tools-card-grid.tools-card-grid-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}
