/* ============================================================
   E-Rechnungs-Guide — Shared Stylesheet
   /assets/css/style.css
   Stand: Juni 2026
   ============================================================

   INDEX
   1.  Design Tokens (CSS Custom Properties)
   2.  Reset & Base
   3.  Typography
   4.  Layout Utilities
   5.  Navigation
   6.  Footer
   7.  Buttons
   8.  Form Elements
   9.  Callouts
   10. Badges & Tags
   11. Quick-Answer Block (GEO-optimiert)
   12. Newsletter Strip
   13. Affiliate Box
   14. FAQ Section
   15. Author Box
   16. Breadcrumb
   17. Fristen-Tabelle
   18. Fade-In Animations (via animations.js)
   19. Accessibility Utilities
   20. Print
   21. Responsive Breakpoints
   ============================================================ */


/* ── 1. DESIGN TOKENS ─────────────────────────────────────── */

:root {
  /* Brand Colors */
  --teal:          #0C6B57;
  --teal-hover:    #0A5847;
  --teal-light:    #E3F0EC;
  --amber:         #B85E09;
  --amber-hover:   #994E07;
  --amber-light:   #FEF0E0;

  /* Neutrals */
  --cream:         #F5F2EB;
  --cream-dark:    #EDE9DF;
  --charcoal:      #1C1C1A;
  --gray:          #595955;
  --gray-light:    #D0CCC0;
  --white:         #FFFFFF;

  /* Typography */
  --font-head:     'Syne', sans-serif;
  --font-body:     'DM Sans', sans-serif;
  --font-mono:     'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --sp-xs:   4px;
  --sp-sm:   8px;
  --sp-md:   16px;
  --sp-lg:   24px;
  --sp-xl:   40px;
  --sp-2xl:  64px;
  --sp-3xl:  96px;

  /* Layout */
  --max-w:    1100px;
  --art-w:    720px;
  --nav-h:    64px;

  /* Radii */
  --rr-sm:   6px;
  --rr:      8px;
  --rr-lg:   12px;
  --rr-xl:   16px;

  /* Borders */
  --border:  1px solid var(--gray-light);

  /* Shadows */
  --shadow-sm: 0 1px 4px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08);

  /* Transitions */
  --t-fast: 120ms ease;
  --t-base: 200ms ease;
}


/* ── 2. RESET & BASE ──────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--charcoal);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, svg { display: block; max-width: 100%; }
img { height: auto; }

a {
  color: var(--teal);
  text-decoration: underline;
  text-decoration-color: rgba(12,107,87,.3);
  text-underline-offset: 2px;
  transition: text-decoration-color var(--t-fast);
}
a:hover { text-decoration-color: var(--teal); }
a:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

ul, ol { list-style: none; }

table { border-collapse: collapse; }


/* ── 3. TYPOGRAPHY ────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--charcoal);
}

h1 { font-size: clamp(28px, 4.5vw, 46px); font-weight: 800; letter-spacing: -.03em; }
h2 { font-size: clamp(22px, 3vw, 34px); }
h3 { font-size: clamp(18px, 2vw, 22px); font-weight: 600; }
h4 { font-size: 17px; font-weight: 600; }

p { margin-bottom: 1.1em; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 600; }
em { font-style: italic; }

code {
  font-family: var(--font-mono);
  font-size: .875em;
  background: var(--cream-dark);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--teal);
}

.lead {
  font-size: 17px;
  font-weight: 300;
  color: var(--gray);
  line-height: 1.7;
}

.section-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 10px;
}


/* ── 4. LAYOUT UTILITIES ──────────────────────────────────── */

.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 24px;
}

/* Article-width grid */
.article-wrap {
  display: grid;
  grid-template-columns: 1fr min(var(--art-w), 100%) 1fr;
  padding-inline: 16px;
}
.article-wrap > * { grid-column: 2; }
.article-wrap > .full-bleed { grid-column: 1 / -1; }

section { padding-block: var(--sp-2xl); }

.section-header { margin-bottom: var(--sp-xl); }
.section-header h2 { margin-top: 10px; margin-bottom: 12px; }


/* ── 5. NAVIGATION ────────────────────────────────────────── */

.skip-nav {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 9999;
  background: var(--teal);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--rr);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: top var(--t-base);
}
.skip-nav:focus { top: 16px; }

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(245,242,235,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: var(--border);
  transition: box-shadow var(--t-base);
}
.nav.is-scrolled { box-shadow: 0 1px 12px rgba(0,0,0,.07); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 24px;
  gap: 16px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo-mark {
  width: 32px;
  height: 32px;
  background: var(--teal);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--t-fast);
}
.nav-logo:hover .nav-logo-mark { background: var(--teal-hover); }
.nav-logo-mark svg { width: 17px; height: 17px; }

.nav-logo-text { display: flex; align-items: baseline; gap: 4px; }
.nav-logo-name { font-family: var(--font-head); font-size: 15px; font-weight: 700; color: var(--teal); letter-spacing: -.02em; }
.nav-logo-sep  { color: var(--gray-light); font-size: 13px; }
.nav-logo-tag  { font-size: 13px; font-weight: 500; color: var(--amber); letter-spacing: .02em; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}
.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--rr-sm);
  transition: color var(--t-fast), background var(--t-fast);
  white-space: nowrap;
}
.nav-links a:hover { color: var(--teal); background: var(--teal-light); }
.nav-links a[aria-current="page"] { color: var(--teal); font-weight: 600; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--amber);
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--rr);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--t-fast);
  flex-shrink: 0;
}
.nav-cta:hover { background: var(--amber-hover); color: #fff; }

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--charcoal);
  border-radius: var(--rr-sm);
  transition: background var(--t-fast);
}
.nav-hamburger:hover { background: var(--cream-dark); }

/* Mobile nav drawer */
.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--white);
  border-bottom: var(--border);
  padding: 12px 24px 20px;
  gap: 4px;
}
.nav-mobile.is-open { display: flex; }
.nav-mobile a {
  font-size: 15px;
  font-weight: 500;
  color: var(--charcoal);
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid var(--cream-dark);
}
.nav-mobile a:last-child { border-bottom: none; }


/* ── 6. FOOTER ────────────────────────────────────────────── */

.footer {
  background: var(--charcoal);
  color: rgba(255,255,255,.55);
  padding-block: var(--sp-xl);
  font-size: 13px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo { display: flex; align-items: center; gap: 8px; }
.footer-logo-mark {
  width: 26px;
  height: 26px;
  background: rgba(255,255,255,.1);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.footer-logo-mark svg { width: 14px; height: 14px; }
.footer-logo-name {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,.85);
  letter-spacing: -.01em;
}
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: rgba(255,255,255,.4); text-decoration: none; font-size: 12px; transition: color var(--t-fast); }
.footer-links a:hover { color: rgba(255,255,255,.75); }
.footer-note { font-size: 11px; color: rgba(255,255,255,.25); }


/* ── 7. BUTTONS ───────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-weight: 600;
  border: none;
  cursor: pointer;
  border-radius: var(--rr);
  text-decoration: none;
  transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }

.btn-primary {
  background: var(--amber);
  color: #fff;
  padding: 11px 22px;
  font-size: 14px;
}
.btn-primary:hover { background: var(--amber-hover); color: #fff; box-shadow: 0 3px 10px rgba(184,94,9,.25); }

.btn-secondary {
  background: transparent;
  color: var(--teal);
  padding: 10px 22px;
  font-size: 14px;
  border: 1.5px solid var(--teal);
}
.btn-secondary:hover { background: var(--teal-light); text-decoration: none; }

.btn-ghost {
  background: transparent;
  color: var(--gray);
  padding: 10px 18px;
  font-size: 13px;
  border: 1px solid var(--gray-light);
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

.btn-sm { padding: 7px 14px; font-size: 12px; }

.btn-group { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }


/* ── 8. FORM ELEMENTS ─────────────────────────────────────── */

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--charcoal);
  letter-spacing: .01em;
}

.form-input,
.form-select,
.form-textarea {
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 14px;
  border: 1px solid var(--gray-light);
  border-radius: var(--rr);
  background: var(--white);
  color: var(--charcoal);
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  width: 100%;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--gray-light); }
.form-input:hover, .form-select:hover { border-color: #b0aca3; }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(12,107,87,.12);
}

.form-input.has-error { border-color: #c0392b; }
.form-hint  { font-size: 11px; color: var(--gray); }
.form-error { font-size: 11px; color: #c0392b; }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23595955' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* Inline newsletter form */
.form-inline {
  display: flex;
  gap: 8px;
}
.form-inline .form-input { flex: 1; }


/* ── 9. CALLOUTS ──────────────────────────────────────────── */

.callout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 20px;
  border-radius: 0 var(--rr) var(--rr) 0;
  margin-block: 20px;
  font-size: 14px;
  line-height: 1.65;
}
.callout-icon { font-size: 15px; flex-shrink: 0; margin-top: 2px; }
.callout-text { flex: 1; }
.callout-text strong { font-weight: 600; }

.callout-teal  { background: var(--teal-light);  border-left: 3px solid var(--teal); }
.callout-amber { background: var(--amber-light); border-left: 3px solid var(--amber); }
.callout-neutral { background: var(--cream-dark); border-left: 3px solid var(--gray-light); }


/* ── 10. BADGES & TAGS ────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 20px;
}
.badge-teal    { background: var(--teal-light);  color: var(--teal); }
.badge-amber   { background: var(--amber-light); color: var(--amber); }
.badge-neutral { background: var(--cream-dark);  color: var(--gray); }
.badge-dark    { background: var(--charcoal);    color: var(--cream); }

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }


/* ── 11. QUICK-ANSWER BLOCK (GEO) ─────────────────────────── */

.quick-answer {
  background: var(--teal-light);
  border-left: 4px solid var(--teal);
  border-radius: 0 var(--rr-lg) var(--rr-lg) 0;
  padding: 20px 24px;
  margin-block: 32px;
}
.quick-answer-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 8px;
}
.quick-answer p {
  font-size: 15px;
  font-weight: 500;
  color: var(--charcoal);
  line-height: 1.65;
  margin-bottom: 0;
}


/* ── 12. NEWSLETTER STRIP ─────────────────────────────────── */

.newsletter-strip {
  background: var(--teal);
  padding-block: var(--sp-2xl);
  text-align: center;
}
.newsletter-strip-inner { max-width: 560px; margin-inline: auto; }
.newsletter-strip .section-label { color: rgba(255,255,255,.5); }
.newsletter-strip h2 { color: #fff; margin-bottom: 10px; }
.newsletter-strip .lead { color: rgba(255,255,255,.7); margin-bottom: 28px; }

.newsletter-strip .form-inline { max-width: 420px; margin-inline: auto; }
.newsletter-strip .form-input {
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
}
.newsletter-strip .form-input::placeholder { color: rgba(255,255,255,.45); }
.newsletter-strip .form-input:focus {
  background: rgba(255,255,255,.22);
  box-shadow: 0 0 0 3px rgba(255,255,255,.2);
  border-color: transparent;
}

.newsletter-hint {
  font-size: 11px;
  color: rgba(255,255,255,.4);
  margin-top: 10px;
}


/* ── 13. AFFILIATE BOX ────────────────────────────────────── */

.affiliate-box {
  background: var(--white);
  border: var(--border);
  border-radius: var(--rr-xl);
  padding: 24px;
  margin-block: 32px;
}
.affiliate-box-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 14px;
}
.affiliate-box > h3 { font-size: 18px; margin-bottom: 8px; }
.affiliate-box > .lead { font-size: 13px; margin-bottom: 16px; }

.affiliate-products { display: flex; flex-direction: column; gap: 8px; }

.affiliate-product {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--cream);
  border-radius: var(--rr);
  border: 1px solid transparent;
  transition: border-color var(--t-fast);
}
.affiliate-product:hover { border-color: var(--teal-light); }

.affiliate-product-info { flex: 1; min-width: 0; }
.affiliate-product-name { font-size: 14px; font-weight: 600; }
.affiliate-product-desc { font-size: 12px; color: var(--gray); margin-top: 2px; }
.affiliate-product-price { font-size: 12px; color: var(--gray); white-space: nowrap; }

.btn-affiliate {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--teal);
  color: #fff;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--rr-sm);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--t-fast);
  flex-shrink: 0;
}
.btn-affiliate:hover { background: var(--teal-hover); color: #fff; }

.affiliate-disclaimer {
  font-size: 11px;
  color: var(--gray);
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--cream-dark);
}
.affiliate-disclaimer a { color: var(--gray); }


/* ── 14. FAQ SECTION ──────────────────────────────────────── */

.faq-section { margin-top: var(--sp-2xl); }
.faq-section > h2 { margin-bottom: 24px; }

.faq-item {
  border-bottom: 1px solid var(--cream-dark);
  padding-block: 18px;
}
.faq-item:last-child { border-bottom: none; }
.faq-q {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--charcoal);
  margin-bottom: 8px;
}
.faq-a { font-size: 14px; color: var(--gray); line-height: 1.7; }
.faq-a a { color: var(--teal); }


/* ── 15. AUTHOR BOX ───────────────────────────────────────── */

.author-box {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 24px;
  background: var(--white);
  border: var(--border);
  border-radius: var(--rr-lg);
  margin-top: var(--sp-xl);
}
.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--teal-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--teal);
  font-style: normal;
}
.author-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.author-bio  { font-size: 13px; color: var(--gray); line-height: 1.6; }


/* ── 16. BREADCRUMB ───────────────────────────────────────── */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-block: 20px 0;
  font-size: 12px;
  color: var(--gray);
}
.breadcrumb a { color: var(--gray); text-decoration: none; }
.breadcrumb a:hover { color: var(--teal); }
.breadcrumb-sep { color: var(--gray-light); user-select: none; }


/* ── 17. FRISTEN-TABELLE ──────────────────────────────────── */

.fristen-table {
  width: 100%;
  font-size: 14px;
  margin-block: 24px;
}
.fristen-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gray);
  padding: 10px 14px;
  border-bottom: 2px solid var(--gray-light);
}
.fristen-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--cream-dark);
  vertical-align: top;
}
.fristen-table tr:last-child td { border-bottom: none; }
.fristen-table .date {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--teal);
  white-space: nowrap;
}
.fristen-table tr.future { opacity: .55; }


/* ── 18. FADE-IN ANIMATIONS ───────────────────────────────── */

/* Base state — invisible until JS adds .is-visible */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .5s ease, transform .5s ease;
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .4s ease, transform .4s ease;
}
.stagger-children.is-visible > *:nth-child(1) { transition-delay: .05s; }
.stagger-children.is-visible > *:nth-child(2) { transition-delay: .12s; }
.stagger-children.is-visible > *:nth-child(3) { transition-delay: .19s; }
.stagger-children.is-visible > *:nth-child(4) { transition-delay: .26s; }
.stagger-children.is-visible > * { opacity: 1; transform: translateY(0); }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .fade-in,
  .stagger-children > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* ── 19. ACCESSIBILITY UTILITIES ──────────────────────────── */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* High-contrast focus for keyboard users */
@media (prefers-contrast: more) {
  .nav-links a:focus-visible,
  .btn:focus-visible { outline: 3px solid #000; }
}


/* ── 20. PRINT ────────────────────────────────────────────── */

@media print {
  .nav, .nav-mobile, .newsletter-strip, .footer, .nav-cta, .affiliate-box { display: none !important; }
  .article-wrap { display: block; padding: 0; }
  body { font-size: 12pt; color: #000; background: #fff; }
  h1, h2, h3 { color: #000; }
  a { color: #000; text-decoration: underline; }
}


/* ── 21. RESPONSIVE ───────────────────────────────────────── */

@media (max-width: 1024px) {
  .nav-links a { font-size: 12px; padding: 6px 8px; }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
  .nav-inner { gap: 12px; }
}

@media (max-width: 640px) {
  section { padding-block: var(--sp-xl); }
  .article-wrap { padding-inline: 0; grid-template-columns: 1fr; }
  .article-wrap > * { grid-column: 1; padding-inline: 16px; }
  .form-inline { flex-direction: column; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .author-box { flex-direction: column; gap: 12px; }
  .affiliate-product { flex-wrap: wrap; }
}