/*
Theme Name: Sophie's Learning Spot – Kosmische Kunstprojekte
Theme URI: https://sophieslearningspot.de/
Author: Sophie
Description: Ruhiges, responsives WordPress-Theme für Sophie's Learning Spot mit getrennten Bereichen für Lernen und kosmische Kunstprojekte.
Version: 1.5.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: sls-kosmische-kunst
*/

:root {
  --offwhite: #faf7f2;
  --white: #ffffff;
  --blue: #5b7c99;
  --blue-dark: #46637c;
  --blue-light: #edf1f5;
  --terra: #c46a4a;
  --terra-dark: #a85838;
  --terra-light: #f6eae4;
  --ink: #33312e;
  --text-soft: #5c574f;
  --line: #e9e2d6;
  --radius: 16px;
  --shadow: 0 12px 34px rgba(51, 49, 46, 0.09);
  --font-title: Georgia, "Times New Roman", serif;
  --font-text: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--offwhite);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.02rem;
  line-height: 1.7;
}

body.admin-bar .site-header { top: 32px; }

@media (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--blue-dark); }

a:hover { color: var(--terra-dark); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  margin-top: 0;
  font-family: var(--font-title);
  font-weight: 500;
  line-height: 1.2;
}

h1 { font-size: clamp(2.35rem, 7vw, 4.25rem); }
h2 { font-size: clamp(1.85rem, 4vw, 2.65rem); }
h3 { font-size: 1.35rem; }

p { margin-top: 0; }

.wrap {
  width: min(1080px, calc(100% - 48px));
  margin-inline: auto;
}

.narrow {
  width: min(760px, calc(100% - 48px));
  margin-inline: auto;
}

.section { padding: 92px 0; scroll-margin-top: 90px; }

.section-white {
  background: var(--white);
  border-block: 1px solid var(--line);
}

.eyebrow {
  display: block;
  margin-bottom: 12px;
  color: var(--terra-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.lead {
  max-width: 660px;
  color: var(--text-soft);
  font-size: 1.08rem;
}

.skip-link {
  position: fixed;
  z-index: 9999;
  top: 12px;
  left: 12px;
  transform: translateY(-160%);
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
}

.skip-link:focus { transform: translateY(0); }

/* Header */
.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  background: rgba(250, 247, 242, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.site-nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  color: var(--ink);
  font-family: var(--font-title);
  font-size: 1.27rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.brand span { color: var(--terra); }

.custom-logo { max-height: 54px; width: auto; }

.menu,
.fallback-menu {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu a,
.fallback-menu a {
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
}

.menu a:hover,
.fallback-menu a:hover,
.current-menu-item > a {
  border-color: var(--terra);
  color: var(--terra-dark);
}

/* Buttons */
.button,
.wp-block-button__link {
  display: inline-block;
  padding: 13px 27px;
  border: 0;
  border-radius: 999px;
  background: var(--terra);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.button:hover,
.wp-block-button__link:hover {
  transform: translateY(-2px);
  background: var(--terra-dark);
  box-shadow: 0 8px 22px rgba(196, 106, 74, 0.24);
  color: #fff;
}

.button-secondary {
  background: transparent;
  border: 2px solid var(--blue);
  color: var(--blue-dark);
}

.button-secondary:hover { background: var(--blue); }

.button-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Front page hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 112px 0 105px;
  text-align: center;
}

.hero::before,
.hero::after {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  content: "";
}

.hero::before {
  width: 420px;
  height: 420px;
  top: -180px;
  left: -160px;
  background: var(--blue-light);
}

.hero::after {
  width: 320px;
  height: 320px;
  right: -100px;
  bottom: -140px;
  background: var(--terra-light);
}

.hero-badge {
  display: inline-block;
  margin-bottom: 25px;
  padding: 7px 18px;
  border-radius: 999px;
  background: var(--blue-light);
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 860px;
  margin: 0 auto 23px;
  letter-spacing: -0.025em;
}

.hero h1 em { color: var(--blue); font-weight: 400; }

.hero p {
  max-width: 660px;
  margin: 0 auto 36px;
  color: var(--text-soft);
  font-size: 1.13rem;
}

.hero .button-row { justify-content: center; }

/* Blog cards */
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 38px;
}

.section-heading h2 { margin-bottom: 12px; }

.text-link { font-weight: 800; text-decoration-thickness: 2px; text-underline-offset: 4px; }

.post-grid,
.product-grid,
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 25px;
}

.post-card,
.product-card,
.value-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.post-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.post-card-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--blue-light), var(--terra-light));
}

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

.post-card-placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--blue);
  font-family: var(--font-title);
  font-size: 2.7rem;
}

.post-card-content { display: flex; flex: 1; flex-direction: column; padding: 25px; }
.post-card-content h3 { margin-bottom: 10px; }
.post-card-content h3 a { color: var(--ink); text-decoration: none; }
.post-card-content h3 a:hover { color: var(--terra-dark); }
.post-card-content p { color: var(--text-soft); font-size: 0.95rem; }
.post-card-content .text-link { margin-top: auto; }

.post-meta {
  margin-bottom: 11px;
  color: var(--terra-dark);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.empty-blog {
  grid-column: 1 / -1;
  padding: 44px;
  border: 1px dashed var(--blue);
  border-radius: var(--radius);
  background: var(--blue-light);
  text-align: center;
}

/* Products and values */
.product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.product-card {
  display: flex;
  flex-direction: column;
  padding: 30px;
  background: var(--offwhite);
}

.product-card:nth-child(even) { background: var(--terra-light); }
.product-card h3 { margin-bottom: 8px; }
.product-card p { color: var(--text-soft); }
.product-card .text-link { margin-top: auto; }

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
  margin-top: auto;
}

.product-actions .text-link { margin-top: 0; }

.section-note {
  margin: 28px 0 0;
  color: var(--text-soft);
  text-align: center;
}

.tag {
  align-self: flex-start;
  margin-bottom: 15px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--blue-light);
  color: var(--blue-dark);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tag-soon { background: rgba(255,255,255,.7); color: var(--terra-dark); }

.value-card { padding: 30px; }
.value-card h3 { margin-bottom: 10px; }
.value-card p { margin-bottom: 0; color: var(--text-soft); font-size: 0.95rem; }
.value-number { display: block; margin-bottom: 15px; color: var(--terra); font-family: var(--font-title); font-size: 2rem; }

/* About and CTA */
.about-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  align-items: center;
  gap: 54px;
}

.portrait-placeholder,
.about-photo {
  width: 240px;
  height: 240px;
  border: 6px solid var(--offwhite);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.portrait-placeholder {
  display: grid;
  place-items: center;
  background: var(--blue-light);
  color: var(--blue);
  font-family: var(--font-title);
  font-size: 4.5rem;
}

.cta-panel {
  padding: 58px 48px;
  border-radius: 24px;
  background: var(--blue);
  color: #fff;
  text-align: center;
}

.cta-panel h2 { margin-bottom: 16px; }
.cta-panel p { max-width: 650px; margin: 0 auto 27px; color: #eef3f7; }
.cta-panel .button { background: #fff; color: var(--blue-dark); }
.cta-panel .button:hover { background: var(--offwhite); }

.social-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 13px; }

.social-link {
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.social-link:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* Blog archive and articles */
.page-hero {
  padding: 78px 0 62px;
  background: linear-gradient(135deg, var(--blue-light), var(--offwhite) 60%, var(--terra-light));
  text-align: center;
}

.page-hero h1 { margin-bottom: 18px; }
.page-hero p { max-width: 690px; margin: 0 auto; color: var(--text-soft); font-size: 1.1rem; }

.article-shell { padding: 72px 0 96px; }

.article-header { margin-bottom: 38px; text-align: center; }
.article-header h1 { margin-bottom: 18px; font-size: clamp(2.2rem, 6vw, 3.7rem); }
.article-header .post-meta { margin-bottom: 16px; }

.article-featured {
  overflow: hidden;
  width: min(980px, calc(100% - 48px));
  margin: 0 auto 46px;
  border-radius: 22px;
}

.article-content { font-size: 1.05rem; }
.article-content > * { max-width: 760px; margin-right: auto; margin-left: auto; }
.article-content > .alignwide { max-width: 1080px; }
.article-content > .alignfull { max-width: none; }
.article-content h2 { margin-top: 2.2em; }
.article-content h3 { margin-top: 1.8em; }
.article-content ul,
.article-content ol { padding-left: 1.35em; }
.article-content img { border-radius: 14px; }
.article-content blockquote {
  padding: 6px 0 6px 24px;
  border-left: 4px solid var(--terra);
  color: var(--text-soft);
  font-family: var(--font-title);
  font-size: 1.2rem;
}

.affiliate-note {
  max-width: 760px;
  margin: 0 auto 32px;
  padding: 18px 20px;
  border: 1px solid #e7d4c8;
  border-radius: 12px;
  background: var(--terra-light);
  color: #654335;
  font-size: 0.9rem;
}

.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 62px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.post-navigation a { font-weight: 800; }
.post-navigation .nav-next { text-align: right; }

.pagination { margin-top: 42px; text-align: center; }
.pagination .page-numbers { margin: 0 4px; padding: 8px 12px; border-radius: 8px; background: #fff; text-decoration: none; }
.pagination .current { background: var(--blue); color: #fff; }

/* Footer */
.site-footer {
  padding: 42px 0;
  border-top: 1px solid var(--line);
  color: #7d776f;
  font-size: 0.9rem;
  text-align: center;
}

.footer-links { display: flex; justify-content: center; gap: 22px; margin-top: 8px; }
.footer-links a { color: #6f6961; }

.footer-widget-area {
  max-width: 860px;
  margin: 0 auto 22px;
}

.footer-widget-area .widget { margin: 0; }
.footer-widget-area .widget-title { margin-bottom: 8px; font-size: 1rem; }

/* WordPress defaults */
.screen-reader-text {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  white-space: nowrap;
}

.alignleft { float: left; margin: 0 24px 18px 0; }
.alignright { float: right; margin: 0 0 18px 24px; }
.aligncenter { margin-right: auto; margin-left: auto; }

@media (max-width: 850px) {
  .site-nav { flex-direction: column; padding: 15px 0; }
  .menu, .fallback-menu { flex-wrap: wrap; justify-content: center; gap: 8px 18px; }
  .post-grid, .product-grid, .value-grid { grid-template-columns: 1fr 1fr; }
  .section-heading { align-items: start; flex-direction: column; }
}

@media (max-width: 640px) {
  .wrap, .narrow, .article-featured { width: min(100% - 32px, 1080px); }
  .section { padding: 65px 0; }
  .hero { padding: 76px 0 70px; }
  .button-row { flex-direction: column; align-items: stretch; }
  .button-row .button { text-align: center; }
  .post-grid, .product-grid, .value-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 34px; text-align: center; }
  .portrait-placeholder, .about-photo { width: 190px; height: 190px; margin-inline: auto; }
  .cta-panel { padding: 42px 24px; }
  .post-navigation { grid-template-columns: 1fr; }
  .post-navigation .nav-next { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
