/* ==========================================================================
   M Auto Detailing Centar — CSS Design System
   ==========================================================================
   Single source of truth for the visual language. Every color, spacing value,
   animation timing, and shadow is defined once as a CSS custom property.
   No magic numbers in any downstream component — reference tokens only.

   Architecture: CSS @layer cascade for predictable specificity.
   Order: reset > tokens > base > layout > nav > components > utilities > animations > mediaqueries
   ========================================================================== */

@layer reset, tokens, base, layout, nav, components, utilities, animations, mediaqueries;

/* ==========================================================================
   LAYER: RESET
   Modern CSS reset — normalize box model, remove default margins,
   establish sane defaults for media elements and form controls.
   ========================================================================== */

@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
  }

  img,
  video,
  canvas,
  svg {
    display: block;
    max-width: 100%;
  }

  input,
  button,
  textarea,
  select {
    font: inherit;
  }

  p,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    overflow-wrap: break-word;
  }

  ul,
  ol {
    list-style: none;
  }

  a {
    text-decoration: none;
    color: inherit;
  }

  button {
    cursor: pointer;
    border: none;
    background: none;
  }
}

/* ==========================================================================
   LAYER: TOKENS
   Complete design token system. Every value used across the site originates
   here. Downstream declarations use var(--token-name) exclusively.
   ========================================================================== */

@layer tokens {
  :root {
    /* ---- Colors ---- */
    --color-bg: #0A0A0A;
    --color-surface: #1A1A1A;
    --color-surface-2: #242424;
    --color-gold: #D4A843;
    --color-gold-dim: #B8923A;
    --color-gold-subtle: rgba(212, 168, 67, 0.12);
    --color-text: #FFFFFF;
    --color-text-muted: #B0B0B0;
    --color-text-dim: #707070;
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-gold: rgba(212, 168, 67, 0.3);
    --color-overlay: rgba(10, 10, 10, 0.85);

    /* ---- Typography ---- */
    --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* ---- Fluid Type Scale (320px -> 1440px viewport) ---- */
    --text-xs: clamp(0.75rem, 1.5vw, 0.875rem);
    --text-sm: clamp(0.875rem, 1.8vw, 1rem);
    --text-base: clamp(1rem, 2vw, 1.125rem);
    --text-lg: clamp(1.125rem, 2.2vw, 1.25rem);
    --text-xl: clamp(1.25rem, 2.5vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 3vw, 2rem);
    --text-3xl: clamp(2rem, 4vw, 2.75rem);
    --text-4xl: clamp(2.5rem, 5vw, 3.5rem);
    --text-hero: clamp(2.5rem, 6vw, 5rem);

    /* ---- Spacing Scale ---- */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --section-padding: clamp(4rem, 8vw, 8rem);

    /* ---- Animation ---- */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
    --duration-fast: 150ms;
    --duration-base: 300ms;
    --duration-slow: 600ms;
    --duration-enter: 800ms;

    /* ---- Shadows ---- */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-gold-glow: 0 0 24px rgba(212, 168, 67, 0.35), 0 0 48px rgba(212, 168, 67, 0.15);
    --shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(212, 168, 67, 0.2);

    /* ---- Glass / Blur ---- */
    --blur-glass: blur(12px);
    --blur-sm: blur(4px);
    --glass-bg: rgba(26, 26, 26, 0.75);
    --glass-border: rgba(255, 255, 255, 0.08);

    /* ---- Border Radius ---- */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* ---- Z-Index Scale ---- */
    --z-below: -1;
    --z-base: 0;
    --z-grain: 1;
    --z-nav: 250;
    --z-overlay: 200;
    --z-modal: 300;

    /* ---- Layout ---- */
    --container-max: 1200px;
    --container-padding: clamp(1rem, 4vw, 2rem);
    --nav-height: 72px;
    --nav-height-scrolled: 64px;
  }
}

/* ==========================================================================
   LAYER: BASE
   Element-level styles applied to HTML tags and foundational classes.
   Grain texture overlay, skip-to-content, focus styles.
   ========================================================================== */

@layer base {
  body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100dvh;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* Grain / noise texture overlay — ANIM-04
     SVG feTurbulence generates organic film-grain at zero HTTP cost.
     Fixed positioning ensures the grain covers the entire viewport
     regardless of scroll position. Opacity kept very low (0.04) so
     the texture is felt, not seen. */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: var(--z-grain);
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    background-size: 200px 200px;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.15;
    color: var(--color-text);
  }

  /* Skip-to-content link — ACCESS-04
     First focusable element; invisible until keyboard focus.
     Gold background for maximum visibility when activated. */
  .skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-4);
    padding: var(--space-3) var(--space-6);
    background: var(--color-gold);
    color: var(--color-bg);
    font-weight: 600;
    font-size: var(--text-sm);
    border-radius: var(--radius-md);
    z-index: calc(var(--z-modal) + 1);
    transition: top var(--duration-fast) var(--ease-out);
    white-space: nowrap;
  }

  .skip-link:focus-visible {
    top: var(--space-4);
  }

  /* Global focus-visible style — ACCESS-02
     Gold outline with offset for clear keyboard navigation indication.
     Only appears for keyboard users, not mouse clicks. */
  :focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
  }

  :focus:not(:focus-visible) {
    outline: none;
  }
}

/* ==========================================================================
   LAYER: LAYOUT
   Container, section primitives, and CSS Grid utilities.
   These are the structural bones every section builds upon.
   ========================================================================== */

@layer layout {
  .container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-padding);
  }

  .section {
    padding-block: var(--section-padding);
  }

  .section--dark {
    background-color: var(--color-bg);
  }

  .section--surface {
    background-color: var(--color-surface);
  }

  /* CSS Grid utilities — D-14 */
  .grid {
    display: grid;
    gap: var(--space-6);
  }

  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   LAYER: NAV
   Full navigation system — transparent initial state, glassmorphism on
   scroll, desktop links, hamburger morph animation, mobile overlay menu.
   ========================================================================== */

@layer nav {
  /* --- Base nav — initially transparent, overlaying hero --- */
  .nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    z-index: var(--z-nav);
    transition:
      background-color var(--duration-base) var(--ease-out),
      backdrop-filter var(--duration-base) var(--ease-out),
      height var(--duration-base) var(--ease-out),
      box-shadow var(--duration-base) var(--ease-out);
    background-color: transparent;
    backdrop-filter: none;
  }

  /* Scrolled glassmorphism state — toggled by JS via classList (NAV-01)
     Frosted dark glass with a subtle bottom border and shadow.
     Height shrinks slightly for a refined, compact appearance. */
  .nav--scrolled {
    background-color: var(--glass-bg);
    backdrop-filter: var(--blur-glass);
    -webkit-backdrop-filter: var(--blur-glass);
    height: var(--nav-height-scrolled);
    box-shadow: 0 1px 0 var(--glass-border), var(--shadow-md);
  }

  .nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-padding);
  }

  /* Logo — flex container for image + optional wordmark */
  .nav__logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    flex-shrink: 0;
  }

  .nav__logo-img {
    height: 56px;
    width: auto;
    object-fit: contain;
    /* Logo has dark/black linework on a transparent background — invisible
       against the dark site. drop-shadow traces the alpha mask to create a
       white halo around every opaque pixel, making the artwork read clearly
       on any dark surface (transparent nav over video OR scrolled glass nav).
       Two passes at different blur radii: the tight 0px pass gives crisp
       white edges; the 2px pass adds a soft glow that improves legibility
       against mid-tone backgrounds. */
    filter:
      drop-shadow(0 0 0px #ffffff)
      drop-shadow(0 0 2px rgba(255, 255, 255, 0.6));
    transition: filter var(--duration-base) var(--ease-out);
  }

  /* Desktop nav links — horizontal list with underline reveal on hover */
  .nav__links {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    list-style: none;
  }

  .nav__link {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: 0.04em;
    position: relative;
    padding-block: var(--space-2);
    min-height: 44px;
    display: flex;
    align-items: center;
    transition: color var(--duration-fast) var(--ease-out);
  }

  /* Underline reveal — slides in from left on hover */
  .nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-gold);
    transition: width var(--duration-base) var(--ease-out);
  }

  .nav__link:hover {
    color: var(--color-gold);
  }

  .nav__link:hover::after {
    width: 100%;
  }

  /* Active nav link state — set by JS IntersectionObserver */
  .nav__link--active {
    color: var(--color-gold);
  }

  .nav__link--active::after {
    width: 100%;
  }

  /* Golden CTA button in nav — D-04
     Always visible, primary conversion trigger. */
  .btn--cta-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) var(--space-6);
    min-height: 44px;
    background-color: var(--color-gold);
    color: var(--color-bg);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--text-sm);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition:
      background-color var(--duration-fast) var(--ease-out),
      transform var(--duration-fast) var(--ease-out),
      box-shadow var(--duration-fast) var(--ease-out);
    white-space: nowrap;
  }

  .btn--cta-nav:hover {
    background-color: var(--color-gold-dim);
    transform: translateY(-1px);
    box-shadow: var(--shadow-gold-glow);
  }

  .btn--cta-nav:active {
    transform: translateY(0);
  }

  /* Hamburger button — D-06
     Three bars that morph into X via CSS transforms.
     Hidden on desktop, visible on mobile. */
  .nav__hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: var(--space-2);
    flex-shrink: 0;
  }

  .nav__hamburger-bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--color-text);
    border-radius: 2px;
    transition:
      transform var(--duration-base) var(--ease-out),
      opacity var(--duration-base) var(--ease-out);
  }

  /* Hamburger morphs to X when open — D-06
     Top bar rotates 45deg down, middle bar fades out,
     bottom bar rotates -45deg up. translateY values
     match the gap (5px) + bar height (2px) = 7px. */
  .nav__hamburger--open .nav__hamburger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav__hamburger--open .nav__hamburger-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }

  .nav__hamburger--open .nav__hamburger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Desktop: nav__menu uses display:contents to flatten into parent flex */
  .nav__menu {
    display: contents;
  }

  /* --- Mobile menu overlay — D-05 ---
     Full-screen dark overlay with centered links.
     Transitions from invisible to visible via opacity. */
  .nav__menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(10, 10, 10, 0.97);
    backdrop-filter: var(--blur-sm);
    -webkit-backdrop-filter: var(--blur-sm);
    z-index: var(--z-overlay);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-8);
    opacity: 0;
    transition: opacity var(--duration-base) var(--ease-out);
  }

  .nav__menu-overlay.nav__menu--open {
    display: flex;
    opacity: 1;
  }

  .nav__menu-overlay .nav__links {
    flex-direction: column;
    align-items: center;
    gap: var(--space-6);
  }

  .nav__menu-overlay .nav__link {
    font-size: var(--text-2xl);
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.06em;
    min-height: 48px;
  }

  .nav__menu-cta {
    margin-top: var(--space-8);
  }

  .nav__menu-cta .btn--cta-nav {
    padding: var(--space-4) var(--space-10);
    font-size: var(--text-base);
  }
}

/* ==========================================================================
   LAYER: COMPONENTS
   Reusable component patterns — buttons, section headings, cards.
   Used across multiple sections in Phase 2-5.
   ========================================================================== */

@layer components {
  /* --- Primary CTA button --- */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4) var(--space-8);
    min-height: 44px;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--text-sm);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition:
      background-color var(--duration-fast) var(--ease-out),
      transform var(--duration-fast) var(--ease-out),
      box-shadow var(--duration-fast) var(--ease-out);
  }

  .btn--primary {
    background-color: var(--color-gold);
    color: var(--color-bg);
    border: 2px solid var(--color-gold);
  }

  .btn--primary:hover {
    background-color: var(--color-gold-dim);
    border-color: var(--color-gold-dim);
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-gold-glow);
  }

  .btn--primary:active {
    transform: translateY(0);
  }

  .btn--outline {
    background-color: transparent;
    color: var(--color-gold);
    border: 2px solid var(--color-gold);
  }

  .btn--outline:hover {
    background-color: var(--color-gold);
    color: var(--color-bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold-glow);
  }

  .btn--outline:active {
    transform: translateY(0);
  }

  /* --- Section heading pattern ---
     Label (small gold uppercase), title (large heading), subtitle (muted).
     Centered with constrained subtitle width for optimal reading. */
  .section-heading {
    text-align: center;
    margin-bottom: var(--space-16);
  }

  .section-heading__label {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: var(--space-4);
  }

  .section-heading__title {
    font-size: var(--text-4xl);
    font-family: var(--font-heading);
    font-weight: 800;
    margin-bottom: var(--space-4);
  }

  .section-heading__subtitle {
    font-size: var(--text-lg);
    color: var(--color-text-muted);
    max-width: 56ch;
    margin-inline: auto;
  }

  /* --- Glassmorphism card ---
     Frosted-glass surface with subtle border. Used for service cards,
     pricing cards, trust signals, and any elevated surface. */
  .card-glass {
    background-color: var(--glass-bg);
    backdrop-filter: var(--blur-glass);
    -webkit-backdrop-filter: var(--blur-glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
  }

  /* Card hover lift — subtle elevation change with gold glow accent */
  .card-glass--hoverable {
    transition:
      transform var(--duration-base) var(--ease-out),
      box-shadow var(--duration-base) var(--ease-out),
      border-color var(--duration-base) var(--ease-out);
  }

  .card-glass--hoverable:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--color-border-gold);
  }

  /* ==========================================================================
     HERO SECTION — Phase 2
     Fullscreen video hero with staggered entrance animation.
     All z-index values are below --z-nav (100) so nav overlays correctly.
     ========================================================================== */

  /* Hero section container */
  .section--hero {
    /* Override .section padding-block from @layer layout */
    padding-block: 0;
    position: relative;
    min-height: 100vh;      /* Fallback for browsers without dvh support */
    min-height: 100dvh;     /* dvh accounts for mobile browser chrome (Baseline June 2025) */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;         /* Contains absolutely-positioned video (prevents bleed into next section) */
    background-color: var(--color-bg);  /* Dark fallback when video is not loaded */
  }

  /* Video background layer */
  .hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    background-color: var(--color-bg);  /* Prevents white flash before video frame renders (Pitfall 1) */
  }

  /* Dark overlay between video and content */
  .hero__overlay {
    position: absolute;
    inset: 0;
    background: var(--color-overlay);  /* rgba(10, 10, 10, 0.85) — token from Phase 1 */
    z-index: 1;
  }

  /* Hero content container — centered flex column */
  .hero__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-6);
    padding-top: var(--nav-height);    /* D-03: push center-of-gravity below 72px fixed nav */
    padding-inline: var(--container-padding);
    max-width: var(--container-max);
    width: 100%;
  }

  /* Hero logo — large brand anchor above headline */
  .hero__logo {
    display: block;
  }

  .hero__logo-img {
    width: clamp(160px, 25vw, 280px);  /* D-05: fluid sizing, desktop max 280px */
    height: auto;
    object-fit: contain;
    /* Same white drop-shadow treatment as nav logo — dark linework on a
       transparent background needs the shadow halo to be visible over the
       dark video overlay. A stronger glow radius (4px) is used here because
       the logo is larger and the hero is a more prominent branding moment. */
    filter:
      drop-shadow(0 0 0px #ffffff)
      drop-shadow(0 0 4px rgba(255, 255, 255, 0.55));
  }

  /* Hero display heading — primary message */
  .hero__title {
    font-family: var(--font-heading);
    font-size: var(--text-hero);       /* clamp(2.5rem, 6vw, 5rem) */
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;           /* Premium tightening at large display size */
    color: var(--color-text);
    max-width: 16ch;                   /* Prevents wrapping beyond 2 lines */
  }

  /* Hero subtitle — supporting copy, visually de-emphasised */
  .hero__subtitle {
    font-family: var(--font-body);
    font-size: var(--text-xl);         /* clamp(1.25rem, 2.5vw, 1.5rem) */
    font-weight: 400;
    line-height: 1.5;
    color: var(--color-text-muted);    /* #B0B0B0 — intentional secondary emphasis */
    max-width: 36ch;
  }

  /* Hero CTA — inherits .btn.btn--primary styles from Phase 1 components layer */
  /* No additional base styles needed — .hero__cta is used only for animation targeting */

  /* Scroll indicator — pinned bottom-center, invites scrolling */
  .hero__scroll-indicator {
    position: absolute;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%);       /* Center precisely */
    z-index: 2;
    color: var(--color-gold);          /* Gold chevron — accent usage per UI-SPEC */
    opacity: 0;                        /* Start invisible — heroFadeRise handles entrance */
  }

  /* ==========================================================================
     TRUST SIGNALS SECTION — Zašto Mi (D-11)
     4 cards in 2x2 grid, icon left + text right on desktop.
     ========================================================================== */

  .trust-card {
    padding: var(--space-6);
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
  }

  .trust-card__icon-wrap {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background-color: var(--color-gold-subtle);
  }

  .trust-card__icon {
    color: var(--color-gold);
  }

  .trust-card__title {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-2);
  }

  .trust-card__desc {
    font-size: var(--text-base);
    color: var(--color-text-muted);
    line-height: 1.7;
  }

  /* Trust card floating animation (TRUST-02, D-16) — staggered delays for organic feel */
  .trust-card:nth-child(1) { animation: trustFloat 6s ease-in-out 0s infinite; }
  .trust-card:nth-child(2) { animation: trustFloat 6s ease-in-out 1.5s infinite; }
  .trust-card:nth-child(3) { animation: trustFloat 6s ease-in-out 3s infinite; }
  .trust-card:nth-child(4) { animation: trustFloat 6s ease-in-out 4.5s infinite; }

  /* ==========================================================================
     PRICING SECTION — Cenovnik (D-12, D-13, D-14, D-15)
     3 tier cards in 3-col grid. Premium card distinguished with gold border
     and absolute-positioned badge.
     ========================================================================== */

  .pricing-card {
    padding: var(--space-8) var(--space-6);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
  }

  .pricing-card__tier {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-4);
  }

  .pricing-card__price {
    margin-bottom: var(--space-6);
    line-height: 1.15;
  }

  .pricing-card__prefix,
  .pricing-card__suffix {
    font-size: var(--text-xs);
    font-weight: 400;
    color: var(--color-text-muted);
  }

  .pricing-card__amount {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--color-gold);
  }

  .pricing-card__features {
    list-style: none;
    width: 100%;
    margin-bottom: var(--space-6);
    flex-grow: 1;
  }

  .pricing-card__features li {
    padding-block: var(--space-2);
    border-bottom: 1px solid var(--glass-border);
    font-size: var(--text-base);
    color: var(--color-text-muted);
    line-height: 1.7;
  }

  .pricing-card__features li:last-child {
    border-bottom: none;
  }

  .pricing-card__cta {
    width: 100%;
    margin-top: auto;
  }

  /* Premium tier distinction (D-13) — gold border + badge */
  .pricing-card--premium {
    border: 2px solid var(--color-border-gold);
  }

  .pricing-card__badge {
    position: absolute;
    top: calc(-1 * var(--space-3));
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-gold);
    color: var(--color-bg);
    font-family: var(--font-heading);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: var(--space-1) var(--space-4);
    border-radius: var(--radius-full);
    white-space: nowrap;
  }

  /* Pricing — category subheading, subtitle, price-row list, extras row */

  .pricing-category-heading {
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-muted);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: var(--space-10);
    margin-bottom: var(--space-8);
  }

  .pricing-card__subtitle {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-top: calc(-1 * var(--space-2));
    margin-bottom: var(--space-4);
  }

  .pricing-card__features--price-rows li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    text-align: left;
  }

  .pricing-price {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-gold);
    white-space: nowrap;
    flex-shrink: 0;
  }

  .pricing-extras {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    margin-top: var(--space-8);
  }

  .pricing-extra-card {
    padding: var(--space-8) var(--space-6);
    display: flex;
    flex-direction: column;
  }

  .pricing-extra-card__title {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-5);
  }

  .pricing-extra-card__optional {
    font-weight: 400;
    font-size: var(--text-base);
    color: var(--color-text-muted);
  }

  .pricing-extra-card__list {
    list-style: none;
    flex-grow: 1;
  }

  .pricing-extra-card__list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    padding-block: var(--space-3);
    border-bottom: 1px solid var(--glass-border);
    font-size: var(--text-base);
    color: var(--color-text-muted);
  }

  .pricing-extra-card__list li:last-child {
    border-bottom: none;
  }

  .pricing-extra-card__dogovor {
    font-family: var(--font-heading);
    font-size: clamp(var(--text-2xl), 4vw, var(--text-3xl));
    font-weight: 800;
    color: var(--color-gold);
    margin-bottom: var(--space-3);
  }

  .pricing-extra-card__note {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: var(--space-6);
    flex-grow: 1;
  }

  .pricing-extra-card__cta {
    width: 100%;
    margin-top: auto;
  }

  /* ==========================================================================
     GLOBAL: Gold accent line on all section headings (D-02)
     60px x 2px gold bar centered below every h2.section-heading__title.
     ========================================================================== */

  .section-heading__title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background-color: var(--color-gold);
    margin-top: var(--space-4);
    margin-inline: auto;
    border-radius: var(--radius-full);
  }

  /* ==========================================================================
     ABOUT SECTION — O Nama (D-04, D-05, D-06)
     2-column layout: text left, image right. Stats row below.
     ========================================================================== */

  .about__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: center;
    margin-top: var(--space-12);
  }

  .about__text {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
  }

  .about__text p {
    font-size: var(--text-base);
    color: var(--color-text-muted);
    line-height: 1.7;
  }

  .about__image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px solid var(--color-border-gold);
  }

  .about__image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;  /* contain preserves logo aspect ratio without cropping */
    /* White drop-shadow makes the logo pop against --color-bg (#0A0A0A) background */
    filter:
      drop-shadow(0 0 0px #ffffff)
      drop-shadow(0 0 3px rgba(255, 255, 255, 0.5));
    padding: var(--space-8);  /* breathing room so the shadow isn't clipped by the border */
  }

  .about__stats {
    display: flex;
    justify-content: center;
    gap: var(--space-12);
    margin-top: var(--space-12);
  }

  .about__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .about__stat-value {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--color-gold);
    line-height: 1.15;
  }

  .about__stat-label {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-text-muted);
    margin-top: var(--space-2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  /* ==========================================================================
     SERVICES SECTION — Usluge (D-07, D-08, D-09, D-10)
     7 glassmorphism cards in 3-col grid. 7th card centered via grid-column.
     ========================================================================== */

  .service-card {
    padding: var(--space-8);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .service-card__icon {
    color: var(--color-gold);
    margin-bottom: var(--space-4);
    flex-shrink: 0;
  }

  .service-card__title {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-4);
  }

  .service-card__desc {
    font-size: var(--text-base);
    color: var(--color-text-muted);
    line-height: 1.7;
  }

  /* Center the 7th (last) service card in the 3-col grid (D-07) */
  .service-card--last {
    grid-column: 2;
  }

  /* ==========================================================================
     CONTACT SECTION — Kontakt (D-16, D-17, D-18)
     Phone-first design. 2-column: info left, map right.
     No form, no email. Instagram link only.
     ========================================================================== */

  .contact__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    align-items: start;
    margin-top: var(--space-12);
  }

  .contact__info {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
  }

  .contact__cta-row {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
  }

  .contact__cta {
    gap: var(--space-2);
  }

  .contact__cta svg {
    flex-shrink: 0;
  }

  .contact__phone {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-text);
  }

  .contact__detail {
    display: flex;
    align-items: center;
    gap: var(--space-3);
  }

  .contact__detail-icon {
    color: var(--color-gold);
    flex-shrink: 0;
  }

  .contact__hours,
  .contact__address {
    font-size: var(--text-base);
    color: var(--color-text-muted);
    line-height: 1.7;
  }

  .contact__social {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--color-text-muted);
    font-size: var(--text-base);
    transition: color var(--duration-fast) var(--ease-out);
  }

  .contact__social:hover {
    color: var(--color-gold);
  }

  .contact__map-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--glass-border);
  }

  .contact__map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
  }

  /* ==========================================================================
     GALLERY SECTION — Nasi Radovi (D-01 through D-05)
     Filter tabs + responsive image grid + thumbnail hover.
     ========================================================================== */

  .gallery__filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-4);
    margin-top: var(--space-8);
    margin-bottom: var(--space-8);
  }

  .gallery__filter-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--color-text-muted);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    min-height: 44px;
    transition:
      background-color var(--duration-fast) var(--ease-out),
      color var(--duration-fast) var(--ease-out),
      border-color var(--duration-fast) var(--ease-out);
  }

  .gallery__filter-btn:hover {
    color: var(--color-text);
    border-color: var(--color-text-dim);
  }

  .gallery__filter-btn--active {
    background: var(--color-gold);
    color: var(--color-bg);
    border-color: var(--color-gold);
  }

  .gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-4);
  }

  .gallery__item {
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    cursor: pointer;
    position: relative;
    transition:
      opacity var(--duration-base) var(--ease-out),
      transform var(--duration-base) var(--ease-out);
  }

  .gallery__item--hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
  }

  .gallery__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-base) var(--ease-out);
  }

  .gallery__item:hover .gallery__img {
    transform: scale(1.05);
  }

  .gallery__item:hover {
    box-shadow: 0 0 0 2px var(--color-gold-subtle);
  }

  /* ==========================================================================
     LIGHTBOX — fullscreen image preview (D-03)
     ========================================================================== */

  .lightbox {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--duration-base) var(--ease-out);
  }

  .lightbox[hidden] {
    display: none;
  }

  .lightbox--visible {
    opacity: 1;
  }

  .lightbox__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
  }

  .lightbox__img {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border: 2px solid var(--color-border-gold);
    border-radius: var(--radius-md);
  }

  .lightbox__close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    z-index: 2;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color var(--duration-fast) var(--ease-out);
  }

  .lightbox__close:hover {
    color: var(--color-gold);
  }

  .lightbox__prev,
  .lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    background: rgba(0, 0, 0, 0.4);
    border: none;
    border-radius: var(--radius-full);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
    padding: 12px;
    transition:
      color var(--duration-fast) var(--ease-out),
      background-color var(--duration-fast) var(--ease-out);
  }

  .lightbox__prev { left: var(--space-4); }
  .lightbox__next { right: var(--space-4); }

  .lightbox__prev:hover,
  .lightbox__next:hover {
    color: var(--color-gold);
    background: rgba(0, 0, 0, 0.6);
  }

  .lightbox__counter {
    position: absolute;
    bottom: var(--space-4);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
  }

  /* ==========================================================================
     TESTIMONIAL CAROUSEL — Recenzije (D-06, D-07, TEST-01 through TEST-04)
     CSS scroll-snap carousel with glassmorphism cards.
     ========================================================================== */

  .carousel {
    position: relative;
    overflow: hidden;
    margin-top: var(--space-8);
  }

  .carousel__track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: var(--space-4);
    padding-bottom: var(--space-2);
  }

  .carousel__track::-webkit-scrollbar {
    display: none;
  }

  .carousel__card {
    scroll-snap-align: start;
    flex: 0 0 100%;
    min-width: 0;
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
  }

  .carousel__stars {
    display: flex;
    gap: var(--space-1);
  }

  .carousel__quote {
    flex-grow: 1;
  }

  .carousel__quote p {
    font-size: var(--text-base);
    color: var(--color-text-muted);
    line-height: 1.7;
    font-style: italic;
  }

  .carousel__reviewer {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
  }

  .carousel__name {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    font-weight: 400;
    color: var(--color-text);
  }

  .carousel__service {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
  }

  .carousel__dots {
    display: flex;
    justify-content: center;
    gap: var(--space-3);
    margin-top: var(--space-6);
  }

  .carousel__dot {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    background: var(--color-text-dim);
    border: none;
    cursor: pointer;
    padding: 0;
    transition:
      background-color var(--duration-fast) var(--ease-out),
      transform var(--duration-fast) var(--ease-out);
    /* 44px touch target via invisible expansion */
    position: relative;
  }

  .carousel__dot::before {
    content: '';
    position: absolute;
    inset: -16px;
  }

  .carousel__dot:hover {
    background: var(--color-text-muted);
  }

  .carousel__dot--active {
    background: var(--color-gold);
    transform: scale(1.2);
  }

  /* ==========================================================================
     FOOTER (D-19, D-20)
     Logo + nav links + social in main row. Slogan + copyright below.
     Background: --color-surface with top border for visual separation.
     ========================================================================== */

  .footer {
    background-color: var(--color-surface);
    border-top: 1px solid var(--glass-border);
    padding-block: var(--space-12);
  }

  .footer__content {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--space-8);
    align-items: center;
  }

  .footer__logo img {
    height: 44px;
    width: auto;
    object-fit: contain;
    /* Same white drop-shadow as nav and hero logos — footer background is
       --color-surface (#1A1A1A), equally dark. */
    filter:
      drop-shadow(0 0 0px #ffffff)
      drop-shadow(0 0 2px rgba(255, 255, 255, 0.6));
  }

  .footer__links ul {
    display: flex;
    justify-content: center;
    gap: var(--space-6);
    flex-wrap: wrap;
  }

  .footer__links a {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    transition: color var(--duration-fast) var(--ease-out);
    letter-spacing: 0.04em;
  }

  .footer__links a:hover {
    color: var(--color-gold);
  }

  .footer__social a {
    color: var(--color-text-muted);
    transition: color var(--duration-fast) var(--ease-out);
    display: flex;
    align-items: center;
  }

  .footer__social a:hover {
    color: var(--color-gold);
  }

  .footer__bottom {
    text-align: center;
    margin-top: var(--space-8);
    padding-top: var(--space-6);
    border-top: 1px solid var(--glass-border);
  }

  .footer__slogan {
    font-size: var(--text-xs);
    font-style: italic;
    color: var(--color-text-muted);
    margin-bottom: var(--space-2);
  }

  .footer__copyright {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
  }
}

/* ==========================================================================
   LAYER: UTILITIES
   Single-purpose utility classes for common adjustments.
   ========================================================================== */

@layer utilities {
  /* Screen reader only — visually hidden but accessible */
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
  }

  .text-gold {
    color: var(--color-gold);
  }

  .text-muted {
    color: var(--color-text-muted);
  }

  .text-center {
    text-align: center;
  }

  .mt-auto {
    margin-top: auto;
  }

  .mx-auto {
    margin-inline: auto;
  }
}

/* ==========================================================================
   LAYER: ANIMATIONS
   Scroll-reveal stubs and animation primitives. Phase 4 JS will add
   .is-visible via IntersectionObserver. All transforms use GPU-composited
   properties (transform, opacity) — no layout reflow.
   ========================================================================== */

@layer animations {
  /* Scroll reveal base — elements start invisible and shifted down.
     Phase 4 IntersectionObserver adds .is-visible to trigger the
     transition to final position. */
  [data-animate] {
    opacity: 0;
    transform: translateY(24px);
    transition:
      opacity var(--duration-slow) var(--ease-out),
      transform var(--duration-slow) var(--ease-out);
  }

  [data-animate].is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* Staggered delay classes — applied to children for cascade effect */
  [data-animate-delay="1"] { transition-delay: 100ms; }
  [data-animate-delay="2"] { transition-delay: 200ms; }
  [data-animate-delay="3"] { transition-delay: 300ms; }
  [data-animate-delay="4"] { transition-delay: 400ms; }
  [data-animate-delay="5"] { transition-delay: 500ms; }
  [data-animate-delay="6"] { transition-delay: 600ms; }
  [data-animate-delay="7"] { transition-delay: 700ms; }

  /* ---- Hero entrance animation: heroFadeRise ----
     Single reusable keyframe for all hero elements + nav logo.
     GPU-composited: transform + opacity only (ANIM-03, no layout reflow).
     animation-fill-mode: both is CRITICAL:
     - backwards: holds opacity:0 + translateY(24px) during animation-delay period
       (without it, elements flash visible before the delay expires)
     - forwards: retains opacity:1 + translateY(0) after animation completes
     ------------------------------------------------------------ */
  @keyframes heroFadeRise {
    from {
      opacity: 0;
      transform: translateY(24px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Transform-only variant — no opacity change. Used on LCP elements so they
     are immediately visible (opacity:1) and counted by the browser for LCP,
     while still getting a subtle slide-in entrance. */
  @keyframes heroSlideRise {
    from { transform: translateY(16px); }
    to   { transform: translateY(0); }
  }

  /* Staggered entrance — each element has a different delay (D-07)
     Duration: var(--duration-enter) = 800ms
     Easing: var(--ease-out) = cubic-bezier(0.16, 1, 0.3, 1) — premium spring feel */
  .nav__logo        { animation: heroFadeRise var(--duration-enter) var(--ease-out) 200ms both; }  /* D-09: nav logo synced */
  .hero__logo-img   { animation: heroFadeRise var(--duration-enter) var(--ease-out) 0ms forwards; }
  /* hero__title uses heroSlideRise (transform-only, no opacity) so it is
     visible at t=0 and qualifies as the LCP candidate for Lighthouse. */
  .hero__title      { animation: heroSlideRise var(--duration-enter) var(--ease-out) 0ms both; }
  .hero__subtitle   { animation: heroFadeRise var(--duration-enter) var(--ease-out) 550ms both; }
  .hero__cta        { animation: heroFadeRise var(--duration-enter) var(--ease-out) 700ms both; }

  /* ---- Scroll indicator: two-stage animation ----
     Stage 1: heroFadeRise at t=900ms (appears as part of stagger sequence)
     Stage 2: scrollBounce starts at t=1800ms (after fade-in completes: 900ms + 800ms + 100ms buffer)
     Both listed in the animation shorthand — comma-separated
     ------------------------------------------------------------ */
  .hero__scroll-indicator {
    animation:
      heroFadeRise var(--duration-enter) var(--ease-out) 900ms both,
      scrollBounce 2s ease-in-out 1800ms infinite;
  }

  @keyframes scrollBounce {
    0%, 100% {
      transform: translateX(-50%) translateY(0);    /* Keep horizontal centering from position:absolute left:50% */
      opacity: 0.7;
    }
    50% {
      transform: translateX(-50%) translateY(8px);  /* Bounce down 8px using transform only (ANIM-03) */
      opacity: 1;
    }
  }

  /* Trust card floating animation — TRUST-02, D-16
     Subtle autonomous vertical oscillation. Pure CSS, no JS. */
  @keyframes trustFloat {
    0%, 100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-6px);
    }
  }
}

/* ==========================================================================
   LAYER: MEDIA QUERIES
   Responsive breakpoints (480, 768, 1024, 1440) and accessibility
   media features (prefers-reduced-motion).
   ========================================================================== */

@layer mediaqueries {
  /* --- Small mobile: 480px and below --- */
  @media (max-width: 480px) {
    .nav__menu-overlay .nav__link {
      font-size: var(--text-xl);
    }

    .about__stats {
      flex-direction: column;
      align-items: center;
      gap: var(--space-6);
    }

    .gallery__grid {
      grid-template-columns: 1fr;
    }
  }

  /* --- Tablet: 768px and below --- */
  @media (max-width: 768px) {
    .nav__inner .nav__links {
      display: none;
    }

    .nav__hamburger {
      display: flex;
    }

    .btn--cta-nav.nav__cta-desktop {
      display: none;
    }

    .grid--3 {
      grid-template-columns: 1fr;
    }

    .grid--2 {
      grid-template-columns: 1fr;
    }

    .trust-card {
      flex-direction: column;
      align-items: center;
      text-align: center;
    }

    .about__content {
      grid-template-columns: 1fr;
    }

    .about__image {
      order: -1;
    }

    .about__stats {
      gap: var(--space-6);
    }

    .service-card--last {
      grid-column: auto;
    }

    .pricing-extras {
      grid-template-columns: 1fr;
    }

    .gallery__grid {
      grid-template-columns: repeat(2, 1fr);
    }

    .lightbox__prev,
    .lightbox__next {
      width: 40px;
      height: 40px;
      padding: 8px;
    }

    .contact__content {
      grid-template-columns: 1fr;
    }

    .footer__content {
      grid-template-columns: 1fr;
      text-align: center;
      justify-items: center;
    }

    .footer__links ul {
      justify-content: center;
    }
  }

  /* --- Carousel responsive: tablet shows 2 cards --- */
  @media (min-width: 481px) and (max-width: 768px) {
    .carousel__card {
      flex: 0 0 calc(50% - var(--space-4) / 2);
    }
  }

  /* --- Carousel responsive: desktop shows 3 cards --- */
  @media (min-width: 769px) {
    .carousel__card {
      flex: 0 0 calc(33.333% - var(--space-4) * 2 / 3);
    }
  }

  /* --- Desktop: 1024px and above --- */
  @media (min-width: 1024px) {
    .nav__hamburger {
      display: none;
    }

    .nav__menu-overlay {
      display: none !important;
    }
  }

  /* --- Large desktop: 1440px and above --- */
  @media (min-width: 1440px) {
    :root {
      --container-padding: 3rem;
    }
  }

  /* ==================== BOOKING FORM ==================== */
  .booking__wrapper {
    max-width: 760px;
    margin: 0 auto;
  }

  .booking-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .booking-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .booking-form__field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .booking-form__field--full { grid-column: 1 / -1; }
  .booking-form__field--half { max-width: 340px; }

  .booking-form__field label {
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  .booking-form input[type="text"],
  .booking-form input[type="tel"],
  .booking-form input[type="date"] {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: var(--text-base);
    padding: 0.75rem 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    -webkit-appearance: none;
    color-scheme: dark;
  }

  .booking-form input:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.15);
  }

  .booking-form input.is-invalid {
    border-color: #e05252;
    box-shadow: 0 0 0 3px rgba(224, 82, 82, 0.12);
  }

  .booking-form__services {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-top: 0.25rem;
  }

  .service-check {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
  }

  .service-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
  }

  .service-check__box {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    transition: border-color 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .service-check input:checked + .service-check__box {
    background: var(--color-gold);
    border-color: var(--color-gold);
  }

  .service-check input:checked + .service-check__box::after {
    content: '';
    display: block;
    width: 5px;
    height: 9px;
    border: 2px solid var(--color-bg);
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
  }

  .service-check:hover .service-check__box {
    border-color: var(--color-gold);
  }

  .service-check input:focus-visible + .service-check__box {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
  }

  .service-check__label {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    transition: color 0.2s;
  }

  .service-check:hover .service-check__label,
  .service-check input:checked ~ .service-check__label {
    color: var(--color-text);
  }

  .booking-form__error {
    font-size: var(--text-xs);
    color: #e05252;
    min-height: 1rem;
  }

  .booking-form__submit {
    align-self: flex-start;
    min-width: 200px;
  }

  .booking-form__submit.is-loading {
    opacity: 0.7;
    pointer-events: none;
  }

  .booking-form__status {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
  }

  .booking-form__status.is-success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #81c784;
  }

  .booking-form__status.is-error {
    background: rgba(224, 82, 82, 0.1);
    border: 1px solid rgba(224, 82, 82, 0.3);
    color: #e05252;
  }

  @media (max-width: 640px) {
    .booking-form__row { grid-template-columns: 1fr; }
    .booking-form__field--half { max-width: 100%; }
    .booking-form__submit { width: 100%; align-self: stretch; }
  }

  /* ==================== PERFORMANCE ==================== */
  /* content-visibility — skip rendering of off-screen sections (Baseline Sept 2024)
     The 'auto' intrinsic-size keyword lets browser remember actual rendered height;
     fallback px estimate prevents layout shift before first render (D-20) */
  #o-nama {
    content-visibility: auto;
    contain-intrinsic-size: auto 600px;
  }

  #usluge {
    content-visibility: auto;
    contain-intrinsic-size: auto 800px;
  }

  #galerija {
    content-visibility: auto;
    contain-intrinsic-size: auto 1200px;
  }

  #zasto-mi {
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
  }

  #cenovnik {
    content-visibility: auto;
    contain-intrinsic-size: auto 900px;
  }

  #recenzije {
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
  }

  #kontakt {
    content-visibility: auto;
    contain-intrinsic-size: auto 600px;
  }

  .footer {
    content-visibility: auto;
    contain-intrinsic-size: auto 300px;
  }

  /* ===== NEW ADDITIONS — Conversion Optimization Phase ===== */

  /* --- Before/After slider responsive --- */
  @media (max-width: 768px) {
    .ba-grid {
      grid-template-columns: 1fr;
      gap: var(--space-8);
    }

    .floating-cta__btn {
      width: 48px;
      height: 48px;
    }
  }

  /* --- Reduced motion overrides for new components --- */
  @media (prefers-reduced-motion: reduce) {
    .brands-marquee {
      animation: none;
    }
    .floating-cta {
      transition: none;
    }
    .pricing-card--premium {
      animation: none;
    }
  }

  /* --- WCAG 2.1 SC 2.3.3 — prefers-reduced-motion (ACCESS-05 / ANIM-02) ---
     Users who prefer reduced motion get no animations, no transitions,
     and no auto-scrolling behaviors. This is a hard override — !important
     ensures no downstream rule can accidentally re-enable motion.

     Phase 4 will add more selectors as JS-driven animations are added,
     but this base block ensures the foundation is motion-safe from day one. */
  @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;
    }

    [data-animate] {
      opacity: 1;
      transform: none;
    }

    .nav {
      transition: none;
    }
  }
}

/* ===== NEW ADDITIONS — Conversion Optimization Phase ===== */

/* --- Section heading label --- */
@layer components {
  .section-heading__label {
    display: block;
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: var(--space-3);
  }

  .section-heading__title {
    background: linear-gradient(135deg, #FFFFFF 30%, var(--color-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  /* Service card link */
  .service-card {
    position: relative;
    overflow: hidden;
  }

  .service-card__link {
    display: block;
    margin-top: var(--space-4);
    color: var(--color-gold);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.05em;
    transition: color var(--duration-base) var(--ease-out),
                transform var(--duration-base) var(--ease-out);
    text-decoration: none;
  }

  .card-glass--hoverable:hover .service-card__link {
    color: #fff;
    transform: translateX(4px);
  }

  /* Before/After slider */
  .ba-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
    margin-bottom: var(--space-12);
  }

  .ba-slider {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
  }

  .ba-slider__inner {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: col-resize;
    user-select: none;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
  }

  .ba-slider__before,
  .ba-slider__after {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
  }

  .ba-slider__after-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
    clip-path: inset(0 calc(100% - var(--ba-pos, 50%)) 0 0);
    transition: clip-path 0.02s linear;
  }

  .ba-slider__after {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .ba-slider__handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--ba-pos, 50%);
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    touch-action: none;
  }

  .ba-slider__line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: #fff;
    box-shadow: 0 0 8px rgba(0,0,0,0.5);
  }

  .ba-slider__circle {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: #fff;
    color: #0A0A0A;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
    position: relative;
    z-index: 1;
    transition: transform var(--duration-fast) var(--ease-out),
                box-shadow var(--duration-fast) var(--ease-out);
  }

  .ba-slider__inner:hover .ba-slider__circle {
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(212, 168, 67, 0.4);
  }

  .ba-slider__label {
    position: absolute;
    top: var(--space-3);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.15em;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    pointer-events: none;
    z-index: 5;
  }

  .ba-slider__label--before {
    left: var(--space-3);
    background: rgba(0,0,0,0.6);
    color: var(--color-text-muted);
  }

  .ba-slider__label--after {
    right: var(--space-3);
    background: var(--color-gold);
    color: #0A0A0A;
  }

  .ba-slider__caption {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    text-align: center;
    font-style: italic;
  }

  .transformacije__cta {
    text-align: center;
    margin-top: var(--space-8);
  }

  /* Brand marquee */
  .brands-strip {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-6) 0;
    overflow: hidden;
    text-align: center;
  }

  .brands-strip__label {
    font-size: var(--text-xs);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text-dim);
    margin-bottom: var(--space-4);
  }

  .brands-strip__track {
    overflow: hidden;
    position: relative;
  }

  .brands-strip__track::before,
  .brands-strip__track::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 1;
    pointer-events: none;
  }

  .brands-strip__track::before {
    left: 0;
    background: linear-gradient(to right, var(--color-surface), transparent);
  }

  .brands-strip__track::after {
    right: 0;
    background: linear-gradient(to left, var(--color-surface), transparent);
  }

  .brands-marquee {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    width: max-content;
    animation: marquee 30s linear infinite;
  }

  .brands-marquee__item {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--text-lg);
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
    white-space: nowrap;
    transition: color var(--duration-base);
  }

  .brands-marquee__sep {
    color: var(--color-gold);
    font-weight: 700;
    font-size: var(--text-base);
  }

  .brands-strip:hover .brands-marquee {
    animation-play-state: paused;
  }

  /* Floating CTA */
  .floating-cta {
    position: fixed;
    right: var(--space-6);
    bottom: var(--space-8);
    z-index: 400;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px);
    transition: opacity var(--duration-base) var(--ease-out),
                transform var(--duration-base) var(--ease-out);
  }

  .floating-cta--visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .floating-cta__btn {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    transition: transform var(--duration-fast) var(--ease-out),
                box-shadow var(--duration-fast) var(--ease-out);
  }

  .floating-cta__btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  }

  .floating-cta__btn--phone {
    background: var(--color-gold);
    color: #0A0A0A;
  }

  .floating-cta__btn--phone:hover {
    background: var(--color-gold-dim);
    box-shadow: 0 8px 24px rgba(212, 168, 67, 0.4);
  }

  .floating-cta__btn--whatsapp {
    background: #25D366;
    color: #fff;
  }

  .floating-cta__btn--whatsapp:hover {
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  }

  .floating-cta__btn--viber {
    background: #7360F2;
    color: #fff;
  }

  .floating-cta__btn--viber:hover {
    box-shadow: 0 8px 24px rgba(115, 96, 242, 0.4);
  }

  /* Animated premium pricing card border */
  .pricing-card--premium {
    background: linear-gradient(var(--color-surface), var(--color-surface)) padding-box,
                linear-gradient(135deg, var(--color-gold), #F0D080, var(--color-gold-dim), var(--color-gold)) border-box;
    border: 2px solid transparent !important;
    animation: premiumBorderGlow 4s ease-in-out infinite alternate;
  }

  /* Breadcrumb */
  .breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-8);
  }

  .breadcrumb a {
    color: var(--color-gold);
    transition: color var(--duration-fast);
  }

  .breadcrumb a:hover { color: #fff; }

  .breadcrumb [aria-current="page"] {
    color: var(--color-text-muted);
  }
}

@layer animations {
  @keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
  }

  @keyframes premiumBorderGlow {
    from { box-shadow: var(--shadow-gold-glow); }
    to   { box-shadow: 0 0 40px rgba(212,168,67,0.55), 0 0 80px rgba(212,168,67,0.25); }
  }
}
