/* ============================================================
   Dzielny Pacjent — gabinet szkolny
   Design: editorial + playful kinetic. Cream paper, deep teal ink,
   NFZ navy accents. Bricolage Grotesque display + Manrope body.
   ============================================================ */

:root {
  --cream: #f4efe3;
  --paper: #fbf8f0;
  --ink: #103a40;
  --ink-soft: #3c5a5d;
  --navy: #1d2c6b;
  --teal: #16a39a;
  --teal-600: #0d7a73;
  --coral: #ff7e9b;
  --sun: #ffc24b;
  --mint: #d6ede8;
  --line: rgba(16, 58, 64, 0.14);

  --r-lg: 28px;
  --r-md: 18px;

  --maxw: 1240px;
  --pad: clamp(20px, 5vw, 72px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  font-size: clamp(16px, 1.1vw, 18px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0;
}

a { color: inherit; }

em { font-style: normal; }

/* ---------- grain + cursor ---------- */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--teal);
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 190;
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.18s var(--ease), background 0.2s ease;
  opacity: 0;
}
.cursor.is-active { opacity: 0.55; }
.cursor.is-hover { transform: translate(-50%, -50%) scale(2.6); background: var(--coral); }
@media (hover: none) { .cursor { display: none; } }

/* ---------- scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 210;
  background: transparent;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--teal), var(--coral));
  transition: width 0.1s linear;
}

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px var(--pad);
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.nav.is-stuck {
  background: rgba(251, 248, 240, 0.82);
  backdrop-filter: blur(12px);
  padding-top: 12px;
  padding-bottom: 12px;
  box-shadow: 0 1px 0 var(--line);
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
}
.nav__logo { width: 38px; height: 38px; border-radius: 50%; }
.nav__brandtxt {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.nav__links { display: flex; gap: 28px; }
.nav__links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  padding: 4px 0;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--teal);
  transition: width 0.3s var(--ease);
}
.nav__links a:hover::after { width: 100%; }

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-weight: 700;
  background: var(--ink);
  color: var(--paper);
  padding: 11px 18px;
  border-radius: 100px;
  font-size: 0.95rem;
  transition: transform 0.25s var(--ease), background 0.25s ease;
}
.nav__cta:hover { transform: translateY(-2px); background: var(--teal-600); }
.nav__ctadot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 0 rgba(255, 194, 75, 0.7);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 194, 75, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(255, 194, 75, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 194, 75, 0); }
}

@media (max-width: 760px) {
  .nav__links { display: none; }
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 120px var(--pad) 80px;
  overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  will-change: transform;
}
.blob--1 { width: 46vw; height: 46vw; background: var(--mint); top: -10%; right: -8%; }
.blob--2 { width: 34vw; height: 34vw; background: rgba(255, 194, 75, 0.5); bottom: -12%; left: -6%; }
.blob--3 { width: 28vw; height: 28vw; background: rgba(255, 126, 155, 0.38); top: 30%; left: 38%; }

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
}

.hero__eyebrow {
  display: flex;
  gap: 10px;
  margin-bottom: 26px;
}
.pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 100px;
  background: rgba(22, 163, 154, 0.14);
  color: var(--teal-600);
}
.pill--navy { background: rgba(29, 44, 107, 0.12); color: var(--navy); }

.hero__title {
  font-size: clamp(3.2rem, 13vw, 11rem);
  letter-spacing: -0.035em;
}
.hero__title .line { display: block; overflow: hidden; }
.hero__title em { position: relative; color: var(--teal-600); }
.hero__title .line--nfz {
  font-size: clamp(1.5rem, 5.5vw, 4.4rem);
  margin-top: 0.18em;
  color: var(--ink-soft);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.hero__title .line--nfz b { color: var(--navy); font-weight: 800; }
.scribble {
  position: absolute;
  left: -2%;
  bottom: -0.12em;
  width: 104%;
  height: 0.3em;
  overflow: visible;
}
.scribble path {
  fill: none;
  stroke: var(--coral);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
}
.scribble.is-drawn path {
  transition: stroke-dashoffset 1s var(--ease) 0.4s;
  stroke-dashoffset: 0;
}

.hero__lead {
  max-width: 40ch;
  margin: 30px 0 38px;
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
  color: var(--ink-soft);
}
.hero__lead strong { color: var(--ink); font-weight: 700; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  padding: 15px 26px;
  border-radius: 100px;
  font-size: 1rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s ease;
}
.btn svg { width: 19px; height: 19px; fill: currentColor; }
.btn--primary {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 12px 30px -10px rgba(22, 163, 154, 0.7);
}
.btn--primary:hover { transform: translateY(-3px); background: var(--teal-600); box-shadow: 0 18px 40px -12px rgba(22, 163, 154, 0.8); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
}
.btn--ghost:hover { transform: translateY(-3px); background: var(--ink); color: var(--paper); }

/* rotating badge */
.badge {
  position: absolute;
  z-index: 2;
  right: var(--pad);
  bottom: 56px;
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  text-decoration: none;
}
.badge__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: spin 18s linear infinite;
}
.badge__ring text {
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  fill: var(--ink);
  text-transform: uppercase;
}
.badge__core {
  position: relative;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--ink);
  display: grid;
  place-items: center;
  transition: transform 0.3s var(--ease), background 0.3s ease;
}
.badge__core svg { width: 26px; height: 26px; fill: var(--paper); }
.badge:hover .badge__core { transform: scale(1.12); background: var(--teal-600); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .badge__ring { animation: none; } }
@media (max-width: 760px) { .badge { display: none; } }

/* ---------- MARQUEE ---------- */
.marquee {
  background: var(--ink);
  color: var(--paper);
  padding: 18px 0;
  overflow: hidden;
  white-space: nowrap;
  border-top: 2px solid var(--ink);
}
.marquee__track {
  display: inline-flex;
  align-items: center;
  gap: 38px;
  animation: scrollx 26s linear infinite;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(1.4rem, 3.4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.marquee__track span { padding-left: 38px; }
.marquee__track .dot { color: var(--sun); padding-left: 38px; }
@keyframes scrollx { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ---------- SECTIONS ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(80px, 12vw, 160px) var(--pad);
}
.kicker {
  display: inline-block;
  font-family: "Manrope", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-600);
  margin-bottom: 18px;
}
.section__head h2 { font-size: clamp(2.4rem, 6vw, 5rem); }
.section__head h2 em { position: relative; color: var(--teal-600); white-space: nowrap; }
.section__intro {
  max-width: 50ch;
  margin: 28px 0 0;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--ink-soft);
}

/* powers */
.powers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: clamp(48px, 7vw, 84px);
}
.power {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--paper);
  border-radius: var(--r-lg);
  padding: 38px 32px 34px;
  box-shadow: 0 1px 0 var(--line);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.power:hover { transform: translateY(-8px); box-shadow: 0 30px 60px -30px rgba(16, 58, 64, 0.35); }
.power__emoji {
  position: absolute;
  top: -0.18em;
  right: 0.02em;
  font-size: clamp(6rem, 11vw, 9rem);
  line-height: 1;
  opacity: 0.18;
  transform: rotate(-8deg);
  transition: transform 0.5s var(--ease), opacity 0.5s ease;
  pointer-events: none;
  user-select: none;
}
.power:hover .power__emoji { transform: rotate(0deg) scale(1.08); opacity: 0.3; }
.power h3 {
  position: relative;
  z-index: 1;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
}
@media (max-width: 860px) { .powers { grid-template-columns: 1fr; } .power { min-height: 180px; } }

/* ---------- INFO GRID ---------- */
.info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  align-items: stretch;
}
.info__card {
  background: var(--paper);
  border-radius: var(--r-lg);
  padding: clamp(30px, 3.4vw, 46px);
  display: flex;
  flex-direction: column;
  scroll-margin-top: 120px;
  box-shadow: 0 1px 0 var(--line);
}
.info__card h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); margin-bottom: 20px; }
.info__big {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 14px;
}
.info__addr { color: var(--ink-soft); margin: 0 0 26px; font-size: 1.05rem; }
.info__note { color: var(--ink-soft); font-size: 0.95rem; margin: 18px 0 0; }

.link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  text-decoration: none;
  color: var(--teal-600);
  align-self: flex-start;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.25s ease, gap 0.25s ease;
}
.link svg { width: 16px; height: 16px; fill: currentColor; }
.link:hover { border-color: var(--teal-600); gap: 12px; }

.info__card--accent { background: var(--mint); }
.hours { list-style: none; margin: 0; padding: 0; }
.hours li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(13, 122, 115, 0.18);
  font-size: 1.02rem;
}
.hours li span { color: var(--ink-soft); }
.hours li b { font-family: "Bricolage Grotesque", sans-serif; }
.hours--off b { color: var(--coral); }

.info__card--dark { background: var(--ink); color: var(--mint); }
.info__card--dark .kicker { color: var(--sun); }
.info__card--dark h2 { color: var(--paper); }
.info__card--dark .info__note { color: rgba(214, 237, 232, 0.7); }
.contact__company {
  font-family: "Manrope", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(214, 237, 232, 0.75);
  margin: 0 0 18px;
}
.phone {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--paper);
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
  transition: color 0.25s ease;
}
.phone:hover { color: var(--sun); }
.email {
  font-family: "Manrope", sans-serif;
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  font-weight: 600;
  color: rgba(214, 237, 232, 0.85);
  text-decoration: none;
  display: block;
  margin-bottom: 6px;
  word-break: break-all;
  transition: color 0.25s ease;
}
.email:hover { color: var(--sun); }
.contact__actions { margin-top: auto; padding-top: 26px; }

@media (max-width: 980px) { .info { grid-template-columns: 1fr; } }

/* ---------- GABINETY ---------- */
.gabinety { scroll-margin-top: 100px; }
.gabinety__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: clamp(48px, 7vw, 84px);
}
.gabinet {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-radius: var(--r-lg);
  padding: clamp(26px, 2.4vw, 34px);
  box-shadow: 0 1px 0 var(--line);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.gabinet:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -30px rgba(16, 58, 64, 0.35); }
.gabinet__name {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  margin-bottom: 14px;
}
.gabinet__addr {
  color: var(--ink-soft);
  margin: 0 0 18px;
  font-size: 1rem;
  line-height: 1.5;
}
.gabinet__email {
  align-self: flex-start;
  font-weight: 700;
  color: var(--teal-600);
  text-decoration: none;
  word-break: break-word;
  margin-bottom: 22px;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.25s ease;
}
.gabinet__email:hover { border-color: var(--teal-600); }
.gabinet .link { margin-top: auto; }
@media (max-width: 980px) { .gabinety__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .gabinety__grid { grid-template-columns: 1fr; } }

/* ---------- DLA KOGO ---------- */
.forwhom { text-align: center; }
.forwhom__inner { max-width: 20ch; margin: 0 auto; }
.forwhom h2 { font-size: clamp(2.4rem, 7vw, 6rem); margin: 14px 0 26px; }
.forwhom h2 em { color: var(--teal-600); }
.forwhom p { color: var(--ink-soft); font-size: clamp(1.05rem, 1.6vw, 1.3rem); max-width: 40ch; margin: 0 auto; }

/* ---------- FOOTER ---------- */
.footer {
  background: var(--ink);
  color: var(--mint);
  padding: clamp(56px, 8vw, 96px) var(--pad) 32px;
}
.footer__top {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(214, 237, 232, 0.18);
}
.footer__brand img { width: 84px; height: 84px; border-radius: 50%; margin-bottom: 18px; }
.footer__brand p { max-width: 30ch; color: rgba(214, 237, 232, 0.8); }
.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.footer__cols h4 {
  font-family: "Manrope", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sun);
  margin-bottom: 14px;
}
.footer__cols p { color: rgba(214, 237, 232, 0.85); margin: 0; line-height: 1.9; }
.footer__cols a { text-decoration: none; transition: color 0.2s ease; }
.footer__cols a:hover { color: var(--paper); }
.footer__bottom {
  max-width: var(--maxw);
  margin: 28px auto 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
  color: rgba(214, 237, 232, 0.6);
}
.footer__tag { color: var(--sun); }
@media (max-width: 760px) {
  .footer__top { grid-template-columns: 1fr; gap: 36px; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
}

/* ---------- reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
