/* ==========================================================================
   CSS Variables & Reset
   ========================================================================== */
:root {
  --main-color:#00c6d7;
  --bg-color: #0d0d0d;
  --text-color: #f5f5f5;
  --text-secondary: #a0a0a0;
  --accent-color: #ff3333;
  --card-bg: #181818;
  --border-color: #262626;
  
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition-fast: 0.25s ease;
  --transition-smooth: 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-main);
  line-height: 1.5;
  overflow-x: hidden;
  cursor: default;
}

.container {
  width: 90%;
  max-width: 1300px;
  margin: 0 auto;
}

h2 {
  font-size: 3em;
}

/* ==========================================================================
   Custom Cursor (Desktop Only)
   ========================================================================== */
.custom-cursor {
  width: 20px;
  height: 20px;
  background-color: var(--accent-color);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease-out, width 0.2s ease, height 0.2s ease, opacity 0.2s ease;
  mix-blend-mode: difference;
}

.custom-cursor.hovered {
  width: 50px;
  height: 50px;
}

/* ==========================================================================
   Header & Navigation Overlay
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  mix-blend-mode: difference;
}

.logo {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
}

.logo span {
  color: var(--main-color);
}

.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 30px;
  height: 2px;
  background-color: #fff;
  transition: var(--transition-fast);
}

/* Toggle Animation State */
.menu-toggle.active span:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  transform: translateY(-4px) rotate(-45deg);
}

.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
  z-index: 999;
}

.nav-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.nav-links {
  list-style: none;
  text-align: center;
}

.nav-links li {
  margin: 1.5rem 0;
  overflow: hidden;
}

.nav-item {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-color);
  text-decoration: none;
  display: inline-block;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.nav-item:hover {
  color: var(--main-color);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
}
@media (max-width: 768px) {
.hero {
  min-height: 70vh;
}
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 900px;
  margin-bottom: 2rem;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px;
  transition: var(--transition-fast);
}

.btn-primary {
  background-color: var(--text-color);
  color: var(--bg-color);
  border: 2px solid #0db9ca;
}

.btn-primary:hover {
  background-color: var(--main-color);
  color: #fff;
}

/* ==========================================================================
   Hero — layout dwukolumnowy + galeria z ciągłym przewijaniem pionowym
   ========================================================================== */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 992px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; }
}

/* Na mobile/tablecie galeria zdjęciowa jest ukrywana, żeby nie przytłaczać hero na małym ekranie */
.hero-gallery { display: none; }
@media (min-width: 768px) {
  .hero-gallery { display: block; }
}

.banner-gallery-wrapper {
  position: relative;
  height: 680px;
  overflow: hidden;
  border-radius: 20px;
}

.gallery-fade { position: absolute; pointer-events: none; z-index: 2; }
.gallery-fade--top    { top: 0; left: 0; right: 0; height: 15%; background: linear-gradient(to bottom, var(--bg-color), transparent); }
.gallery-fade--bottom { bottom: 0; left: 0; right: 0; height: 15%; background: linear-gradient(to top, var(--bg-color), transparent); }
.gallery-fade--left   { top: 0; bottom: 0; left: 0; width: 8%; background: linear-gradient(to right, var(--bg-color), transparent); }
.gallery-fade--right  { top: 0; bottom: 0; right: 0; width: 8%; background: linear-gradient(to left, var(--bg-color), transparent); }

.banner-gallery-loop {
  display: flex;
   align-items: flex-start;
  gap: 18px;          /* to zostaje — odstęp MIĘDZY kolumnami, nie wpływa na pętlę */
  height: 100%;
}

.banner-gallery {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
}


/* środkowa kolumna przesunięta w dół dla efektu "cegiełek" (3 kolumny: dół / góra+offset / dół) */
.mt-offset { margin-top: 70px; }

.banner-tile {
  display: block;
  aspect-ratio: 3 / 5;
  min-height: 300px;
  border-radius: 16px;
  flex-shrink: 0;
  margin-bottom: 18px;   /* odstęp na KAŻDYM kaflu, łącznie z ostatnim — dzięki temu 2x zestaw = dokładnie 2x wysokość */
  background: var(--tint, var(--card-bg));
  border: 1px solid var(--border-color);
  overflow: hidden;
}
.banner-tile img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.banner-gallery--up   { animation: gallery-up 68s linear infinite; }
.banner-gallery--down { animation: gallery-down 68s linear infinite; }

@keyframes gallery-up   { from { transform: translateY(0); }    to { transform: translateY(-50%); } }
@keyframes gallery-down { from { transform: translateY(-50%); } to { transform: translateY(0); } }

.hero-gallery:hover .banner-gallery { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  .banner-gallery { animation: none !important; }
}

/* ==========================================================================
   Logo Ticker Styles (Infinite Animation)
   ========================================================================== */

.logo-ticker-section {
  padding: 4rem 0;
  width: 100%;
  overflow: hidden;
  background-color: var(--bg-color);
  position: relative;
}

/* Subtelny efekt zanikania na krawędziach ekranu */
.logo-ticker-section::before,
.logo-ticker-section::after {
  content: "";
  position: absolute;
  top: 0;
  width: 100px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.logo-ticker-section::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-color), transparent);
}

.logo-ticker-section::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-color), transparent);
}

.ticker-container {
  display: flex;
  width: 100%;
  overflow: hidden;
  user-select: none;
}

.ticker-track {
  display: flex;
  gap: 0;
  min-width: 100%;
  width: max-content;
  animation: scrollTicker 25s linear infinite;
}

/* Zatrzymaj animację po najechaniu kursorem (tzw. pause on hover) */
.ticker-container:hover .ticker-track {
  animation-play-state: paused;
}

.ticker-list {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 4rem;
  min-width: 100%;
  width: 100%;
  flex-shrink: 0;
}

.ticker-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%) brightness(0.8);
  opacity: 0.6;
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.ticker-logo:hover {
  filter: grayscale(0%) brightness(1);
  opacity: 1;
}

/* Kluczowa animacja CSS dla idealnej pętli */
@keyframes scrollTicker {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Responsywność dla urządzeń mobilnych */
@media (max-width: 768px) {
  .ticker-track {
    gap: 0;
    animation-duration: 18s;
  }

  .ticker-list {
    gap: 2rem;
  }

  .ticker-logo {
    height: 30px;
  }
}



/* ==========================================================================
   Sticky Services Section Styles
   ========================================================================== */
.services-sticky-section {
  padding: 6rem 0;
  background-color: #f8f7f4; /* Jasne tło light:bg-cream */
  color: #0b132a; /* Ciemny odcień text-navy */
  border-radius: 40px;
  margin: 4rem 0;
}

.sticky-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  position: relative;
}

@media (min-width: 1024px) {
  .services-sticky-section {
    border-radius: 80px;
  }
  
  .sticky-layout {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }

  .sticky-col {
    position: sticky;
    top: 20vh;
    height: fit-content;
  }
}

/* Heading Styles */
.sticky-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 600;
  line-height: 1.1;
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
}

.sticky-title .indent-1 {
  padding-left: 1.5ch;
}

.sticky-title .indent-2 {
  padding-left: 0.8ch;
}

.sticky-desc {
  font-size: 1.15rem;
  color: #4a5568;
  max-width: 40ch;
  margin-bottom: 2rem;
}

/* ==========================================================================
   Sticky Column Mask Animations
   ========================================================================== */

/* Maszkaraty i maskowanie linii tekstu */
.sticky-title .mask {
  display: block;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 105%, 0 105%);
}

.sticky-title .line {
  display: block;
  transform: translateY(110%);
  opacity: 0;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

/* Stany początkowe dla pozostałych elementów lewej kolumny */
.sticky-desc {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

/* Kaskadowe opóźnienia (Staggering) przy aktywacji (.visible) */
.visible .mask:nth-child(1) .line { transition-delay: 0.10s; }
.visible .mask:nth-child(2) .line { transition-delay: 0.45s; }
.visible .mask:nth-child(3) .line { transition-delay: 0.90s; }

.visible .sticky-desc { transition-delay: 0.55s; }
.visible { transition-delay: 0.70s; }

/* Stany po aktywacji animacji */
.visible .line {
  transform: translateY(0%);
  opacity: 1;
}

.visible .sticky-desc,
.visible {
  opacity: 1;
  transform: translateY(0);
}



/* Right Column List Styles */
.service-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.service-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.service-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Animated Hover Box for Icons */
.icon-box {
  width: 50px;
  height: 50px;
  background-color: #0b132a;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: background-color 0.25s ease;
}

.icon-box .icon {
  position: absolute;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.icon-box .hover-icon {
  opacity: 0;
  transform: translateY(10px);
}

.service-link:hover .icon-box {
  background-color: #ffffff;
}

.service-link:hover .default-icon {
  opacity: 0;
  transform: translateY(-10px);
}

.service-link:hover .hover-icon {
  opacity: 1;
  transform: translateY(0);
}

.service-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #0b132a;
  transition: color 0.25s ease;
}

.service-title span {
  display: inline-block;
  transition: transform 0.25s ease;
}

.service-link:hover .service-title {
  color: var(--main-color);
}

.service-link:hover .service-title span {
  transform: translate(3px, -3px);
}

.service-text {
  font-size: 1rem;
  color: #4a5568;
  max-width: 50ch;
  line-height: 1.6;
}

/* Animations Trigger Class */
.service-item {
  opacity: 0;
  transform: translateY(60px) skewY(3deg);
  
  /* Czas trwania animacji wydłużony do 1.2s z bardzo płynną krzywą łagodzenia */
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 4.2s cubic-bezier(0.16, 1, 0.3, 1);
              
  will-change: opacity, transform;
}

/* Stan, gdy element staje się widoczny */
.service-item.visible {
  opacity: 1;
  transform: translateY(0) skewY(0deg);
}

/* ==========================================================================
   Portfolio Section
   ========================================================================== */
#portfolio h2 {
    text-align: center;
	padding-bottom: 20px;
}   
.portfolio-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 25px;
width: 90%;
margin: 0 auto;
}

/* --------------------------------
CARD
-------------------------------- */

.portfolio-card {
position: relative;
min-width: 0;
height: 100%;
border-radius: 40px;
background: rgba(255, 255, 255, 0.08);
padding: 1px;
overflow: hidden;

/* hover glow position */
--mouse-x: 50%;
--mouse-y: 50%;
}

.portfolio-card--small {
grid-column: span 1;
grid-row: span 1;
}

.portfolio-card--large {
grid-column: span 2;
grid-row: span 2;
}

/* --------------------------------
HOVER BACKGROUND
-------------------------------- */

.portfolio-card::before {
content: "";
position: absolute;
inset: 0;

background:
radial-gradient(
450px circle at var(--mouse-x) var(--mouse-y),
var(--hover-color),
transparent 65%
);

opacity: 0;
transition: opacity 0.35s ease;
pointer-events: none;
z-index: 0;
}

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

/* --------------------------------
LINK
-------------------------------- */

.portfolio-card__link {
position: relative;
z-index: 1;

display: block;
width: 100%;
height: 100%;

padding: 1px;

color: inherit;
text-decoration: none;
}

/* --------------------------------
INNER
-------------------------------- */

.portfolio-card__inner {
position: relative;
z-index: 2;
display: flex;
flex-direction: column;
justify-content: space-between;
width: 100%;
height: 100%;
min-height: 420px;
padding: 40px;
overflow: hidden;
border: 1px solid rgba(255, 255, 255, 0.10);
border-radius: 39px;
background: #171f20;
transition:
border-color 0.25s ease,
background 0.3s ease;
}

.portfolio-card:hover .portfolio-card__inner {
border-color: rgba(255, 255, 255, 0.20);
}

/* --------------------------------
LARGE CARD
-------------------------------- */

.portfolio-card--large .portfolio-card__inner {
min-height: 865px;
padding: 60px;
}

/* --------------------------------
TEXT
-------------------------------- */

.portfolio-card__content {
position: relative;
z-index: 3;
}

.portfolio-card__top {
display: flex;
align-items: center;
justify-content: space-between;
gap: 20px;
margin-bottom: 10px;
color: #f1eee7;
font-family: inherit;
font-size: 20px;
font-weight: 700;
}

.portfolio-card--large .portfolio-card__top {
font-size: 18px;
}

.portfolio-card__arrow {
flex-shrink: 0;
font-size: 22px;
line-height: 1;
transition:
transform 0.25s ease;
}

.portfolio-card:hover .portfolio-card__arrow {
transform: translate(4px, -4px);
}

.portfolio-card h3 {
max-width: 850px;
margin: 0;
color: #f1eee7;
font-family: inherit;
font-size: clamp(20px, 2vw, 32px);
line-height: 1.05;
font-weight: 600;
letter-spacing: -0.025em;
}

.portfolio-card--small h3 {
font-size: 18px;
line-height: 1.15;
}

/* --------------------------------
IMAGE
-------------------------------- */

.portfolio-card__inner > img {
display: block;
width: calc(100% + 80px);
max-width: none;
height: auto;
margin: 0 -40px -40px;
object-fit: contain;
transition:
transform 0.5s cubic-bezier(.2,.8,.2,1);
}

.portfolio-card:hover .portfolio-card__inner > img {
transform: scale(1.035);
}

/* --------------------------------
VIDEO
-------------------------------- */

.portfolio-card__media {
position: relative;
width: 100%;
margin-top: 40px;
overflow: hidden;
border-radius: 24px;
background: #0e1516;
box-shadow:
0 20px 50px rgba(0, 0, 0, 0.20);

aspect-ratio: 16 / 9;
}

.portfolio-card__media video {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
transition:
transform 0.6s cubic-bezier(.2,.8,.2,1);
}

.portfolio-card:hover .portfolio-card__media video {
transform: scale(1.025);
}

/* --------------------------------
LIGHT CARD
-------------------------------- */

.portfolio-card--light .portfolio-card__inner {
background: #fff;
border-color: rgba(23, 31, 32, 0.10);
}

.portfolio-card--light h3,
.portfolio-card--light .portfolio-card__top {
color: #171f20;
}

.portfolio-card--light .portfolio-card__arrow {
color: #171f20;
}

/* --------------------------------
MASONRY-LIKE GRID
-------------------------------- */

/*
Układ dokładnie jak na stronie:

[ small ][ large ]
[ large ][ large ]
[ small ][ small ][ small ]

CSS Grid automatycznie układa elementy
dzięki spanom 1x1 oraz 2x2.
*/

.portfolio-card--large {
min-height: 0;
}

/* --------------------------------
TABLET / MOBILE
-------------------------------- */

@media (max-width: 767px) {

.portfolio-grid {
grid-template-columns: 1fr;
gap: 16px;
width: 99%;
}

.portfolio-card--small,
.portfolio-card--large {
grid-column: span 1;
grid-row: span 1;
}

.portfolio-card__inner,
.portfolio-card--large .portfolio-card__inner {
min-height: 10px;
padding: 30px 30px 30px;
}

.portfolio-card h3,
.portfolio-card--small h3 {
font-size: 17px;
line-height: 1.15;
}

.portfolio-card__inner > img {
width: calc(100% + 48px);
margin: 0 -24px -24px;
}

.portfolio-card__media {
margin-top: 25px;
border-radius: 20px;
}
}

/* --------------------------------
REDUCE MOTION
-------------------------------- */

@media (prefers-reduced-motion: reduce) {
.portfolio-card *,
.portfolio-card::before {
transition: none !important;
}
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq {
  padding: 4rem 0 5rem 0;
}

.accordion-item {
  border-bottom: 1px solid var(--border-color);
}

.accordion-header {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-color);
  padding: 2rem 0;
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.accordion-header .icon {
  font-size: 1.8rem;
  transition: transform var(--transition-fast);
}

.accordion-item.active .accordion-header .icon {
  transform: rotate(45deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-smooth);
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.accordion-content p {
  padding-bottom: 2rem;
  max-width: 1100px;
}

/* ==========================================================================
   Footer Section
   ========================================================================== */
.footer {
  padding: 5rem 0 4rem 0;
  background-color: #000;
  border-top: 1px solid var(--border-color);
}

.footer-content h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 1.5rem;
}

.footer-contact {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--text-secondary);
  text-decoration: none;
  display: inline-block;
  transition: color var(--transition-fast);
}

.footer-contact:last-of-type {
  margin-bottom: 5rem;
}

.footer-contact:hover {
  color: var(--accent-color);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}