/* ================================================================
   InnoLab AI — styles.css
   Dark scientific theme | Cinematic scroll | Premium B2B
   ================================================================ */

/* ================================================================
   TABLE OF CONTENTS
   01. Custom Properties (tokens)
   02. Reset & Base
   03. Typography
   04. Layout Utilities
   05. Background Stage
   06. Navigation / Header
   07. Buttons
   08. Section Shared Styles
   09. Hero
   10. Problem
   11. Bureaucracy Cost
   12. Solution / Flow
   13. Process Architecture
   14. AI Assistant
   15. Industries
   16. Advantages
   17. Pricing / Business Model
   18. CTA
   19. Footer
   20. Scroll Animation
   21. Responsive — Tablet (max 1024px)
   22. Responsive — Mobile (max 768px)
   23. Responsive — Small (max 480px)
   NEW
================================================================ */


/* ================================================================
   01. CUSTOM PROPERTIES
================================================================ */

:root {
  /* --- Color: Base --- */
  --color-bg-deepest:   #04131A;
  --color-bg-dark:      #071E27;
  --color-bg-mid:       #0A2731;
  --color-bg-elevated:  #0D3040;
  --color-bg-card:      rgba(10, 39, 49, 0.72);
  --color-bg-card-hover: rgba(15, 52, 65, 0.85);

  /* --- Color: Text --- */
  --color-text-primary:   #F3F7FA;
  --color-text-secondary: #B8CAD3;
  --color-text-muted:     #7F97A3;
  --color-text-faint:     #4A6472;

  /* --- Color: Accent --- */
  --color-accent:         #19C6D3;
  --color-accent-bright:  #26E0E6;
  --color-accent-glow:    #69F0FF;
  --color-accent-signal:  #8AE8FF;

  /* --- Color: Border --- */
  --color-border:         rgba(25, 198, 211, 0.14);
  --color-border-hover:   rgba(38, 224, 230, 0.32);
  --color-border-card:    rgba(255, 255, 255, 0.06);

  /* --- Overlay --- */
  --overlay-dark:         rgba(4, 19, 26, 0.72);
  --overlay-tint:         rgba(7, 30, 39, 0.55);

  /* --- Typography --- */
  --font-base: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;
  --text-7xl:  4.5rem;

  --leading-tight:  1.15;
  --leading-snug:   1.3;
  --leading-normal: 1.6;
  --leading-loose:  1.8;

  --weight-normal:   400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  /* --- Spacing --- */
  --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;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* --- Layout --- */
  --max-width:        1200px;
  --max-width-narrow: 760px;
  --nav-height:       108px;

  /* --- Border Radius --- */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-2xl: 24px;

  /* --- Shadows --- */
  --shadow-card:  0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-glow:  0 0 24px rgba(25, 198, 211, 0.18);
  --shadow-glow-strong: 0 0 40px rgba(105, 240, 255, 0.22);

  /* --- Transitions --- */
  --transition-fast:   150ms ease;
  --transition-base:   300ms ease;
  --transition-slow:   600ms ease;
  --transition-bg:     1000ms ease;
}


/* ================================================================
   02. RESET & BASE
================================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-base);
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-deepest);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
}

::selection {
  background-color: rgba(25, 198, 211, 0.3);
  color: var(--color-text-primary);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}


/* ================================================================
   03. TYPOGRAPHY
================================================================ */

h1, h2, h3, h4 {
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}

h1 { font-size: var(--text-6xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-xl);  }
h4 { font-size: var(--text-lg);  }

p {
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
}

strong {
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
}

/* Utility text colors */
.text-accent  { color: var(--color-accent); }
.text-muted   { color: var(--color-text-muted); }
.text-primary { color: var(--color-text-primary); }


/* ================================================================
   04. LAYOUT UTILITIES
================================================================ */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-8);
}

.section-inner {
  padding-block: var(--space-32);
}

/* Section header block */
.section-header {
  margin-bottom: var(--space-16);
  max-width: 640px;
}

.section-heading--with-visual {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.9fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  max-width: 100%;
  margin-bottom: var(--space-10);
}

.section-heading__copy {
  max-width: 720px;
}

.section-heading__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  pointer-events: none;
  position: relative;
  overflow: visible;
  border-radius: 22px;
}

.section-heading__visual img {
  display: block;
  width: min(100%, 520px);
  height: auto;
  object-fit: contain;
  border-radius: 22px;
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.14),
    0 6px 18px rgba(15, 23, 42, 0.08);
}

.section-heading__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow:
    inset 0 0 28px rgba(255, 255, 255, 0.16),
    inset 0 0 12px rgba(15, 23, 42, 0.05);
  opacity: 0.62;
}

.section-header--centered {
  max-width: 100%;
  text-align: center;
  align-items: center;
  display: flex;
  flex-direction: column;
}

.section-label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: rgba(25, 198, 211, 0.07);
}

.section-title {
  font-size: var(--text-4xl);
  line-height: var(--leading-tight);
  letter-spacing: -0.025em;
  color: var(--color-text-primary);
  margin-bottom: var(--space-5);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
  max-width: 580px;
}

.section-header--centered .section-subtitle {
  text-align: center;
}

.section-conclusion {
  margin-top: var(--space-12);
  padding: var(--space-6) var(--space-8);
  border-left: 2px solid var(--color-accent);
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  background: rgba(25, 198, 211, 0.05);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Card grids */
.cards-grid {
  display: grid;
  gap: var(--space-5);
}

.cards-grid--problem {
  grid-template-columns: repeat(3, 1fr);
}

.cards-grid--bureaucracy {
  grid-template-columns: repeat(4, 1fr);
}

.cards-grid--industries {
  grid-template-columns: repeat(3, 1fr);
}

.cards-grid--features {
  grid-template-columns: repeat(3, 1fr);
}

.cards-grid--pricing {
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
}


/* ================================================================
   05. BACKGROUND STAGE
================================================================ */

/* Fixed full-viewport container — sits behind everything */
#bg-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: var(--color-bg-deepest);
}

/* Individual background layers — stacked, opacity driven by JS */
.bg-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;

  /* Desaturation + dimming — keeps backgrounds atmospheric, not dominant */
  filter: saturate(0.5) brightness(0.15);

  opacity: 0; /* JS sets this directly on each frame */

  /* 80ms micro-transition smooths sub-frame flicker without
     fighting the JS-driven crossfade animation */
  transition: opacity 80ms linear;
  will-change: opacity;
}

/* Layer image sources */
.bg-layer[data-bg="0"] { background-image: url("Obrazki/1_hero.png"); }
.bg-layer[data-bg="1"] { background-image: url("Obrazki/2_dataChaos.png"); }
.bg-layer[data-bg="2"] { background-image: url("Obrazki/3_burocracy.png"); }
.bg-layer[data-bg="3"] { background-image: url("Obrazki/4_dataconvergence.png"); }
.bg-layer[data-bg="4"] { background-image: url("Obrazki/6_AIresearchassistant.png"); }
.bg-layer[data-bg="5"] { background-image: url("Obrazki/7_industries.png"); }
.bg-layer[data-bg="6"] { background-image: url("Obrazki/8_lab.png"); }

/* Constant dark overlay — always on top of backgrounds, below content.
   Two layers: a flat navy base + a gradient for top/bottom vignette.
   Together they keep text readable regardless of which image is showing. */
#bg-overlay {
  position: absolute;
  inset: 0;
  background:
    /* flat base: strong enough to ensure readability */
    rgba(3, 15, 20, 0.80),
    /* vignette: slightly darker at top and bottom for cinematic feel */
    linear-gradient(
      180deg,
      rgba(4, 19, 26, 0.30) 0%,
      rgba(7, 30, 39, 0.10) 40%,
      rgba(4, 19, 26, 0.30) 100%
    );
  pointer-events: none;
}

/* All page content sits above backgrounds */
#site-header,
#page-content,
#site-footer {
  position: relative;
  z-index: 10;
}


/* ================================================================
   06. NAVIGATION / HEADER
================================================================ */

#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;

  /* Default: soft glass — visible but transparent */
  background: rgba(3, 15, 20, 0.32);
  border-bottom: 1px solid rgba(105, 240, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition:
    background var(--transition-base),
    border-color var(--transition-base),
    backdrop-filter var(--transition-base);
}

/* Scrolled state — applied by JS: slightly darker but still translucent */
#site-header.site-header--scrolled {
  background: rgba(3, 15, 20, 0.46);
  border-bottom-color: rgba(105, 240, 255, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

#main-nav {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: opacity var(--transition-fast);
}

.nav-logo:hover {
  opacity: 0.85;
}

.nav-logo__img {
  height: 92px;
  width: auto;
  display: block;
  filter: brightness(1.1);
}

/* Logo visibility per theme */
.nav-logo__img--dark,
.nav-logo__img--light,
.nav-logo__img--institutional {
  display: none;
}

[data-theme="dark"] .nav-logo__img--dark {
  display: block;
}

[data-theme="light"] .nav-logo__img--light {
  display: block;
}

[data-theme="institutional"] .nav-logo__img--institutional {
  display: block;
}

/* Nav links list */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-links__link {
  display: inline-block;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  border-radius: var(--radius-md);
  white-space: nowrap;
  transition:
    color var(--transition-fast),
    background var(--transition-fast);
}

.nav-links__link:hover,
.nav-links__link--active {
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.nav-links__link--active {
  color: var(--color-accent);
}

/* CTA nav link */
.nav-links__link--cta {
  color: var(--color-accent);
  border: 1px solid var(--color-border);
  padding: var(--space-2) var(--space-5);
}

.nav-links__link--cta:hover {
  background: rgba(25, 198, 211, 0.1);
  border-color: var(--color-border-hover);
  color: var(--color-accent-bright);
}

/* Hamburger toggle — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text-secondary);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

/* Hamburger → X animation */
.nav--open .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav--open .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}
.nav--open .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ================================================================
   07. BUTTONS
================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-7, 1.75rem);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  font-family: var(--font-base);
  letter-spacing: 0.01em;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.btn:active {
  transform: translateY(1px);
}

/* Primary — filled cyan */
.btn--primary {
    background: transparent;
    border-color: rgba(25, 198, 211, 0.35);
    color: var(--color-text-secondary);
}

.btn--primary:hover {
  background: var(--color-accent-bright);
  border-color: var(--color-accent-bright);
  box-shadow: var(--shadow-glow);
}

/* Ghost — outlined */
.btn--ghost {
  background: transparent;
  border-color: rgba(25, 198, 211, 0.35);
  color: var(--color-text-secondary);
}

.btn--ghost:hover {
  border-color: var(--color-accent);
  color: var(--color-text-primary);
  background: rgba(25, 198, 211, 0.07);
}

/* Sizes */
.btn--large {
  padding: var(--space-4) var(--space-10);
  font-size: var(--text-base);
  border-radius: var(--radius-lg);
}

.btn--full {
  width: 100%;
  margin-top: auto;
}


/* ================================================================
   08. SHARED CARD COMPONENT
================================================================ */

.card {
  padding: var(--space-8);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-card);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    background var(--transition-base),
    border-color var(--transition-base),
    transform var(--transition-base),
    box-shadow var(--transition-base);
}

.card:hover {
  background: var(--color-bg-card-hover);
  border-color: var(--color-border);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.card__eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.card__icon {
  font-size: var(--text-2xl);
  color: var(--color-accent);
  margin-bottom: var(--space-4);
  line-height: 1;
}

.card__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: #29edff;
  margin-bottom: var(--space-3);
  line-height: var(--leading-snug);
}

.card__body {
  font-size: var(--text-sm);
  color: #ffffff;
  line-height: var(--leading-normal);
}

.card__feature-num {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
  font-variant-numeric: tabular-nums;
}


/* ================================================================
   09. HERO
================================================================ */

#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
}

.hero-inner {
  padding-block: var(--space-32);
  max-width: var(--max-width);
  width: 100%;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.hero-copy {
  max-width: 620px;
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  pointer-events: none;
  position: relative;
  overflow: visible;
  border-radius: 22px;
}

.hero-visual img {
  display: block;
  width: min(100%, 680px);
  height: auto;
  object-fit: contain;
  border-radius: 22px;
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.14),
    0 6px 18px rgba(15, 23, 42, 0.08);
  filter: drop-shadow(0 24px 45px rgba(11, 37, 69, 0.12));
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow:
    inset 0 0 28px rgba(255, 255, 255, 0.16),
    inset 0 0 12px rgba(15, 23, 42, 0.05);
  opacity: 0.62;
}

/* .hero-title {
  font-size: clamp(2.5rem, 5.5vw, var(--text-7xl));
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: -0.03em;
  color: #29edff;
  margin-bottom: var(--space-6);
} */

.hero-description {
    text-align: justify;
    text-justify: inter-word;
    max-width: 42rem;
}
.hero-title {
    font-size: 32px;
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    letter-spacing: -0.03em;
    color: white;
    margin-bottom: var(--space-6);
    text-align: left;
}

.hero-brand {
    color: #29edff;
    text-shadow: 0 0 18px rgba(41,237,255,0.35);
}

.hero-subtitle {
  font-size: var(--text-xl);
  text-align: left;
  max-width: 640px;
  line-height: 1.7;
  color: rgba(255,255,255,0.85);
  margin-bottom: var(--space-10);
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}


/* ================================================================
   10. PROBLEM
================================================================ */

#problem {
  background: transparent;
}

/* Last problem card spans columns to avoid orphan on 5-item grid */
.cards-grid--problem .card--problem:last-child:nth-child(5) {
  grid-column: span 1;
}

/* Fill 2nd row nicely: 3 cols means row 2 = 2 cards centered */
.cards-grid--problem {
  grid-template-columns: repeat(3, 1fr);
}

.card--problem:nth-child(4) {
  grid-column: 1;
}
.card--problem:nth-child(5) {
  grid-column: 2;
}


/* ================================================================
   11. BUREAUCRACY COST
================================================================ */

#bureaucracy {
  background: transparent;
}

/* Big statistic block */
.stat-block {
  display: flex;
  align-items: center;
  gap: var(--space-10);
  padding: var(--space-10) var(--space-12);
  background: rgba(25, 198, 211, 0.05);
  border: 1px solid rgba(25, 198, 211, 0.18);
  border-radius: var(--radius-2xl);
  margin-bottom: var(--space-12);
}

.stat-highlight {
  font-size: clamp(3.5rem, 7vw, 5.5rem);
  font-weight: var(--weight-bold);
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--color-accent-bright);
  white-space: nowrap;
  text-shadow: 0 0 32px rgba(38, 224, 230, 0.35);
}

.stat-caption {
  font-size: var(--text-xl);
  color: #ffffff;
  line-height: var(--leading-normal);
  max-width: 520px;
}

.card--bureaucracy {
  border-left: 2px solid var(--color-border);
}

.card--bureaucracy:hover {
  border-left-color: var(--color-accent);
}


/* ================================================================
   12. SOLUTION / FLOW
================================================================ */

#solution {
  background: transparent;
}

/* Horizontal flow track */
.flow-track {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-bottom: var(--space-12);
  padding: var(--space-8) var(--space-6);
  background: rgba(10, 39, 49, 0.55);
  border: 1px solid var(--color-border-card);
  border-radius: var(--radius-2xl);
  overflow-x: auto;
}

.flow-step {
  flex: 1;
  min-width: 160px;
  padding: var(--space-5) var(--space-6);
}

.flow-step__num {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.12em;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.flow-step__title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: #29edff;
  margin-bottom: var(--space-2);
  line-height: var(--leading-snug);
}

.flow-step__body {
  font-size: var(--text-xs);
  color: #ffffff;
  line-height: var(--leading-normal);
}

/* Arrow connector between steps */
.flow-connector {
  flex-shrink: 0;
  align-self: center;
  width: 32px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-border) 0%, var(--color-accent) 100%);
  position: relative;
  margin-block: var(--space-8);
}

.flow-connector::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid var(--color-accent);
}

/* Solution sub-cards */
.solution-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

.card--solution {
  border-top: 2px solid var(--color-border);
  transition:
    border-top-color var(--transition-base),
    background var(--transition-base),
    transform var(--transition-base);
}

.card--solution:hover {
  border-top-color: var(--color-accent);
}


/* ================================================================
   13. PROCESS ARCHITECTURE
================================================================ */

#process {
  background: transparent;
}

/* Vertical process track */
.process-track {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: var(--space-8);
  position: relative;
}

/* Vertical line running through steps */
.process-track::before {
  content: "";
  position: absolute;
  left: 36px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--color-border) 10%,
    var(--color-accent) 50%,
    var(--color-border) 90%,
    transparent 100%
  );
  z-index: 0;
}

.process-step {
  display: flex;
  align-items: flex-start;
  gap: var(--space-6);
  padding: var(--space-8) var(--space-8) var(--space-8) 0;
  position: relative;
  z-index: 1;
}

.process-step__index {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  letter-spacing: 0.04em;
  color: var(--color-accent);
  background: var(--color-bg-dark);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  transition:
    background var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

.process-step:hover .process-step__index {
  background: rgba(25, 198, 211, 0.1);
  border-color: var(--color-accent);
  box-shadow: var(--shadow-glow);
}

.process-step__content {
  flex: 1;
  padding-top: var(--space-3);
}

.process-step__title {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: #29edff;
  margin-bottom: var(--space-2);
}

.process-step__body {
  font-size: var(--text-base);
  color: #ffffff;
  line-height: var(--leading-normal);
  max-width: 560px;
}

/* Spacer line between steps */
.process-connector {
  margin-left: 35px;
  width: 1px;
  height: var(--space-4);
  background: transparent; /* visual line is on ::before */
}

/* AI strip — highlighted band */
.ai-strip {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-6) var(--space-8);
  background: linear-gradient(
    135deg,
    rgba(25, 198, 211, 0.1) 0%,
    rgba(25, 198, 211, 0.04) 100%
  );
  border: 1px solid rgba(25, 198, 211, 0.25);
  border-radius: var(--radius-xl);
  margin-top: var(--space-4);
}

.ai-strip__label {
  flex-shrink: 0;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.12em;
  color: var(--color-bg-deepest);
  background: var(--color-accent);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
}

.ai-strip__content {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
}

.ai-strip__content strong {
  color: var(--color-accent-bright);
}


/* ================================================================
   14. AI ASSISTANT
================================================================ */

#ai {
  background: transparent;
}

/* Two-column list of capabilities */
.ai-capabilities {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-1);
}

.ai-capability {
  display: flex;
  align-items: flex-start;
  gap: var(--space-5);
  padding: var(--space-6) var(--space-6);
  border-radius: var(--radius-lg);
  transition:
    background var(--transition-base);
}

.ai-capability:hover {
  background: rgba(25, 198, 211, 0.05);
}

/* Accent dot / marker */
.ai-capability__marker {
  flex-shrink: 0;
  margin-top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 8px rgba(25, 198, 211, 0.6);
}

.ai-capability__content {
  flex: 1;
}

.ai-capability__title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: #29edff;
  margin-bottom: var(--space-2);
}

.ai-capability__body {
  font-size: var(--text-sm);
  color: #ffffff;
  line-height: var(--leading-normal);
}


/* ================================================================
   15. INDUSTRIES
================================================================ */

#industries {
  background: transparent;
}

.card--industry {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  border-top: 2px solid var(--color-border-card);
  transition:
    border-top-color var(--transition-base),
    background var(--transition-base),
    transform var(--transition-base);
}

.card--industry:hover {
  border-top-color: var(--color-accent);
}

/* Featured / center industry card */
.card--industry-featured {
  background: rgba(25, 198, 211, 0.06);
  border: 1px solid rgba(25, 198, 211, 0.2);
  border-top: 2px solid var(--color-accent);
}

.card--industry-featured:hover {
  background: rgba(25, 198, 211, 0.1);
  border-color: var(--color-accent);
}


/* ================================================================
   16. ADVANTAGES / FEATURES
================================================================ */

#advantages {
  background: transparent;
}

.card--feature {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Subtle accent glow in top-right corner on hover */
.card--feature::after {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(25, 198, 211, 0.15) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.card--feature:hover::after {
  opacity: 1;
}


/* ================================================================
   17. PRICING / BUSINESS MODEL
================================================================ */

#pricing {
  background: transparent;
}

.card--pricing {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  height: 100%;
}

.card__pricing-tier {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
  color: #29edff;
}

.card__pricing-desc {
  font-size: var(--text-sm);
  color: #ffffff;
  line-height: var(--leading-normal);
}

.card__pricing-features {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.card__pricing-features li {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  padding-left: var(--space-5);
  position: relative;
  line-height: var(--leading-normal);
}

.card__pricing-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  opacity: 0.7;
}

/* Featured pricing tier */
.card--pricing-featured {
  background: rgba(25, 198, 211, 0.07);
  border: 1px solid rgba(25, 198, 211, 0.22);
  position: relative;
  transform: scale(1.025);
}

.card--pricing-featured:hover {
  transform: scale(1.025) translateY(-3px);
}

.card__pricing-badge {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-bg-deepest);
  background: var(--color-accent);
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-2xl);
  white-space: nowrap;
}


/* ================================================================
   18. CTA
================================================================ */

#cta {
  background: transparent;
}

.cta-inner {
  text-align: center;
  max-width: var(--max-width-narrow);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta-title {
  font-size: clamp(1.75rem, 3.5vw, var(--text-5xl));
}

.cta-body {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 520px;
  margin-bottom: var(--space-10);
  line-height: var(--leading-normal);
}

.cta-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  justify-content: center;
}


/* ================================================================
   19. FOOTER
================================================================ */

#site-footer {
  background: var(--color-bg-deepest);
  border-top: 1px solid var(--color-border-card);
  padding-block: var(--space-12);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-8);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-logo__img {
  height: 64px;
  width: auto;
  max-width: none;
  display: block;
  object-fit: contain;
  filter: brightness(1.1);
}

/* Footer logo visibility per theme */
.footer-logo__img--dark,
.footer-logo__img--light,
.footer-logo__img--institutional {
  display: none;
}

[data-theme="dark"] .footer-logo__img--dark {
  display: block;
}

[data-theme="dark"] .footer-logo__img--light,
[data-theme="dark"] .footer-logo__img--institutional {
  display: none;
}

[data-theme="light"] .footer-logo__img--dark {
  display: none;
}

[data-theme="light"] .footer-logo__img--light {
  display: block;
}

[data-theme="institutional"] .footer-logo__img--dark,
[data-theme="institutional"] .footer-logo__img--light {
  display: none;
}

[data-theme="institutional"] .footer-logo__img--institutional {
  display: block;
}

.footer-tagline {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  justify-content: center;
}

.footer-nav a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
  padding: var(--space-1) 0;
}

.footer-nav a:hover {
  color: var(--color-text-primary);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  text-align: right;
}

.footer-contact a {
  font-size: var(--text-sm);
  color: var(--color-accent);
  transition: color var(--transition-fast);
}

.footer-contact a:hover {
  color: var(--color-accent-bright);
}

.footer-copy {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}


/* ================================================================
   20. SCROLL ANIMATION
================================================================ */

/* Base invisible state — set before JS adds .is-visible */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 600ms ease,
    transform 600ms ease;
  transition-delay: var(--delay, 0ms);
}

/* Triggered state — JS adds this class via IntersectionObserver */
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .bg-layer {
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}


/* ================================================================
   21. RESPONSIVE — TABLET (max 1024px)
================================================================ */

@media (max-width: 1024px) {

  :root {
    --space-32: 6rem;
  }

  .hero-layout {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    margin-top: 2rem;
  }

  .hero-visual img {
    width: min(100%, 560px);
  }

  .section-heading--with-visual {
    grid-template-columns: 1fr;
  }

  .section-heading__visual img {
    width: min(100%, 480px);
  }

  .cards-grid--bureaucracy {
    grid-template-columns: repeat(2, 1fr);
  }

  .cards-grid--features {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-title {
    font-size: var(--text-3xl);
  }

  .hero-title {
    font-size: 32px;
  }

  .flow-track {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-8);
  }

  .footer-contact {
    text-align: center;
    align-items: center;
  }

}


/* ================================================================
   22. RESPONSIVE — MOBILE (max 768px)
================================================================ */

@media (max-width: 768px) {

  :root {
    --nav-height: 60px;
    --space-32: 4.5rem;
  }

  /* --- Nav: collapse to hamburger --- */
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-4) var(--space-4) var(--space-6);
    background: rgba(4, 19, 26, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-border);

    /* Hidden by default */
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition:
      opacity var(--transition-base),
      transform var(--transition-base);
  }

  /* Open state — toggled by JS via .nav--open on #main-nav */
  #main-nav.nav--open .nav-links {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
  }

  .nav-links__link {
    padding: var(--space-4) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
  }

  .nav-links__link--cta {
    margin-top: var(--space-2);
    text-align: center;
  }

  .nav-logo__img {
    height: 40px;
  }

  /* --- Hero --- */
  .hero-inner {
    padding-block: var(--space-20);
  }

  .hero-subtitle {
    font-size: var(--text-base);
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-visual {
    display: none;
  }

  .section-heading__visual {
    display: none;
  }

  /* --- Grids: single column on mobile --- */
  .cards-grid--problem,
  .cards-grid--bureaucracy,
  .cards-grid--industries,
  .cards-grid--features,
  .cards-grid--pricing {
    grid-template-columns: 1fr;
  }

  /* Reset problem card positioning */
  .card--problem:nth-child(4),
  .card--problem:nth-child(5) {
    grid-column: auto;
  }

  /* --- Solution flow: vertical --- */
  .flow-track {
    flex-direction: column;
    gap: 0;
    padding: var(--space-6);
  }

  .flow-connector {
    width: 2px;
    height: 24px;
    margin: 0 auto;
    background: linear-gradient(180deg, var(--color-border) 0%, var(--color-accent) 100%);
  }

  .flow-connector::after {
    right: auto;
    top: auto;
    left: 50%;
    bottom: -1px;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 7px solid var(--color-accent);
    border-bottom: none;
  }

  /* --- Solution cards: stack --- */
  .solution-cards {
    grid-template-columns: 1fr;
  }

  /* --- Process: vertical line reposition --- */
  .process-track::before {
    left: 24px;
  }

  .process-step__index {
    width: 48px;
    height: 48px;
    font-size: var(--text-sm);
  }

  /* --- AI capabilities: single column --- */
  .ai-capabilities {
    grid-template-columns: 1fr;
  }

  /* --- Stat block: stack --- */
  .stat-block {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-6);
    padding: var(--space-8);
  }

  /* --- Pricing: no scale on featured --- */
  .card--pricing-featured {
    transform: none;
  }

  .card--pricing-featured:hover {
    transform: translateY(-3px);
  }

  /* --- CTA actions: stack --- */
  .cta-actions {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .cta-actions .btn {
    width: 100%;
    max-width: 360px;
  }

  /* --- Typography scaling --- */
  .section-title {
    font-size: var(--text-2xl);
  }

  h1 {
    font-size: var(--text-4xl);
  }

  .stat-caption {
    font-size: var(--text-base);
  }

  /* --- Footer: stack --- */
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-nav ul {
    justify-content: center;
  }

  .footer-contact {
    align-items: center;
  }

}


/* ================================================================
   23. RESPONSIVE — SMALL (max 480px)
================================================================ */

@media (max-width: 480px) {

  .nav-logo__img {
    height: 32px;
  }

  .container {
    padding-inline: var(--space-5);
  }

  .section-inner {
    padding-block: var(--space-16);
  }

  .hero-title {
    font-size: 28px;
    letter-spacing: -0.025em;
  }

  .hero-subtitle {
    font-size: var(--text-sm);
  }

  .card {
    padding: var(--space-6);
  }

  .stat-highlight {
    font-size: 3rem;
  }

  .ai-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }

  .process-step {
    gap: var(--space-4);
  }

  .section-conclusion {
    padding: var(--space-4) var(--space-5);
    font-size: var(--text-base);
  }

}

/* ============================================================
   EU FUNDING — navbar logo
============================================================ */
.nav-ue-link {
  display: flex;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
}

.ue-logo {
  height: 34px;
  margin-left: 16px;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.ue-logo:hover {
  opacity: 1;
}

/* ============================================================
   EU FUNDING — dotacje-ue.html page styles
============================================================ */
.eu-hero {
  padding: calc(var(--space-32) + 80px) 0 var(--space-16);
  text-align: center;
}

body:has(.eu-hero) .eu-hero {
  padding: calc(var(--nav-height) + 2rem) 0 1.5rem;
}

.eu-hero h1 {
  font-size: var(--text-5xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text-primary, #f0f6ff);
}

.eu-project {
  max-width: 900px;
  margin: 80px auto;
  line-height: 1.7;
  color: var(--color-text-secondary, #a8c0cc);
}

body:has(.eu-hero) .eu-project:first-of-type {
  margin-top: 2rem;
}

.eu-project h2 {
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--color-text-primary, #f0f6ff);
  margin-bottom: 20px;
}

.eu-project h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-accent);
  margin-top: 28px;
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

.eu-project p {
  margin-bottom: 1em;
}

.eu-financing {
  margin-top: 20px;
  font-weight: 500;
  color: var(--color-text-primary, #f0f6ff);
}

.eu-financing p {
  margin-bottom: 0.4em;
}

.eu-separator {
  display: block;
  margin: 4rem 0;
  padding: 0 1rem;
  text-align: center;
  position: relative;
  z-index: 2;
}

.eu-separator__panel {
  display: block;
  width: min(100% - 2rem, 1120px);
  margin: 0 auto;
  background: #f3f4f6;
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  min-height: 72px;
}

.eu-separator__panel img,
.eu-separator img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  opacity: 1;
  visibility: visible;
}

@media (max-width: 768px) {
  body:has(.eu-hero) .eu-hero {
    padding: calc(var(--nav-height) + 1.5rem) 0 1rem;
  }

  body:has(.eu-hero) .eu-project:first-of-type {
    margin-top: 1.5rem;
  }

  .eu-separator {
    margin: 3rem 0;
    padding: 0 0.75rem;
  }

  .eu-separator__panel {
    width: 100%;
    padding: 1rem;
  }
}

.eu-tags {
  margin-top: 24px;
  font-size: var(--text-sm);
  opacity: 0.55;
  letter-spacing: 0.02em;
}


/* ================================================================
   24. LIGHT THEME
   Activated via: <html data-theme="light">
   All rules here override the dark defaults above.
================================================================ */

/* --- CSS Variable overrides --- */
[data-theme="light"] {
  --color-bg-deepest:    #e4ecf3;
  --color-bg-dark:       #dce7f0;
  --color-bg-mid:        #d0dde9;
  --color-bg-elevated:   #bdd0e0;
  --color-bg-card:       #ffffff;
  --color-bg-card-hover: #ffffff;

  /* Text: dark versions of the same blue-grey hue family as the background.
     Hue ~210° throughout — harmonious, not neutral-grey. */
  --color-text-primary:   #0d1f2d;   /* near-black, cool navy — max contrast */
  --color-text-secondary: #1e3a52;   /* dark slate-blue — body text */
  --color-text-muted:     #4a6478;   /* medium blue-grey — captions, meta */
  --color-text-faint:     #7a96a8;   /* soft blue-grey — placeholders */

  --color-accent:         #0e7490;
  --color-accent-bright:  #0891b2;
  --color-accent-glow:    #06b6d4;
  --color-accent-signal:  #0369a1;

  --color-border:         rgba(14, 116, 144, 0.22);
  --color-border-hover:   rgba(14, 116, 144, 0.50);
  --color-border-card:    rgba(0, 0, 0, 0.10);

  --overlay-dark:         rgba(228, 236, 243, 0.85);
  --overlay-tint:         rgba(220, 231, 240, 0.72);

  --shadow-card:        0 4px 20px rgba(0, 0, 0, 0.10);
  --shadow-glow:        0 0 24px rgba(14, 116, 144, 0.15);
  --shadow-glow-strong: 0 0 40px rgba(14, 116, 144, 0.18);
}

/* --- Base body color (safety net for all text) --- */
[data-theme="light"] body {
  color: #0d1f2d;
  background-color: #e4ecf3;
}

/* --- Background stage --- */
[data-theme="light"] .bg-layer {
  /* Keep images dark and heavily desaturated — they appear as muted watermarks
     behind the light overlay rather than blown-out bright shapes */
  filter: saturate(0.35) brightness(0.65);
}

[data-theme="light"] #bg-overlay {
  /* Split into separate properties — avoids browser quirks with rgba() in
     multi-background shorthand where the color may be parsed as background-color
     (always rendered BEHIND image layers, not on top of them). */
  background-color: rgba(228, 236, 243, 0.94);
  background-image: linear-gradient(
    180deg,
    rgba(228, 236, 243, 0.10) 0%,
    rgba(228, 236, 243, 0.00) 40%,
    rgba(228, 236, 243, 0.10) 100%
  );
}

/* --- Navigation / header --- */
[data-theme="light"] #site-header {
  background: rgba(228, 236, 243, 0.92);
  border-bottom-color: rgba(14, 116, 144, 0.16);
}

[data-theme="light"] #site-header.site-header--scrolled {
  background: rgba(228, 236, 243, 0.97);
  border-bottom-color: rgba(14, 116, 144, 0.24);
}

[data-theme="light"] .nav-links__link:hover,
[data-theme="light"] .nav-links__link--active {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .nav-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Mobile dropdown */
@media (max-width: 768px) {
  [data-theme="light"] .nav-links {
    background: rgba(228, 236, 243, 0.99);
    border-bottom-color: var(--color-border);
  }
}

/* --- Hero (hardcoded colors) --- */
[data-theme="light"] .hero-title {
  color: #0d1f2d !important;
}

[data-theme="light"] .hero-brand {
  color: #0c5f7a !important;
  text-shadow: 0 0 18px rgba(12, 95, 122, 0.25);
}

[data-theme="light"] .hero-subtitle {
  color: #1e3a52 !important;
}

/* --- Cards (hardcoded colors) --- */
[data-theme="light"] .card__title {
  color: #0c5f7a !important;
}

[data-theme="light"] .card__body {
  color: #1e3a52 !important;
}

/* --- Flow steps (hardcoded colors) --- */
[data-theme="light"] .flow-track {
  background: rgba(237, 242, 247, 0.85);
}

[data-theme="light"] .flow-step__title {
  color: #0c5f7a !important;
}

[data-theme="light"] .flow-step__body {
  color: #1e3a52 !important;
}

/* --- Process steps (hardcoded colors) --- */
[data-theme="light"] .process-step__title {
  color: #0c5f7a !important;
}

[data-theme="light"] .process-step__body {
  color: #1e3a52 !important;
}

/* --- AI strip (var resolves to light color in light theme — fix text) --- */
[data-theme="light"] .ai-strip__label {
  color: #ffffff;
}

/* --- AI capabilities (hardcoded colors) --- */
[data-theme="light"] .ai-capability__title {
  color: #0c5f7a !important;
}

[data-theme="light"] .ai-capability__body {
  color: #1e3a52 !important;
}

/* --- Pricing (hardcoded colors) --- */
[data-theme="light"] .card__pricing-tier {
  color: #0c5f7a !important;
}

[data-theme="light"] .card__pricing-desc {
  color: #1e3a52 !important;
}

/* Badge uses var(--color-bg-deepest) which becomes light — fix to white on accent bg */
[data-theme="light"] .card__pricing-badge {
  color: #ffffff;
}

/* --- Bureaucracy stat --- */
[data-theme="light"] .stat-caption {
  color: #1e3a52;
}

[data-theme="light"] .stat-highlight {
  text-shadow: 0 0 32px rgba(14, 116, 144, 0.20);
}

/* --- Footer --- */
[data-theme="light"] #site-footer {
  background: var(--color-bg-deepest);
  border-top-color: var(--color-border-card);
}

/* --- Global text safety net — catches any element not explicitly overridden --- */
[data-theme="light"] .section-title,
[data-theme="light"] .section-subtitle,
[data-theme="light"] .section-label,
[data-theme="light"] .section-conclusion,
[data-theme="light"] .cta-title,
[data-theme="light"] .cta-body,
[data-theme="light"] .contact-item__label,
[data-theme="light"] .contact-item__value,
[data-theme="light"] .team-card__name,
[data-theme="light"] .team-card__role,
[data-theme="light"] .team-card__bio,
[data-theme="light"] .card--industry .card__title,
[data-theme="light"] .card--industry .card__body,
[data-theme="light"] .advantage-card__title,
[data-theme="light"] .advantage-card__body,
[data-theme="light"] p,
[data-theme="light"] li,
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4 {
  color: inherit;
}

/* --- Alternating section rhythm --- */
[data-theme="light"] main > section:nth-child(even) {
  background: rgba(14, 116, 144, 0.04);
}

/* --- Text selection --- */
[data-theme="light"] ::selection {
  background-color: rgba(14, 116, 144, 0.20);
  color: #0f172a;
}


/* ================================================================
   25. THEME TOGGLE BUTTON
================================================================ */

.theme-toggle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
  margin-left: var(--space-3);
}

.theme-toggle:hover {
  background: rgba(25, 198, 211, 0.08);
  border-color: var(--color-border-hover);
  color: var(--color-accent);
}

[data-theme="light"] .theme-toggle:hover {
  background: rgba(14, 116, 144, 0.08);
}

.theme-toggle__icon {
  width: 16px;
  height: 16px;
  display: block;
  pointer-events: none;
}

/* Toggle now exposes only institutional ↔ dark. */
.theme-toggle .icon-moon,
.theme-toggle .icon-sun,
.theme-toggle .icon-shield {
  display: none;
}

[data-theme="institutional"] .theme-toggle .icon-moon {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-shield {
  display: block;
}


/* ================================================================
   26. PLATFORM SECTION
================================================================ */

/* 2-column grid for the four feature cards */
.cards-grid--platform {
  grid-template-columns: repeat(2, 1fr);
}

/* Comparison table — container */
.platform-comparison {
  margin-top: var(--space-16);
}

.platform-comparison__heading {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
  margin-bottom: var(--space-6);
}

/* Scrollable wrapper keeps table from blowing out on narrow viewports */
.platform-comparison__wrap {
  overflow-x: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border-card);
  -webkit-overflow-scrolling: touch;
}

/* Table base */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  min-width: 560px;
}

/* Header row */
.comparison-table thead tr {
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border-card);
}

.comparison-table thead th {
  padding: var(--space-4) var(--space-6);
  text-align: center;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.comparison-table__feature-col {
  text-align: left !important;
  min-width: 200px;
}

/* Highlighted InnoLab AI column */
.comparison-table__hl-col {
  background: rgba(25, 198, 211, 0.07);
  color: var(--color-accent) !important;
  font-weight: var(--weight-semibold) !important;
  border-left: 1px solid var(--color-border);
}

[data-theme="light"] .comparison-table__hl-col {
  background: rgba(14, 116, 144, 0.07);
}

/* Body rows */
.comparison-table tbody tr {
  border-bottom: 1px solid var(--color-border-card);
  transition: background var(--transition-fast);
}

.comparison-table tbody tr:last-child {
  border-bottom: none;
}

.comparison-table tbody tr:hover {
  background: rgba(25, 198, 211, 0.04);
}

[data-theme="light"] .comparison-table tbody tr:hover {
  background: rgba(14, 116, 144, 0.04);
}

.comparison-table td {
  padding: var(--space-4) var(--space-6);
  text-align: center;
  color: var(--color-text-secondary);
  vertical-align: middle;
}

/* Left column — feature name */
.comparison-table__feature {
  text-align: left !important;
  font-weight: var(--weight-medium);
  color: var(--color-text-primary) !important;
}

/* Cell indicators */
.cmp {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: 1;
}

.cmp--yes {
  color: var(--color-accent);
}

.cmp--no {
  color: var(--color-text-faint);
  font-size: var(--text-base);
}

.cmp--partial {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: 0.01em;
}

/* Responsive — collapse platform grid to 1 col on mobile */
@media (max-width: 768px) {
  .cards-grid--platform {
    grid-template-columns: 1fr;
  }
}


/* ================================================================
   27. O NAS — CENTER-MODE TEAM CAROUSEL
================================================================ */

/* ── Team card ──────────────────────────────────────────────── */

/*
 * Each card is absolutely positioned inside the stage viewport.
 * JS sets --tx / --sc / --op / --bl / --zi to produce
 * center / left / right / hidden states with smooth transitions.
 */
.team-card {
  padding: 0;                       /* override .card padding */
  display: flex;
  flex-direction: column;
  overflow: hidden;

  /* Absolute positioning inside the stage viewport */
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;

  /* Transform driven by JS-injected custom properties */
  transform:
    translateX(calc(-50% + var(--tx, 0px)))
    translateY(-50%)
    scale(var(--sc, 0.75));
  opacity: var(--op, 0);
  filter: blur(var(--bl, 4px));
  z-index: var(--zi, 1);

  /* Smooth transitions on all animated properties */
  transition:
    transform  480ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity    480ms ease,
    filter     480ms ease,
    box-shadow var(--transition-base);

  will-change: transform, opacity, filter;
  cursor: default;
}

/* Hidden cards are not interactive */
.team-card[data-carousel-state="hidden"] {
  pointer-events: none;
}

/* Subtle extra shadow on the active center card */
.team-card[data-carousel-state="center"] {
  box-shadow: var(--shadow-glow-strong), var(--shadow-card);
}

/* Image container — fixed height prevents layout shifts from
   source images that differ in natural proportions */
.team-card__img-wrap {
  width: 100%;
  height: 280px;
  overflow: hidden;
  flex-shrink: 0;
}

.team-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;    /* keep faces in frame */
  display: block;
  transition: transform var(--transition-slow);
}

/*
 * Lock carousel transform on hover — .card:hover applies
 * transform: translateY(-3px) which would override the carousel's
 * compound translateX/translateY/scale and break card positioning.
 * Re-declaring the exact same transform here wins the specificity
 * race and keeps every card visually stable under the mouse.
 * No image zoom — cards are stable at all times.
 */
.team-card:hover {
  transform:
    translateX(calc(-50% + var(--tx, 0px)))
    translateY(-50%)
    scale(var(--sc, 0.75));
  cursor: default;
}

/* Text info area */
.team-card__info {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex: 1;
}

.team-card__name {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
  line-height: var(--leading-snug);
}

.team-card__role {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-accent);
  letter-spacing: 0.02em;
  margin-bottom: var(--space-2);
}

.team-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
}


/* ── Stage container ─────────────────────────────────────────── */

.team-stage {
  position: relative;
  margin-top: var(--space-10);
  user-select: none;
}

/* Viewport clips overflowing side cards */
.team-stage__viewport {
  position: relative;
  height: 480px;
  overflow: hidden;
}

/*
 * Edge fade overlays — gradient using the page background color.
 * var(--color-bg-deepest) switches between dark/light automatically,
 * so side cards dissolve into the section background in both themes.
 */
.team-stage__fade {
  position: absolute;
  inset-block: 0;
  width: 160px;
  pointer-events: none;
  z-index: 10;
}

.team-stage__fade--left {
  left: 0;
  background: linear-gradient(
    to right,
    var(--color-bg-deepest) 0%,
    transparent 100%
  );
}

.team-stage__fade--right {
  right: 0;
  background: linear-gradient(
    to left,
    var(--color-bg-deepest) 0%,
    transparent 100%
  );
}

/* Controls row — arrows + dots — always visible */
.team-stage__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  margin-top: var(--space-8);
}

.team-stage__dots {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}


/* ── Arrow buttons ───────────────────────────────────────────── */

.team-carousel__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition:
    background     var(--transition-fast),
    border-color   var(--transition-fast),
    color          var(--transition-fast);
}

.team-carousel__btn:hover {
  background: rgba(25, 198, 211, 0.08);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

[data-theme="light"] .team-carousel__btn:hover {
  background: rgba(14, 116, 144, 0.08);
}


/* ── Dot indicators ──────────────────────────────────────────── */

.team-carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  padding: 0;
  border: 1px solid var(--color-border);
  background: transparent;
  cursor: pointer;
  transition:
    background     var(--transition-fast),
    border-color   var(--transition-fast),
    transform      var(--transition-fast);
}

.team-carousel__dot--active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  transform: scale(1.4);
}

.team-carousel__dot:hover:not(.team-carousel__dot--active) {
  border-color: var(--color-accent);
  background: rgba(25, 198, 211, 0.18);
}

[data-theme="light"] .team-carousel__dot:hover:not(.team-carousel__dot--active) {
  background: rgba(14, 116, 144, 0.14);
}


/* ── Responsive ──────────────────────────────────────────────── */

/* Tablet: narrower cards, lower viewport */
@media (max-width: 1024px) {
  .team-stage__viewport {
    height: 450px;
  }

  .team-card {
    width: 260px;
  }

  .team-card__img-wrap {
    height: 240px;
  }

  .team-stage__fade {
    width: 100px;
  }
}

/* Mobile: single centered card, side cards hidden behind it */
@media (max-width: 768px) {
  .team-stage__viewport {
    height: 500px;
  }

  .team-card {
    width: min(300px, 82vw);
  }

  .team-card__img-wrap {
    height: 280px;
  }

  /* No need for edge fades when side cards are behind center */
  .team-stage__fade {
    display: none;
  }
}


/* ================================================================
   28. KONTAKT — FINAL INSTITUTIONAL CONTACT SECTION
================================================================ */

/* Two-column layout: description left, info table right */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: start;
}

/* Left column intro text */
.contact-heading {
  margin-bottom: var(--space-6);
}

.contact-desc {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
  max-width: 480px;
  margin-bottom: var(--space-5);
}

.contact-desc:last-child {
  margin-bottom: 0;
}

/* Right column: definition list as a clean info table */
.contact-info {
  display: flex;
  flex-direction: column;
  /* Top border closes the table visually */
  border-top: 1px solid var(--color-border-card);
}

.contact-form {
  grid-column: 2;
  padding: var(--space-8);
  border: 1px solid var(--color-border-card);
  border-radius: var(--radius-xl);
  background: var(--color-bg-card);
  box-shadow: var(--shadow-card);
}

.contact-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.contact-form label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--color-border-card);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  font: inherit;
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.82);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.12);
}

.contact-form__submit {
  width: 100%;
  margin-top: 0.25rem;
}

.contact-form__submit:disabled {
  cursor: wait;
  opacity: 0.72;
}

.contact-form__status {
  margin: 1rem 0 0;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
}

.contact-form__status:empty {
  display: none;
}

.contact-form__status[data-state="success"] {
  color: #15803d;
}

.contact-form__status[data-state="error"] {
  color: #c8102e;
}

[data-theme="dark"] .contact-form {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.22);
}

[data-theme="dark"] .contact-form input,
[data-theme="dark"] .contact-form textarea {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

[data-theme="dark"] .contact-form input:focus,
[data-theme="dark"] .contact-form textarea:focus {
  border-color: var(--color-accent-bright);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.16);
}

[data-theme="dark"] .contact-form__status[data-state="success"] {
  color: #86efac;
}

.contact-item {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border-card);
  align-items: baseline;
}

.contact-item__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  line-height: var(--leading-normal);
  padding-top: 2px;   /* optical baseline alignment with value */
}

.contact-item__value {
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  line-height: var(--leading-normal);
}

/* Clickable email / URL */
.contact-item__value a {
  color: var(--color-accent);
  transition: color var(--transition-fast);
}

.contact-item__value a:hover {
  color: var(--color-accent-bright);
}

/* Responsive: stack on tablet and below */
@media (max-width: 1024px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }

  .contact-form {
    grid-column: auto;
  }

  .contact-desc {
    max-width: none;
  }
}

/* Narrower label column on small screens */
@media (max-width: 480px) {
  .contact-item {
    grid-template-columns: 6rem 1fr;
    gap: var(--space-3);
  }
}


/* ================================================================
   29. INSTITUTIONAL THEME — NAVY + RED
   Activated via: <html data-theme="institutional">
   Third theme: institutional / governmental aesthetic.

   COLOR LOGIC:
   - Navy (#0b2545 / #243b53) = structural color: titles, nav, body
   - Red (#c8102e) = accent/CTA only: primary button, small markers,
     active CTA link, card numbers, checkmarks, AI pill
   - Red must NOT dominate typography or large text blocks
================================================================ */

/* --- CSS Variable overrides --- */
[data-theme="institutional"] {
  --color-bg-deepest:    #eef3f7;
  --color-bg-dark:       #e4ebf2;
  --color-bg-mid:        #d8e2ec;
  --color-bg-elevated:   #c9d7e5;
  --color-bg-card:       rgba(255, 255, 255, 0.92);
  --color-bg-card-hover: #ffffff;

  --color-text-primary:   #0d1b2a;
  --color-text-secondary: #243b53;
  --color-text-muted:     #52677a;
  --color-text-faint:     #7b8da0;

  /* Red as accent — only for CTA, markers, small UI elements */
  --color-accent:         #c8102e;
  --color-accent-bright:  #d61f3c;
  --color-accent-glow:    #e5485e;
  --color-accent-signal:  #0b2545;

  /* Borders: navy-tinted, not red */
  --color-border:         rgba(11, 37, 69, 0.18);
  --color-border-hover:   rgba(11, 37, 69, 0.40);
  --color-border-card:    rgba(11, 37, 69, 0.10);

  --overlay-dark:         rgba(238, 243, 247, 0.90);
  --overlay-tint:         rgba(228, 235, 242, 0.72);

  --shadow-card:          0 8px 28px rgba(11, 37, 69, 0.10);
  --shadow-glow:          0 0 22px rgba(200, 16, 46, 0.14);
  --shadow-glow-strong:   0 0 36px rgba(200, 16, 46, 0.16);
}

/* --- Base body --- */
[data-theme="institutional"] body {
  color: #0d1b2a;
  background-color: #eef3f7;
}

/* --- Background stage --- */
[data-theme="institutional"] .bg-layer {
  filter: saturate(0.18) brightness(0.48);
}

[data-theme="institutional"] #bg-overlay {
  background-color: rgba(238, 243, 247, 0.96);
  background-image: linear-gradient(
    180deg,
    rgba(238, 243, 247, 0.12) 0%,
    rgba(238, 243, 247, 0.00) 40%,
    rgba(238, 243, 247, 0.12) 100%
  );
}

/* ── INSTITUTIONAL NAVBAR: dark navy base + PCB trace decoration ─── */

/* Solid dark navy — no glass blur, clips the ::before layer */
[data-theme="dark"] #site-header,
[data-theme="institutional"] #site-header {
  background: #0b2545;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: hidden;
}

[data-theme="dark"] #site-header.site-header--scrolled,
[data-theme="institutional"] #site-header.site-header--scrolled {
  background: #071c38;
  border-bottom-color: rgba(255, 255, 255, 0.10);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/*
 * PCB / circuit-board trace decoration.
 * Positioned behind all nav content via z-index.
 * mask-image fades the graphic from left (solid) to right (transparent)
 * so links and logo are never obscured.
 * mix-blend-mode: screen makes the white traces glow on the dark navy
 * background while the white bg of the PNG dissolves into the navy.
 */
[data-theme="dark"] #site-header::before,
[data-theme="institutional"] #site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 28%;

  background-image: url("Obrazki/Wlasciwy.png");
  /*
   * KLUCZOWA ZMIANA: cover skaluje obraz do pełnej szerokości
   * pseudo-elementu (78% navbaru ≈ 936px przy 1200px oknie).
   * Poprzednie "auto 210%" dawało tylko ~403px szerokości obrazu
   * w elemencie 864px — reszta to pusta przestrzeń bez ścieżek.
   */
  background-size: cover;
  background-repeat: no-repeat;
  background-position: left center;

  mix-blend-mode: screen;
  opacity: 0.30;

  /* Fade zaczyna się przy 30% pseudo-elementu, kończy przy 88% */
  -webkit-mask-image: linear-gradient(
    to right,
    rgba(0,0,0,1.00)  0%,
    rgba(0,0,0,1.00) 30%,
    rgba(0,0,0,0.75) 48%,
    rgba(0,0,0,0.35) 65%,
    rgba(0,0,0,0.00) 88%
  );
  mask-image: linear-gradient(
    to right,
    rgba(0,0,0,1.00)  0%,
    rgba(0,0,0,1.00) 30%,
    rgba(0,0,0,0.75) 48%,
    rgba(0,0,0,0.35) 65%,
    rgba(0,0,0,0.00) 88%
  );

  pointer-events: none;
  z-index: 0;
}

/* Nav content must sit above the ::before layer */
[data-theme="dark"] #main-nav,
[data-theme="institutional"] #main-nav {
  position: relative;
  z-index: 1;
}

/* Nav links: white/light text on dark navy */
[data-theme="dark"] .nav-links__link,
[data-theme="institutional"] .nav-links__link {
  color: rgba(255, 255, 255, 0.78);
}

[data-theme="dark"] .nav-links__link:hover,
[data-theme="institutional"] .nav-links__link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

/* Active link: white, subtle bright bg — no red here */
[data-theme="dark"] .nav-links__link--active,
[data-theme="institutional"] .nav-links__link--active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.11);
}

/* CTA "Kontakt": red — the single accent in the navbar */
[data-theme="dark"] .nav-links__link--cta,
[data-theme="institutional"] .nav-links__link--cta {
  color: #c8102e;
  border-color: rgba(200, 16, 46, 0.50);
}

[data-theme="dark"] .nav-links__link--cta:hover,
[data-theme="institutional"] .nav-links__link--cta:hover {
  background: #c8102e;
  border-color: #c8102e;
  color: #ffffff;
}

/* Hamburger bars: white on dark */
[data-theme="dark"] .nav-toggle__bar,
[data-theme="institutional"] .nav-toggle__bar {
  background: rgba(255, 255, 255, 0.80);
}

[data-theme="dark"] .nav-toggle:hover,
[data-theme="institutional"] .nav-toggle:hover {
  background: rgba(255, 255, 255, 0.10);
}

/* Theme toggle: light palette on dark navbar */
[data-theme="dark"] .theme-toggle,
[data-theme="institutional"] .theme-toggle {
  color: rgba(255, 255, 255, 0.65);
  border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .theme-toggle:hover,
[data-theme="institutional"] .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

/* Mobile dropdown: dark base (matching header), NOT light */
@media (max-width: 768px) {
  [data-theme="dark"] .nav-links,
  [data-theme="institutional"] .nav-links {
    background: rgba(7, 28, 56, 0.98);
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }

  /* Disable decoration on mobile — too small to render well */
  [data-theme="dark"] #site-header::before,
  [data-theme="institutional"] #site-header::before {
    display: none;
  }
}

/* --- Hero --- */
[data-theme="institutional"] .hero-title {
  color: #0d1b2a !important;
}

/* Hero brand: deep navy — red would look alarming at h1 scale */
[data-theme="institutional"] .hero-brand {
  color: #0b2545 !important;
  text-shadow: none;
}

[data-theme="institutional"] .hero-subtitle {
  color: #243b53 !important;
}

[data-theme="institutional"] #platform .section-heading__visual img {
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.14),
    0 6px 16px rgba(0, 0, 0, 0.10);
  filter: drop-shadow(0 24px 50px rgba(0, 0, 0, 0.22));
}

[data-theme="institutional"] #problem .section-heading__visual img,
[data-theme="institutional"] #solution .section-heading__visual img,
[data-theme="institutional"] #ai .section-heading__visual img {
  box-shadow:
    0 18px 40px rgba(11, 37, 69, 0.13),
    0 6px 18px rgba(11, 37, 69, 0.08);
  filter: drop-shadow(0 22px 44px rgba(11, 37, 69, 0.12));
}

/* --- Section label: navy text, very light navy bg ---
   The base rule sets color: var(--color-accent) which here would be red.
   Override to navy; the border already comes from var(--color-border) = navy. */
[data-theme="institutional"] .section-label {
  color: #0b2545;
  background: rgba(11, 37, 69, 0.06);
  border-color: rgba(11, 37, 69, 0.18);
}

/* --- Cards --- */
[data-theme="institutional"] .card__title {
  color: #0b2545 !important;
}

[data-theme="institutional"] .card__body {
  color: #243b53 !important;
}

/* --- Flow steps --- */
[data-theme="institutional"] .flow-track {
  background: rgba(228, 235, 242, 0.80);
}

[data-theme="institutional"] .flow-step__title {
  color: #0b2545 !important;
}

[data-theme="institutional"] .flow-step__body {
  color: #243b53 !important;
}

/* --- Process architecture --- */
[data-theme="institutional"] .process-step__title {
  color: #0b2545 !important;
}

[data-theme="institutional"] .process-step__body {
  color: #243b53 !important;
}

/* Process index hover: navy, not red */
[data-theme="institutional"] .process-step:hover .process-step__index {
  background: rgba(11, 37, 69, 0.08);
  border-color: rgba(11, 37, 69, 0.40);
  box-shadow: 0 0 16px rgba(11, 37, 69, 0.12);
}

/* --- AI strip: navy-tinted (red band was too alarming) --- */
[data-theme="institutional"] .ai-strip {
  background: linear-gradient(
    135deg,
    rgba(11, 37, 69, 0.07) 0%,
    rgba(11, 37, 69, 0.03) 100%
  );
  border-color: rgba(11, 37, 69, 0.18);
}

/* "AI" pill: red OK — small functional marker */
[data-theme="institutional"] .ai-strip__label {
  color: #ffffff;
}

/* Strong word in AI strip: navy — it's emphasis, not CTA */
[data-theme="institutional"] .ai-strip__content strong {
  color: #0b2545;
}

[data-theme="institutional"] .ai-capability__title {
  color: #0b2545 !important;
}

[data-theme="institutional"] .ai-capability__body {
  color: #243b53 !important;
}

[data-theme="institutional"] .ai-capability:hover {
  background: rgba(11, 37, 69, 0.04);
}

/* --- Pricing --- */
[data-theme="institutional"] .card__pricing-tier {
  color: #0b2545 !important;
}

[data-theme="institutional"] .card__pricing-desc {
  color: #243b53 !important;
}

[data-theme="institutional"] .card__pricing-badge {
  color: #ffffff;
}

/* Featured pricing card: navy-tinted (not red) */
[data-theme="institutional"] .card--pricing-featured {
  background: rgba(11, 37, 69, 0.05);
  border-color: rgba(11, 37, 69, 0.20);
}

[data-theme="institutional"] .card--pricing-featured:hover {
  transform: scale(1.025) translateY(-3px);
}

/* --- Industries: navy bg, red top stripe = accent only --- */
[data-theme="institutional"] .card--industry-featured {
  background: rgba(11, 37, 69, 0.04);
  border: 1px solid rgba(11, 37, 69, 0.16);
  border-top: 2px solid #c8102e;
}

[data-theme="institutional"] .card--industry-featured:hover {
  background: rgba(11, 37, 69, 0.07);
  border-color: rgba(11, 37, 69, 0.26);
}

/* --- Comparison table: navy-tinted highlight column --- */
[data-theme="institutional"] .comparison-table__hl-col {
  background: rgba(11, 37, 69, 0.06);
  color: #0b2545 !important;
  border-left-color: rgba(11, 37, 69, 0.20);
}

[data-theme="institutional"] .comparison-table tbody tr:hover {
  background: rgba(11, 37, 69, 0.03);
}

/* --- Bureaucracy stat block: navy-tinted --- */
[data-theme="institutional"] .stat-block {
  background: rgba(11, 37, 69, 0.04);
  border-color: rgba(11, 37, 69, 0.14);
}

[data-theme="institutional"] .stat-caption {
  color: #243b53;
}

/* Large stat number: keeps red glow — it's a highlight accent, not body text */
[data-theme="institutional"] .stat-highlight {
  text-shadow: 0 0 32px rgba(200, 16, 46, 0.20);
}

/* --- Section conclusion: navy-tinted; red left-stripe from var(--color-accent) ✓ --- */
[data-theme="institutional"] .section-conclusion {
  background: rgba(11, 37, 69, 0.04);
}

/* --- Buttons: full institutional CTA hierarchy ---
   Primary = solid red fill (the main call-to-action)
   Ghost   = navy outline (secondary action) */
[data-theme="institutional"] .btn--primary {
  background: #c8102e;
  border-color: #c8102e;
  color: #ffffff;
}

[data-theme="institutional"] .btn--primary:hover {
  background: #a60d26;
  border-color: #a60d26;
  color: #ffffff;
  box-shadow: 0 0 22px rgba(200, 16, 46, 0.22);
}

[data-theme="institutional"] .btn--ghost {
  border-color: rgba(11, 37, 69, 0.35);
  color: #0b2545;
}

[data-theme="institutional"] .btn--ghost:hover {
  border-color: #0b2545;
  color: #0d1b2a;
  background: rgba(11, 37, 69, 0.06);
}

/* --- Theme toggle: navy hover --- */
[data-theme="dark"] .theme-toggle:hover,
[data-theme="institutional"] .theme-toggle:hover {
  background: rgba(11, 37, 69, 0.08);
  border-color: rgba(11, 37, 69, 0.30);
  color: #0b2545;
}

/* --- Team carousel: navy hover --- */
[data-theme="institutional"] .team-carousel__btn:hover {
  background: rgba(11, 37, 69, 0.08);
  border-color: #0b2545;
  color: #0b2545;
}

[data-theme="institutional"] .team-carousel__dot:hover:not(.team-carousel__dot--active) {
  border-color: rgba(11, 37, 69, 0.40);
  background: rgba(11, 37, 69, 0.12);
}

/* --- Footer --- */
[data-theme="institutional"] #site-footer {
  background: var(--color-bg-deepest);
  border-top-color: var(--color-border-card);
}

/* --- EU page elements: h3 section titles in navy --- */
[data-theme="institutional"] .eu-project h3 {
  color: #0b2545;
}

[data-theme="institutional"] .eu-financing {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(11, 37, 69, 0.12);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-6);
}

[data-theme="institutional"] .eu-tags {
  color: #52677a;
}

/* --- Global text safety net --- */
[data-theme="institutional"] .section-title,
[data-theme="institutional"] .section-subtitle,
[data-theme="institutional"] .section-label,
[data-theme="institutional"] .section-conclusion,
[data-theme="institutional"] .cta-title,
[data-theme="institutional"] .cta-body,
[data-theme="institutional"] .contact-item__label,
[data-theme="institutional"] .contact-item__value,
[data-theme="institutional"] .team-card__name,
[data-theme="institutional"] .team-card__role,
[data-theme="institutional"] .team-card__desc,
[data-theme="institutional"] .card--industry .card__title,
[data-theme="institutional"] .card--industry .card__body,
[data-theme="institutional"] p,
[data-theme="institutional"] li,
[data-theme="institutional"] h1,
[data-theme="institutional"] h2,
[data-theme="institutional"] h3,
[data-theme="institutional"] h4 {
  color: inherit;
}

/* --- Alternating section rhythm: very subtle navy --- */
[data-theme="institutional"] main > section:nth-child(even) {
  background: rgba(11, 37, 69, 0.02);
}

/* --- Text selection --- */
[data-theme="institutional"] ::selection {
  background-color: rgba(200, 16, 46, 0.18);
  color: #0d1b2a;
}


/* ================================================================
   INSTITUTIONAL — SECTION RHYTHM
   Dark navy:  #platform  #bureaucracy  #process
               #industries  #pricing  #about
   Light page: #hero  #problem  #solution  #ai
               #advantages  #cta  #contact
================================================================ */

/* ── A. Shared dark background + base text color ─────────────
   Setting color: #f8fafc here lets all child p/li/h elements
   inherit white text without extra rules. Specific overrides
   with higher specificity or !important handle exceptions.    */

[data-theme="institutional"] #platform,
[data-theme="institutional"] #bureaucracy,
[data-theme="institutional"] #process,
[data-theme="institutional"] #industries,
[data-theme="institutional"] #pricing,
[data-theme="institutional"] #about {
  background: linear-gradient(180deg, #0b2545 0%, #071c38 100%);
  color: #f8fafc;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── B. Shared typography ─────────────────────────────────── */

/* Section label: red accent pill on dark */
[data-theme="institutional"] #platform .section-label,
[data-theme="institutional"] #bureaucracy .section-label,
[data-theme="institutional"] #process .section-label,
[data-theme="institutional"] #industries .section-label,
[data-theme="institutional"] #pricing .section-label,
[data-theme="institutional"] #about .section-label {
  color: rgba(220, 80, 80, 0.95);
  background: rgba(200, 16, 46, 0.14);
  border-color: rgba(200, 16, 46, 0.28);
}

/* Section title: white */
[data-theme="institutional"] #platform .section-title,
[data-theme="institutional"] #bureaucracy .section-title,
[data-theme="institutional"] #process .section-title,
[data-theme="institutional"] #industries .section-title,
[data-theme="institutional"] #pricing .section-title,
[data-theme="institutional"] #about .section-title {
  color: #f8fafc !important;
}

/* Section subtitle: light blue-grey */
[data-theme="institutional"] #platform .section-subtitle,
[data-theme="institutional"] #bureaucracy .section-subtitle,
[data-theme="institutional"] #process .section-subtitle,
[data-theme="institutional"] #industries .section-subtitle,
[data-theme="institutional"] #pricing .section-subtitle,
[data-theme="institutional"] #about .section-subtitle {
  color: rgba(180, 205, 225, 0.85) !important;
}

/* ── C. Shared cards ─────────────────────────────────────── */

[data-theme="institutional"] #bureaucracy .card,
[data-theme="institutional"] #process .card,
[data-theme="institutional"] #industries .card,
[data-theme="institutional"] #pricing .card,
[data-theme="institutional"] #about .card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.11);
}

[data-theme="institutional"] #bureaucracy .card:hover,
[data-theme="institutional"] #process .card:hover,
[data-theme="institutional"] #industries .card:hover,
[data-theme="institutional"] #pricing .card:hover,
[data-theme="institutional"] #about .card:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.30);
}

/* Card titles: white (overrides global navy !important) */
[data-theme="institutional"] #bureaucracy .card__title,
[data-theme="institutional"] #process .card__title,
[data-theme="institutional"] #industries .card__title,
[data-theme="institutional"] #pricing .card__title,
[data-theme="institutional"] #about .card__title {
  color: #f8fafc !important;
}

/* Card body: light blue-grey (overrides global navy !important) */
[data-theme="institutional"] #bureaucracy .card__body,
[data-theme="institutional"] #process .card__body,
[data-theme="institutional"] #industries .card__body,
[data-theme="institutional"] #pricing .card__body,
[data-theme="institutional"] #about .card__body {
  color: rgba(185, 210, 230, 0.85) !important;
}

/* Small accent elements inside cards: red */
[data-theme="institutional"] #bureaucracy .card__feature-num,
[data-theme="institutional"] #bureaucracy .card__eyebrow,
[data-theme="institutional"] #bureaucracy .card__icon,
[data-theme="institutional"] #process .card__feature-num,
[data-theme="institutional"] #process .card__eyebrow,
[data-theme="institutional"] #process .card__icon,
[data-theme="institutional"] #industries .card__feature-num,
[data-theme="institutional"] #industries .card__eyebrow,
[data-theme="institutional"] #industries .card__icon,
[data-theme="institutional"] #pricing .card__feature-num,
[data-theme="institutional"] #pricing .card__eyebrow,
[data-theme="institutional"] #pricing .card__icon,
[data-theme="institutional"] #about .card__feature-num,
[data-theme="institutional"] #about .card__eyebrow,
[data-theme="institutional"] #about .card__icon {
  color: #c8102e;
}

/* ── D. Shared buttons in dark sections ──────────────────── */

/* Ghost: white outline — navy outline is invisible on dark bg */
[data-theme="institutional"] #pricing .btn--ghost {
  border-color: rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.85);
}

[data-theme="institutional"] #pricing .btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.55);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
}

/* ── E. Section-specific elements ───────────────────────── */

/* ─ #platform: comparison table ──────────────────────── */

[data-theme="institutional"] #platform .card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.11);
}

[data-theme="institutional"] #platform .card:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.30);
}

[data-theme="institutional"] #platform .card__title {
  color: #f8fafc !important;
}

[data-theme="institutional"] #platform .card__body {
  color: rgba(185, 210, 230, 0.85) !important;
}

[data-theme="institutional"] #platform .card__feature-num {
  color: #c8102e;
}

[data-theme="institutional"] #platform .platform-comparison__heading {
  color: rgba(220, 235, 248, 0.95);
}

[data-theme="institutional"] #platform .platform-comparison__wrap {
  border-color: rgba(255, 255, 255, 0.10);
}

[data-theme="institutional"] #platform .comparison-table thead tr {
  background: rgba(255, 255, 255, 0.08);
  border-bottom-color: rgba(255, 255, 255, 0.10);
}

[data-theme="institutional"] #platform .comparison-table thead th {
  color: rgba(195, 218, 238, 0.80);
}

[data-theme="institutional"] #platform .comparison-table tbody tr {
  border-bottom-color: rgba(255, 255, 255, 0.07);
}

[data-theme="institutional"] #platform .comparison-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="institutional"] #platform .comparison-table td {
  color: rgba(175, 200, 220, 0.80);
}

[data-theme="institutional"] #platform .comparison-table__feature {
  color: rgba(220, 235, 248, 0.95) !important;
}

[data-theme="institutional"] #platform .comparison-table__hl-col {
  background: rgba(200, 16, 46, 0.12);
  color: #f8fafc !important;
  border-left-color: rgba(200, 16, 46, 0.35);
}

[data-theme="institutional"] #platform .cmp--yes {
  color: #c8102e;
}

[data-theme="institutional"] #platform .cmp--no {
  color: rgba(175, 200, 220, 0.38);
}

[data-theme="institutional"] #platform .cmp--partial {
  color: rgba(175, 200, 220, 0.68);
}

/* ─ #bureaucracy ───────────────────────────────────────── */

/* Stat block: visible on dark bg */
[data-theme="institutional"] #bureaucracy .stat-block {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="institutional"] #bureaucracy .stat-caption {
  color: rgba(185, 210, 230, 0.85);
}

/* Large stat number: red — it's a highlight, accent at scale */
[data-theme="institutional"] #bureaucracy .stat-highlight {
  color: #c8102e;
  text-shadow: 0 0 32px rgba(200, 16, 46, 0.40);
}

/* Left-stripe border: visible on dark */
[data-theme="institutional"] #bureaucracy .card--bureaucracy {
  border-left-color: rgba(255, 255, 255, 0.16);
}

[data-theme="institutional"] #bureaucracy .card--bureaucracy:hover {
  border-left-color: #c8102e;
}

/* Section conclusion on dark bg */
[data-theme="institutional"] #bureaucracy .section-conclusion {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(220, 235, 248, 0.90);
  border-left-color: #c8102e;
}

/* ─ #process ────────────────────────────────────────────── */

/* Process step index circles: white on dark */
[data-theme="institutional"] #process .process-step__index {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
  color: #c8102e;
}

[data-theme="institutional"] #process .process-step:hover .process-step__index {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.12);
}

/* Vertical timeline line: visible on dark */
[data-theme="institutional"] #process .process-track::before {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 255, 255, 0.14) 10%,
    rgba(200, 16, 46, 0.65) 50%,
    rgba(255, 255, 255, 0.14) 90%,
    transparent 100%
  );
}

/* Process step text */
[data-theme="institutional"] #process .process-step__title {
  color: #f8fafc !important;
}

[data-theme="institutional"] #process .process-step__body {
  color: rgba(185, 210, 230, 0.85) !important;
}

/* AI strip: translucent light on dark */
[data-theme="institutional"] #process .ai-strip {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.04) 100%
  );
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="institutional"] #process .ai-strip__content {
  color: rgba(185, 210, 230, 0.88);
}

[data-theme="institutional"] #process .ai-strip__content strong {
  color: #f8fafc;
}

/* ─ #industries ─────────────────────────────────────────── */

/* Industry cards: subtle top border */
[data-theme="institutional"] #industries .card--industry {
  border-top-color: rgba(255, 255, 255, 0.12);
}

[data-theme="institutional"] #industries .card--industry:hover {
  border-top-color: #c8102e;
}

/* Featured card: red accent bg on dark */
[data-theme="institutional"] #industries .card--industry-featured {
  background: rgba(200, 16, 46, 0.14);
  border: 1px solid rgba(200, 16, 46, 0.28);
  border-top: 2px solid #c8102e;
}

[data-theme="institutional"] #industries .card--industry-featured:hover {
  background: rgba(200, 16, 46, 0.20);
  border-color: rgba(200, 16, 46, 0.40);
}

[data-theme="institutional"] #industries .card__eyebrow {
  color: #c8102e;
}

/* ─ #pricing ────────────────────────────────────────────── */

/* Pricing tiers */
[data-theme="institutional"] #pricing .card__pricing-tier {
  color: #f8fafc !important;
}

[data-theme="institutional"] #pricing .card__pricing-desc {
  color: rgba(185, 210, 230, 0.85) !important;
}

/* Feature list items */
[data-theme="institutional"] #pricing .card__pricing-features li {
  color: rgba(185, 210, 230, 0.82);
}

[data-theme="institutional"] #pricing .card__pricing-features li::before {
  background: #c8102e;
  opacity: 0.80;
}

/* Featured pricing card: red accent stands out on dark */
[data-theme="institutional"] #pricing .card--pricing-featured {
  background: rgba(200, 16, 46, 0.14);
  border-color: rgba(200, 16, 46, 0.30);
}

[data-theme="institutional"] #pricing .card--pricing-featured:hover {
  transform: scale(1.025) translateY(-3px);
  background: rgba(200, 16, 46, 0.18);
}

[data-theme="institutional"] #pricing .card__pricing-badge {
  background: #c8102e;
  color: #ffffff;
}

/* ─ #about ──────────────────────────────────────────────── */

/* Team card text on dark */
[data-theme="institutional"] #about .team-card__name {
  color: #f8fafc !important;
}

[data-theme="institutional"] #about .team-card__role {
  color: #c8102e;
}

[data-theme="institutional"] #about .team-card__desc {
  color: rgba(185, 210, 230, 0.82) !important;
}

/* Edge fades must match dark section bg, not light page bg */
[data-theme="institutional"] #about .team-stage__fade--left {
  background: linear-gradient(to right, #071c38 0%, transparent 100%);
}

[data-theme="institutional"] #about .team-stage__fade--right {
  background: linear-gradient(to left, #071c38 0%, transparent 100%);
}

/* Carousel arrow buttons: white on dark */
[data-theme="institutional"] #about .team-carousel__btn {
  border-color: rgba(255, 255, 255, 0.20);
  color: rgba(255, 255, 255, 0.65);
}

[data-theme="institutional"] #about .team-carousel__btn:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.40);
  color: #ffffff;
}

/* Carousel dots */
[data-theme="institutional"] #about .team-carousel__dot {
  border-color: rgba(255, 255, 255, 0.25);
}

[data-theme="institutional"] #about .team-carousel__dot--active {
  background: #c8102e;
  border-color: #c8102e;
}

[data-theme="institutional"] #about .team-carousel__dot:hover:not(.team-carousel__dot--active) {
  border-color: rgba(255, 255, 255, 0.50);
  background: rgba(255, 255, 255, 0.12);
}


/* ================================================================
   INSTITUTIONAL — #process: sequential step animation
   ─────────────────────────────────────────────────────────────────
   Why not transition:
   The .process-step elements carry inline style="--delay: Xms"
   which controls transition-delay. Inline custom properties cannot
   be overridden by CSS rules. Switching to CSS animation lets us
   set animation-delay per step via higher-specificity selectors,
   fully independently of the inline --delay value.

   Mechanism:
   1. transition: none on steps → disables the default reveal
   2. animation: inst-process-step-in … both on .is-visible
      (fill-mode: both keeps steps hidden during their delay)
   3. animation-delay per step via article:nth-of-type()
   4. All steps get is-visible simultaneously (same observer frame)
      but animate sequentially because of the cascading delays
================================================================ */

@keyframes inst-process-step-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Disable the default transition-based reveal for process elements.
   The child .process-step__index keeps its own transition (hover). */
[data-theme="institutional"] #process .process-step.animate-on-scroll,
[data-theme="institutional"] #process .ai-strip.animate-on-scroll {
  transition: none;
}

/* Trigger animation when IntersectionObserver adds .is-visible */
[data-theme="institutional"] #process .process-step.animate-on-scroll.is-visible,
[data-theme="institutional"] #process .ai-strip.animate-on-scroll.is-visible {
  animation: inst-process-step-in 680ms cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/*
 * Sequential delays.
 * article:nth-of-type() targets only <article> elements — the
 * <div class="process-connector"> divs between steps do not
 * interrupt the count, so 1–4 map directly to steps I–IV.
 * Higher specificity (element type + id) beats the shared rule's
 * default animation-delay: 0s from the shorthand above.
 */
[data-theme="institutional"] #process .process-track > article:nth-of-type(1).is-visible {
  animation-delay: 0ms;
}

[data-theme="institutional"] #process .process-track > article:nth-of-type(2).is-visible {
  animation-delay: 340ms;
}

[data-theme="institutional"] #process .process-track > article:nth-of-type(3).is-visible {
  animation-delay: 680ms;
}

[data-theme="institutional"] #process .process-track > article:nth-of-type(4).is-visible {
  animation-delay: 1020ms;
}

/* AI strip follows after the last step */
[data-theme="institutional"] #process .ai-strip.animate-on-scroll.is-visible {
  animation-delay: 1360ms;
}

/* Respect reduced-motion preference — skip animation, show immediately */
@media (prefers-reduced-motion: reduce) {
  [data-theme="institutional"] #process .process-step.animate-on-scroll,
  [data-theme="institutional"] #process .ai-strip.animate-on-scroll {
    opacity: 1;
    transform: none;
    animation: none;
  }
}


/* ===============================================================
   30. INSTITUTIONAL CIRCUIT REVEAL
   Decorative PCB traces for light institutional sections only.
   =============================================================== */

.circuit-reveal {
  display: none;
}

[data-theme="institutional"] .circuit-reveal {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  overflow: hidden;
  pointer-events: none;
}

[data-theme="institutional"] #hero,
[data-theme="institutional"] #problem,
[data-theme="institutional"] #solution,
[data-theme="institutional"] #ai,
[data-theme="institutional"] #advantages,
[data-theme="institutional"] #cta,
[data-theme="institutional"] #contact {
  position: relative;
}

[data-theme="institutional"] #hero > .container,
[data-theme="institutional"] #problem > .container,
[data-theme="institutional"] #solution > .container,
[data-theme="institutional"] #ai > .container,
[data-theme="institutional"] #advantages > .container,
[data-theme="institutional"] #cta > .container,
[data-theme="institutional"] #contact > .container {
  position: relative;
  z-index: 1;
}

[data-theme="institutional"] .circuit-reveal svg {
  position: absolute;
  top: 50%;
  width: min(48vw, 620px);
  max-height: 94%;
  height: auto;
  opacity: 0.22;
}

[data-theme="institutional"] .circuit-reveal--left svg {
  left: -6%;
  transform: translate(-12%, -50%);
}

[data-theme="institutional"] .circuit-reveal--right svg {
  right: -6%;
  transform: translate(12%, -50%) scaleX(-1);
}

[data-theme="institutional"] .circuit-path {
  stroke: rgba(11, 37, 69, 0.52);
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
}

[data-theme="institutional"] .circuit-path-main {
  stroke-dashoffset: calc(1 - var(--circuit-main, 0));
}

[data-theme="institutional"] .circuit-path-branch-1 {
  stroke-dashoffset: calc(1 - var(--circuit-branch-1, 0));
}

[data-theme="institutional"] .circuit-path-branch-2 {
  stroke-dashoffset: calc(1 - var(--circuit-branch-2, 0));
}

[data-theme="institutional"] .circuit-path-branch-3 {
  stroke-dashoffset: calc(1 - var(--circuit-branch-3, 0));
}

[data-theme="institutional"] .circuit-path-branch-4 {
  stroke-dashoffset: calc(1 - var(--circuit-branch-4, 0));
}

[data-theme="institutional"] .circuit-path-branch-5 {
  stroke-dashoffset: calc(1 - var(--circuit-branch-5, 0));
}

[data-theme="institutional"] .circuit-path-micro {
  stroke-dashoffset: calc(1 - var(--circuit-micro, 0));
}

[data-theme="institutional"] .circuit-node {
  fill: rgba(11, 37, 69, 0.68);
  opacity: calc(var(--circuit-nodes, 0) * 0.65);
}

[data-theme="institutional"] .circuit-node--pulse {
  animation: circuit-node-pulse 4.8s ease-in-out infinite;
  fill: rgba(200, 16, 46, 0.58);
  filter: drop-shadow(0 0 3px rgba(200, 16, 46, 0.25));
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes circuit-node-pulse {
  0%,
  100% {
    transform: scale(0.94);
  }

  50% {
    transform: scale(1.12);
  }
}

@media (max-width: 768px) {
  .circuit-reveal {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-theme="institutional"] .circuit-path {
    stroke-dashoffset: 0;
  }

  [data-theme="institutional"] .circuit-node {
    opacity: 0.65;
  }

  [data-theme="institutional"] .circuit-node--pulse {
    animation: none;
  }
}


/* ===============================================================
   30. DARK THEME REFINEMENT
   Night counterpart of the institutional navy and red palette.
   =============================================================== */

[data-theme="dark"] {
  --color-bg-deepest:    #041225;
  --color-bg-dark:       #061a33;
  --color-bg-mid:        #0b2545;
  --color-bg-elevated:   #102b46;
  --color-bg-card:       rgba(255, 255, 255, 0.055);
  --color-bg-card-hover: rgba(255, 255, 255, 0.085);

  --color-text-primary:   #f8fafc;
  --color-text-secondary: rgba(210, 225, 240, 0.86);
  --color-text-muted:     rgba(165, 185, 205, 0.72);
  --color-text-faint:     rgba(120, 145, 165, 0.55);

  --color-accent:        #c8102e;
  --color-accent-bright: #e11d3f;
  --color-accent-glow:   #ff4d6a;
  --color-accent-signal: #f8fafc;

  --color-border:       rgba(255, 255, 255, 0.12);
  --color-border-hover: rgba(200, 16, 46, 0.42);
  --color-border-card:  rgba(255, 255, 255, 0.08);

  --shadow-glow:        0 0 24px rgba(200, 16, 46, 0.16);
  --shadow-glow-strong: 0 0 40px rgba(200, 16, 46, 0.2);
}

[data-theme="dark"] #hero,
[data-theme="dark"] #problem,
[data-theme="dark"] #solution,
[data-theme="dark"] #ai,
[data-theme="dark"] #advantages,
[data-theme="dark"] #cta,
[data-theme="dark"] #contact {
  position: relative;
  background: linear-gradient(180deg, #0b1f36 0%, #102b46 100%);
}

[data-theme="dark"] #platform,
[data-theme="dark"] #bureaucracy,
[data-theme="dark"] #process,
[data-theme="dark"] #industries,
[data-theme="dark"] #pricing,
[data-theme="dark"] #about {
  background: linear-gradient(180deg, #071c38 0%, #041225 100%);
}

[data-theme="dark"] .hero-title,
[data-theme="dark"] .hero-brand,
[data-theme="dark"] .section-title,
[data-theme="dark"] .card__title,
[data-theme="dark"] .flow-step__title,
[data-theme="dark"] .process-step__title,
[data-theme="dark"] .ai-capability__title,
[data-theme="dark"] .card__pricing-tier,
[data-theme="dark"] .stat-highlight {
  color: #f8fafc;
}

[data-theme="dark"] .hero-brand {
  text-shadow: 0 0 18px rgba(200, 16, 46, 0.18);
}

[data-theme="dark"] .hero-subtitle,
[data-theme="dark"] .section-subtitle,
[data-theme="dark"] .card__body,
[data-theme="dark"] .flow-step__body,
[data-theme="dark"] .process-step__body,
[data-theme="dark"] .ai-capability__body,
[data-theme="dark"] .card__pricing-desc {
  color: var(--color-text-secondary);
}

[data-theme="dark"] .hero-visual img {
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.18),
    0 6px 16px rgba(0, 0, 0, 0.12);
  filter: drop-shadow(0 24px 50px rgba(0, 0, 0, 0.28));
}

[data-theme="dark"] .section-heading__visual img {
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.16),
    0 6px 16px rgba(0, 0, 0, 0.10);
  filter: drop-shadow(0 24px 50px rgba(0, 0, 0, 0.22));
}

[data-theme="dark"] .hero-visual::after,
[data-theme="dark"] .section-heading__visual::after {
  box-shadow:
    inset 0 0 26px rgba(255, 255, 255, 0.10),
    inset 0 0 12px rgba(0, 0, 0, 0.08);
  opacity: 0.56;
}

[data-theme="dark"] .section-label,
[data-theme="dark"] .card__eyebrow,
[data-theme="dark"] .card__icon,
[data-theme="dark"] .card__feature-num,
[data-theme="dark"] .flow-step__num,
[data-theme="dark"] .process-step__index,
[data-theme="dark"] .cmp--yes {
  color: var(--color-accent);
}

[data-theme="dark"] .section-label {
  background: rgba(200, 16, 46, 0.08);
}

[data-theme="dark"] .section-conclusion {
  background: rgba(200, 16, 46, 0.065);
}

[data-theme="dark"] .card,
[data-theme="dark"] .ai-capability {
  background: var(--color-bg-card);
  border-color: var(--color-border-card);
}

[data-theme="dark"] .card:hover,
[data-theme="dark"] .ai-capability:hover {
  background: var(--color-bg-card-hover);
  border-color: var(--color-border-hover);
}

[data-theme="dark"] .btn--primary {
  color: #f8fafc;
  background: var(--color-accent);
  border-color: var(--color-accent);
}

[data-theme="dark"] .btn--primary:hover {
  background: var(--color-accent-bright);
  border-color: var(--color-accent-bright);
}

[data-theme="dark"] .btn--ghost {
  border-color: rgba(200, 16, 46, 0.42);
}

[data-theme="dark"] .btn--ghost:hover,
[data-theme="dark"] .team-carousel__btn:hover {
  color: var(--color-accent-bright);
  background: rgba(200, 16, 46, 0.1);
  border-color: var(--color-border-hover);
}

[data-theme="dark"] .flow-track,
[data-theme="dark"] .ai-strip,
[data-theme="dark"] .card--industry-featured,
[data-theme="dark"] .card--pricing-featured,
[data-theme="dark"] .comparison-table__hl-col {
  background: rgba(200, 16, 46, 0.065);
  border-color: rgba(200, 16, 46, 0.24);
}

[data-theme="dark"] .process-step:hover .process-step__index {
  background: rgba(200, 16, 46, 0.12);
}

[data-theme="dark"] .ai-capability__marker,
[data-theme="dark"] .team-carousel__dot--active {
  background: var(--color-accent);
  box-shadow: 0 0 8px rgba(200, 16, 46, 0.34);
}

[data-theme="dark"] .card--feature::after {
  background: radial-gradient(circle, rgba(200, 16, 46, 0.14) 0%, transparent 70%);
}

[data-theme="dark"] .comparison-table tbody tr:hover {
  background: rgba(200, 16, 46, 0.055);
}

[data-theme="dark"] .team-carousel__dot:hover:not(.team-carousel__dot--active) {
  background: rgba(200, 16, 46, 0.18);
}

[data-theme="dark"] ::selection {
  color: #f8fafc;
  background-color: rgba(200, 16, 46, 0.32);
}

/* Dark circuit reveal: same SVG geometry, white traces and red pulse nodes. */
[data-theme="dark"] .circuit-reveal {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  overflow: hidden;
  pointer-events: none;
}

[data-theme="dark"] #hero > .container,
[data-theme="dark"] #problem > .container,
[data-theme="dark"] #solution > .container,
[data-theme="dark"] #ai > .container,
[data-theme="dark"] #advantages > .container,
[data-theme="dark"] #cta > .container,
[data-theme="dark"] #contact > .container {
  position: relative;
  z-index: 1;
}

[data-theme="dark"] .circuit-reveal svg {
  position: absolute;
  top: 50%;
  width: min(48vw, 620px);
  max-height: 94%;
  height: auto;
  opacity: 0.18;
}

[data-theme="dark"] .circuit-reveal--left svg {
  left: -6%;
  transform: translate(-12%, -50%);
}

[data-theme="dark"] .circuit-reveal--right svg {
  right: -6%;
  transform: translate(12%, -50%) scaleX(-1);
}

[data-theme="dark"] .circuit-path {
  stroke: rgba(255, 255, 255, 0.5);
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
}

[data-theme="dark"] .circuit-path-main {
  stroke-dashoffset: calc(1 - var(--circuit-main, 0));
}

[data-theme="dark"] .circuit-path-branch-1 {
  stroke-dashoffset: calc(1 - var(--circuit-branch-1, 0));
}

[data-theme="dark"] .circuit-path-branch-2 {
  stroke-dashoffset: calc(1 - var(--circuit-branch-2, 0));
}

[data-theme="dark"] .circuit-path-branch-3 {
  stroke-dashoffset: calc(1 - var(--circuit-branch-3, 0));
}

[data-theme="dark"] .circuit-path-branch-4 {
  stroke-dashoffset: calc(1 - var(--circuit-branch-4, 0));
}

[data-theme="dark"] .circuit-path-branch-5 {
  stroke-dashoffset: calc(1 - var(--circuit-branch-5, 0));
}

[data-theme="dark"] .circuit-path-micro {
  stroke-dashoffset: calc(1 - var(--circuit-micro, 0));
}

[data-theme="dark"] .circuit-node {
  fill: rgba(255, 255, 255, 0.56);
  opacity: calc(var(--circuit-nodes, 0) * 0.62);
}

[data-theme="dark"] .circuit-node--pulse {
  animation: circuit-node-pulse 4.8s ease-in-out infinite;
  fill: rgba(200, 16, 46, 0.72);
  filter: drop-shadow(0 0 3px rgba(200, 16, 46, 0.3));
  transform-box: fill-box;
  transform-origin: center;
}

@media (prefers-reduced-motion: reduce) {
  [data-theme="dark"] .circuit-path {
    stroke-dashoffset: 0;
  }

  [data-theme="dark"] .circuit-node {
    opacity: 0.62;
  }

  [data-theme="dark"] .circuit-node--pulse {
    animation: none;
  }
}


/* Dark EU funding page: keep the informational view on a solid navy base. */
[data-theme="dark"] body:has(.eu-hero) {
  background: #041225;
}

[data-theme="dark"] body:has(.eu-hero) #bg-stage {
  background: #041225;
}

[data-theme="dark"] body:has(.eu-hero) .bg-layer {
  display: none;
}

[data-theme="dark"] body:has(.eu-hero) #bg-overlay {
  background: #041225;
  background-image: none;
}


/* ===============================================================
   31. COOKIE CONSENT
================================================================ */

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 80;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.cookie-banner__content {
  width: min(100%, 980px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1rem 1.125rem;
  border: 1px solid rgba(11, 37, 69, 0.12);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.96);
  box-shadow: 0 18px 44px rgba(11, 37, 69, 0.16), 0 6px 18px rgba(11, 37, 69, 0.08);
  color: #0b2545;
  pointer-events: auto;
  backdrop-filter: blur(14px);
}

.cookie-banner__content p {
  margin: 0;
  max-width: 680px;
  color: inherit;
  font-size: 0.9rem;
  line-height: 1.55;
}

.cookie-banner__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.75rem;
}

.cookie-banner__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.7rem 1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.cookie-banner__btn:hover {
  transform: translateY(-1px);
}

.cookie-banner__btn--primary {
  color: #fff;
  background: #c8102e;
  border-color: #c8102e;
  box-shadow: 0 10px 22px rgba(200, 16, 46, 0.22);
}

.cookie-banner__btn--primary:hover {
  background: #e11d3f;
  border-color: #e11d3f;
  box-shadow: 0 12px 26px rgba(200, 16, 46, 0.28);
}

.cookie-banner__btn--secondary {
  color: #0b2545;
  background: rgba(11, 37, 69, 0.04);
  border-color: rgba(11, 37, 69, 0.16);
}

.cookie-banner__btn--secondary:hover {
  color: #c8102e;
  background: rgba(200, 16, 46, 0.08);
  border-color: rgba(200, 16, 46, 0.24);
}

[data-theme="dark"] .cookie-banner__content {
  color: #f8fafc;
  background: rgba(7, 28, 56, 0.96);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.34), 0 8px 20px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .cookie-banner__btn--secondary {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.14);
}

[data-theme="dark"] .cookie-banner__btn--secondary:hover {
  color: #f8fafc;
  background: rgba(200, 16, 46, 0.14);
  border-color: rgba(200, 16, 46, 0.36);
}

@media (max-width: 768px) {
  .cookie-banner {
    right: 0.75rem;
    bottom: 0.75rem;
    left: 0.75rem;
  }

  .cookie-banner__content {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1rem;
    border-radius: 16px;
  }

  .cookie-banner__actions {
    width: 100%;
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 0.6rem;
  }

  .cookie-banner__btn {
    width: 100%;
  }
}
