/*
Theme Name: Rente Onepage Fokus
Theme URI: https://example.com/rente-onepage-fokus
Author: Codex
Author URI: https://example.com
Description: Sachliches Onepage-Theme fuer Inhalte zur privaten Altersvorsorge und zum Altersvorsorgedepot.
Version: 1.2.6
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: rente-onepage-fokus
*/

:root {
  --content-width: 960px;
  --text-measure: 70ch;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #e8eef4;
  --text: #1e2833;
  --text-soft: #526173;
  --primary: #113557;
  --primary-strong: #0b2740;
  --accent: #b07d2c;
  --border: #c4d2df;
  --radius: 14px;
  --shadow: 0 16px 36px rgba(17, 53, 87, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Source Sans 3", "Segoe UI", Tahoma, sans-serif;
  background: linear-gradient(180deg, #f4f8fc 0%, #e9f0f7 100%);
  color: var(--text);
  line-height: 1.65;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--primary-strong);
}

.site-wrap {
  width: min(var(--content-width), calc(100% - 2.2rem));
  margin: 0 auto;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 7rem 0 5rem;
  background: linear-gradient(145deg, #f7fbff 0%, #e1ebf5 64%, #d0dfed 100%);
  border-bottom: 1px solid var(--border);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 120px;
  background: linear-gradient(180deg, rgba(234, 240, 245, 0), rgba(234, 240, 245, 0.9));
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.2fr 0.8fr;
}

.hero h1 {
  margin: 0;
  font-family: "Merriweather", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
  max-width: 18ch;
}

.hero-lead {
  margin-top: 1.2rem;
  max-width: 60ch;
  font-size: 1.1rem;
  color: var(--text-soft);
}

.hero-meta {
  margin: 0.9rem 0 0;
  font-size: 0.9rem;
  color: rgba(17, 53, 87, 0.82);
  letter-spacing: 0.01em;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(17, 53, 87, 0.26);
  background: rgba(255, 255, 255, 0.88);
  color: var(--primary-strong);
  font-size: 0.93rem;
  font-weight: 600;
}

.editorial-card {
  align-self: start;
  background: linear-gradient(160deg, rgba(17, 53, 87, 0.96) 0%, rgba(11, 39, 64, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.3rem;
  color: #fff;
}

.editorial-kicker {
  margin: 0;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(255, 255, 255, 0.8);
}

.editorial-quote {
  margin: 0.7rem 0 0;
  font-family: "Merriweather", Georgia, serif;
  line-height: 1.6;
  font-size: 1.05rem;
  color: #fff;
}

.editorial-copy {
  margin: 0.8rem 0 0;
  color: rgba(255, 255, 255, 0.88);
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: rgba(226, 237, 247, 0.92);
  backdrop-filter: blur(8px);
}

.reading-progress {
  position: sticky;
  top: 64px;
  z-index: 39;
  height: 4px;
  background: rgba(17, 53, 87, 0.12);
}

.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #113557, #2a5f8d);
  transition: width 0.12s linear;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 64px;
  gap: 1rem;
}

.brand {
  font-family: "Merriweather", Georgia, serif;
  color: var(--primary-strong);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.anchor-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.anchor-nav a {
  display: inline-block;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  border: 1px solid transparent;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.anchor-nav a.is-active,
.anchor-nav a:hover,
.anchor-nav a:focus-visible {
  color: #fff;
  border-color: rgba(17, 53, 87, 0.35);
  background: var(--primary);
}

.section-layout {
  display: block;
}

.section-main {
  min-width: 0;
}

.toc-inline {
  position: fixed;
  top: 22px;
  right: max(0.8rem, calc((100vw - var(--content-width)) / 2 - 238px));
  width: 220px;
  z-index: 5;
  padding: 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(17, 53, 87, 0.2);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 26px rgba(17, 53, 87, 0.12);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

body.toc-started .toc-inline {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toc-title {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-strong);
}

#toc-nav {
  margin-top: 0.5rem;
  display: grid;
  gap: 0.25rem;
}

#toc-nav a {
  display: block;
  padding: 0.36rem 0.45rem;
  border-radius: 8px;
  border: 1px solid transparent;
  color: var(--text-soft);
  font-size: 0.86rem;
}

#toc-nav a.is-active,
#toc-nav a:hover,
#toc-nav a:focus-visible {
  color: #fff;
  background: var(--primary);
  border-color: rgba(17, 53, 87, 0.35);
}

.section {
  padding: 4.6rem 0;
  position: relative;
}

.section-alt {
  background:
    linear-gradient(90deg, rgba(17, 53, 87, 0.06), rgba(17, 53, 87, 0) 18%),
    linear-gradient(180deg, rgba(225, 235, 244, 0.72), rgba(234, 240, 245, 0.4));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section h2::after {
  content: "";
  display: block;
  width: 68px;
  height: 3px;
  margin-top: 0.65rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), rgba(17, 53, 87, 0.22));
}

.section h2 {
  margin: 0;
  font-family: "Merriweather", Georgia, serif;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1.3;
  color: var(--primary-strong);
}

.section-intro {
  margin: 0.8rem 0 2rem;
  color: var(--text-soft);
  max-width: 66ch;
}

.takeaways {
  margin: 1rem 0 1.2rem;
  padding: 0.95rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(17, 53, 87, 0.2);
  background: linear-gradient(180deg, rgba(17, 53, 87, 0.07), rgba(17, 53, 87, 0.02));
}

.takeaways h3 {
  margin: 0;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-strong);
}

.takeaways ul {
  margin: 0.65rem 0 0;
  padding-left: 1rem;
}

.takeaways li {
  margin: 0.35rem 0;
  color: var(--text-soft);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid rgba(17, 53, 87, 0.78);
  border-radius: var(--radius);
  padding: 1.1rem;
  height: 100%;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(17, 53, 87, 0.14);
}

.card h3 {
  margin: 0;
  font-size: 1.06rem;
  color: var(--primary-strong);
}

.card p {
  margin: 0.7rem 0 0;
  color: var(--text-soft);
}

.card p + p {
  margin-top: 0.8rem;
}

.split {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.1rem;
}

.box h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--primary-strong);
}

.box p {
  margin: 0.8rem 0 0;
  color: var(--text-soft);
}

.box ul {
  margin: 0.8rem 0 0;
  padding-left: 1rem;
}

.box li {
  margin-bottom: 0.38rem;
  color: var(--text-soft);
}

.content-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid rgba(17, 53, 87, 0.75);
  border-radius: var(--radius);
  padding: 1.35rem;
}

.content-block p {
  margin: 0;
  color: var(--text-soft);
  max-width: var(--text-measure);
}

.content-block p + p {
  margin-top: 0.9rem;
}

#fazit p + p {
  margin-top: 0.9rem;
}

.cta {
  position: relative;
  overflow: hidden;
  padding: 4rem 0;
  background: linear-gradient(160deg, #113557 0%, #0b2740 100%);
  color: #fff;
}

.cta .site-wrap {
  position: relative;
  z-index: 1;
}

.cta h2 {
  margin: 0;
  color: #fff;
}

.cta p {
  margin: 0.7rem 0 0;
  max-width: 62ch;
  color: rgba(255, 255, 255, 0.84);
}

.fazit-panel {
  margin-top: 1.2rem;
  padding: 1.2rem 1.2rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 10px 30px rgba(5, 18, 31, 0.25);
}

.next-step {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
}

.next-step h3 {
  margin: 0;
  font-size: 1.05rem;
}

.next-step p {
  margin: 0.55rem 0 0;
  color: rgba(255, 255, 255, 0.92);
}

.next-step-actions {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.85rem;
  border-radius: 9px;
  border: 1px solid transparent;
  font-size: 0.92rem;
  font-weight: 600;
}

.btn-primary {
  background: #fff;
  color: #0b2740;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #e8f0f8;
  color: #0b2740;
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.sources-panel {
  margin-top: 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.sources-panel h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.sources-list {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 0.8rem;
}

.sources-list li {
  margin: 0;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.93);
  font-size: 0.92rem;
}

.sources-list a {
  color: inherit;
  text-decoration: none;
}

.sources-list a:hover,
.sources-list a:focus-visible {
  text-decoration: underline;
}

.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 960px) {
  .toc-inline {
    display: none;
  }

  .section-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 5.8rem;
  }

  .hero-grid,
  .card-grid,
  .split,
  .sources-list {
    grid-template-columns: 1fr;
  }

  .nav-inner {
    position: relative;
    display: block;
    min-height: auto;
    padding: 0.45rem 0;
  }

  .nav-inner::before,
  .nav-inner::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 22px;
    pointer-events: none;
    z-index: 2;
  }

  .nav-inner::before {
    left: 0;
    background: linear-gradient(90deg, rgba(226, 237, 247, 1), rgba(226, 237, 247, 0));
  }

  .nav-inner::after {
    right: 0;
    background: linear-gradient(270deg, rgba(226, 237, 247, 1), rgba(226, 237, 247, 0));
  }

  .brand {
    display: none;
  }

  .anchor-nav {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    white-space: nowrap;
    gap: 0.35rem;
    padding: 0 0.9rem 0.1rem;
    margin: 0 -0.9rem;
  }

  .anchor-nav::-webkit-scrollbar {
    height: 4px;
  }

  .anchor-nav::-webkit-scrollbar-thumb {
    background: rgba(17, 53, 87, 0.35);
    border-radius: 999px;
  }

  .anchor-nav a {
    flex: 0 0 auto;
  }

  .reading-progress {
    top: 53px;
  }
}

@media (max-width: 640px) {
  .site-wrap {
    width: min(1120px, calc(100% - 1.4rem));
  }

  .hero-badge {
    font-size: 0.82rem;
  }

  .anchor-nav a {
    font-size: 0.84rem;
    padding: 0.36rem 0.55rem;
  }

  body {
    line-height: 1.72;
  }

  .section {
    padding: 3.5rem 0;
  }

  .hero h1 {
    font-size: clamp(1.8rem, 8vw, 2.3rem);
  }

  .hero-lead,
  .content-block p,
  .card p {
    font-size: 1rem;
  }

  .reading-progress {
    top: 53px;
  }
}

@media (max-width: 1220px) {
  .toc-inline {
    display: none;
  }
}

@media (min-width: 1221px) {
  .top-nav {
    display: none;
  }

  .reading-progress {
    top: 0;
  }
}
