/* ═══════════════════════════════════════════════════════════════
   Header: pytanie, wyszukiwarka i plan geodezyjny, na którym działki
   pokazują po kolei trzy możliwe wyniki Karty działki.
   ═══════════════════════════════════════════════════════════════ */
.hr {
  --ink: #032d90;
  --chalk: #eaf1ff;
  --pen: #ffc83d;
  --ok: #7ee2a8;
  --no: #ff8a75;
  color: #fff;
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(255,255,255,.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.13) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 200px 200px, 200px 200px, 40px 40px, 40px 40px;
}
.hr-inner {
  max-width: 1440px;
  min-height: min(100vh, 900px);
  margin: 0 auto;
  padding: 96px 48px 56px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}

.hr-eyebrow { margin: 0 0 16px; font-size: 18px; color: var(--chalk); }
.hr-title {
  margin: 0 0 24px;
  font-size: clamp(46px, 6vw, 92px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: #fff;
}
.hr-sub { margin: 0 0 28px; max-width: 32em; font-size: 20px; line-height: 1.5; color: var(--chalk); }

/* Wyszukiwarka to główny przycisk strony, dlatego ma kolor przycisku z menu */
.hr-search { display: flex; max-width: 640px; background: #fff; }
.hr-search:focus-within { outline: 3px solid var(--pen); outline-offset: 3px; }
.hr-search input {
  flex: 1;
  min-width: 0;
  padding: 20px 22px;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 20px;
  color: var(--text);
}
.hr-search input::placeholder { color: #66708a; opacity: 1; }
.hr-search button {
  flex: none;
  padding: 0 28px;
  border: 0;
  background: var(--pen);
  color: var(--ink);
  font: inherit;
  font-size: 19px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s;
}
.hr-search button:hover { background: #ffd968; }

.hr-proof { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 18px 0 0; padding: 0; list-style: none; font-size: 16px; color: var(--chalk); }
.hr-proof li::before { content: "✓"; margin-right: 7px; font-weight: 700; color: var(--pen); }
.hr-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 22px 0 0; font-size: 17px; }
.hr-links a { color: #fff; text-underline-offset: 4px; }
.hr-links a:focus-visible, .hr-tabs button:focus-visible { outline: 2px solid var(--pen); outline-offset: 3px; }

/* Plan z przykładami */
.hr-plate { border: 1px solid rgba(255,255,255,.55); background: rgba(3,45,144,.75); }
.hr-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid rgba(255,255,255,.55); }
.hr-tabs button {
  padding: 11px 8px;
  border: 0;
  background: none;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.hr-tabs button + button { border-left: 1px solid rgba(255,255,255,.55); }
.hr-tabs button:hover { background: rgba(255,255,255,.12); }
.hr-tabs button[aria-pressed="true"] { background: #fff; color: var(--ink); font-weight: 600; }

.hr-map { display: block; width: 100%; height: auto; }
.hr-map .plot { fill: none; stroke: rgba(255,255,255,.42); stroke-width: 1; }
.hr-map .road { fill: rgba(255,255,255,.1); stroke: none; }
.hr-map .road-name { fill: rgba(255,255,255,.75); font-size: 13px; }
.hr-map .plan-area { fill: rgba(126,226,168,.13); }
.hr-map .plan-symbol { fill: #fff; font-size: 24px; font-weight: 700; }
.hr-map .fill-zone { fill: rgba(126,226,168,.1); stroke: var(--ok); stroke-width: 2; stroke-dasharray: 8 6; }
.hr-map .hit { stroke-width: 3.5; stroke-linejoin: round; }
.hr-map .hit.ok { stroke: var(--ok); fill: rgba(126,226,168,.32); }
.hr-map .hit.no { stroke: var(--no); fill: rgba(255,138,117,.32); }
.hr-case { display: none; }
.hr-case.is-on { display: block; }
/* Scena sprawdzania: skan planu, potem obrys działki, a na końcu werdykt */
.hr-scan { opacity: 0; }
.hr-scan rect { fill: rgba(255,200,61,.2); }
.hr-scan line { stroke: var(--pen); stroke-width: 2.5; }
.hr-motion .hr-scan { animation: hr-scan 1.05s cubic-bezier(.35,.1,.6,1) both; }
.hr-motion .hr-case.is-on .hit { stroke-dasharray: 1; animation: hr-draw .8s var(--ease) .55s both; }
.hr-motion .hr-case.is-on .soft { animation: hr-fade .5s .3s both; }
@keyframes hr-scan {
  0% { opacity: 1; transform: translateX(-90px); }
  92% { opacity: 1; }
  100% { opacity: 0; transform: translateX(690px); }
}
@keyframes hr-draw { from { stroke-dashoffset: 1; fill-opacity: 0; } 70% { fill-opacity: 0; } to { stroke-dashoffset: 0; fill-opacity: 1; } }
@keyframes hr-fade { from { opacity: 0; } to { opacity: 1; } }

/* Wejście na stronę: tytuł odsłania się raz, gdy zniknie ekran ładowania */
.hr-enter .hr-title { animation: hr-wipe 1s cubic-bezier(.3,.7,.3,1) 1.45s both; }
@keyframes hr-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 -5% 0 0); } }

/* Tabliczka z wynikiem, jak na prawdziwej karcie */
.hr-result { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; background: #fff; color: var(--text); min-height: 118px; }
.hr-lamps { display: flex; flex: none; gap: 5px; margin-top: 6px; }
.hr-lamps i { width: 11px; height: 11px; border-radius: 50%; background: #d7dbe5; }
.hr-result { position: relative; }
.hr-result > div:last-child { transition: opacity .3s; }
.hr-lamps i { transition: background .25s; }
.hr-result.ok .hr-lamps i:nth-child(3) { background: #1f8a4c; }
.hr-result.no .hr-lamps i:nth-child(1) { background: #c8321e; }
.hr-result h2 { margin: 0 0 3px; font-size: 20px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.hr-result.ok h2 { color: #155c34; }
.hr-result.no h2 { color: #a02a18; }
.hr-result p { margin: 0; font-size: 15.5px; line-height: 1.4; color: var(--text-mid); }
.hr-checking { position: absolute; left: 80px; top: 16px; font-size: 20px; font-weight: 700; color: var(--ink); opacity: 0; transition: opacity .2s; pointer-events: none; }
.hr-result.is-checking > div:last-of-type { opacity: 0; }
.hr-result.is-checking .hr-checking { opacity: 1; }
/* Doubled class: must outrank the verdict lamps, so the result is not given away before the scan ends */
.hr-result.is-checking.is-checking .hr-lamps i:nth-child(n) { background: #d7dbe5; }
.hr-result.is-checking.is-checking .hr-lamps i:nth-child(2) { background: #e8a800; }
.hr-result small { display: block; margin-top: 5px; font-size: 13.5px; color: #5c6275; }

@media (max-width: 1100px) {
  .hr-inner { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 48px; padding: 88px 32px 56px; }
  .hr-plate { max-width: 680px; }
  .hr-title { font-size: clamp(44px, 9vw, 84px); }
}
@media (max-width: 640px) {
  .hr-inner { padding: 76px 20px 44px; gap: 36px; }
  .hr-lead { display: flex; flex-direction: column; }
  .hr-eyebrow { font-size: 15.5px; margin-bottom: 12px; }
  .hr-title { margin-bottom: 0; font-size: clamp(40px, 12vw, 56px); }
  /* Wyszukiwarka tuż pod pytaniem: zostaje widoczna nad klawiaturą i informacją o cookies */
  .hr-search { order: 1; flex-direction: column; margin-top: 20px; }
  .hr-search input { padding: 16px; font-size: 18px; }
  .hr-search button { padding: 16px; }
  .hr-sub { order: 2; margin: 20px 0 0; font-size: 18px; }
  .hr-proof { order: 3; gap: 4px 16px; font-size: 15px; }
  .hr-links { order: 4; flex-direction: column; font-size: 16px; }
  .hr-tabs button { font-size: 13.5px; padding: 10px 4px; }
  .hr-result h2 { font-size: 18px; }
}
