/* ============================================================
   Prime Physio - strona demonstracyjna
   Paleta: papier kliniczny / atrament / kobalt / stal / lód
   Typografia: Archivo (nagłówki), IBM Plex Sans (tekst),
               IBM Plex Mono (pomiary, ceny)
   ============================================================ */

:root {
  --bg: #F4F7F9;        /* papier kliniczny */
  --ink: #10293C;       /* atrament */
  --cobalt: #1D5BD8;    /* kobalt - jedyny mocny akcent */
  --cobalt-dark: #1747AC;
  --cobalt-tint: rgba(29, 91, 216, 0.08);
  --steel: #5D6F7C;     /* stal - tekst pomocniczy */
  --ice: #DCE7EE;       /* lód - obramowania, podziały */
  --white: #FFFFFF;
  --radius: 16px;
  --radius-s: 10px;
  --shadow: 0 10px 30px rgba(16, 41, 60, 0.10);
  --font-display: "Archivo", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;
  --header-h: 68px;
}

/* ---------- reset-lite ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--cobalt); text-decoration: none; }

ul { list-style: none; }

::selection { background: var(--cobalt); color: #fff; }

:focus-visible {
  outline: 3px solid rgba(29, 91, 216, 0.55);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

.container {
  width: min(100% - 40px, 1140px);
  margin-inline: auto;
}

.container-narrow { max-width: 780px; }

/* ---------- typografia ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-stretch: 112%;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.3rem, 5.6vw, 3.7rem);
  font-weight: 800;
  font-stretch: 116%;
  line-height: 1.04;
}

h2 {
  font-size: clamp(1.65rem, 3.6vw, 2.35rem);
  font-weight: 750;
  max-width: 22ch;
}

h3 { font-size: 1.08rem; font-weight: 700; }

.accent { color: var(--cobalt); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 18px;
}

.eyebrow b {
  font-weight: 500;
  color: var(--cobalt);
}

.eyebrow-line {
  width: 26px;
  height: 1px;
  background: var(--cobalt);
  opacity: 0.5;
}

.lead {
  font-size: clamp(1.02rem, 1.6vw, 1.15rem);
  color: var(--steel);
  max-width: 52ch;
  margin-top: 22px;
}

/* ---------- przyciski ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85em 1.7em;
  border-radius: var(--radius-s);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease,
              color 0.2s ease, transform 0.15s ease;
}

.btn-primary {
  background: var(--cobalt);
  color: #fff;
}
.btn-primary:hover { background: var(--cobalt-dark); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  border-color: rgba(16, 41, 60, 0.35);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); background: var(--white); }

.btn-block { width: 100%; }

/* ---------- nagłówek strony ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 247, 249, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ice);
  transition: box-shadow 0.25s ease;
}

.site-header.scrolled { box-shadow: 0 4px 18px rgba(16, 41, 60, 0.08); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
}

.brand-mark { width: 38px; height: 38px; flex: none; }

.brand-name {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 750;
  font-size: 1.18rem;
  letter-spacing: -0.01em;
}

.site-nav {
  display: none;
  align-items: center;
  gap: 28px;
}

.site-nav a:not(.btn) {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.98rem;
  transition: color 0.2s ease;
}
.site-nav a:not(.btn):hover { color: var(--cobalt); }

.nav-cta { padding: 0.62em 1.3em; font-size: 0.95rem; }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 859.98px) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--white);
    border-bottom: 1px solid var(--ice);
    box-shadow: var(--shadow);
    padding: 14px 20px 20px;
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 10px 4px; border-bottom: 1px solid var(--bg); }
  .nav-cta { margin-top: 10px; }
}

@media (min-width: 860px) {
  .site-nav { display: flex; }
  .nav-toggle { display: none; }
}

/* ---------- hero ---------- */
.hero { padding-block: clamp(48px, 8vw, 104px); }

.hero-grid {
  display: grid;
  gap: 56px;
  align-items: center;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-trust {
  margin-top: 26px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--steel);
  letter-spacing: 0.02em;
}

.hero-media {
  position: relative;
  margin-bottom: 34px;
}

.hero-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* karta pomiaru - sygnatura */
.assessment-card {
  position: absolute;
  left: clamp(-18px, -2vw, -12px);
  bottom: -34px;
  width: 218px;
  background: var(--white);
  border: 1px solid var(--ice);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 16px 18px 14px;
}

.ac-gauge { width: 100%; display: block; }

.ac-ticks line { stroke: var(--steel); stroke-width: 2; opacity: 0.45; }

.ac-track {
  fill: none;
  stroke: var(--ice);
  stroke-width: 10;
  stroke-linecap: round;
}

.ac-fill {
  fill: none;
  stroke: var(--cobalt);
  stroke-width: 10;
  stroke-linecap: round;
}

.ac-needle {
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: round;
}

.ac-pivot { fill: var(--cobalt); }

.ac-read {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.ac-value {
  font-family: var(--font-mono);
  font-size: 1.7rem;
  font-weight: 500;
  color: var(--cobalt);
  min-width: 3.2ch;
}

.ac-label {
  font-size: 0.74rem;
  line-height: 1.35;
  color: var(--steel);
}

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 64px; }
  .hero-media { margin-bottom: 0; }
}

/* ---------- pasek demo (ticker jak w TV) ---------- */
.demo-bar {
  background: var(--ice);
  border-block: 1px solid rgba(93, 111, 124, 0.18);
  overflow: hidden;
}

.ticker { padding-block: 10px; }

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 28s linear infinite;
  will-change: transform;
}

.demo-bar:hover .ticker-track { animation-play-state: paused; }

.ticker-group {
  display: flex;
  align-items: center;
  flex: none;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding-right: 56px;
  white-space: nowrap;
  font-size: 0.88rem;
  color: var(--ink);
}

.ticker-item svg {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: var(--steel);
  stroke-width: 1.8;
  stroke-linecap: round;
}
.ticker-item svg .dot { fill: var(--steel); stroke: none; }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- sekcje ---------- */
.section {
  padding-block: clamp(64px, 9vw, 110px);
  scroll-margin-top: var(--header-h);
}

.section-white { background: var(--white); }

.section-head { margin-bottom: clamp(36px, 5vw, 56px); }

.section-sub {
  color: var(--steel);
  max-width: 56ch;
  margin-top: 14px;
}

/* ---------- o nas ---------- */
.about-grid {
  display: grid;
  gap: 44px;
  align-items: center;
  margin-bottom: clamp(44px, 6vw, 64px);
}

.about-copy p:not(.eyebrow) {
  color: var(--steel);
  margin-top: 18px;
  max-width: 56ch;
}

.about-copy h2 { margin-top: 4px; }

.about-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.about-media figcaption {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--steel);
  letter-spacing: 0.02em;
}

@media (min-width: 900px) {
  .about-grid { grid-template-columns: 1.15fr 0.85fr; gap: 64px; }
}

.features {
  display: grid;
  gap: 18px;
}

.feature {
  background: var(--bg);
  border: 1px solid var(--ice);
  border-radius: 14px;
  padding: 24px;
}

.section-white .feature { background: var(--bg); }

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--cobalt-tint);
  margin-bottom: 14px;
}

.feature-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: var(--cobalt);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature p {
  margin-top: 8px;
  font-size: 0.93rem;
  color: var(--steel);
}

@media (min-width: 600px) {
  .features { grid-template-columns: 1fr 1fr; gap: 20px; }
}

@media (min-width: 1020px) {
  .features { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- usługi ---------- */
.services {
  display: grid;
  gap: 22px;
}

.service-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--ice);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.service-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

.service-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 20px 18px;
}

.service-body p:not(.service-meta) {
  margin-top: 8px;
  font-size: 0.93rem;
  color: var(--steel);
}

.service-meta {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--ice);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--cobalt);
}

.service-body p:not(.service-meta) { margin-bottom: 16px; }

@media (min-width: 640px) {
  .services { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1080px) {
  .services { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- cennik ---------- */
.price-list {
  border-top: 1px solid var(--ice);
}

.price-list li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 17px 2px;
  border-bottom: 1px solid var(--ice);
}

.price-list li > div { flex: 1; }

.price-list strong {
  font-weight: 600;
  font-size: 0.98rem;
}

.price-list small {
  display: block;
  color: var(--steel);
  font-size: 0.83rem;
  margin-top: 2px;
}

.badge {
  display: inline-block;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cobalt);
  background: var(--cobalt-tint);
  border-radius: 6px;
  padding: 2px 8px;
  margin-top: 7px;
}

.price-time {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--steel);
  min-width: 56px;
  text-align: right;
}

.price {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  min-width: 74px;
  text-align: right;
}

.price-note {
  margin-top: 22px;
  font-size: 0.88rem;
  color: var(--steel);
}

@media (max-width: 480px) {
  .price-time { display: none; }
}

/* ---------- kontakt ---------- */
.contact-grid {
  display: grid;
  gap: 44px;
  align-items: start;
}

.contact-block + .contact-block { margin-top: 30px; }

.contact-block h3 {
  font-size: 0.82rem;
  font-family: var(--font-mono);
  font-weight: 500;
  font-stretch: normal;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--steel);
  margin-bottom: 8px;
}

.contact-block p { font-size: 1.02rem; }

.contact-block small { color: var(--steel); font-size: 0.86rem; }

.contact-link { font-weight: 600; overflow-wrap: anywhere; }
.contact-link:hover { text-decoration: underline; }

.hours { border-collapse: collapse; }

.hours td {
  padding: 4px 0;
  font-size: 0.98rem;
}

.hours td:first-child { padding-right: 28px; color: var(--steel); }

.hours td:last-child { font-family: var(--font-mono); font-size: 0.88rem; }

.contact-form {
  background: var(--white);
  border: 1px solid var(--ice);
  border-radius: var(--radius);
  padding: clamp(22px, 4vw, 32px);
  box-shadow: var(--shadow);
}

.contact-form h3 { margin-bottom: 18px; }

.form-row { margin-bottom: 16px; }

.form-row label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.optional { font-weight: 400; color: var(--steel); }

.form-row input,
.form-row textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid #C9D6DF;
  border-radius: var(--radius-s);
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-row input::placeholder,
.form-row textarea::placeholder { color: #93A5B1; }

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--cobalt);
  box-shadow: 0 0 0 3px rgba(29, 91, 216, 0.18);
}

.form-row textarea { resize: vertical; min-height: 96px; }

.form-note {
  margin-top: 14px;
  font-size: 0.88rem;
  color: var(--ink);
  background: var(--cobalt-tint);
  border: 1px solid rgba(29, 91, 216, 0.25);
  border-radius: var(--radius-s);
  padding: 12px 14px;
}

@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 0.9fr 1.1fr; gap: 60px; }
}

.map-wrap {
  margin-top: clamp(44px, 6vw, 64px);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--ice);
  box-shadow: var(--shadow);
}

.map-wrap iframe { display: block; }

/* ---------- stopka ---------- */
.site-footer {
  background: var(--ink);
  color: #B9C7D2;
  padding-block: clamp(48px, 6vw, 72px) 28px;
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  gap: 36px;
  margin-bottom: 44px;
}

.brand-footer { color: #fff; }

.footer-brand p { margin-top: 14px; }

.site-footer h4 {
  color: #fff;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  font-weight: 500;
  font-stretch: normal;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

.footer-nav { display: flex; flex-direction: column; gap: 8px; }

.footer-nav a, .footer-contact a { color: #B9C7D2; transition: color 0.2s ease; }
.footer-nav a:hover, .footer-contact a:hover { color: #fff; }

.footer-contact p { margin-bottom: 6px; }

@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1.4fr 0.8fr 1fr; gap: 24px; }
}

.portfolio-note {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-left: 3px solid var(--cobalt);
  border-radius: 12px;
  padding: 18px 22px;
  color: #DDE7F0;
  max-width: 720px;
}

.footer-bottom {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.83rem;
  color: #8DA0AE;
}

/* ---------- wskaźnik zakresu ruchu (scroll) ---------- */
.rom-gauge {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border: 1px solid var(--ice);
  border-radius: 999px;
  padding: 8px 14px 8px 10px;
  box-shadow: 0 6px 20px rgba(16, 41, 60, 0.14);
  pointer-events: none;
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

.rom-gauge svg { width: 34px; display: block; }

.rg-track {
  fill: none;
  stroke: var(--ice);
  stroke-width: 7;
  stroke-linecap: round;
}

.rg-fill {
  fill: none;
  stroke: var(--cobalt);
  stroke-width: 7;
  stroke-linecap: round;
}

.rg-value {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink);
  min-width: 3.4ch;
  text-align: right;
  transition: color 0.35s ease;
}

.rom-gauge.full {
  background: var(--cobalt);
  border-color: var(--cobalt);
}

.rom-gauge.full .rg-track { stroke: rgba(255, 255, 255, 0.3); }
.rom-gauge.full .rg-fill { stroke: #fff; }
.rom-gauge.full .rg-value { color: #fff; }

@media (max-width: 600px) {
  .rom-gauge { right: 12px; bottom: 12px; padding: 6px 11px 6px 8px; }
  .rom-gauge svg { width: 28px; }
  .rg-value { font-size: 0.72rem; }
}

/* ---------- animacje wejścia ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

html.js .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- ograniczenie animacji ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  html.js .reveal {
    opacity: 1;
    transform: none;
  }

  .ticker-track { animation: none; }
}
