/*
Theme Name: Der Kleine Kanzler
Theme URI: https://der-kleine-kanzler.de
Author: Der Kleine Kanzler
Description: Ein modernes, kitschiges WordPress-Theme mit goldenen Ornamenten, funkelnden Partikeln und romantischem Flair.
Version: 1.1
License: GNU General Public License v2 or later
Text Domain: der-kleine-kanzler
*/

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

:root {
  --bg: #fdf6ee;
  --rose: #c9606a;
  --gold: #d4a853;
  --gold2: #e8c97a;
  --ink: #2a1f1a;
  --muted: #7a6a62;
  --cream: #f5ede0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Cormorant Garamond', serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── SPARKLE CANVAS ── */
#sparkles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* ── DECORATIVE BORDER FRAME ── */
.page-frame {
  position: fixed;
  inset: 12px;
  pointer-events: none;
  z-index: 50;
  border: 1px solid rgba(212,168,83,0.35);
}
.page-frame::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(212,168,83,0.15);
}

.corner {
  position: absolute;
  width: 52px;
  height: 52px;
  color: var(--gold);
  font-size: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.corner.tl { top: -6px; left: -6px; }
.corner.tr { top: -6px; right: -6px; }
.corner.bl { bottom: -6px; left: -6px; }
.corner.br { bottom: -6px; right: -6px; }

/* ── HEADER ── */
.site-header {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 3.5rem 2rem 2rem;
  border-bottom: 1px solid rgba(212,168,83,0.3);
}

.header-welcome {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
  opacity: 0;
  animation: fadeDown 0.8s ease 0.2s forwards;
}

.site-title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1;
  text-decoration: none;
  display: block;
  opacity: 0;
  animation: fadeDown 0.9s ease 0.4s forwards;
}

.title-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1rem auto;
  opacity: 0;
  animation: fadeDown 0.8s ease 0.6s forwards;
}
.title-divider::before,
.title-divider::after {
  content: '';
  height: 1px;
  width: 100px;
  background: linear-gradient(to right, transparent, var(--gold));
}
.title-divider::after {
  background: linear-gradient(to left, transparent, var(--gold));
}
.divider-gem { color: var(--gold); font-size: 2rem; }

/* ── MAIN CONTENT ── */
.site-main {
  position: relative;
  z-index: 10;
  max-width: 680px;
  margin: 0 auto;
  padding: 5rem 2rem 6rem;
  text-align: center;
}

/* ── POST / PAGE CONTENT ── */
.entry-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 3.5rem;
  opacity: 0;
  animation: fadeUp 1s ease 0.7s forwards;
  position: relative;
}

.entry-title::after {
  content: '✦';
  display: block;
  font-size: 1.4rem;
  color: var(--gold);
  margin-top: 1.5rem;
  font-style: normal;
}

.message-wrap {
  position: relative;
  opacity: 0;
  animation: fadeUp 1s ease 1s forwards;
}

.message-box {
  background: linear-gradient(135deg, rgba(255,255,255,0.7) 0%, rgba(245,237,224,0.9) 100%);
  border: 1px solid rgba(212,168,83,0.4);
  border-radius: 2px;
  padding: 3rem 3.5rem;
  position: relative;
  backdrop-filter: blur(4px);
  box-shadow:
    0 2px 40px rgba(201,96,106,0.06),
    0 0 0 4px rgba(212,168,83,0.06),
    inset 0 1px 0 rgba(255,255,255,0.8);
}

.message-box::before,
.message-box::after {
  content: '❧';
  position: absolute;
  font-size: 3rem;
  color: var(--rose);
  opacity: 0.4;
}
.message-box::before { top: 0.8rem; left: 1.2rem; }
.message-box::after  { bottom: 0.8rem; right: 1.2rem; transform: rotate(180deg); }

.entry-content {
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 2;
  font-weight: 300;
  color: var(--ink);
}

.entry-content p { margin-bottom: 1.2em; }
.entry-content p:last-child { margin-bottom: 0; }

.entry-content strong { font-weight: 600; font-style: italic; color: var(--rose); }
.entry-content a { color: var(--gold); font-weight: 600; text-decoration: none; }
.entry-content a:hover { color: var(--rose); }

.ornament {
  position: absolute;
  opacity: 0.18;
  pointer-events: none;
  font-size: 8rem;
  color: var(--gold);
  line-height: 1;
  animation: float 6s ease-in-out infinite;
}
.ornament.left  { left: -4rem; top: 50%; transform: translateY(-50%); animation-delay: 0s; }
.ornament.right { right: -4rem; top: 50%; transform: translateY(-50%); animation-delay: -3s; }

/* ── FOOTER ── */
.site-footer {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 1.5rem 2rem 3rem;
  border-top: 1px solid rgba(212,168,83,0.2);
}

.footer-link {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.3s, color 0.3s;
}
.footer-link:hover { opacity: 1; color: var(--gold); }

/* ── BG BLOBS ── */
.blob {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
  opacity: 0.18;
}
.blob-1 { width: 600px; height: 600px; background: radial-gradient(circle, #e8c97a, transparent); top: -120px; left: -180px; animation: blobMove 12s ease-in-out infinite alternate; }
.blob-2 { width: 500px; height: 500px; background: radial-gradient(circle, #c9606a, transparent); bottom: -100px; right: -120px; animation: blobMove 15s ease-in-out infinite alternate-reverse; }
.blob-3 { width: 400px; height: 400px; background: radial-gradient(circle, #d4a853, transparent); top: 50%; left: 50%; transform: translate(-50%,-50%); animation: blobMove 10s ease-in-out infinite alternate; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(-50%) rotate(-5deg); }
  50%       { transform: translateY(calc(-50% - 14px)) rotate(5deg); }
}
@keyframes blobMove {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.15) translate(30px, 20px); }
}

/* ── NAVIGATION ── */
.site-nav { margin-top: 1.8rem; }

.nav-list {
  list-style: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.nav-item { position: relative; }

.nav-item + .nav-item::before {
  content: '✦';
  color: rgba(212,168,83,0.35);
  font-size: 0.6rem;
  padding: 0 0.4rem;
  pointer-events: none;
  vertical-align: middle;
  display: inline-block;
  position: relative;
  top: -0.5rem;
}

.nav-item a {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 1.2rem;
  text-decoration: none;
  color: var(--ink);
  position: relative;
}

/* symbol – always visible, small; grows + glows on hover/active */
.nav-symbol {
  font-size: 1.4rem;
  display: block;
  line-height: 1;
  transition:
    font-size 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    filter 0.3s ease,
    transform 0.3s ease;
  filter: grayscale(0.5) opacity(0.5);
  transform: scale(0.85);
}

.nav-item a:hover .nav-symbol {
  font-size: 2rem;
  filter: grayscale(0) opacity(1) drop-shadow(0 0 6px rgba(212,168,83,0.6));
  transform: scale(1);
}

/* active page: symbol always big + glowing */
.nav-item.current-menu-item .nav-symbol,
.nav-item.current_page_item .nav-symbol {
  font-size: 2rem;
  filter: grayscale(0) opacity(1) drop-shadow(0 0 8px rgba(212,168,83,0.7));
  transform: scale(1);
}

/* label */
.nav-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  position: relative;
  transition: color 0.25s ease;
}

/* underline from center */
.nav-label::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-item a:hover .nav-label { color: var(--gold); }
.nav-item a:hover .nav-label::after { transform: translateX(-50%) scaleX(1); }

/* active page label: gold + underline always visible */
.nav-item.current-menu-item .nav-label,
.nav-item.current_page_item .nav-label {
  color: var(--gold);
  font-weight: 500;
}
.nav-item.current-menu-item .nav-label::after,
.nav-item.current_page_item .nav-label::after {
  transform: translateX(-50%) scaleX(1);
}

/* active dot indicator below label */
.nav-item.current-menu-item a::after,
.nav-item.current_page_item a::after {
  content: '·';
  position: absolute;
  bottom: -0.6rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold);
  font-size: 1.4rem;
  line-height: 1;
}

/* Impressum */
.nav-item--impressum .nav-label { opacity: 0.5; font-size: 0.65rem; }
.nav-item--impressum a:hover .nav-label { opacity: 1; }

/* ── UNDER CONSTRUCTION – shared styles ── */
.uc-wrap {
  position: relative;
  z-index: 10;
  max-width: 780px;
  margin: 0 auto;
  padding: 5rem 2rem 6rem;
  text-align: center;
}

.uc-badge {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--rose);
  border: 1px solid rgba(201,96,106,0.3);
  padding: 0.4rem 1.2rem;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeDown 0.7s ease 0.3s forwards;
}

.uc-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 1.2rem;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.5s forwards;
}

.uc-title::after {
  content: '✦';
  display: block;
  font-size: 1.4rem;
  color: var(--gold);
  margin-top: 1.2rem;
  font-style: normal;
}

.uc-sub {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4rem;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.7s forwards;
}

/* ── WISSENSWERTES – hourglass animation ── */
.hourglass-wrap {
  opacity: 0;
  animation: fadeUp 1s ease 0.9s forwards;
  margin-bottom: 3rem;
}

.hourglass {
  width: 80px;
  height: 110px;
  margin: 0 auto 2rem;
  position: relative;
}

.hourglass svg { width: 100%; height: 100%; }

.sand-top {
  animation: drainSand 3s ease-in-out infinite alternate;
  transform-origin: center top;
}
.sand-bottom {
  animation: fillSand 3s ease-in-out infinite alternate;
  transform-origin: center bottom;
}
.hg-body { animation: flipHourglass 6s ease-in-out infinite; transform-origin: center center; }

@keyframes drainSand {
  from { transform: scaleY(1); }
  to   { transform: scaleY(0.05); }
}
@keyframes fillSand {
  from { transform: scaleY(0.05); }
  to   { transform: scaleY(1); }
}
@keyframes flipHourglass {
  0%, 45%   { transform: rotate(0deg); }
  50%, 95%  { transform: rotate(180deg); }
  100%      { transform: rotate(180deg); }
}

.scroll-lines {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 320px;
  margin: 0 auto;
}
.scroll-line {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  opacity: 0;
  animation: lineReveal 0.6s ease forwards;
}
.scroll-line:nth-child(1) { animation-delay: 1.1s; width: 100%; }
.scroll-line:nth-child(2) { animation-delay: 1.3s; width: 75%; margin: 0 auto; }
.scroll-line:nth-child(3) { animation-delay: 1.5s; width: 50%; margin: 0 auto; }
.scroll-line:nth-child(4) { animation-delay: 1.7s; width: 30%; margin: 0 auto; }

@keyframes lineReveal {
  from { opacity: 0; transform: scaleX(0); }
  to   { opacity: 1; transform: scaleX(1); }
}

/* ── PLATZHALTER 1 – rotating petals ── */
.petals-wrap {
  opacity: 0;
  animation: fadeUp 1s ease 0.9s forwards;
  margin-bottom: 3rem;
  position: relative;
  height: 220px;
}

.petal-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 180px;
  height: 180px;
  animation: rotateSlow 20s linear infinite;
}

.petal-ring-2 {
  width: 120px;
  height: 120px;
  animation: rotateSlow 14s linear infinite reverse;
}

.petal {
  position: absolute;
  font-size: 1.6rem;
  transform-origin: 90px 90px;
}
.petal-ring-2 .petal { transform-origin: 60px 60px; }

@keyframes rotateSlow {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

.center-gem {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
  50%       { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

/* ── PLATZHALTER 2 – mirror ink drops ── */
.inkdrops-wrap {
  opacity: 0;
  animation: fadeUp 1s ease 0.9s forwards;
  margin-bottom: 3rem;
  position: relative;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
}

.inkdrop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.drop {
  width: 16px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: linear-gradient(to bottom, var(--gold2), var(--gold));
  box-shadow: 0 2px 12px rgba(212,168,83,0.4);
  animation: dropFall 2.4s ease-in-out infinite;
}

.drop-mirror {
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  background: linear-gradient(to top, rgba(212,168,83,0.3), rgba(212,168,83,0.08));
  animation: dropFall 2.4s ease-in-out infinite;
  margin-top: 3px;
}

.inkdrop:nth-child(1) .drop { height: 28px; animation-delay: 0s; }
.inkdrop:nth-child(2) .drop { height: 42px; animation-delay: 0.3s; }
.inkdrop:nth-child(3) .drop { height: 60px; animation-delay: 0.6s; }
.inkdrop:nth-child(4) .drop { height: 42px; animation-delay: 0.9s; }
.inkdrop:nth-child(5) .drop { height: 28px; animation-delay: 1.2s; }
.inkdrop:nth-child(1) .drop-mirror { height: 14px; animation-delay: 0s; }
.inkdrop:nth-child(2) .drop-mirror { height: 20px; animation-delay: 0.3s; }
.inkdrop:nth-child(3) .drop-mirror { height: 28px; animation-delay: 0.6s; }
.inkdrop:nth-child(4) .drop-mirror { height: 20px; animation-delay: 0.9s; }
.inkdrop:nth-child(5) .drop-mirror { height: 14px; animation-delay: 1.2s; }

@keyframes dropFall {
  0%, 100% { transform: scaleY(1); opacity: 0.85; }
  50%       { transform: scaleY(0.88); opacity: 1; }
}

/* ── IMPRESSUM – wax seal ── */
.seal-wrap {
  opacity: 0;
  animation: fadeUp 1s ease 0.9s forwards;
  margin-bottom: 3rem;
}

.wax-seal {
  width: 140px;
  height: 140px;
  margin: 0 auto;
  position: relative;
  animation: sealWobble 4s ease-in-out infinite;
}

@keyframes sealWobble {
  0%, 100% { transform: rotate(-2deg); }
  50%       { transform: rotate(2deg); }
}

.wax-seal svg { width: 100%; height: 100%; }

.seal-letter {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 3.5rem;
  font-weight: 600;
  color: rgba(212,168,83,0.9);
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* ── MOBILE ── */
@media (max-width: 600px) {
  .page-frame { inset: 6px; }
  .message-box { padding: 2rem 1.5rem; }
  .ornament { display: none; }
  .nav-list { gap: 0; }
  .nav-item a { padding: 0.4rem 0.7rem; }
  .nav-label { font-size: 0.62rem; letter-spacing: 0.12em; }
  .nav-symbol { font-size: 1.1rem; }
  .nav-item a:hover .nav-symbol,
  .nav-item.current-menu-item .nav-symbol,
  .nav-item.current_page_item .nav-symbol { font-size: 1.5rem; }
}
