/**
 * RIVUS360 Dev Template - Frontend Styles
 * =========================================
 * Complete standalone stylesheet for the public-facing website.
 * Completely separated from backend styles for independent theming.
 */

/* =============================================================================
   CSS VARIABLES (Frontend)
   ============================================================================= */

:root {
    /* Colors - Override these via SiteSettings */
    --primary: #c5023c;
    --primary-dark: #9e0230;
    --secondary: #6c757d;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --light: #f8f9fa;
    --dark: #343a40;
    --white: #ffffff;

    /* Text Colors */
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-muted: #9ca3af;

    /* Border & Shadow */
    --border-color: #dee2e6;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);

    /* Spacing & Sizing */
    --radius: 8px;
    --radius-lg: 12px;
}

/* =============================================================================
   RESET & BASE
   ============================================================================= */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =============================================================================
   TYPOGRAPHY
   ============================================================================= */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

/* ⚠️ DEUTSCHE WOERTER SIND LAENGER ALS EIN HANDY. „Datenschutzbeauftragter"
   in einer 2rem-Ueberschrift lief auf /sicherheit/ bei 360 px bis 391 px
   hinaus und machte die ganze Seite so breit (gemessen 2026-11-14) -- der
   Kasten passte, nur der Text darin nicht, und daran findet eine Suche nach
   zu breiten ELEMENTEN nichts. `break-word` greift NUR, wenn das Wort sonst
   ueberlaeuft, und laesst jeden anderen Text unberuehrt.
   ⚠️ Bewusst ohne `hyphens: auto`: das trennt JEDEN Fliesstext neu und
   machte aus der Marke „RI-VUS360" (am Bildschirm gesehen, 2026-11-14). */
h1, h2, h3, h4, h5, h6, p, li, dd, td, th, figcaption, blockquote {
    overflow-wrap: break-word;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }

a {
    color: var(--marke-auf-dunkel, var(--primary));
    text-decoration: none;
}

/* Focus indicators for keyboard navigation (WCAG) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(197, 2, 60, 0.25);
}

[data-theme="dark"] a:focus-visible,
[data-theme="dark"] button:focus-visible,
[data-theme="dark"] .btn:focus-visible {
    outline-color: #e8365d;
    box-shadow: 0 0 0 4px rgba(232, 54, 93, 0.3);
}

a:hover {
    text-decoration: underline;
}

/* =============================================================================
   LAYOUT
   ============================================================================= */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-narrow {
    max-width: 800px;
}

.site-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.site-main__spacer {
    flex: 1;
}

/* =============================================================================
   HEADER & NAVIGATION
   ============================================================================= */

.site-header {
    background: var(--nav-bg-light, var(--white));
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Hoehe des klebenden Kopfs als Variable.
 *
 * Alles, was selbst kleben bleibt (die laufende Summe im Konfigurator, die
 * Preiskarte auf der Ergebnisseite), muss darunter anhalten — sonst schiebt
 * sich der Kopf darueber und verdeckt die obere Zeile. Genau das ist
 * passiert.
 *
 * Als Variable und nicht als Zahl an jeder Stelle: aendert sich die Kopfhoehe,
 * muesste man sie sonst an vier Stellen nachziehen und wuerde eine vergessen. */
:root {
    --kopfhoehe: 3.75rem;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1.5rem;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--nav-logo-light, var(--text-primary));
    flex-shrink: 0;
}

.logo:hover {
    text-decoration: none;
    color: var(--marke-auf-dunkel, var(--primary));
}

/* Header logo image (matches rivus360-docs sizing) */
.logo-img {
    display: block;
    height: 18px;
    width: auto;
}

.nav-spacer {
    flex: 1;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

/* =============================================================================
   NAV LINKS
   ============================================================================= */

.nav-link {
    color: var(--nav-text-light, var(--text-secondary));
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--marke-auf-dunkel, var(--primary));
    text-decoration: none;
}

/* Hauptnavigation im Kopf. Sitzt im Spacer, damit sie mittig zwischen Logo und
   Aktionen liegt und der Kopf beim Wachsen der Liste nicht springt. */
.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Auf schmalen Schirmen verschwindet die Liste; die Ziele bleiben ueber die
   Startseite und die Fusszeile erreichbar. Ein Klappmenue waere hier mehr
   Bedienteil als Nutzen — es sind drei Links. */
@media (max-width: 52rem) {
    .nav-links { display: none; }
}

/* Anmelde-/Kontoknopf: auf dem Handy nur das Sinnbild, damit der Kopf nicht
   umbricht. Das aria-label des Knopfs traegt weiterhin den vollen Text. */
@media (max-width: 30rem) {
    .nav-konto__text { display: none; }

    /* ⚠️ DER KOPF WAR BREITER ALS DAS HANDY. Logo 143 + Aktionen 230 + Rand
       32 = 417 px bei 375 px Bildschirm (gemessen 2026-11-14); die Aktionen
       duerfen nicht schrumpfen, also wurde die ganze Seite 412 px breit und
       liess sich waagerecht wischen. Der groesste Posten war die
       Sprachauswahl mit ausgeschriebenem „Deutsch". Auf dem Handy genuegt
       die Flagge -- das Wort bleibt fuer Screenreader lesbar, darum nicht
       display:none. core_language.css ist Kern und bleibt unberuehrt. */
    .nav-actions .language-selector-display .text {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}

/* Language selector overrides for header (core_language.css handles base styles) */
.nav-actions .language-selector-wrapper {
    width: auto;
}

.nav-actions .language-selector-dropdown {
    left: auto;
    right: 0;
    min-width: 320px;
}

/* =============================================================================
   BUTTONS
   ============================================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #218838;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-outline:hover {
    background: #ffffff;
    color: var(--marke-auf-dunkel, var(--primary));
    border-color: var(--primary, #c5023c);
}

.btn-outline:hover svg {
    stroke: var(--primary, #c5023c);
}

.btn-outline:hover i {
    color: var(--marke-auf-dunkel, var(--primary));
}

/* Ensure focus ring is not hidden by btn-outline border */
.btn-outline:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(197, 2, 60, 0.25);
}

[data-theme="dark"] .btn-outline:focus-visible {
    outline-color: #e8365d;
    box-shadow: 0 0 0 4px rgba(232, 54, 93, 0.3);
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
}

/* =============================================================================
   HERO SECTION
   ============================================================================= */

.hero {
    position: relative;
    padding: 4rem 0 5rem;
    text-align: center;
    background: linear-gradient(180deg, #ffffff 0%, #f5f5f7 100%);
    overflow: hidden;
    min-height: max(55vh, 480px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    /* ⚠️ DIE HÖHE MUSS MIT DER BREITE WACHSEN.
       Der Keil wird um 2 Grad gekippt (`skewY(2deg)`, Ursprung unten links).
       Dabei hebt sich die rechte Kante um `Breite × tan(2°)`. Mit einer
       festen Höhe von 80 px reicht das nur bis 2291 px Bildschirmbreite —
       darüber schneidet `overflow: hidden` des Helden die Schräge ab, und
       sie läuft nur über einen Teil der Breite.

       Pierre am 2026-10-27 auf einem Ultrabreitbild: „er ist nur 9/10 vom
       bildschirmbreite schräg, dann gerade."

           1280 px ->  45 px     2560 px ->  89 px
           1920 px ->  67 px     3440 px -> 120 px
                                 3840 px -> 134 px

       `100vw * 0.0355` ist tan(2°) plus eine Kleinigkeit Reserve. Das
       `max()` hält die Mindesthöhe für schmale Fenster. */
    height: max(80px, calc(100vw * 0.0355));
    background: var(--theme-bg-primary, #ffffff);
    transform: skewY(2deg);
    transform-origin: bottom left;
    z-index: 2;
    border-top: 3px solid #d5d7da;
}

[data-theme="dark"] .hero::after {
    border-top-color: #333333;
}

.hero .container {
    position: relative;
    z-index: 3;
}

/* --- Animated Orbs --- */
.hero__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: 1;
    will-change: transform;
}

.hero__orb--1 {
    width: 600px;
    height: 600px;
    left: -15%;
    bottom: -40%;
    background: radial-gradient(circle, rgba(220, 10, 50, 0.18) 0%, transparent 70%);
    animation: orb-drift-1 9s ease-in-out infinite;
}

.hero__orb--2 {
    width: 500px;
    height: 500px;
    right: -10%;
    top: -30%;
    background: radial-gradient(circle, rgba(230, 40, 70, 0.12) 0%, transparent 70%);
    animation: orb-drift-2 11s ease-in-out infinite;
}

.hero__orb--3 {
    width: 350px;
    height: 350px;
    left: 50%;
    top: 5%;
    background: radial-gradient(circle, rgba(210, 20, 60, 0.10) 0%, transparent 70%);
    animation: orb-drift-3 8s ease-in-out infinite;
}

@keyframes orb-drift-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25%      { transform: translate(40px, -30px) scale(1.05); }
    50%      { transform: translate(-20px, -50px) scale(0.95); }
    75%      { transform: translate(30px, 20px) scale(1.02); }
}

@keyframes orb-drift-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(-50px, 40px) scale(1.08); }
    66%      { transform: translate(30px, 20px) scale(0.94); }
}

@keyframes orb-drift-3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    20%      { transform: translate(30px, 20px) scale(1.1); }
    50%      { transform: translate(-40px, 40px) scale(0.9); }
    80%      { transform: translate(20px, -30px) scale(1.05); }
}

/* --- Floating Paragraph Symbols --- */
.hero__symbols {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.hero__symbol {
    position: absolute;
    font-weight: 700;
    color: var(--text-primary);
    opacity: 0;
    user-select: none;
    will-change: transform, opacity;
}

/* Each symbol gets its own long keyframe with fade-in/out + position shifts */
.hero__symbol--1 {
    font-size: 6rem;
    left: 8%;
    top: 15%;
    animation: sym-1 42s ease-in-out infinite;
}

.hero__symbol--2 {
    font-size: 3.5rem;
    right: 12%;
    top: 20%;
    animation: sym-2 38s ease-in-out -8s infinite;
}

.hero__symbol--3 {
    font-size: 8rem;
    left: 15%;
    bottom: 10%;
    animation: sym-3 50s ease-in-out -5s infinite;
}

.hero__symbol--4 {
    font-size: 4rem;
    right: 8%;
    bottom: 20%;
    animation: sym-4 44s ease-in-out -18s infinite;
}

.hero__symbol--5 {
    font-size: 2.5rem;
    left: 40%;
    top: 8%;
    animation: sym-5 36s ease-in-out -12s infinite;
}

.hero__symbol--6 {
    font-size: 5rem;
    right: 30%;
    bottom: 5%;
    animation: sym-6 46s ease-in-out -25s infinite;
}

.hero__symbol--7 {
    font-size: 3rem;
    left: 60%;
    top: 60%;
    animation: sym-7 40s ease-in-out -30s infinite;
}

/* Symbol 1: starts top-left, drifts down-right, fades, reappears shifted */
@keyframes sym-1 {
    0%        { opacity: 0;    transform: translate(0, 0) rotate(0deg); }
    4%        { opacity: 0.12; }
    15%       { opacity: 0.1;  transform: translate(30px, 20px) rotate(4deg); }
    25%       { opacity: 0;    transform: translate(60px, 40px) rotate(6deg); }
    26%, 40%  { opacity: 0;    transform: translate(-40px, -30px) rotate(-2deg); }
    44%       { opacity: 0.12; }
    55%       { opacity: 0.1;  transform: translate(-10px, -50px) rotate(3deg); }
    65%       { opacity: 0;    transform: translate(20px, -70px) rotate(5deg); }
    66%, 78%  { opacity: 0;    transform: translate(50px, 10px) rotate(-3deg); }
    82%       { opacity: 0.1;  }
    92%       { opacity: 0.08; transform: translate(30px, -10px) rotate(2deg); }
    97%       { opacity: 0;    transform: translate(10px, 0) rotate(0deg); }
    100%      { opacity: 0;    transform: translate(0, 0) rotate(0deg); }
}

/* Symbol 2: top-right area, drifts left and down */
@keyframes sym-2 {
    0%        { opacity: 0;    transform: translate(0, 0) rotate(0deg); }
    5%        { opacity: 0.1;  }
    18%       { opacity: 0.08; transform: translate(-40px, 30px) rotate(-5deg); }
    28%       { opacity: 0;    transform: translate(-80px, 50px) rotate(-7deg); }
    29%, 48%  { opacity: 0;    transform: translate(30px, -20px) rotate(3deg); }
    52%       { opacity: 0.1;  }
    63%       { opacity: 0.08; transform: translate(10px, -60px) rotate(-3deg); }
    73%       { opacity: 0;    transform: translate(-20px, -80px) rotate(-5deg); }
    74%, 88%  { opacity: 0;    transform: translate(-50px, 40px) rotate(2deg); }
    92%       { opacity: 0.09; }
    97%       { opacity: 0;    transform: translate(-30px, 20px) rotate(0deg); }
    100%      { opacity: 0;    transform: translate(0, 0) rotate(0deg); }
}

/* Symbol 3: large, bottom-left, slow majestic drift */
@keyframes sym-3 {
    0%        { opacity: 0;    transform: translate(0, 0) rotate(0deg); }
    3%        { opacity: 0.09; }
    12%       { opacity: 0.07; transform: translate(50px, -30px) rotate(3deg); }
    22%       { opacity: 0;    transform: translate(100px, -60px) rotate(5deg); }
    23%, 38%  { opacity: 0;    transform: translate(-30px, 20px) rotate(-2deg); }
    42%       { opacity: 0.09; }
    52%       { opacity: 0.07; transform: translate(-60px, -20px) rotate(-4deg); }
    62%       { opacity: 0;    transform: translate(-90px, -40px) rotate(-6deg); }
    63%, 80%  { opacity: 0;    transform: translate(40px, -50px) rotate(3deg); }
    84%       { opacity: 0.07; }
    93%       { opacity: 0.06; transform: translate(20px, -30px) rotate(1deg); }
    98%       { opacity: 0;    transform: translate(0, 0) rotate(0deg); }
    100%      { opacity: 0; }
}

/* Symbol 4: bottom-right, drifts up-left then repositions */
@keyframes sym-4 {
    0%        { opacity: 0;    transform: translate(0, 0) rotate(0deg); }
    6%        { opacity: 0.1;  }
    20%       { opacity: 0.08; transform: translate(-30px, -40px) rotate(-4deg); }
    30%       { opacity: 0;    transform: translate(-60px, -70px) rotate(-6deg); }
    31%, 50%  { opacity: 0;    transform: translate(20px, 30px) rotate(2deg); }
    54%       { opacity: 0.1;  }
    65%       { opacity: 0.08; transform: translate(50px, -20px) rotate(4deg); }
    75%       { opacity: 0;    transform: translate(70px, -50px) rotate(6deg); }
    76%, 90%  { opacity: 0;    transform: translate(-40px, -10px) rotate(-2deg); }
    94%       { opacity: 0.09; }
    98%       { opacity: 0;    transform: translate(-20px, 0) rotate(0deg); }
    100%      { opacity: 0;    transform: translate(0, 0) rotate(0deg); }
}

/* Symbol 5: small, top-center, quick appearances */
@keyframes sym-5 {
    0%        { opacity: 0;    transform: translate(0, 0) rotate(0deg); }
    8%        { opacity: 0.1;  }
    16%       { opacity: 0.08; transform: translate(60px, 30px) rotate(5deg); }
    24%       { opacity: 0;    transform: translate(90px, 50px) rotate(7deg); }
    25%, 44%  { opacity: 0;    transform: translate(-80px, -20px) rotate(-3deg); }
    48%       { opacity: 0.09; }
    58%       { opacity: 0.07; transform: translate(-50px, 40px) rotate(-5deg); }
    66%       { opacity: 0;    transform: translate(-30px, 60px) rotate(-3deg); }
    67%, 84%  { opacity: 0;    transform: translate(20px, -40px) rotate(2deg); }
    88%       { opacity: 0.08; }
    95%       { opacity: 0;    transform: translate(10px, -20px) rotate(0deg); }
    100%      { opacity: 0;    transform: translate(0, 0) rotate(0deg); }
}

/* Symbol 6: medium, bottom-right area, wide arcs */
@keyframes sym-6 {
    0%        { opacity: 0;    transform: translate(0, 0) rotate(0deg); }
    4%        { opacity: 0.1;  }
    14%       { opacity: 0.08; transform: translate(-50px, -30px) rotate(-3deg); }
    24%       { opacity: 0;    transform: translate(-80px, -60px) rotate(-5deg); }
    25%, 42%  { opacity: 0;    transform: translate(40px, 20px) rotate(4deg); }
    46%       { opacity: 0.1;  }
    56%       { opacity: 0.08; transform: translate(70px, -40px) rotate(5deg); }
    66%       { opacity: 0;    transform: translate(90px, -60px) rotate(3deg); }
    67%, 85%  { opacity: 0;    transform: translate(-20px, 30px) rotate(-2deg); }
    89%       { opacity: 0.09; }
    96%       { opacity: 0;    transform: translate(-10px, 10px) rotate(0deg); }
    100%      { opacity: 0;    transform: translate(0, 0) rotate(0deg); }
}

/* Symbol 7: small, center-right, wandering */
@keyframes sym-7 {
    0%        { opacity: 0;    transform: translate(0, 0) rotate(0deg); }
    7%        { opacity: 0.09; }
    18%       { opacity: 0.07; transform: translate(-40px, -50px) rotate(-6deg); }
    27%       { opacity: 0;    transform: translate(-70px, -80px) rotate(-8deg); }
    28%, 46%  { opacity: 0;    transform: translate(50px, 30px) rotate(3deg); }
    50%       { opacity: 0.1;  }
    60%       { opacity: 0.08; transform: translate(30px, -30px) rotate(5deg); }
    70%       { opacity: 0;    transform: translate(10px, -60px) rotate(3deg); }
    71%, 87%  { opacity: 0;    transform: translate(-60px, 20px) rotate(-4deg); }
    91%       { opacity: 0.08; }
    97%       { opacity: 0;    transform: translate(-30px, 10px) rotate(0deg); }
    100%      { opacity: 0;    transform: translate(0, 0) rotate(0deg); }
}

/* --- Hero Title --- */
.hero__title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.hero__title-text {
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    animation: fade-up 0.8s ease-out 0.2s both;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fade-up 0.8s ease-out 0.4s both;
}

/* Hero CTA Button - Text swap + color inversion on hover */
.hero-cta {
    position: relative;
    overflow: hidden;
    display: inline-grid;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

/* Stack both texts on top of each other so button keeps the wider width */
.hero-cta__default,
.hero-cta__hover {
    grid-area: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.hero-cta__hover {
    opacity: 0;
}

.hero-cta:hover .hero-cta__default {
    opacity: 0;
}

.hero-cta:hover .hero-cta__hover {
    opacity: 1;
}

/* Light mode: hover → white bg, black text, black border */
.hero-cta.btn.btn-primary {
    border: 2px solid transparent !important;
}

.hero-cta.btn.btn-primary:hover {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
}

.hero-cta.btn.btn-primary:hover svg {
    stroke: #000000;
}

/* Dark mode: hover → black bg, white text, white border */
[data-theme="dark"] .hero-cta.btn.btn-primary {
    border: 2px solid transparent !important;
}

[data-theme="dark"] .hero-cta.btn.btn-primary:hover {
    background: #000000 !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
}

[data-theme="dark"] .hero-cta.btn.btn-primary:hover svg {
    stroke: #ffffff;
}

/* Focus indicators for buttons with custom border declarations (WCAG 2.4.7) */
.hero-cta.btn.btn-primary:focus-visible {
    outline: 2px solid var(--primary) !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 5px rgba(197, 2, 60, 0.25) !important;
}

[data-theme="dark"] .hero-cta.btn.btn-primary:focus-visible {
    outline-color: #e8365d !important;
    box-shadow: 0 0 0 5px rgba(232, 54, 93, 0.3) !important;
}

.help-band__actions .btn-outline:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    box-shadow: 0 0 0 5px rgba(197, 2, 60, 0.25);
}

[data-theme="dark"] .help-band__actions .btn-outline:focus-visible {
    outline-color: #e8365d;
    box-shadow: 0 0 0 5px rgba(232, 54, 93, 0.3);
}

.apps-section__cta .btn-outline:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    box-shadow: 0 0 0 5px rgba(197, 2, 60, 0.25);
}

[data-theme="dark"] .apps-section__cta .btn-outline:focus-visible {
    outline-color: #e8365d;
    box-shadow: 0 0 0 5px rgba(232, 54, 93, 0.3);
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .hero__orb,
    .hero__symbol,
    .hero-subtitle,
    .hero-actions {
        animation: none;
    }
    .hero__symbol {
        opacity: 0.05;
    }
    .hero-subtitle,
    .hero-actions {
        opacity: 1;
        transform: none;
    }
}

/* =============================================================================
   FEATURES SECTION
   ============================================================================= */

.features {
    position: relative;
    padding: 3rem 0 10rem;
    background: var(--theme-bg-primary, #ffffff);
}

.features::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: var(--theme-bg-secondary, #f8f9fa);
    transform: skewY(-2deg);
    transform-origin: bottom right;
    border-top: 3px solid #d5d7da;
    z-index: 1;
}

[data-theme="dark"] .features::after {
    background: var(--theme-bg-secondary, #1e1e1e);
    border-top-color: #333333;
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    transition: transform 0.25s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.15);
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    transition: color 0.25s ease;
}

.feature-card:hover h3 {
    color: var(--marke-auf-dunkel, var(--primary));
}

.feature-card p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

.feature-card-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    display: block;
}

.feature-card-link:hover {
    text-decoration: none;
    color: inherit;
}

.feature-card-link h3 {
    color: var(--text-primary);
}

.feature-card-link p {
    color: var(--text-secondary);
}

.feature-card-link .feature-icon i {
    font-size: 2.5rem;
    color: var(--marke-auf-dunkel, var(--primary));
}

/* Focus indicator for feature cards (WCAG 2.4.7) */
.feature-card-link:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(197, 2, 60, 0.25);
    border-color: var(--primary);
}

[data-theme="dark"] .feature-card-link:focus-visible {
    outline-color: #e8365d;
    box-shadow: 0 0 0 4px rgba(232, 54, 93, 0.3);
}

/* =============================================================================
   AUTH SECTION (Login/Register)
   ============================================================================= */

.auth-section {
    padding: 4rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 2rem;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
}

/* =============================================================================
   FORMS
   ============================================================================= */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-group label {
    font-weight: 500;
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-control {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    width: 100%;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-checkbox {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.form-checkbox input[type="checkbox"] {
    width: auto;
}

.form-errors {
    padding: 1rem;
    background: #fff5f5;
    border: 1px solid var(--danger);
    border-radius: var(--radius);
}

.error {
    color: var(--danger);
    font-size: 0.875rem;
}

/* =============================================================================
   MESSAGES / ALERTS
   ============================================================================= */

.messages-container {
    padding: 1rem 0;
}

.messages-container:empty {
    display: none;
    padding: 0;
}

.message {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: messageSlideIn 0.3s ease;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-success {
    background: #d4edda;
    color: #155724;
}

.message-error {
    background: #f8d7da;
    color: #721c24;
}

.message-info {
    background: #d1ecf1;
    color: #0c5460;
}

.message-warning {
    background: #fff3cd;
    color: #856404;
}

.message-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.5;
}

.message-close:hover {
    opacity: 1;
}

/* =============================================================================
   LEGAL PAGES
   ============================================================================= */

.legal-page {
    padding: 4rem 0;
}

.legal-page h1 {
    margin-bottom: 2rem;
}

.legal-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.legal-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.legal-content h4 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.legal-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-content a {
    text-decoration: underline;
}

[data-theme="dark"] .legal-content a {
    color: #ffffff;
}

[data-theme="dark"] .legal-content a:hover {
    color: var(--theme-text-secondary, #a1a1aa);
}

.last-updated {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 2rem;
}

/* =============================================================================
   ERROR PAGES
   ============================================================================= */

.error-page {
    padding: 6rem 0;
    text-align: center;
}

.error-content h1 {
    font-size: 8rem;
    color: var(--danger);
    margin-bottom: 1rem;
}

.error-content h2 {
    margin-bottom: 1rem;
}

.error-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* =============================================================================
   APPS SECTION (Homepage)
   ============================================================================= */

.apps-section {
    position: relative;
    z-index: 2;
    padding: 4rem 0 9rem;
    background: var(--theme-bg-secondary, #f8f9fa);
}



[data-theme="dark"] .apps-section {
    background: var(--theme-bg-secondary, #1e1e1e);
}

[data-theme="dark"] .apps-section__subtitle {
    color: var(--theme-text-secondary, #a1a1aa);
}

.apps-section h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.apps-section__subtitle {
    text-align: center;
    color: #595f66;
    margin-bottom: 2.5rem;
    font-size: 1.0625rem;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.app-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--theme-bg-primary, var(--white));
    border: 1px solid var(--theme-border-color, var(--border-color));
    border-radius: var(--radius, 8px);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.app-card:hover {
    text-decoration: none;
    color: inherit;
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

[data-theme="dark"] .app-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.app-card__icon {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--theme-bg-secondary, var(--light));
    color: var(--marke-auf-dunkel, var(--primary));
    font-size: 1.25rem;
}

[data-theme="dark"] .app-card__icon {
    background: var(--theme-bg-tertiary, #2d2d2d);
}

.app-card__content {
    flex: 1;
    min-width: 0;
}

.app-card__content h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: var(--theme-text-primary, var(--text-primary));
}

.app-card__content p {
    font-size: 0.8125rem;
    color: #595f66;
    margin: 0;
    line-height: 1.4;
}

[data-theme="dark"] .app-card__content p {
    color: var(--theme-text-secondary, #a1a1aa);
}

.app-card__arrow {
    flex-shrink: 0;
    color: var(--theme-text-muted, #9ca3af);
    font-size: 1rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.app-card:hover .app-card__arrow {
    color: var(--marke-auf-dunkel, var(--primary));
    transform: translateX(3px);
}

/* Focus indicator for app cards (WCAG 2.4.7) */
.app-card:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(197, 2, 60, 0.25);
    border-color: var(--primary);
}

[data-theme="dark"] .app-card:focus-visible {
    outline-color: #e8365d;
    box-shadow: 0 0 0 4px rgba(232, 54, 93, 0.3);
}

.apps-section__cta {
    text-align: center;
    margin-top: 0.5rem;
}

/* =============================================================================
   HELP BAND (above footer, all pages)
   ============================================================================= */

.help-band {
    position: relative;
    z-index: 3;
    background: var(--theme-bg-tertiary, #e9ecef);
    padding: 3.5rem 0 3rem;
    margin-top: -40px;
    clip-path: polygon(0 0, 100% 40px, 100% 100%, 0 100%);
}

[data-theme="dark"] .help-band {
    background: #181818;
}

.help-band::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 43px;
    background: #d5d7da;
    clip-path: polygon(0 0, 0 3px, 100% 43px, 100% 40px);
    z-index: 2;
}

[data-theme="dark"] .help-band::before {
    background: #333333;
}

.help-band__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.help-band__title {
    font-size: 1.375rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--theme-text-primary, var(--text-primary));
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.help-band__title i {
    color: var(--marke-auf-dunkel, var(--primary));
    font-size: 1.25rem;
}

.help-band__text p {
    color: #595f66;
    margin: 0;
    max-width: 520px;
    line-height: 1.6;
    font-size: 0.9375rem;
}

[data-theme="dark"] .help-band__text p {
    color: var(--theme-text-secondary, #a1a1aa);
}

.help-band__actions {
    flex-shrink: 0;
    display: flex;
    gap: 0.75rem;
}

.help-band__actions .btn-outline {
    white-space: nowrap;
    border-color: var(--primary, #c5023c);
    color: var(--marke-auf-dunkel, var(--primary));
}

.help-band__actions .btn-outline svg {
    stroke: var(--primary, #c5023c);
}

[data-theme="dark"] .help-band__actions .btn-outline {
    border-color: var(--theme-border-color);
    color: var(--theme-text-primary);
}

[data-theme="dark"] .help-band__actions .btn-outline svg {
    stroke: currentColor;
}

@media (max-width: 700px) {
    .help-band__inner {
        flex-direction: column;
        text-align: center;
    }

    .help-band__text p {
        max-width: 100%;
    }

    .help-band__title {
        justify-content: center;
    }

    .help-band__actions {
        flex-direction: column;
        width: 100%;
    }

    .help-band__actions .btn-outline {
        width: 100%;
        text-align: center;
    }
}

/* =============================================================================
   FOOTER
   ============================================================================= */

.site-footer {
    background: var(--light);
    border-top: 1px solid var(--border-color);
    padding: 1rem 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-info {
    color: #595f66;
}

[data-theme="dark"] .footer-info {
    color: var(--theme-text-secondary, #a1a1aa);
}

.footer-info p {
    margin: 0;
}

/* Fusszeile: Copyright, Cookie-Einstellungen und die Rechtstexte in einer
   Reihe. Die Rechtstexte standen vorher im Kopf und waren dort zu betont —
   Pflichtangaben gehoeren nach unten und duerfen leise sein. Deshalb
   dunkelgrau statt in der Akzentfarbe, Unterstrich erst beim Ueberfahren. */
.footer-zeile {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 1.1rem;
}

.footer-copy {
    color: inherit;
}

.footer-link,
.footer-info p a {
    color: #2b2f34;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.footer-link:hover,
.footer-link:focus-visible,
.footer-info p a:hover,
.footer-info p a:focus-visible {
    color: #000;
    border-bottom-color: currentColor;
}

/* Im dunklen Modus waere "nahe schwarz" unlesbar. Dieselbe Zurueckhaltung
   entsteht dort durch ein gedaempftes Hellgrau. */
[data-theme="dark"] .footer-link,
[data-theme="dark"] .footer-info p a {
    color: #9aa1a9;
}

[data-theme="dark"] .footer-link:hover,
[data-theme="dark"] .footer-link:focus-visible,
[data-theme="dark"] .footer-info p a:hover,
[data-theme="dark"] .footer-info p a:focus-visible {
    color: #e6e8ea;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--marke-auf-dunkel, var(--primary));
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: var(--white);
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(197, 2, 60, 0.25);
}

.theme-toggle-dark {
    display: none;
}

[data-theme="dark"] .theme-toggle-light {
    display: none;
}

[data-theme="dark"] .theme-toggle-dark {
    display: inline;
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */

/* Screen reader only - visually hidden but accessible */
.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;
}

.icon-external {
    vertical-align: -1px;
}

.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-secondary); }
.text-center { text-align: center; }

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 768px) {
    .main-nav {
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }

    .nav-actions {
        gap: 0.5rem;
    }

    .nav-link {
        display: none;
    }

    .btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.875rem;
    }

    .hero {
        padding: 5rem 0 4rem;
        min-height: 60vh;
    }

    .hero__title {
        font-size: 2.5rem;
    }

    .hero__orb--1 {
        width: 300px;
        height: 300px;
    }

    .hero__orb--2 {
        width: 250px;
        height: 250px;
    }

    .hero__orb--3 {
        width: 200px;
        height: 200px;
    }

    .hero__symbol {
        display: none;
    }

    .hero__symbol--1,
    .hero__symbol--2,
    .hero__symbol--4 {
        display: block;
    }

    .form-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}


/* =============================================================================
   Nur für Hilfsmittel sichtbar
   =============================================================================
   Die Regel stand bisher ausschließlich in `main.css` — und die wird auf den
   öffentlichen Seiten gar nicht geladen. Jedes `visually-hidden` im Frontend
   war damit **sichtbar**: Tabellenüberschriften, Beschriftungen von Suchfeldern,
   Sprungmarken. Acht Stellen in sieben Vorlagen.

   Aufgefallen ist es an der Tabelle im Kostenvergleich, wo plötzlich „Your
   current costs, line by line" mitten auf der Seite stand.
   ============================================================================= */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Beim Tabben sichtbar werden — eine Sprungmarke, die niemand sehen kann,
   ist keine. */
.visually-hidden:focus,
.visually-hidden:focus-within {
    position: static !important;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}


/* Hinweis auf ein Werkzeug am Ende einer Erklärseite. Wer bis hierher gelesen
   hat, ist bereit für den nächsten Schritt — und findet ihn sonst nicht, weil
   die Werkzeuge nicht im Hauptmenü stehen. */
.werkzeug-hinweis {
    padding: 2.5rem 0 3rem;
    border-top: 1px solid var(--theme-border, var(--border-color));
}

.werkzeug-hinweis h2 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.3rem, 3vw, 1.75rem);
}

.werkzeug-hinweis p {
    max-width: 40rem;
    margin: 0 0 1.25rem;
    line-height: 1.6;
    color: var(--theme-text-secondary, var(--text-secondary));
}


/* Sehr kleine Geraete (320 px): auch ohne „Deutsch" fehlten 31 px. Logo
   etwas kleiner, Knoepfe enger -- gemessen, nicht geschaetzt.
   ⚠️ Steht am DATEIENDE mit Absicht: der 768-px-Block weiter oben setzt
   dieselben Abstaende und gewann vorher, weil er spaeter kam. */
@media (max-width: 22.5rem) {
    .logo-img { height: 15px; }
    .main-nav { gap: 0.5rem; }
    .nav-actions { gap: 0.25rem; }
}
