/* Javor v pohybu. The leaves live only in the header's decorative padding. */
:root {
  /* Rendered closed header: 137px on desktop, 184px with two rows, 118px on mobile. */
  --gardis-anchor-clearance: 153px;
  /* The smooth-scroll handler measures before it sets the URL fragment. */
  --gardis-managed-anchor-offset: var(--gardis-anchor-clearance);
}

@media (min-width: 661px) and (max-width: 1023px) {
  :root { --gardis-anchor-clearance: 200px; }
}

@media (max-width: 660px) {
  :root { --gardis-anchor-clearance: 134px; }
}

@media (scripting: none) {
  /* The shared header is not sticky without JavaScript. */
  :root { --gardis-anchor-clearance: 16px; }
}

:target,
:is(#gardis-kontaktni-formular, #gardis-showroom-prohlidka,
    #gardis-jak-funguje-pergola, #gardis-pergoly-typy, #kalkulace),
body[data-gardis-legal] #content .glp-anchor,
[data-gardis-faq] [id] {
  /* Elementor can apply its old offset as an ordinary inline style. */
  scroll-margin-top: var(--gardis-managed-anchor-offset) !important;
}

section[data-gardis-faq] { --gfaq-anchor-offset: var(--gardis-anchor-clearance); }
/* Keep the sticky contents panel aligned with the chapter it links to. */
body[data-gardis-legal] { --glp-anchor-clearance: var(--gardis-anchor-clearance); }

.gardis-site-header .gardis-header-autumn {
  --autumn-top: 46px;
  --autumn-bottom: 26px;
  --autumn-scale: 1;
  position: relative;
  isolation: isolate;
  padding-block: var(--autumn-top) var(--autumn-bottom);
}

/* Grow the original artwork into the decorative space, not the sticky header.
   The reserved height is the former 13vw logo at 1280:465, with its 44px link minimum. */
@media screen {
  /* Legacy link transitions must not interpolate the logo width through nearby
     controls when a device rotates or the viewport changes breakpoints. */
  .gardis-header-autumn .gardis-header-brand,
  .gardis-header-autumn .gardis-header-brand img { transition-property: color, filter, opacity; }
  .gardis-header-autumn .gardis-header-brand {
    position: relative;
    min-width: 0;
    width: clamp(140px, calc(18.75vw - 60px), 180px);
    height: clamp(44px, 4.72265625vw, 50.859375px);
  }
  .gardis-header-autumn .gardis-header-brand img {
    position: absolute;
    top: 50%;
    inset-inline-start: 0;
    transform: translateY(-50%);
    width: 100%;
    height: auto;
  }
}

/* The navigation switches to a larger font at 1200px. Ease its horizontal
   spacing back to the normal 12px as the single row gains room. */
@media screen and (min-width: 1200px) and (max-width: 1279px) {
  .gardis-header-autumn .gardis-header-links > li > a {
    padding-inline: clamp(7px, calc(8vw - 89px), 12px);
  }
}

/* On the two-row tablet header, grow upwards, away from the navigation below. */
@media screen and (min-width: 661px) and (max-width: 1023px) {
  .gardis-header-autumn .gardis-header-brand { width: min(100%, 150px); }
  .gardis-header-autumn .gardis-header-brand img { top: auto; bottom: 0; transform: none; }
}

@media screen and (max-width: 660px) {
  .gardis-site-header .gardis-header-autumn {
    width: calc(100% - 14px);
    padding-inline: 9px;
    column-gap: 5px;
  }
  .gardis-header-autumn .gardis-header-brand {
    width: min(100%, clamp(87px, 29vw, 125px));
    height: 44px;
  }
}

.gardis-header-autumn > :not(.gardis-autumn-ornament) { z-index: 1; }
.gardis-header-autumn > .gardis-header-nav { z-index: 2; }

.gardis-header-autumn .gardis-autumn-ornament {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(ellipse 49% 68px at 0 0, #edaa5f71, #f4d7a93b 63%, transparent 100%),
    radial-gradient(ellipse 45% 54px at 100% 100%, #df8e5b63, #f4d7a93b 66%, transparent 100%);
}

.gardis-header-autumn .gardis-autumn-edge { position: absolute; inset-inline: 0; overflow: hidden; }
.gardis-header-autumn .gardis-autumn-top { inset-block-start: 0; height: var(--autumn-top); }
.gardis-header-autumn .gardis-autumn-bottom { inset-block-end: 0; height: var(--autumn-bottom); }

.gardis-header-autumn .gardis-autumn-leaf {
  position: absolute;
  display: block;
  left: var(--x);
  top: var(--y);
  width: calc(var(--w) * var(--autumn-scale));
  aspect-ratio: 1;
  transform: translateX(-50%) rotate(var(--angle));
  filter: drop-shadow(0 2px 2px #2a1a1633);
}

.gardis-header-autumn .gardis-autumn-bottom .gardis-autumn-leaf { top: auto; bottom: var(--y); }
.gardis-header-autumn .gardis-autumn-leaf::before {
  position: absolute;
  content: "";
  top: 71%;
  left: 50%;
  width: 1.5px;
  height: 27%;
  background: var(--leaf-dark);
  transform: rotate(-8deg);
  transform-origin: center top;
}

.gardis-header-autumn .gardis-autumn-leaf::after {
  content: "";
  position: absolute;
  inset: 0 0 11%;
  background:
    linear-gradient(90deg, transparent 48.6%, #6e2c272e 49%, #fff1bc64 49.6%, transparent 51.3%),
    linear-gradient(148deg, transparent 68%, #fff1bc2b 68.7% 70%, transparent 70.8%) 0 7% / 50% 88% no-repeat,
    linear-gradient(33deg, transparent 65%, #fff1bc31 66% 67%, transparent 68%) 100% 6% / 50% 88% no-repeat,
    linear-gradient(116deg, var(--leaf-light), var(--leaf-mid) 54%, var(--leaf-dark) 99%);
}

.gardis-header-autumn .maple::after {
  clip-path: polygon(50% 0%, 57% 16%, 62% 12%, 61% 29%, 66% 41%, 74% 28%, 80% 36%, 95% 30%, 90% 45%, 100% 49%, 87% 62%, 92% 68%, 72% 73%, 76% 82%, 55% 88%, 50% 96%, 45% 88%, 24% 82%, 28% 73%, 8% 68%, 13% 62%, 0% 49%, 10% 45%, 5% 30%, 20% 36%, 26% 28%, 34% 41%, 39% 29%, 38% 12%, 43% 16%);
}

.gardis-header-autumn .birch::after {
  inset-inline: 15%;
  clip-path: polygon(50% 0, 56% 9%, 63% 13%, 64% 17%, 73% 23%, 74% 28%, 83% 34%, 85% 39%, 91% 46%, 89% 51%, 96% 59%, 91% 64%, 91% 72%, 83% 77%, 80% 84%, 68% 89%, 62% 95%, 51% 99%, 39% 94%, 32% 89%, 20% 84%, 16% 77%, 9% 72%, 8% 64%, 4% 59%, 11% 51%, 9% 46%, 16% 39%, 17% 34%, 26% 28%, 27% 23%, 36% 17%, 37% 13%, 44% 9%);
}

.gardis-header-autumn .oak::after {
  inset-inline: 16%;
  clip-path: polygon(50% 0, 61% 2%, 70% 10%, 66% 22%, 78% 19%, 91% 24%, 95% 33%, 87% 42%, 73% 48%, 84% 50%, 95% 57%, 91% 67%, 82% 72%, 69% 73%, 77% 81%, 71% 87%, 59% 90%, 50% 98%, 41% 90%, 29% 87%, 23% 81%, 31% 73%, 18% 72%, 9% 67%, 5% 57%, 16% 50%, 27% 48%, 13% 42%, 5% 33%, 9% 24%, 22% 19%, 34% 22%, 30% 10%, 39% 2%);
}

.gardis-header-autumn .amber { --leaf-light: #ffd47b; --leaf-mid: #e7a63d; --leaf-dark: #b75f25; }
.gardis-header-autumn .copper { --leaf-light: #f3a55a; --leaf-mid: #d67738; --leaf-dark: #9d3827; }
.gardis-header-autumn .crimson { --leaf-light: #e99156; --leaf-mid: #b84e35; --leaf-dark: #832c26; }
.gardis-header-autumn .olive { --leaf-light: #bcb76a; --leaf-mid: #8a9550; --leaf-dark: #566b43; }
.gardis-header-autumn .honey { --leaf-light: #ffe098; --leaf-mid: #efb854; --leaf-dark: #ca8331; }

@media (max-width: 660px) {
  .gardis-site-header .gardis-header-autumn {
    --autumn-top: 38px;
    --autumn-bottom: 22px;
    --autumn-scale: .77;
  }
  .gardis-header-autumn .gardis-autumn-leaf.is-desktop { display: none; }
}

@media (max-width: 660px) and (scripting: enabled) {
  .gardis-header-autumn .gardis-header-nav {
    max-height: calc(100dvh - 82px - var(--autumn-top) - var(--autumn-bottom));
  }
}
