/* =========================
   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,
#vieraskirja .guestbook-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.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;
}

/* =========================
   CONTACT
   ========================= */

.contact-section {
  padding: 0;
  text-align: center;
  background: transparent;
}

#yhteys {
  position: relative;

  min-height: 115vh;
  overflow: hidden;

  background: transparent;
}

#yhteys::before {
  content: "";

  position: absolute;
  inset: -8vh 0 0 0;
  z-index: 0;

  background: url("../images/anssi2.jpg") center top / cover no-repeat;
  filter: brightness(1.22) contrast(0.96) saturate(0.9);

  transform: scale(1.04);
}

#yhteys::after {
  content: "";

  position: absolute;
  inset: 0;
  z-index: 1;

  pointer-events: none;

  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.82) 0%,
    rgba(0, 0, 0, 0.52) 18%,
    rgba(0, 0, 0, 0.22) 42%,
    rgba(0, 0, 0, 0.35) 100%
  );
}

#yhteys .section-inner,
#yhteys .contact-inner {
  position: relative;
  z-index: 2;
}

.contact-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;

  width: min(92vw, 820px);
  margin: 0 auto;
  padding: 42px 34px;

  border: 1px solid rgba(250, 186, 0, 0.18);
  border-radius: 22px;

  background: linear-gradient(
    180deg,
    rgba(7, 10, 12, 0.78) 0%,
    rgba(10, 13, 15, 0.88) 100%
  );

  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.contact-title {
  margin: 0;

  color: var(--text-light);
  font-family: var(--font-cinzel);
  font-size: clamp(28px, 2.2vw, 42px);
  letter-spacing: 0.18em;
}

.contact-email a {
  color: var(--yellow);
  font-family: var(--font-cormorant);
  font-size: clamp(22px, 1.8vw, 30px);

  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.85),
    0 0 12px rgba(250, 186, 0, 0.2);
}

.contact-divider {
  width: 120px;
  height: 1px;
  margin: 0 auto 12px;

  background: rgba(255, 255, 255, 0.35);
}

.contact-divider.small {
  width: 80px;
  margin: 16px auto 8px;
  opacity: 0.6;
}

.copyright {
  max-width: 680px;

  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font-inter);
  font-size: clamp(12px, 0.95vw, 14px);
  line-height: 1.6;
  letter-spacing: 0.06em;

  opacity: 1;
}

.copyright .source-ref {
  top: -0.25em;

  margin-right: 4px;

  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75em;
}
.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;
}