/* ============ Poron tarina — 3D-scrollaussivu (poroo.fi/tarina) ============ */
/* Ladataan style.css:n päälle: perii värit, fontit, navin ja pillerinapit. */

body { overflow-x: hidden; }

#webgl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Tummennus 3D-scenen päälle, jotta teksti pysyy luettavana. Vasen laita
   (jossa teksti elää) tummempi, oikea kevyempi jotta polku näkyy. */
.scene-scrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg,
    rgba(6, 11, 20, 0.88) 0%,
    rgba(6, 11, 20, 0.68) 32%,
    rgba(6, 11, 20, 0.42) 62%,
    rgba(6, 11, 20, 0.28) 100%);
}
body.no3d .scene-scrim { display: none; }

/* ===== Scrollausmatka ===== */
.journey { position: relative; height: 1350vh; z-index: 2; }

.tstage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 96px 8vw 48px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 2;
}
.tstage.is-active { pointer-events: auto; }

.tstage__inner { position: relative; max-width: 720px; }
.tstage__inner--hero { max-width: 920px; }

.tstage h1 {
  font-size: clamp(52px, 8.5vw, 128px);
  line-height: .96;
  text-shadow: 0 3px 34px rgba(0, 0, 0, .55);
}

.tstage h2 {
  font-size: clamp(34px, 4.8vw, 66px);
  line-height: 1.0;
  text-shadow: 0 3px 34px rgba(0, 0, 0, .55);
}

/* Revontulivihreä korostus (Careersin .gold-vastine) */
.aurora {
  background: linear-gradient(100deg, var(--aurora) 15%, #a8f5d0 50%, var(--aurora) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tstage__marker {
  font-family: var(--font-display);
  font-size: .85rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--fg-45);
  margin-bottom: 18px;
}
.tstage__marker .num {
  display: inline-block;
  color: var(--aurora);
  border: 1px solid rgba(79, 227, 156, .35);
  border-radius: 999px;
  min-width: 42px;
  text-align: center;
  padding: 4px 8px;
  margin-right: 12px;
}

.tstage__body {
  margin-top: 24px;
  max-width: 560px;
  font-size: 1.08rem;
  line-height: 1.66;
  color: rgba(239, 227, 200, .88);
  text-shadow: 0 1px 18px rgba(0, 0, 0, .6);
}
.tstage__body + .tstage__body { margin-top: 14px; }
.tstage__body strong { color: var(--aurora); font-weight: 600; }

.tstage__sig {
  margin-top: 26px;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 1.1rem;
  color: var(--fg-45);
}

.scroll-hint {
  margin-top: 48px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: .9rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--aurora);
  border: 1px solid rgba(79, 227, 156, .35);
  border-radius: 999px;
  padding: 13px 24px;
  background: rgba(10, 18, 32, .45);
  backdrop-filter: blur(4px);
  animation: hintPulse 2.6s ease-in-out infinite;
}
@keyframes hintPulse {
  0%, 100% { border-color: rgba(79, 227, 156, .35); box-shadow: 0 0 0 rgba(79, 227, 156, 0); }
  50% { border-color: var(--aurora); box-shadow: 0 0 26px rgba(79, 227, 156, .2); }
}
.scroll-hint .arrow-down {
  display: inline-block;
  animation: bob 1.6s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

.tstage__cta {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ===== Yksinkertaistettu tila (reduced motion / ei WebGL:ää) ===== */
body.no3d #webgl { display: none; }
body.no3d .journey { height: auto; }
body.no3d .tstage {
  position: relative;
  inset: auto;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  min-height: 62vh;
  border-bottom: 1px solid var(--fg-12);
  background:
    radial-gradient(1200px 500px at 85% 20%, rgba(79, 227, 156, .05), transparent 60%),
    var(--bg);
}

/* ===== Mobiili ===== */
@media (max-width: 760px) {
  .scene-scrim {
    background: linear-gradient(180deg,
      rgba(6, 11, 20, 0.9) 0%,
      rgba(6, 11, 20, 0.72) 42%,
      rgba(6, 11, 20, 0.4) 70%,
      rgba(6, 11, 20, 0.28) 100%);
  }
  .tstage { padding: 12vh 6vw 34px; align-items: flex-start; }
  .tstage h1 { font-size: clamp(42px, 13vw, 64px); }
  .tstage h2 { font-size: clamp(28px, 8.4vw, 42px); line-height: 1.05; }
  .tstage__body { margin-top: 26px; font-size: .95rem; }
  .tstage__marker { margin-bottom: 14px; font-size: .75rem; }
  .scroll-hint { margin-top: 44px; }
  .tstage__cta { margin-top: 34px; }
}

/* Matalat vaakanäytöt */
@media (max-height: 560px) and (max-width: 900px) {
  .tstage { padding: 70px 6vw 24px; align-items: center; }
  .tstage h1 { font-size: clamp(32px, 8vw, 48px); }
  .tstage h2 { font-size: clamp(22px, 5vw, 34px); }
  .tstage__body { margin-top: 12px; font-size: .85rem; }
}
