/* Hero: brama pod palcem + kolor falą + reflektory */
@property --x { syntax: '<percentage>'; inherits: false; initial-value: 50%; }
.hb { position: relative; height: 100vh; height: 100svh; min-height: 560px; background: #0b1220; --p: 0; }
.hb-scena { position: relative; height: 100%; overflow: hidden; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.hb-scena.ciagnie { cursor: grabbing; }
.hb-plotno { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hb-swiatlo { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light;
  background: radial-gradient(34vmax 22vmax at var(--x, 50%) var(--y, 62%), rgba(255,231,196,.55), rgba(255,231,196,0) 70%); }
.hb-swiatlo.sam { animation: hb-reflektor 9s ease-in-out infinite alternate; --y: 64%; }
@keyframes hb-reflektor { from { --x: 18%; } to { --x: 82%; } }
.hb-scena::before { content: ""; position: absolute; left: -10%; right: -10%; bottom: 6%; height: 22%; pointer-events: none; z-index: 1;
  background: radial-gradient(50% 60% at 30% 60%, rgba(200,214,235,.16), transparent 70%), radial-gradient(45% 55% at 75% 50%, rgba(200,214,235,.12), transparent 70%);
  filter: blur(14px); animation: hb-mgla 26s linear infinite alternate; }
@keyframes hb-mgla { from { transform: translateX(-4%); } to { transform: translateX(4%); } }
.hb-scena::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(8,12,20,.62) 0%, rgba(8,12,20,.1) 34%, rgba(8,12,20,0) 55%, rgba(8,12,20,.45) 100%); }

.hb-tresc { position: absolute; z-index: 3; left: 0; right: 0; top: clamp(20px, 5vh, 56px); color: #fff;
  opacity: calc(1 - var(--p) * 0.55); transform: translateY(calc(var(--p) * -24px)); pointer-events: none; }
.hb-tresc a, .hb-tresc button { pointer-events: auto; }   /* przycisk „Zaprojektuj ogrodzenie” klikalny mimo płótna bramy */
.hb-tresc h1 { margin: 10px 0 8px; font-size: clamp(30px, 4.6vw, 64px); line-height: 1.02; letter-spacing: -.025em; max-width: 14ch; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.hb-tresc h1 em { font-style: normal; color: var(--miedz, #E39A63); }
.hb-pod { margin: 0; font-size: 13px; letter-spacing: .08em; color: rgba(255,255,255,.78); }

.hb-dol { position: absolute; z-index: 3; left: 0; right: 0; bottom: clamp(18px, 4vh, 40px); color: #fff; }
.hb-dol-w { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.hb-kolory { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 14px; border-radius: 999px; background: rgba(10,14,22,.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.12); }
.hb-kolory > span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.7); margin-right: 4px; }
.hb-kropka { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); cursor: pointer; padding: 0; background: var(--k); transition: transform .2s, border-color .2s, box-shadow .2s; }
.hb-kropka:hover { transform: scale(1.1); }
.hb-kropka[aria-checked="true"] { border-color: var(--miedz, #E39A63); box-shadow: 0 0 0 3px rgba(var(--miedz-rgb, 227, 154, 99),.3); }
.hb-kropka:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.hb-otworz { display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 20px; border-radius: 999px; border: 0; cursor: pointer; font: 600 15px/1 inherit; font-family: inherit; color: #11161d; background: var(--miedz, #E39A63); }
.hb-cta { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; height: 52px; padding: 0 26px; border-radius: 999px; font-weight: 600; font-size: 16px; color: #11161d; background: var(--miedz, #E39A63); text-decoration: none; box-shadow: 0 10px 30px rgba(227,154,99,.28); transition: transform .2s, background .2s; }
.hb-cta:hover { background: var(--miedz-jasna, #F2B98A); transform: translateY(-1px); }
.hb-cta:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.hb-otworz:hover { background: var(--miedz-jasna, #F2B98A); }
.hb-wskazowka { font-size: 12px; letter-spacing: .08em; color: rgba(255,255,255,.7); }

.hb-ral { position: absolute; z-index: 3; right: clamp(16px, 6vw, 96px); top: 41%; font-size: 12px; letter-spacing: .14em; color: var(--miedz-jasna, #F2B98A);
  padding-left: 46px; white-space: nowrap; opacity: calc(1 - var(--p) * 3); }
.hb-ral::before { content: ""; position: absolute; left: 0; top: 50%; width: 38px; height: 1px; background: var(--miedz, #E39A63); transform-origin: left; }
.hb-ral.pisze { animation: hb-pisz .9s steps(26) both; }
.hb-ral.pisze::before { animation: hb-kreska .35s ease-out both; }
@keyframes hb-pisz { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes hb-kreska { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (max-width: 700px) {
  .hb-ral { top: auto; bottom: 150px; right: 16px; }
  .hb-wskazowka { display: none; }
  .hb-kropka { width: 34px; height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .hb-swiatlo.sam, .hb-scena::before { animation: none; }
}

/* poświata z otwartego podjazdu */
.hb-poswiata { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; opacity: calc(var(--p) * .9);
  background: radial-gradient(38% 26% at 66% 86%, rgba(255,196,128,.34), transparent 72%), radial-gradient(30% 40% at 62% 58%, rgba(255,214,160,.16), transparent 70%); }
.hb-wskazowka { opacity: calc(1 - var(--p) * 2); display: inline-flex; align-items: center; gap: 8px; }
.hb-reka { display: inline-block; color: var(--miedz, #E39A63); animation: hb-reka 1.8s ease-in-out infinite; }
@keyframes hb-reka { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-6px); } }
.hb-dzwiek { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: rgba(10,14,22,.5); color: #fff; cursor: pointer; display: grid; place-items: center; padding: 0; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hb-dzwiek svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hb-dzwiek svg path:first-child { fill: currentColor; }
.hb-dzwiek[aria-pressed="false"] .fala { opacity: .15; }
.hb-dzwiek:focus-visible, .hb-otworz:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .hb-reka { animation: none; } }

/* 17.11 po południu: telefon = zwarty pierwszy ekran: napis, cała brama w kadrze, przyciski; konfigurator zaraz pod spodem */
@media (max-width: 700px) {
  .hb { height: auto; min-height: 0; }
  .hb-scena { height: auto; display: flex; flex-direction: column; padding: 22px 0 18px; }
  .hb-tresc { position: relative; top: auto; order: 0; }
  .hb-tresc h1 { font-size: 34px; margin-bottom: 6px; }
  .hb-cta { margin-top: 16px; }
  .hb-plotno { position: relative; inset: auto; order: 1; height: auto; aspect-ratio: 4 / 3; margin-top: 14px;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 90%, transparent); mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 90%, transparent); }
  .hb-dol { position: relative; bottom: auto; order: 2; margin-top: 2px; }
  .hb-ral { display: none; }
  .hb-otworz { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.22); }
  .hb-scena::after { background: none; }
  .hb-dol-w { flex-wrap: nowrap; gap: 10px; }
  .hb-kolory > span { display: none; }
  .hb-kolory { padding: 6px 8px; gap: 8px; }
  .hb .hb-wskazowka { display: none; }
  .hb-dzwiek { margin-left: auto; flex: none; }
}
@media (max-width: 700px) { .hb-otworz { white-space: nowrap; padding: 0 16px; } }
@media (max-width: 380px) { .hb-kropka { width: 30px; height: 30px; } .hb-kolory { gap: 6px; } }
