/* ══════════════════════════════════════════════════════════════════
   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);

  /* ── Hero visual (image surface) ──────────────────────────── */
  --hero-bg: linear-gradient(135deg, var(--pi-white) 0%, var(--pi-gray-50) 50%, #eaf7fb 100%);
  --hero-glow: rgba(23, 183, 201, 0.16);
  --hero-image-shadow: rgba(10, 20, 40, 0.18);

  --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;

  --hero-bg: linear-gradient(135deg, var(--pi-navy-950) 0%, var(--pi-navy-900) 55%, var(--pi-navy-800) 100%);
  --hero-glow: rgba(34, 211, 238, 0.22);
  --hero-image-shadow: rgba(34, 211, 238, 0.16);

  --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). */

/* Metric-compatible fallback for Plus Jakarta Sans. The web font loads with
   display=swap, so text first renders in a fallback face; without matching
   metrics, the swap re-wraps text (e.g. the article lead) and shifts the
   content below it. This face scales a local Arial-compatible font to
   Plus Jakarta Sans' average advance width (size-adjust) and its vertical
   metrics (ascent/descent/line-gap overrides) so both lay out alike.
   Values were measured in-browser per weight band; fonts without these
   descriptors, or without a local match, fall through to the system stack. */
@font-face {
  font-family: "Plus Jakarta Sans Fallback";
  src: local("Arial"), local("Helvetica"), local("Liberation Sans"), local("Arimo");
  font-weight: 300 400;
  size-adjust: 105.4%;
  ascent-override: 98.48%;
  descent-override: 21.06%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Plus Jakarta Sans Fallback";
  src: local("Arial"), local("Helvetica"), local("Liberation Sans"), local("Arimo");
  font-weight: 500;
  size-adjust: 106.5%;
  ascent-override: 97.46%;
  descent-override: 20.85%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Plus Jakarta Sans Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Bold"), local("Liberation Sans Bold"), local("Arimo Bold");
  font-weight: 600 700;
  size-adjust: 100.7%;
  ascent-override: 103.08%;
  descent-override: 22.05%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Plus Jakarta Sans Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Bold"), local("Liberation Sans Bold"), local("Arimo Bold");
  font-weight: 800;
  size-adjust: 102.1%;
  ascent-override: 101.67%;
  descent-override: 21.74%;
  line-gap-override: 0%;
}

/* Same idea for devices that ship Roboto but not an Arial-compatible font
   (typically Android). It is only used when the Arial-based face above is
   unavailable, and it has its own measured width and vertical corrections
   because Roboto's proportions differ from Arial's. */
@font-face {
  font-family: "Plus Jakarta Sans Fallback Roboto";
  src: local("Roboto"), local("Roboto Regular"), local("Roboto-Regular");
  font-weight: 300 400;
  size-adjust: 105.0%;
  ascent-override: 98.86%;
  descent-override: 21.14%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Plus Jakarta Sans Fallback Roboto";
  src: local("Roboto Medium"), local("Roboto-Medium");
  font-weight: 500;
  size-adjust: 106.5%;
  ascent-override: 97.46%;
  descent-override: 20.85%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Plus Jakarta Sans Fallback Roboto";
  src: local("Roboto Bold"), local("Roboto-Bold");
  font-weight: 600 700;
  size-adjust: 107.2%;
  ascent-override: 96.83%;
  descent-override: 20.71%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Plus Jakarta Sans Fallback Roboto";
  src: local("Roboto Bold"), local("Roboto-Bold");
  font-weight: 800;
  size-adjust: 108.7%;
  ascent-override: 95.49%;
  descent-override: 20.42%;
  line-gap-override: 0%;
}

:root {
  --font-family-base: "Plus Jakarta Sans", "Plus Jakarta Sans Fallback", "Plus Jakarta Sans Fallback Roboto", -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%;
  /* clip (not hidden): still prevents horizontal page overflow but does not turn
     <body> into a scroll container, so the window is the normal document scroller
     (required for position: sticky, scroll-padding and window scroll APIs). */
  overflow-x: clip;
}

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

/* 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: 1199.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 (brand artwork, theme-aware surface) ──────────
   .hero-visual is a themed "platform" behind the approved hero.png —
   a soft gradient plus a restrained radial glow (::before) so the
   artwork reads clearly in both Light and Dark without ever baking
   a theme into the image itself. */

.hero-visual {
  position: relative;
  border-radius: var(--radius-xl);
  min-height: 22rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  background: var(--hero-bg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: -25%;
  background: radial-gradient(circle at 50% 45%, var(--hero-glow) 0%, transparent 65%);
  pointer-events: none;
}

.hero-visual-image {
  position: relative;
  width: 100%;
  max-width: 320px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 16px 32px var(--hero-image-shadow));
}

/* 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 (max-width: 575.98px) {
  .hero-visual {
    min-height: 16rem;
    padding: var(--space-6);
  }

  .hero-visual-image {
    max-width: 220px;
  }
}

/* ── 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%;
}

/* ── Technology Ecosystem ───────────────────────────────────── */

.eco-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  grid-auto-rows: 3.4rem;
  gap: 0.6rem;
}

.eco-tile {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.4rem 0.8rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 0.6rem);
  color: var(--color-text);
}

.eco-name {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

/* Monochrome, theme-aware logos: same-origin SVG used as a mask so the
   fill follows the text colour in light, dark and system modes. */
.tech-logo {
  flex: 0 0 auto;
  width: 1.65rem;
  height: 1.65rem;
  background-color: currentColor;
  -webkit-mask: var(--logo) center / contain no-repeat;
  mask: var(--logo) center / contain no-repeat;
}

.tech-logo-none {
  display: none;
}
.tech-logo-java { --logo: url("/assets/img/tech/java.svg"); }
.tech-logo-spring-boot { --logo: url("/assets/img/tech/spring-boot.svg"); }
.tech-logo-postgresql { --logo: url("/assets/img/tech/postgresql.svg"); }
.tech-logo-react { --logo: url("/assets/img/tech/react.svg"); }
.tech-logo-typescript { --logo: url("/assets/img/tech/typescript.svg"); }
.tech-logo-red-hat { --logo: url("/assets/img/tech/red-hat.svg"); }
.tech-logo-podman { --logo: url("/assets/img/tech/podman.svg"); }
.tech-logo-cloudflare { --logo: url("/assets/img/tech/cloudflare.svg"); }
.tech-logo-freebsd { --logo: url("/assets/img/tech/freebsd.svg"); }
.tech-logo-pfsense { --logo: url("/assets/img/tech/pfsense.svg"); }
.tech-logo-mikrotik { --logo: url("/assets/img/tech/mikrotik.svg"); }
.tech-logo-thymeleaf { --logo: url("/assets/img/tech/thymeleaf.svg"); }
.tech-logo-intellij-idea { --logo: url("/assets/img/tech/intellij-idea.svg"); }
.tech-logo-datagrip { --logo: url("/assets/img/tech/datagrip.svg"); }
.tech-logo-proxmox { --logo: url("/assets/img/tech/proxmox.svg"); }
.tech-logo-docker { --logo: url("/assets/img/tech/docker.svg"); }
.tech-logo-debian { --logo: url("/assets/img/tech/debian.svg"); }

.local-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.local-link {
  display: inline-block;
  font-size: 0.85rem;
  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.45rem 0.9rem;
  text-decoration: none;
}

.local-link:hover, .local-link:focus-visible {
  border-color: var(--color-primary);
}

/* Stage 17: with six primary nav items the full horizontal menu only fits from the
   xl breakpoint (1200px); below that the header uses the collapsed (hamburger) menu. */

/* ── Contact — direct options (Stage 17) ────────────────────── */

.direct-contact {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
}

.direct-contact-title {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-bottom: 0.7rem;
}

.direct-contact-list {
  list-style: none;
  margin: 0 0 0.8rem;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.direct-contact-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius-md);
  color: var(--color-text);
  text-decoration: none;
}

.direct-contact-link:hover,
.direct-contact-link:focus-visible {
  background: var(--color-primary-soft);
}

.direct-contact-link .bi {
  font-size: 1.15rem;
  color: var(--color-primary);
}

.direct-contact-label {
  display: block;
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.direct-contact-value {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.direct-contact-note a {
  font-weight: 600;
  color: var(--color-primary);
}

/* ── Knowledge Hub (Stage 17) ───────────────────────────────── */

.article-title {
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem);
  line-height: 1.2;
  margin-bottom: var(--space-3);
}

.article-prose {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--color-text);
  overflow-wrap: break-word;
}

.article-prose h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 2.6rem 0 0.9rem;
  scroll-margin-top: 1rem;
}

.article-prose p,
.article-prose ul,
.article-prose ol {
  margin-bottom: 1.1rem;
}

.article-prose li {
  margin-bottom: 0.45rem;
}

.article-prose a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: var(--color-primary-soft);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  overflow-wrap: anywhere;
}

.article-code {
  margin: 0.9rem 0 1.3rem;
  padding: 0.95rem 1.1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.article-code code {
  background: none;
  padding: 0;
  font-size: 0.84rem;
  line-height: 1.6;
  white-space: pre;
  overflow-wrap: normal;
}

.article-code:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.article-toc {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.article-toc-title {
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem !important;
}

.article-toc ol {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.95rem;
}

.article-toc li {
  margin-bottom: 0.2rem;
}

.article-prose ol.flow {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.4rem;
  display: grid;
  gap: 0.5rem;
  counter-reset: flow;
}

.article-prose ol.flow li {
  counter-increment: flow;
  margin: 0;
  padding: 0.6rem 0.9rem 0.6rem 2.8rem;
  position: relative;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  line-height: 1.5;
}

.article-prose ol.flow li::before {
  content: counter(flow);
  position: absolute;
  left: 0.75rem;
  top: 0.6rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-prose table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin-bottom: 1.2rem;
}

.article-prose th,
.article-prose td {
  border: 1px solid var(--color-border);
  padding: 0.5rem 0.75rem;
}

.article-cta {
  text-align: left;
}

/* ── Project case studies (Stage 18) ─────────────────────────── */

.case-body h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 2.2rem 0 0.8rem;
}

.case-body p,
.case-body ul {
  font-size: 1.02rem;
  line-height: 1.7;
}

.case-body li {
  margin-bottom: 0.4rem;
}

.case-body a {
  color: var(--color-primary);
}

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 0 0 1.25rem;
}

.case-meta dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.case-meta dd {
  margin: 0;
  font-weight: 700;
}

.case-tech {
  margin-bottom: 1rem;
}

.case-links {
  padding-left: 1.2rem;
}

.case-outcome {
  background: var(--color-primary-soft);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: 0.7rem 1rem;
}

.project-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* ── Stage 20.1: sticky header, anchors, back-to-top ─────────── */

:root {
  /* Normal (unscrolled) height of the sticky header; used for anchor offsets and the
     collapsed-menu max-height. The header does not change height while scrolling. */
  --site-header-h: 78px;
}

html {
  scroll-padding-top: calc(var(--site-header-h) + 1rem);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1020; /* above content and Bootstrap dropdowns (1000); below the consent banner (1080) */
  background-color: var(--color-bg);
  transition: box-shadow 0.2s ease;
}

/* Scrolled state: separation only, no change in layout height (no CLS). */
.site-header.is-scrolled {
  box-shadow: 0 1px 0 var(--color-border), var(--shadow-md);
}

/* Keep the brand on one line so the header keeps its single-row height. */
.brand-wordmark {
  white-space: nowrap;
}

/* With the brand held on one line, the longest locale (pt-BR) needs slightly tighter
   spacing between the xl breakpoint (1200px) and ~1440px so the whole menu, including
   the CTA, stays inside the header container. Breakpoint itself is unchanged. */
@media (min-width: 1200px) and (max-width: 1439.98px) {
  .site-header .navbar-nav {
    --bs-navbar-nav-link-padding-x: 0.3rem;
  }

  .site-header .navbar-nav > .nav-item.ms-xl-3 {
    margin-left: 0.5rem !important;
  }

  .site-header .navbar-nav > .nav-item.ms-xl-2 {
    margin-left: 0.35rem !important;
  }

  .site-header .nav-cta {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* The collapsed menu lives inside the sticky header; keep it usable on short screens. */
@media (max-width: 1199.98px) {
  .site-header .navbar-collapse.show {
    max-height: calc(100vh - var(--site-header-h));
    max-height: calc(100dvh - var(--site-header-h));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

.back-to-top {
  position: fixed;
  right: max(var(--space-4), env(safe-area-inset-right));
  bottom: max(var(--space-4), env(safe-area-inset-bottom));
  z-index: 1030; /* above the header, below the consent banner (1080) */
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--color-primary);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.5rem);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s,
    background-color 0.15s ease, color 0.15s ease;
}

.back-to-top.is-visible:not(.is-obscured) {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

.back-to-top:hover {
  color: #fff;
  background: var(--color-primary);
}

.back-to-top:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .back-to-top {
    transition: none;
  }

  .back-to-top {
    transform: none;
  }
}

/* ── Stage 20.2 / 20.2.1 / 20.2.2: branded intro (decorative, once per tab) ──
   Shown only while theme-init.js has put .pi-intro-active on <html>. Pure CSS overlay on the
   root element's pseudo-elements: no extra DOM, no layout space, never interactive, never
   focusable. The page underneath renders at full speed and stays perceptible through a
   semi-opaque themed layer (--pi-intro-overlay).

   Choreography (times from the start of the outro; the 600ms brand hold comes first):
     0-300ms     the overlay colour fades to transparent: the site is revealed
                 (logo and ring stay fully opaque)
     300-450ms   the ring fades out (it is retired before the logo)
     450-500ms   only the logo remains, fully visible and the page fully usable
     500-800ms   the logo fades softly: the intro ends
   ::before carries overlay + logo; ::after carries the ring.

   HARD FAILSAFE: the same outro also runs on its own, starting at 1.0s and done by 1.8s, whether
   or not any JavaScript keeps running. The normal path (JS adds .pi-intro-done after the hold)
   uses identically defined keyframes under different names, because a browser only restarts an
   animation when its NAME changes. */

html.pi-intro-active {
  --pi-intro-overlay: 82%; /* strength of the theme background over the page (rest shows through) */
}

html.pi-intro-active::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2000; /* above the sticky header (1020), back-to-top (1030) and consent banner (1080) */
  pointer-events: none;
  background-color: var(--color-bg); /* fallback where color-mix() is unsupported: opaque overlay */
  background-color: color-mix(in srgb, var(--color-bg) var(--pi-intro-overlay), transparent);
  background-image: url("/assets/img/brand/generated/logo-symbol-96.png");
  background-repeat: no-repeat;
  background-position: center calc(50% - 14px);
  background-size: 64px 64px;
  animation: pi-intro-failsafe 0.8s ease 1s forwards;
}

html.pi-intro-active::after {
  content: "";
  position: fixed;
  z-index: 2001;
  top: calc(50% + 34px);
  left: 50%;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  box-sizing: border-box;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  pointer-events: none;
  animation: pi-intro-spin 0.9s linear infinite, pi-intro-ring-failsafe 0.8s ease 1s forwards;
}

html.pi-intro-active.pi-intro-done::before {
  animation: pi-intro-reveal 0.8s ease forwards;
}

html.pi-intro-active.pi-intro-done::after {
  animation: pi-intro-spin 0.9s linear infinite, pi-intro-ring-reveal 0.8s ease forwards;
}

@keyframes pi-intro-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Overlay + logo. 0% is the element's own computed state (overlay at full strength, logo opaque). */
@keyframes pi-intro-failsafe {
  37.5% {
    background-color: transparent;
    opacity: 1;
  }

  62.5% {
    background-color: transparent;
    opacity: 1;
  }

  100% {
    background-color: transparent;
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes pi-intro-reveal {
  37.5% {
    background-color: transparent;
    opacity: 1;
  }

  62.5% {
    background-color: transparent;
    opacity: 1;
  }

  100% {
    background-color: transparent;
    opacity: 0;
    visibility: hidden;
  }
}

/* Ring: visible through the reveal, gone (56%) before the logo starts to fade (62.5%). */
@keyframes pi-intro-ring-failsafe {
  37.5% {
    opacity: 1;
  }

  56% {
    opacity: 0;
  }

  100% {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes pi-intro-ring-reveal {
  37.5% {
    opacity: 1;
  }

  56% {
    opacity: 0;
  }

  100% {
    opacity: 0;
    visibility: hidden;
  }
}

@media (prefers-reduced-motion: reduce), print {
  html.pi-intro-active::before,
  html.pi-intro-active::after {
    display: none;
  }
}

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