/* ===== variables ===== */
:root {
  /* Brand colors */
  --color-violet: #5b21b6;
  --color-blue: #2563eb;
  --gradient: linear-gradient(135deg, #5b21b6 0%, #2563eb 100%);
  --gradient-text: linear-gradient(135deg, #a78bfa 0%, #60a5fa 100%);

  /* Backgrounds */
  --bg-primary: #0a0a14;
  --bg-secondary: #0f0f1e;
  --bg-card: #12122a;
  --bg-footer: #06060f;

  /* Text */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #475569;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-gradient-start: rgba(91, 33, 182, 0.6);
  --border-gradient-end: rgba(37, 99, 235, 0.6);

  /* Spacing */
  --section-padding: 100px 0;
  --container-max: 1200px;
  --container-padding: 0 24px;

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-h1: clamp(2.2rem, 5vw, 3.5rem);
  --font-size-h2: clamp(1.8rem, 3vw, 2.5rem);
  --font-size-h3: clamp(1.2rem, 2vw, 1.5rem);
  --font-size-body: 1rem;
  --line-height-body: 1.7;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(91, 33, 182, 0.3);
}

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

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

img, svg {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* ===== base ===== */
body {
  font-family: var(--font-primary);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--container-padding);
}

.section {
  padding: var(--section-padding);
}

.section--alt {
  background-color: var(--bg-secondary);
}

h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition-normal);
  text-decoration: none;
}

.btn--primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 20px rgba(91, 33, 182, 0.4);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(91, 33, 182, 0.5);
}

.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
}

/* Focus visible for keyboard navigation */
:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 3px;
}

.btn:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 3px;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(91, 33, 182, 0.15);
  border: 1px solid rgba(91, 33, 182, 0.3);
  color: #a78bfa;
}

/* Scroll animations — initial state */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ===== navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: background var(--transition-normal), backdrop-filter var(--transition-normal), box-shadow var(--transition-normal);
}

.navbar.scrolled {
  background: rgba(10, 10, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border-subtle);
}

.navbar__inner {
  display: flex;
  align-items: center;
  gap: 32px;
}

.navbar__logo img {
  height: 36px;
  width: auto;
}

.navbar__menu {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.navbar__link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 6px;
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.navbar__link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.navbar__chevron {
  transition: transform var(--transition-fast);
}

.navbar__item--dropdown {
  position: relative;
}

.navbar__item--dropdown:hover .navbar__chevron,
.navbar__item--dropdown:focus-within .navbar__chevron,
.navbar__item--dropdown.open .navbar__chevron {
  transform: rotate(180deg);
}

.navbar__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  box-shadow: var(--shadow-card);
}

.navbar__item--dropdown:hover .navbar__dropdown,
.navbar__item--dropdown:focus-within .navbar__dropdown,
.navbar__item--dropdown.open .navbar__dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.navbar__dropdown-item {
  display: block;
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.navbar__dropdown-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.navbar__cta {
  margin-left: 8px;
  white-space: nowrap;
  padding: 10px 20px;
  font-size: 0.9rem;
}

/* Mobile CTA in menu */
.navbar__menu-cta {
  display: none;
}

@media (max-width: 768px) {
  .navbar__menu-cta {
    display: inline-flex;
    margin-top: 16px;
  }
}

/* Hamburger */
.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

.navbar__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition-fast);
}

.navbar__hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.navbar__hamburger.open span:nth-child(2) {
  opacity: 0;
}
.navbar__hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile */
@media (max-width: 768px) {
  .navbar__hamburger {
    display: flex;
  }

  .navbar__cta {
    display: none;
  }

  .navbar__menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 80px 24px 24px;
    z-index: 99;
  }

  .navbar__menu.open {
    display: flex;
  }

  .navbar__link {
    font-size: 1.2rem;
    padding: 12px 20px;
  }

  .navbar__dropdown {
    position: static;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    background: transparent;
    border: none;
    display: none;
  }

  .navbar__item--dropdown.open .navbar__dropdown {
    display: block;
  }
}

/* ===== hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 50%, rgba(91, 33, 182, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 30% 80%, rgba(37, 99, 235, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  min-height: calc(100vh - 80px);
  padding-top: 40px;
  padding-bottom: 40px;
}

.hero__badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(91, 33, 182, 0.2);
  border: 1px solid rgba(91, 33, 182, 0.4);
  color: #a78bfa;
  margin-bottom: 24px;
}

.hero__title {
  margin-bottom: 24px;
  color: var(--text-primary);
}

.hero__desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 520px;
}

.hero__ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Visual side */
.hero__visual {
  position: relative;
  height: 480px;
}

.hero__blob {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--gradient);
  filter: blur(80px);
  opacity: 0.25;
  animation: blob-pulse 6s ease-in-out infinite;
  will-change: transform, opacity;
}

@keyframes blob-pulse {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.25; }
  33% { transform: scale(1.1) rotate(5deg); opacity: 0.35; }
  66% { transform: scale(0.92) rotate(-3deg); opacity: 0.2; }
}

/* Inner glowing orb */
.hero__visual::after {
  content: '';
  position: absolute;
  width: 60%;
  height: 60%;
  top: 20%;
  left: 20%;
  background: var(--gradient);
  border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%;
  opacity: 0.12;
  animation: morph 8s ease-in-out infinite;
  filter: blur(20px);
}

@keyframes morph {
  0%, 100% { border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%; }
  33% { border-radius: 60% 40% 40% 60% / 60% 60% 40% 40%; }
  66% { border-radius: 50% 50% 30% 70% / 50% 70% 30% 50%; }
}

/* Floating tags */
.hero__tags {
  position: absolute;
  inset: 0;
}

.hero__tag {
  position: absolute;
  left: var(--x);
  top: var(--y);
  padding: 8px 16px;
  background: rgba(15, 15, 30, 0.8);
  border: 1px solid rgba(91, 33, 182, 0.4);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #c4b5fd;
  backdrop-filter: blur(8px);
  white-space: nowrap;
  animation: float 4s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  will-change: transform;
}

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

/* Mobile hero */
@media (max-width: 768px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
    padding-top: 60px;
  }

  .hero__desc {
    max-width: 100%;
  }

  .hero__ctas {
    justify-content: center;
  }

  .hero__visual {
    height: 280px;
  }

  .hero__badge {
    margin-left: auto;
    margin-right: auto;
    display: block;
    width: fit-content;
  }
}

/* ===== sections ===== */
/* ===================== SECTION HEADER ===================== */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header__sub {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-top: 12px;
}

/* ===================== VALUE PROP ===================== */
.value-prop {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.value-prop__title {
  margin-bottom: 16px;
}

.value-prop__subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 48px;
}

.value-prop__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.value-prop__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 40px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.value-prop__icon {
  font-size: 1.1rem;
}

/* ===================== SERVICES ===================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  overflow: hidden;
  text-decoration: none;
  color: var(--text-primary);
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: var(--gradient);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

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

.service-card--featured {
  background: linear-gradient(135deg, rgba(91, 33, 182, 0.15), rgba(37, 99, 235, 0.1));
  border-color: rgba(91, 33, 182, 0.3);
}

.service-card--featured::before {
  opacity: 0.6;
}

.service-card__badge {
  display: inline-block;
  padding: 3px 10px;
  background: var(--gradient);
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: white;
  width: fit-content;
}

.service-card__icon {
  font-size: 2rem;
}

.service-card h3 {
  font-size: 1.2rem;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  flex: 1;
}

.service-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-card__arrow {
  font-size: 1.2rem;
  color: #a78bfa;
  transition: transform var(--transition-fast);
}

.service-card:hover .service-card__arrow {
  transform: translateX(4px);
}

@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* ===================== WHY WEBFINITY ===================== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.why-card {
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  transition: border-color var(--transition-normal);
}

.why-card:hover {
  border-color: rgba(91, 33, 182, 0.4);
}

.why-card__number {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1;
}

.why-card h3 {
  font-size: 1rem;
  margin-bottom: 10px;
}

.why-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

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

@media (max-width: 640px) {
  .why-grid {
    grid-template-columns: 1fr;
  }
}

/* ===================== TIMELINE ===================== */
.timeline {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  position: relative;
}

.timeline__item {
  text-align: center;
  padding: 0 16px;
  position: relative;
}

.timeline__number {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: white;
  margin: 0 auto 16px;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 20px rgba(91, 33, 182, 0.4);
}

.timeline__line {
  position: absolute;
  top: 26px;
  left: calc(50% + 26px);
  width: calc(100% - 52px);
  height: 2px;
  background: linear-gradient(90deg, rgba(91, 33, 182, 0.6), rgba(37, 99, 235, 0.2));
}

.timeline__item:last-child .timeline__line {
  display: none;
}

.timeline__title {
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.timeline__desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .timeline {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .timeline__item {
    display: grid;
    grid-template-columns: 52px 1fr;
    grid-template-rows: auto auto;
    gap: 0 16px;
    text-align: left;
    padding: 0 0 32px;
  }

  .timeline__number {
    grid-row: 1 / 3;
    margin: 0;
  }

  .timeline__line {
    top: 52px;
    left: 25px;
    right: auto;
    width: 2px;
    height: calc(100% - 26px);
    background: linear-gradient(180deg, rgba(91, 33, 182, 0.6), rgba(37, 99, 235, 0.2));
  }

  .timeline__item:last-child {
    padding-bottom: 0;
  }
}

/* ===================== TECH & INTEGRATIONS ===================== */
.tech-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.tech-block__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech-tag {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: color var(--transition-fast), border-color var(--transition-fast);
  cursor: default;
}

.tech-tag:hover {
  color: var(--text-primary);
  border-color: rgba(91, 33, 182, 0.5);
}

@media (max-width: 640px) {
  .tech-grid {
    grid-template-columns: 1fr;
  }
}

/* ===================== REALIZACJE ===================== */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.case-card {
  height: 240px;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  position: relative;
}

.case-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: var(--gradient);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.3;
}

.case-card__inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  border-radius: 16px;
}

.case-card__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.case-card__soon {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
}

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

@media (max-width: 768px) {
  .cases-grid {
    grid-template-columns: 1fr;
  }
}

/* ===================== CTA SECTION ===================== */
.cta-section {
  background: var(--gradient);
  padding: 80px 0;
}

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

.cta-inner h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 16px;
  color: white;
}

.cta-inner p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.05rem;
  margin-bottom: 32px;
}

.btn--white {
  background: white;
  color: #5b21b6;
  font-weight: 700;
}

.btn--white:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

/* ===== footer ===== */
.footer {
  background: var(--bg-footer);
  padding: 64px 0 0;
  border-top: 1px solid var(--border-subtle);
}

.footer__inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 60px;
  padding-bottom: 48px;
}

.footer__brand img {
  margin-bottom: 12px;
}

.footer__tagline {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer__col h4 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer__col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__col a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer__col a:hover {
  color: var(--text-primary);
}

.footer__bottom {
  border-top: 1px solid var(--border-subtle);
  padding: 20px 0;
}

.footer__bottom .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__bottom span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .footer__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .footer__cols {
    grid-template-columns: 1fr 1fr;
  }
}
