/* ==========================================================================
   FRIZERSKI SALON TREND — Slovenska Bistrica
   Custom CSS — Demo website
   ========================================================================== */

/* 1. CSS Custom Properties
   ========================================================================== */
:root {
  /* Core palette */
  --cream:       #FDFAF7;
  --beige:       #F0E8DC;
  --warm-brown:  #231C15;
  --copper:      #B87060;
  --charcoal:    #3D3530;
  --sand:        #E4D8CC;
  --mist:        #F6F2EE;

  /* Transparency variants */
  --copper-10:  rgba(184, 112,  96, 0.10);
  --copper-15:  rgba(184, 112,  96, 0.15);
  --copper-80:  rgba(184, 112,  96, 0.80);

  --brown-10:   rgba(35,  28,  21, 0.10);
  --brown-70:   rgba(35,  28,  21, 0.70);
  --brown-90:   rgba(35,  28,  21, 0.90);

  --cream-80:   rgba(253, 250, 247, 0.80);
  --cream-90:   rgba(253, 250, 247, 0.90);

  /* Typography */
  --font-sans: 'Manrope', sans-serif;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-normal: 0.4s;
  --duration-slow:   0.7s;
}

/* 2. Base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--cream);
  color: var(--warm-brown);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Alpine.js FOUC prevention */
[x-cloak] {
  display: none !important;
}

/* 3. Scroll Reveal Animations
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity  var(--duration-slow) var(--ease-out),
    transform var(--duration-slow) var(--ease-out);
  will-change: opacity, transform;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Directional variants */
.reveal-left {
  transform: translateX(-24px);
}
.reveal-left.revealed {
  transform: translateX(0);
}

.reveal-right {
  transform: translateX(24px);
}
.reveal-right.revealed {
  transform: translateX(0);
}

/* Staggered delays */
.reveal-delay-1 { transition-delay: 80ms;  }
.reveal-delay-2 { transition-delay: 160ms; }
.reveal-delay-3 { transition-delay: 240ms; }

/* 4. Hero Section
   ========================================================================== */
.hero-overlay {
  background: linear-gradient(
    105deg,
    rgba(35, 28, 21, 0.72) 0%,
    rgba(35, 28, 21, 0.50) 50%,
    rgba(35, 28, 21, 0.20) 100%
  );
}

/* Scroll cue bounce — respects reduced-motion */
@media (prefers-reduced-motion: no-preference) {
  .scroll-cue svg {
    animation: bounce 2s ease-in-out infinite;
  }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0);    }
  50%       { transform: translateY(6px); }
}

/* 5. Gallery
   ========================================================================== */
.gallery-item {
  transition: box-shadow var(--duration-normal) var(--ease-out);
}

.gallery-item:hover {
  box-shadow: 0 12px 32px rgba(35, 28, 21, 0.14);
}

.gallery-img {
  transition: transform var(--duration-slow) var(--ease-out);
}

.gallery-item:hover .gallery-img {
  transform: scale(1.04);
}

/* 6. Form Inputs
   ========================================================================== */
.form-input {
  background-color: var(--mist);
  border: 1.5px solid var(--sand);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--warm-brown);
  transition: border-color var(--duration-normal) var(--ease-out),
              box-shadow    var(--duration-normal) var(--ease-out);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-input:focus {
  border-color: var(--copper);
  box-shadow: 0 0 0 3px var(--copper-10);
}

.form-input::placeholder {
  color: rgba(61, 53, 48, 0.40);
}

/* Select arrow */
select.form-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24' stroke='%233D3530' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* 7. Mobile Action Bar — Safe Area
   ========================================================================== */
.mobile-action-bar {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Prevent content from being hidden behind the bar on mobile */
@media (max-width: 1023px) {
  body {
    padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
  }
}

/* 8. Map Card
   ========================================================================== */
.map-bg {
  background: linear-gradient(135deg, #EDE4D7 0%, #DDD0BE 50%, #E8DDD0 100%);
}

.map-grid {
  background-image:
    linear-gradient(rgba(35, 28, 21, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 28, 21, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* 9. Step Numbers — Connector line (desktop)
   ========================================================================== */
@media (min-width: 1024px) {
  .steps-grid .step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 1.75rem;
    left: calc(50% + 1.75rem);
    width: calc(100% - 3.5rem);
    height: 1px;
    background: linear-gradient(90deg, rgba(184, 112, 96, 0.40), rgba(184, 112, 96, 0.10));
  }

  .steps-grid .step-item {
    position: relative;
  }
}

/* 10. Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-left,
  .reveal-right {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .gallery-img {
    transition: none;
  }

  .scroll-cue svg {
    animation: none;
  }
}
