/* ============================================================
   Natural Beauty Lębork – style.css
   Custom overrides & extensions for Tailwind
   ============================================================ */

/* ──────────────────────────────────────────────────────────
   Base & Reset
────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

/* ──────────────────────────────────────────────────────────
   Navbar – dark
────────────────────────────────────────────────────────── */
#navbar {
  background-color: rgba(10, 10, 10, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.06);
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

#navbar.navbar-scrolled {
  background-color: rgba(10, 10, 10, 1);
  box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.08);
}

/* ──────────────────────────────────────────────────────────
   Logo – golden gradient
────────────────────────────────────────────────────────── */
.logo-brand {
  background: linear-gradient(
    100deg,
    #b8892a 0%,
    #e8c96a 30%,
    #f5e09a 50%,
    #e8c96a 70%,
    #b8892a 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 700;
}

/* ──────────────────────────────────────────────────────────
   Navbar links – gold hover
────────────────────────────────────────────────────────── */
#navbar .nav-link:hover,
#navbar #oferta-btn:hover {
  color: #e8c96a !important;
}

#navbar .nav-bar-cta:hover {
  color: #e8c96a !important;
  border-color: #e8c96a !important;
  background-color: transparent !important;
}

/* ──────────────────────────────────────────────────────────
   Oferta dropdown
────────────────────────────────────────────────────────── */
#oferta-dropdown {
  animation: fadeInDown 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.dropdown-item {
  position: relative;
  padding-left: 0;
  transition: padding-left 0.2s ease, color 0.2s ease;
}

.dropdown-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleX(0);
  width: 12px;
  height: 1px;
  background: #e8c96a;
  transform-origin: left;
  transition: transform 0.2s ease;
}

.dropdown-item:hover {
  padding-left: 18px;
  color: #fff;
}

.dropdown-item:hover::before {
  transform: translateY(-50%) scaleX(1);
}

/* ──────────────────────────────────────────────────────────
   Hero – full-width, fullscreen (iOS-safe)
────────────────────────────────────────────────────────── */

/*
  Strategy: hero + intro-strip together fill the screen.
  We use svh (small viewport height) – the safest unit on
  iOS Safari as it excludes browser chrome reliably.
  The section already has mt-16/mt-20 (Tailwind) for the
  navbar offset, so we subtract that from the viewport.
  Intro strip height ≈ 72px (py-7 + text).
*/
.hero-fullscreen {
  /* mobile: subtract navbar (64px) + intro strip (72px) */
  height: calc(100svh - 64px - 72px);
  min-height: 420px;
}

@media (min-width: 640px) {
  .hero-fullscreen {
    /* sm+: navbar is 80px */
    height: calc(100svh - 80px - 72px);
    min-height: 500px;
  }
}

/* svh fallback for very old browsers */
@supports not (height: 1svh) {
  .hero-fullscreen {
    height: calc(100vh - 64px - 72px);
  }
  @media (min-width: 640px) {
    .hero-fullscreen {
      height: calc(100vh - 80px - 72px);
    }
  }
}

/* Scroll line animation */
@keyframes scrollLine {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(300%); }
}

.animate-scroll-line {
  animation: scrollLine 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ──────────────────────────────────────────────────────────
   Marquee – CSS infinite scroll, no JS reset
────────────────────────────────────────────────────────── */
.marquee-section {
  background: #0a0a0a;
}

.marquee-outer {
  overflow: hidden;
  width: 100%;
}

.marquee-inner {
  display: flex;
  align-items: center;
  white-space: nowrap;
  gap: 0;
  width: max-content;
  animation: marqueeScroll 36s linear infinite;
  will-change: transform;
}

.marquee-outer:hover .marquee-inner {
  animation-play-state: paused;
}

.marquee-text {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 500;
  color: #fff;
  flex-shrink: 0;
  padding: 0 2.5rem;
}

.marquee-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #e8c96a;
  flex-shrink: 0;
  opacity: 0.6;
}

@keyframes marqueeScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ──────────────────────────────────────────────────────────
   Sections – shared spacing
────────────────────────────────────────────────────────── */
section {
  position: relative;
}

/* ──────────────────────────────────────────────────────────
   Service Cards
────────────────────────────────────────────────────────── */
.service-card {
  will-change: transform, opacity;
}

/* ──────────────────────────────────────────────────────────
   Testimonials
────────────────────────────────────────────────────────── */
#testimonials-track {
  will-change: transform;
  cursor: grab;
  user-select: none;
}

#testimonials-track:active {
  cursor: grabbing;
}

.testimonial-card {
  flex-shrink: 0;
}

/* Responsive card widths */
@media (max-width: 639px) {
  .testimonial-card {
    width: 100%;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .testimonial-card {
    width: calc(50% - 12px);
  }
}

@media (min-width: 1024px) {
  .testimonial-card {
    width: calc(33.333% - 16px);
  }
}

/* Dot sizing */
.testimonial-dot {
  cursor: pointer;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.testimonial-dot[aria-selected="true"] {
  width: 1.5rem;
}

/* ──────────────────────────────────────────────────────────
   Gallery
────────────────────────────────────────────────────────── */
#gallery .reveal {
  overflow: hidden;
}

/* ──────────────────────────────────────────────────────────
   Back to top button
────────────────────────────────────────────────────────── */
#back-to-top {
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

#back-to-top:hover {
  transform: translateY(-3px);
}

/* ──────────────────────────────────────────────────────────
   Cookie banner
────────────────────────────────────────────────────────── */
#cookie-banner {
  backdrop-filter: none;
}

/* ──────────────────────────────────────────────────────────
   Animations
────────────────────────────────────────────────────────── */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ──────────────────────────────────────────────────────────
   Focus visible – accessibility
────────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid #1a1a1a;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ──────────────────────────────────────────────────────────
   Selection
────────────────────────────────────────────────────────── */
::selection {
  background-color: #1a1a1a;
  color: #fff;
}

/* ──────────────────────────────────────────────────────────
   Scrollbar (subtle, Webkit)
────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #faf9f7;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(26, 26, 26, 0.2);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: rgba(26, 26, 26, 0.4);
}

/* ──────────────────────────────────────────────────────────
   Reduced motion
────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  /* no hero parallax to disable */
  .marquee-inner {
    animation: none !important;
  }
}

/* ──────────────────────────────────────────────────────────
   Print
────────────────────────────────────────────────────────── */
@media print {
  #navbar,
  #back-to-top,
  #cookie-banner {
    display: none !important;
  }
}
