/* ========================================
   STILLE 3 - CSS Variables & Styles
   ======================================== */

:root {
  /* Z-index layers */
  --z-paper-texture: 10000;
  --z-sparkle: 999;
  --z-hamburger: 1102;
  --z-lang-switcher: 1100;
  --z-nav: 1101;
  --z-overlay: 1050;
  --z-main: 10;
  --z-bg-overlay: 2;
  --z-bg-image: 1;

  /* Spacing */
  --spacing-section: 4rem;
  --spacing-content-top: 6rem;
  --spacing-menu-top: 80px;

  /* Colors */
  --color-bg: #000;
  --color-text: #fff;
  --color-text-secondary: rgba(255,255,255,0.5);
  --color-overlay: rgba(0,0,0,0.95);

  /* Transitions */
  --transition-base: 0.2s;
  --transition-menu: 0.3s;
}

/* ---------- Reset & Base ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: Helvetica, Arial, sans-serif;
  line-height: 1.0;
  color: var(--color-text);
  background: var(--color-bg);
}

/* ---------- Papier-Textur Overlay ---------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" /></filter><rect width="100%25" height="100%25" filter="url(%23noise)" opacity="0.83"/></svg>');
  opacity: 0.55;
  pointer-events: none;
  z-index: var(--z-paper-texture);
  mix-blend-mode: overlay;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><filter id="sparkle"><feTurbulence type="fractalNoise" baseFrequency="1.5" numOctaves="1" seed="2"/><feComponentTransfer><feFuncA type="discrete" tableValues="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0.3 0.5 0.7 0.9 1"/></feComponentTransfer><feColorMatrix type="matrix" values="1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 1 0"/></filter><rect width="100%" height="100%" filter="url(%23sparkle)" fill="white"/></svg>');
  opacity: 0.7;
  pointer-events: none;
  z-index: var(--z-sparkle);
  mix-blend-mode: screen;
}

/* ---------- Background ---------- */
.bg-image {
  position: fixed;
  inset: 0;
  z-index: var(--z-bg-image);
  background: url('bg12.webp') center/cover no-repeat;
  opacity: 1;
  /* No animation - parallax handles movement via JS */
}

.bg-overlay {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(180deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.9) 100%),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"><filter id="g"><feTurbulence baseFrequency="10.9"/></filter><rect width="100%25" height="100%25" filter="url(%23g)" opacity="0.84"/></svg>');
  z-index: var(--z-bg-overlay);
  opacity: 0.3;
}

/* ---------- Header ---------- */
header {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: var(--z-lang-switcher);
}

/* ---------- Main Container ---------- */
main {
  position: relative;
  z-index: var(--z-main);
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  transition: opacity var(--transition-menu);
}

/* ---------- Sections ---------- */
section {
  min-height: 100vh;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--spacing-section) 1.5rem;
  position: relative;
}

section.active {
  display: flex;
}

section.content-section {
  min-height: 100vh;
  max-height: 100vh;
  justify-content: flex-start;
  padding-top: 0;
  padding-bottom: 2rem;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Subtle scrollbar styling */
section.content-section::-webkit-scrollbar {
  width: 6px;
}

section.content-section::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

section.content-section::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

section.content-section::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Subtile asymmetrische Paddings */
section:nth-child(odd) {
  padding-left: calc(var(--spacing-section) + 2px);
  padding-right: calc(var(--spacing-section) - 1px);
}

section:nth-child(even) {
  padding-left: calc(var(--spacing-section) - 1px);
  padding-right: calc(var(--spacing-section) + 1px);
}

/* ---------- Content Container ---------- */
.content-wrapper {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

/* Position h2 at 33.33% from top (1/3 rule) */
section.content-section .content-wrapper {
  padding-top: calc(33.33vh - 3rem);
}

/* Exclude archiv-1 from golden ratio */
#archiv-1 .content-wrapper {
  padding-top: 6rem;
}

/* ---------- Typography ---------- */
h1 {
  font-size: clamp(8rem, 16vw, 13rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 0.9;
  text-shadow: 0 0 28px rgba(255,255,255,0.85), 0 0 80px rgba(255,255,255,0.45), 0 0 180px rgba(255,255,255,0.38);
  opacity: 0.953;
  text-align: center;
  animation: breathe 9.5s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.74; }
  50% { opacity: 0.99; }
}

h2 {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 500;
  text-shadow: 0 0 20px rgba(255,255,255,0.7);
  margin-bottom: 2rem;
  text-align: center;
  opacity: 0.948;
}

h3 {
  font-size: clamp(1.4rem, 3.5vw, 1.8rem);
  font-weight: 500;
  margin-bottom: 1rem;
}

p {
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  text-shadow: 0 0 10px rgba(255,255,255,0.3);
  line-height: 1.0;
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
  opacity: 0.951;
  margin-bottom: 1rem;
}

/* Random character styles */
.char {
  display: inline-block;
  white-space: nowrap;
}

.word {
  display: inline-block;
  white-space: nowrap;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all var(--transition-base);
}

a:hover {
  opacity: 0.96;
}

/* ---------- Language Switcher ---------- */
.lang-switcher {
  display: flex;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
}

.lang-switcher button {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 4px 8px;
  transition: all var(--transition-base);
  font-family: inherit;
  text-transform: uppercase;
}

.lang-switcher button:hover {
  transform: rotate(-0.5deg);
}

.lang-switcher button.active {
  color: #fffef9;
}

.lang-switcher .separator {
  color: rgba(255,255,255,0.3);
}

/* ---------- Navigation ---------- */
#menu-toggle {
  display: none;
}

.menu-label {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 50px;
  height: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-hamburger);
  transition: transform 0.2s ease;
}

.menu-label:hover {
  transform: scale(1.05);
}

.menu-label .bar,
.menu-label .bar::before,
.menu-label .bar::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  position: absolute;
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55),
              opacity 0.3s ease,
              width 0.3s ease;
}

.menu-label .bar::before {
  content: "";
  transform: translateY(-7px);
  width: 20px; /* Slightly shorter */
}

.menu-label .bar::after {
  content: "";
  transform: translateY(7px);
  width: 18px; /* Even shorter */
}

/* Keep asymmetry - bars stay their original length */
/* No width change on hover or rotation - keeps church window proportions */

#menu-toggle:checked + .menu-label {
  transform: rotate(-90deg);
}

#menu-toggle:checked ~ main {
  opacity: 0;
  pointer-events: none;
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--color-overlay);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-menu), visibility var(--transition-menu);
  z-index: var(--z-overlay);
}

#menu-toggle:checked ~ .overlay {
  opacity: 1;
  visibility: visible;
}

nav {
  position: fixed;
  top: 0;
  left: -100%;
  width: min(90%, 340px);
  height: 100%;
  background: rgba(0,0,0,0);
  padding: var(--spacing-menu-top) 20px 20px;
  transition: left var(--transition-menu);
  z-index: var(--z-nav);
  overflow-y: auto;
}

#menu-toggle:checked ~ nav {
  left: 0;
}

nav ul {
  list-style: none;
}

nav a {
  color: var(--color-text);
  text-decoration: none;
  font-size: 2rem;
  line-height: 0.8;
  display: block;
  padding: 0.5rem 0;
  opacity: 0.9;
  transition: all var(--transition-base);
  cursor: pointer;
}

/* Subtil unterschiedliche Menü-Paddings */
nav li:nth-child(1) a { padding-left: 0px; }
nav li:nth-child(2) a { padding-left: 1px; }
nav li:nth-child(3) a { padding-left: 0px; }
nav li:nth-child(4) a { padding-left: 2px; }
nav li:nth-child(5) a { padding-left: 1px; }
nav li:nth-child(6) a { padding-left: 0px; }

nav a:hover {
  opacity: 1;
}

.submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-menu);
  padding-left: 1.5rem;
}

.submenu.open {
  max-height: 500px;
}

.submenu a {
  font-size: 1.2rem;
  line-height: 0.2;
  opacity: 0.7;
}

/* ---------- Newsletter ---------- */
.newsletter {
  margin-top: 1rem;
  padding-top: 0;
  border-top: none;
}

.newsletter h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  text-align: left;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.newsletter input {
  padding: 0.75rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  color: var(--color-text);
  font-size: 16px; /* Prevents mobile zoom on iOS */
}

.newsletter input::placeholder {
  color: var(--color-text-secondary);
}

/* Remove red border - only show on submit attempt */
.newsletter input:invalid {
  border-color: rgba(255,255,255,0.2);
}

.newsletter input:invalid:focus {
  border-color: rgba(255,255,255,0.4);
}

.newsletter button {
  padding: 0.75rem;
  background: var(--color-text);
  color: var(--color-bg);
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
}

.newsletter button:hover {
  background: rgba(255,255,255,0.9);
  transform: translateY(-1px);
}

.newsletter button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.newsletter-success {
  background: rgba(0,255,0,0.1);
  border: 1px solid rgba(0,255,0,0.3);
  padding: 0.75rem;
  border-radius: 4px;
  text-align: center;
  display: none;
}

.newsletter-error {
  background: rgba(255,0,0,0.1);
  border: 1px solid rgba(255,0,0,0.3);
  padding: 0.75rem;
  border-radius: 4px;
  text-align: center;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.newsletter-checkbox {
  margin: 0.75rem 0;
  text-align: left;
}

.newsletter-checkbox input[type="checkbox"] {
  margin-right: 0.5rem;
  cursor: pointer;
}

.newsletter-checkbox label {
  font-size: 0.75rem;
  line-height: 1.4;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.newsletter-checkbox a {
  color: rgba(255,255,255,0.9);
  margin-left: 0.6rem;
}

/* Legal Links - tiny and unsexy */
.legal-links {
  margin-top: 0;
  margin-bottom: 2rem;
  padding-top: 0;
  padding-bottom: 1rem;
  border-top: none;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 0.7rem;
  opacity: 0.6;
  text-align: left;
}

.legal-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  margin-right: 0.75rem;
  transition: opacity 0.2s;
}

.legal-links a:hover {
  opacity: 0.9;
}

/* ---------- Landing Section ---------- */
.landing .subtitle {
  font-size: 1.5rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin: 1rem 0;
  opacity: 0.9;
  animation: subtle-pulse 15s ease-in-out infinite;
}

@keyframes subtle-pulse {
  0%, 100% { transform: scale(1) rotate(-0.1deg); }
  50% { transform: scale(1.003) rotate(0.15deg); }
}

.landing .info {
  padding: 1.5rem 2rem;
  border-radius: 8px;
  font-size: 1.1rem;
  line-height: 1.0;
  text-align: center;
  backdrop-filter: blur(10px);
}

/* ---------- Artist Profile ---------- */
.artist-profile {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
}

.artist-image {
  width: 640px;
  height: 268px;
  background: rgba(255,255,255,0.1);
  border-radius: 0;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  opacity: 0.8;
  overflow: hidden;
  margin-bottom: 0;
}

.artist-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Video Content ---------- */
.video-content {
  width: 100%;
  max-width: 500px;
  margin: 2rem auto;
  aspect-ratio: 16/9;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  overflow: hidden;
}

.video-content video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Footer ---------- */
footer {
  padding: 2rem;
  text-align: center;
  opacity: 0.7;
  font-size: 0.9rem;
}

/* ---------- Mobile Responsive ---------- */
@media (max-width: 768px) {
  section {
    padding: 3rem 1rem;
  }

  section:nth-child(odd),
  section:nth-child(even) {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  section.content-section {
    padding-top: 0;
    padding-bottom: 2rem;
  }

  section.content-section .content-wrapper {
    padding-top: calc(33.33vh - 2rem);
  }

  /* Prevent images and text from overflowing */
  img {
    max-width: 100%;
    height: auto;
  }

  .content-wrapper {
    max-width: 100%;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  p, h2, h3, ul, li {
    max-width: 100%;
    word-wrap: break-word;
  }

  h1 {
    font-size: 5.0rem;
  }

  h2 {
    font-size: 2rem;
  }

  .landing .subtitle {
    font-size: 1.2rem;
    letter-spacing: 0.15em;
  }

  .landing .info {
    padding: 1rem;
    font-size: 1rem;
  }

  /* Mobile Menu Enhancement */
  nav {
    padding: 100px 2rem 4rem;
    gap: 0;
  }

  nav a {
    font-size: 2.2rem;
    padding: 0.6rem 0;
    line-height: 0.9;
    letter-spacing: 0.02em;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  nav a:active {
    transform: scale(0.98);
  }

  .submenu {
    margin-top: 0.0rem;
    margin-bottom: 0rem;
    gap: 0.0rem;
  }

  .submenu a {
    font-size: 1.3rem;
    padding: 0.6rem 0;
    line-height: 1.0;
    opacity: 0.75;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .submenu a:active {
    transform: translateX(3px);
    opacity: 1;
  }

  /* Larger touch target for menu button */
  .menu-label {
    width: 56px;
    height: 56px;
  }

  /* Newsletter mobile */
  .newsletter {
    margin-top: 3rem;
    margin-bottom: 2rem;
  }

  .newsletter h3 {
    font-size: 1.1rem;
  }

  /* Legal links mobile */
  .legal-links {
    margin-top: 0;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
  }

  .legal-links a {
    display: inline-block;
    padding: 0.25rem 0.75rem 0.25rem 0;
  }
}

@media (max-width: 375px) {
  section {
    padding: 2rem 0.75rem;
  }

  section.content-section {
    padding-top: 0;
  }

  section.content-section .content-wrapper {
    padding-top: calc(33.33vh - 1.5rem);
  }

  h1 {
    font-size: 4rem;
  }
}

/* ---------- Accessibility ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Improved focus states - only visible on keyboard navigation */
*:focus-visible {
  outline: 1px solid rgba(255,255,255,0.3);
  outline-offset: 2px;
}

/* Remove focus outline on mouse/touch interaction */
*:focus:not(:focus-visible) {
  outline: none !important;
}

/* Completely remove outline from nav links and buttons unless keyboard navigating */
nav a:focus,
nav button:focus,
button:focus {
  outline: none !important;
  box-shadow: none !important;
}

nav a:focus-visible {
  outline: 1px solid rgba(255,255,255,0.3);
  outline-offset: 2px;
}

/* Safari/Brave specific fix */
nav a:not(:focus-visible) {
  outline: none !important;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
