:root {
  --font-family: 'Inter', sans-serif;
  --heading-font: 'Space Grotesk', 'Inter', sans-serif;
  --mono-font: 'JetBrains Mono', monospace;

  /* Neutral grayscale backbone */
  --gray-50: #f7f7f8;
  --gray-100: #eeeef0;
  --gray-200: #dfe0e3;
  --gray-300: #c3c5ca;
  --gray-400: #9698a1;
  --gray-500: #71737c;
  --gray-600: #52545c;
  --gray-700: #3a3c42;
  --gray-800: #26272b;
  --gray-900: #1b1c20;

  /* Accent palette */
  --color-purple: #5c3fa8;
  --color-green: #1f8f5e;
  --color-blue: #2f6690;

  --color-dark-bg: #1d2024;
  --color-dark-bg-alt: #24272c;
  --color-light-bg: var(--gray-100);
  --color-white: var(--gray-50);
  --color-text-dark: var(--gray-800);
  --color-text-light: var(--gray-300);
  --color-grey-text: var(--gray-500);
  --border-color: var(--gray-200);
  --nav-height: 84px;
}

* { box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  font-family: var(--font-family);
  margin: 0;
  padding: 0;
  background-color: var(--color-white);
  color: var(--color-text-dark);
  overflow-x: hidden;
}

.main-content {
  min-width: 0;
}

/* ---------- TOP NAVIGATION ---------- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 60px;
  background-color: rgba(247,247,248,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  transition: box-shadow 0.3s ease, padding 0.3s ease;
}

.topnav.scrolled {
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  padding: 14px 60px;
}

.topnav-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-logo {
  height: 52px;
  display: block;
  mix-blend-mode: multiply;
}

.topnav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 38px;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-family: var(--mono-font);
  font-size: 0.82rem;
  text-decoration: none;
  color: var(--color-text-dark);
  letter-spacing: 0.5px;
  position: relative;
  padding-bottom: 5px;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-purple);
  transition: width 0.3s ease;
}

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

.nav-link:hover,
.nav-link.active {
  color: var(--color-purple);
}

.nav-link.nav-cta {
  border: 1px solid var(--color-green);
  color: var(--color-green);
  padding: 10px 22px;
  border-radius: 2px;
}

.nav-link.nav-cta::after { display: none; }

.nav-link.nav-cta:hover {
  background-color: var(--color-green);
  color: var(--color-dark-bg);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 210;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--color-text-dark);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- SCROLL PROGRESS CIRCLE ---------- */
.scroll-progress {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background-color: var(--color-white);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  cursor: pointer;
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s ease;
}

.scroll-progress.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-progress svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-bg {
  fill: none;
  stroke: var(--gray-200);
  stroke-width: 4;
}

.progress-bar {
  fill: none;
  stroke: var(--color-purple);
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.1s linear;
}

.progress-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono-font);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--color-text-dark);
}

/* ---------- SCROLL REVEAL ----------
   Content is visible by default (no JS required). Only once script.js
   confirms it's running correctly does it add .js-reveal-ready to <html>,
   which switches the page into "fade up on scroll" mode. This means a
   visitor whose browser blocks/fails the script for any reason still sees
   the full page immediately instead of a blank one. */
.reveal {
  opacity: 1;
  transform: none;
}

html.js-reveal-ready .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.hero-section {
  position: relative;
  padding: 120px 60px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: end;
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.hero-shape {
  position: absolute;
  top: -12%;
  right: -8%;
  width: 46vw;
  height: 46vw;
  max-width: 640px;
  max-height: 640px;
  background: linear-gradient(135deg, var(--color-purple), var(--color-blue));
  clip-path: polygon(100% 0, 100% 100%, 8% 100%);
  opacity: 0.07;
  z-index: 0;
  pointer-events: none;
}

.hero-content, .hero-description {
  position: relative;
  z-index: 1;
}

/* ---------- DIAGONAL SECTION DIVIDERS ---------- */
.diagonal-divider {
  width: 100%;
  height: clamp(36px, 6vw, 90px);
  display: block;
  position: relative;
}

.diagonal-divider svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- TRIANGLE ACCENT ICON ---------- */
.tri-icon {
  display: block;
  width: 22px;
  height: 20px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.tri-icon.large { width: 34px; height: 30px; }
.tri-icon.tri-purple { background: var(--color-purple); }
.tri-icon.tri-blue { background: var(--color-blue); }
.tri-icon.tri-green { background: var(--color-green); }
.tri-icon.tri-gray { background: var(--gray-500); }

/* ---------- "CO ROBIMY" COMPETENCY SECTION ---------- */
.competency-section {
  background-color: var(--color-light-bg);
  padding: 90px 60px 100px;
}

.section-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.section-intro .section-label {
  display: flex;
  justify-content: center;
}

.section-intro .dark-section-title {
  color: var(--color-text-dark);
}

.competency-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  max-width: 1300px;
  margin: 0 auto;
}

.competency-card {
  background-color: var(--color-white);
  border-radius: 6px;
  padding: 40px 32px;
  box-shadow: 0 10px 30px rgba(20, 20, 30, 0.05);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.competency-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(20, 20, 30, 0.1);
}

.competency-card .tri-icon {
  margin-bottom: 22px;
}

/* ---------- KEY FACTS BAND ---------- */
.key-facts {
  background-color: var(--color-dark-bg);
  color: var(--color-white);
  padding: 90px 0;
}

.key-facts-header {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  padding: 0 24px;
}

.key-facts .section-label {
  display: flex;
  justify-content: center;
}

.facts-strip {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  width: 100%;
  margin-top: 55px;
  padding: 40px 5vw 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 30px;
}

.fact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 140px;
}

.fact-item .tri-icon {
  margin-bottom: 18px;
}

.fact-number {
  font-family: var(--heading-font);
  font-size: clamp(1.5rem, 2.2vw, 2.2rem);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.fact-label {
  font-family: var(--mono-font);
  font-size: 0.78rem;
  color: var(--gray-400);
  margin-top: 8px;
  letter-spacing: 0.5px;
}

.hero-label {
  font-family: var(--mono-font);
  color: var(--color-purple);
  font-size: 0.8rem;
  display: block;
  margin-bottom: 30px;
  letter-spacing: 1px;
}

.hero-title {
  font-family: var(--heading-font);
  font-size: 5.5rem;
  line-height: 0.95;
  font-weight: 700;
  color: var(--color-text-dark);
  margin: 0;
  letter-spacing: -2px;
}

.hero-description p {
  font-size: 1.3rem;
  color: var(--color-grey-text);
  line-height: 1.5;
  max-width: 550px;
  margin: 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border-color);
}

.service-box {
  background-color: var(--color-white);
  padding: 50px 40px;
  border-right: 1px solid var(--border-color);
  border-top: 3px solid transparent;
  transition: all 0.4s ease;
}

.service-box:hover {
  background-color: var(--gray-100);
  transform: translateY(-4px);
}

.service-box:nth-child(4n+1):hover { border-top-color: var(--color-purple); }
.service-box:nth-child(4n+2):hover { border-top-color: var(--color-blue); }
.service-box:nth-child(4n+3):hover { border-top-color: var(--color-green); }
.service-box:nth-child(4n+4):hover { border-top-color: var(--gray-500); }

.service-box:last-child {
  border-right: none;
}

.service-box:nth-child(4n+1) .service-number { color: var(--color-purple); }
.service-box:nth-child(4n+2) .service-number { color: var(--color-blue); }
.service-box:nth-child(4n+3) .service-number { color: var(--color-green); }
.service-box:nth-child(4n+4) .service-number { color: var(--gray-500); }

.service-number {
  font-weight: 600;
  margin-bottom: 25px;
  display: block;
  font-family: var(--mono-font);
}

.service-title {
  font-family: var(--heading-font);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--color-text-dark);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.service-description {
  font-size: 0.95rem;
  color: var(--color-grey-text);
  line-height: 1.6;
}

.dark-section {
  background: linear-gradient(120deg, var(--color-dark-bg) 0%, #24273a 55%, #23262c 100%);
  color: var(--color-white);
  padding: 100px 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dark-section-left {
  flex: 1;
}

.dark-section-right {
  flex: 1;
  padding-left: 80px;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--color-text-light);
}

.section-label {
  color: var(--color-green);
  font-weight: 400;
  margin-bottom: 20px;
  display: block;
  font-size: 0.9rem;
  font-family: var(--mono-font);
}

.dark-section-title {
  font-family: var(--heading-font);
  font-size: 3.5rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -1px;
}

.light-section {
  position: relative;
  background-color: var(--color-light-bg);
  overflow: hidden;
  min-height: 460px;
  display: flex;
  align-items: center;
}

.dlaczego-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.dlaczego-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
}

.dlaczego-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    var(--color-light-bg) 0%,
    var(--color-light-bg) 40%,
    rgba(238, 238, 240, 0.6) 58%,
    rgba(238, 238, 240, 0) 80%
  );
}

.light-section-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  padding: 70px 60px;
}

.light-section-content {
  flex: 1;
  max-width: 680px;
}

.company-info {
  font-family: var(--mono-font);
  font-size: 0.85rem;
  color: var(--gray-300);
  line-height: 1.6;
  border-right: 2px solid var(--color-purple);
  padding-right: 20px;
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
}

.light-section-title {
  font-family: var(--heading-font);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 28px;
}

.light-section-title .highlight-purple {
  color: var(--color-purple);
}

.light-section-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 32px;
}

.light-section-stat {
  font-family: var(--mono-font);
  font-size: 0.95rem;
  color: var(--color-grey-text);
  margin: 0;
}

/* Keep each "//" line on a single row on desktop/tablet, where there's
   room — only let it wrap on narrow phones where it genuinely can't fit. */
@media (min-width: 700px) {
  .light-section-stat { white-space: nowrap; }
}

.light-section-stat strong {
  color: var(--color-purple);
  font-weight: 700;
}

.light-section-text {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--color-text-dark);
  max-width: 900px;
  margin-bottom: 20px;
}

.buttons-wrapper {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.contact-button {
  display: inline-block;
  padding: 15px 35px;
  border: 1px solid var(--color-green);
  color: var(--color-green);
  text-decoration: none;
  font-family: var(--mono-font);
  font-size: 0.9rem;
  transition: background-color 0.4s, color 0.4s;
  text-align: center;
  background: none;
  cursor: pointer;
}

.contact-button:hover {
  background-color: var(--color-green);
  color: var(--color-dark-bg);
}

.tv-button {
  border-color: var(--color-blue);
  color: var(--color-blue);
}

.tv-button:hover {
  background-color: var(--color-blue);
  color: var(--color-white);
}

.section-label.label-blue { color: var(--color-blue); }

/* ---------- CONTACT FORM SECTION ---------- */
.contact-section {
  background: linear-gradient(135deg, #4a3384 0%, #3a4f7a 55%, #2f6690 100%);
  color: var(--color-white);
  padding: 110px 80px;
}

.contact-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.contact-inner .dark-section-title {
  margin-bottom: 20px;
}

.contact-intro {
  color: var(--color-text-light);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 50px;
}

.contact-form {
  text-align: left;
}

.form-row {
  display: flex;
  gap: 24px;
}

.form-group {
  flex: 1;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-family: var(--mono-font);
  font-size: 0.75rem;
  letter-spacing: 1px;
  color: var(--gray-400);
  margin-bottom: 10px;
  text-transform: uppercase;
}

.form-group input,
.form-group textarea {
  background-color: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--color-white);
  padding: 14px 16px;
  font-family: var(--font-family);
  font-size: 0.95rem;
  border-radius: 2px;
  transition: border-color 0.3s ease;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-green);
}

.captcha-group {
  max-width: 280px;
}

.captcha-group label {
  text-transform: none;
  font-size: 0.8rem;
  letter-spacing: 0;
}

.captcha-group label span {
  color: var(--color-white);
  font-weight: 700;
}

.submit-btn {
  width: 100%;
}

.form-status {
  margin-top: 18px;
  font-family: var(--mono-font);
  font-size: 0.85rem;
  min-height: 1.2em;
}

.form-status.success { color: var(--color-green); }
.form-status.error { color: #e05555; }

.contact-section .form-group label { color: rgba(255, 255, 255, 0.65); }
.contact-section .form-status.success { color: #8be6b8; }
.contact-section .form-status.error { color: #ffb3ab; }
.contact-section .captcha-group label span { color: var(--color-white); }

/* The muted brand green is hard to read against this section's dark
   purple/blue gradient, so brighten it here specifically (submit button). */
.contact-section .contact-button {
  border-color: #4ce2a0;
  color: #4ce2a0;
}
.contact-section .contact-button:hover {
  background-color: #4ce2a0;
  color: var(--color-dark-bg);
}

.site-footer {
  padding: 40px 80px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: center;
  font-family: var(--mono-font);
  font-size: 0.75rem;
  color: var(--gray-400);
  letter-spacing: 1px;
  text-align: center;
}

#policy-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
  padding: 20px;
}

.modal-box {
  background: var(--color-white);
  padding: 40px;
  max-width: 550px;
  width: 90%;
  border-top: 4px solid var(--color-purple);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-box h2 {
  margin-top: 0;
  font-family: var(--mono-font);
  font-size: 1.1rem;
  color: var(--color-purple);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.modal-box p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text-dark);
  margin-bottom: 15px;
}

.modal-btn {
  margin-top: 20px;
  display: block;
  width: 100%;
  padding: 15px;
  background: var(--color-dark-bg);
  color: var(--color-white);
  text-align: center;
  text-decoration: none;
  font-family: var(--mono-font);
  font-size: 0.8rem;
  cursor: pointer;
  border: none;
  transition: background 0.3s;
}

.modal-btn:hover {
  background: var(--color-purple);
}

@media (max-width: 1200px) {
  .hero-section, .dark-section {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-title { font-size: 4rem; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .service-box:nth-child(2) { border-right: none; }
  .light-section-inner { flex-direction: column; align-items: flex-start; gap: 30px; }
  .company-info { text-align: left; border-right: none; border-left: 2px solid var(--color-purple); padding-left: 20px; padding-right: 0; white-space: normal; }
  .dark-section { flex-direction: column; align-items: flex-start; }
  .dark-section-right { padding-left: 0; margin-top: 30px; }
  .competency-grid { grid-template-columns: repeat(2, 1fr); }
  .facts-strip { gap: 50px; }
  .hero-shape { width: 60vw; height: 60vw; opacity: 0.06; }
}

@media (max-width: 900px) {
  .topnav { padding: 16px 24px; }
  .topnav.scrolled { padding: 12px 24px; }
  .nav-toggle { display: flex; }
  .topnav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    background-color: var(--color-white);
    padding: 10px 24px 30px;
    gap: 22px;
    display: none;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 16px 30px rgba(0,0,0,0.08);
  }
  .topnav-links.active { display: flex; }
  .nav-link.nav-cta { align-self: flex-start; }
}

@media (max-width: 768px) {
  .site-header, .hero-section, .dark-section, .services-grid, .contact-section, .competency-section, .key-facts {
    padding: 50px 24px;
  }
  .services-grid { grid-template-columns: 1fr; }
  .service-box { border-right: none; border-bottom: 1px solid var(--border-color); }
  .hero-title { font-size: 2.7rem; letter-spacing: -1px; }
  .hero-description p { font-size: 1.05rem; }
  .dark-section-title { font-size: 2.1rem; }
  .buttons-wrapper { flex-direction: column; align-items: stretch; }
  .site-footer { padding: 30px 30px 90px; }
  .form-row { flex-direction: column; gap: 0; }
  .light-section-title { font-size: 1.9rem; }
  .light-section { min-height: auto; }
  .light-section-inner { padding: 50px 24px; }
  .dlaczego-scrim { background: var(--color-light-bg); }
  .company-info { color: var(--color-grey-text); }
  .scroll-progress { width: 48px; height: 48px; bottom: 18px; right: 18px; }
  .progress-text { font-size: 0.6rem; }
  .competency-grid { grid-template-columns: 1fr; }
  .facts-strip { gap: 40px; padding-left: 24px; padding-right: 24px; }
  .fact-number { font-size: 2rem; }
  .hero-shape { display: none; }
}
