/* ==========================================================================
   Norda Yachts - tokeny i nadpisania (demo, siteverse.pl/demo/norda/)
   Kierunek: "instrument nawigacyjny". Granat, mosiadz, mono-etykiety,
   podzialka jako komponent podpisowy. Wylacznie tokeny i nadpisania -
   struktura, komponenty i ruch zyja w ../../_wspolne/css/. Limit: 250 linii.
   ========================================================================== */

:root {
  --tlo:    #050C18;
  --tlo-2:  #0B1B33;
  --tlo-3:  #132445;
  --tekst:   #F1EBDF;
  --tekst-2: rgba(241, 235, 223, 0.8);
  --tekst-3: #8FA5C4;
  --akcent:  #C8A45C;
  --akcent-tekst: #0A1526;
  --wlos:   rgba(241, 235, 223, 0.18);
  --wlos-2: rgba(241, 235, 223, 0.1);

  --tlo-jasne:         #F1EBDF;
  --tlo-jasne-2:       #E7DFCC;
  --tekst-na-jasnym:   #0B1B33;
  --tekst-2-na-jasnym: rgba(11, 27, 51, 0.76);
  --tekst-3-na-jasnym: rgba(11, 27, 51, 0.56);
  --wlos-na-jasnym:    rgba(11, 27, 51, 0.22);
  --wlos-2-na-jasnym:  rgba(11, 27, 51, 0.1);

  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-body:    "Archivo", system-ui, "Segoe UI", sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, Menlo, monospace;
  --waga-display: 500;
  --interlinia-display: 0.96;
  --tracking-display: -0.018em;

  --nawi-tlo: rgba(5, 12, 24, 0.72);
  --pole-tlo: rgba(5, 12, 24, 0.5);
  --tint:
    linear-gradient(180deg, rgba(5, 12, 24, 0.9) 0%, rgba(5, 12, 24, 0.42) 24%, rgba(5, 12, 24, 0.16) 48%, rgba(5, 12, 24, 0.62) 82%, rgba(5, 12, 24, 0.94) 100%),
    linear-gradient(90deg, rgba(5, 12, 24, 0.72) 0%, rgba(5, 12, 24, 0.28) 32%, rgba(5, 12, 24, 0) 55%, rgba(5, 12, 24, 0.5) 100%);
  --tint-pas:
    linear-gradient(180deg, rgba(5, 12, 24, 0.74) 0%, rgba(5, 12, 24, 0.22) 45%, rgba(5, 12, 24, 0.9) 100%),
    linear-gradient(90deg, rgba(5, 12, 24, 0.86) 0%, rgba(5, 12, 24, 0.3) 45%, rgba(5, 12, 24, 0.1) 100%);
}

h1, h2, h3, h4 { font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0; }
h1 em, h2 em, h3 em { font-weight: 400; }
.nadtytul { letter-spacing: 0.32em; }
.pasmo--jasne .nadtytul { color: var(--tekst-3); }
.pasmo--jasne .nadtytul::before { background: var(--tekst-3); }

/* ciepla poswiata zlotej godziny na fotografii pierwszego ekranu */
.pierwszy.tlo-foto::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  mix-blend-mode: screen;
  background: radial-gradient(78% 120% at 88% 34%, rgba(214, 150, 66, 0.3) 0%, rgba(214, 150, 66, 0.12) 38%, rgba(214, 150, 66, 0) 70%);
}

.tlo-foto--pas { --tint: var(--tint-pas); }
.tlo-foto--pas .tlo-foto__img { filter: saturate(1.14) contrast(1.06) brightness(1.06); }
.tlo-foto--woda .tlo-foto__img { filter: saturate(0.82) brightness(0.62) contrast(1.06); }

/* ---------- przyrzad: naroza celownika, wspolrzedne, odczyt ---------- */

.celownik { position: absolute; width: 26px; height: 26px; z-index: 2; pointer-events: none; }
.celownik::before, .celownik::after { content: ""; position: absolute; background: var(--tekst); opacity: 0.42; }
.celownik::before { width: 26px; height: 1px; top: 0; left: 0; }
.celownik::after { width: 1px; height: 26px; top: 0; left: 0; }
.celownik--tl { left: 18px; top: 18px; }
.celownik--tr { right: 18px; top: 18px; transform: scaleX(-1); }
.celownik--bl { left: 18px; bottom: 18px; transform: scaleY(-1); }
.celownik--br { right: 18px; bottom: 18px; transform: scale(-1); }

.wspolrzedne {
  font-family: var(--f-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  color: var(--tekst-3);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  max-width: none;
}
.wspolrzedne b { font-weight: 400; color: var(--akcent); }

.odczyt { display: grid; text-align: right; }
.odczyt__w { padding: 14px 0; border-top: 1px solid var(--wlos); }
.odczyt__w:last-child { border-bottom: 1px solid var(--wlos); }
.odczyt__k { font-family: var(--f-mono); font-size: 0.64rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--tekst-3); }
.odczyt__v { font-family: var(--f-display); font-size: var(--step-2); font-weight: 500; margin-top: 4px; font-variation-settings: "opsz" 60; }
.odczyt__v s { font-family: var(--f-mono); font-size: 0.72rem; text-decoration: none; color: var(--tekst-3); margin-left: 8px; letter-spacing: 0.1em; }

.instr-line  { fill: none; stroke: var(--tekst); stroke-width: 1; opacity: 0.5; }
.instr-faint { fill: none; stroke: var(--tekst); stroke-width: 1; opacity: 0.16; }
.instr-text  { font-family: var(--f-mono); font-size: 10px; fill: var(--tekst-3); }
.instr-fill  { fill: var(--tekst); opacity: 0.8; }
.instr-brass { fill: var(--akcent); }

/* ---------- pierwszy ekran: uklad z odczytem i wyszukiwarka ---------- */

.hero-norda { display: grid; gap: clamp(32px, 5vw, 64px); }
.hero-norda__gora { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px var(--gutter); align-items: start; }
.hero-norda__tresc { display: grid; gap: 22px; }
.hero-norda__tresc .tytul--1 { font-size: clamp(3.2rem, 1.6rem + 8vw, 8rem); }
.hero-norda__tresc .tytul--1 span { display: block; }
.hero-norda__bok { display: grid; gap: 28px; justify-items: end; width: 250px; }
.hero-norda__dol { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 32px; }
.porty { display: flex; flex-wrap: wrap; gap: 8px 30px; }
.porty span { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--tekst-3); }
.porty span b { color: var(--akcent); font-weight: 400; margin-right: 8px; }
.przewin { display: inline-flex; align-items: center; gap: 14px; }
.przewin::before { content: ""; width: 62px; height: 1px; background: var(--wlos); }

@media (max-width: 900px) {
  .hero-norda__gora { grid-template-columns: minmax(0, 1fr); }
  .hero-norda__bok { display: none; }
}

/* wyszukiwarka czarteru: pasek jak w kadrze otwierajacym */
.szukaj {
  display: grid;
  grid-template-columns: 1.2fr 1.5fr 0.9fr auto;
  background: rgba(5, 12, 24, 0.6);
  border: 1px solid var(--wlos);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.szukaj__kom { padding: 18px 26px; border-right: 1px solid var(--wlos-2); display: grid; gap: 6px; min-width: 0; }
.szukaj__kom label { font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--tekst-3); }
.szukaj__kom select {
  width: 100%; background: transparent; border: 0; padding: 0 24px 0 0; color: var(--tekst);
  font-size: var(--step-1); font-weight: 500; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--tekst-3) 50%), linear-gradient(135deg, var(--tekst-3) 50%, transparent 50%);
  background-position: calc(100% - 10px) 55%, calc(100% - 5px) 55%; background-size: 5px 5px; background-repeat: no-repeat;
  text-overflow: ellipsis;
}
.szukaj__kom select option { color: #111; background: #fff; font-size: 1rem; }
.szukaj__kom select:focus-visible { outline: none; color: var(--akcent); }
.szukaj .przycisk { border-radius: 0; border: 0; padding-inline: 38px; }
@media (max-width: 900px) {
  .szukaj { grid-template-columns: 1fr 1fr; }
  .szukaj__kom:nth-child(2) { border-right: 0; }
  .szukaj .przycisk { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .szukaj { grid-template-columns: 1fr; }
  .szukaj__kom { border-right: 0; border-bottom: 1px solid var(--wlos-2); }
}

/* ---------- podzialka: komponent podpisowy (js/podpis.js) ---------- */

.podz { display: grid; gap: 18px; --podz-etykieta: 132px; }
.podz__os { position: relative; height: 22px; margin-left: var(--podz-etykieta); border-bottom: 1px solid var(--wlos); }
.podz__kreska { position: absolute; bottom: -1px; width: 1px; height: 8px; background: var(--tekst); opacity: 0.4; transform: translateX(-0.5px); }
.podz__kreska--duza { height: 14px; opacity: 0.7; }
.podz__kreska span { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.12em; color: var(--tekst-3); white-space: nowrap; }
.podz__wiersze { display: grid; gap: 4px; }
.podz__w { display: grid; grid-template-columns: var(--podz-etykieta) minmax(0, 1fr); align-items: center; gap: 0 12px; padding: 8px 0; border-top: 1px solid var(--wlos-2); }
.podz__nazwa { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--tekst-2); display: grid; gap: 2px; }
.podz__nazwa b { font-family: var(--f-display); font-size: var(--step-1); font-weight: 500; letter-spacing: 0; color: var(--tekst); }
a.podz__nazwa:hover b { color: var(--akcent); }
.podz__nazwa small { color: var(--tekst-3); }
.podz__pasek { position: relative; height: 22px; display: flex; align-items: center; }
.podz__pasek i { display: block; width: var(--dl); height: 3px; background: var(--akcent); transform-origin: left center; transform: scaleX(0); transition: transform 1.1s var(--ease); }
.podz__pasek i::after { content: ""; position: absolute; right: 0; top: 50%; width: 1px; height: 14px; margin-top: -7px; background: var(--akcent); }
.podz.jest-widoczna .podz__pasek i, html:not(.js) .podz__pasek i { transform: scaleX(1); }
.podz__wartosc { position: absolute; left: min(calc(var(--dl) + 12px), calc(100% - 150px)); top: 50%; transform: translateY(-50%); font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.1em; color: var(--tekst); white-space: nowrap; padding: 2px 6px; background: var(--tlo); }
.podz__wartosc s { text-decoration: none; color: var(--tekst-3); margin-left: 6px; }
.podz--w-karcie { --podz-etykieta: 0px; }
.podz--w-karcie .podz__os, .podz--w-karcie .podz__pasek { margin-left: 0; }
@media (max-width: 640px) {
  .podz { --podz-etykieta: 0px; }
  .podz__w { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .podz__wartosc { position: static; transform: none; margin-left: 12px; }
  .podz__pasek i { width: min(var(--dl), calc(100% - 96px)); }
}

/* mini podzialka w karcie jednostki (CSS, bez JS) */
.pasek-dl { height: 3px; background: var(--wlos-2); position: relative; }
.pasek-dl i { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--dl) / var(--max) * 100%); background: var(--akcent); }
.pasek-dl__v { display: flex; justify-content: space-between; margin-top: 8px; font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.1em; color: var(--tekst-3); }

/* ---------- mapa tras (js/trasy.js) ---------- */

.mapa { position: relative; }
.mapa svg { width: 100%; height: auto; display: block; }
.mapa__trasa { fill: none; stroke: var(--tekst); stroke-width: 1.2; stroke-dasharray: 2 7; stroke-linecap: round; stroke-linejoin: round; opacity: 0.22; transition: opacity 400ms var(--ease), stroke 400ms var(--ease); }
.mapa__trasa.jest-aktywna { stroke: var(--akcent); stroke-width: 1.8; opacity: 1; }
.mapa__port circle { fill: var(--tlo); stroke: var(--tekst); stroke-width: 1.5; }
.mapa__port circle + circle { fill: var(--tekst); stroke: none; }
.mapa__port.jest-macierzysty circle { stroke: var(--akcent); }
.mapa__port.jest-macierzysty circle + circle { fill: var(--akcent); }
.mapa__port text { font-family: var(--f-mono); font-size: 12px; fill: var(--tekst); letter-spacing: 0.06em; }
.mapa__port rect { fill: rgba(5, 12, 24, 0.7); }
.mapa__km rect { fill: rgba(5, 12, 24, 0.78); }
.mapa__km text { font-family: var(--f-mono); font-size: 10px; fill: var(--akcent); text-anchor: middle; }
.mapa__km { opacity: 0; transition: opacity 400ms var(--ease); }
.mapa__km.jest-aktywna { opacity: 1; }
.trasy-lista .karta[aria-pressed="true"], .trasy-lista .karta.jest-aktywna { border-color: var(--akcent); }
.trasy-lista .karta { cursor: pointer; text-align: left; width: 100%; }

/* ---------- drobne nadpisania ---------- */

.stopka .nawi__marka { letter-spacing: 0.34em; }
.kal__tydzien[aria-pressed="true"] { box-shadow: 0 0 0 1px var(--akcent); }
.rez__podsumowanie .cena b { font-size: var(--step-3); }
.pasmo--jasne .przycisk--obrys { border-color: var(--wlos); }
.pasmo--jasne .kal__tydzien[disabled] { background: rgba(11, 27, 51, 0.2); }
.wiersze-punkty small { margin-top: 2px; }
.siatka--linie > * { border-color: var(--wlos-2); }
