/* ============================================================
   Topnav
   ============================================================ */
.topnav {
  background: var(--color-accent);
  border-bottom: 1px solid rgba(94, 155, 90, 0.18);
  position: sticky;
  top: 0;
  z-index: var(--z-topnav);
  height: var(--topnav-height);
  transition: transform var(--t-base);
  will-change: transform;
}

.topnav--hidden {
  transform: translateY(-100%);
}

.topnav__inner {
  height: 100%;
  padding: 0 var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.topnav__brand {
  display: inline-flex;
  align-items: baseline;
  gap: var(--sp-3);
  text-decoration: none;
  color: var(--color-accent-ink);
  font-weight: var(--fw-semibold);
}

.topnav__brand:hover {
  color: var(--color-accent-ink);
}

.topnav__brand-name {
  font-size: var(--fs-md);
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: baseline;
}

.topnav__brand-nums {
  font-size: 0.55em;
  color: var(--color-mark);
  display: inline-flex;
  align-items: baseline;
  margin-left: 0.08em;
  letter-spacing: -0.02em;
}

.topnav__brand-nums .six   { display: inline-block; transform: translateY(0.42em); }
.topnav__brand-nums .seven { display: inline-block; transform: translateY(-0.42em); }

.topnav__tagline {
  margin-left: auto;
  font-family: var(--font-handwriting);
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 500;
  color: var(--color-accent-ink);
  letter-spacing: 0.01em;
  opacity: 0.9;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .topnav__tagline {
    display: none;
  }
}

/* Hamburger button — visible on mobile only */
.topnav__menu-button {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--color-accent-ink);
  transition: background var(--t-fast), border-color var(--t-fast);
}

.topnav__menu-button:hover {
  background: rgba(94, 155, 90, 0.12);
}

.topnav__menu-icon,
.topnav__menu-icon::before,
.topnav__menu-icon::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--t-base), top var(--t-base), opacity var(--t-fast);
}

.topnav__menu-icon {
  position: relative;
}

.topnav__menu-icon::before,
.topnav__menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.topnav__menu-icon::before {
  top: -6px;
}

.topnav__menu-icon::after {
  top: 6px;
}

.topnav__menu-button[aria-expanded="true"] .topnav__menu-icon {
  background: transparent;
}

.topnav__menu-button[aria-expanded="true"] .topnav__menu-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.topnav__menu-button[aria-expanded="true"] .topnav__menu-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

@media (max-width: 768px) {
  .topnav__menu-button {
    display: inline-flex;
  }
}

/* ============================================================
   Sidebar (article list)
   ============================================================ */
.sidebar {
  background: var(--color-accent-soft);
  border-right: 1px solid var(--color-border);
  position: fixed;
  top: var(--topnav-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--topnav-height));
  overflow-y: auto;
  padding: var(--sp-6) var(--sp-4);
  z-index: 10;
}

.sidebar__nav {
  position: relative;
}


.sidebar__heading {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent-ink);
  margin: 0 var(--sp-3) var(--sp-4);
  opacity: 0.75;
}

.sidebar__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.sidebar__link {
  position: relative;
  display: block;
  padding: var(--sp-3) var(--sp-3) var(--sp-3) var(--sp-5);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text);
  transition: background var(--t-fast), color var(--t-fast);
}

.sidebar__link:hover {
  background: rgba(94, 155, 90, 0.10);
  color: var(--color-text);
}

.sidebar__link--current {
  background: #fff;
  box-shadow: var(--shadow-sm);
  color: var(--color-text);
}

.sidebar__link--current::before {
  content: "";
  position: absolute;
  left: var(--sp-2);
  top: var(--sp-3);
  bottom: var(--sp-3);
  width: 3px;
  background: var(--color-accent-strong);
  border-radius: 999px;
}

.sidebar__link--current:hover {
  background: #fff;
}

.sidebar__link-title {
  display: block;
  font-weight: var(--fw-medium);
  font-size: var(--fs-sm);
  line-height: 1.35;
}

.sidebar__link-date {
  display: block;
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin-top: var(--sp-1);
}

/* Sidebar mobile drawer */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: var(--topnav-height);
    left: 0;
    bottom: 0;
    width: min(86vw, 320px);
    height: auto;
    z-index: var(--z-sidebar);
    border-right: 1px solid var(--color-border);
    transform: translateX(-100%);
    transition: transform var(--t-slow);
    box-shadow: var(--shadow-lg);
  }

  .sidebar.sidebar--open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: var(--topnav-height) 0 0 0;
    background: rgba(20, 30, 20, 0.32);
    z-index: var(--z-backdrop);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-base);
  }

  .sidebar-backdrop.sidebar-backdrop--visible {
    opacity: 1;
    pointer-events: auto;
  }

  body.no-scroll {
    overflow: hidden;
  }
}

/* ============================================================
   Article
   ============================================================ */
.article {
  max-width: var(--content-max);
  margin-inline: auto;
}

@media (min-width: 769px) {
  .article {
    margin-left: var(--reading-margin-left);
    margin-right: var(--reading-margin-right);
  }
}

/* Hero image — wider band than the reading column, still centered wrt viewport. */
.article__hero {
  max-width: var(--hero-max);
  margin: 0 auto var(--sp-6);
}

@media (min-width: 769px) {
  .article__hero {
    margin-left: max(
      calc(var(--sidebar-width) + var(--sp-6)),
      calc((100vw - var(--hero-max)) / 2)
    );
    margin-right: max(
      var(--sp-6),
      calc((100vw - var(--hero-max)) / 2)
    );
  }
}

.article__hero img,
.article__hero picture {
  display: block;
  width: 100%;
  height: auto;
}

.article__hero img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-lg);
  background: var(--color-surface-2);
}

.article__hero-caption {
  margin-top: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  font-style: italic;
  text-align: center;
}

.article__header {
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--color-border);
}

.article__title {
  font-size: var(--fs-2xl);
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-2);
}

.article__date {
  display: block;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.article__body {
  font-size: var(--fs-md);
  line-height: 1.7;
  color: var(--color-text);
}

.article__body h2 {
  font-size: var(--fs-lg);
  margin-top: var(--sp-7);
  margin-bottom: var(--sp-3);
  letter-spacing: -0.01em;
}

.article__body h3 {
  font-size: var(--fs-md);
  margin-top: var(--sp-6);
  margin-bottom: var(--sp-2);
}

.article__body p,
.article__body ul,
.article__body ol {
  margin-bottom: var(--sp-4);
}

.article__body ul,
.article__body ol {
  padding-left: 1.4em;
}

.article__body li {
  margin-bottom: var(--sp-2);
}

.article__body li::marker {
  color: var(--color-accent-strong);
}

.article__body a {
  text-decoration-color: var(--color-accent-strong);
}

.article__body blockquote {
  border-left: 3px solid var(--color-accent-strong);
  padding: var(--sp-2) 0 var(--sp-2) var(--sp-4);
  margin: var(--sp-5) 0;
  color: var(--color-text-muted);
  font-style: italic;
}

.article__body code {
  background: var(--color-surface-2);
  padding: 0.1em 0.35em;
  border-radius: var(--radius-sm);
  font-size: 0.92em;
}

.article__body pre {
  background: var(--color-surface-2);
  padding: var(--sp-4);
  border-radius: var(--radius-md);
  overflow-x: auto;
  border: 1px solid var(--color-border);
}

.article__body pre code {
  background: transparent;
  padding: 0;
}

/* ============================================================
   Highlighted articles (above footer)
   ============================================================ */
.highlighted {
  max-width: var(--content-max);
  margin-top: var(--sp-8);
  margin-inline: auto;
  padding-top: var(--sp-6);
  border-top: 1px solid var(--color-border);
}

@media (min-width: 769px) {
  .highlighted {
    margin-left: var(--reading-margin-left);
    margin-right: var(--reading-margin-right);
  }
}

.highlighted__heading {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-4);
}

.highlighted__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4);
}

.highlighted__card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--color-text);
  overflow: hidden;
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base), background var(--t-base);
}

.highlighted__card:hover {
  transform: translateY(-2px);
  border-color: var(--color-accent-strong);
  box-shadow: var(--shadow-md);
  background: #fff;
  color: var(--color-text);
}

.highlighted__media {
  display: block;
  background: var(--color-surface-2);
}

.highlighted__media img,
.highlighted__media picture {
  display: block;
  width: 100%;
  height: auto;
}

.highlighted__media img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center top;
}

.highlighted__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-5);
}

.highlighted__card--text-only .highlighted__body {
  /* Same internal padding as the image card; nothing else changes. */
}

.highlighted__title {
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.highlighted__summary {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

.highlighted__cta {
  font-size: var(--fs-sm);
  color: var(--color-accent-strong);
  font-weight: var(--fw-medium);
  margin-top: var(--sp-2);
}

@media (max-width: 640px) {
  .highlighted__grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--color-accent);
  border-top: 1px solid rgba(94, 155, 90, 0.18);
  padding: var(--sp-5) 0;
  position: relative;
  z-index: 20;
}

.footer__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--sp-5);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  font-size: var(--fs-sm);
  color: var(--color-accent-ink);
  text-align: center;
}

.footer__copy {
  opacity: 0.85;
}

.footer__links {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.footer__link {
  color: var(--color-accent-ink);
  text-decoration: none;
  font-weight: var(--fw-medium);
}

.footer__link:hover {
  color: var(--color-accent-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.footer__sep {
  font-size: 1.4em;
  line-height: 1;
  color: var(--color-accent-ink);
  opacity: 0.55;
  user-select: none;
}


/* ============================================================
   Legal pages (Impressum / Datenschutz)
   ============================================================ */
.legal__article {
  max-width: var(--content-max);
  margin: 0 auto;
}

.legal__title {
  font-size: var(--fs-2xl);
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--color-border);
}

.legal__intro {
  font-size: var(--fs-md);
  color: var(--color-text-muted);
  margin-bottom: var(--sp-6);
}

.legal__section {
  margin-bottom: var(--sp-6);
}

.legal__section h2 {
  font-size: var(--fs-md);
  margin-bottom: var(--sp-2);
}

.legal__section p {
  color: var(--color-text);
  line-height: 1.65;
}
