/* ============================================================
   strona na wymiar — Realizacje (podstrona)
   Recreated from Realizacje.dc.html design prototype.
   Stack: vanilla HTML/CSS/JS. Palette: light #F4F7FB + royal blue #2563EB.
   ============================================================ */

*{ box-sizing:border-box; }

html,body{
  margin:0;
  padding:0;
  background:#F4F7FB;
  color:#0E1A2B;
}

body{
  font-family:'Space Grotesk', system-ui, sans-serif;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

::selection{ background:#2563EB; color:#fff; }

a{ color:inherit; }

.snw-root{
  position:relative;
  background:#F4F7FB;
  min-height:100vh;
}

/* ---------- Custom selection cursor ---------- */
@media (pointer:fine){
  html.snw-cur, html.snw-cur *{ cursor:none !important; }
}

.snw-cursor{
  position:fixed; left:0; top:0;
  pointer-events:none;
  z-index:99999;
  border:1.4px solid rgba(37,99,235,.9);
  border-radius:3px;
  will-change:transform, width, height;
}
.snw-cursor i{
  position:absolute;
  width:6px; height:6px;
  background:#2563EB;
  border:1px solid #fff;
  border-radius:1px;
}
.snw-cursor i:nth-child(1){ left:-3px; top:-3px; }
.snw-cursor i:nth-child(2){ right:-3px; top:-3px; }
.snw-cursor i:nth-child(3){ left:-3px; bottom:-3px; }
.snw-cursor i:nth-child(4){ right:-3px; bottom:-3px; }

@keyframes snw-blink{ 0%,100%{ opacity:1 } 50%{ opacity:.25 } }

/* ---------- Reactive dot grid (canvas) ---------- */
.snw-grid{
  position:absolute; inset:0;
  width:100%; height:100%;
  pointer-events:none;
  z-index:0;
}

/* ---------- Scroll reveal ---------- */
.rv{
  opacity:0;
  transform:translateY(var(--ty,28px));
  transition:opacity var(--dur,.8s) ease var(--d,0s),
             transform var(--dur,.8s) ease var(--d,0s);
}

/* ============================================================
   Header / nav
   ============================================================ */
.site-header{
  position:fixed; top:0; left:0; right:0;
  z-index:80;
  display:flex; justify-content:center;
  padding:18px 24px;
  pointer-events:none;
}
/* mobile: przycisk powrotu plynie ze strona (nie zaslania tresci) */
@media(max-width:880px){ .site-header{ position:absolute; } }
.nav{
  pointer-events:auto;
  display:flex; align-items:center; gap:14px;
  background:rgba(255,255,255,.82);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  border:1px solid rgba(14,26,43,.08);
  box-shadow:0 8px 26px -16px rgba(14,26,43,.4);
  border-radius:14px;
  padding:9px 12px 9px 16px;
}
.nav-home{
  display:inline-flex; align-items:center; gap:8px;
  text-decoration:none;
  font-size:13.5px; font-weight:500;
  color:#0E1A2B;
  padding:8px 13px;
  border-radius:9px;
}
.nav-home-arrow{ font-size:16px; }
.nav-tag{
  font-family:'Space Mono', monospace;
  font-size:12.5px;
  color:#5A6B85;
}
.nav-cta{
  display:inline-flex; align-items:center;
  text-decoration:none;
  font-size:13.5px; font-weight:500;
  color:#fff;
  background:#2563EB;
  padding:9px 16px;
  border-radius:9px;
  margin-left:6px;
}

/* ============================================================
   Intro / Hero
   ============================================================ */
.intro{
  position:relative;
  background:#F4F7FB;
  padding:clamp(130px,20vh,200px) clamp(24px,5vw,80px) clamp(50px,7vh,90px);
}
.intro-inner{
  position:relative;
  max-width:1180px;
  margin:0 auto;
}
.intro-label{
  font-family:'Space Mono', monospace;
  font-size:12px; letter-spacing:1.5px;
  color:#2563EB;
  margin-bottom:20px;
}
.intro-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  flex-wrap:wrap;
  gap:28px;
}
.intro-row > *{ min-width:0; }
.intro-title{
  margin:0;
  font-size:clamp(46px,8vw,108px);
  line-height:.92;
  letter-spacing:-.03em;
  font-weight:600;
  color:#0E1A2B;
}
.intro-sub{
  margin:0;
  max-width:360px;
  font-size:15.5px; line-height:1.65;
  color:#52617A;
}

/* ============================================================
   Portfolio grid
   ============================================================ */
.portfolio-section{
  position:relative;
  background:#F4F7FB;
  padding:0 clamp(24px,5vw,80px) clamp(90px,14vh,150px);
}
.portfolio-grid{
  position:relative;
  max-width:1180px;
  margin:0 auto;
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:clamp(20px,2.6vw,38px);
  z-index:1;
}
.portfolio-grid > *{ min-width:0; }

/* Individual card */
.pf-card{
  transition:transform .5s cubic-bezier(.2,.7,.2,1);
}
.pf-card:hover{
  transform:translateY(-6px);
}

/* Shot / image area */
.pf-shot{
  --mx:50%; --my:50%;
  position:relative;
  height:380px;
  border:1.5px solid #0E1A2B;
  border-radius:14px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 24px 50px -30px rgba(14,26,43,.4);
}
/* Hover gloss REMOVED — a mix-blend-mode layer over a playing <video> blocks
   hardware video compositing and throttled the preview to ~1.5fps (measured).
   The video itself is the hover effect now. */

/* Static screenshot preview + subtle Ken-Burns zoom on hover. The zoom is a
   single GPU transform, so it is ALWAYS smooth (no video → no frame-drops).
   Full animations live behind the "Zobacz na żywo" link (opens the real site). */
.pf-poster{
  position:absolute;
  top:0; left:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center top;
  display:block;
  background:#eef2f7;
  pointer-events:none;
  user-select:none;
  transition:transform 1.2s cubic-bezier(.2,.7,.2,1);
  will-change:transform;
}
.pf-card:hover .pf-poster{ transform:scale(1.07); }

/* Card meta below the shot — single row, identical to the landing portfolio cards:
   name + type on the left, year + compact "Zobacz →" button on the right. */
.pf-meta{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  margin-top:18px;
  min-width:0;
}
.pf-id{ min-width:0; }
.pf-name{
  font-size:18px; font-weight:600;
  color:#0E1A2B;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.pf-type{
  font-size:13.5px;
  color:#52617A;
  margin-top:2px;
}
.pf-actions{
  display:flex;
  align-items:center;
  gap:12px;
  flex-shrink:0;
}
.pf-year{
  font-family:'Space Mono', monospace;
  font-size:12px;
  color:#5A6B85;
  flex-shrink:0;
}
.pf-link{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-family:'Space Mono', monospace;
  font-size:12px;
  color:#2563EB;
  text-decoration:none;
  border:1px solid rgba(37,99,235,.32);
  padding:7px 12px;
  border-radius:8px;
  white-space:nowrap;
  flex-shrink:0;
}

/* ============================================================
   CTA section (dark)
   ============================================================ */
.cta-section{
  position:relative;
  background:#0B1521;
  color:#fff;
  padding:clamp(90px,16vh,170px) clamp(24px,5vw,80px);
  overflow:hidden;
  /* static dark dot pattern — canvas grid overlays on desktop */
  
}
.cta-inner{
  position:relative;
  max-width:900px;
  margin:0 auto;
  text-align:center;
}
.cta-badge{
  display:inline-flex;
  align-items:center;
  gap:10px;
  max-width:100%;
  font-family:'Space Mono', monospace;
  font-size:11.5px; letter-spacing:1.5px;
  color:#5FA0FF;
  margin-bottom:30px;
  border:1px solid rgba(95,160,255,.3);
  border-radius:100px;
  padding:8px 16px;
}
.cta-badge-dot{
  width:6px; height:6px; border-radius:50%;
  background:#5FA0FF;
  animation:snw-blink 1.6s infinite;
  flex-shrink:0;
}
.cta-title{
  margin:0 0 28px;
  font-size:clamp(36px,6vw,80px);
  line-height:.98;
  letter-spacing:-.03em;
  font-weight:600;
  color:#fff;
  text-wrap:balance;
}
.cta-accent{ color:#2563EB; }
.cta-actions{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:16px;
}
.cta-btn-primary{
  display:inline-flex;
  align-items:center;
  gap:10px;
  background:#2563EB; color:#fff;
  text-decoration:none;
  font-size:16px; font-weight:500;
  padding:18px 34px;
  border-radius:13px;
  box-shadow:0 18px 44px -14px rgba(37,99,235,.8);
}
.cta-btn-ghost{
  display:inline-flex;
  align-items:center;
  gap:10px;
  background:transparent; color:#fff;
  text-decoration:none;
  font-size:16px; font-weight:500;
  padding:18px 30px;
  border-radius:13px;
  border:1px solid rgba(255,255,255,.18);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer{
  background:#0B1521;
  color:#93A7C4;
  padding:34px clamp(24px,5vw,80px);
  border-top:1px solid rgba(255,255,255,.08);
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:14px;
  font-family:'Space Mono', monospace;
  font-size:12px; letter-spacing:.4px;
}
.footer-brand{ color:#94A6C0; }
.footer-accent{ color:#2563EB; }
.footer-copy{ color:#93A7C4; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width:720px){
  .portfolio-grid{
    grid-template-columns:1fr;
  }
  .nav-cta{
    display:none;
  }
}

@media (max-width:560px){
  .intro-row{
    flex-direction:column;
    align-items:flex-start;
  }
  .intro-sub{
    max-width:100%;
  }
  /* Geometria 3D: szerokie hero (nagłówek z lewej / radar z prawej) nie mieści się
     na wąskim, portretowym kafelku — kadrujemy do nagłówka (lewa strona), żeby tekst
     nie był ucinany. Dotyczy tylko tego jednego posteru; desktop bez zmian. */
  .pf-poster[src*="geometria-3d"]{ object-position:center; }
}

@media (prefers-reduced-motion: reduce){
  *{ transition-duration:.001ms !important; animation-duration:.001ms !important; animation-iteration-count:1 !important; }
  .snw-grid{ display:none; }
  .rv{ opacity:1; transform:none; }
  .cta-badge-dot{ animation:none; }
}
