/* OpenSped – strona „w budowie” (jeden ekran, filmik w tle) */
:root {
  --bg: #111315;
  --panel: #1a1d20;
  --text: #f1f3f4;
  --muted: #a9b1b7;
  --green: #56cf22;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  overflow-x: hidden;
}

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  max-width: calc(130vh + 560px);
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
}

/* Filmik w tle – prawa część ekranu (jak na grafice LinkedIn), wygaszony w stronę tekstu */
.stage {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,.42) 0, rgba(0,0,0,.5) 22%, #000 46%);
          mask-image: linear-gradient(to right, rgba(0,0,0,.42) 0, rgba(0,0,0,.5) 22%, #000 46%);
}
.stage video {
  position: absolute;
  top: 0; right: 0;
  height: 100%;
  width: auto;
  aspect-ratio: 16 / 9;
  display: block;
}

.copy {
  position: relative;
  z-index: 2;
  width: min(440px, 38vw);
  margin-left: clamp(24px, 4vw, 64px);
  margin-top: clamp(24px, 5vh, 56px);
  text-shadow: 0 2px 14px rgba(17, 19, 21, .95), 0 0 4px rgba(17, 19, 21, .8);
}

/* Miękkie przyciemnienie tylko za tekstem – reszta kadru zostaje widoczna */
.copy::before {
  content: "";
  position: absolute;
  inset: -70px -90px -70px -120px;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(17, 19, 21, .86) 0, rgba(17, 19, 21, .7) 55%, rgba(17, 19, 21, 0) 100%);
  pointer-events: none;
}
.copy { isolation: isolate; }

.logo {
  display: block;
  width: 100%;
  max-width: 400px;
  height: auto;
  margin-bottom: 28px;
}

h1 {
  font-size: clamp(30px, 3.3vw, 50px);
  line-height: 1.12;
  letter-spacing: -.02em;
  margin: 0 0 22px;
  font-weight: 800;
}

.lead {
  font-size: clamp(16px, 1.4vw, 21px);
  color: var(--text);
  margin: 0 0 10px;
  max-width: 24em;
}

.domain {
  margin: 0;
  color: var(--muted);
  font-size: clamp(15px, 1.2vw, 18px);
  letter-spacing: .02em;
}

.sound {
  position: absolute;
  right: 20px;
  bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 19, 21, .82);
  color: #fff;
  font: 600 15px/1 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  cursor: pointer;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .15);
  transition: background .2s, transform .2s;
}
.sound:hover { background: rgba(17, 19, 21, .95); transform: translateY(-1px); }
.sound:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.sound .ico { font-size: 18px; }

/* Kaczka – dyskretnie wystaje zza dolnej krawędzi ekranu */
.duck {
  position: fixed;
  left: 20px;
  bottom: 16px;
  width: 30px;
  opacity: .6;
  transform-origin: bottom left;
  transition: transform .35s ease, opacity .35s ease;
  z-index: 5;
  outline: none;
}
.duck img { display: block; width: 100%; height: auto; }
.duck:hover, .duck:focus-visible { transform: scale(1.6); opacity: 1; }
.duck .note {
  position: absolute;
  left: 115%;
  bottom: 55%;
  white-space: nowrap;
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.duck:hover .note, .duck:focus-visible .note { opacity: 1; }

/* Bardzo szerokie monitory: wygaszenie filmiku także z prawej */
@media (min-aspect-ratio: 21/10) {
  .stage {
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,.42) 0, rgba(0,0,0,.5) 22%, #000 46%, #000 90%, transparent 100%);
            mask-image: linear-gradient(to right, rgba(0,0,0,.42) 0, rgba(0,0,0,.5) 22%, #000 46%, #000 90%, transparent 100%);
  }
  .sound { right: 14%; }
}

/* Telefon, tablet, ekran bliski kwadratu: filmik u góry, tekst pod nim */
@media (max-aspect-ratio: 3/2), (max-width: 760px) {
  .hero { flex-direction: column; align-items: stretch; max-width: none; }
  .stage {
    position: relative;
    width: 100%;
    max-height: 62vh;
    aspect-ratio: 16 / 9;
    -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
            mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
  }
  .stage video { position: static; width: 100%; height: 100%; object-fit: cover; }
  .copy::before { display: none; }
  .copy { width: auto; margin: auto 24px; padding: 8px 0 56px; text-align: center; }
  .logo { margin: 0 auto 26px; max-width: 340px; }
  .lead { margin-left: auto; margin-right: auto; }
  h1 { font-size: clamp(28px, 6.5vw, 44px); margin-bottom: 14px; }
  .sound { right: auto; bottom: auto; left: 10px; top: 10px; padding: 8px 12px; font-size: 14px; }
  .duck { width: 26px; left: auto; right: 14px; bottom: 14px; transform-origin: bottom right; }
  .duck .note { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .duck, .sound { transition: none; }
}
