/* ==========================================================================
   PAL-MONT — Premium Design System
   Custom styles complementing Tailwind v4 utility classes
   Sve component klase su u @layer components da bi Tailwind utilities
   (koje su u layer-u "utilities") mogle ispravno da ih nadjačaju.
   ========================================================================== */

/* ---------- Custom Properties / Tokens (globalno, van layera) ---------- */
:root {
  --color-palmont-red: #DC2626;
  --color-palmont-red-dark: #991B1B;
  --color-palmont-red-light: #FCA5A5;
  --color-palmont-gold: #C9A646;
  --color-palmont-gold-light: #E5C46B;
  --color-palmont-gold-dark: #9C8237;
  --color-palmont-dark: #1A1410;
  --color-palmont-dark-2: #2A211A;
  --color-palmont-cream: #FAF6EE;
  --color-palmont-cream-2: #F2EBDB;
  --color-palmont-wood: #8B6F47;
  --color-palmont-line: rgba(26, 20, 16, 0.08);

  --shadow-card: 0 1px 2px rgba(26, 20, 16, 0.04),
                 0 8px 24px rgba(26, 20, 16, 0.06);
  --shadow-card-hover: 0 4px 8px rgba(26, 20, 16, 0.06),
                       0 20px 48px rgba(26, 20, 16, 0.12);

  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-sans: 'Inter', system-ui, sans-serif;
}

@layer components {

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-sans);
  color: var(--color-palmont-dark);
  background-color: var(--color-palmont-cream);
  line-height: 1.65;
  font-feature-settings: "ss01", "cv11";
  overflow-x: clip; /* safety net protiv horizontalnog scrolla; "clip" (ne "hidden") da se body ne pretvori u scroll-kontejner i ne pokvari scroll-padding-top za anchore */
}

h1, h2, h3, h4, h5, h6,
.font-display {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

::selection {
  background: var(--color-palmont-red);
  color: white;
}

/* ---------- Layout helpers ---------- */
.container-px {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
@media (min-width: 768px) {
  .container-px { padding-left: 2rem; padding-right: 2rem; }
}
@media (min-width: 1280px) {
  .container-px { padding-left: 3rem; padding-right: 3rem; }
}

.section-py {
  padding-top: 4rem;
  padding-bottom: 4rem;
}
@media (min-width: 768px) {
  .section-py { padding-top: 6rem; padding-bottom: 6rem; }
}
@media (min-width: 1024px) {
  .section-py { padding-top: 8rem; padding-bottom: 8rem; }
}

/* ---------- Typography Scale ---------- */
.heading-display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 6vw + 1rem, 6rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.heading-1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.25rem, 4vw + 1rem, 4.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.heading-2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.875rem, 2.5vw + 1rem, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.heading-3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 1.5vw + 0.75rem, 2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.eyebrow {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
}
.eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: currentColor;
  display: inline-block;
}

.lead {
  font-size: clamp(1.0625rem, 0.5vw + 1rem, 1.25rem);
  line-height: 1.6;
  color: rgba(26, 20, 16, 0.75);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 999px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1;
}
.btn-lg {
  padding: 1.0625rem 2.25rem;
  font-size: 1rem;
}
.btn-primary {
  background: var(--color-palmont-red);
  color: white;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
}
.btn-primary:hover {
  background: var(--color-palmont-red-dark);
  box-shadow: 0 6px 22px rgba(220, 38, 38, 0.4);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--color-palmont-dark);
  color: white;
}
.btn-secondary:hover {
  background: #000;
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--color-palmont-dark);
  border-color: rgba(26, 20, 16, 0.15);
}
.btn-outline:hover {
  background: var(--color-palmont-dark);
  color: white;
  border-color: var(--color-palmont-dark);
}
.btn-outline-light {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
}
.btn-outline-light:hover {
  background: white;
  color: var(--color-palmont-dark);
  border-color: white;
}
.btn-gold {
  background: var(--color-palmont-gold);
  color: var(--color-palmont-dark);
  box-shadow: 0 4px 14px rgba(201, 166, 70, 0.35);
}
.btn-gold:hover {
  background: var(--color-palmont-gold-light);
  transform: translateY(-1px);
}
.btn .arrow {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn:hover .arrow {
  transform: translateX(3px);
}

/* ---------- Navigation ---------- */
.nav-link {
  position: relative;
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: -0.005em;
  padding: 0.5rem 0;
  color: var(--color-palmont-dark);
  transition: color 0.2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--color-palmont-red);
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link:hover,
.nav-link.active {
  color: var(--color-palmont-red);
}
.nav-link.active::after,
.nav-link:hover::after {
  width: 100%;
}

body.hero-dark header.site-header:not(.scrolled) .nav-link {
  color: rgba(255, 255, 255, 0.85);
}
body.hero-dark header.site-header:not(.scrolled) .nav-link:hover,
body.hero-dark header.site-header:not(.scrolled) .nav-link.active {
  color: var(--color-palmont-gold);
}
body.hero-dark header.site-header:not(.scrolled) .nav-link.active::after,
body.hero-dark header.site-header:not(.scrolled) .nav-link:hover::after {
  background: var(--color-palmont-gold);
}
body.hero-dark header.site-header:not(.scrolled) .burger {
  color: white;
}

header.site-header {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(0px);
}
header.site-header.scrolled {
  background: rgba(250, 246, 238, 0.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--color-palmont-line);
}

/* ---------- Hero ---------- */
.hero-overlay {
  background:
    linear-gradient(95deg,
      rgba(26, 20, 16, 0.90) 0%,
      rgba(26, 20, 16, 0.75) 40%,
      rgba(26, 20, 16, 0.55) 75%,
      rgba(26, 20, 16, 0.70) 100%
    ),
    linear-gradient(180deg,
      rgba(26, 20, 16, 0.45) 0%,
      rgba(26, 20, 16, 0.55) 50%,
      rgba(26, 20, 16, 0.9) 100%
    );
}

.hero-img {
  filter: saturate(0.95) contrast(1.05) brightness(0.7);
}

/* ---------- Cards ---------- */
.card {
  background: white;
  border-radius: 1.25rem;
  border: 1px solid var(--color-palmont-line);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(26, 20, 16, 0.12);
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--color-palmont-red) 0%, #B91C1C 100%);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.25);
}
.service-icon.gold {
  background: linear-gradient(135deg, var(--color-palmont-gold) 0%, #A88936 100%);
  color: var(--color-palmont-dark);
  box-shadow: 0 6px 18px rgba(201, 166, 70, 0.3);
}

/* ---------- Class Cards (Pallet classes) ---------- */
.class-card {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  background: white;
  border: 1px solid var(--color-palmont-line);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.class-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}
.class-badge {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background: var(--color-palmont-dark);
  color: white;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8125rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
  line-height: 1.2;
}
.class-badge.gold {
  background: var(--color-palmont-gold);
  color: var(--color-palmont-dark);
}
.class-badge.red {
  background: var(--color-palmont-red);
  color: white;
}
.class-card .class-badge {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  z-index: 2;
}

/* ---------- Stats ---------- */
.stat-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 4vw + 1rem, 4.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--color-palmont-gold) 0%, var(--color-palmont-gold-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Form ---------- */
.form-field {
  width: 100%;
  padding: 0.9375rem 1.125rem;
  border: 1.5px solid rgba(26, 20, 16, 0.12);
  border-radius: 0.75rem;
  background: white;
  font-family: var(--font-sans);
  font-size: 1rem; /* 16px — sprječava auto-zoom inputa na iOS Safari */
  color: var(--color-palmont-dark);
  transition: all 0.2s ease;
}
.form-field:focus {
  outline: none;
  border-color: var(--color-palmont-red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}
.form-field::placeholder {
  color: rgba(26, 20, 16, 0.4);
}
textarea.form-field {
  resize: vertical;
  min-height: 140px;
}
.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-palmont-dark);
  margin-bottom: 0.5rem;
}

/* ---------- Wood/texture decor ---------- */
.wood-pattern {
  background-color: var(--color-palmont-dark);
  background-image:
    radial-gradient(circle at 20% 50%, rgba(201, 166, 70, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(220, 38, 38, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, var(--color-palmont-dark) 0%, var(--color-palmont-dark-2) 100%);
}

.divider-gold {
  width: 60px;
  height: 4px;
  background: var(--color-palmont-gold);
  border-radius: 2px;
}

/* ---------- Animations ---------- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes slideRight {
  from {
    opacity: 0;
    transform: translateX(-24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.4s; }

.hero-title {
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-subtitle {
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}
.hero-cta {
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

/* Hero text shadows za maksimalnu čitljivost preko fotografija */
.hero-title {
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}
.hero-subtitle {
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.45);
}

/* ---------- Mobile menu ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--color-palmont-dark);
  z-index: 100;
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
.mobile-menu.open {
  transform: translateY(0);
}
.mobile-menu .nav-item {
  display: block;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  color: white;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: color 0.2s ease;
}
.mobile-menu .nav-item:hover {
  color: var(--color-palmont-gold);
}
.mobile-menu .nav-item.active {
  color: var(--color-palmont-red);
}

/* 44×44 tap target (WCAG 2.5.5 / iOS HIG) — vizuelne linije ostaju kompaktne */
.burger {
  width: 44px;
  height: 44px;
  position: relative;
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--color-palmont-dark);
  -webkit-tap-highlight-color: transparent;
}
.burger span {
  display: block;
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 22px; left: auto; right: 10px; width: 16px; }
.burger span:nth-child(3) { top: 28px; }
.burger.open span:nth-child(1) {
  top: 22px;
  transform: rotate(45deg);
}
.burger.open span:nth-child(2) {
  opacity: 0;
}
.burger.open span:nth-child(3) {
  top: 22px;
  transform: rotate(-45deg);
}

/* ---------- Gallery ---------- */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  cursor: pointer;
  background: var(--color-palmont-dark);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.4s ease;
}
.gallery-item:hover img {
  transform: scale(1.08);
  opacity: 0.85;
}
.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(26, 20, 16, 0.7) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gallery-item:hover::after {
  opacity: 1;
}
.gallery-caption {
  position: absolute;
  bottom: 1rem;
  left: 1.25rem;
  right: 1.25rem;
  color: white;
  font-weight: 600;
  font-size: 0.9375rem;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.3s ease;
  z-index: 2;
}
.gallery-item:hover .gallery-caption {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(26, 20, 16, 0.95);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.lightbox.open {
  display: flex;
  opacity: 1;
}
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 0.75rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}
.lightbox-close { top: 1.5rem; right: 1.5rem; }
.lightbox-prev { left: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-prev:hover { transform: translateY(-50%) scale(1.05); }
.lightbox-next:hover { transform: translateY(-50%) scale(1.05); }

/* ---------- Misc ---------- */
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  background: rgba(220, 38, 38, 0.1);
  color: var(--color-palmont-red);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.tag-pill.gold {
  background: rgba(201, 166, 70, 0.15);
  color: var(--color-palmont-gold-dark);
}
.tag-pill.dark {
  background: rgba(26, 20, 16, 0.06);
  color: var(--color-palmont-dark);
}

.check-list li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.875rem;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.25rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-palmont-red);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* ---------- Footer ---------- */
.footer-link {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9375rem;
  transition: color 0.2s ease;
  display: inline-block;
  padding: 0.25rem 0;
}
.footer-link:hover {
  color: var(--color-palmont-gold);
}

/* ---------- Utility for image objects ---------- */
.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Accessibility focus ---------- */
a:focus-visible,
button:focus-visible,
.form-field:focus-visible {
  outline: 2px solid var(--color-palmont-red);
  outline-offset: 3px;
}

/* ---------- Print improvements (basic) ---------- */
@media print {
  .site-header, .site-footer, .mobile-menu { display: none; }
}

} /* end @layer components */

/* ---------- Reduced motion (a11y) ----------
   Van @layer-a + !important da pouzdano nadjača animacije/tranzicije.
   Takođe garantuje da .reveal sadržaj ostane vidljiv. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
