/* ============================================
   Epochen — Das Kunst-Puzzle
   Website Styles
   ============================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

:root {
  --gold: #b8861c;
  --gold-light: #e0a830;
  --gold-soft: #d4a84a;
  --beige: #f4ecdd;
  --beige-soft: #faf6ee;
  --ink: #2a241c;
  --ink-soft: #5a4f3f;
  --ink-mute: #8a7d68;
  --line: rgba(42, 36, 28, 0.12);
  --bg: #fdfaf3;
  --bg-alt: #f4ecdd;
}

body {
  font-family: 'Georgia', 'Iowan Old Style', 'Palatino', serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--gold); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold-light); }
img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 250, 243, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-logo {
  font-family: 'Georgia', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.5px;
}
.nav-logo span { color: var(--gold); }
.nav-logo:hover { color: var(--ink); }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  color: var(--ink-soft);
  font-size: 15px;
  font-family: 'Georgia', serif;
}
.nav-links a:hover { color: var(--gold); }

/* --- Hero --- */
.hero {
  padding: 80px 0 100px;
  background: linear-gradient(180deg, var(--beige-soft) 0%, var(--bg) 100%);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-text h1 {
  font-size: 56px;
  font-weight: 400;
  letter-spacing: -0.5px;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 24px;
}

.hero-text h1 span {
  color: var(--gold);
  font-style: italic;
}

.hero-lead {
  font-size: 21px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-bottom: 16px;
}

.hero-sub {
  font-size: 14px;
  color: var(--ink-mute);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 36px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.btn-primary {
  display: inline-block;
  background: var(--ink);
  color: var(--beige-soft) !important;
  padding: 14px 32px;
  border-radius: 2px;
  font-size: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  border: 1px solid var(--ink);
  transition: all 0.25s;
}
.btn-primary:hover {
  background: var(--gold);
  color: #fff !important;
  border-color: var(--gold);
}

/* --- Hero Puzzle Animation --- */
.hero-puzzle {
  position: relative;
}

.puzzle-stage {
  position: relative;
  aspect-ratio: 1 / 1.003;
  max-width: 480px;
  margin: 0 auto;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4),
    0 20px 60px rgba(42, 36, 28, 0.25),
    0 0 0 1px rgba(184, 134, 28, 0.2);
  background: var(--bg-alt);
  overflow: hidden;
}

.puzzle-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.puzzle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-caption {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--ink-mute);
  font-style: italic;
  letter-spacing: 0.3px;
}

/* --- Section base --- */
section {
  padding: 100px 0;
}

section h2 {
  font-size: 40px;
  font-weight: 400;
  text-align: center;
  color: var(--ink);
  letter-spacing: -0.3px;
  margin-bottom: 20px;
}

.section-lead {
  text-align: center;
  color: var(--ink-soft);
  font-size: 18px;
  max-width: 640px;
  margin: 0 auto 60px;
  line-height: 1.6;
}

/* --- Stages (3-step puzzle) --- */
.stages {
  background: var(--beige-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 20px;
}

.stage-card {
  text-align: center;
}

.stage-puzzle {
  aspect-ratio: 1 / 1.003;
  background: var(--bg-alt);
  box-shadow:
    0 10px 30px rgba(42, 36, 28, 0.15),
    0 0 0 1px rgba(184, 134, 28, 0.15);
  margin-bottom: 20px;
  position: relative;
}

.stage-card figcaption strong {
  display: block;
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 4px;
  font-weight: 600;
}

.stage-card figcaption span {
  display: block;
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* --- Epochs --- */
.epochs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.epoch {
  padding: 32px 28px;
  background: var(--beige-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: all 0.25s;
}

.epoch:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.epoch h3 {
  font-size: 22px;
  font-weight: 500;
  color: var(--gold);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.epoch p {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* --- Features --- */
.features {
  background: var(--beige-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px 44px;
  margin-top: 40px;
}

.feature h3 {
  font-size: 19px;
  color: var(--ink);
  margin-bottom: 10px;
  font-weight: 600;
}

.feature p {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* --- CTA --- */
.cta {
  text-align: center;
  background: var(--ink);
  color: var(--beige-soft);
}

.cta h2 {
  color: var(--beige-soft);
  margin-bottom: 12px;
}

.cta p {
  font-size: 19px;
  color: rgba(244, 236, 221, 0.7);
  margin-bottom: 36px;
}

.cta .btn-primary {
  background: var(--gold);
  color: #fff !important;
  border-color: var(--gold);
}
.cta .btn-primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
}

/* --- Footer --- */
.footer {
  padding: 60px 0 40px;
  background: var(--bg);
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--ink-mute);
  font-size: 14px;
}

.footer-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--ink-soft);
  font-size: 14px;
}
.footer-links a:hover { color: var(--gold); }

.footer-credits {
  max-width: 600px;
  margin: 0 auto 12px;
  font-size: 13px;
  font-style: italic;
  line-height: 1.5;
}

/* --- Sprachwechsler --- */
.lang-switch select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 22px 4px 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink-soft);
  cursor: pointer;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238a7d68'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  transition: border-color 0.2s;
}
.lang-switch select:hover {
  border-color: var(--gold);
}

/* --- Mobile Nav Toggle --- */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 4px 0;
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

/* --- Legal-Page Layout --- */
.page-header {
  padding: 80px 24px 30px;
  background: var(--beige-soft);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.page-header h1 {
  font-family: 'Georgia', serif;
  font-size: 38px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.3px;
}

.page-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.page-content h2 {
  font-family: 'Georgia', serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  margin: 36px 0 14px;
  letter-spacing: -0.1px;
}
.page-content h2:first-child { margin-top: 0; }
.page-content h3 {
  font-family: 'Georgia', serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  margin: 26px 0 10px;
}
.page-content p {
  margin-bottom: 14px;
}
.page-content ul {
  margin: 8px 0 16px 24px;
}
.page-content li {
  margin-bottom: 6px;
}
.page-content a {
  color: var(--gold);
  text-decoration: underline;
}
.page-content a:hover {
  color: var(--gold-light);
}

.legal-notice {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--ink-mute);
  margin-bottom: 28px;
  text-align: center;
}

.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--beige-soft) !important;
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 15px;
  letter-spacing: 0.5px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  text-decoration: none !important;
  border: 1px solid var(--ink);
  transition: all 0.25s;
}
.btn:hover {
  background: var(--gold);
  color: #fff !important;
  border-color: var(--gold);
}

.nav-links a.active {
  color: var(--gold);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-text { text-align: center; }
  .hero-text h1 { font-size: 42px; }
  .hero-lead { font-size: 18px; }
  .stages-grid { grid-template-columns: 1fr; gap: 32px; }
  .epochs-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  section { padding: 70px 0; }
  section h2 { font-size: 32px; }
}

@media (max-width: 560px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(253, 250, 243, 0.98);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  }
  .nav-links.open { display: flex; }
  .hero-text h1 { font-size: 34px; }
  .epochs-grid, .features-grid { grid-template-columns: 1fr; }
  .page-header { padding: 50px 24px 24px; }
  .page-header h1 { font-size: 30px; }
}
