/* =============================================
   InvoiceSweep — shared stylesheet for the legal subpages
   (impressum.html + datenschutz.html).  HER-2079.

   Self-contained so each legal page renders consistently with the
   landing page WITHOUT re-inlining the full landing stylesheet. The
   :root token block below is copied verbatim from index.html (D1 ·
   Signal Pur, values from packages/design/tokens.json) so the pages
   consume the same --rag-* custom properties. No hardcoded visuals.
   ============================================= */
:root {
  /* PRIMARY brand accent — electric cobalt (HER-1709 Doc v4: all surfaces on
     ONE accent = cobalt #3D5AFE). The marketing landing leads with cobalt as the
     primary action/brand colour. Button bg uses the darker #2A3EDB for pressed/
     hover so white text stays legible (AA large). */
  --rag-color-accent-default:   #3D5AFE;
  --rag-color-accent-strong:    #2A3EDB;
  --rag-color-accent-weak:      #ECEFFF;
  --rag-color-accent-on:        #FFFFFF;

  /* Warm-* aliases collapsed into the cobalt family (HER-1709 Doc v4: ONE accent).
     Retained only so existing warm-* references keep resolving. */
  --rag-color-warm-default:     #3D5AFE;
  --rag-color-warm-strong:      #2A3EDB;
  --rag-color-warm-weak:        #ECEFFF;
  --rag-color-warm-on:          #FFFFFF;

  /* Cobalt — the PRIMARY accent (HER-1709 Doc v4). Same value as accent-default. */
  --rag-color-cobalt:           #3D5AFE;

  /* Color — Ink */
  --rag-color-ink-strong:       #14161F;
  --rag-color-ink-default:      #14161F;
  --rag-color-ink-muted:        #575B6A;
  --rag-color-ink-faint:        #8A8FA0;
  --rag-color-ink-on:           #FFFFFF;

  /* Color — Surface */
  --rag-color-surface-page:     #FBFBFD;
  --rag-color-surface-card:     #FFFFFF;
  --rag-color-surface-sunken:   #F5F6F9;
  --rag-color-surface-sidebar:  #F4F5F8;
  --rag-color-surface-inverse:  #14161F;

  /* Color — Border */
  --rag-color-border-hairline:  #EEEFF3;
  --rag-color-border-default:   #E9EBF0;
  --rag-color-border-strong:    #D7DAE3;
  --rag-color-border-focus:     #3D5AFE;

  /* Color — Status */
  --rag-color-status-ok-fg:          #15794F;
  --rag-color-status-ok-bg:          #E4F2EB;
  --rag-color-status-ok-border:      #BCE0CD;
  --rag-color-status-warning-fg:     #9A6400;
  --rag-color-status-warning-bg:     #F7EED9;
  --rag-color-status-warning-border: #E7D3A6;
  --rag-color-status-error-fg:       #B03A2C;
  --rag-color-status-error-bg:       #F6E7E4;
  --rag-color-status-error-border:   #E6C1BA;
  --rag-color-status-info-fg:        #345E86;
  --rag-color-status-info-bg:        #E6EEF6;
  --rag-color-status-info-border:    #C2D5E9;
  --rag-color-status-neutral-fg:     #575B6A;
  --rag-color-status-neutral-bg:     #F5F6F9;
  --rag-color-status-neutral-border: #E9EBF0;

  /* Font families */
  --rag-font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --rag-font-sans:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --rag-font-mono:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', 'Menlo', monospace;
  --rag-font-feature-tabular: 'tnum' 1, 'lnum' 1;

  /* Spacing (4px base scale) */
  --rag-space-0:  0px;
  --rag-space-1:  4px;
  --rag-space-2:  8px;
  --rag-space-3:  12px;
  --rag-space-4:  16px;
  --rag-space-5:  20px;
  --rag-space-6:  24px;
  --rag-space-8:  32px;
  --rag-space-10: 40px;
  --rag-space-12: 48px;
  --rag-space-16: 64px;
  --rag-space-20: 80px;
  --rag-space-24: 96px;

  /* Radius */
  --rag-radius-xs:   6px;
  --rag-radius-sm:   9px;
  --rag-radius-md:   13px;
  --rag-radius-lg:   20px;
  --rag-radius-pill: 999px;

  /* Elevation */
  --rag-elevation-sm: 0 1px 2px rgba(20,22,31,0.03);
  --rag-elevation-md: 0 1px 2px rgba(20,22,31,0.05), 0 12px 34px rgba(20,22,31,0.07);
  --rag-elevation-lg: 0 12px 34px rgba(20,22,31,0.10);

  /* =============================================
     LANDING-LOCAL SKIN VARS — "Kontrast-Kaskade" (HER-1314)
     Marketing-only overrides scoped to this static prototype.
     NOT part of packages/design/tokens.json — do not promote.
     ============================================= */
  --rag-surface-tint-warm:   #F5F7FF;
  --rag-surface-ink-deep:    #0E1017;
  --rag-elevation-xl:        0 1px 2px rgba(20,22,31,0.06), 0 18px 50px rgba(20,22,31,0.12);
  --rag-glow-accent:         0 8px 28px rgba(61,90,254,0.28);
  --rag-glow-accent-strong:  0 10px 34px rgba(61,90,254,0.40);

  /* Layout */
  --rag-layout-content-max: 1240px;

  /* Motion */
  --rag-motion-fast:  120ms;
  --rag-motion-base:  200ms;
  --rag-motion-slow:  320ms;
  --rag-motion-ease:  cubic-bezier(0.2, 0.0, 0.2, 1.0);

  /* =============================================
     SIGNAL BOLD — MARKETING SKIN TOKENS (--rag-mk-*)
     HER-1314 · CSS-only reskin, additive namespace.
     Does NOT touch or rename the --rag-* product tokens above;
     these live alongside them and are consumed only by the
     marketing landing's own selectors below.
     ============================================= */

  /* Dark bands (depth) — three bands total: demo / trust / final-cta.
     dark-band aliases the product surface-inverse token (same #14161F) rather
     than re-hardcoding the hex. */
  --rag-mk-dark-band:      var(--rag-color-surface-inverse);  /* full-bleed dark section bg */
  --rag-mk-dark-hairline:  rgba(255,255,255,0.10);

  /* On-dark ink ramp (legible white ramp for dark bands) */
  --rag-mk-ink-on:         var(--rag-color-ink-on);  /* solid white — product ink-on */
  --rag-mk-ink-on-strong:  rgba(255,255,255,0.94);
  --rag-mk-ink-on-muted:   rgba(255,255,255,0.72);
  --rag-mk-ink-on-faint:   rgba(255,255,255,0.55);

  /* Cobalt — the Signal Bold primary (HER-1709 Doc v4: ONE accent). Fills keep
     the product accent-default (#3D5AFE, white label); accent TEXT <18px on light
     uses accent-strong (#2A3EDB) for AA (R3). Aliases the product accent-strong token. */
  --rag-mk-accent-strong:  var(--rag-color-accent-strong);  /* accent text <18px on light */
  --rag-mk-cobalt:         var(--rag-color-cobalt);  /* the primary accent */

  /* Dominant-CTA glow lives in --rag-glow-accent / --rag-glow-accent-strong
     (consumed by the scoped LOUD CTA TREATMENT block) — no global .btn-primary
     glow var, so the treatment can't bleed onto chrome/modal buttons. */

  /* Featured-pricing resting glow (static) */
  --rag-mk-featured-glow:
    0 1px 2px rgba(20,22,31,0.05),
    0 18px 44px rgba(61,90,254,0.18);

  /* Dark-scoped focus ring (R2): white outline ≥3:1 on #14161F,
     cobalt inner halo for brand continuity. */
  --rag-mk-focus-dark-outline: var(--rag-color-ink-on);
  --rag-mk-focus-dark-halo:    0 0 0 4px rgba(61,90,254,0.55);
}

/* =============================================
   BASE RESET + GLOBAL
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: clip;
}

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

body {
  font-family: var(--rag-font-sans);
  font-size: 15px;
  line-height: 1.467;
  color: var(--rag-color-ink-strong);
  background: var(--rag-color-surface-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -60px;
  left: var(--rag-space-4);
  padding: var(--rag-space-2) var(--rag-space-4);
  background: var(--rag-color-accent-default);
  color: var(--rag-color-accent-on);
  border-radius: var(--rag-radius-md);
  font-family: var(--rag-font-sans);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  z-index: 9999;
  transition: top var(--rag-motion-fast) var(--rag-motion-ease);
}
.skip-link:focus { top: var(--rag-space-4); }

/* Container */
.container {
  width: 100%;
  max-width: var(--rag-layout-content-max);
  margin: 0 auto;
  padding-left: var(--rag-space-5);
  padding-right: var(--rag-space-5);
}
@media (min-width: 641px) {
  .container {
    padding-left: var(--rag-space-8);
    padding-right: var(--rag-space-8);
  }
}
@media (min-width: 901px) {
  .container {
    padding-left: var(--rag-space-10);
    padding-right: var(--rag-space-10);
  }
}

/* =============================================
   TYPOGRAPHY SCALE (subset used by the legal subpages)
   ============================================= */
.t-h1 {
  font-family: var(--rag-font-display);
  font-size: 28px;
  line-height: 34px;
  font-weight: 600;
  letter-spacing: -0.4px;
}
.t-h2 {
  font-family: var(--rag-font-display);
  font-size: 22px;
  line-height: 28px;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.t-h3 {
  font-family: var(--rag-font-sans);
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
}
.t-title-m {
  font-family: var(--rag-font-sans);
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
}
.t-body {
  font-family: var(--rag-font-sans);
  font-size: 15px;
  line-height: 22px;
  font-weight: 400;
}
.t-body-small {
  font-family: var(--rag-font-sans);
  font-size: 13px;
  line-height: 18px;
  font-weight: 400;
}
.t-caption {
  font-family: var(--rag-font-sans);
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
  letter-spacing: 0.2px;
}
.t-mono {
  font-family: var(--rag-font-mono);
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  font-feature-settings: var(--rag-font-feature-tabular);
}

/* =============================================
   SUBPAGE HEADER (slim — legal pages, not the marketing landing)
   ============================================= */
.legal-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 80px;
  background: color-mix(in srgb, var(--rag-color-surface-page) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rag-color-border-hairline);
}
.legal-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--rag-space-4);
}
.wordmark {
  font-family: var(--rag-font-display);
  font-size: 20px;
  line-height: 26px;
  font-weight: 600;
  color: var(--rag-color-ink-strong);
  text-decoration: none;
  flex-shrink: 0;
}
.legal-back {
  font-family: var(--rag-font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--rag-color-ink-muted);
  text-decoration: none;
  transition: color var(--rag-motion-fast) var(--rag-motion-ease);
}
.legal-back:hover { color: var(--rag-color-ink-strong); }

/* =============================================
   LEGAL CONTENT
   ============================================= */
.legal-main { padding: var(--rag-space-16) 0 var(--rag-space-20); }
.legal-inner { max-width: 760px; margin: 0 auto; }
.legal-inner h1 { margin: 0 0 var(--rag-space-2); }
.legal-inner h2 { margin: var(--rag-space-12) 0 var(--rag-space-2); }
.legal-inner h3 { margin: var(--rag-space-8) 0 var(--rag-space-2); }
.legal-inner h4 { margin: var(--rag-space-5) 0 var(--rag-space-1); }
.legal-inner p { margin: 0 0 var(--rag-space-4); color: var(--rag-color-ink-default); }
.legal-inner ul { margin: 0 0 var(--rag-space-4) var(--rag-space-5); padding: 0; }
.legal-inner li { margin: 0 0 var(--rag-space-1); color: var(--rag-color-ink-default); }
.legal-inner a { color: var(--rag-color-accent-default); text-decoration: underline; }
.legal-inner address {
  font-style: normal;
  margin: 0 0 var(--rag-space-4);
  color: var(--rag-color-ink-default);
}
.legal-stand { color: var(--rag-color-ink-muted); margin-bottom: var(--rag-space-8); }

/* =============================================
   FOOTER (mirrors the landing footer chrome)
   ============================================= */
#footer {
  background: var(--rag-color-surface-card);
  border-top: 1px solid var(--rag-color-border-hairline);
  padding-top: var(--rag-space-8);
  padding-bottom: var(--rag-space-8);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--rag-space-5);
}
@media (min-width: 641px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: var(--rag-space-6);
  }
}
.footer-brand p {
  color: var(--rag-color-ink-muted);
  margin-top: var(--rag-space-2);
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--rag-space-4);
  align-items: center;
}
.footer-legal a {
  font-family: var(--rag-font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--rag-color-ink-muted);
  text-decoration: none;
  transition: color var(--rag-motion-fast) var(--rag-motion-ease);
}
.footer-legal a:hover { color: var(--rag-color-ink-strong); }
.footer-company {
  display: flex;
  flex-direction: column;
  gap: var(--rag-space-1);
}
.footer-company span {
  display: block;
  color: var(--rag-color-ink-faint);
}
