/* =====================================================================
   HOLISTYCZNA TRANSFORMACJA — style własne
   Większość wyglądu budują klasy Tailwind w HTML (konfiguracja:
   js/tailwind.config.js). Tutaj są: tła stron, przyciski, nagłówek,
   menu mobilne, animacje Fade-In, formularz i baner cookies.
   ===================================================================== */

/* ---------- 1. Podstawy ---------- */
:root {
  --plum: #591A8A;
  --plum-dark: #4E177A;
  --plum-deeper: #3E1063;
  --plum-light: #6E24A7;
  --gold-light: #F3C46C;
  --gold: #E5A93B;
  --gold-dark: #D89835;
  --lotus: #D94695;
  --lotus-soft: #F5E8F0;
  --mist: #FAF6FD;
  --field: #F7F2FA;
  --line: #E8DCF2;
  --ink: #1E1035;
  --body: #4A4356;
  --muted: #7A708A;
  --header-h: 96px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Kotwice (#formularz itp.) nie chowają się pod przyklejonym menu */
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

body {
  background-color: var(--mist);
  color: var(--body);
  font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* „clip” (a nie „hidden”) — nie psuje przyklejonego menu */
  overflow-x: clip;
}

::selection { background: #EBD9F7; color: var(--ink); }

/* Widoczny fokus dla klawiatury */
:focus-visible {
  outline: 2px solid var(--plum);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  background: var(--plum);
  color: #fff;
  padding: .75rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  transition: top .2s;
}
.skip-link:focus { top: 1rem; }

/* ---------- 2. Tła stron (grafiki akwarelowe) ---------- */
/* Strona główna: jedno szerokie tło na cały ekran */
.bg-page-home {
  background-color: var(--mist);
  background-image: url("../images/tlo.jpg");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}
/* Podstrony: długie, pionowe tło powtarzane w dół strony */
.bg-page-long {
  background-color: var(--mist);
  background-image: url("../images/tlo-long.jpg");
  background-size: 100% auto;
  background-position: center top;
  background-repeat: repeat-y;
}
.bg-page-long-alt {
  background-color: var(--mist);
  background-image: url("../images/tlo2-long.jpg");
  background-size: 100% auto;
  background-position: center top;
  background-repeat: repeat-y;
}
/* Na szerokich ekranach tło pionowe byłoby zbyt rozciągnięte — zmniejszamy skalę */
@media (min-width: 1024px) {
  .bg-page-long, .bg-page-long-alt { background-size: 100% auto; }
}
.bg-under-construction {
  background-color: var(--mist);
  background-image: url("../images/tlo-strona-w-budowie.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Kolaż na stronie głównej: na desktopie „wychodzi” z kontenera do prawej krawędzi ekranu.
   min() = na ekranie węższym niż kontener (1240 px) wystaje tylko o padding (2rem). */
@media (min-width: 1024px) {
  .hero-bleed { margin-right: min(-2rem, calc((1240px - 100vw) / 2 - 2rem)); }
}

/* Zdjęcia z jasnym tłem stapiają się z tłem strony (biel = przezroczystość) */
.blend-soft { mix-blend-mode: multiply; }

/* Delikatne rozmycie krawędzi zdjęć hero */
.fade-edges-left {
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 100%);
}
.fade-edges-y {
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 10%, #000 88%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 10%, #000 88%, transparent 100%);
}

/* Organiczna ramka zdjęcia (płatek / fala) */
.organic-frame {
  border-radius: 42% 58% 62% 38% / 45% 40% 60% 55%;
  border: 6px solid rgba(255, 255, 255, .92);
  box-shadow: 0 30px 60px -25px rgba(89, 26, 138, .35);
  overflow: hidden;
}
.organic-frame--alt { border-radius: 58% 42% 45% 55% / 40% 52% 48% 60%; }

/* ---------- 3. Typografia pomocnicza ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--lotus);
}
.eyebrow::before {
  content: "";
  width: 2.75rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(216,152,53,0), var(--gold-dark));
}
.eyebrow--plum { color: var(--plum); }

/* Nagłówek sekcji ze złotymi liniami po bokach */
.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  text-align: center;
}
.section-title::before,
.section-title::after {
  content: "";
  flex: 0 1 5rem;
  height: 1px;
}
.section-title::before { background: linear-gradient(90deg, rgba(216,152,53,0), var(--gold-dark)); }
.section-title::after { background: linear-gradient(90deg, var(--gold-dark), rgba(216,152,53,0)); }

/* ---------- 4. Przyciski ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  min-height: 44px;
  padding: .8rem 1.75rem;
  border-radius: 9999px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease, color .25s ease;
  cursor: pointer;
}
.btn svg { width: 1.25rem; height: 1.25rem; flex-shrink: 0; transition: transform .25s ease; }
.btn:hover svg { transform: translateX(4px); }
.btn-back:hover svg { transform: translateX(-4px); }

.btn-gold {
  background: linear-gradient(135deg, #F3C46C 0%, #E5A93B 50%, #D89835 100%);
  color: var(--ink);
  box-shadow: 0 8px 24px -4px rgba(229, 169, 59, .35);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -4px rgba(216, 152, 53, .5); }

.btn-plum {
  background: linear-gradient(135deg, #6E24A7 0%, #591A8A 55%, #4E177A 100%);
  color: #fff;
  box-shadow: 0 10px 24px -6px rgba(89, 26, 138, .45);
}
.btn-plum:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -6px rgba(89, 26, 138, .55); }

.btn-ghost {
  background: rgba(255, 255, 255, .7);
  color: var(--plum);
  border: 1px solid #EADBEE;
}
.btn-ghost:hover { background: var(--lotus-soft); }

.btn-lg { padding: 1rem 2.25rem; font-size: 1.125rem; }
.btn-sm { padding: .6rem 1.4rem; font-size: .9375rem; }

.btn:disabled, .btn[aria-busy="true"] { opacity: .65; cursor: wait; transform: none; }

/* ---------- 5. Nagłówek (Sticky Menu) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: 1rem;
  transition: padding .3s ease;
}
.nav-shell {
  border-radius: 9999px;
  padding: .5rem .75rem .5rem 1rem;
  border: 1px solid transparent;
  transition: background-color .3s ease, box-shadow .3s ease, border-color .3s ease, padding .3s ease;
}
/* Na podstronach menu ma delikatną „szklaną” pigułkę od początku */
.site-header--glass .nav-shell {
  background: rgba(255, 255, 255, .55);
  border-color: rgba(234, 219, 238, .6);
}
/* Po przewinięciu strony — pełna szklana pigułka z cieniem */
.site-header.is-scrolled { padding-top: .5rem; }
.site-header.is-scrolled .nav-shell {
  background: rgba(255, 255, 255, .85);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-color: rgba(234, 219, 238, .6);
  box-shadow: 0 8px 32px -12px rgba(78, 23, 122, .18);
  padding-top: .35rem;
  padding-bottom: .35rem;
}
.site-header .brand-logo { transition: height .3s ease; }
.site-header.is-scrolled .brand-logo { height: 3.25rem; }

.nav-link {
  position: relative;
  display: inline-block;
  padding: .5rem 0;
  color: var(--ink);
  transition: color .2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--gold-dark);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .25s ease;
}
.nav-link:hover { color: var(--plum); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link[aria-current="page"] { color: var(--plum); font-weight: 600; }
.nav-link[aria-current="page"]::after { background: var(--plum); transform: scaleX(1); }

/* Hamburger */
.hamburger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  padding: 0 12px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, .8);
  border: 1px solid var(--line);
}
.hamburger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--plum);
  transition: transform .3s ease, opacity .2s ease;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menu mobilne */
.mobile-menu {
  position: absolute;
  top: 100%;
  left: 1rem;
  right: 1rem;
  margin-top: .75rem;
  padding: 1.25rem;
  border-radius: 1.75rem;
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  box-shadow: 0 20px 48px -10px rgba(89, 26, 138, .18);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.mobile-menu:not([hidden]) { animation: menu-in .25s ease both; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.mobile-menu a.mobile-link {
  display: block;
  padding: .85rem 1rem;
  border-radius: 1rem;
  font-weight: 500;
  color: var(--ink);
}
.mobile-menu a.mobile-link:hover { background: var(--lotus-soft); color: var(--plum); }
.mobile-menu a.mobile-link[aria-current="page"] { background: #F3ECF9; color: var(--plum); font-weight: 600; }
body.menu-open { overflow: hidden; }
/* Pełne menu mieści się dopiero od 1280 px — poniżej działa hamburger */
@media (min-width: 1280px) { .mobile-menu { display: none !important; } }

/* ---------- 6. Karty ---------- */
.card {
  background: rgba(255, 255, 255, .82);
  border: 1px solid #F0E6F7;
  border-radius: 1.75rem;
  box-shadow: 0 10px 30px -5px rgba(89, 26, 138, .06), 0 4px 12px -2px rgba(0, 0, 0, .03);
  transition: transform .3s ease, box-shadow .3s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px -10px rgba(89, 26, 138, .12);
}
.icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: radial-gradient(circle at 50% 40%, #fff 0%, #FBF3F9 60%, #F5E8F0 100%);
  border: 1px solid #F1DDEB;
}

/* Znacznik listy (fioletowe kółko z białą fajką) */
.check-list li {
  position: relative;
  padding-left: 2.1rem;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .15em;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 9999px;
  background: #B53BC0 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 70% no-repeat;
}

/* Linia osi czasu „Moja droga” */
.timeline-line {
  position: absolute;
  top: 3rem;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: linear-gradient(90deg, #DDB0DA, #E6B46A 50%, #DDB0DA);
  opacity: .8;
}

/* ---------- 7. Formularz ---------- */
.form-label {
  display: block;
  margin-bottom: .4rem;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--ink);
}
.form-field {
  width: 100%;
  min-height: 48px;
  padding: .8rem 1rem;
  border-radius: .75rem;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  font-size: 1rem;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.form-field::placeholder { color: #A59CB3; }
.form-field:focus {
  outline: none;
  background: #fff;
  border-color: var(--plum);
  box-shadow: 0 0 0 4px rgba(89, 26, 138, .15);
}
.form-field.is-invalid { border-color: #DC2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
select.form-field {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E1035' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.1rem;
}
select.form-field:invalid { color: #A59CB3; }
select.form-field option { color: var(--ink); }
textarea.form-field { min-height: 120px; resize: vertical; }
.consent input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: .15rem;
  flex-shrink: 0;
  accent-color: var(--plum);
}
.consent input.is-invalid { outline: 2px solid #DC2626; outline-offset: 2px; }
.consent a { color: var(--plum); text-decoration: underline; }

/* ---------- 7a. Kalendarz rezerwacji (rezerwacja.html, js/booking-embed.js) ---------- */
/* Ramka Google: bez obramowania, wysokość dopasowana do ekranu.
   Wnętrza ramki nie da się stylować (to strona Google) — stylujemy wszystko wokół. */
.booking-iframe {
  display: block;
  width: 100%;
  height: 900px;          /* telefon: kalendarz i lista godzin są jedna pod drugą */
  border: 0;
  background: #fff;
  border-radius: 1.25rem;
}
@media (min-width: 768px) { .booking-iframe { height: 720px; } }
@media (min-width: 1024px) { .booking-iframe { height: 680px; } }

/* Delikatne „migotanie” tła, dopóki kalendarz się wczytuje */
.booking-box.is-loading [data-booking-frame] {
  background: linear-gradient(100deg, #FAF6FD 30%, #F3ECF9 50%, #FAF6FD 70%);
  background-size: 300% 100%;
  animation: booking-shimmer 1.4s ease-in-out infinite;
  border-radius: 1.25rem;
}
@keyframes booking-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) {
  .booking-box.is-loading [data-booking-frame] { animation: none; }
}

/* Numerowane kroki rezerwacji */
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #F3C46C 0%, #E5A93B 50%, #D89835 100%);
  color: var(--ink);
  font-weight: 700;
  font-size: .95rem;
  box-shadow: 0 6px 16px -6px rgba(229, 169, 59, .6);
}

/* ---------- 8. Animacje Fade-In (Intersection Observer w js/main.js) ---------- */
/* Klasa .js jest dodawana przez js/head.js — bez JavaScriptu treść jest zawsze widoczna. */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s cubic-bezier(.22, .61, .36, 1), transform .8s cubic-bezier(.22, .61, .36, 1);
  transition-delay: var(--reveal-delay, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.reveal-delay-1 { --reveal-delay: .1s; }
.reveal-delay-2 { --reveal-delay: .2s; }
.reveal-delay-3 { --reveal-delay: .3s; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
}

/* ---------- 9. Baner i ustawienia cookies (tworzone przez js/cookies.js) ---------- */
.cc-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.5rem;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, .97);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px -12px rgba(62, 16, 99, .28);
  color: var(--body);
  font-size: .9375rem;
  line-height: 1.55;
  animation: cc-in .35s ease both;
}
@keyframes cc-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.cc-banner a, .cc-modal a { color: var(--plum); text-decoration: underline; }
.cc-title {
  margin-bottom: .4rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
}
.cc-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .6rem;
  margin-top: 1rem;
}
.cc-btn {
  min-height: 44px;
  padding: .6rem 1.2rem;
  border-radius: 9999px;
  border: 1px solid #EADBEE;
  background: #fff;
  color: var(--plum);
  font-weight: 600;
  font-size: .9375rem;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}
.cc-btn:hover { background: var(--lotus-soft); }
.cc-btn--primary {
  border-color: transparent;
  background: linear-gradient(135deg, #6E24A7 0%, #591A8A 55%, #4E177A 100%);
  color: #fff;
}
.cc-btn--primary:hover { background: var(--plum-deeper); transform: translateY(-1px); }
.cc-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(30, 16, 53, .45);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.cc-modal {
  width: 100%;
  max-width: 40rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 1.75rem;
  border-radius: 1.5rem;
  background: #fff;
  color: var(--body);
  font-size: .9375rem;
  line-height: 1.55;
  box-shadow: 0 30px 80px -20px rgba(30, 16, 53, .5);
}
.cc-category {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}
.cc-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.cc-category-name { font-weight: 600; color: var(--ink); cursor: pointer; }
.cc-details { margin-top: .6rem; }
.cc-details summary { cursor: pointer; color: var(--plum); font-weight: 500; }
.cc-table {
  width: 100%;
  margin-top: .6rem;
  border-collapse: collapse;
  font-size: .8125rem;
}
.cc-table th, .cc-table td {
  padding: .45rem .5rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.cc-table th { color: var(--ink); font-weight: 600; }
.cc-switch { position: relative; display: inline-block; width: 48px; height: 28px; flex-shrink: 0; }
.cc-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.cc-switch span {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: #D9D0E2;
  transition: background-color .2s ease;
}
.cc-switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: transform .2s ease;
}
.cc-switch input:checked + span { background: var(--plum); }
.cc-switch input:checked + span::after { transform: translateX(20px); }
.cc-switch input:disabled + span { opacity: .6; }
.cc-switch input:focus-visible + span { outline: 2px solid var(--plum); outline-offset: 2px; }
@media (max-width: 480px) {
  .cc-actions { justify-content: stretch; }
  .cc-btn { flex: 1 1 100%; }
}
