/* ==========================================================================
   Fonty lokalne (Poppins, Playfair Display) - bez Google Fonts CDN
   ========================================================================== */
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/poppins-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('../fonts/playfair-display-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   Reset skalowania i przewijania w poziomie
   ========================================================================== */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
}
body {
  font-family: 'Poppins', system-ui, sans-serif;
  background-color: #0b0b0d;
  color: #f5f5f4;
  overflow-x: clip;
}
.font-display { font-family: 'Playfair Display', Georgia, serif; }

img, svg, iframe, video {
  max-width: 100%;
}

/* Zabezpieczenie przed wystawaniem dzieci grid/flex poza kontener */
.grid > *, .flex > * {
  min-width: 0;
}

/* Kotwice - nawigacja nie zasłania sekcji po skoku */
#uslugi, #o-nas, #nasze-prace, #kontakt, #wnetrze {
  scroll-margin-top: 72px;
}
@media (min-width: 768px) {
  #uslugi, #o-nas, #nasze-prace, #kontakt, #wnetrze {
    scroll-margin-top: 96px;
  }
}

/* ==========================================================================
   Elementy wspólne
   ========================================================================== */
.gradient-text {
  background: linear-gradient(90deg, #9e7952, #d1ab89, #9e7952);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.btn-shine {
  position: relative;
  overflow: hidden;
}
.btn-shine::before {
  content: '';
  position: absolute;
  top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.5), transparent);
  transform: skewX(-25deg);
}
@media (hover: hover) and (pointer: fine) {
  .btn-shine {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  .btn-shine:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 30px rgba(158, 121, 82, 0.45);
  }
  .btn-shine::before {
    transition: left 0.6s ease;
  }
  .btn-shine:hover::before { left: 125%; }
}

/* Automatyczny, spokojny błysk na urządzeniach dotykowych (bez hover) */
@media (hover: none) {
  .btn-shine::before {
    animation: auto-shine 4.5s ease-in-out infinite;
  }
}
@keyframes auto-shine {
  0%, 70% { left: -75%; }
  100% { left: 125%; }
}

/* Kafle usług - z lekkim, sprężystym podskokiem (cubic-bezier) */
.service-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid rgba(158, 121, 82, 0.15);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover {
  transform: translateY(-10px);
  border-color: rgba(158, 121, 82, 0.6);
  box-shadow: 0 20px 40px -10px rgba(158, 121, 82, 0.3);
}

.hero-overlay {
  background: linear-gradient(180deg, rgba(11,11,13,0.55) 0%, rgba(11,11,13,0.75) 60%, rgba(11,11,13,1) 100%);
}

@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(158, 121, 82, 0.5); }
  50% { box-shadow: 0 0 0 10px rgba(158, 121, 82, 0); }
}
.pulse-btn { animation: pulse-gold 2.8s infinite; }

.nav-blur {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background-color: rgba(11,11,13,0.6);
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
}
@media (min-width: 768px) {
  .social-icon {
    width: 3.75rem;
    height: 3.75rem;
  }
}
.social-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Ręczne wyrównanie skali ikonek */
.social-tiktok img { transform: scale(1.45); }
.social-insta img  { transform: scale(1.1); }
.social-fb img     { transform: scale(0.85); }

@media (hover: hover) and (pointer: fine) {
  .social-icon {
    transition: transform 0.3s ease;
  }
  .social-icon:hover {
    transform: translateY(-4px);
  }
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #9e7952;
  outline-offset: 3px;
}

/* ==========================================================================
   Nawigacja - oryginalna, zgrabna wysokość paska
   ========================================================================== */
.nav-inner {
  height: 64px;
}
@media (min-width: 768px) {
  .nav-inner {
    height: 88px;
  }
}
.nav-logo {
  height: 3rem;
  width: auto;
}
@media (min-width: 768px) {
  .nav-logo {
    height: 4rem;
  }
}

/* ==========================================================================
   Menu mobilne - proste, płynne i eleganckie pojawianie się całego bloku
   ========================================================================== */
#mobile-menu:not(.hidden) {
  animation: fadeInMenu 0.3s ease-out forwards;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.7);
}

@keyframes fadeInMenu {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   HERO - oparty na svh/dvh z oryginalnym górnym odstępem
   ========================================================================== */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: 64px;
}
@supports (height: 100dvh) {
  .hero { min-height: 100dvh; }
}
@media (min-width: 768px) {
  .hero { padding-top: 88px; }
}

/* Hero animuje się natychmiast po wczytaniu CSS - niezależnie od JS, żeby nie psuć LCP */
.hero-anim {
  opacity: 0;
  animation: hero-fade-up 0.9s ease-out forwards;
}
@keyframes hero-fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Strzałka na dole hero */
.hero-arrow {
  animation: arrow-bounce 2.2s ease-in-out infinite;
}
@keyframes arrow-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ==========================================================================
   Reveal on scroll (data-reveal) - wymaga IntersectionObserver z js/site.js
   Stan początkowy ukryty TYLKO gdy JS działa (klasa "js" na <html>)
   ========================================================================== */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--d, 0ms);
}
html.js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   prefers-reduced-motion: łagodne pojawianie się zostaje, mocne efekty - nie
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .pulse-btn { animation: none; }
  .hero-arrow { animation: none; }
  .btn-shine::before { animation: none; }

  .hero-anim {
    animation: hero-fade-reduced 0.35s ease-out forwards;
  }
  @keyframes hero-fade-reduced {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  html.js [data-reveal] {
    transform: none;
    transition: opacity 0.35s ease;
  }
  html.js [data-reveal].is-visible {
    transform: none;
  }
}

/* ==========================================================================
   Mapa - blok statyczny przed kliknięciem
   ========================================================================== */
.map-placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(158, 121, 82, 0.2);
  background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Opinie: padding zabezpieczający przed ucięciem cienia przycisku */
#opinie {
  padding-bottom: 3rem;
}