/* ==========================================================================
   Gabinet Fizjoterapii i Neuroterapii — Martyna Andrzejewska
   1. Fonty  2. Tokeny  3. Reset  4. Typografia  5. Layout  6. Utility
   ========================================================================== */

/* 1. Fonty (self-hosting, bez zapytań do Google — RODO) ------------------- */

@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/playfair-display-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/playfair-display-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/lato-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/lato-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/lato-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/lato-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* 2. Tokeny --------------------------------------------------------------- */

:root {
  /* Kolory — z wizytówki */
  --c-bg: #efe2d3;
  --c-ink: #18492b;
  --c-bg-soft: #e6d6c3;                 /* tło kafelków, placeholderów */
  --c-ink-soft: rgb(24 73 43 / 0.85);   /* tekst drugoplanowy — kontrast ≥ 5:1 na obu tłach */
  --c-line: rgb(24 73 43 / 0.25);       /* cienkie linie jak na wizytówce */
  --c-line-inverse: rgb(239 226 211 / 0.3);

  /* Typografia */
  --f-head: "Playfair Display", Georgia, "Times New Roman", serif;
  --f-body: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
  --tracking-wide: 0.3em;               /* „M A R T Y N A” */
  --tracking-caps: 0.06em;              /* nagłówki wersalikami */

  --fs-sm: 0.875rem;
  --fs-base: 1.0625rem;
  --fs-lg: clamp(1.125rem, 1rem + 0.5vw, 1.3rem);
  --fs-h3: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --fs-h2: clamp(1.75rem, 1.35rem + 1.8vw, 2.75rem);
  --fs-h1: clamp(2.25rem, 1.5rem + 3.5vw, 4.25rem);

  --lh-tight: 1.15;
  --lh-base: 1.7;

  /* Przestrzeń */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-section: clamp(4.5rem, 3rem + 7vw, 8.5rem);

  /* Layout */
  --container: 72rem;
  --container-narrow: 46rem;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --header-h: 4.5rem;

  /* Kształty */
  --radius-sm: 0.375rem;
  --radius-pill: 999px;
  --radius-arch: 999px 999px 0.5rem 0.5rem;   /* zdjęcie „w łuku” */

  /* Ruch — wolny, organiczny */
  --ease-organic: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-fast: 0.25s;
  --dur-base: 0.5s;
  --dur-slow: 0.9s;

  color-scheme: light;
}

/* 3. Reset ---------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}

body {
  min-height: 100vh;
  background-color: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--f-body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

:where(ul[role="list"], ol[role="list"]) {
  list-style: none;
  padding: 0;
}

p,
h1,
h2,
h3,
h4 {
  overflow-wrap: break-word;
}

::selection {
  background: var(--c-ink);
  color: var(--c-bg);
}

:focus-visible {
  outline: 2px solid var(--c-ink);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* 4. Typografia ----------------------------------------------------------- */

h1,
h2,
h3,
h4 {
  font-family: var(--f-head);
  font-weight: 500;
  line-height: var(--lh-tight);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
}

h2 {
  font-size: var(--fs-h2);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
}

h3 {
  font-size: var(--fs-h3);
}

p {
  text-wrap: pretty;
}

.lead {
  font-size: var(--fs-lg);
  color: var(--c-ink-soft);
}

/* Rozstrzelony podpis jak „MARTYNA ANDRZEJEWSKA” na wizytówce */
.eyebrow {
  font-family: var(--f-head);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

/* 5. Layout --------------------------------------------------------------- */

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - 2 * var(--gutter), var(--container-narrow));
}

.section {
  padding-block: var(--space-section);
}

.section--inverse {
  background-color: var(--c-ink);
  color: var(--c-bg);
}

.section--inverse ::selection {
  background: var(--c-bg);
  color: var(--c-ink);
}

.section--inverse :focus-visible {
  outline-color: var(--c-bg);
}

/* Cienka linia — dzielnik w stylu tyłu wizytówki */
.rule {
  border: 0;
  border-top: 1px solid var(--c-line);
}

.flow > * + * {
  margin-top: var(--flow-space, 1em);
}

/* 6. Utility -------------------------------------------------------------- */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: var(--space-xs);
  left: var(--space-xs);
  z-index: 100;
  padding: var(--space-xs) var(--space-sm);
  background: var(--c-ink);
  color: var(--c-bg);
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
  transition: transform var(--dur-fast) var(--ease-organic);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Ikony liniowe ze sprite'a w index.html */
.icon {
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Fragment, który nie może się łamać (kody pocztowe, numery) */
.nowrap {
  white-space: nowrap;
}

/* Oznaczenie placeholderów — łatwe do wyłapania przed publikacją */
.placeholder {
  background: var(--c-bg-soft);
  outline: 1px dashed var(--c-line);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   7. Komponenty
   ========================================================================== */

/* Przyciski ----------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 3rem;
  padding: 0.8em 1.6em;
  border: 1px solid var(--c-ink);
  border-radius: var(--radius-pill);
  font-family: var(--f-body);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color var(--dur-fast) var(--ease-organic),
    color var(--dur-fast) var(--ease-organic),
    transform var(--dur-fast) var(--ease-organic),
    box-shadow var(--dur-fast) var(--ease-organic);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -10px rgb(24 73 43 / 0.6);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--c-ink);
  color: var(--c-bg);
}

.btn--primary:hover {
  background: #1f5a36;
}

.btn--ghost {
  background: transparent;
  color: var(--c-ink);
}

.btn--ghost:hover {
  background: var(--c-ink);
  color: var(--c-bg);
}

/* Ikona w kółku — jak na tyle wizytówki ------------------------------------ */

.icon-circle {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 3.25rem;
  height: 3.25rem;
  border: 1px solid var(--c-ink);
  border-radius: 50%;
  font-size: 1.25rem;
}

.icon-circle--sm {
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  background: var(--c-ink);
  color: var(--c-bg);
  font-size: 1rem;
}

/* Nagłówek sekcji ---------------------------------------------------------- */

.section-head {
  max-width: 40rem;
  margin: 0 auto var(--space-xl);
  text-align: center;
}

.section-head > * + * {
  margin-top: var(--space-sm);
}

.section-head--left {
  margin-inline: 0;
  margin-bottom: var(--space-lg);
  text-align: left;
}

/* Eyebrow z cienkimi liniami po bokach: ——— OFERTA ——— */
.section-head .eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.section-head .eyebrow::before,
.section-head .eyebrow::after {
  content: "";
  width: 2.5rem;
  height: 1px;
  background: currentColor;
  opacity: 0.45;
}

.section-head--left .eyebrow {
  justify-content: flex-start;
}

.section-head--left .eyebrow::before {
  display: none;
}

/* ==========================================================================
   8. Sekcje
   ========================================================================== */

/* Header ------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(239 226 211 / 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-height: var(--header-h);
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-right: auto;
  text-decoration: none;
}

.site-header__brand img {
  width: 2.75rem;
}

/* Dwie linie jak na froncie wizytówki: FIZJOTERAPIA / M A R T Y N A  A N D R Z E J E W S K A */
.site-header__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--f-head);
  text-transform: uppercase;
  line-height: 1.1;
}

.site-header__name {
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  padding-left: 0.12em; /* równoważy rozstrzelenie za ostatnią literą */
}

.site-header__sub {
  margin-top: 0.2rem;
  font-size: 0.5625rem;
  font-weight: 500;
  letter-spacing: 0.19em; /* dobrane tak, by linia miała szerokość „FIZJOTERAPIA” */
  padding-left: 0.19em;
}

.site-header__cta {
  display: none;
  min-height: 2.6rem;
  padding: 0.55em 1.2em;
}

/* Nawigacja — mobile: panel rozwijany pod headerem */
.site-nav__toggle {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--c-line);
  border-radius: 50%;
  font-size: 1.25rem;
  transition: background-color var(--dur-fast) var(--ease-organic);
}

.site-nav__toggle:hover {
  background: var(--c-bg-soft);
}

.site-nav__list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  padding: var(--space-sm) var(--gutter) var(--space-lg);
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-line);
  box-shadow: 0 20px 30px -25px rgb(24 73 43 / 0.5);
}

.site-nav__toggle[aria-expanded="true"] + .site-nav__list {
  display: flex;
}

.site-nav__list a {
  display: block;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--c-line);
  font-family: var(--f-head);
  font-size: 1.375rem;
  text-decoration: none;
}

/* Bez JS: menu zawsze widoczne pod logo */
.no-js .site-header__inner {
  flex-wrap: wrap;
}

.no-js .site-nav__toggle {
  display: none;
}

.no-js .site-nav__list {
  display: flex;
  position: static;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  padding: 0 0 var(--space-xs);
  border: 0;
  box-shadow: none;
}

.no-js .site-nav__list a {
  font-size: 1rem;
  border: 0;
  padding: 0.25rem 0;
}

/* Hero --------------------------------------------------------------------- */

.hero {
  padding-block: var(--space-xl);
  text-align: center;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__logo {
  width: min(32rem, 88%);
  margin-bottom: var(--space-lg);
}

.hero__kicker {
  font-size: 0.75rem;
  text-wrap: balance;
  letter-spacing: 0.22em;
  color: var(--c-ink-soft);
}

.hero__title {
  margin-top: var(--space-sm);
  font-weight: 400;
}

.hero__name {
  margin-top: var(--space-xs);
  font-size: clamp(0.8rem, 0.7rem + 0.5vw, 1.05rem);
}

/* Krótka linia pod imieniem */
.hero__name::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 1px;
  margin: var(--space-md) auto 0;
  background: currentColor;
  opacity: 0.45;
}

.hero__lead {
  max-width: 34rem;
  margin-top: var(--space-md);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.hero__phone {
  margin-top: var(--space-md);
  font-variant-numeric: lining-nums;
  font-family: var(--f-head);
  font-size: 1.25rem;
  letter-spacing: 0.05em;
}

.hero__phone a {
  text-decoration: none;
}

.hero__phone a:hover {
  text-decoration: underline;
}

/* O mnie ------------------------------------------------------------------- */

.about__inner {
  display: grid;
  gap: var(--space-xl);
  align-items: center;
}

.about__photo,
.studio__main {
  position: relative;
  left: -0.45rem; /* równoważy przesunięty łuk, żeby nie wychodził poza ekran */
  width: min(100% - 1rem, 24rem);
  margin-inline: auto;
}

.about__photo img,
.studio__main img {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-arch);
}

/* Przesunięty, liniowy łuk za zdjęciem */
.about__photo::before,
.studio__main::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translate(0.9rem, 0.9rem);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-arch);
}

.about__content h2 {
  text-transform: none;
  letter-spacing: 0;
}

.about__facts,
.studio__info {
  --flow-space: var(--space-lg);
  border-top: 1px solid var(--c-line);
}

.about__facts li,
.studio__info li {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--c-line);
}

.about__facts li::before,
.studio__info li::before {
  content: "";
  flex-shrink: 0;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--c-ink);
  transform: translateY(-0.15em);
}

/* Gabinet ------------------------------------------------------------------ */

.studio__inner {
  display: grid;
  gap: var(--space-lg);
}

.studio__head {
  margin-bottom: 0;
}

.studio__thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.studio__thumbs img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 1rem;
}

/* Oferta ------------------------------------------------------------------- */

.offer__grid {
  display: grid;
  gap: var(--space-md);
}

.offer-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-lg) var(--space-md);
  border: 1px solid var(--c-line);
  border-radius: 1.25rem;
  background: rgb(255 255 255 / 0.18);
  transition:
    background-color var(--dur-base) var(--ease-organic),
    transform var(--dur-base) var(--ease-organic);
}

.offer-card:hover {
  background: rgb(255 255 255 / 0.38);
  transform: translateY(-3px);
}

.offer-card__title::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 1px;
  margin-top: var(--space-sm);
  background: currentColor;
  opacity: 0.5;
  transform-origin: left;
  transition: transform var(--dur-slow) var(--ease-organic);
}

.offer-card:hover .offer-card__title::after {
  transform: scaleX(2.2);
}

.offer-card p {
  color: var(--c-ink-soft);
}

/* Wizyta (odwrócone kolory) ------------------------------------------------ */

.visit__steps-wrap {
  position: relative;
}

.visit__wave {
  display: none;
}

.visit__steps {
  position: relative; /* nad falistą linią */
  display: grid;
  gap: var(--space-lg);
}

.visit-step {
  display: grid;
  align-content: start;
  grid-template-columns: auto 1fr;
  column-gap: var(--space-md);
  row-gap: var(--space-xs);
}

.visit-step__num {
  grid-row: span 2;
  display: inline-grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border: 1px solid var(--c-line-inverse);
  border-radius: 50%;
  background: var(--c-ink);
  font-family: var(--f-head);
  font-size: 1.375rem;
  font-style: italic;
  font-variant-numeric: lining-nums;
}

.visit-step h3 {
  align-self: end;
}

.visit-step p {
  color: rgb(239 226 211 / 0.82);
}

.visit__note {
  max-width: 38rem;
  margin: var(--space-xl) auto 0;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--c-line-inverse);
  font-family: var(--f-head);
  font-style: italic;
  text-align: center;
  color: rgb(239 226 211 / 0.88);
}

/* Kontakt ------------------------------------------------------------------ */

.contact__inner {
  display: grid;
  gap: var(--space-xl);
}

.contact-list {
  border-top: 1px solid var(--c-line);
}

.contact-list__item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--c-line);
  font-family: var(--f-head);
  font-size: 1.0625rem;
  font-variant-numeric: lining-nums;
  overflow-wrap: anywhere;
}

.contact-list__item address {
  font-style: normal;
}

.contact-list__item a {
  text-decoration: none;
}

.contact-list__item a:hover {
  text-decoration: underline;
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

/* Mapa (click-to-load) */
.map {
  position: relative;
  min-height: 20rem;
  overflow: hidden;
  border: 1px solid var(--c-line);
  border-radius: 1.25rem;
  background: var(--c-bg-soft);
}

.map__preview,
.map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.map__consent {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-md);
  text-align: center;
}

.map__note,
.map__link {
  font-size: var(--fs-sm);
  color: var(--c-ink-soft);
}

.map__note {
  margin-top: var(--space-xs);
}

.map__link {
  display: inline-block;
  padding: 0.5rem 0.75rem; /* cel dotykowy ≥ 24px */
}

/* Stopka ------------------------------------------------------------------- */

.site-footer {
  padding-block: var(--space-xl);
  background: var(--c-bg-soft);
  text-align: center;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.site-footer__sygnet {
  width: 4.5rem;
}

.site-footer__meta {
  font-size: var(--fs-sm);
  color: var(--c-ink-soft);
}

.site-footer__meta a,
.site-footer__legal a {
  text-decoration: none;
}

.site-footer__meta a:hover,
.site-footer__legal a:hover {
  text-decoration: underline;
}

.site-footer__legal {
  width: 100%;
  margin-top: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--c-line);
  font-size: 0.8125rem;
  color: var(--c-ink-soft);
}

/* Pasek CTA na telefonach -------------------------------------------------- */

.cta-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--gutter) calc(var(--space-xs) + env(safe-area-inset-bottom));
  background: rgb(239 226 211 / 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--c-line);
}

.cta-bar__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 3rem;
  border: 1px solid var(--c-ink);
  border-radius: var(--radius-pill);
  background: var(--c-ink);
  color: var(--c-bg);
  font-weight: 700;
  text-decoration: none;
}

.cta-bar__btn--ghost {
  background: transparent;
  color: var(--c-ink);
}

/* Miejsce na pasek, żeby nie zasłaniał stopki */
body {
  padding-bottom: calc(4rem + env(safe-area-inset-bottom));
}

/* Przycisk wyglądający jak link (stopka) */
.site-footer__link {
  padding: 0;
  font-size: inherit;
  color: inherit;
}

.site-footer__link:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Baner cookies — nad paskiem CTA na telefonach ---------------------------- */

.cookie-banner {
  position: fixed;
  left: var(--space-xs);
  right: var(--space-xs);
  bottom: calc(4rem + env(safe-area-inset-bottom) + var(--space-xs));
  z-index: 60;
  display: grid;
  gap: var(--space-xs);
  max-width: 34rem;
  padding: var(--space-md);
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: 1.25rem;
  box-shadow: 0 18px 40px -18px rgb(24 73 43 / 0.45);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner__title {
  font-size: var(--fs-h3);
}

.cookie-banner__text {
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--c-ink-soft);
}

.cookie-banner__text a {
  color: var(--c-ink);
  font-weight: 700;
}

/* Oba przyciski równej wagi i szerokości — „Odrzuć” nie może być mniej widoczne */
.cookie-banner__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xs);
  margin-top: var(--space-xs);
}

/* Polityka prywatności (dialog) -------------------------------------------- */

.privacy-dialog {
  width: min(100% - 2 * var(--space-xs), var(--container-narrow));
  max-width: none;
  max-height: min(100vh - 2 * var(--space-md), 52rem);
  max-height: min(100dvh - 2 * var(--space-md), 52rem);
  margin: auto;
  padding: 0;
  overflow: hidden;
  background: var(--c-bg);
  color: var(--c-ink);
  border: 1px solid var(--c-line);
  border-radius: 1.25rem;
  box-shadow: 0 30px 80px -30px rgb(24 73 43 / 0.6);
}

.privacy-dialog::backdrop {
  background: rgb(24 73 43 / 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Strona pod spodem nie przewija się, gdy dialog jest otwarty */
html:has(.privacy-dialog[open]) {
  overflow: hidden;
}

.privacy-dialog__inner {
  display: flex;
  flex-direction: column;
  max-height: inherit;
}

.privacy-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-sm) var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--c-line);
}

.privacy-dialog__title {
  font-size: var(--fs-h3);
}

.privacy-dialog__close {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-pill);
  transition: background-color var(--dur-fast) var(--ease-organic);
}

.privacy-dialog__close:hover {
  background: var(--c-bg-soft);
}

.privacy-dialog__body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-md);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.privacy-dialog__body h3 {
  margin-top: var(--space-lg);
  font-size: 1.125rem;
}

.privacy-dialog__body ul {
  padding-left: 1.25em;
}

.privacy-dialog__body li + li {
  margin-top: var(--space-2xs);
}

.privacy-dialog__body code {
  font-size: 0.875em;
  padding: 0.1em 0.35em;
  background: var(--c-bg-soft);
  border-radius: var(--radius-sm);
}

.privacy-dialog__date {
  font-size: var(--fs-sm);
  color: var(--c-ink-soft);
}

/* Bez JS dialog nie otworzy się — pokaż go jako zwykłą sekcję na końcu strony */
.no-js .privacy-dialog {
  position: static;
  display: block;
  max-height: none;
  margin: var(--space-xl) auto;
}

.no-js .privacy-dialog__close {
  display: none;
}

/* ==========================================================================
   9. Breakpointy
   ========================================================================== */

@media (min-width: 640px) {
  .cta-bar {
    display: none;
  }

  .cookie-banner {
    left: var(--space-md);
    right: auto;
    bottom: var(--space-md);
    padding: var(--space-md) var(--space-lg) var(--space-lg);
  }

  .privacy-dialog__head {
    padding-left: var(--space-lg);
  }

  .privacy-dialog__body {
    padding: var(--space-md) var(--space-lg) var(--space-lg);
  }

  body {
    padding-bottom: 0;
  }

  .site-header__cta {
    display: inline-flex;
  }

  .offer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  :root {
    --header-h: 5rem;
  }

  /* Nawigacja w linii */
  .site-nav__toggle {
    display: none;
  }

  .site-nav__list,
  .no-js .site-nav__list {
    display: flex;
    position: static;
    flex-direction: row;
    gap: var(--space-md); /* 5 pozycji — szerzej od 1200 px */
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }

  .site-nav__list a,
  .no-js .site-nav__list a {
    position: relative;
    padding: 0.25rem 0;
    border: 0;
    font-family: var(--f-body);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  /* Linia pod linkiem, rosnąca od lewej */
  .site-nav__list a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--dur-base) var(--ease-organic);
  }

  .site-nav__list a:hover::after,
  .site-nav__list a[aria-current="true"]::after {
    transform: scaleX(1);
  }

  .no-js .site-header__inner {
    flex-wrap: nowrap;
  }

  .site-header__cta {
    margin-left: var(--space-sm);
  }

  /* O mnie: zdjęcie | treść z pionową linią-akcentem */
  .about__inner {
    grid-template-columns: 5fr 7fr;
    gap: calc(var(--space-xl) * 1.25);
  }

  .about__photo,
  .studio__main {
    left: 0;
    width: 100%;
  }

  /* Gabinet: łuk po lewej na całą wysokość | nagłówek, miniatury, informacje */
  .studio__inner {
    grid-template-columns: 5fr 7fr;
    grid-template-areas:
      "main head"
      "main thumbs"
      "main info";
    column-gap: calc(var(--space-xl) * 1.25);
    row-gap: var(--space-lg);
    align-items: start;
  }

  .studio__head   { grid-area: head; }
  .studio__main   { grid-area: main; align-self: center; }
  .studio__thumbs { grid-area: thumbs; }
  .studio__info   { grid-area: info; }

  .about__content {
    padding-left: var(--space-xl);
    border-left: 1px solid var(--c-line);
  }

  /* Oferta */
  .offer__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Wizyta: 3 kolumny + falista linia przez numery */
  .visit__wave {
    display: block;
    position: absolute;
    top: 0.5rem;
    left: 0;
    width: 100%;
    height: 3rem;
    color: rgb(239 226 211 / 0.45);
  }

  .visit__steps {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
  }

  .visit-step {
    grid-template-columns: 1fr;
    justify-items: center;
    row-gap: var(--space-sm);
    text-align: center;
  }

  .visit-step__num {
    grid-row: auto;
    margin-bottom: var(--space-xs);
  }

  .visit-step p {
    max-width: 18rem;
  }

  /* Kontakt: dane | mapa */
  .contact__inner {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
}

@media (min-width: 1200px) {
  .site-nav__list {
    gap: var(--space-lg);
  }

  .about__content {
    padding-left: calc(var(--space-xl) * 1.25);
  }
}

/* ==========================================================================
   10. Stany i animacje
   ========================================================================== */

/* Header po przewinięciu */
.site-header {
  transition: box-shadow var(--dur-base) var(--ease-organic);
}

.site-header.is-scrolled {
  box-shadow: 0 12px 30px -24px rgb(24 73 43 / 0.45);
}

/* Ikona hamburgera ↔ X */
.site-nav__icon-close,
.site-nav__toggle[aria-expanded="true"] .site-nav__icon-open {
  display: none;
}

.site-nav__toggle[aria-expanded="true"] .site-nav__icon-close {
  display: block;
}

/* Podgląd placeholderów: index.html?placeholders */
.show-placeholders [data-placeholder] {
  outline: 2px dashed #b5652d;
  outline-offset: 3px;
  background-color: rgb(181 101 45 / 0.08);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  /* Hero — spokojna sekwencja przy wejściu na stronę */
  .js .hero__inner > * {
    animation: rise 0.8s var(--ease-organic) backwards;
  }

  .js .hero__logo {
    animation:
      hero-logo 1.2s var(--ease-organic) backwards,
      breathe 7s ease-in-out 1.2s infinite alternate;
  }

  /* Krótka kaskada — hasło jest elementem LCP, nie może pojawiać się za późno */
  .js .hero__kicker  { animation-delay: 0.15s; }
  .js .hero__title   { animation-delay: 0.25s; }
  .js .hero__name    { animation-delay: 0.35s; }
  .js .hero__lead    { animation-delay: 0.45s; }
  .js .hero__actions { animation-delay: 0.55s; }
  .js .hero__phone   { animation-delay: 0.6s; }

  .js .hero__name::after {
    animation: grow-line 1.2s var(--ease-organic) 0.6s backwards;
  }

  /* Pojawianie się przy przewijaniu (klasę .is-visible dodaje main.js) */
  .js [data-reveal]:not(.is-visible) {
    opacity: 0;
  }

  .js [data-reveal].is-visible {
    animation: rise var(--dur-slow) var(--ease-organic) var(--reveal-delay, 0s) backwards;
  }

  /* Kafelki oferty — kaskada w rzędzie */
  .offer-card:nth-child(3n + 2) { --reveal-delay: 0.12s; }
  .offer-card:nth-child(3n + 3) { --reveal-delay: 0.24s; }

  /* Linie przy eyebrow „rosną” od środka */
  .js .section-head .eyebrow::before,
  .js .section-head .eyebrow::after {
    transform-origin: right;
  }

  .js .section-head .eyebrow::after {
    transform-origin: left;
  }

  .js .section-head.is-visible .eyebrow::before,
  .js .section-head.is-visible .eyebrow::after {
    animation: grow-line 1.2s var(--ease-organic) 0.3s backwards;
  }

  /* Grupy: dzieci pojawiają się kolejno */
  .js [data-reveal-group]:not(.is-visible) > * {
    opacity: 0;
  }

  .js [data-reveal-group].is-visible > * {
    animation: rise var(--dur-slow) var(--ease-organic) backwards;
  }

  .js [data-reveal-group].is-visible > :nth-child(2) { animation-delay: 0.12s; }
  .js [data-reveal-group].is-visible > :nth-child(3) { animation-delay: 0.24s; }
  .js [data-reveal-group].is-visible > :nth-child(4) { animation-delay: 0.36s; }
  .js [data-reveal-group].is-visible > :nth-child(5) { animation-delay: 0.48s; }

  /* Wizyta: fala „rysuje się”, potem kroki jeden po drugim
     (wrapper ma data-reveal-trigger — tylko dostaje .is-visible, sam się nie animuje) */
  .js .visit__wave path {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
  }

  .js .visit__steps-wrap.is-visible .visit__wave path {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 2.6s var(--ease-organic) 0.2s;
  }

  .js .visit__steps-wrap:not(.is-visible) .visit-step {
    opacity: 0;
  }

  .js .visit__steps-wrap.is-visible .visit-step {
    animation: rise var(--dur-slow) var(--ease-organic) backwards;
  }

  .js .visit__steps-wrap.is-visible .visit-step:nth-child(1) { animation-delay: 0.3s; }
  .js .visit__steps-wrap.is-visible .visit-step:nth-child(2) { animation-delay: 0.9s; }
  .js .visit__steps-wrap.is-visible .visit-step:nth-child(3) { animation-delay: 1.5s; }

  /* Baner cookies i polityka — spokojne wejście */
  .cookie-banner:not([hidden]) {
    animation: rise 0.6s var(--ease-organic) 0.6s backwards;
  }

  .privacy-dialog[open] {
    animation: rise 0.45s var(--ease-organic);
  }

  /* Menu mobilne — łagodne wysunięcie */
  @media (max-width: 959.98px) {
    .site-nav__toggle[aria-expanded="true"] + .site-nav__list {
      animation: menu-in 0.35s var(--ease-organic);
    }
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
}

@keyframes hero-logo {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
}

@keyframes breathe {
  from { transform: scale(1); }
  to   { transform: scale(1.025); }
}

@keyframes grow-line {
  from { transform: scaleX(0); }
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}
