/* Styling specific to the cinematic homepage */

.homepage-body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #06090d;
}

/* Base Cinematic Scene Container */
#cinematic-scene {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  perspective: 1000px;
}

/* Foreground, Midground, Background and Fjord assets layered in 3D/parallax */
.scene-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  pointer-events: none;
}

/* Background Layer - Rocky Mountains, Moody sky of Fjord */
.layer-sky {
  z-index: 1;
  background-color: #0d1621;
  background-image: linear-gradient(to bottom, #05080c 0%, #152233 40%, #2a3c4e 75%, #465a6e 100%);
  transition: transform 12s cubic-bezier(0.1, 0.4, 0.2, 1);
}

/* Sun/ambient glow or pale north light */
.pale-glow {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120vw;
  height: 60vh;
  background: radial-gradient(circle, rgba(195, 155, 79, 0.08) 0%, rgba(70, 90, 110, 0.03) 50%, transparent 100%);
  pointer-events: none;
}

/* High Rocky Fjord Cliffs left & right */
.layer-mountains {
  z-index: 2;
  background: transparent;
  transition: transform 12s cubic-bezier(0.1, 0.4, 0.2, 1);
}

/* SVG representation of Fjord Mountains left & right */
.fjord-mountain-svg {
  position: absolute;
  bottom: 30%;
  width: 100%;
  height: 60%;
  fill: #0c121a;
  stroke: none;
}

.fjord-mountain-svg path.back-hills {
  fill: #141f2c;
  opacity: 0.7;
}

.fjord-mountain-svg path.mid-hills {
  fill: #0a1118;
  opacity: 0.9;
}

/* Pines and Forest silhuette layer */
.layer-forest {
  z-index: 3;
  width: 100%;
  height: 100%;
  position: absolute;
  bottom: 0;
  transition: transform 12s cubic-bezier(0.1, 0.4, 0.2, 1);
}

.forest-svg {
  position: absolute;
  bottom: 25%;
  width: 100%;
  height: 25%;
  fill: #060a0f;
}

/* Fog Layer - moving clouds of mist */
.layer-fog {
  z-index: 4;
  mix-blend-mode: screen;
  opacity: 0.45;
  background: transparent;
}

.mist-cloud {
  position: absolute;
  background: radial-gradient(circle, rgba(230, 235, 245, 0.2) 0%, rgba(200, 210, 225, 0.08) 60%, transparent 100%);
  border-radius: 50%;
  filter: blur(25px);
  pointer-events: none;
}

.mist-1 {
  width: 80vw;
  height: 30vh;
  top: 45%;
  left: -20vw;
  animation: floatMist1 35s infinite linear;
}

.mist-2 {
  width: 90vw;
  height: 35vh;
  top: 50%;
  left: 40vw;
  animation: floatMist2 42s infinite linear;
}

@keyframes floatMist1 {
  0% { transform: translateX(0) scaleY(1); }
  50% { transform: translateX(15vw) scaleY(1.15); }
  100% { transform: translateX(0) scaleY(1); }
}

@keyframes floatMist2 {
  0% { transform: translateX(0) scaleY(1.1); }
  50% { transform: translateX(-18vw) scaleY(0.95); }
  100% { transform: translateX(0) scaleY(1.1); }
}

/* The Fjord Water Surface */
.layer-water {
  z-index: 5;
  background-color: #080f16;
  height: 35%;
  top: 65%;
  position: absolute;
  width: 100%;
  box-shadow: inset 0 20px 40px rgba(0,0,0,0.8);
  transition: transform 12s cubic-bezier(0.1, 0.4, 0.2, 1);
  overflow: hidden;
}

.water-reflection {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.15;
  background: linear-gradient(180deg, rgba(195,155,79,0.15) 0%, transparent 100%);
}

.water-ripples {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 80px 12px;
  animation: waterRippleAnim 15s infinite linear;
  opacity: 0.4;
}

@keyframes waterRippleAnim {
  0% { background-position: 0 0; }
  100% { background-position: -80px 40px; }
}

/* Seagulls flying in the background */
.seagull-container {
  position: absolute;
  top: 25%;
  left: 105%;
  z-index: 3;
  width: 30px;
  height: 20px;
  pointer-events: none;
}

.seagull-1 {
  animation: flySeagull1 28s infinite linear;
}
.seagull-2 {
  animation: flySeagull2 34s infinite linear 8s;
}

@keyframes flySeagull1 {
  0% { left: 105%; top: 20%; transform: scale(0.4) rotate(-5deg); }
  50% { top: 12%; }
  100% { left: -10%; top: 22%; transform: scale(0.15) rotate(5deg); }
}

@keyframes flySeagull2 {
  0% { left: 105%; top: 18%; transform: scale(0.3) rotate(-10deg); }
  50% { top: 25%; }
  100% { left: -10%; top: 15%; transform: scale(0.1) rotate(10deg); }
}

.seagull-svg {
  fill: #6d7f94;
  opacity: 0.4;
  animation: birdFlap 0.6s infinite alternate ease-in-out;
}

@keyframes birdFlap {
  0% { transform: scaleY(0.4); }
  100% { transform: scaleY(1.2); }
}

/* Wooden Pier (Molo) - anchored at foreground left side */
.layer-pier {
  z-index: 6;
  position: absolute;
  top: auto;
  bottom: 0;
  left: 0;
  width: 35%;
  height: 38%;
  pointer-events: none;
  transition: transform 12s cubic-bezier(0.1, 0.4, 0.2, 1);
}

.pier-svg {
  position: absolute;
  bottom: 0;
  left: -2%;
  width: 105%;
  height: 100%;
}

.pier-wood {
  fill: #110d0a; /* dark weathered wood */
}

.pier-iron {
  fill: #22252a; /* iron ropes and pillars */
}

.pier-rope {
  fill: none;
  stroke: #423023;
  stroke-width: 3px;
  stroke-linecap: round;
}

/* Hearth / Smoke from peer or shore */
.smoke-emitter {
  position: absolute;
  bottom: 12%;
  left: 10%;
  width: 10px;
  height: 10px;
  z-index: 7;
}

.smoke-particle {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 12px;
  height: 12px;
  background-color: rgba(220, 225, 235, 0.12);
  border-radius: 50%;
  filter: blur(5px);
  opacity: 0;
  animation: smokeRise 7s infinite ease-out;
}

.smoke-p1 { animation-delay: 0s; }
.smoke-p2 { animation-delay: 1.8s; }
.smoke-p3 { animation-delay: 3.6s; }
.smoke-p4 { animation-delay: 5.4s; }

@keyframes smokeRise {
  0% { transform: translate(0, 0) scale(1); opacity: 0; }
  10% { opacity: 0.4; }
  50% { transform: translate(15px, -80px) scale(3.5); opacity: 0.25; }
  100% { transform: translate(45px, -180px) scale(6); opacity: 0; }
}

/* Header Text AURINKO [LOGO] FÉLAG z. s. — Enlarged by 30% to occupy top third of page and visually fit the drakkar scale */
.layer-logo-header {
  z-index: 10;
  position: absolute;
  top: 7vh;
  left: 0;
  width: 100%;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 1.5s ease-out, transform 1.5s ease-out;
}

.logo-header-active {
  opacity: 1;
  transform: translateY(0);
}

.logo-flex-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5.5rem;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 40px;
}

.logo-half-text {
  font-family: var(--font-h1);
  font-size: 5.46rem; /* Increased from 4.2rem by exactly 30% */
  letter-spacing: 0.22em;
  color: var(--color-old-gold);
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.95), 0 0 20px rgba(195, 155, 79, 0.15);
  white-space: nowrap;
}

.logo-center-img-wrapper {
  flex-shrink: 0;
  position: relative;
  width: 210px;
  height: 210px;
  display: block;
  transition: transform 0.3s ease;
}

.logo-center-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: transparent;
  /* Colorized to fit natural palette: ancient gold / amber hue, perfectly transparent and single-color */
  filter: brightness(0) saturate(100%) invert(80%) sepia(40%) saturate(600%) hue-rotate(350deg) brightness(95%) contrast(90%) drop-shadow(0 0 12px rgba(195, 155, 79, 0.6));
  mix-blend-mode: screen; /* Ensures any dark background becomes fully transparent */
  transition: transform 0.3s ease, filter 0.3s ease;
}

.logo-center-img-wrapper:hover .logo-center-img {
  transform: scale(1.05);
  filter: brightness(0) saturate(100%) invert(90%) sepia(40%) saturate(800%) hue-rotate(350deg) brightness(100%) contrast(100%) drop-shadow(0 0 18px rgba(195, 155, 79, 0.85));
}

.logo-half-text.right-side {
  letter-spacing: 0.18em;
}

.logo-sublabel {
  font-family: var(--font-body);
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  display: block;
  margin-top: 0.4rem;
  font-weight: 400;
  text-transform: uppercase;
}

/* "Vítejte" Text Animation */
.layer-welcome {
  z-index: 11;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  animation: welcomeFadeInOut 5s forwards;
}

@keyframes welcomeFadeInOut {
  0% { opacity: 0; transform: translate(-50%, -40%) scale(0.95); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  75% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -60%) scale(1.05); }
}

.welcome-text {
  font-family: var(--font-h1);
  font-size: 3.5rem;
  letter-spacing: 0.3em;
  color: var(--color-old-gold);
  text-shadow: 0 0 25px rgba(195, 155, 79, 0.35), 0 5px 15px rgba(0,0,0,0.9);
  text-transform: uppercase;
}

/* The Drakkar Ship Element - enlarged to dominate layout and fit all 5 shields comfortably */
.layer-drakkar {
  z-index: 8;
  position: absolute;
  bottom: -4%;
  left: 105%; /* Starts completely off-screen in the fjord and sails in */
  width: 105%; /* Enlarged from 92% to 105% */
  height: 85%; /* Enlarged from 75% to 85% */
  pointer-events: auto;
  transform-origin: center bottom;
  transition: left 11s cubic-bezier(0.1, 0.4, 0.25, 1), transform 11s cubic-bezier(0.1, 0.4, 0.25, 1);
}

/* When the ship has sailed in - perfectly centered */
.drakkar-sailing-in {
  left: -2.5%;
}

/* Dramatic slow film camera zoom into drakkar side - keeping shields perfectly readable and scaled */
.drakkar-zoomed-in {
  left: -4%;
  transform: scale(1.05) translateY(-1%);
}

.drakkar-hull-container {
  position: relative;
  width: 100%;
  height: 100%;
  /* Gentle floating oscillation */
  animation: drakkarFloat 7s infinite ease-in-out;
}

@keyframes drakkarFloat {
  0% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-7px) rotate(0.8deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

.drakkar-svg {
  width: 100%;
  height: 100%;
}

.hull-wood {
  fill: #1e1510; /* weathered timber dark oak */
}

.hull-rivets {
  fill: #3e444d; /* forged iron */
}

.hull-dragon {
  fill: #120b07;
  stroke: #c39b4f;
  stroke-width: 1.5px;
}

/* Big sail (Plachta) */
.sail-canvas {
  fill: #dbd4ca; /* realistic flax linen */
  stroke: none;
  animation: sailBillow 10s infinite ease-in-out;
  transform-origin: 50% 10%;
}

.sail-stripes {
  fill: #611e1c; /* historic crimson brown dye */
  animation: sailBillow 10s infinite ease-in-out;
  transform-origin: 50% 10%;
}

@keyframes sailBillow {
  0% { transform: scaleX(1) skewX(0deg); }
  50% { transform: scaleX(1.03) skewX(-1.5deg); }
  100% { transform: scaleX(1) skewX(0deg); }
}


/* Interactive Shields Navigation Menu - spaced evenly and scaled to avoid overlapping (5 shields) */
.shields-navigation-menu {
  position: absolute;
  top: 57%; /* Aligned perfectly with the clinker hull planks */
  left: 18%;
  width: 52%;
  height: 25%;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 12;
  gap: 1.5%;
}

.viking-shield-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 15.5%; /* Comfortably fits 5 shields on the enlarged ship */
  cursor: pointer;
  position: relative;
  transition: transform 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.viking-shield-link:hover {
  transform: translateY(-8px) scale(1.1);
  z-index: 15;
}

.viking-shield-svg-wrapper {
  width: 100%;
  padding-top: 100%;
  position: relative;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.6));
}

.viking-shield-svg-wrapper svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Shield text carved directly into the hull wood under each shield */
.shield-section-label {
  margin-top: 0.8rem;
  font-family: var(--font-h1);
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: #dbd4ca;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95), 0 0 10px rgba(0,0,0,0.8);
  white-space: nowrap;
  pointer-events: none;
  transition: color 0.3s;
}

.viking-shield-link:hover .shield-section-label {
  color: var(--color-old-gold);
}

/* Subtle shield interactive glint/reflection */
.viking-shield-svg-wrapper::after {
  content: '';
  position: absolute;
  top: 5%;
  left: 5%;
  width: 90%;
  height: 90%;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 50%, rgba(0,0,0,0.2) 100%);
  pointer-events: none;
  transition: opacity 0.4s;
}

.viking-shield-link:hover .viking-shield-svg-wrapper::after {
  background: linear-gradient(135deg, rgba(255,255,255,0.22) 0%, transparent 40%, rgba(0,0,0,0.1) 100%);
}

/* Interactive instruction text "Vstupte do osady" */
.enter-village-tip {
  position: absolute;
  bottom: 5vh;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-h2-h3);
  font-size: 1.2rem;
  font-style: italic;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.5s ease-out 5s;
  text-shadow: 0 2px 5px rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.enter-village-tip-active {
  opacity: 0.8;
}

.viking-arrow-indicator {
  font-size: 1.4rem;
  animation: floatArrow 1.5s infinite alternate ease-in-out;
}

@keyframes floatArrow {
  0% { transform: translateY(0); }
  100% { transform: translateY(-4px); }
}

/* Film Grain/Atmosphere filter overlay for a realistic cinematic document look */
.film-grain-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 15;
  pointer-events: none;
  opacity: 0.025;
  background-image: radial-gradient(circle, #fff 10%, transparent 11%);
  background-size: 4px 4px;
}

/* Responsive Cinematic styling */
@media (max-width: 1200px) {
  .logo-half-text {
    font-size: 3.9rem; /* 3rem * 1.3 */
    letter-spacing: 0.18em;
  }
  .logo-center-img-wrapper {
    width: 160px;
    height: 160px;
  }
  .logo-flex-container {
    gap: 4rem;
  }
  .logo-sublabel {
    font-size: 0.9rem;
  }
}

@media (max-width: 1024px) {
  .logo-half-text {
    font-size: 3.25rem; /* 2.5rem * 1.3 */
    letter-spacing: 0.15em;
  }
  .logo-center-img-wrapper {
    width: 130px;
    height: 130px;
  }
  .logo-flex-container {
    gap: 3rem;
  }
  .logo-sublabel {
    font-size: 0.8rem;
  }
  .layer-drakkar {
    width: 108%;
    height: 80%;
    bottom: -3%;
  }
  .drakkar-sailing-in {
    left: -4%;
  }
  .drakkar-zoomed-in {
    left: -5%;
  }
  .shields-navigation-menu {
    left: 17%;
    width: 54%;
  }
}

@media (max-width: 768px) {
  .layer-logo-header {
    top: 4vh;
  }
  .logo-flex-container {
    gap: 1.5rem;
    padding: 0 15px;
  }
  .logo-half-text {
    font-size: 2.08rem; /* 1.6rem * 1.3 */
    letter-spacing: 0.08em;
  }
  .logo-center-img-wrapper {
    width: 80px;
    height: 80px;
  }
  .logo-sublabel {
    font-size: 0.65rem;
    letter-spacing: 0.05em;
  }
  .welcome-text {
    font-size: 2rem;
  }
  .layer-drakkar {
    width: 125%;
    height: 72%;
    bottom: -4%;
  }
  .drakkar-sailing-in {
    left: -12%;
  }
  .drakkar-zoomed-in {
    left: -14%;
    transform: scale(1.04) translateY(-1%);
  }
  .shields-navigation-menu {
    left: 16%;
    width: 56%;
    top: 56%;
    gap: 1.2%;
  }
  .viking-shield-link {
    width: 15%;
  }
  .shield-section-label {
    font-size: 0.65rem;
    margin-top: 0.3rem;
  }
}

@media (max-width: 480px) {
  .layer-logo-header {
    top: 3vh;
  }
  .logo-flex-container {
    gap: 0.8rem;
    padding: 0 5px;
  }
  .logo-half-text {
    font-size: 1.5rem; /* 1.15rem * 1.3 */
    letter-spacing: 0.05em;
  }
  .logo-sublabel {
    display: none; /* Hide sublabels on very small devices for clean design */
  }
  .logo-center-img-wrapper {
    width: 55px;
    height: 55px;
  }
  .layer-drakkar {
    width: 145%;
    height: 65%;
    bottom: -4%;
  }
  .drakkar-sailing-in {
    left: -22%;
  }
  .drakkar-zoomed-in {
    left: -24%;
  }
  .shields-navigation-menu {
    left: 15%;
    width: 58%;
    top: 55%;
    gap: 0.8%;
  }
  .viking-shield-link {
    width: 15.5%;
  }
  .shield-section-label {
    font-size: 0.55rem;
    margin-top: 0.2rem;
    letter-spacing: 0.02em;
  }
}
