/* Wachty — czysty HTML, bez Elementora
   Design system z oryginału:
   - kolory: #000 (primary), #5A5A5A (secondary), #414141 (text), #0084FF (accent), #FFCC00 (highlight)
   - h1/h2: #000 ; h3/h4/h6: #1D1D1F ; h5: #2E2E2E
   - font: Roboto (300/400/500/600)
   - tło: #FFFFFF
*/

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }

/* --- Typografia --- */
:root {
  --c-primary:   #000000;
  --c-secondary: #5A5A5A;
  --c-text:      #414141;
  --c-accent:    #0084FF;
  --c-highlight: #FFCC00;
  --c-h345:      #1D1D1F;
  --c-h5:        #2E2E2E;
  --c-bg:        #FFFFFF;
  --c-soft:      #F5F5F7;
  --c-line:      #E8E8EA;

  --maxw: 1200px;
  --pad-x: clamp(20px, 4vw, 48px);
  --gap-y: clamp(48px, 8vw, 120px);

  --font: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

body {
  font-family: var(--font);
  font-weight: 300;
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .35em;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { color: var(--c-primary); font-size: clamp(40px, 6vw, 72px); font-weight: 700; letter-spacing: -0.02em; }
h2 { color: var(--c-primary); font-size: clamp(28px, 3.6vw, 44px); }
h3 { color: var(--c-h345); font-size: clamp(22px, 2.4vw, 30px); font-weight: 400; }
h4 { color: var(--c-h345); font-size: clamp(18px, 1.7vw, 22px); font-weight: 400; line-height: 1.45; }
h5 { color: var(--c-h5);   font-size: clamp(15px, 1.4vw, 18px); font-weight: 400; line-height: 1.65; }
h6 { color: var(--c-h345); font-size: 14px; font-weight: 400; text-transform: uppercase; letter-spacing: .12em; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
strong, b { font-weight: 600; color: var(--c-primary); }
ul { margin: 0 0 1em; padding-left: 1.3em; }
ul li { margin-bottom: .35em; }

a { color: var(--c-accent); text-decoration: none; transition: opacity .15s ease; }
a:hover { opacity: .7; }

.hl { color: var(--c-highlight); font-weight: 600; }

/* --- Layout --- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

section {
  padding-top: var(--gap-y);
  padding-bottom: var(--gap-y);
}

section + section { padding-top: 0; }

.section-title { text-align: center; margin-bottom: clamp(32px, 5vw, 64px); }
.section-title h1, .section-title h2 { margin-bottom: .25em; }
.section-title h3 { color: var(--c-secondary); font-weight: 300; }

.eyebrow { color: var(--c-accent); font-weight: 500; font-size: 14px; text-transform: uppercase; letter-spacing: .14em; margin-bottom: .8em; }

/* --- Topbar (lang switch) --- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--c-line);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.topbar-brand {
  font-weight: 600; color: var(--c-primary); font-size: 16px; letter-spacing: -0.01em;
}
.lang-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 14px;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-primary);
  background: #fff;
}
.lang-pill:hover { background: var(--c-soft); opacity: 1; }

/* --- Hero --- */
.hero {
  text-align: center;
  padding-top: clamp(60px, 10vw, 140px);
  padding-bottom: clamp(40px, 6vw, 80px);
}
.hero .logo {
  width: clamp(110px, 14vw, 160px);
  margin: 0 auto 28px;
  border-radius: clamp(22px, 3vw, 36px);
  overflow: hidden;
  box-shadow: 0 18px 50px -16px rgba(0,0,0,.18);
}
.hero h1 { margin-bottom: .12em; }
.hero h3 { color: var(--c-secondary); font-weight: 300; margin-bottom: 1.4em; }
.hero .lede {
  max-width: 760px; margin: 0 auto 2em;
  color: var(--c-text); font-weight: 300;
}

/* App Store badge */
.app-store-badge {
  display: inline-block;
  background: #000;
  color: #fff;
  padding: 14px 28px 14px 56px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 18px;
  position: relative;
  letter-spacing: -0.01em;
}
.app-store-badge::before {
  content: "";
  position: absolute; left: 22px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 26px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 28' fill='white'><path d='M17.05 14.85c-.03-3.2 2.62-4.75 2.74-4.83-1.5-2.19-3.83-2.49-4.66-2.52-1.98-.2-3.86 1.17-4.86 1.17-1.01 0-2.55-1.14-4.2-1.11-2.16.03-4.15 1.26-5.26 3.19-2.24 3.88-.57 9.62 1.61 12.78 1.07 1.55 2.34 3.28 4.01 3.22 1.61-.07 2.22-1.04 4.17-1.04 1.95 0 2.49 1.04 4.19 1.01 1.73-.03 2.83-1.57 3.88-3.13 1.23-1.79 1.74-3.55 1.76-3.64-.04-.02-3.35-1.29-3.38-5.1zM14.18 5.48c.87-1.07 1.46-2.55 1.3-4.03-1.26.05-2.78.84-3.69 1.9-.81.94-1.52 2.45-1.33 3.91 1.41.11 2.85-.72 3.72-1.78z'/></svg>") no-repeat center / contain;
}
.app-store-badge:hover { opacity: .85; }
.app-store-badge small { display: block; font-size: 11px; font-weight: 400; opacity: .85; letter-spacing: 0; margin-bottom: 2px; }

/* --- Intro block (algorytm precyzji) --- */
.intro {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  padding-top: clamp(60px, 8vw, 100px);
  padding-bottom: clamp(60px, 8vw, 100px);
  border-top: 1px solid var(--c-line);
}
.intro h2 { margin-bottom: .5em; }
.intro h5 { font-weight: 300; color: var(--c-text); font-size: clamp(16px, 1.45vw, 19px); }
.intro-image { display: flex; justify-content: center; }
.intro-image img { max-height: 640px; width: auto; }

@media (max-width: 860px) {
  .intro { grid-template-columns: 1fr; }
  .intro-image { order: -1; }
  .intro-image img { max-height: 460px; }
}

/* --- Features grid (4 panels) --- */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(40px, 5vw, 72px);
}
.feature {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 24px;
  text-align: left;
}
.feature .shot {
  background: var(--c-soft);
  border-radius: 28px;
  padding: 32px;
  display: flex; align-items: center; justify-content: center;
  min-height: 320px;
}
.feature .shot img { max-height: 480px; width: auto; }
.feature h2 { font-size: clamp(22px, 2.2vw, 28px); }
.feature .body { color: var(--c-text); font-size: 16px; }

@media (max-width: 760px) {
  .features { grid-template-columns: 1fr; }
}

/* --- Scenario rows (alternating image / text) --- */
.scenario {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  padding: clamp(40px, 6vw, 80px) 0;
}
.scenario:nth-child(even) .scenario-image { order: 2; }
.scenario-image {
  background: var(--c-soft);
  border-radius: 32px;
  padding: 40px;
  display: flex; justify-content: center; align-items: center;
  min-height: 520px;
}
.scenario-image img { max-height: 560px; width: auto; }
.scenario-text h2 { margin-bottom: .6em; }
.scenario-text .lead { font-size: 18px; color: var(--c-primary); font-weight: 500; margin-bottom: 1em; }

@media (max-width: 860px) {
  .scenario { grid-template-columns: 1fr; }
  .scenario:nth-child(even) .scenario-image { order: -1; }
  .scenario-image { min-height: 360px; padding: 24px; }
  .scenario-image img { max-height: 420px; }
}

/* --- Single-image hero blocks (bosun, to-ja) --- */
.spotlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  padding: clamp(40px, 6vw, 80px) 0;
}
.spotlight.reverse .spotlight-image { order: 2; }
.spotlight-image {
  background: linear-gradient(180deg, var(--c-soft), #ECECEF);
  border-radius: 32px;
  padding: 40px;
  display: flex; justify-content: center; align-items: center;
  min-height: 520px;
}
.spotlight-image img { max-height: 560px; width: auto; }
@media (max-width: 860px) {
  .spotlight { grid-template-columns: 1fr; }
  .spotlight.reverse .spotlight-image { order: -1; }
  .spotlight-image { min-height: 360px; padding: 24px; }
  .spotlight-image img { max-height: 420px; }
}

/* --- Light/Dark two-image showcase --- */
.themes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: clamp(32px, 4vw, 56px);
}
.themes-grid figure {
  margin: 0;
  border-radius: 32px;
  padding: 40px;
  display: flex; justify-content: center; align-items: center;
  min-height: 520px;
}
.themes-grid .light { background: linear-gradient(180deg, #f5f5f7, #e8e8ea); }
.themes-grid .dark  { background: linear-gradient(180deg, #1d1d1f, #000); }
.themes-grid img { max-height: 560px; width: auto; }
@media (max-width: 760px) {
  .themes-grid { grid-template-columns: 1fr; }
  .themes-grid figure { min-height: 380px; padding: 24px; }
  .themes-grid img { max-height: 420px; }
}

/* --- Steps (creator) --- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 3.5vw, 48px);
  margin-top: clamp(32px, 4vw, 56px);
}
.step {
  display: flex; flex-direction: column;
}
.step .shot {
  background: var(--c-soft);
  border-radius: 28px;
  padding: 32px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
  min-height: 460px;
}
.step .shot img { max-height: 480px; width: auto; }
.step h2 { font-size: clamp(20px, 2vw, 26px); margin-bottom: .5em; }
.step .body { font-size: 15px; }

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
}

/* --- PRO section --- */
.pro-intro {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}
.pro-banner {
  margin: clamp(40px, 5vw, 72px) auto 0;
  border-radius: 32px;
  overflow: hidden;
  max-width: 1000px;
}
.pro-banner img { width: 100%; height: auto; display: block; }

.pro-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 3.5vw, 48px);
  margin-top: clamp(40px, 5vw, 80px);
}
.pro-card .shot {
  background: var(--c-soft);
  border-radius: 24px;
  padding: 28px;
  margin-bottom: 24px;
  min-height: 380px;
  display: flex; align-items: center; justify-content: center;
}
.pro-card .shot img { max-height: 400px; width: auto; }
.pro-card h2 { font-size: clamp(20px, 1.9vw, 24px); margin-bottom: .5em; }
.pro-card .body { font-size: 15px; }

@media (max-width: 860px) {
  .pro-features { grid-template-columns: 1fr; }
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--c-line);
  padding: 56px 0 64px;
  margin-top: clamp(60px, 8vw, 100px);
  text-align: center;
}
.site-footer .app-store-badge { margin-bottom: 32px; }
.site-footer nav {
  display: flex; justify-content: center; gap: 28px;
  flex-wrap: wrap;
  font-size: 14px;
}
.site-footer nav a { color: var(--c-secondary); }
.site-footer .copy {
  margin-top: 24px;
  color: var(--c-secondary);
  font-size: 13px;
}

/* --- Privacy page --- */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(60px, 8vw, 100px) 0;
}
.legal h1 { font-size: clamp(36px, 4.5vw, 56px); margin-bottom: .3em; }
.legal h6 { color: var(--c-secondary); margin-bottom: 1.4em; }
.legal h4 { color: var(--c-text); font-weight: 300; margin-bottom: 2em; }
.legal hr { border: none; border-top: 1px solid var(--c-line); margin: 2.5em 0; }
.legal h2 { font-size: clamp(20px, 1.9vw, 24px); margin: 1.8em 0 .6em; }
.legal p, .legal ul { font-size: 16px; }
.legal a { color: var(--c-accent); }
.legal .back {
  display: inline-block;
  margin-top: 2em;
  padding: 10px 22px;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-primary);
}
.legal .back:hover { background: var(--c-soft); opacity: 1; }

/* ===========================================================
   ANIMACJE I MIKRO-INTERAKCJE
   =========================================================== */

/* --- Reveal on scroll: elementy wjeżdżają od dołu z lekkim fade-in --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 700ms cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 700ms cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: none;
}
/* Stagger — kolejne karty wjeżdżają z opóźnieniem 80ms */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 700ms cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 700ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal-stagger.in > *:nth-child(1) { transition-delay:    0ms; opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(2) { transition-delay:  100ms; opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(3) { transition-delay:  200ms; opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(4) { transition-delay:  300ms; opacity: 1; transform: none; }

/* --- Hero: powolne wjechanie logo + stagger nagłówków --- */
.hero .logo,
.hero h1,
.hero h3,
.hero h4,
.hero .app-store-badge {
  opacity: 0;
  transform: translateY(20px);
  animation: hero-rise 900ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
.hero .logo            { animation-delay:   0ms; }
.hero h1               { animation-delay: 150ms; }
.hero h3               { animation-delay: 280ms; }
.hero h4               { animation-delay: 380ms; }
.hero .app-store-badge { animation-delay: 480ms; }

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

/* Subtelne unoszenie się logo — delikatny ruch, jak boja na fali */
.hero .logo {
  animation-name: hero-rise, logo-float;
  animation-duration: 900ms, 6s;
  animation-delay: 0ms, 900ms;
  animation-iteration-count: 1, infinite;
  animation-direction: normal, alternate;
  animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1), ease-in-out;
  animation-fill-mode: forwards, none;
}
@keyframes logo-float {
  from { transform: translateY(0); }
  to   { transform: translateY(-8px); }
}

/* --- Topbar: subtelne skurczenie się na scroll --- */
.topbar { transition: background 250ms ease, box-shadow 250ms ease; }
.topbar.scrolled {
  background: rgba(255,255,255,.92);
  box-shadow: 0 1px 0 var(--c-line), 0 4px 24px -16px rgba(0,0,0,.18);
}

/* --- Hover na kartach: lekki lift + zoom na zdjęciu telefonu --- */
.feature .shot,
.scenario-image,
.spotlight-image,
.step .shot,
.pro-card .shot,
.themes-grid figure {
  transition: transform 400ms cubic-bezier(0.22, 0.61, 0.36, 1),
              box-shadow 400ms ease;
}
.feature:hover .shot,
.step:hover .shot,
.pro-card:hover .shot {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px -28px rgba(0,0,0,.22);
}

.feature .shot img,
.scenario-image img,
.spotlight-image img,
.step .shot img,
.pro-card .shot img,
.themes-grid img {
  transition: transform 600ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.feature:hover .shot img,
.step:hover .shot img,
.pro-card:hover .shot img,
.scenario:hover .scenario-image img,
.spotlight:hover .spotlight-image img {
  transform: scale(1.025);
}

/* --- App Store badge: subtelny lift + scale na hover --- */
.app-store-badge {
  transition: transform 250ms cubic-bezier(0.22, 0.61, 0.36, 1),
              box-shadow 250ms ease,
              opacity 150ms ease;
  box-shadow: 0 8px 24px -10px rgba(0,0,0,.35);
}
.app-store-badge:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 30px -10px rgba(0,0,0,.4);
  opacity: 1;
}
.app-store-badge:active { transform: translateY(0) scale(0.99); }

/* --- Lang pill: lift na hover --- */
.lang-pill {
  transition: transform 200ms ease, background 200ms ease, border-color 200ms ease;
}
.lang-pill:hover {
  transform: translateY(-1px);
  border-color: var(--c-primary);
}

/* --- Eyebrow (mały podtytuł): delikatny shimmer akcentu --- */
.eyebrow {
  position: relative;
  display: inline-block;
}

/* --- Linki w treści: animowane podkreślenie --- */
.legal a,
.site-footer nav a {
  position: relative;
  display: inline-block;
}
.legal a::after,
.site-footer nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 280ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.legal a:hover::after,
.site-footer nav a:hover::after {
  transform: scaleX(1);
}

/* --- Highlight "To Ja" / "It's Me": żółty tekst jak w oryginale --- */
.hl {
  color: var(--c-highlight);
  font-weight: 600;
}

/* --- Lightbox: kliknięcie w screenshot otwiera go na środku ekranu --- */
.zoomable { cursor: zoom-in; }

#lightbox[open] {
  position: fixed;
  inset: 0;
  width: 100vw; height: 100vh;
  max-width: none; max-height: none;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
#lightbox img {
  max-width: min(92vw, 800px);
  max-height: 92vh;
  width: auto; height: auto;
  border-radius: 12px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.35);
  cursor: zoom-out;
  /* FLIP: skrypt nadpisuje transform na czas animacji */
  transform-origin: center;
  will-change: transform;
}
#lightbox::backdrop {
  background: rgba(255, 255, 255, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: background 320ms ease, backdrop-filter 320ms ease, -webkit-backdrop-filter 320ms ease;
}
#lightbox[open]::backdrop {
  background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}
#lightbox.closing::backdrop {
  background: rgba(255, 255, 255, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
}
#lightbox .lb-close {
  position: absolute;
  top: clamp(16px, 3vw, 32px);
  right: clamp(16px, 3vw, 32px);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.1);
  color: #000;
  font-size: 22px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 200ms ease, transform 200ms ease;
}
#lightbox .lb-close:hover { background: rgba(0,0,0,.12); transform: scale(1.05); }

/* --- Respektuj preferencję wyłączonych animacji --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; }
  .hero .logo, .hero h1, .hero h3, .hero h4, .hero .app-store-badge { opacity: 1; transform: none; }
}
