/* ══════════════════════════════════════════════════════════════════
   PROACTIVE IDEA — DESIGN SYSTEM
   1. Brand tokens (raw palette)
   2. Semantic tokens (light + dark)
   3. Typography
   4. Spacing / radius / shadow tokens
   5. Base elements
   6. Buttons
   7. Focus & accessibility
   8. Cards & surfaces
   9. Forms
   10. Components (nav, footer, language switcher, theme toggle, etc.)
   11. Page-specific sections (projects, featured, error)
   12. Responsive rules
   ══════════════════════════════════════════════════════════════════ */

/* ── 1. Brand tokens (raw palette) ─────────────────────────────────
   Do not use these directly in components — map them to semantic
   tokens below and consume the semantic tokens everywhere else. */

:root {
  --pi-navy-950: #060b18;
  --pi-navy-900: #0a1428;
  --pi-navy-800: #101f3d;
  --pi-navy-700: #16294f;

  --pi-blue-700: #123a91;
  --pi-blue-600: #1450c4;
  --pi-blue-500: #1f6feb;

  --pi-cyan-500: #17b7c9;
  --pi-cyan-400: #22d3ee;
  --pi-cyan-300: #67e8f9;

  --pi-gray-950: #0b1220;
  --pi-gray-800: #1f2a3d;
  --pi-gray-600: #4b5b70;
  --pi-gray-400: #8a97a8;
  --pi-gray-200: #dbe3ea;
  --pi-gray-100: #eef2f6;
  --pi-gray-50: #f7f9fb;

  --pi-white: #ffffff;
}

/* ── 2. Semantic tokens (light, default) ───────────────────────────── */

:root {
  --color-bg: var(--pi-white);
  --color-surface: var(--pi-gray-50);
  --color-surface-elevated: var(--pi-white);
  --color-text: var(--pi-navy-900);
  --color-text-muted: var(--pi-gray-600);
  --color-border: var(--pi-gray-200);
  --color-decorative: var(--pi-gray-100);
  --color-primary: var(--pi-blue-600);
  --color-primary-hover: var(--pi-blue-700);
  --color-accent: var(--pi-cyan-500);
  --color-focus: var(--pi-blue-600);
  --color-error: #b91c1c;
  --color-warning: #b45309;
  --color-success: #15803d;
  --color-primary-soft: color-mix(in srgb, var(--color-primary) 8%, transparent);
  --color-primary-soft-strong: color-mix(in srgb, var(--color-primary) 18%, transparent);

  --bs-primary: var(--pi-blue-600);
  --bs-primary-rgb: 20, 80, 196;
  --bs-secondary: var(--pi-cyan-500);
  --bs-secondary-rgb: 23, 183, 201;
  --bs-dark: var(--pi-navy-900);
  --bs-dark-rgb: 10, 20, 40;
  --bs-light: var(--pi-gray-50);
  --bs-light-rgb: 247, 249, 251;
  --bs-body-color: var(--pi-navy-900);
  --bs-body-color-rgb: 10, 20, 40;
  --bs-body-bg: var(--pi-white);
  --bs-body-bg-rgb: 255, 255, 255;
  --bs-border-color: var(--pi-gray-200);
  --bs-link-color: var(--pi-blue-600);
  --bs-link-hover-color: var(--pi-blue-700);
  --bs-code-color: var(--pi-blue-600);

  /* ── Spacing scale ──────────────────────────────────────────── */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* ── Radius scale ───────────────────────────────────────────── */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  /* ── Shadow scale (light mode: subtle) ─────────────────────── */
  --shadow-sm: 0 1px 2px rgba(10, 20, 40, 0.06);
  --shadow-md: 0 8px 24px -8px rgba(10, 20, 40, 0.12);
  --shadow-lg: 0 24px 48px -16px rgba(10, 20, 40, 0.16);

  /* ── Layout ─────────────────────────────────────────────────── */
  --container-max: 1320px;
}

/* ── 2b. Semantic tokens (dark) ─────────────────────────────────── */

[data-bs-theme="dark"] {
  --color-bg: var(--pi-navy-950);
  --color-surface: var(--pi-navy-900);
  --color-surface-elevated: var(--pi-navy-800);
  --color-text: var(--pi-gray-50);
  --color-text-muted: #a7b3c4;
  --color-border: var(--pi-navy-700);
  --color-decorative: var(--pi-navy-800);
  --color-primary: var(--pi-blue-500);
  --color-primary-hover: var(--pi-cyan-400);
  --color-accent: var(--pi-cyan-400);
  --color-focus: var(--pi-cyan-400);
  --color-error: #f87171;
  --color-warning: #fbbf24;
  --color-success: #4ade80;

  --bs-primary: var(--pi-blue-500);
  --bs-primary-rgb: 31, 111, 235;
  --bs-secondary: var(--pi-cyan-400);
  --bs-secondary-rgb: 34, 211, 238;
  --bs-dark: var(--pi-navy-950);
  --bs-dark-rgb: 6, 11, 24;
  --bs-light: var(--pi-navy-900);
  --bs-light-rgb: 10, 20, 40;
  --bs-body-color: var(--pi-gray-50);
  --bs-body-color-rgb: 247, 249, 251;
  --bs-body-bg: var(--pi-navy-950);
  --bs-body-bg-rgb: 6, 11, 24;
  --bs-border-color: var(--pi-navy-700);
  --bs-link-color: var(--pi-blue-500);
  --bs-link-hover-color: var(--pi-cyan-400);
  --bs-code-color: var(--pi-cyan-400);

  /* Dark mode favors contrast/borders over heavy black shadows */
  --shadow-sm: 0 0 0 1px rgba(255, 255, 255, 0.04);
  --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.03);
  --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

/* ── 3. Typography ─────────────────────────────────────────────────
   Single primary family (Plus Jakarta Sans) with system fallbacks.
   Weights loaded: 300/400/500/600/700/800 — matches actual usage
   across templates (fw-light, fw-normal, fw-bolder, headings). */

:root {
  --font-family-base: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --font-size-display: clamp(2.25rem, 1.6rem + 2.5vw, 3.5rem);
  --font-size-h1: clamp(1.9rem, 1.5rem + 1.6vw, 2.75rem);
  --font-size-h2: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  --font-size-h3: 1.3rem;
  --font-size-body: 1rem;
  --font-size-small: 0.9rem;
  --font-size-caption: 0.8rem;
  --font-size-button: 1rem;
  --font-size-nav: 0.9rem;
  --font-size-label: 0.85rem;

  --line-height-heading: 1.15;
  --line-height-body: 1.6;
}

body,
.navbar-brand,
.btn {
  font-family: var(--font-family-base);
}

.text-display {
  font-size: var(--font-size-display);
  font-weight: 800;
  line-height: var(--line-height-heading);
}

h1, .h1 { font-size: var(--font-size-h1); line-height: var(--line-height-heading); }
h2, .h2 { font-size: var(--font-size-h2); line-height: var(--line-height-heading); }
h3, .h3 { font-size: var(--font-size-h3); line-height: var(--line-height-heading); }

body {
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
}

small, .text-small { font-size: var(--font-size-small); }
.text-caption { font-size: var(--font-size-caption); color: var(--color-text-muted); }

.btn { font-size: var(--font-size-button); }
.navbar-nav { font-size: var(--font-size-nav); }
label, .form-label { font-size: var(--font-size-label); }

/* ── 4. Base elements ──────────────────────────────────────────── */

body {
  background-color: var(--color-bg);
  color: var(--color-text);
}

.navbar.bg-white {
  background-color: var(--color-bg) !important;
}

.text-primary {
  color: var(--color-primary) !important;
}

.bg-light {
  background-color: var(--color-surface) !important;
}

.text-gradient {
  background: linear-gradient(135deg, var(--pi-blue-600) 0%, var(--pi-cyan-400) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.bg-gradient-primary-to-secondary {
  background: linear-gradient(135deg, var(--pi-navy-900) 0%, var(--pi-blue-600) 55%, var(--pi-cyan-400) 100%) !important;
}

/* ── Sticky footer page layout ─────────────────────────────── */

html {
  height: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
}

/* Bootstrap's .navbar-brand defaults to white-space: nowrap, which forces
   the whole page wider than the viewport on narrow screens since this brand
   text is long. Let it wrap instead. */
.navbar-brand {
  white-space: normal;
  line-height: 1.25;
}

.brand-symbol {
  flex-shrink: 0;
}

@media (max-width: 420px) {
  .navbar-brand span {
    font-size: 0.95rem;
  }
}

body > main {
  flex: 1 0 auto;
}

/* ── 5. Buttons ────────────────────────────────────────────────── */

.btn {
  border-radius: var(--radius-md);
  font-weight: 700;
}

.btn-primary {
  background-color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
  color: #ffffff !important;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background-color: var(--color-primary-hover) !important;
  border-color: var(--color-primary-hover) !important;
  color: #ffffff !important;
}

.btn-primary:disabled, .btn-primary.disabled {
  background-color: var(--color-text-muted) !important;
  border-color: var(--color-text-muted) !important;
  opacity: 0.55;
}

.btn-outline-dark {
  color: var(--color-text) !important;
  border-color: var(--color-text) !important;
}

.btn-outline-dark:hover, .btn-outline-dark:focus, .btn-outline-dark:active {
  background-color: var(--color-text) !important;
  border-color: var(--color-text) !important;
  color: var(--color-bg) !important;
}

/* ── 6. Focus & accessibility ─────────────────────────────────── */

.btn:focus-visible, a:focus-visible, button:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible,
.dropdown-item:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

/* ── 7. Cards & surfaces ───────────────────────────────────────── */

[data-bs-theme="dark"] .card {
  --bs-card-bg: var(--color-surface);
  --bs-card-color: var(--color-text);
  --bs-card-border-color: var(--color-border);
}

[data-bs-theme="dark"] .shadow {
  box-shadow: var(--shadow-sm) !important;
}

.surface-card {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.surface-card:hover, .surface-card:focus-within {
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--color-primary) 30%, var(--color-border));
}

/* ── Dark mode: navbar text/toggler ────────────────────────── */

[data-bs-theme="dark"] .navbar-light {
  --bs-navbar-color: rgba(247, 249, 251, 0.75);
  --bs-navbar-hover-color: #f7f9fb;
  --bs-navbar-active-color: #ffffff;
  --bs-navbar-disabled-color: rgba(247, 249, 251, 0.35);
  --bs-navbar-toggler-border-color: rgba(247, 249, 251, 0.2);
  --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(247, 249, 251, 0.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Bootstrap's dropdown-menu variables have no built-in dark-mode override
   in this vendored build, so they stayed hardcoded white/dark-text — while
   .lang-option's text color already followed our dark-mode token, producing
   near-invisible light-on-white text until :hover changed the text color.
   Fix: make the dropdown itself follow our own theme tokens. */
[data-bs-theme="dark"] .dropdown-menu {
  --bs-dropdown-bg: var(--color-surface-elevated);
  --bs-dropdown-color: var(--color-text);
  --bs-dropdown-link-color: var(--color-text);
  --bs-dropdown-link-hover-color: var(--color-primary);
  --bs-dropdown-link-hover-bg: var(--color-primary-soft);
  --bs-dropdown-link-active-color: var(--color-primary);
  --bs-dropdown-link-active-bg: var(--color-primary-soft);
  --bs-dropdown-border-color: var(--color-border);
}

/* ── Global header: nav-link active state ──────────────────── */

.site-header .nav-link {
  position: relative;
  color: var(--color-text);
}

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

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

.site-header .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0.25rem;
  right: 0.25rem;
  bottom: -4px;
  height: 2px;
  background: var(--color-primary);
  border-radius: var(--radius-pill);
}

@media (max-width: 991.98px) {
  .site-header .nav-link.active::after {
    display: none;
  }

  .site-header .nav-link.active {
    background-color: var(--color-primary-soft);
    border-radius: var(--radius-sm);
  }
}

/* ── Global header: primary CTA ────────────────────────────── */

.nav-cta {
  padding: 0.5rem 1.25rem;
  white-space: nowrap;
}

@media (max-width: 991.98px) {
  .nav-cta {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
    padding: 0.75rem 1.25rem;
  }
}

/* ── 8. Forms ──────────────────────────────────────────────────── */

.form-control, .form-select {
  background-color: var(--color-surface-elevated);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.form-control:focus, .form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 0.2rem var(--color-primary-soft);
}

.form-control::placeholder {
  color: var(--color-text-muted);
}

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

.invalid-feedback {
  color: var(--color-error);
}

.form-control.is-invalid, .form-select.is-invalid {
  border-color: var(--color-error);
}

.form-control:disabled, .form-select:disabled {
  background-color: var(--color-surface);
  color: var(--color-text-muted);
}

/* ── Contact form: Cloudflare Turnstile widget ─────────────────── */

.turnstile-wrap {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  /* Reserves the widget's actual rendered height (Cloudflare's "flexible"
     size) before the async Turnstile script loads, to avoid a CLS jump
     when the iframe is inserted. */
  min-height: 65px;
}

.turnstile-wrap .cf-turnstile {
  width: 100%;
  max-width: 100%;
}

.turnstile-wrap iframe {
  max-width: 100%;
}

/* ── 9. Footer ─────────────────────────────────────────────────── */

.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--color-border);
  background-color: var(--color-bg) !important;
  padding: var(--space-8) 0;
}

.site-footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: var(--space-6) var(--space-8);
  text-align: center;
}

.site-footer-brand-block {
  max-width: 32rem;
}

.site-footer-brand {
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-text);
}

.site-footer-tagline {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-top: var(--space-1);
}

.site-footer-description {
  margin: var(--space-2) 0 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: var(--line-height-body);
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-1) var(--space-2);
}

.site-footer-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 var(--space-3);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease;
}

.site-footer-links a:hover {
  color: var(--color-primary);
}

.site-footer-links a:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  color: var(--color-primary);
}

.site-footer-sep {
  color: var(--color-border);
  user-select: none;
}

.site-footer-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-1) var(--space-6);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.site-footer-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0 var(--space-2);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease;
}

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

.site-footer-contact-link:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  color: var(--color-primary);
}

.site-footer-contact-link i {
  font-size: 1rem;
  color: var(--color-primary);
}

.site-footer-copy {
  margin-top: var(--space-4);
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

@media (min-width: 768px) {
  .site-footer-top {
    justify-content: space-between;
    text-align: left;
  }

  .site-footer-brand {
    justify-content: flex-start;
  }
}

/* ── 10. Projects page ─────────────────────────────────────────── */

.projects-section .container, .projects-container {
  max-width: 1850px;
}

.projects-section .project-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-8);
  width: 100%;
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
}

.projects-section .project-media {
  flex: 0 0 320px;
  width: 320px;
}

.projects-section .project-image {
  width: 320px;
  height: 420px;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  display: block;
}

/* ── Legacy project photos: fixed 3:4 ratio, no layout shift ──── */

.project-photo {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-md);
  background-color: var(--color-surface);
  display: block;
}

.project-photo-fallback {
  border: 1px dashed var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.projects-section .project-content {
  flex: 1 1 auto;
  min-width: 0;
}

.projects-section .project-content p {
  max-width: none;
}

@media (max-width: 991.98px) {
  .projects-section .project-card {
    flex-direction: column;
  }
}

@media (max-width: 991.98px) {
  .projects-section .project-media, .projects-section .project-image {
    width: 100%;
    max-width: 320px;
  }
}

/* ── Language switcher ─────────────────────────────────────── */

.lang-switcher-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 0.4rem 0.8rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.lang-switcher-toggle:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.lang-switcher-toggle:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.lang-switcher-toggle .bi-globe2 {
  font-size: 0.95rem;
}

.lang-switcher-toggle::after {
  margin-left: 0.15rem;
}

.lang-switcher-menu {
  min-width: 10rem;
  padding: 0.4rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.lang-option {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
}

.lang-option:hover, .lang-option:focus-visible {
  background-color: var(--color-primary-soft);
  color: var(--color-primary);
}

.lang-option.active {
  color: var(--color-primary);
  background-color: var(--color-primary-soft);
}

@media (max-width: 991.98px) {
  .lang-switcher-toggle {
    margin-top: 0.5rem;
  }
}

/* ── Theme toggle ───────────────────────────────────────────── */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

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

.theme-toggle:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

@media (max-width: 991.98px) {
  .theme-toggle {
    margin-top: 0.5rem;
  }
}

/* ── Featured Projects section ─────────────────────────────── */

.featured-section {
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-surface) 100%);
}

.featured-pill {
  background: linear-gradient(135deg, var(--pi-navy-900) 0%, var(--pi-blue-600) 55%, var(--pi-cyan-400) 100%);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
}

.featured-card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.featured-card:hover, .featured-card:focus-within {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--color-primary) 35%, transparent);
}

.featured-card-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--pi-navy-900);
}

.featured-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.featured-card:hover .featured-card-media img {
  transform: scale(1.04);
}

.featured-card-body {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.featured-card-body h3 {
  font-size: 1.3rem;
  margin-bottom: var(--space-2);
}

.featured-card-body > p {
  margin-bottom: 1.1rem;
}

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.4rem;
}

.tech-badge {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  border: 1px solid var(--color-primary-soft-strong);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.7rem;
  line-height: 1;
}

.featured-card-cta {
  margin-top: auto;
  align-self: flex-start;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-primary);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.featured-card-cta:hover, .featured-card-cta:focus {
  color: var(--color-primary-hover);
  border-bottom-color: var(--color-primary-hover);
}

/* ── 11. Hero visual (corporate, CSS-only — no personal imagery) ─── */

.hero-visual {
  border-radius: var(--radius-xl);
  min-height: 22rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  align-content: center;
  justify-items: center;
  padding: var(--space-8);
}

.hero-visual-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 6rem;
  height: 6rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 2.25rem;
  backdrop-filter: blur(2px);
  transition: transform 0.3s ease;
}

.hero-visual-icon:hover {
  transform: translateY(-4px);
}

/* Bootstrap's .badge is white-space: nowrap by default (fine for short
   labels), but the hero eyebrow text is long enough to overflow the
   viewport on narrow screens if it can't wrap. */
.hero-section .badge {
  white-space: normal;
  max-width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .hero-visual-icon {
    transition: none;
  }
}

@media (max-width: 575.98px) {
  .hero-visual {
    min-height: 16rem;
    padding: var(--space-6);
  }

  .hero-visual-icon {
    width: 4.5rem;
    height: 4.5rem;
    font-size: 1.75rem;
  }
}

/* ── Service / capability sections ─────────────────────────────── */

.service-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: 1.4rem;
}

.capability-group {
  height: 100%;
}

/* ── Breadcrumb (services pages) ────────────────────────────── */

.breadcrumb-nav {
  margin-bottom: var(--space-2);
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.breadcrumb-list li:not(:last-child)::after {
  content: "/";
  margin-left: var(--space-1);
  color: var(--color-border);
}

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

.breadcrumb-list a:hover,
.breadcrumb-list a:focus-visible {
  color: var(--color-primary);
}

.breadcrumb-list li[aria-current="page"] {
  color: var(--color-text);
  font-weight: 600;
}

/* ── Layout utility classes (avoid inline style="" for CSP) ──── */

.max-w-640 {
  max-width: 640px;
}

.max-w-720 {
  max-width: 720px;
}

/* Higher specificity than Bootstrap's `.form-floating > .form-control`
   (which hardcodes a single-line height: calc(3.5rem + 2px)) so this
   actually wins instead of being silently overridden. */
.form-floating > .form-control.textarea-tall {
  height: auto;
  min-height: 10rem;
  resize: vertical;
}

/* ── Service detail page lists ─────────────────────────────── */

.svc-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--color-text-muted);
}

.svc-list li {
  margin-bottom: var(--space-2);
}

.svc-list li:last-child {
  margin-bottom: 0;
}

/* ── 12. Error page ─────────────────────────────────────────────── */

.error-section {
  min-height: calc(100dvh - 300px);
  display: flex;
  align-items: center;
}

.error-card {
  max-width: 36rem;
  margin: 0 auto;
  text-align: center;
}

.error-illustration {
  width: 8rem;
  height: 8rem;
  margin-bottom: var(--space-6);
}

.error-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  border: 1px solid var(--color-primary-soft-strong);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.9rem;
  margin-bottom: var(--space-4);
}

.error-card h1 {
  font-size: 2.25rem;
  margin-bottom: var(--space-3);
}

.error-card .lead {
  margin-bottom: var(--space-8);
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
}

/* ── Analytics consent banner (Stage 13) ───────────────────────── */

.analytics-consent-banner {
  position: fixed;
  left: var(--space-4);
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: 1080;
  max-width: 640px;
  margin: 0 auto;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-5);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}

.analytics-consent-message {
  flex: 1 1 260px;
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text);
}

.analytics-consent-actions {
  display: flex;
  gap: var(--space-3);
  flex-shrink: 0;
}
