/* =====================================================================
   RN DESIGN — STYLE
   Design system: Space Grotesk + Inter / krem · near-black · burgund
   ===================================================================== */

:root {
  --bg: #F5F0E8;
  --fg: #151614;
  --accent: #8E1E17;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  --line: rgba(21, 22, 20, 0.15);  /* subtelne obramowania / linie */
  --surface: #e6e0d6;              /* tła kadrów i obrazów */

  --grid-gap: 28px;
  --section-pad-y: 88px;   /* lekko, ale bez nadmiaru powietrza między sekcjami */
  --section-pad-x: clamp(24px, 5vw, 96px);
  --content-max: 1480px;   /* treść nie rozlewa się po krawędzie na dużych ekranach */
}

/* ===== TRYB CIEMNY ===== */
html[data-theme="dark"] {
  --bg: #141312;
  --fg: #efe9e0;
  --accent: #cf5a4f;               /* jaśniejszy burgund — kontrast na ciemnym */
  --line: rgba(239, 233, 224, 0.16);
  --surface: #26231f;
}
/* sekcje na --fg (w jasnym ciemne) — w dark zostają ciemnymi panelami, nie odwracaj */
html[data-theme="dark"] .bg-dark,
html[data-theme="dark"] .site-footer { background-color: #0e0d0c; color: var(--fg); }
/* CTA burgundowe — tekst i przycisk zawsze jasne dla kontrastu */
html[data-theme="dark"] .bg-accent { color: #F5F0E8; }
html[data-theme="dark"] .bg-accent .btn { background: #F5F0E8; color: var(--accent); }
html[data-theme="dark"] { color-scheme: dark; }

/* Reset & Base */
* { box-sizing: border-box; margin: 0; padding: 0; }
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Custom cursor only when fine pointer + JS active (added by main.js) */
body.has-custom-cursor { cursor: none; }
body.has-custom-cursor a,
body.has-custom-cursor button,
body.has-custom-cursor .mag-target { cursor: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15; /* zapas dla polskich znaków diakrytycznych */
  letter-spacing: -0.02em; /* grounded, zwarte nagłówki */
  margin: 0;
}
/* Duże tytuły — lżejsze i luźniejsze, żeby strona oddychała */
.hero-title, .page-title, .cta-title, .about-name { font-weight: 500; letter-spacing: -0.025em; }

a { text-decoration: none; color: inherit; }
button { background: none; border: none; font: inherit; color: inherit; cursor: pointer; }
ul { list-style: none; }
input, textarea { font: inherit; color: inherit; }

/* Layout Utilities */
.container {
  width: 100%;
  padding: 0 var(--section-pad-x);
  max-width: var(--content-max);
  margin: 0 auto;
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
}

/* tylko pionowy padding — nie kasuj poziomego z .container (bug: hero lepił się do lewej) */
.section { padding-block: var(--section-pad-y); }
.bg-dark { background-color: var(--fg); color: var(--bg); }
.bg-accent { background-color: var(--accent); color: var(--bg); }
.text-accent { color: var(--accent); }

/* ---------------------------------------------------------------------
   Named image slots (placeholder until real asset is dropped in /assets)
   When the <img> loads it covers the label; on error it hides → label shows
   --------------------------------------------------------------------- */
.slot {
  position: relative;
  width: 100%;
  height: 100%;
  background: #ddd;
  overflow: hidden;
}
.slot::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1em;
  color: #888;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-body);
}
.slot img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.slot--dark { background: #222; }
.slot--dark::after { color: #aaa; }
.slot--accent { background: var(--accent); }
.slot--accent::after { color: rgba(255,255,255,0.85); }
.slot--contain img { object-fit: contain; padding: 18%; }

/* ---------------------------------------------------------------------
   Custom Cursor — mix-blend-mode: difference (auto-kontrast na każdym tle)
   Pierścień (ramka) + kropka, oba białe → difference odwraca je względem
   tła, więc zawsze widoczne. Bez „wleczenia": kropka 1:1, pierścień lekko.
   --------------------------------------------------------------------- */
.cursor-dot, .cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 100000; /* ponad lightbox (10000) i page-transition (9999) */
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  will-change: transform;
}
.cursor-dot {
  width: 7px;
  height: 7px;
  background-color: #fff;
  transition: width 0.25s ease, height 0.25s ease, opacity 0.25s ease;
}
.cursor-outline {
  width: 32px;
  height: 32px;
  border: 1.5px solid #fff;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.3s ease, border-width 0.3s ease;
}
/* Hover na elemencie interaktywnym: pierścień rośnie i delikatnie wypełnia,
   kropka znika — czysty „spotlight" inwersji */
.cursor-hover .cursor-outline {
  width: 56px;
  height: 56px;
  background-color: rgba(255, 255, 255, 0.18);
  border-width: 1px;
}
.cursor-hover .cursor-dot { width: 0; height: 0; opacity: 0; }
/* Klik: krótkie ściśnięcie (taktylność) */
.cursor-down .cursor-outline { width: 24px; height: 24px; }
.cursor-down .cursor-dot { width: 10px; height: 10px; }

/* Pasek postępu scrolla */
.scroll-progress {
  position: fixed; top: 0; left: 0; width: 100%; height: 3px;
  background: var(--accent); transform: scaleX(0); transform-origin: 0 50%;
  z-index: 9998; pointer-events: none; will-change: transform;
}

/* Page Transition Layer */
.page-transition {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background-color: var(--accent);
  z-index: 9999;
  transform: translateY(100%); /* schowany domyślnie — overlay, nie treść */
  pointer-events: none;
}

/* App Router Views */
.view { display: none; }
.view.is-active { display: block; }

/* Nav */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  max-width: var(--content-max); margin-inline: auto; /* równo z treścią */
  padding: 24px var(--section-pad-x);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  mix-blend-mode: difference;
  color: #F5F0E8; /* wymuszony jasny tekst dla blendowania */
}
.nav-logo { font-family: var(--font-display); font-size: 24px; letter-spacing: -0.02em; display: flex; align-items: center; }
/* logo w nagłówku: wymuszone na biało → współgra z mix-blend-mode: difference nawigacji (widoczne na każdym tle) */
.nav-logo img { height: 26px; width: auto; display: block; filter: brightness(0) invert(1); }
.nav-links { display: flex; gap: 32px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; }
.nav-links a { position: relative; padding-bottom: 4px; }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.32s cubic-bezier(0.16,1,0.3,1); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-right { display: flex; align-items: center; gap: 28px; }

/* Przełącznik motywu (słońce/księżyc) */
.theme-toggle { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; color: currentColor; }
.theme-toggle svg { width: 20px; height: 20px; display: block; }
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

/* Hamburger */
.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 28px; padding: 4px 0; }
.nav-toggle span { display: block; height: 2px; width: 100%; background: currentColor; transition: transform 0.3s, opacity 0.3s; }
body.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--fg);
  color: var(--bg);
  z-index: 998;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
body.menu-open .mobile-menu { opacity: 1; pointer-events: auto; }
body.menu-open { overflow: hidden; }   /* blokada przewijania tła pod menu mobilnym */

/* Podpowiedź [ESC] tylko na desktopie (na dotyku nie ma klawisza Esc) */
@media (hover: none) { .esc-hint { display: none; } }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: clamp(32px, 8vw, 56px);
}
.mobile-menu a.active { color: var(--accent); }

/* Home - Hero — układ: tekst (lewa) + ruchoma galeria prac (prawa) */
.hero { min-height: 92svh; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(24px, 5vw, 80px); align-items: end; padding-top: 150px; padding-bottom: 56px; position: relative; }
.hero-text { display: flex; flex-direction: column; justify-content: space-between; align-self: stretch; min-width: 0; gap: 32px; }
.hero .hero-title { font-size: clamp(44px, 6.4vw, 112px); }
.hero-kicker { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.55; }
.hero-main { } /* środkowy blok (badge + nazwa + tagline) */
.hero-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.hero-scope { display: flex; align-items: center; flex-wrap: wrap; font-family: var(--font-display); font-weight: 500; font-size: clamp(15px, 1.4vw, 19px); letter-spacing: -0.01em; }
.hero-scope li { display: flex; align-items: center; }
.hero-scope li:not(:last-child)::after { content: "·"; margin: 0 14px; color: var(--accent); }

.scroll-cue { font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase; opacity: 0.5; animation: cueBounce 1.8s ease-in-out infinite; }
@keyframes cueBounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* Ruchoma galeria prac w hero (dwie kolumny w przeciwnych kierunkach) */
.hero-gallery {
  align-self: end; height: min(80vh, 800px); display: grid; grid-template-columns: 1fr 1fr; gap: 16px; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 8%, #000 92%, transparent);
}
.hero-col { overflow: hidden; }
.hero-col-inner { display: flex; flex-direction: column; gap: 16px; will-change: transform; animation: vscroll 38s linear infinite; }
.hero-col--b { margin-top: -56px; }
.hero-col--b .hero-col-inner { animation-duration: 48s; animation-direction: reverse; }
.hero-gallery:hover .hero-col-inner { animation-play-state: paused; }
@keyframes vscroll { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.hero-shot { display: block; flex: 0 0 auto; aspect-ratio: 3/4; overflow: hidden; background: var(--surface); }
.hero-shot .slot img { transition: transform 0.7s cubic-bezier(0.16,1,0.3,1); }
.hero-shot:hover .slot img { transform: scale(1.06); }

/* Ticker — ruchomy pasek haseł */
.ticker { overflow: hidden; white-space: nowrap; padding: 14px 0; border-top: 1px solid var(--accent); border-bottom: 1px solid var(--accent); }
.ticker-track { display: inline-flex; will-change: transform; animation: marquee 24s linear infinite; }
.ticker-track span { font-family: var(--font-display); font-size: clamp(18px, 2.4vw, 30px); font-weight: 500; letter-spacing: -0.01em; padding-right: 0.3em; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  align-self: flex-start;   /* nie rozciągaj na całą szerokość w hero (flex-kolumna) */
  width: fit-content; max-width: max-content;
  border: 1px solid currentColor; padding: 7px 16px 7px 14px; border-radius: 99px;
  font-size: 13px; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 24px;
  opacity: 0.9;
}
/* Pulsująca kropka statusu (zamiast glifu ●) */
.status-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto;
  background: #3FAE5A;
  box-shadow: 0 0 0 0 rgba(63, 174, 90, 0.5);
  animation: statusPulse 2.4s ease-out infinite;
}
@keyframes statusPulse {
  0%   { box-shadow: 0 0 0 0 rgba(63, 174, 90, 0.5); }
  70%  { box-shadow: 0 0 0 6px rgba(63, 174, 90, 0); }
  100% { box-shadow: 0 0 0 0 rgba(63, 174, 90, 0); }
}
.hero-title { font-size: clamp(60px, 9.5vw, 150px); margin-bottom: 24px; overflow: hidden; padding-bottom: 12px; }
.hero-content { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-top: 28px; }
.hero-tagline { max-width: 480px; font-size: 20px; font-weight: 300; }
.hero-img-wrap { width: 100%; height: 46vh; overflow: hidden; position: relative; }
.hero-img-wrap .slot img { object-position: center 26%; } /* twarz w kadrze */

/* Selected Projects */
.projects-header { margin-bottom: 24px; grid-column: 1 / -1; }
.projects-header h2 { font-size: clamp(40px, 6vw, 80px); max-width: 800px; }

.project-card { position: relative; display: block; margin-bottom: 72px; }
.project-card:nth-child(even) { grid-column: 7 / 13; margin-top: 64px; }
.project-card:nth-child(odd) { grid-column: 1 / 7; }
.project-img { width: 100%; aspect-ratio: 4/5; overflow: hidden; margin-bottom: 24px; background: #222; position: relative; }
/* warstwa parallax jest większa od ramki, żeby ruch nie odsłaniał tła */
.project-img .slot.px-parallax,
.hero-img-wrap .slot.px-parallax { position: absolute; top: -12%; left: 0; width: 100%; height: 124%; }
.project-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.project-title { font-family: var(--font-display); font-size: 32px; }
.project-category { font-size: 14px; opacity: 0.6; text-transform: uppercase; }

/* Hover kart projektów — zoom zdjęcia + przesuwająca się strzałka */
.project-card .project-img .slot img,
.port-card .port-img .slot img { transition: transform 0.6s cubic-bezier(0.16,1,0.3,1); }
.project-card:hover .project-img .slot img,
.port-card:hover .port-img .slot img { transform: scale(1.05); }
.card-cta { display: inline-flex; align-items: center; gap: 8px; transition: color 0.3s ease; white-space: nowrap; }
.card-cta .arrow { display: inline-block; transition: transform 0.3s ease; }
.project-card:hover .card-cta, .port-card:hover .card-cta { color: var(--accent); }
.project-card:hover .card-cta .arrow, .port-card:hover .card-cta .arrow { transform: translateX(5px); }
/* numeracja edytorska projektów */
.proj-num { position: absolute; top: 16px; left: 16px; z-index: 4; font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: 0.06em; color: #fff; background: rgba(21,22,20,0.5); padding: 4px 11px; border-radius: 99px; }

/* Logofolio */
.logofolio-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--fg); border: 1px solid var(--fg); }
/* komórki w proporcji kafelków (3:2) → znak wypełnia ramkę w całości, bez kadrowania */
.logofolio-item { position: relative; background: #fff; aspect-ratio: 2300 / 1472; display: flex; align-items: center; justify-content: center; transition: transform 0.45s cubic-bezier(0.16,1,0.3,1); overflow: hidden; }
.logofolio-item .slot { background: #fff; }
.logofolio-item .slot img { object-fit: cover; transition: transform 0.6s cubic-bezier(0.16,1,0.3,1), filter 0.4s ease; }
.logofolio-item .slot::after { color: #b8b0a3; font-size: 12px; }
/* urozmaicenie: na hover znak lekko się przybliża, nazwa marki wjeżdża z dołu */
.logofolio-item:hover { z-index: 2; }
.logofolio-item:hover .slot img { transform: scale(1.06); }
/* na hover: cały kafelek przyciemnia się, a nazwa marki pojawia się na środku — wyraźnie */
.logo-name {
  position: absolute; inset: 0; z-index: 3; /* nad zdjęciem (.slot img ma z-index:1) */
  display: flex; align-items: center; justify-content: center;
  padding: 12px; text-align: center;
  font-family: var(--font-display); font-weight: 500; font-size: 15px; letter-spacing: 0.02em; color: #fff;
  background: rgba(21,22,20,0.82);
  opacity: 0; transition: opacity 0.3s ease;
  pointer-events: none;
}
.logofolio-item:hover .logo-name { opacity: 1; }

/* Services */
.services-grid { grid-column: 1 / -1; }
.service-card { grid-column: span 4; border: 1px solid var(--fg); padding: 48px 32px; position: relative; overflow: hidden; transition: color 0.4s ease; }
.service-card::before {
  content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 0%; background: var(--accent); z-index: 0; transition: height 0.4s ease;
}
.service-card > * { position: relative; z-index: 1; }
.service-card:hover { color: var(--bg); }
.service-card:hover::before { height: 100%; }
.service-card.accent-card { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.service-card.accent-card::before { display: none; }
.service-title { font-family: var(--font-display); font-size: 32px; margin-bottom: 24px; }
.service-list { margin-top: 32px; opacity: 0.85; line-height: 2; }

/* Stats */
.stats-row { display: flex; justify-content: space-between; gap: 40px; padding: 44px 0; border-top: 1px solid currentColor; border-bottom: 1px solid currentColor; }
.stat-item h3 { font-family: var(--font-body); font-size: clamp(48px, 7vw, 80px); font-weight: 300; letter-spacing: -0.04em; }
.stat-label { font-size: 14px; text-transform: uppercase; opacity: 0.6; }

/* CTA */
.cta-section { text-align: center; padding: 160px 0; }
.cta-title { font-size: clamp(40px, 8vw, 100px); margin-bottom: 48px; max-width: 1200px; margin-inline: auto; }
.btn { display: inline-flex; align-items: center; padding: 16px 32px; background: var(--bg); color: var(--accent); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; border-radius: 99px; transition: transform 0.3s; }
.btn:hover { transform: translateY(-4px); }
.btn-outline { background: transparent; color: inherit; border: 1px solid currentColor; }
/* strzałka w przyciskach — przesuwa się na hover */
.btn::after { content: '→'; margin-left: 10px; display: inline-block; transition: transform 0.3s ease; }
.btn:hover::after { transform: translateX(5px); }
.btn-download::after { content: '↓'; }
.btn-download:hover::after { transform: translateY(4px); }

/* Footer (wspólna, duża stopka) */
.site-footer { background: var(--fg); color: var(--bg); padding: 88px 0 40px; }
.footer-wordmark { display: block; font-family: var(--font-display); font-weight: 500; font-size: clamp(56px, 13vw, 200px); letter-spacing: -0.04em; line-height: 0.95; }
.footer-grid-new { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: 64px; padding-top: 48px; border-top: 1px solid rgba(245,240,232,0.15); }
.footer-grid-new .footer-col h4 { font-family: var(--font-body); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.5; margin-bottom: 16px; }
.footer-grid-new .footer-col ul li { margin-bottom: 10px; opacity: 0.85; }
.footer-grid-new .footer-col a { position: relative; transition: color 0.25s ease; }
.footer-grid-new .footer-col a::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 100%; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.3s cubic-bezier(0.16,1,0.3,1); }
.footer-grid-new .footer-col a:hover { color: var(--accent); opacity: 1; }
.footer-grid-new .footer-col a:hover::after { transform: scaleX(1); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 64px; font-size: 13px; opacity: 0.65; }
.footer-back { font-size: 13px; letter-spacing: 0.05em; text-transform: uppercase; transition: color 0.25s ease; }
.footer-back:hover { color: var(--accent); }
@media (max-width: 768px) { .footer-grid-new { grid-template-columns: 1fr 1fr; gap: 28px; } .site-footer { padding: 64px 0 32px; } }

/* ---------------------------------------------------------------------
   Generic page hero (subpages)
   --------------------------------------------------------------------- */
.page-hero { padding-top: 180px; padding-bottom: 60px; }
.page-hero .badge { opacity: 0.8; }
.page-title { font-size: clamp(56px, 11vw, 180px); overflow: hidden; padding-bottom: 12px; }
.page-subtitle { font-size: clamp(18px, 2.4vw, 26px); font-weight: 300; opacity: 0.7; margin-top: 8px; max-width: 640px; }
.lead { font-size: clamp(20px, 2.6vw, 30px); font-weight: 300; line-height: 1.6; max-width: 900px; }

/* About page — edytorski layout (portret w ramce + dane) */
.about-page { padding-top: 140px; padding-bottom: 80px; }
.about-topline { display: flex; justify-content: flex-end; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.55; margin-bottom: 56px; }
.about-layout { display: grid; grid-template-columns: 0.82fr 1.18fr; gap: 72px; align-items: center; }
.about-figure { margin: 0; }
.about-frame { width: 100%; aspect-ratio: 4/5; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.about-frame .slot { background: var(--surface); }
.about-frame .slot img { object-position: center top; }
.about-figure figcaption { margin-top: 16px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.5; }

.about-eyebrow { display: flex; align-items: center; gap: 14px; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 22px; }
.about-eyebrow .num { color: var(--accent); font-weight: 600; }
.about-eyebrow .rule { width: 42px; height: 1px; background: currentColor; opacity: 0.4; }
.about-name { font-size: clamp(48px, 6.5vw, 104px); line-height: 0.98; overflow: hidden; padding-bottom: 8px; }
.about-role { color: var(--accent); font-weight: 600; font-size: clamp(18px, 2.1vw, 24px); margin: 18px 0 22px; }
.about-lead { font-size: 18px; line-height: 1.75; max-width: 540px; opacity: 0.85; }
.about-divider { height: 1px; background: var(--line); margin: 36px 0; }
.about-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 48px; }
.about-specs dt { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.5; margin-bottom: 6px; }
.about-specs dd { font-size: 17px; font-weight: 500; }
.about-actions { margin-top: 44px; display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.about-socials { display: flex; gap: 22px; flex-wrap: wrap; }
.about-socials a { text-decoration: underline; opacity: 0.8; }
.about-socials a:hover { opacity: 1; }
.about-footline { display: flex; justify-content: space-between; margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.6; }

/* Współprace — nagłówki sekcji */
.section-h2 { font-size: clamp(32px, 5vw, 64px); margin-top: 16px; }
.section-sub { max-width: 640px; margin-top: 16px; font-size: 18px; line-height: 1.6; opacity: 0.8; }

/* Partner (LH.pl) */
.partner-card { margin-top: 44px; display: grid; grid-template-columns: 220px 1fr auto; gap: 44px; align-items: center; border: 1px solid var(--line); border-radius: 16px; padding: 32px; }
.partner-logo { height: 96px; }
.partner-logo .slot { background: transparent; }
.partner-logo .slot img { object-fit: contain; object-position: left center; }
.partner-name { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 600; font-size: 24px; }
.partner-tag { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent); border-radius: 99px; padding: 3px 10px; }
.partner-info p { margin-top: 10px; max-width: 420px; line-height: 1.6; opacity: 0.8; }
.partner-promo { border: 1px solid rgba(142,30,23,0.4); border-radius: 12px; padding: 18px 24px; }
.promo-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.6; }
.promo-row { display: flex; align-items: baseline; gap: 16px; margin-top: 6px; }
.promo-code { font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -0.01em; }
.promo-off { font-family: var(--font-display); font-weight: 600; font-size: 26px; color: var(--accent); }

/* Opinie klientów */
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 44px; }
.testimonial { margin: 0; }
.testimonial blockquote { margin: 0; font-size: 15px; line-height: 1.7; opacity: 0.85; }
.testimonial figcaption { display: flex; align-items: center; gap: 14px; margin-top: 22px; }
.tm-avatar { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; flex: 0 0 auto; background: var(--surface); }
.tm-avatar .slot { width: 100%; height: 100%; background: var(--surface); }
.tm-avatar .slot img { object-fit: cover; }
.tm-name { font-family: var(--font-display); font-weight: 500; font-size: 16px; }

/* Services page extras */
.service-hero-card { border: 1px solid var(--fg); padding: 64px 48px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.service-hero-card h2 { font-size: clamp(32px, 4vw, 52px); margin-bottom: 24px; }
.service-hero-card .service-list { columns: 1; }
.service-hero-card .service-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }

/* Contact page */
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: start; }
.contact-form { display: flex; flex-direction: column; gap: 24px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.7; }
.field input, .field textarea {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px 16px;
  font-size: 16px;
  transition: border-color 0.3s;
  resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field.has-error input, .field.has-error textarea { border-color: var(--accent); }
.field-error { color: var(--accent); font-size: 13px; min-height: 1em; display: none; }
.field.has-error .field-error { display: block; }
.field-consent .consent-label { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.5; opacity: 0.85; cursor: pointer; }
.field-consent input[type="checkbox"] { width: 17px; height: 17px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--accent); }
.field-consent .consent-label a { color: var(--accent); text-decoration: underline; }
.field-consent.has-error .consent-label { color: var(--accent); }
.form-status { font-size: 15px; min-height: 1.4em; }
.form-status.success { color: #2e7d32; }
.form-status.error { color: var(--accent); }
.contact-cards { display: flex; flex-direction: column; gap: 16px; }
.contact-card { border: 1px solid var(--line); border-radius: 8px; padding: 28px; transition: border-color 0.3s, transform 0.3s; }
.contact-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.contact-card h4 { font-family: var(--font-body); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.6; margin-bottom: 10px; }
.contact-card .big { font-family: var(--font-display); font-size: 22px; }

/* ---------------------------------------------------------------------
   Portfolio View
   --------------------------------------------------------------------- */
.portfolio-hero { padding-top: 150px; padding-bottom: 36px; border-bottom: 1px solid currentColor; }
.portfolio-tabs { display: flex; gap: 40px; margin-top: 40px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.portfolio-tabs::-webkit-scrollbar { display: none; }
.tab-btn { font-size: 24px; opacity: 0.5; transition: opacity 0.3s; position: relative; white-space: nowrap; padding-bottom: 8px; }
.tab-btn.active { opacity: 1; }
.tab-btn.active::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background: var(--accent); }

.portfolio-filters { margin: 0 0 36px; display: flex; gap: 16px; flex-wrap: wrap; }
.filter-btn { padding: 6px 16px; border: 1px solid currentColor; border-radius: 99px; font-size: 12px; text-transform: uppercase; opacity: 0.6; transition: all 0.3s; }
.filter-btn:hover, .filter-btn.active { opacity: 1; background: var(--fg); color: var(--bg); }

.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px var(--grid-gap); }
.portfolio-empty { grid-column: 1 / -1; opacity: 0.6; padding: 40px 0; }
.port-card { position: relative; }
.port-img { width: 100%; aspect-ratio: 4/5; background: #ddd; margin-bottom: 16px; position: relative; z-index: 2; transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); overflow: hidden; }
.port-card:hover .port-img { transform: translateY(-10px); }
.port-card::before, .port-card::after { content:''; position:absolute; top:0; left:0; width:100%; aspect-ratio:4/5; background: rgba(0,0,0,0.05); z-index: 1; transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.port-card:hover::before { transform: translateY(-5px) scale(0.98); }
.port-card:hover::after { transform: translateY(0px) scale(0.96); }

/* Lightbox / Case study */
.lightbox { position: fixed; inset: 0; background: var(--bg); z-index: 10000; display: flex; flex-direction: column; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; }
.lightbox.active { opacity: 1; pointer-events: auto; }
.lb-header { padding: 24px var(--section-pad-x); display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid rgba(0,0,0,0.1); gap: 24px; }
.lb-heading { font-family: var(--font-display); font-size: clamp(22px, 3vw, 34px); }
.lb-meta { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.6; margin-top: 6px; }
.lb-body { flex: 1; display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; padding: 32px var(--section-pad-x); overflow: hidden; }
.lb-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; }
.lb-img-wrap { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.lb-img { max-width: 100%; max-height: 60vh; object-fit: contain; box-shadow: 0 20px 40px rgba(0,0,0,0.12); background: var(--surface); }

/* Ramka przeglądarki — zrzuty stron www w case study */
.browser-frame { width: 100%; max-width: 920px; border-radius: 12px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,0.22); background: #fff; }
.browser-bar { display: flex; align-items: center; gap: 8px; padding: 11px 16px; background: #e9e3d8; }
.browser-bar .bdot { width: 11px; height: 11px; border-radius: 50%; background: #cfc8ba; flex: 0 0 auto; }
.browser-bar .bdot:nth-child(1) { background: #ff5f57; }
.browser-bar .bdot:nth-child(2) { background: #febc2e; }
.browser-bar .bdot:nth-child(3) { background: #28c840; }
.browser-bar .burl { margin-left: 12px; font-size: 12px; color: #7a7264; background: #fff; padding: 5px 16px; border-radius: 99px; flex: 1; max-width: 340px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browser-view { background: #fff; line-height: 0; }
.browser-view .lb-img { width: 100%; max-height: 56vh; object-fit: cover; object-position: top center; box-shadow: none; background: #fff; }

/* Wybrana realizacja — multi-device (NBS) */
.featured-head { text-align: center; margin-bottom: 52px; }
.featured-head .badge { align-self: center; }
.nbs-showcase { position: relative; width: 100%; max-width: 1080px; margin: 0 auto; height: clamp(360px, 44vw, 600px); }
.nbs-showcase .dev-screen { overflow: hidden; background: #fff; width: 100%; height: 100%; }
.nbs-showcase .dev-screen img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
/* pasek adresu w ramkach (laptop/tablet) */
.dev-bar { display: flex; align-items: center; gap: 5px; padding: 7px 11px; background: #e9e3d8; }
.dev-bar .dev-dot { width: 7px; height: 7px; border-radius: 50%; background: #cfc8ba; flex: 0 0 auto; }
.dev-bar .dev-dot:nth-child(1) { background: #ff5f57; }
.dev-bar .dev-dot:nth-child(2) { background: #febc2e; }
.dev-bar .dev-dot:nth-child(3) { background: #28c840; }
.dev-bar .dev-url { margin-left: 8px; font-size: 10px; color: #7a7264; background: #fff; padding: 2px 12px; border-radius: 99px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 62%; }
.laptop-screen .dev-bar { border-radius: 4px 4px 0 0; }
.laptop-screen .dev-screen { border-radius: 0 0 4px 4px !important; }
.device-tablet .dev-bar { border-radius: 8px 8px 0 0; }
.device-tablet .dev-screen { border-radius: 0 0 8px 8px !important; }
/* Laptop — środek */
.device-laptop { position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: min(62%, 660px); z-index: 2; }
.laptop-screen { background: #161616; border-radius: 14px 14px 4px 4px; padding: 12px 12px 0; }
.laptop-screen .dev-screen { aspect-ratio: 16 / 10; border-radius: 4px; }
.laptop-base { height: 16px; width: 116%; margin-left: -8%; background: linear-gradient(#dcdcdc, #a6a6a6); border-radius: 0 0 14px 14px; position: relative; box-shadow: 0 16px 26px rgba(0,0,0,0.18); }
.laptop-base::after { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 14%; height: 6px; background: #9a9a9a; border-radius: 0 0 7px 7px; }
/* Tablet — z prawej, z tyłu */
.device-tablet { position: absolute; right: 0; bottom: 7%; width: 30%; z-index: 1; background: #161616; border-radius: 18px; padding: 9px; box-shadow: 0 18px 38px rgba(0,0,0,0.16); }
.device-tablet .dev-screen { aspect-ratio: 4 / 3; border-radius: 8px; }
/* Telefon — z lewej, z przodu */
.device-phone { position: absolute; left: 2%; bottom: 0; width: 15%; min-width: 116px; z-index: 3; background: #161616; border-radius: 26px; padding: 7px; box-shadow: 0 18px 38px rgba(0,0,0,0.2); }
.device-phone .dev-screen { aspect-ratio: 9 / 17; border-radius: 0 0 19px 19px; }
.dev-bar--mobile { justify-content: center; padding: 9px 8px; border-radius: 19px 19px 0 0; }
.dev-bar--mobile .dev-url { margin: 0; max-width: 88%; text-align: center; font-size: 9px; padding: 2px 10px; }
.featured-cta { text-align: center; margin-top: 56px; }
.featured-cta .section-sub { margin: 0 auto 24px; }
@media (max-width: 768px) {
  .nbs-showcase { height: auto; }
  .device-laptop { position: static; transform: none; width: 100%; }
  .device-phone, .device-tablet { display: none; }
}
.lb-side { display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.lb-desc { font-size: 17px; line-height: 1.8; opacity: 0.85; }
.lb-link { display: inline-flex; align-self: flex-start; padding: 10px 18px; border: 1px solid var(--accent); color: var(--accent); border-radius: 99px; font-size: 13px; font-weight: 500; letter-spacing: 0.02em; transition: background 0.3s ease, color 0.3s ease; }
.lb-link[hidden] { display: none; }
.lb-link:hover { background: var(--accent); color: var(--bg); }
.lb-caption { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); font-weight: 600; min-height: 1em; }
.lb-caption:empty { display: none; }
.lb-counter { font-size: 13px; letter-spacing: 0.1em; opacity: 0.5; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); padding: 16px; font-size: 32px; opacity: 0.4; transition: opacity 0.3s; }
.lb-nav:hover { opacity: 1; }
.lb-prev { left: 0; }
.lb-next { right: 0; }
/* Na telefonie: czytelne, łatwe do tapnięcia strzałki + podpowiedź o swipe */
@media (max-width: 768px) {
  .lb-nav { opacity: 0.92; font-size: 24px; width: 48px; height: 48px; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: color-mix(in srgb, var(--bg) 65%, transparent); backdrop-filter: blur(4px); }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}

/* Helpers */
.line-wrap { overflow: hidden; display: block; }
.word { display: inline-block; } /* stan startowy (translateY) ustawia gsap.set — bez JS tekst widoczny */

/* Polityka prywatności (treść prawna) */
.legal { max-width: 760px; }
.legal-updated { font-size: 13px; opacity: 0.5; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 32px; }
.legal h2 { font-size: clamp(20px, 2.2vw, 26px); margin: 38px 0 12px; }
.legal p { font-size: 16px; line-height: 1.75; opacity: 0.88; margin-bottom: 8px; }
.legal a { color: var(--accent); text-decoration: underline; }
.legal-note { margin-top: 44px; font-size: 13px; opacity: 0.5; font-style: italic; }

/* Pasek zgody na pliki cookie */
.cookie-bar {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 9000;
  width: min(820px, calc(100% - 32px)); display: flex; align-items: center; gap: 28px;
  padding: 18px 22px; background: var(--fg); color: var(--bg);
  border-radius: 16px; box-shadow: 0 16px 44px rgba(0,0,0,0.28);
}
.cookie-bar[hidden] { display: none; }
.cookie-body { flex: 1; min-width: 0; }
.cookie-title { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--bg); margin-bottom: 4px; }
.cookie-text { font-size: 13px; line-height: 1.55; opacity: 0.85; }
.cookie-link { color: #fff; text-decoration: underline; }
.cookie-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; flex-wrap: wrap; }
.cookie-btn {
  padding: 9px 16px; border-radius: 99px; font-size: 12px; letter-spacing: 0.03em; text-transform: uppercase;
  border: 1px solid rgba(245,240,232,0.4); color: var(--bg); white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.cookie-btn:hover { border-color: var(--bg); }
.cookie-btn--primary { background: var(--bg); color: var(--accent); border-color: var(--bg); font-weight: 600; }
.cookie-btn--primary:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }
@media (max-width: 720px) {
  .cookie-bar { flex-direction: column; align-items: stretch; gap: 16px; left: 0; bottom: 0; transform: none; width: 100%; border-radius: 16px 16px 0 0; }
  .cookie-actions { width: 100%; }
  .cookie-btn { flex: 1; text-align: center; }
}

/* Pływająca ikonka — zmiana zgody po dokonaniu wyboru */
.cookie-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 8990;
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--fg); color: var(--bg);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), background 0.3s ease;
}
.cookie-fab[hidden] { display: none; }
.cookie-fab svg { width: 24px; height: 24px; }
.cookie-fab:hover { transform: scale(1.08) rotate(10deg); background: var(--accent); }
@media (max-width: 720px) { .cookie-fab { right: 14px; bottom: 14px; } }

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .lb-body { grid-template-columns: 1fr; overflow-y: auto; }
  .lb-img { max-height: 50vh; }
  .service-hero-card { grid-template-columns: 1fr; }
  .about-layout { grid-template-columns: 0.95fr 1.05fr; gap: 40px; }
  /* poniżej desktopu hero wraca do jednej kolumny (galeria potrzebuje szerokości) */
  .hero { grid-template-columns: 1fr; min-height: 84svh; }
  .hero-gallery { display: none; }
}

@media (max-width: 768px) {
  :root { --section-pad-y: 80px; }
  .grid-12 { display: flex; flex-direction: column; }
  .nav-links { display: none; }
  /* Wygodne pola dotyku (~44px) dla głównych kontrolek na telefonie */
  .nav-toggle { display: flex; width: 44px; height: 44px; padding: 0; justify-content: center; align-items: center; }
  .nav-toggle span { width: 24px; }
  .theme-toggle { width: 44px; height: 44px; }
  .project-card:nth-child(even),
  .project-card:nth-child(odd) { margin-top: 0; margin-bottom: 64px; }
  .hero-content { flex-direction: column; align-items: flex-start; gap: 32px; }
  .hero-spin { display: none; }
  .logofolio-grid { grid-template-columns: repeat(2, 1fr); }
  .partners-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-row { flex-direction: column; gap: 40px; text-align: center; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .portfolio-tabs { gap: 22px; }
  .tab-btn { font-size: 19px; }
  .partner-card { grid-template-columns: 1fr; gap: 24px; text-align: left; }
  .partner-logo { height: 64px; }
  .testimonials { grid-template-columns: 1fr; gap: 28px; }
  .cta-section { padding: 100px 0; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-layout { grid-template-columns: 1fr; gap: 32px; }
  .about-frame { max-width: 420px; }
  .about-specs { gap: 22px 32px; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .services-grid.grid-12 { display: flex; }
  .service-card { padding: 36px 24px; }
}

/* ---------------------------------------------------------------------
   Reduced motion — pełny fallback: wszystko widoczne, bez ruchu
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .word, .page-transition { transform: none !important; }
  .page-transition { display: none !important; }
}
