/* ============================================================
   Strong Games Sološnica 2026 — style.css
   Custom styles layered on top of Tailwind CDN utility classes.
   Tailwind's color/font tokens are still configured inline in
   index.html (tailwind.config script) since Tailwind CDN needs
   that config at runtime to generate the utility classes.
   ============================================================ */

  /* ============================================================
     BASE / TEXTURE
     A subtle SVG-noise filter gives every "stone" surface a poured-
     concrete grain instead of a flat gradient — this is the site's
     signature material and it's reused for badges, the countdown,
     the hero backdrop and the map panel.
     ============================================================ */
  html { scroll-behavior: smooth; }
  body {
    background-color: #15130F;
    font-family: 'Inter', sans-serif;
  }

  .stone-texture {
    position: relative;
    background: radial-gradient(circle at 30% 25%, #9c9587 0%, #8B8478 35%, #6b6558 75%, #56514700 100%), #8B8478;
  }
  .stone-texture::before {
    content: "";
    position: absolute; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
    opacity: 0.5;
    border-radius: inherit;
    pointer-events: none;
  }

  .bg-noise {
    position: absolute; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
  }

  /* Stencil-cut headline style: tight caps, hard edge, slight skew on accent words */
  .font-display { letter-spacing: 0.02em; }
  .stencil-mark {
    display: inline-block;
    transform: skewX(-6deg);
    color: #FF5A1F;
  }

  /* Spray-stroke underline used to mark the active nav item */
  .nav-link { position: relative; }
  .nav-link::after {
    content: "";
    position: absolute;
    left: 0; right: 100%;
    bottom: -6px;
    height: 3px;
    background: #FF5A1F;
    transform: skewX(-12deg);
    transition: right 0.25s ease;
  }
  .nav-link.active::after,
  .nav-link:hover::after { right: 0; }
  .nav-link.active { color: #FF5A1F; }

  /* Page transition: soft fade + rise, respects reduced-motion */
  .page { display: none; }
  .page.active {
    display: block;
    animation: fadeRise 0.5s ease both;
  }
  @keyframes fadeRise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  @media (prefers-reduced-motion: reduce) {
    .page.active { animation: none; }
    html { scroll-behavior: auto; }
  }

  /* Mobile menu slide */
  #mobileMenu { transition: transform 0.35s ease, opacity 0.3s ease; }
  #mobileMenu.closed { transform: translateY(-8px); opacity: 0; pointer-events: none; }
  #mobileMenu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }

  /* Custom focus ring for accessibility, tuned to the palette */
  a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid #F2B705;
    outline-offset: 2px;
  }

  .input-field {
    background: #1C1911;
    border: 1px solid #4a453b;
    color: #EDE8DC;
  }
  .input-field:focus { border-color: #FF5A1F; }
  .input-field.error { border-color: #ff4d4d; }

  /* Modal */
  #confirmModal, #contactConfirm { transition: opacity 0.3s ease; }

  ::-webkit-scrollbar { width: 10px; }
  ::-webkit-scrollbar-track { background: #15130F; }
  ::-webkit-scrollbar-thumb { background: #4a453b; border-radius: 6px; }

  /* Lane-strip divider — echoes the striped rubber competition mats seen on the
     Sološnica course photos: alternating dark tile with a thin chalk seam. */
  .lane-strip {
    height: 10px;
    background: repeating-linear-gradient(90deg, #2a271f 0px, #2a271f 42px, #4a453b 42px 46px, #2a271f 46px 50px);
    opacity: 0.7;
  }

  /* ============================================================
     PHOTO GALLERY (Minulé ročníky → Ročník 2025)
     Responsive grid of event photos loaded via jsDelivr CDN.
     Hover: slight zoom + warm stencil-orange glow, consistent
     with the site's spray-paint / poured-concrete visual language.
     ============================================================ */
  .gallery-item {
    display: block;
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 0.65rem;
    overflow: hidden;
    background-color: #1C1911; /* asphalt-alt — shows while the image loads */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  }

  .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(0.95) brightness(0.94);
    transition: transform 0.5s ease, filter 0.4s ease;
  }

  /* Soft dark-to-transparent base vignette so photos read as one cohesive
     "stone-texture" surface, plus an orange wash that fades in on hover. */
  .gallery-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(21, 19, 15, 0.55) 0%, rgba(21, 19, 15, 0) 45%),
                radial-gradient(circle at 50% 50%, rgba(255, 90, 31, 0) 0%, rgba(255, 90, 31, 0) 100%);
    transition: background 0.4s ease;
    pointer-events: none;
  }

  .gallery-item:hover,
  .gallery-item:focus-visible {
    transform: translateY(-3px) scale(1.02);
    border-color: rgba(255, 90, 31, 0.55);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 24px rgba(255, 90, 31, 0.25);
  }

  .gallery-item:hover img,
  .gallery-item:focus-visible img {
    transform: scale(1.08);
    filter: saturate(1.15) brightness(1.05);
  }

  .gallery-item:hover::after,
  .gallery-item:focus-visible::after {
    background: linear-gradient(to top, rgba(21, 19, 15, 0.25) 0%, rgba(21, 19, 15, 0) 45%),
                radial-gradient(circle at 50% 50%, rgba(255, 90, 31, 0.18) 0%, rgba(255, 90, 31, 0) 70%);
  }

  @media (prefers-reduced-motion: reduce) {
    .gallery-item,
    .gallery-item img {
      transition: none;
    }
    .gallery-item:hover,
    .gallery-item:focus-visible {
      transform: none;
    }
    .gallery-item:hover img,
    .gallery-item:focus-visible img {
      transform: none;
    }
  }

  /* ============================================================
     LANGUAGE SWITCHER (flag-icons CDN)
     Compact row of flag buttons in the header. Active language is
     fully colored; inactive ones are dim/desaturated and light up
     on hover, matching the dark stencil/concrete aesthetic.
     ============================================================ */
  .lang-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .lang-flag-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border-radius: 4px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    opacity: 0.4;
    filter: grayscale(100%);
    transition: opacity 0.2s ease, filter 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  }

  .lang-flag-btn .fi {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-size: cover;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
  }

  .lang-flag-btn:hover {
    opacity: 0.85;
    filter: grayscale(20%);
    transform: translateY(-1px);
  }

  .lang-flag-btn:focus-visible {
    outline: 2px solid #F2B705;
    outline-offset: 2px;
  }

  .lang-flag-btn.lang-flag-active {
    opacity: 1;
    filter: grayscale(0%);
    border-color: rgba(255, 90, 31, 0.6);
    background: rgba(255, 90, 31, 0.08);
  }

  /* Mobile menu variant — slightly larger, spaced out under the nav links */
  #mobileMenu .lang-switcher {
    justify-content: center;
    gap: 10px;
    padding-top: 4px;
  }

  #mobileMenu .lang-flag-btn {
    width: 32px;
    height: 32px;
  }

  #mobileMenu .lang-flag-btn .fi {
    width: 22px;
    height: 22px;
  }
