/* 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; }
.reveal-delay-2 { transition-delay: 0.15s; }

/* — 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 — */
.services-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 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; }

/* — 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;
  }
}
