/*
Theme Name: Scroll Scrub Hero
Theme URI: https://example.com
Author: 
Author URI: 
Description: A minimal one-page WordPress theme built around a pinned, scroll-scrubbed full-bleed video hero. Scroll down the homepage and the video's playhead scrubs in step with scroll position. Includes a plain content template for secondary pages (Impressum, Datenschutz, Kontakt, etc.).
Version: 1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: scroll-scrub-hero
*/

/* ---------------------------------------------------------------------
   Design tokens
--------------------------------------------------------------------- */
:root {
  --ssh-ink: #F6F1E7;
  --ssh-charcoal: #14110D;
  --ssh-amber: #C68A46;
  --ssh-muted: #B7ACA0;
  --ssh-line: rgba(246, 241, 231, 0.28);

  --ssh-paper: #FAF7F1;
  --ssh-paper-ink: #1E1B16;
  --ssh-paper-muted: #6B6459;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ssh-paper);
  color: var(--ssh-paper-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

/* ---------------------------------------------------------------------
   Site header (minimal overlay bar, shared across all pages)
--------------------------------------------------------------------- */
.ssh-site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 48px);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.06em;
}

.ssh-site-header.is-on-light { position: relative; color: var(--ssh-paper-ink); }
.ssh-site-header.is-on-dark { color: var(--ssh-ink); }

.ssh-site-title {
  text-decoration: none;
  font-weight: 600;
  text-transform: uppercase;
}

.ssh-nav ul {
  list-style: none;
  display: flex;
  gap: clamp(14px, 2.5vw, 28px);
  margin: 0;
  padding: 0;
}

.ssh-nav a {
  text-decoration: none;
  opacity: 0.85;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.ssh-nav a:hover { opacity: 1; border-bottom-color: var(--ssh-amber); }

/* ---------------------------------------------------------------------
   Plain content pages (Impressum, Datenschutz, Kontakt, ...)
--------------------------------------------------------------------- */
.ssh-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 130px 24px 100px;
}

.ssh-page h1 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(30px, 4vw, 44px);
  margin: 0 0 28px;
}

.ssh-page h2 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 24px;
  margin: 40px 0 14px;
}

.ssh-page p { color: var(--ssh-paper-ink); }
.ssh-page a { color: var(--ssh-amber); }

.ssh-site-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px 60px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ssh-paper-muted);
}

.ssh-site-footer.is-on-dark {
  max-width: none;
  padding: 40px clamp(20px, 5vw, 48px);
  background: var(--ssh-charcoal);
  color: var(--ssh-muted);
}

/* ---------------------------------------------------------------------
   Scroll Scrub Hero section
--------------------------------------------------------------------- */
.ssh-wrap {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  height: calc(100vh + var(--ssh-scroll-vh, 400vh));
  background: var(--ssh-charcoal);
}

.ssh-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ssh-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.ssh-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(20,17,13,0.55) 0%, rgba(20,17,13,0.25) 35%, rgba(20,17,13,0.35) 65%, rgba(20,17,13,0.75) 100%);
  pointer-events: none;
}

.ssh-rail {
  position: absolute;
  right: clamp(16px, 4vw, 48px);
  top: 50%;
  transform: translateY(-50%);
  height: min(46vh, 320px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 3;
}

.ssh-rail-track {
  position: relative;
  width: 1px;
  flex: 1;
  background: var(--ssh-line);
}

.ssh-rail-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: var(--ssh-amber);
}

.ssh-rail-dot {
  position: absolute;
  left: 50%;
  top: 0%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ssh-amber);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px rgba(198, 138, 70, 0.18);
}

.ssh-rail-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ssh-muted);
  white-space: nowrap;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.ssh-act {
  position: absolute;
  left: 0;
  right: 0;
  padding: 0 clamp(20px, 8vw, 96px);
  text-align: center;
  color: var(--ssh-ink);
  opacity: 0;
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.05s linear;
}

.ssh-act-1 { bottom: 14%; }

.ssh-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--ssh-amber);
  margin: 0 0 14px;
}

.ssh-headline {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(28px, 5vw, 56px);
  line-height: 1.12;
  margin: 0;
  max-width: 18ch;
  margin-inline: auto;
}

.ssh-act-2 { top: 16%; }

.ssh-quote {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 3.2vw, 34px);
  line-height: 1.35;
  color: var(--ssh-ink);
  max-width: 22ch;
  margin-inline: auto;
}

.ssh-act-3 { bottom: 12%; pointer-events: none; }

.ssh-cta {
  display: inline-block;
  pointer-events: auto;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ssh-charcoal);
  background: var(--ssh-ink);
  padding: 16px 30px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ssh-cta:hover { background: var(--ssh-amber); transform: translateY(-1px); }

.ssh-cta:focus-visible {
  outline: 2px solid var(--ssh-amber);
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .ssh-rail { display: none; }
  .ssh-act-1 { bottom: 18%; }
  .ssh-act-2 { top: 20%; }
}

.ssh-wrap.ssh-reduced { height: 100vh; }
.ssh-wrap.ssh-reduced .ssh-pin { position: relative; }
.ssh-wrap.ssh-reduced .ssh-rail { display: none; }
.ssh-wrap.ssh-reduced .ssh-act-1 { opacity: 1; }
.ssh-wrap.ssh-reduced .ssh-act-2,
.ssh-wrap.ssh-reduced .ssh-act-3 { display: none; }
