/*
Theme Name: Lottis Winter
Theme URI: https://lottis-stories.de
Author: Lotti & Papa
Description: Ein verspieltes Winter-Theme für Lottis Wintergeschichten. Schneeflocken, runde Formen, große gut lesbare Schrift. Keine externen Schriften (DSGVO-freundlich).
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: lottis-winter
*/

:root {
  --sky: #e8f4ff;
  --sky-deep: #bfe0ff;
  --ice: #ffffff;
  --blue: #2f6fb5;
  --blue-dark: #1d4a80;
  --berry: #d6336c;
  --gold: #ffc94d;
  --ink: #26384d;
  --radius: 22px;
  --shadow: 0 6px 0 rgba(47, 111, 181, .15);
  --font: "Chalkboard SE", "Comic Neue", "Comic Sans MS", "Trebuchet MS", system-ui, sans-serif;
  --font-read: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-read);
  font-size: 1.2rem;
  line-height: 1.75;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 0%, #fff 0, transparent 40%),
    linear-gradient(180deg, var(--sky-deep) 0, var(--sky) 380px, #f7fbff 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; border-radius: 16px; }

a { color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover, a:focus { color: var(--berry); }

h1, h2, h3, h4 { font-family: var(--font); color: var(--blue-dark); line-height: 1.25; }

.screen-reader-text {
  position: absolute !important; clip: rect(1px,1px,1px,1px);
  width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  clip: auto; width: auto; height: auto; background: #fff; padding: .6rem 1rem;
  z-index: 100; top: 6px; left: 6px; border-radius: 12px;
}

/* ---------- Header ---------- */
.site-header {
  text-align: center;
  padding: 2.2rem 1rem 1rem;
  position: relative;
}
.site-title {
  font-family: var(--font);
  font-size: clamp(2.2rem, 7vw, 4rem);
  margin: 0;
  letter-spacing: .02em;
}
.site-title a { color: var(--blue-dark); text-decoration: none; text-shadow: 3px 3px 0 #fff; }
.site-title a::before { content: "❄ "; color: var(--blue); }
.site-title a::after { content: " ❄"; color: var(--blue); }
.site-description { font-family: var(--font); margin: .3rem 0 0; color: var(--blue); font-size: 1.15rem; }

.main-nav { margin-top: 1.2rem; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }
.main-nav a {
  display: inline-block; font-family: var(--font); font-size: 1.05rem;
  background: var(--ice); color: var(--blue-dark); text-decoration: none;
  padding: .45rem 1.1rem; border-radius: 999px; box-shadow: var(--shadow);
  border: 2px solid var(--sky-deep);
}
.main-nav a:hover, .main-nav .current-menu-item > a { background: var(--gold); border-color: var(--gold); color: var(--ink); }

/* ---------- Layout ---------- */
.site-main { max-width: 820px; margin: 1.5rem auto 3rem; padding: 0 1rem; }

.card {
  background: var(--ice);
  border-radius: var(--radius);
  padding: clamp(1.2rem, 4vw, 2.2rem);
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  border: 3px solid #fff;
  outline: 3px dashed var(--sky-deep);
  outline-offset: -12px;
}
.card .entry-title { margin-top: 0; font-size: clamp(1.6rem, 4.5vw, 2.3rem); }
.card .entry-title a { text-decoration: none; color: var(--blue-dark); }
.card .entry-title a:hover { color: var(--berry); }

.entry-meta { font-family: var(--font); font-size: .95rem; color: #5b7794; margin-bottom: 1rem; }
.entry-meta a { color: inherit; }

.post-thumb img { width: 100%; display: block; margin-bottom: 1rem; }

.more-link, .button, input[type=submit], .wp-block-button__link {
  display: inline-block; font-family: var(--font); font-size: 1.05rem; cursor: pointer;
  background: var(--berry); color: #fff !important; text-decoration: none;
  padding: .55rem 1.4rem; border-radius: 999px; border: 0;
  box-shadow: 0 5px 0 #a3204f;
}
.more-link:hover, input[type=submit]:hover { background: #e8467c; transform: translateY(1px); }

.entry-content p:first-of-type::first-letter {
  font-family: var(--font); font-size: 3em; float: left; line-height: .9;
  padding: .1em .12em 0 0; color: var(--berry);
}
.entry-content blockquote {
  margin: 1.5rem 0; padding: 1rem 1.4rem; background: var(--sky);
  border-left: 8px solid var(--gold); border-radius: 0 16px 16px 0; font-style: italic;
}
.tags-links a, .cat-links a {
  display: inline-block; background: var(--sky); border-radius: 999px;
  padding: .1rem .8rem; margin: 0 .3rem .3rem 0; text-decoration: none; font-family: var(--font); font-size: .9rem;
}

.pagination, .post-navigation .nav-links { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 1rem 0 2rem; font-family: var(--font); }
.page-numbers { display: inline-block; padding: .3rem .9rem; background: #fff; border-radius: 999px; text-decoration: none; margin-right: .3rem; }
.page-numbers.current { background: var(--gold); }

/* ---------- Kommentare ---------- */
.comments-area { margin-top: 2rem; }
.comment-list { list-style: none; padding: 0; }
.comment-body { background: var(--sky); border-radius: 16px; padding: 1rem 1.2rem; margin-bottom: 1rem; }
.comment-list .children { list-style: none; padding-left: 1.2rem; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea,
.search-field {
  width: 100%; font: inherit; padding: .6rem .9rem; border-radius: 14px; border: 2px solid var(--sky-deep); background: #fff;
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center; padding: 2.5rem 1rem 3rem; font-family: var(--font); color: var(--blue-dark);
  background: linear-gradient(180deg, transparent, #fff 60%);
}
.site-footer a { color: var(--blue-dark); }
.footer-links { margin-top: .6rem; font-size: .95rem; }
.footer-links ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; }
.footer-links a { display: inline-block; padding: .5rem .3rem; }  /* Touch-Ziel */

.to-top {
  position: fixed; right: 1rem; bottom: 1rem; width: 52px; height: 52px; border-radius: 50%;
  background: var(--gold); color: var(--ink); display: grid; place-items: center; text-decoration: none;
  font-size: 1.5rem; box-shadow: var(--shadow); z-index: 20;
}

/* ---------- Schnee ---------- */
.snow { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 10; }
.snow i {
  position: absolute; top: -10vh; color: #fff; font-style: normal;
  text-shadow: 0 0 6px rgba(47,111,181,.35);
  animation: fall linear infinite;
}
@keyframes fall {
  to { transform: translate3d(var(--drift, 30px), 110vh, 0) rotate(360deg); }
}
.snow i:nth-child(1)  { left: 5%;  font-size: 18px; animation-duration: 14s; animation-delay: -2s; }
.snow i:nth-child(2)  { left: 15%; font-size: 26px; animation-duration: 18s; animation-delay: -8s; --drift: -40px; }
.snow i:nth-child(3)  { left: 25%; font-size: 14px; animation-duration: 12s; animation-delay: -5s; }
.snow i:nth-child(4)  { left: 35%; font-size: 22px; animation-duration: 16s; animation-delay: -11s; --drift: 50px; }
.snow i:nth-child(5)  { left: 45%; font-size: 16px; animation-duration: 13s; animation-delay: -1s; }
.snow i:nth-child(6)  { left: 55%; font-size: 28px; animation-duration: 20s; animation-delay: -14s; --drift: -30px; }
.snow i:nth-child(7)  { left: 65%; font-size: 15px; animation-duration: 15s; animation-delay: -6s; }
.snow i:nth-child(8)  { left: 75%; font-size: 24px; animation-duration: 17s; animation-delay: -9s; --drift: 40px; }
.snow i:nth-child(9)  { left: 85%; font-size: 17px; animation-duration: 13s; animation-delay: -3s; --drift: -50px; }
.snow i:nth-child(10) { left: 95%; font-size: 21px; animation-duration: 19s; animation-delay: -12s; }

@media (prefers-reduced-motion: reduce) {
  .snow { display: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive: Desktop (Basis) / Tablet / Mobil ---------- */
body { overflow-x: hidden; }
.entry-content { overflow-wrap: anywhere; }
.entry-content iframe, .entry-content video, .entry-content table { max-width: 100%; }
.entry-content table { display: block; overflow-x: auto; }

/* Große Desktops */
@media (min-width: 1200px) {
  .site-main { max-width: 900px; }
  body { font-size: 1.25rem; }
}

/* Tablet (Hoch- und Querformat) */
@media (max-width: 1024px) {
  .site-main { max-width: 760px; }
  .snow i:nth-child(n+8) { display: none; }
}
@media (max-width: 782px) {
  body { font-size: 1.15rem; line-height: 1.7; }
  .site-header { padding-top: 1.6rem; }
  .card { outline-offset: -9px; }
  .alignleft, .alignright { float: none; display: block; margin: 0 auto 1rem; }
}

/* Mobil */
@media (max-width: 600px) {
  body { font-size: 1.05rem; background-attachment: scroll; }
  .site-main { margin-top: 1rem; padding: 0 .75rem; }
  .site-title a::before, .site-title a::after { content: ""; }
  .site-description { font-size: 1rem; }
  .main-nav ul { gap: .4rem; }
  .main-nav a { padding: .6rem 1rem; font-size: 1rem; }      /* >= 44px Touch-Ziel */
  .card { border-radius: 18px; margin-bottom: 1.4rem; outline-offset: -7px; }
  .entry-content p:first-of-type::first-letter { font-size: 2.4em; }
  .more-link, .button, input[type=submit] { display: block; text-align: center; padding: .75rem 1rem; }
  .post-navigation .nav-links { flex-direction: column; }
  .comment-list .children { padding-left: .6rem; }
  .snow i:nth-child(n+6) { display: none; }                  /* weniger Flocken = flüssiger */
  .to-top { width: 48px; height: 48px; right: .6rem; bottom: .6rem; }
}

/* Sehr kleine Geräte */
@media (max-width: 360px) {
  .site-title { font-size: 1.9rem; }
  body { font-size: 1rem; }
}

/* ---------- Burger-Menü (Mobil + Tablet-Hochformat) ---------- */
.menu-toggle { display: none; }

@media (max-width: 782px) {
  .menu-toggle {
    display: inline-flex; align-items: center; gap: .6rem; margin-top: 1rem;
    font-family: var(--font); font-size: 1.1rem; color: var(--blue-dark);
    background: var(--ice); border: 2px solid var(--sky-deep); border-radius: 999px;
    padding: .6rem 1.2rem; min-height: 48px; cursor: pointer; box-shadow: var(--shadow);
  }
  .menu-toggle:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
  .burger { display: inline-flex; flex-direction: column; gap: 5px; }
  .burger span { display: block; width: 24px; height: 3px; border-radius: 3px; background: var(--blue-dark); transition: transform .25s, opacity .2s; }
  .menu-open .burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .menu-open .burger span:nth-child(2) { opacity: 0; }
  .menu-open .burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .main-nav { display: none; margin-top: .8rem; }
  .menu-open .main-nav { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; max-width: 360px; margin: 0 auto; }
  .main-nav a { display: block; text-align: center; padding: .8rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .burger span { transition: none; }
}

/* Touch: kein Hover-Zwang */
@media (hover: none) {
  .more-link:hover, input[type=submit]:hover { transform: none; }
}

/* WordPress-Standardklassen */
.alignleft { float: left; margin: 0 1rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1rem; }
.aligncenter { display: block; margin: 0 auto 1rem; }
.wp-caption-text, figcaption { font-family: var(--font); font-size: .9rem; color: #5b7794; text-align: center; }
