/* Home Motion — paleta „blue hour”: niebieska godzina za oknem, ciepłe światło w środku */
:root {
  --night: #121b2e;
  --dusk: #2a3b5c;
  --plaster: #edefec;
  --paper: #f7f8f6;
  --ink: #182132;
  --slate: #5e6879;
  --window: #f0a93b;
  --window-deep: #c9831c;

  --f: "Archivo", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--plaster);
  color: var(--ink);
  font-family: var(--f);
  font-variation-settings: "wdth" 100;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
:focus-visible { outline: 3px solid var(--window); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 50; background: var(--paper); padding: 8px 12px; }

/* ---------- Nagłówek ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; gap: 32px;
  padding: 18px var(--gutter);
  color: #fff;
  transition: background .3s, color .3s, padding .3s;
}
.top.solid { background: rgba(237,239,236,.94); color: var(--ink); padding-block: 12px; backdrop-filter: blur(8px); box-shadow: 0 1px 0 rgba(24,33,50,.08); }
.logo {
  font-weight: 800; font-variation-settings: "wdth" 125;
  font-size: 19px; letter-spacing: -.01em; text-decoration: none;
}
.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a { text-decoration: none; font-size: 15px; opacity: .85; }
.nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }
.top-phone {
  font-weight: 700; text-decoration: none; font-size: 15px;
  padding: 9px 16px; border-radius: 999px;
  background: var(--window); color: var(--night);
}
.top-phone:hover { background: #ffbf55; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid; align-items: end;
  color: #fff;
  background: var(--night);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; }
.hero-video, .hero-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-video { z-index: 1; }
.hero-video.missing { display: none; }
/* zastępstwo, dopóki nie ma showreela: zmierzch i ciepłe okna */
.hero-fallback {
  background:
    radial-gradient(40% 30% at 74% 66%, rgba(240,169,59,.42), transparent 70%),
    radial-gradient(18% 14% at 58% 72%, rgba(240,169,59,.3), transparent 70%),
    linear-gradient(180deg, #1d2f52 0%, #33466e 38%, #5a5f7d 62%, #121b2e 100%);
}
.hero-media::after { /* przyciemnienie dołu pod tekst */
  content: ""; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(180deg, rgba(18,27,46,.45) 0%, rgba(18,27,46,0) 30%, rgba(18,27,46,0) 45%, rgba(18,27,46,.88) 100%);
}

/* wizjer — jedyny „głośny” element strony */
.viewfinder { position: absolute; inset: clamp(72px, 9vh, 96px) var(--gutter) clamp(20px, 4vh, 40px); z-index: 3; pointer-events: none; }
.vf-c { position: absolute; width: 34px; height: 34px; border: 0 solid rgba(255,255,255,.85); }
.vf-tl { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.vf-tr { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.vf-bl { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.vf-br { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }
.vf-rec {
  position: absolute; top: 14px; right: 18px;
  font-size: 13px; font-weight: 600; letter-spacing: .04em; font-variant-numeric: tabular-nums;
  display: flex; align-items: center; gap: 8px; opacity: .9;
}
.vf-rec i { width: 9px; height: 9px; border-radius: 50%; background: #ff4d3d; animation: blink 1.2s steps(2) infinite; }
.vf-rec b { font-weight: 600; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .vf-rec i { animation: none; } }

.hero-copy {
  position: relative; z-index: 4;
  width: 100%;
  padding: 0 calc(var(--gutter) + 40px) clamp(96px, 15vh, 150px);
}
.hero h1 {
  margin: 0 0 18px;
  max-width: 13ch;
  font-weight: 800;
  font-variation-settings: "wdth" 118;
  font-size: clamp(40px, 7.2vw, 96px);
  line-height: .98; letter-spacing: -.025em;
  text-wrap: balance;
}
.lede { margin: 0 0 30px; max-width: 46ch; font-size: clamp(17px, 1.6vw, 20px); opacity: .92; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 24px; border-radius: 999px;
  font: 700 16px/1 var(--f); text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--window); color: var(--night); }
.btn-primary:hover { background: #ffbf55; }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }

.scroll-cue {
  position: absolute; z-index: 4; left: 50%; bottom: clamp(30px, 5vh, 52px); transform: translateX(-50%);
  font-size: 13px; text-decoration: none; opacity: .75;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.scroll-cue::after { content: ""; width: 1px; height: 28px; background: currentColor; animation: cue 2s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .scroll-cue::after { animation: none; } }

/* ---------- Fakty ---------- */
.facts { background: var(--night); color: #fff; padding: 34px var(--gutter); }
.facts dl { margin: 0 auto; max-width: var(--max); display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.facts dt { font-weight: 800; font-variation-settings: "wdth" 120; font-size: clamp(26px, 3vw, 38px); line-height: 1; color: var(--window); }
.facts dd { margin: 6px 0 0; opacity: .8; font-size: 15px; }

/* ---------- Sekcje ---------- */
section:not(.hero):not(.facts) { padding: clamp(72px, 10vw, 128px) var(--gutter); }
.section-head { max-width: var(--max); margin: 0 auto 40px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 32px; }
.section-head h2 {
  margin: 0; font-weight: 800; font-variation-settings: "wdth" 118;
  font-size: clamp(34px, 4.6vw, 60px); line-height: 1; letter-spacing: -.02em;
}
.section-head p { margin: 0; color: var(--slate); max-width: 44ch; }

/* Realizacje */
.work-grid {
  list-style: none; margin: 0 auto; padding: 0; max-width: var(--max);
  display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 260px; gap: 14px;
}
.w figure { margin: 0; height: 100%; position: relative; overflow: hidden; border-radius: 6px; background: var(--dusk); }
.w-wide { grid-column: span 2; }
.w-tall { grid-row: span 2; }
.ph { position: absolute; inset: 0; transition: transform .6s ease; }
.w:hover .ph { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) { .ph { transition: none; } .w:hover .ph { transform: none; } }
.ph-1 { background: linear-gradient(160deg, #c9b79c, #8d7a62 60%, #3b3329); }
.ph-2 { background: linear-gradient(180deg, #8fb0c9, #6f8d5c 55%, #3d5232); }
.ph-3 { background: linear-gradient(140deg, #e7e2da, #b9b0a3 70%, #7b7266); }
.ph-4 { background: linear-gradient(200deg, #2a3b5c, #121b2e 70%), radial-gradient(circle at 40% 70%, var(--window), transparent 40%); }
.ph-5 { background: linear-gradient(180deg, #33466e, #5a5f7d 50%, #f0a93b 140%); }
.w figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 16px;
  color: #fff; background: linear-gradient(transparent, rgba(18,27,46,.85));
  display: flex; flex-direction: column; gap: 2px;
}
.w figcaption strong { font-size: 16px; }
.w figcaption span { font-size: 14px; opacity: .8; }
.after-work { max-width: var(--max); margin: 28px auto 0; color: var(--slate); }
.after-work a { color: var(--ink); font-weight: 700; text-underline-offset: 4px; }

/* Usługi */
.services { background: var(--paper); }
.svc-list { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 56px; }
.svc { padding: 28px 0; border-top: 2px solid var(--ink); }
.svc h3 { margin: 0 0 8px; font-size: 24px; font-weight: 750; font-variation-settings: "wdth" 112; }
.svc p { margin: 0; color: var(--slate); max-width: 52ch; }

/* Proces */
.steps {
  list-style: none; counter-reset: s; margin: 0 auto; padding: 0; max-width: var(--max);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
}
.steps li { counter-increment: s; }
.steps li::before {
  content: counter(s); display: block; margin-bottom: 14px;
  font-weight: 800; font-variation-settings: "wdth" 125; font-size: 44px; line-height: 1; color: var(--window-deep);
}
.steps h3 { margin: 0 0 6px; font-size: 19px; }
.steps p { margin: 0; color: var(--slate); font-size: 16px; }
.kit { max-width: var(--max); margin: 48px auto 0; color: var(--slate); font-size: 15px; }

/* Kontakt */
.contact {
  background: var(--night); color: #fff;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px;
  padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2)) !important;
}
.contact h2 { margin: 0 0 12px; font-weight: 800; font-variation-settings: "wdth" 118; font-size: clamp(38px, 5vw, 64px); line-height: 1; letter-spacing: -.02em; }
.contact-call > p { margin: 0 0 28px; opacity: .8; max-width: 40ch; }
.big-phone {
  display: inline-block; text-decoration: none; color: var(--window);
  font-weight: 800; font-variation-settings: "wdth" 110; font-variant-numeric: tabular-nums;
  font-size: clamp(34px, 5vw, 60px); line-height: 1.05;
  border-bottom: 3px solid transparent;
}
.big-phone:hover { border-bottom-color: var(--window); }
.contact-alt { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px 28px; }
.contact-alt a { opacity: .85; text-underline-offset: 4px; }

.quote { background: #fff; color: var(--ink); border-radius: 8px; padding: 28px; display: grid; gap: 16px; align-content: start; }
.quote h3 { margin: 0 0 4px; font-size: 19px; line-height: 1.3; }
.quote label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.quote input:not([type=checkbox]) {
  font: 400 16px var(--f); color: var(--ink);
  padding: 12px 14px; border: 1.5px solid #c9ced6; border-radius: 6px; background: var(--paper);
}
.quote input:focus { border-color: var(--ink); outline: none; }
.quote fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.quote legend { font-size: 14px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.chk { display: inline-flex !important; grid-auto-flow: column; align-items: center; gap: 8px; font-weight: 500 !important; padding: 8px 14px; border: 1.5px solid #c9ced6; border-radius: 999px; cursor: pointer; }
.chk:has(input:checked) { border-color: var(--ink); background: var(--ink); color: #fff; }
.chk input { accent-color: var(--window); margin: 0; }
.quote .btn { justify-self: start; }
.form-note { margin: 0; font-size: 14px; color: var(--slate); min-height: 1em; }

.foot { display: flex; justify-content: space-between; padding: 22px var(--gutter); font-size: 14px; color: var(--slate); }

/* Pasek kontaktu na telefonie */
.dock { display: none; }

/* ---------- Responsywność ---------- */
@media (max-width: 900px) {
  .nav { display: none; }
  .top { justify-content: space-between; }
  .work-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 200px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .contact { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; padding-bottom: 76px; }
  .top-phone { display: none; }
  .hero-copy { padding-inline: calc(var(--gutter) + 12px); padding-bottom: 110px; }
  .hero-actions { display: none; }
  .scroll-cue { display: none; }
  .vf-c { width: 22px; height: 22px; }
  .facts dl { grid-template-columns: 1fr; gap: 16px; }
  .work-grid { grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .w-wide, .w-tall { grid-column: auto; grid-row: auto; }
  .svc-list, .steps { grid-template-columns: 1fr; }
  .quote { padding: 20px; }
  .dock {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(18,27,46,.96); color: #fff;
  }
  .dock .btn { min-height: 48px; padding: 0 12px; }
}
