/* K4m3l3on Art — arkusz stylów strony (tokeny systemu Nocturne + własny układ) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --color-bg: #161826;
  --color-surface: #232532;
  --color-text: #e9e9ed;
  --color-accent: #9184d9;
  --color-accent-2: #a7a1db;
  --color-divider: color-mix(in srgb, #e9e9ed 16%, transparent);

  --color-accent-300: #d2cefd;
  --color-accent-800: #423a6a;
  --color-accent-900: #2b2741;

  --color-neutral-800: #3f424d;

  --color-section: #262a60;
  --color-section-glow: #353b80;

  --font-heading: "Inter", system-ui, sans-serif;
  --font-heading-weight: 500;
  --font-body: "Inter", system-ui, sans-serif;

  --space-2: 5.6px;
  --space-3: 8.4px;
  --space-4: 11.2px;
  --space-6: 16.8px;
  --space-8: 22.4px;

  --radius-md: 8px;
  --radius-lg: 14px;

  --shadow-sm: 0 0 0 1px #3f424d;
  --shadow-md: 0 0 0 1px #595d6c, 0 6px 18px rgba(0,0,0,0.55);
  --shadow-lg: 0 0 0 1px #9397ab, 0 16px 40px rgba(0,0,0,0.65);
}

/* — reset / base — */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  line-height: 1.12; letter-spacing: -0.015em; margin: 0;
}
p { margin: 0; }
img { display: block; max-width: 100%; }
a { color: var(--color-accent-300); text-decoration: none; }
a:hover { color: var(--color-accent); text-decoration: underline; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }
.lighten { mix-blend-mode: lighten; background-color: transparent; }
svg { display: block; }

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px; cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 15px; line-height: 1.2; color: var(--color-text);
  background: transparent; border: 1px solid transparent;
  padding: var(--space-3) calc(var(--space-4) * 1.6);
  border-radius: var(--radius-md);
  transition: background 0.2s ease;
}
.btn-primary { color: var(--color-accent); border-color: var(--color-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--color-accent) 12%, transparent); color: var(--color-accent); text-decoration: none; }
.btn-primary:active { background: color-mix(in srgb, var(--color-accent) 22%, transparent); }
.btn-ghost { color: var(--color-accent); }
.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); color: var(--color-accent); text-decoration: none; }
.btn-ghost:active { background: color-mix(in srgb, var(--color-accent) 18%, transparent); }

/* — forms — */
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field label { font-size: 13px; color: color-mix(in srgb, var(--color-text) 70%, transparent); }
.input {
  width: 100%; min-height: 46px; padding: 10px 12px; font: inherit;
  font-size: 16px; color: var(--color-text); caret-color: var(--color-accent);
  background: var(--color-surface);
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
}
.input:hover { border-color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
textarea.input { min-height: 120px; resize: vertical; font-family: var(--font-body); }

/* — cards — */
.card {
  display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-6); border-radius: var(--radius-lg); background: var(--color-surface);
  transition: box-shadow 0.25s ease, opacity 0.6s cubic-bezier(.34,1.56,.64,1), transform 0.6s cubic-bezier(.34,1.56,.64,1);
}
.card-title { font-family: var(--font-heading); font-weight: var(--font-heading-weight); font-size: 18px; margin: var(--space-2) 0 0; }
.card-body { margin: 0; font-size: 14.5px; line-height: 1.6; color: color-mix(in srgb, var(--color-text) 75%, transparent); }
.elev-sm { box-shadow: var(--shadow-sm); }

/* — tags — */
.tag {
  display: inline-flex; align-items: center; font-size: 12px;
  letter-spacing: 0.02em; padding: 5px 12px;
  border-radius: calc(var(--radius-md) * 0.75);
}
.tag-accent { background: var(--color-accent-800); color: var(--color-accent-300); }

/* — kicker (small uppercase eyebrow label) — */
.kicker {
  display: block; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--color-accent); margin-bottom: var(--space-3); font-weight: 600;
}

/* — nav — */
.nav {
  display: flex; align-items: center; gap: var(--space-4);
  flex-wrap: wrap; row-gap: var(--space-3);
  max-width: 1200px; margin: 0 auto;
  padding: var(--space-4) clamp(20px, 5vw, 72px);
  position: relative; z-index: 2;
}
.nav-logo {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  margin-right: var(--space-3); animation: floatY 5s ease-in-out infinite;
  flex-shrink: 0;
}
.nav-brand {
  font-family: var(--font-heading); font-weight: 600;
  font-size: 18px; margin-right: auto;
}
.nav a:not(.btn) { color: var(--color-text); text-decoration: none; font-size: 15px; min-height: 46px; display: inline-flex; align-items: center; }
.nav a:not(.btn):hover { color: var(--color-accent); text-decoration: none; }

/* — page shell / cosmic backdrop — */
.page {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1400px 800px at 85% -10%, color-mix(in srgb, var(--color-accent-900) 65%, transparent), transparent 60%),
    radial-gradient(1000px 700px at 5% 10%, color-mix(in srgb, var(--color-section) 45%, transparent), transparent 55%),
    radial-gradient(900px 600px at 50% 100%, color-mix(in srgb, black 35%, transparent), transparent 55%),
    var(--color-bg);
  font-family: var(--font-body); color: var(--color-text);
}

/* Fixed full-viewport backdrop: stars, drifting planets, green falling digits.
   Fixed (not sized to page height) so it plays behind every section without scrolling away. */
.cosmic-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.cosmic-star { position: absolute; border-radius: 50%; background: #e9e9ed; opacity: 0.5; animation: twinkle ease-in-out infinite; }
.cosmic-planet { position: absolute; border-radius: 50%; filter: blur(1.5px); opacity: 0.55; animation: drift ease-in-out infinite; }
.cosmic-digit {
  position: absolute; top: 0; font-family: "Courier New", monospace; font-size: 13px; line-height: 1;
  color: oklch(74% 0.19 150); animation: rainfall linear infinite;
}

/* — section shells — */
main { position: relative; z-index: 1; }
.section {
  position: relative; z-index: 1; width: 100%; min-height: 100vh;
  box-sizing: border-box; display: flex; align-items: center;
  padding-block: clamp(48px, 8vw, 64px);
}
.section-inner {
  max-width: 1200px; width: 100%; margin: 0 auto;
  padding-inline: clamp(20px, 5vw, 72px);
}
.section-split {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(24px, 5vw, 64px); align-items: center;
}
.section-glow-bg {
  background:
    radial-gradient(900px 420px at 85% -40%, color-mix(in srgb, var(--color-section-glow) 70%, transparent), transparent 64%),
    var(--color-section);
  overflow: hidden;
}

/* — reveal-on-scroll —
   Domyślnie (i zawsze bez JavaScriptu) treść jest w pełni widoczna: gdyby skrypt się
   nie uruchomił, nic nie może zniknąć. Stan "ukryte przed wjechaniem" włącza się
   tylko wtedy, gdy main.js zdąży dopisać klasę "js" do <html> (patrz initial script
   w <head>), a każdy element i tak dostaje widoczność z powrotem po chwili nawet
   bez działającego IntersectionObserver — patrz zabezpieczenie czasowe w main.js. */
.reveal, .reveal-pop, .reveal-scale { opacity: 1; transform: none; }
.js .reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.js .reveal.is-visible { opacity: 1; transform: translateY(0); }
.js .reveal-pop {
  opacity: 0; transform: translateY(28px) scale(0.85);
  transition: opacity 0.8s cubic-bezier(.34,1.56,.64,1), transform 0.8s cubic-bezier(.34,1.56,.64,1);
}
.js .reveal-pop.is-visible { opacity: 1; transform: translateY(0) scale(1); }
.js .reveal-scale {
  opacity: 0; transform: scale(0.6);
  transition: opacity 0.8s cubic-bezier(.34,1.56,.64,1), transform 0.8s cubic-bezier(.34,1.56,.64,1);
}
.js .reveal-scale.is-visible { opacity: 1; transform: scale(1); }
.reveal-delay-1 { transition-delay: 0.1s; }

/* — hero — */
.hero { position: relative; }
.hero-orb {
  position: absolute; border-radius: 50%; z-index: 0;
}
.hero-earth {
  left: clamp(-40px, -4vw, -10px); top: 8%; width: 110px; height: 110px;
  animation: spin 90s linear infinite, drift 18s ease-in-out infinite;
  background:
    radial-gradient(circle at 62% 68%, rgba(64,150,96,0.9) 0 11%, transparent 12%),
    radial-gradient(circle at 32% 42%, rgba(64,150,96,0.85) 0 9%, transparent 10%),
    radial-gradient(circle at 72% 28%, rgba(64,150,96,0.8) 0 7%, transparent 8%),
    radial-gradient(circle at 42% 74%, rgba(64,150,96,0.8) 0 6%, transparent 7%),
    radial-gradient(circle at 42% 68%, #3f83ad, #123a55 80%);
  box-shadow: inset -12px -12px 22px rgba(0,0,0,0.45), 0 0 26px rgba(90,160,255,0.25);
}
.hero-moon {
  right: clamp(-24px, -2vw, 0px); top: 4%; width: 56px; height: 56px;
  animation: spin 70s linear infinite, drift 14s ease-in-out infinite;
  background:
    radial-gradient(circle at 30% 62%, rgba(90,90,90,0.55) 0 14%, transparent 15%),
    radial-gradient(circle at 60% 30%, rgba(90,90,90,0.5) 0 10%, transparent 11%),
    radial-gradient(circle at 70% 68%, rgba(90,90,90,0.45) 0 8%, transparent 9%),
    radial-gradient(circle at 40% 30%, #d8d8d8, #8f8f8f 55%, #5c5c5c 88%);
  box-shadow: inset -8px -8px 14px rgba(0,0,0,0.4), 0 0 14px rgba(255,255,255,0.15);
}
.hero-copy { position: relative; z-index: 1; animation: slideInLeft 0.9s ease-out both; }
.hero-copy h1 { font-size: clamp(40px, 6vw, 72px); }
.hero-copy p {
  font-size: 17px; line-height: 1.65; color: color-mix(in srgb, var(--color-text) 80%, transparent);
  max-width: 58ch; margin-top: var(--space-6);
}
.hero-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-8); }
.hero-figure {
  position: relative; z-index: 1; margin: 0; justify-self: center;
  width: min(320px, 70vw); aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-accent) 40%, transparent), var(--shadow-lg);
  animation: popIn 1s cubic-bezier(.34,1.56,.64,1) both, floatY 6s ease-in-out infinite 1s;
}
.hero-figure img { width: 100%; height: 100%; object-fit: cover; }

/* — headings shared across sections — */
.section h2 { font-size: clamp(26px, 3vw, 36px); margin-bottom: var(--space-6); }
.section p.lead { font-size: 16px; line-height: 1.7; color: color-mix(in srgb, var(--color-text) 82%, transparent); max-width: 62ch; }

/* — o mnie — */
.portrait-frame {
  width: 100%; aspect-ratio: 4/3; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); background: var(--color-surface); overflow: hidden;
  margin-bottom: var(--space-6);
}
.portrait-frame img { width: 100%; height: 100%; object-fit: contain; }

.slideshow {
  position: relative; width: 100%; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--color-surface);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-accent) 35%, transparent), var(--shadow-lg);
}
.slideshow.slideshow-experience {
  background: var(--color-neutral-800);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-accent-2) 40%, transparent), var(--shadow-lg);
}
.slideshow-frame { position: relative; width: 100%; aspect-ratio: 16/11; }
.slideshow-experience .slideshow-frame { aspect-ratio: 4/5; }
/* Bez JavaScriptu pokaz slajdów pokazuje po prostu pierwsze zdjęcie na stałe
   (zamiast pustego pola) — reszta jest ukryta przez display:none. */
.slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
html:not(.js) .slide:not(:first-child) { display: none; }
.js .slide { opacity: 0; transform: scale(1.05); transition: opacity 0.9s ease, transform 0.9s ease; }
.js .slide.is-active { opacity: 1; transform: scale(1); }
.slideshow-dots {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  display: flex; justify-content: center; gap: var(--space-2); padding: var(--space-3);
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
}
/* Widoczna kropka to 8px, ale klikalny/dotykalny obszar przycisku jest większy
   (24px) — łatwiej trafić palcem na telefonie, bez powiększania samej kropki. */
.slideshow-dots .dot {
  width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
  background: transparent; padding: 0; border: 0; cursor: pointer;
}
.slideshow-dots .dot::after {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--color-accent);
  opacity: 0.35; transition: opacity 0.4s ease;
}
.slideshow-experience .slideshow-dots .dot::after { background: var(--color-accent-2); }
.slideshow-dots .dot.is-active::after { opacity: 1; }

/* — usługi — */
/* Zawsze 3 kafelki w rzędzie (3 na górze, 3 na dole) — na telefonie (poniżej 620px)
   przełącza się na jedną kolumnę w media query niżej w tym pliku. */
.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6);
}
.service-card:hover, .service-card:focus-within { box-shadow: var(--shadow-md); }
.service-icon { width: 28px; height: 28px; color: var(--color-accent); transition: transform 0.3s ease; }
.service-card:hover .service-icon { transform: scale(1.15) rotate(-6deg); }
.services-grid .card:nth-child(1) { transition-delay: 0s; }
.services-grid .card:nth-child(2) { transition-delay: 0.08s; }
.services-grid .card:nth-child(3) { transition-delay: 0.16s; }
.services-grid .card:nth-child(4) { transition-delay: 0.24s; }
.services-grid .card:nth-child(5) { transition-delay: 0.32s; }
.services-grid .card:nth-child(6) { transition-delay: 0.4s; }

/* — doświadczenie — */
.experience-section { position: relative; }
.light-rain-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.light-rain-bar {
  position: absolute; top: 0; width: 2px;
  background: linear-gradient(to bottom, transparent, var(--color-accent-2), transparent);
  filter: blur(0.4px); animation: rainfall linear infinite;
}
.saturn {
  position: absolute; right: 32px; bottom: 32px; width: 150px; height: 150px; pointer-events: none;
}
.saturn-ring {
  position: absolute; inset: 22% -30%; border: 5px solid color-mix(in srgb, var(--color-accent-300) 70%, transparent);
  border-radius: 50%; transform: rotate(-18deg); opacity: 0.55; animation: drift 24s ease-in-out infinite;
}
.saturn-body {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #e4d3a8, #a9834f 55%, #6b4c2c 78%, transparent 85%);
  box-shadow: var(--shadow-sm);
}
.experience-tags { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-6); }
.experience-tags .tag { animation: pulseTag 2.6s ease-in-out infinite; }
.experience-tags .tag:nth-child(1) { animation-delay: 0s; }
.experience-tags .tag:nth-child(2) { animation-delay: 0.4s; }
.experience-tags .tag:nth-child(3) { animation-delay: 0.8s; }
.experience-tags .tag:nth-child(4) { animation-delay: 1.2s; }

/* — faq — */
.jupiter {
  position: absolute; z-index: 0; right: 20px; top: 20px; width: 80px; height: 80px;
  border-radius: 50%; pointer-events: none; opacity: 0.4; box-shadow: var(--shadow-sm);
  background:
    repeating-linear-gradient(100deg, #d98a4f 0 10px, #c9713a 10px 18px, #e8b183 18px 30px, #b56a34 30px 40px),
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.25), transparent 60%);
  animation: drift 26s ease-in-out infinite;
}
.faq-list { display: flex; flex-direction: column; gap: var(--space-4); }
.faq-item {
  padding: var(--space-4) var(--space-6); border-radius: var(--radius-md);
  background: var(--color-surface); transition: box-shadow 0.25s ease;
}
.faq-item:hover, .faq-item[open] { box-shadow: var(--shadow-sm); }
.faq-item summary {
  cursor: pointer; font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 16px; list-style: none; min-height: 46px; display: flex; align-items: center; gap: var(--space-2);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon { width: 18px; height: 18px; color: var(--color-accent); flex-shrink: 0; }
.faq-answer {
  margin-top: var(--space-3); font-size: 14.5px; line-height: 1.7;
  color: color-mix(in srgb, var(--color-text) 82%, transparent); white-space: pre-line;
}

/* — kontakt — */
.contact-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-6); width: 100%; }
.contact-form .field-full { grid-column: 1 / -1; }
.contact-form-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.form-success { display: none; font-size: 14px; color: var(--color-accent-300); align-items: center; gap: var(--space-2); }
.form-success.is-visible { display: inline-flex; }
.form-success svg { width: 18px; height: 18px; }
.form-error { display: none; font-size: 14px; color: #e5534b; align-items: center; gap: var(--space-2); }
.form-error.is-visible { display: inline-flex; }
.btn[disabled] { opacity: 0.6; pointer-events: none; }

/* — stopka — */
.site-footer {
  position: relative; z-index: 1; max-width: 1200px; margin: 0 auto;
  padding: clamp(48px, 8vw, 80px) clamp(20px, 5vw, 72px) var(--space-8);
  display: flex; flex-direction: column; align-items: center; gap: var(--space-6); text-align: center;
}
.footer-logo {
  width: 120px; height: 120px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-accent) 40%, transparent), var(--shadow-lg);
}
.footer-social { display: flex; align-items: center; gap: var(--space-6); }
.social-btn {
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%; background: var(--color-surface);
  box-shadow: var(--shadow-sm); color: var(--color-accent); border: none; cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease; padding: 0;
}
.social-btn:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); color: var(--color-accent); }
.social-btn svg { width: 22px; height: 22px; }
/* Bez JavaScriptu numer telefonu jest po prostu widoczny na stałe — dopiero z
   działającym skryptem chowa się za przyciskiem i pojawia się z animacją. */
.footer-phone-reveal { height: 26px; display: flex; align-items: center; justify-content: center; }
.js .footer-phone-reveal {
  opacity: 0; transform: scale(0.8); transition: opacity 0.5s ease, transform 0.5s ease;
}
.js .footer-phone-reveal.is-visible { opacity: 1; transform: scale(1); }
.footer-phone-number {
  font-family: "Courier New", monospace; font-size: 18px; letter-spacing: 0.08em;
  color: oklch(74% 0.19 150);
}
.footer-phone-reveal.is-visible .footer-phone-number { animation: digitFlicker 1.4s ease-in-out 1; }
.footer-copyright { font-size: 13px; color: color-mix(in srgb, var(--color-text) 55%, transparent); }

/* — keyframes — */
@keyframes twinkle { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.9; } }
@keyframes drift { 0%, 100% { transform: translate(0,0) scale(1); } 50% { transform: translate(24px,-28px) scale(1.06); } }
@keyframes rainfall { 0% { transform: translateY(-10vh); opacity: 0; } 10% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(120vh); opacity: 0; } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@keyframes pulseTag { 0%, 100% { box-shadow: 0 0 0 rgba(145,132,217,0); } 50% { box-shadow: 0 0 10px color-mix(in srgb, var(--color-accent) 55%, transparent); } }
@keyframes popIn { 0% { opacity: 0; transform: scale(0.5) rotate(-8deg); } 60% { opacity: 1; transform: scale(1.08) rotate(2deg); } 100% { opacity: 1; transform: scale(1) rotate(0deg); } }
@keyframes slideInLeft { 0% { opacity: 0; transform: translateX(-44px); } 100% { opacity: 1; transform: translateX(0); } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes digitFlicker { 0%, 100% { opacity: 1; } 8% { opacity: 0.4; } 16% { opacity: 1; } 40% { opacity: 0.7; } 48% { opacity: 1; } }

/* — responsywność — */
/* Bazowo: 360px i szersze, układ jednokolumnowy (sekcje same się składają dzięki grid auto-fit powyżej). */
@media (min-width: 720px) {
  .nav { flex-wrap: nowrap; }
}

/* Szerokie elementy dostają własne przewijanie w poziomie, strona nigdy się nie przewija w bok. */
.faq-answer, .hero-copy p, .section p.lead { overflow-wrap: break-word; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Glitch cyfrowy — napis K4m3l3on Art */
.glitch {
  position: relative;
  display: inline-block;
  color: #eaf6ff;
  text-shadow: 0 0 8px rgba(0,229,255,.8), 0 0 22px rgba(255,23,68,.6);
}
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  pointer-events: none;
  clip-path: inset(0 0 0 0);
}
.glitch::before { color: #00e5ff; mix-blend-mode: screen; opacity: .95; transform: translate(-3px, 0); text-shadow: 0 0 10px #00e5ff; animation: glitch-b 2.6s infinite steps(2, end); }
.glitch::after  { color: #ff1744; mix-blend-mode: screen; opacity: .95; transform: translate(3px, 0); text-shadow: 0 0 10px #ff1744; animation: glitch-r 2.2s infinite steps(2, end); }
@keyframes glitch-b {
  0%,72%,100% { transform: translate(-3px,0); clip-path: inset(0 0 0 0); opacity:.95; }
  74% { transform: translate(-2px,-1px); clip-path: inset(10% 0 62% 0); }
  78% { transform: translate(2px,1px);  clip-path: inset(58% 0 18% 0); }
  82% { transform: translate(-3px,0);   clip-path: inset(32% 0 40% 0); }
  86% { transform: translate(-3px,0); }
}
@keyframes glitch-r {
  0%,68%,100% { transform: translate(3px,0); clip-path: inset(0 0 0 0); opacity:.95; }
  70% { transform: translate(2px,1px);  clip-path: inset(70% 0 8% 0); }
  76% { transform: translate(-2px,-2px); clip-path: inset(20% 0 55% 0); }
  84% { transform: translate(3px,0);    clip-path: inset(45% 0 30% 0); }
  88% { transform: translate(3px,0); }
}
@media (prefers-reduced-motion: reduce) {
  .glitch::before, .glitch::after { animation: none; opacity: .5; }
}

/* Nawigacja — łagodniejszy glitch dla czytelności */
.nav-brand.glitch { text-shadow: 0 0 4px rgba(0,229,255,.35), 0 0 10px rgba(255,23,68,.25); }
.nav-brand.glitch::before { opacity: .4; transform: translate(-1px, 0); text-shadow: none; animation: glitch-b-soft 2.6s infinite steps(2, end); }
.nav-brand.glitch::after  { opacity: .4; transform: translate(1px, 0); text-shadow: none; animation: glitch-r-soft 2.2s infinite steps(2, end); }
@keyframes glitch-b-soft {
  0%,72%,100% { transform: translate(-1px,0); clip-path: inset(0 0 0 0); opacity:.4; }
  74% { transform: translate(-2px,-1px); clip-path: inset(10% 0 62% 0); }
  78% { transform: translate(1px,1px);  clip-path: inset(58% 0 18% 0); }
  82% { transform: translate(-2px,0);   clip-path: inset(32% 0 40% 0); }
  86% { transform: translate(-1px,0); }
}
@keyframes glitch-r-soft {
  0%,68%,100% { transform: translate(1px,0); clip-path: inset(0 0 0 0); opacity:.4; }
  70% { transform: translate(2px,1px);  clip-path: inset(70% 0 8% 0); }
  76% { transform: translate(-1px,-2px); clip-path: inset(20% 0 55% 0); }
  84% { transform: translate(2px,0);    clip-path: inset(45% 0 30% 0); }
  88% { transform: translate(1px,0); }
}

/* Sekcja "O mnie" — slajdy wypełniają kadr, tekst mieści się między obrazkami */
#o-mnie .section-split { align-items: stretch; }
#o-mnie .section-split > .reveal { display: flex; flex-direction: column; }
#o-mnie .section-split > .reveal > p.lead { margin-bottom: 0; }
#o-mnie .portrait-frame {
  background: transparent; aspect-ratio: 472/476;
  width: min(100%, 476px); margin-right: auto; align-self: start;
}
#o-mnie .portrait-frame img { object-fit: contain; object-position: left center; }
#o-mnie .slideshow, #o-mnie .slideshow-frame { background: transparent; }
#o-mnie .slideshow { display: flex; align-self: center; }
#o-mnie .slideshow-frame { aspect-ratio: 1440/804; height: auto; }
#o-mnie .slide { object-fit: contain; }


/* Hero — filmik w portalu (animacja otwierania jak w grze Portal) */
.hero-portal {
  overflow: hidden;
  background: #05060d;
  animation: portalOpen 1.4s cubic-bezier(.22,.9,.28,1) both, floatY 6s ease-in-out infinite 1.6s;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-accent) 60%, transparent),
              0 0 30px color-mix(in srgb, var(--color-accent) 45%, transparent),
              var(--shadow-lg);
}
.hero-portal { width: min(460px, 88vw); aspect-ratio: auto; height: auto; border-radius: var(--radius-lg); }
.hero-portal .hero-video { width: 100%; height: auto; display: block; object-fit: contain; }
.hero-portal::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg); pointer-events: none;
  box-shadow: inset 0 0 26px 6px color-mix(in srgb, var(--color-accent) 70%, transparent),
              inset 0 0 60px 10px color-mix(in srgb, var(--color-accent-2, #ff9d2e) 35%, transparent);
  animation: portalGlow 3.2s ease-in-out infinite 1.4s;
}
@keyframes portalOpen {
  0%   { clip-path: inset(50% 50% 50% 50%); filter: brightness(3) saturate(1.6); }
  18%  { clip-path: inset(38% 49% 38% 49%); filter: brightness(2.4) saturate(1.5); }
  45%  { clip-path: inset(0% 46% 0% 46%); filter: brightness(1.7) saturate(1.3); }
  70%  { clip-path: inset(0% 22% 0% 22%); filter: brightness(1.2); }
  100% { clip-path: inset(0% 0% 0% 0%); filter: none; }
}
@keyframes portalGlow {
  0%, 100% { opacity: .75; }
  50%      { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-portal { animation: none; clip-path: none; }
  .hero-portal::after { animation: none; }
}

/* Przycisk dźwięku na filmie w hero */
.video-sound-btn {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(10,11,20,.65); backdrop-filter: blur(6px);
  color: #eaf6ff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-accent) 55%, transparent),
              0 0 16px color-mix(in srgb, var(--color-accent) 35%, transparent);
  transition: background .2s ease, transform .2s ease;
}
.video-sound-btn:hover { background: rgba(10,11,20,.85); transform: scale(1.06); }
.video-sound-btn svg { width: 24px; height: 24px; }
.video-sound-btn .icon-sound { display: none; }
.video-sound-btn[aria-pressed="true"] .icon-sound { display: block; }
.video-sound-btn[aria-pressed="true"] .icon-muted { display: none; }

/* — responsywność: dopracowanie dla telefonów, tabletów i dużych ekranów — */
img, video, svg { max-width: 100%; }
html { -webkit-text-size-adjust: 100%; }

/* duże ekrany */
@media (min-width: 1400px) {
  .section-inner, .nav { max-width: 1320px; }
}

/* tablety i mniejsze laptopy */
@media (max-width: 900px) {
  #o-mnie .section-split { grid-template-columns: 1fr; }
  #o-mnie .slideshow { align-self: stretch; }
  #o-mnie .portrait-frame { width: min(100%, 420px); }
  .hero-portal { width: min(360px, 78vw); }
}

/* telefony */
@media (max-width: 620px) {
  .section { padding-block: clamp(48px, 12vw, 72px); }
  .section-inner { padding-inline: 18px; }
  .hero-portal { width: min(300px, 72vw); }
  .services-grid { grid-template-columns: 1fr; }
  .hero-actions { width: 100%; }
  .hero-actions > * { flex: 1 1 auto; text-align: center; }
  .video-sound-btn { width: 44px; height: 44px; right: 10px; bottom: 10px; }
  .footer-social { flex-wrap: wrap; justify-content: center; }
}

/* bardzo małe telefony */
@media (max-width: 380px) {
  .nav-brand { font-size: 16px; }
  .hero-portal { width: min(260px, 80vw); }
  .section-inner { padding-inline: 14px; }
}

/* niskie ekrany / poziomo — film nie może zdominować widoku */
@media (max-height: 780px) and (min-width: 900px) {
  .hero-portal { width: min(320px, 26vw); }
}

/* — panel z obramowaniem pod tekstem (hero + o mnie): tło zasłania spadające cyfry — */
.text-panel {
  position: relative; z-index: 2;
  padding: var(--space-6);
  border: 1px solid color-mix(in srgb, var(--color-accent) 35%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--color-bg) 82%, transparent);
  backdrop-filter: blur(4px);
  box-shadow: 0 0 24px rgba(0,0,0,0.35);
}

.text-panel-inline { display: inline-block; padding: var(--space-4) var(--space-6); }

/* — responsywność nowych elementów — */
img, video, iframe { max-width: 100%; height: auto; }
.slideshow-frame img.slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }

@media (max-width: 900px) {
  .text-panel { padding: var(--space-4); }
}
@media (max-width: 620px) {
  .text-panel { padding: 14px; border-radius: 8px; }
  .text-panel-inline { padding: 12px 14px; }
  .nav { row-gap: 8px; }
}
@media (max-width: 380px) {
  .text-panel { padding: 12px; }
}

#o-mnie .slideshow-frame { aspect-ratio: 16 / 9; }

/* sekcja "O mnie": slajdy wypelniaja kadr - bez pasow tla */
#o-mnie .slideshow-frame img.slide { object-fit: contain; object-position: center; }

/* "O mnie": wszystkie slajdy tej samej wysokosci, skalowane po wysokosci */
#o-mnie .slideshow, #o-mnie .slideshow-frame { background: transparent; }
#o-mnie .slideshow-frame { aspect-ratio: 586 / 414; }
#o-mnie .slideshow-frame img.slide {
  width: auto; max-width: 100%; height: 100%;
  left: 50%; right: auto; transform: translateX(-50%);
  object-fit: contain;
}
#o-mnie.js .slideshow-frame img.slide, .js #o-mnie .slideshow-frame img.slide {
  transform: translateX(-50%) scale(1.05);
}
.js #o-mnie .slideshow-frame img.slide.is-active { transform: translateX(-50%) scale(1); }

/* slajd 1 i 2 rozciagniete na caly kadr (bez pasow tla) */
#o-mnie .slideshow-frame img.slide:nth-of-type(1),
#o-mnie .slideshow-frame img.slide:nth-of-type(2) {
  width: 100%; max-width: none; height: 100%; object-fit: fill;
}
