/* Úvodní animace (viz assets/intro.js): překryv přes celou stránku, barvy "Svítání" sladěné s webem.
   Běží 4 až 5 vteřin (podle šířky obrazovky), pak se rozplyne do světla a z něj vystoupí stránka. Při vypnutých animacích v systému jen klidný obrázek. */
.intro {
  position: fixed; inset: 0; z-index: 1000; overflow: hidden; cursor: pointer;
  touch-action: none; overscroll-behavior: contain;
  background: #f7efe3;
  opacity: 1; transition: opacity 1.25s cubic-bezier(.4, 0, .6, 1) .5s;
  --p: .56s; --walk-from: 1025px; --walk-to: -947px; --walk-dur: 5.3s;
  --sky0: #f1e0d2; --sky1: #f7efe3; --sky2: #f2cfa2;
  --sun-core: #f6d79a; --sun-edge: #dca25a; --sun-glow: #e9b36c;
  --streak-light: rgba(255,250,240,.5); --streak-dark: rgba(90,60,40,.12);
  --l1: #d7c2ab; --l1b: #c3ab92; --l2: #9a826c; --l3b: #5e4b3d; --l3: #352a24;
  --ground: #2a211b; --front: #110c0a; --ink: #171210; --ink2: #2a211d; --rim: #a9764a;
  --mist: #fff3e6; --mist-o: .55; --m1: #b8a38d; --m2: #937d69; --m3: #6b5747; --m4: #43362d;
}
.intro.intro-out { opacity: 0; pointer-events: none; }
/* Odchod: scéna (obloha, krajina, ptáci, jelen) se nejdřív celá rozplyne do ranního světla a teprve to světlo se
   rozestoupí nad stránkou. Stránka tak nikdy neprosvítá skrz krajinu a ptáci s lesem na ní nezůstávají viset. */
.intro svg { transition: opacity 1s cubic-bezier(.4, 0, .6, 1), visibility 0s linear 1s; }
.intro.intro-out:not(.intro-skip):not(.intro-still) svg { opacity: 0; visibility: hidden; }
/* klepnutí, Esc nebo vypnuté animace: rychlé prosté prolnutí */
.intro.intro-skip, .intro.intro-still { transition-duration: .55s; transition-delay: 0s; }
.intro svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* Vrstvy krajiny se kreslí přes <use>; na jejich kopie Chrome neaplikuje selektory s předkem,
   proto jsou tato pravidla bez ".intro" (web tyto třídy jinde nepoužívá). */
.l1 { fill: var(--l1); } .l1b { fill: var(--l1b); } .l2 { fill: var(--l2); } .l3b { fill: var(--l3b); } .l3 { fill: var(--l3); }
.m1 { fill: var(--m1); } .m2 { fill: var(--m2); } .m3 { fill: var(--m3); } .m4 { fill: var(--m4); }
.ground { fill: var(--ground); } .front { fill: var(--front); } .fogfill { fill: var(--mist); }
.ink { fill: var(--ink); } .ink2 { fill: var(--ink2); } .rim { fill: var(--rim); }
.mist { fill: var(--mist); opacity: var(--mist-o); }

/* wordmark as real text, so it stays crisp and readable on every screen */
.intro-title {
  position: absolute; left: 0; right: 0; top: clamp(28px, 9vh, 96px);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif; font-weight: 700;
  font-size: clamp(1rem, 2.3vw, 1.7rem); letter-spacing: .3em; text-transform: uppercase; color: #29251f;
  padding-left: .3em; text-align: center; opacity: 0; transform: translateY(8px);
  transition: opacity .9s ease .25s, transform .9s ease .25s;
}
.intro.play .intro-title { opacity: 1; transform: none; }
/* on the way out the wordmark goes first, so it never sits on top of the page's own heading */
.intro.intro-out .intro-title { opacity: 0; transition: opacity .6s ease; }
/* portrait: the wordmark sits high in the tall sky */
.intro.tall .intro-title { top: clamp(40px, 9.5vh, 130px); font-size: clamp(1rem, 4.6vw, 1.6rem); gap: 12px; }
.intro.tall .intro-title i { width: 96px; }
/* a phone held sideways: a smaller wordmark right at the top, clear of the birds and the transmitter */
@media (max-height: 500px) and (orientation: landscape) {
  .intro-title { top: 14px; font-size: 1rem; gap: 8px; }
}
.intro-title i { display: block; width: 120px; height: 3px; background: #b98243; transform: scaleX(0); transform-origin: 50% 50%; transition: transform 2.2s cubic-bezier(.4, 0, .2, 1) .5s; }
.intro.play .intro-title i { transform: scaleX(1); }

/* motion: the stag crosses the whole visible width at a brisk walk (intro.js sets the distance and duration
   from the screen's aspect ratio, so the stride matches the speed on every screen); the rest breathes slowly */
.intro.play .mover { animation: rj-cross var(--walk-dur) linear forwards; }
@keyframes rj-cross { from { transform: translate(var(--walk-from), 0); } to { transform: translate(var(--walk-to), 0); } }
.intro.play .up   { animation: rj-swing var(--p) ease-in-out infinite; }
.intro.play .lo.f { animation: rj-bendf var(--p) ease-in-out infinite; }
.intro.play .lo.h { animation: rj-bendh var(--p) ease-in-out infinite; }
.intro.play .d1 { animation-delay: calc(var(--p) * -.25); }
.intro.play .d2 { animation-delay: calc(var(--p) * -.5); }
.intro.play .d3 { animation-delay: calc(var(--p) * -.75); }
.intro.play .bob { animation: rj-bob var(--p) ease-in-out infinite; }
@keyframes rj-swing { 0%, 100% { transform: rotate(20deg); } 50% { transform: rotate(-20deg); } }
@keyframes rj-bendf { 0%, 50%, 100% { transform: rotate(0); } 62% { transform: rotate(-10deg); } 72% { transform: rotate(-17deg); } 84% { transform: rotate(-8deg); } 94% { transform: rotate(3deg); } }
@keyframes rj-bendh { 0%, 50%, 100% { transform: rotate(0); } 64% { transform: rotate(-7deg); } 76% { transform: rotate(-12deg); } 90% { transform: rotate(-4deg); } }
@keyframes rj-bob { 0%, 50%, 100% { transform: translate(0, 0); } 25%, 75% { transform: translate(0, -4px); } }
.intro.play .mist1 { animation: rj-drift 11s ease-in-out infinite alternate; }
.intro.play .mist2 { animation: rj-drift 15s ease-in-out infinite alternate-reverse; }
.intro.play .mist3 { animation: rj-drift 13s ease-in-out infinite alternate; }
@keyframes rj-drift { from { transform: translate(-80px, 0); } to { transform: translate(90px, 0); } }
.intro.play .sun { animation: rj-rise 6s ease-out forwards; }
@keyframes rj-rise { from { transform: translate(0, 26px); } to { transform: translate(0, 0); } }
.intro.play .s1 { animation: rj-drift 26s ease-in-out infinite alternate; }
.intro.play .s2 { animation: rj-drift 34s ease-in-out infinite alternate-reverse; }
.intro.play .s3 { animation: rj-drift 30s ease-in-out infinite alternate; }
.intro.play .s4 { animation: rj-drift 40s ease-in-out infinite alternate-reverse; }
.intro.play .flock { animation: rj-fly 38s linear infinite; }
@keyframes rj-fly { from { transform: translate(-300px, 0); } to { transform: translate(-2600px, 0); } }
.intro.play .flockwave { animation: rj-wave 9s ease-in-out infinite alternate; }
@keyframes rj-wave { from { transform: translate(0, -28px); } to { transform: translate(0, 28px); } }
.intro.play .wg { animation: rj-flap .8s ease-in-out infinite; }
.intro.play .wt { animation: rj-tip .8s ease-in-out infinite; }
.intro.play .bb { animation: rj-bb .8s ease-in-out infinite; }
@keyframes rj-flap { 0%, 100% { transform: rotate(-40deg); } 46% { transform: rotate(30deg); } }
@keyframes rj-tip { 0%, 100% { transform: rotate(-12deg); } 22% { transform: rotate(-4deg); } 48% { transform: rotate(12deg); } 76% { transform: rotate(36deg); } }
@keyframes rj-bb { 0%, 100% { transform: translate(0, 1.8px); } 48% { transform: translate(0, -1.8px); } }
/* grass in the wind: every clump leans on its own; strength (--a), tempo and moment are set per clump in intro.js */
.intro.play .sw { animation: rj-wind 3.6s ease-in-out infinite; }
@keyframes rj-wind {
  0%, 100% { transform: skewX(calc(var(--a) * -.3)); }
  24% { transform: skewX(calc(var(--a) * .85)); }
  42% { transform: skewX(calc(var(--a) * .3)); }
  66% { transform: skewX(var(--a)); }
  84% { transform: skewX(calc(var(--a) * .05)); }
}

/* system "reduce motion": a still picture that fades into the page */
.intro.intro-still *, .intro.intro-still .intro-title i { animation: none !important; transition: none !important; }
.intro.intro-still .intro-title { opacity: 1; transform: none; }
.intro.intro-still .flock { display: none; }
.intro.intro-still .intro-title i { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) { .intro * { animation: none !important; } }
