/*
Theme Name: KEXPAD Scroll Narrator
Theme URI: https://kexpad.com
Author: KEXPAD
Description: Fullscreen picture background with long narration text scrolling upward like movie credits.
Version: 1.0.3
License: GPL-2.0-or-later
Text Domain: kexpad-scroll-narrator
*/

:root {
  --scroll-duration: 260s;
  --scroll-start: 100vh;
  --scroll-end: -6000px;
  --text-width: 820px;
  --text-color: #ffffff;
  --shadow-color: rgba(0, 0, 0, 0.85);
  --overlay-color: rgba(0, 0, 0, 0.45);
  --kexpad-font-size: clamp(1.05rem, 1.8vw, 1.85rem);
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #000;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

.scroll-narrator-page {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.scroll-narrator-overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay-color);
  z-index: 1;
}

.scroll-narrator-content-wrap {
  position: relative;
  z-index: 2;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0 24px;
  box-sizing: border-box;
}

.scroll-narrator-content {
  width: min(100%, var(--text-width));
  color: var(--text-color);
  text-align: center;
  line-height: 1.72;
  font-size: var(--kexpad-font-size);
  font-weight: 600;
  text-shadow: 0 3px 14px var(--shadow-color);
  animation: scrollNarration var(--scroll-duration) linear infinite;
  will-change: transform;
  padding: 0 0 20vh;
  box-sizing: border-box;
}

.scroll-narrator-content h1,
.scroll-narrator-content h2,
.scroll-narrator-content h3 {
  margin: 0 0 1.2em;
  line-height: 1.2;
  letter-spacing: 0.08em;
}

.scroll-narrator-content p {
  margin: 0 0 1.35em;
}

.scroll-narrator-controls {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

.scroll-narrator-button {
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(0,0,0,0.5);
  color: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  backdrop-filter: blur(6px);
}

.scroll-narrator-button:hover {
  background: rgba(255,255,255,0.18);
}

body.scroll-paused .scroll-narrator-content {
  animation-play-state: paused;
}

@keyframes scrollNarration {
  from { transform: translateY(var(--scroll-start)); }
  to { transform: translateY(var(--scroll-end)); }
}

@media (max-width: 680px) {
  :root { --kexpad-font-size: clamp(1rem, 4.8vw, 1.45rem); }
  .scroll-narrator-content { line-height: 1.58; }
  .scroll-narrator-controls { right: 10px; bottom: 10px; }
}
