/*
Theme Name: Valley of Light
Theme URI: https://valleyoflight.de
Author: Valley of Light
Description: Cinematic bilingual storybook for Im Tal des Lichts. Chapters are editable in WordPress under „Kapitel“.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: valley-of-light
*/

:root {
  --vol-bg: #0a0c0b;
  --vol-surface: #141816;
  --vol-elevated: #1c211f;
  --vol-fg: #e6e4dc;
  --vol-muted: #8b9188;
  --vol-faint: #5c635c;
  --vol-primary: #c5d0c8;
  --vol-primary-fg: #0a0c0b;
  --vol-border: color-mix(in oklab, var(--vol-fg) 12%, transparent);
  --vol-border-strong: color-mix(in oklab, var(--vol-fg) 22%, transparent);
  --vol-display: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;
  --vol-serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --vol-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  background: var(--vol-bg);
  color: var(--vol-fg);
}

body.vol-body {
  margin: 0;
  min-height: 100dvh;
  background: var(--vol-bg);
  color: var(--vol-fg);
  font-family: var(--vol-serif);
}

body.vol-body.admin-bar {
  padding-top: 0;
}

.vol-app a {
  color: inherit;
  text-decoration: none;
}

.vol-app img,
.vol-app video {
  max-width: 100%;
  display: block;
}

.vol-app h1,
.vol-app h2,
.vol-app h3 {
  font-family: var(--vol-display);
  font-weight: 500;
  text-wrap: balance;
  margin: 0;
}

.vol-app p {
  text-wrap: pretty;
}

.vol-app ::selection {
  background: color-mix(in oklab, var(--vol-primary) 35%, transparent);
  color: var(--vol-fg);
}

html[data-vol-lang="de"] .vol-en {
  display: none !important;
}

html[data-vol-lang="en"] .vol-de {
  display: none !important;
}

.vol-header {
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
}

@media (min-width: 768px) {
  .vol-header {
    padding: 1rem 2rem;
  }
}

.vol-header--sticky {
  position: sticky;
  top: 0;
  border-bottom: 1px solid var(--vol-border);
  background: color-mix(in oklab, var(--vol-bg) 85%, transparent);
  backdrop-filter: blur(12px);
}

.vol-header--ghost {
  position: absolute;
  inset: 0 0 auto;
  background: linear-gradient(to bottom, color-mix(in oklab, var(--vol-bg) 80%, transparent), transparent);
}

.vol-brand {
  font-family: var(--vol-display);
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.vol-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.vol-nav a {
  border-radius: 999px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--vol-muted);
}

.vol-nav a:hover {
  color: var(--vol-fg);
}

.vol-lang {
  display: flex;
  border: 1px solid var(--vol-border);
  border-radius: 999px;
  padding: 2px;
}

.vol-lang button {
  min-height: 44px;
  min-width: 44px;
  border: 0;
  background: transparent;
  color: var(--vol-muted);
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
}

.vol-lang button.is-on,
html[data-vol-lang="de"] .vol-lang [data-vol-set-lang="de"],
html[data-vol-lang="en"] .vol-lang [data-vol-set-lang="en"] {
  background: var(--vol-primary);
  color: var(--vol-primary-fg);
}

.vol-hero {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  overflow: hidden;
}

.vol-hero-media,
.vol-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vol-hero-img {
  display: none;
}

@media (max-width: 767px) {
  .vol-hero-media {
    display: none;
  }
  .vol-hero-img {
    display: block;
  }
}

.vol-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    var(--vol-bg) 0%,
    color-mix(in oklab, var(--vol-bg) 55%, transparent) 42%,
    color-mix(in oklab, var(--vol-bg) 25%, transparent) 70%,
    transparent 100%
  );
}

.vol-flies {
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.vol-firefly {
  position: absolute;
  bottom: -8px;
  border-radius: 999px;
  background: var(--vol-primary);
  box-shadow: 0 0 8px 2px color-mix(in oklab, var(--vol-primary) 55%, transparent);
  animation: vol-drift linear infinite, vol-pulse ease-in-out infinite;
}

.vol-hero-copy {
  position: relative;
  z-index: 10;
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
  justify-content: flex-end;
  padding: 6rem 1.25rem 6rem;
}

@media (min-width: 768px) {
  .vol-hero-copy {
    padding: 7rem 3rem 6rem;
  }
}

.vol-kicker {
  font-family: var(--vol-display);
  font-style: italic;
  letter-spacing: 0.04em;
  color: var(--vol-primary);
  margin: 0;
}

.vol-hero-copy h1 {
  margin-top: 0.75rem;
  max-width: 48rem;
  font-size: clamp(2.6rem, 8vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.vol-eyebrow {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--vol-muted);
}

.vol-quote {
  display: none;
  margin: 1.5rem 0 0;
  max-width: 36rem;
  font-family: var(--vol-serif);
  font-size: 1.05rem;
  line-height: 1.7;
  font-style: italic;
  color: color-mix(in oklab, var(--vol-fg) 90%, transparent);
}

@media (min-width: 640px) {
  .vol-quote {
    display: block;
  }
}

.vol-quote span {
  display: block;
}

.vol-cta-row {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .vol-cta-row {
    flex-direction: row;
    align-items: center;
  }
}

.vol-btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 1.75rem;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
}

.vol-btn--solid {
  background: var(--vol-primary);
  color: var(--vol-primary-fg);
  font-weight: 500;
}

.vol-btn--ghost {
  border: 1px solid var(--vol-border-strong);
}

.vol-btn:hover {
  opacity: 0.92;
}

.vol-pair {
  margin: 0 auto;
  max-width: 64rem;
  display: grid;
  gap: 1.5rem;
  padding: 4rem 1.25rem;
}

@media (min-width: 768px) {
  .vol-pair {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    padding: 6rem 2rem;
  }
}

.vol-card {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--vol-border);
  background: var(--vol-surface);
}

.vol-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top;
}

.vol-card-body {
  padding: 1.5rem 1.75rem;
}

.vol-card-body .vol-eyebrow {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
}

.vol-card-body h2 {
  margin-top: 0.5rem;
  font-size: 1.85rem;
  font-style: italic;
}

.vol-card-body p {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--vol-muted);
}

.vol-path {
  border-top: 1px solid var(--vol-border);
  padding: 4rem 1.25rem;
}

@media (min-width: 768px) {
  .vol-path {
    padding: 6rem 2rem;
  }
}

.vol-path-inner {
  margin: 0 auto;
  max-width: 64rem;
}

.vol-path h2 {
  margin-top: 0.75rem;
  font-size: clamp(2rem, 5vw, 3rem);
  font-style: italic;
}

.vol-path ol {
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--vol-border);
  background: var(--vol-border);
}

@media (min-width: 640px) {
  .vol-path ol {
    grid-template-columns: 1fr 1fr;
  }
}

.vol-path li {
  background: var(--vol-surface);
}

.vol-path a {
  display: flex;
  min-height: 64px;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
}

.vol-path a:hover {
  background: var(--vol-elevated);
}

.vol-num {
  font-family: var(--vol-display);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  color: var(--vol-faint);
  margin-right: 0.75rem;
}

.vol-path-title {
  font-family: var(--vol-display);
  font-size: 1.125rem;
  font-style: italic;
}

.vol-footer {
  border-top: 1px solid var(--vol-border);
  padding: 2.5rem 1.25rem;
  text-align: center;
}

.vol-footer p {
  font-family: var(--vol-display);
  font-style: italic;
  color: var(--vol-muted);
  margin: 0;
}

.vol-wrap {
  margin: 0 auto;
  max-width: 64rem;
  padding: 3rem 1.25rem 6rem;
}

.vol-wrap h1 {
  margin-top: 0.75rem;
  font-size: clamp(2.2rem, 6vw, 3.75rem);
  font-style: italic;
}

.vol-lead {
  margin: 1rem 0 0;
  max-width: 36rem;
  color: var(--vol-muted);
}

.vol-grid {
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .vol-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.vol-grid a {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--vol-border);
  background: var(--vol-surface);
}

.vol-grid a.is-current,
.vol-grid a:hover {
  border-color: var(--vol-border-strong);
}

.vol-grid img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.vol-grid-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem;
}

.vol-grid h2 {
  margin-top: 0.25rem;
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.3;
}

.vol-badge {
  margin-top: 0.25rem;
  flex-shrink: 0;
  border: 1px solid var(--vol-border);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--vol-muted);
  display: none;
}

.vol-grid a.is-read .vol-badge {
  display: inline-block;
}

.vol-progress {
  height: 1px;
  background: var(--vol-border);
}

.vol-progress > span {
  display: block;
  height: 1px;
  background: var(--vol-primary);
}

.vol-chapter {
  margin: 0 auto;
  max-width: 72rem;
  display: grid;
  min-height: calc(100dvh - 5rem);
}

@media (min-width: 1024px) {
  .vol-chapter {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  }
}

.vol-figure {
  position: relative;
}

.vol-figure img {
  width: 100%;
  height: 52vh;
  object-fit: cover;
  object-position: top;
}

.vol-figure-fade {
  pointer-events: none;
  position: absolute;
  inset: auto 0 0;
  height: 6rem;
  background: linear-gradient(to top, var(--vol-bg), transparent);
}

@media (min-width: 1024px) {
  .vol-figure {
    position: sticky;
    top: 4rem;
    height: calc(100dvh - 4rem);
  }
  .vol-figure img {
    height: 100%;
  }
  .vol-figure-fade {
    display: none;
  }
}

.vol-text {
  display: flex;
  flex-direction: column;
  padding: 2rem 1.25rem 6rem;
}

@media (min-width: 768px) {
  .vol-text {
    padding: 3.5rem 3rem 6rem;
  }
}

.vol-text h1 {
  margin-top: 0.75rem;
  font-size: clamp(2rem, 4vw, 3rem);
  font-style: italic;
  line-height: 1.15;
}

.vol-stanzas {
  margin-top: 2.5rem;
}

.vol-stanza {
  margin: 0 0 2rem;
  font-size: 1.05rem;
  line-height: 1.75;
}

.vol-stanza span {
  display: block;
}

.vol-stanza .vol-gap {
  height: 1rem;
}

.vol-pager {
  margin-top: 3.5rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid var(--vol-border);
  padding-top: 1.5rem;
}

.vol-pager a {
  display: flex;
  min-height: 48px;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 0.5rem;
  color: var(--vol-muted);
}

.vol-pager a:last-child {
  justify-content: flex-end;
  text-align: right;
}

.vol-pager .vol-tiny {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--vol-faint);
}

.vol-pager .vol-next-title {
  display: block;
  font-family: var(--vol-display);
  font-size: 1rem;
  font-style: italic;
  color: var(--vol-fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes vol-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes vol-drift {
  from {
    transform: translate3d(0, 8px, 0);
    opacity: 0.15;
  }
  to {
    transform: translate3d(12px, -110vh, 0);
    opacity: 0;
  }
}

@keyframes vol-pulse {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.9;
  }
}

.vol-rise {
  animation: vol-rise 700ms var(--vol-ease) both;
}
.vol-rise-2 {
  animation: vol-rise 700ms var(--vol-ease) 120ms both;
}
.vol-rise-3 {
  animation: vol-rise 700ms var(--vol-ease) 240ms both;
}
.vol-rise-4 {
  animation: vol-rise 700ms var(--vol-ease) 360ms both;
}

@media (prefers-reduced-motion: reduce) {
  .vol-rise,
  .vol-rise-2,
  .vol-rise-3,
  .vol-rise-4,
  .vol-firefly {
    animation: none;
  }
}

.vol-admin-help {
  max-width: 46rem;
}

.vol-admin-help code {
  background: #eee;
  padding: 0.1rem 0.35rem;
}
