/* =========================
   COMMON SECTIONS
   ========================= */

.page-container {
  position: relative;

  width: 100%;
  margin: 0;
  padding-top: 0;

  overflow: visible;
}

.intro-section,
.tours-section,
.virtual-trail-section,
.journal-section,
.contact-section {
  display: grid;

  min-height: 100svh;
  min-height: 100dvh;
  margin: 0;
  overflow: hidden;

  place-items: center;
}

.intro-stage,
.tours-stage,
.virtual-stage,
.journal-stage {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;
}

.section-inner {
  position: relative;
  z-index: 2;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: var(--section-gap);

  width: min(100%, var(--section-content-max));
  min-height: 100%;
  margin: 0 auto;
  padding:
    var(--section-top-safe)
    var(--section-side-safe)
    var(--section-bottom-safe);

  text-align: center;
}

.text-section .section-inner {
  width: min(100%, 900px);
}

#intro {
  scroll-margin-top: 0;
}

#intro .section-inner {
  justify-content: center;
  min-height: 100dvh;
  padding-top: calc(var(--banner-top) + var(--banner-height) + 70px);
}

#intro .intro-text {
  max-height: calc(100dvh - var(--banner-top) - var(--banner-height) - 120px);
  overflow: visible;

  font-size: clamp(24px, 2vw, 36px);
  line-height: 1.22;
}

.section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;

  width: 100%;

  text-align: center;
  text-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.section-title-icon {
  width: clamp(60px, 7vw, 96px);
  opacity: 0.85;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.6));
}

.section-header h2 {
  position: relative;

  margin: 0;

  color: var(--yellow);
  font-family: var(--font-vollkorn);
  font-size: clamp(28px, 2.4vw, 44px);
  line-height: 1.05;
  letter-spacing: 0.16em;

  text-shadow:
    0 4px 14px rgba(0, 0, 0, 0.65),
    0 0 12px rgba(250, 186, 0, 0.35);
}

.section-header h2::after {
  content: "";

  display: block;

  width: 120px;
  height: 2px;
  margin: 12px auto 0;

  border-radius: 999px;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(185, 215, 234, 0.95),
    transparent
  );

  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.65);
}

.intro-text,
.virtual-text,
.journal-text {
  width: min(100%, var(--text-max));
  margin: 0;

  overflow-wrap: break-word;

  color: #f7f4ec;
  font-family: var(--font-cormorant);
  font-size: clamp(28px, 2.2vw, 42px);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;

  text-shadow:
    0 2px 12px rgba(0, 0, 0, 0.32),
    0 0 2px rgba(0, 0, 0, 0.9);
}

.intro-text a,
.contact-email a,
.copyright a {
  color: inherit;
  text-decoration: none;
}

.text-highlight {
  display: inline;

  padding: 0.14em 0.38em;
  border-radius: 0.18em;

  background: rgba(64, 78, 93, 0.34);

  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);

  -webkit-backdrop-filter: blur(8px);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* =========================
   BUTTONS
   ========================= */

.ui-btn {
  all: unset;

  display: inline-flex;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 8px 28px;

  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: 6px;

  color: white;
  font-family: var(--font-raleway);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;

  background: rgba(139, 172, 217, 0.42);

  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.15),
    inset 0 0 0 1px rgba(255, 255, 255, 0.25);

  cursor: pointer;

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  transition:
    background 0.35s ease,
    color 0.35s ease,
    box-shadow 0.35s ease,
    transform 0.35s ease,
    border-color 0.35s ease;
}

.ui-btn::after {
  content: "";

  width: 26px;
  height: 1px;

  background: rgba(80, 110, 130, 0.55);
  opacity: 0.7;

  transition:
    width 0.35s ease,
    opacity 0.35s ease;
}

.ui-btn:hover,
.ui-btn:focus-visible {
  border-color: rgba(200, 215, 230, 0.6);
  color: #1f2c36;
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.ui-btn:hover::after,
.ui-btn:focus-visible::after {
  width: 52px;
  opacity: 1;
}

/* =========================
   VIRTUAL / JOURNAL
   ========================= */

.virtual-map-wrap,
.journal-image-wrap {
  position: relative;

  display: inline-block;

  max-width: 100%;
  margin: 10px auto 0;
}

.journal-image-wrap {
  width: min(76vw, 520px);
  margin-top: 8px;
  overflow: visible;
}

.virtual-image {
  display: block;

  width: min(80vw, 560px);
  max-height: 61vh;
  height: auto;
  margin: 10px auto 0;

  object-fit: contain;

  -webkit-mask-image:
    radial-gradient(ellipse at center, #000 21%, transparent 71%),
    linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 12%, #000 86%, transparent 100%);
  -webkit-mask-composite: intersect;
  mask-composite: intersect;
}

.journal-image {
  display: block;

  width: 100%;
  max-height: 34vh;
  height: auto;
  margin: 0 auto;

  object-fit: contain;

  filter:
    brightness(1.08)
    contrast(1.04)
    saturate(1.08)
    drop-shadow(0 18px 38px rgba(0, 0, 0, 0.35));

  -webkit-mask-image:
    radial-gradient(ellipse at center, #000 24%, rgba(0, 0, 0, 0.92) 42%, transparent 76%),
    linear-gradient(to right, transparent 0%, #000 16%, #000 84%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 14%, #000 82%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

.virtual-bear-link {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 6;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  text-decoration: none;

  transform: translate(-50%, -50%);
}

.virtual-bear-icon {
  display: block;

  width: clamp(90px, 10.5vw, 150px);
  height: auto;

  opacity: 0.96;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.38));

  transform-origin: center center;
  animation: virtualBearPulse 1.8s ease-in-out infinite;

  transition:
    filter 0.2s ease,
    transform 0.2s ease,
    opacity 0.2s ease;
}

.virtual-bear-link:hover .virtual-bear-icon,
.virtual-bear-link:focus-visible .virtual-bear-icon {
  filter:
    grayscale(1)
    contrast(1.05)
    drop-shadow(0 8px 18px rgba(0, 0, 0, 0.42));
}

@keyframes virtualBearPulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.12);
  }
}

.tours-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#vieraskirja .guestbook-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tours-actions {
  margin-top: 8px;
}

.journal-actions-below-image .ui-btn {
  width: min(240px, 62vw);
  min-height: 48px;

  border-color: rgba(210, 230, 255, 0.54);
  background: rgba(95, 130, 170, 0.46);

  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.38),
    inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

#vieraskirja .journal-actions-below-image .ui-btn {
  width: 92px;
}

/* =========================
   JOURNAL -> CONTACT FADE
   ========================= */

.journal-section {
  position: relative;
  overflow: hidden;
}

/* Retkikirjan taustakuva häipyy alhaalta mustaan ennen yhteysosiota */
.journal-section::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: 115vh;
  pointer-events: none;

  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.00) 0%,
    rgba(0, 0, 0, 0.18) 10%,
    rgba(0, 0, 0, 0.42) 24%,
    rgba(0, 0, 0, 0.68) 40%,
    rgba(0, 0, 0, 0.88) 58%,
    #000 76%,
    #000 100%
  );
}

.journal-section .section-inner {
  position: relative;
  z-index: 2;
}

/* =========================
   CONTACT / PUOLUKKA BACKGROUND
   ========================= */

.contact-section {
  position: relative;
  min-height: 120vh;
  padding: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #000;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}

/* Contact alkaa mustana, kuten ylempien osioiden välissä */
#yhteys {
  position: relative;
  min-height: 120vh;
  overflow: hidden;
  background: #000;
}

/* Puolukkakuva tulee mustasta esiin hitaasti */
#yhteys::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;

  background: url("../images/puolukka.png") center center / cover no-repeat;

  filter: brightness(1.02) contrast(1.02) saturate(0.96);
  transform: scale(1.04);
}

/* Tumma tunnelmakerros kuvan päällä */
#yhteys::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;

  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.18) 0%,
    rgba(0, 0, 0, 0.16) 30%,
    rgba(0, 0, 0, 0.28) 70%,
    rgba(0, 0, 0, 0.42) 100%
  );
}

#yhteys .section-inner,
#yhteys .contact-inner {
  position: relative;
  z-index: 2;
}

/* Ei laatikkoa: sisältö suoraan puolukkakuvan päällä */
.contact-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;

  width: min(92vw, 900px);
  margin: 0 auto;
  padding: 42px 34px;

  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;

  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.contact-title {
  margin: 0 0 22px;

  color: #f4efe6;
  font-family: "Vollkorn SC", serif;
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 400;
  letter-spacing: 0.18em;

  text-shadow:
    0 3px 14px rgba(0, 0, 0, 0.95),
    0 0 28px rgba(0, 0, 0, 0.85);
}

.contact-email {
  margin: 0;
}

.contact-email a {
  color: #d8a300;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(25px, 3vw, 36px);
  text-decoration: none;

  text-shadow:
    0 3px 14px rgba(0, 0, 0, 0.95),
    0 0 24px rgba(0, 0, 0, 0.85),
    0 0 12px rgba(250, 186, 0, 0.2);
}

.contact-email a:hover {
  color: #f0c84b;
}

.contact-divider {
  width: 120px;
  height: 1px;
  margin: 0 auto 26px;

  background: rgba(255, 255, 255, 0.35);
}

.contact-divider.small {
  width: 80px;
  margin: 34px auto 30px;
  opacity: 0.65;
}

/* Rahoituslogo */
.footer-funding {
  margin: 0 auto 30px;
  text-align: center;
}

.footer-funding img {
  display: block;
  width: min(560px, 92%);
  height: auto;
  margin: 0 auto;
  opacity: 0.96;

  filter:
    drop-shadow(0 6px 18px rgba(0, 0, 0, 0.65));
}

/* Copyright */
.copyright {
  max-width: 680px;
  margin: 0 0 18px;

  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font-inter);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.02em;

  opacity: 1;

  text-shadow:
    0 2px 10px rgba(0, 0, 0, 0.95),
    0 0 18px rgba(0, 0, 0, 0.75);
}

/* Kuvakrediitit */
.footer-credits {
  max-width: 680px;
  margin: 0 auto;

  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  line-height: 1.55;

  text-shadow:
    0 2px 10px rgba(0, 0, 0, 0.95),
    0 0 18px rgba(0, 0, 0, 0.75);
}

.footer-credits p {
  margin: 3px 0;
}

.footer-credits a,
.copyright a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
}

.footer-credits a:hover,
.copyright a:hover {
  color: #d8a300;
}

.source-ref {
  color: #d8a300;
  font-size: 0.75em;
}

.copyright .source-ref {
  top: -0.25em;
  margin-right: 4px;
  color: rgba(255, 255, 255, 0.72);
}

/* =========================
   LINKS / VIRTUAL EFFECTS
   ========================= */

.virtual-image-link {
  position: relative;
  display: inline-block;
  line-height: 0;
  cursor: pointer;
  border-radius: 28px;
}

.virtual-image-link .virtual-image {
  display: block;
  transition: filter 0.45s ease;
}

/* Harmaa / hopeinen hover-hehku */
.virtual-image-link::after {
  content: "";
  position: absolute;
  inset: 8% 10% 10%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s ease;

  background:
    radial-gradient(
      ellipse at 50% 43%,
      rgba(230, 230, 230, 0.34) 0%,
      rgba(170, 170, 170, 0.24) 34%,
      rgba(90, 90, 90, 0.12) 60%,
      rgba(230, 230, 230, 0) 76%
    );

  mix-blend-mode: screen;
  filter: blur(10px);
}

.virtual-image-link:hover .virtual-image {
  filter:
    grayscale(0.65)
    saturate(0.72)
    brightness(1.06)
    contrast(1.05);
}

.virtual-image-link:hover::after {
  opacity: 1;
}

.virtual-image-link:focus-visible {
  outline: 2px solid #faba00;
  outline-offset: 8px;
}

.intro-quote-wrap {
  max-width: 980px;
  margin-inline: auto;
}

.intro-forest-quote {
  margin: 0;
}

.guide-breathing-link-text {
  margin-bottom: 0.7rem;
}

.guide-breathing-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0.2rem 0 1.6rem;
  padding: 0.75rem 1.15rem;

  color: #faba00;
  text-decoration: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;

  border: 1px solid rgba(250, 186, 0, 0.55);
  border-radius: 999px;
  background: rgba(250, 186, 0, 0.08);
  box-shadow: 0 0 22px rgba(250, 186, 0, 0.08);

  transition:
    background 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease;
}

.guide-breathing-link:hover {
  background: rgba(250, 186, 0, 0.15);
  border-color: rgba(250, 186, 0, 0.9);
  transform: translateY(-1px);
}

.virtual-trail-entry {
  position: relative;
  display: inline-block;
  text-decoration: none;
}

.virtual-trail-entry .virtual-image {
  transition:
    transform 0.35s ease,
    filter 0.35s ease,
    box-shadow 0.35s ease;
}

.virtual-trail-entry:hover .virtual-image {
  transform: scale(1.035);
  filter: brightness(1.08);
}

.virtual-link-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
  padding: 12px 24px;

  border: 1px solid rgba(250, 186, 0, 0.65);
  border-radius: 999px;

  color: #faba00;
  background: rgba(5, 6, 8, 0.45);

  font-family: "Cinzel", serif;
  font-size: clamp(15px, 2vw, 20px);
  letter-spacing: 0.04em;
  text-transform: uppercase;

  box-shadow: 0 0 22px rgba(250, 186, 0, 0.18);

  transition:
    transform 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.virtual-trail-entry:hover .virtual-link-label {
  transform: translateY(-2px);
  background: rgba(250, 186, 0, 0.12);
  box-shadow: 0 0 32px rgba(250, 186, 0, 0.35);
}

/* =========================
   TOURS CENTERING FIXES
   ========================= */

.tours-section .hero-quote-wrap,
.tours-section .intro-quote-wrap {
  width: min(92vw, 980px);
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center;
}

.tours-section .hero-forest-quote,
.tours-section .intro-forest-quote {
  width: 100%;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center;
}

.tours-section .intro-forest-quote p {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.tours-section .section-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tours-section .hero-quote-wrap.intro-quote-wrap {
  position: relative;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  width: min(88vw, 1180px);
  max-width: 1180px;
}

.tours-section .intro-forest-quote,
.tours-section .intro-forest-quote p {
  width: 100%;
  max-width: 1180px;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center;
}

/* =========================
   MOBILE
   ========================= */

@media (max-width: 700px) {
  .contact-section,
  #yhteys {
    min-height: 115vh;
  }

  .contact-inner {
    width: min(94vw, 100%);
    padding: 90px 18px 70px;
  }

  .contact-title {
    letter-spacing: 0.13em;
  }

  .footer-funding img {
    width: min(420px, 96%);
  }

  .footer-credits {
    font-size: 13px;
    line-height: 1.6;
  }

  .journal-section::after {
    height: 52vh;
  }

  #yhteys::before {
    -webkit-mask-image: linear-gradient(
      to bottom,
      transparent 0%,
      transparent 10%,
      rgba(0, 0, 0, 0.10) 20%,
      rgba(0, 0, 0, 0.42) 36%,
      rgba(0, 0, 0, 0.78) 52%,
      #000 66%,
      #000 100%
    );

    mask-image: linear-gradient(
      to bottom,
      transparent 0%,
      transparent 10%,
      rgba(0, 0, 0, 0.10) 20%,
      rgba(0, 0, 0, 0.42) 36%,
      rgba(0, 0, 0, 0.78) 52%,
      #000 66%,
      #000 100%
    );
  }
}
/* Retkikirjan napit samankorkuisiksi kuin "Varaa retki" */
.journal-actions-below-image .ui-btn,
#vieraskirja .journal-actions-below-image .ui-btn {
  min-height: 0;
  height: auto;
  padding: 8px 28px;
}
.trail-video-section {
  min-height: auto;
  padding: clamp(64px, 9vw, 120px) 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at top, rgba(250, 186, 0, 0.10), transparent 42%),
    linear-gradient(rgba(5, 8, 12, 0.92), rgba(5, 8, 12, 0.98));
}

.trail-video-card {
  position: relative;
  width: min(100%, 1080px);
  height: clamp(360px, 56vw, 620px);
  overflow: hidden;
  border-radius: clamp(24px, 4vw, 42px);
  background: #05080c;
  box-shadow:
    0 34px 110px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  isolation: isolate;
}
.trail-video-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border-radius: inherit;
  box-shadow:
    inset 0 0 24px rgba(5, 8, 12, 0.18),
    inset 0 0 70px rgba(5, 8, 12, 0.30),
    inset 0 0 140px rgba(5, 8, 12, 0.58);
  filter: blur(16px);
}
.trail-video-bg {
  position: absolute;
  inset: -1.5%;
  width: 103%;
  height: 103%;
  object-fit: cover;
  filter: brightness(1.18) contrast(1.06) saturate(1.08);
}

.trail-video-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(5, 8, 12, 0.42) 0%,
      rgba(5, 8, 12, 0.18) 48%,
      rgba(5, 8, 12, 0.46) 100%
    ),
    linear-gradient(
      180deg,
      rgba(5, 8, 12, 0.08) 0%,
      rgba(5, 8, 12, 0.48) 100%
    );
  pointer-events: none;
}

.trail-video-content {
  position: relative;
  z-index: 2;
  min-height: 100%;
  max-width: 680px;
  padding: clamp(28px, 6vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #efe7da;
}

.trail-video-kicker {
  margin: 0 0 12px;
  font-family: var(--font-raleway);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--yellow);
}

.trail-video-content h2 {
  margin: 0 0 16px;
  font-family: var(--font-vollkorn);
  font-size: clamp(2.2rem, 6vw, 5rem);
  font-weight: 400;
  line-height: 0.98;
  color: #efe7da;
  text-shadow: 0 8px 34px rgba(0, 0, 0, 0.62);
}

.trail-video-content p {
  margin: 0;
  max-width: 520px;
  font-family: var(--font-cormorant);
  font-size: clamp(1.18rem, 2.4vw, 1.65rem);
  line-height: 1.45;
  color: rgba(239, 231, 218, 0.88);
  text-shadow: 0 5px 24px rgba(0, 0, 0, 0.58);
}

@media (max-width: 760px) {
  .trail-video-section {
    padding: 54px 14px;
  }

  .trail-video-card {
    height: 420px;
    border-radius: 28px;
  }

  .trail-video-overlay {
    background:
      linear-gradient(
        180deg,
        rgba(5, 8, 12, 0.36) 0%,
        rgba(5, 8, 12, 0.82) 100%
      );
  }

  .trail-video-content {
    justify-content: flex-end;
    padding: 28px 22px 32px;
  }

  .trail-video-content h2 {
    font-size: clamp(2rem, 11vw, 3.6rem);
  }
}

@media (max-width: 420px) {
  .trail-video-card {
    height: 380px;
  }

  .trail-video-kicker {
    font-size: 0.68rem;
    letter-spacing: 0.18em;
  }
}