/* ============================================================
   FRESH CARTEL KOSZALIN — wspólny design system
   Fiolet high-end (#8b5cf6) + grafit (#9a9aa0) na głębokiej czerni
   ============================================================ */

@font-face {
  font-family: 'Diploma';
  src: url('../fronts/diploma.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-deep: #030305;
  --bg-raise: #0a0a0c;
  --bg-panel: #111114;
  --line: rgba(255, 255, 255, 0.06);
  --text-primary: #f5f5f7;
  --text-secondary: #a1a1aa;
  --text-muted: #6b6b73;
  --accent: #8b5cf6;
  --accent-deep: #7c3aed;
  --accent-soft: #c4b5fd;
  --accent-dark: #2e1065;
  --graphite: #9a9aa0;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
               "Helvetica Neue", "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
}

html, body {
  background: var(--bg-deep);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Nowoczesna typografia Apple-style: systemowe kroje SF + Inter jako fallback.
   Gotycki logotyp (.font-sa) pozostaje świadomym kontrastem. */
body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  letter-spacing: -0.011em;
}

/* Domyślnie elementy formularzy/przycisków NIE dziedziczą fontu — wymuszamy to,
   aby cały interfejs (CTA, przyciski, cenniki) używał nowoczesnego kroju. */
button, input, select, textarea, a, p, li, span, address {
  font-family: inherit;
}

.btn-lux {
  font-family: var(--font-sans);
}

.font-sa { font-family: 'Diploma', 'Old English Text MT', 'Blackletter', serif; }
.sa-sticker { filter: url(#sa-sticker); }

/* Metaliczny gradient (fiolet high-end) dla napisów marki */
.metal-text {
  background: linear-gradient(120deg, #6d28d9 0%, #a78bfa 26%, #8b5cf6 50%, #6d28d9 74%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Wideo HUD: kinowa czerń-biel, wysublimowany kontrast */
.hud-video {
  filter: grayscale(1) contrast(1.12) brightness(0.66);
  object-fit: cover;
  will-change: transform, opacity;
  transition: opacity 0.6s ease;
}

/* Kinowe wygaszenie wewnętrznych krawędzi paneli HUD (miękkie rozpłynięcie w czerni) */
.hud-fade {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(270deg, rgba(3, 3, 5, 0.98) 0%, rgba(3, 3, 5, 0.85) 18%, rgba(3, 3, 5, 0.5) 42%, rgba(3, 3, 5, 0.18) 70%, rgba(3, 3, 5, 0) 100%);
}
.hud-fade--right {
  background: linear-gradient(90deg, rgba(3, 3, 5, 0.98) 0%, rgba(3, 3, 5, 0.85) 18%, rgba(3, 3, 5, 0.5) 42%, rgba(3, 3, 5, 0.18) 70%, rgba(3, 3, 5, 0) 100%);
}

.nav-link {
  transition: color 0.25s ease, opacity 0.25s ease;
}
.nav-link:hover { color: var(--accent); }
.nav-link--active { color: var(--accent) !important; }

/* Kapsuła nawigacji desktopowej + fioletowa kreska pod linkiem */
.nav-capsule {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  padding: 0.25rem;
  background: rgba(10, 10, 12, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav-capsule__item {
  position: relative;
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  color: var(--text-secondary);
  transition: color 0.25s ease, opacity 0.25s ease;
}
.nav-capsule__item::after {
  content: '';
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.26rem;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-capsule__item:hover { color: var(--accent); }
.nav-capsule__item:hover::after,
.nav-capsule__item.nav-link--active::after {
  transform: scaleX(1);
}

/* Telefon w pasku nawigacji — cel efektu GSAP magnetic */
.nav-phone {
  transition: color 0.25s ease, opacity 0.25s ease;
  will-change: transform;
}
.nav-phone:hover { color: var(--accent); }

/* ============================================================
   PRZYCISKI LUKSUSOWE (.btn-lux) — zero bieli
   Matowy grafit, fioletowa obwódka, fioletowy/srebrny tekst
   ============================================================ */
.btn-lux {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: #0a0a0c;
  border: 1px solid rgba(139, 92, 246, 0.45);
  color: #8b5cf6;
  border-radius: 9999px;
  font-weight: 600;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}
.btn-lux:hover {
  background-color: #111114;
  border-color: #8b5cf6;
  color: #c4b5fd;
}
.btn-lux:active {
  background-color: #0a0a0c;
  border-color: #8b5cf6;
}

/* Wariant srebrny (platynowe srebro zamiast fioletu) */
.btn-lux--silver {
  color: #c4b5fd;
  border-color: rgba(196, 181, 253, 0.4);
}
.btn-lux--silver:hover {
  border-color: #c4b5fd;
  color: #f5f5f7;
}

/* CTA Booksy — pełny (wypełnienie grafitowe + fioletowa obwódka) */
.gsap-cta {
  transition-property: color, background-color, border-color, opacity, filter !important;
}

/* Aktywny filtr cennika */
.price-filter--active {
  color: var(--text-primary) !important;
  border-color: var(--accent) !important;
}

/* Ukryj uszkodzone obrazy (fallback) */
.img-missing img { display: none; }
.img-missing::after {
  content: '';
  display: block;
  height: 100%;
  background: radial-gradient(circle at center, #111114 0%, #0a0a0c 70%);
}

/* Anchor offset pod sticky header */
section[id] { scroll-margin-top: 5rem; }

/* GSAP animuje transform i box-shadow — wyłącz te właściwości z CSS transition */
[data-gsap-hover], .gsap-cta {
  transition-property: color, background-color, border-color, opacity, filter !important;
}

/* ============================================================
   ARKUSZ SPECYFIKACJI (styl Ferrari Telemetry) — zamiast pasków skilli
   ============================================================ */
.spec-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.7rem;
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 9999px;
  font-size: 0.6875rem;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(139, 92, 246, 0.08);
  white-space: nowrap;
}
.spec-rows {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.spec-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.7rem 0.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.spec-row__label {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}
.spec-row__meta {
  margin-left: auto;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.spec-row__price {
  min-width: 3.75rem;
  text-align: right;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ============================================================
   COOKIES CONSENT + LINKI PRAWNE (TASK E)
   ============================================================ */
.cookie-banner {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  left: 1rem;
  right: 1rem;
  bottom: 5.5rem; /* nad sticky CTA na mobile */
}
.cookie-banner__card {
  pointer-events: auto;
  background: rgba(10, 10, 12, 0.9);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 1rem;
  padding: 1.25rem 1.25rem 1.1rem;
  box-shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.cookie-banner__title {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--accent-soft);
  margin-bottom: 0.5rem;
}
.cookie-banner__text {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}
.cookie-banner__link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(139, 92, 246, 0.45);
  transition: color 0.25s ease, text-decoration-color 0.25s ease;
}
.cookie-banner__link:hover {
  color: var(--accent-soft);
  text-decoration-color: var(--accent-soft);
}
.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.cookie-banner__actions .btn-lux {
  flex: 1 1 auto;
  padding: 0.55rem 0.9rem;
  font-size: 0.8125rem;
}

@media (min-width: 768px) {
  .cookie-banner {
    left: auto;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 24rem;
    max-width: calc(100vw - 3rem);
  }
}

/* Przycisk fioletowy (wypełniony) — „Akceptuję wszystkie” */
.btn-lux--accent {
  background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 45%, #7c3aed 100%);
  border-color: transparent;
  color: #f5f5f7;
}
.btn-lux--accent:hover {
  background: linear-gradient(135deg, #c4b5fd 0%, #a78bfa 45%, #8b5cf6 100%);
  border-color: transparent;
  color: #f5f5f7;
}
.btn-lux--accent:active {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  border-color: transparent;
}

/* Przycisk grafitowy — „Tylko niezbędne” */
.btn-lux--ghost {
  background-color: rgba(10, 10, 12, 0.6);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
}
.btn-lux--ghost:hover {
  background-color: #111114;
  border-color: rgba(139, 92, 246, 0.5);
  color: var(--accent-soft);
}

/* Linki prawne w stopce */
.footer-legal {
  display: inline-block;
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.25s ease;
}
.footer-legal:hover {
  color: var(--accent);
}
.footer-legal:focus-visible {
  outline: 1px solid rgba(139, 92, 246, 0.5);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Strażnik szerokości treści: pełnoekranowe panele HUD po bokach */
@media (min-width: 1280px) {
  main,
  footer {
    padding-left: max(20vw, 17.5rem);
    padding-right: max(20vw, 17.5rem);
  }
}

@media (min-width: 1536px) {
  main,
  footer {
    padding-left: max(22vw, 17.5rem);
    padding-right: max(22vw, 17.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #030305; }
::-webkit-scrollbar-thumb { background: #1c1c20; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #2a2a2e; }

/* FAQ — akordeon (fiolet / grafit) */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.faq-item {
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #0a0a0c;
  border-radius: 0.75rem;
  overflow: hidden;
}
.faq-item[open] {
  border-color: rgba(139, 92, 246, 0.30);
}
.faq-item__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  padding: 1rem 1.25rem;
  color: #c4b5fd;
  font-weight: 600;
  list-style: none;
  transition: color 0.25s ease;
}
.faq-item__q::-webkit-details-marker {
  display: none;
}
.faq-item__q:hover {
  color: var(--accent);
}
.faq-item__icon {
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
  color: #8b5cf6;
  transition: transform 0.3s ease;
}
.faq-item[open] .faq-item__icon {
  transform: rotate(180deg);
}
.faq-item__a {
  padding: 0 1.25rem 1.15rem;
}
.faq-item__a p {
  margin: 0;
  color: #a1a1aa;
  font-size: 0.875rem;
  line-height: 1.6;
}
.faq-item__a a {
  color: var(--accent);
  text-underline-offset: 3px;
}

/* ============================================================
   SOCIAL IKONY (Instagram / TikTok) — fioletowy hover
   ============================================================ */
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  background: transparent;
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}
.social-link:hover {
  color: var(--accent);
  border-color: rgba(139, 92, 246, 0.55);
  background-color: rgba(139, 92, 246, 0.08);
}
.social-link:focus-visible {
  outline: 1px solid rgba(139, 92, 246, 0.5);
  outline-offset: 3px;
}
.social-link svg {
  width: 1.125rem;
  height: 1.125rem;
  display: block;
}

/* ============================================================
   LIGHTBOX GALERII (pełnoekranowy podgląd zdjęć i wideo)
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 3, 5, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  padding: 2rem;
}
.lightbox[hidden] { display: none; }
.lightbox__media {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
}
.lightbox__media img,
.lightbox__media video {
  display: block;
  max-width: 92vw;
  max-height: 86vh;
  border-radius: 0.875rem;
  border: 1px solid rgba(139, 92, 246, 0.28);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9);
  object-fit: contain;
}
.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 10, 12, 0.72);
  color: var(--text-primary);
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}
.lightbox__close:hover {
  color: var(--accent);
  border-color: rgba(139, 92, 246, 0.55);
  background: rgba(139, 92, 246, 0.1);
}
.lightbox__close svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Klikalne kafelki galerii + badge wideo */
.gallery-item[data-lightbox] {
  cursor: pointer;
  position: relative;
}
.gallery-item[data-lightbox]:hover img,
.gallery-item[data-lightbox]:hover video {
  transform: scale(1.04);
}
.gallery-item img,
.gallery-item video {
  transition: transform 0.5s ease;
}
.gallery-item__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.gallery-item__play span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background: rgba(139, 92, 246, 0.85);
  color: #f5f5f7;
  box-shadow: 0 10px 26px -8px rgba(139, 92, 246, 0.7);
}
.gallery-item__play svg {
  width: 1.15rem;
  height: 1.15rem;
  margin-left: 2px;
}
