@font-face {
  font-family: 'InterVariable';
  src: url('../assets/fonts/Inter-VariableFont_opsz,wght.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'DMSansVariable';
  src: url('../assets/fonts/DMSans-VariableFont_opsz,wght.ttf') format('truetype');
  font-display: swap;
}

/* =================================================
  Reset & Base Styles
================================================= */
:root {
  --font-size-base: 1rem;
  --font-size-large: 1.75rem;
  --max-width: 60ch;
  --link-color: #007aff;
  --bg: #fefefe;
  --text: #111;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'DMSansVariable', sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  text-decoration: underline;
}

/* =================================================
  Navigation & Theme Switcher
================================================= */
.top-nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1rem;
  background: var(--bg);
  display: flex;
  justify-content: center;
  gap: 2rem;
  z-index: 10;
}

.theme-switcher {
  position: fixed;
  top: 3.5rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 10;
}

@media (max-width: 768px) {
  .theme-switcher {
    top: auto;
    bottom: 1rem;
    right: 50%;
    transform: translateX(50%);
    flex-direction: row;
  }
}

.theme-switcher button {
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  background: var(--bg);
  border: 1px solid var(--text);
  color: var(--text);
  cursor: crosshair;
}

/* =================================================
  Main Content
================================================= */
.intro {
  margin-top: 6rem;
  max-width: var(--max-width);
  text-align: left;
  padding: 0 1rem;
}

.intro-text {
  font-size: var(--font-size-large);
  line-height: 1.4;
  margin-bottom: 1rem;
}

.text-sample {
  text-align: left;
}

.text-sample h1 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.text-sample p {
  font-size: 1rem;
  line-height: 1.6;
}

.text-sample footer {
  margin-top: 2rem;
  font-size: 1rem;
}

/* =================================================
  Word Switcher Animation
================================================= */
.word-switcher {
  position: relative;
  height: 2.5em;
  font-size: var(--font-size-large);
  font-weight: bold;
  color: var(--link-color);
  overflow: hidden;
}

.word-switcher span {
  position: absolute;
  left: 0;
  right: 0;
  opacity: 0;
  animation: wordFade 9s infinite;
  animation-timing-function: ease-in-out;
}

.word-switcher span:nth-child(1) {
  animation-delay: 0s;
}
.word-switcher span:nth-child(2) {
  animation-delay: 3s;
}
.word-switcher span:nth-child(3) {
  animation-delay: 6s;
}

@keyframes wordFade {
  0%   { opacity: 0; transform: translateY(100%); }
  10%  { opacity: 1; transform: translateY(0); }
  30%  { opacity: 1; transform: translateY(0); }
  40%  { opacity: 0; transform: translateY(-100%); }
  100% { opacity: 0; }
}

/* =================================================
  Themes
================================================= */
.theme-01 {
  --link-color: #007aff;
  --bg: #fefefe;
  --text: #111;
  font-family: 'InterVariable', sans-serif;
  font-weight: 400;
  font-optical-sizing: auto;
  font-size: 1rem; /* base */
}

.theme-02 {
  --link-color: #e6007e; /* Magenta */
  --bg: #ffeef4;
  --text: #111;
  font-family: 'InterVariable', sans-serif;
  font-weight: 600;
  font-optical-sizing: auto;
  font-size: 1.333rem;
}

.theme-03 {
  --link-color: #1a8c3d; /* Grün */
  --bg: #f9f5e9;
  --text: #111;
  font-family: 'DMSansVariable', sans-serif;
  font-weight: 300;
  font-optical-sizing: auto;
  font-size: 1.414rem;
}

.theme-04 {
  --link-color: #1a8c3d; /* Grün */
  --bg: #f9f5e9;
  --text: #111;
  font-family: 'DMSansVariable', sans-serif;
  font-weight: 600;
  font-optical-sizing: auto;
  font-size: 1.200rem;
}