/* ============================================================
   RCo-Energie – gemeinsames Framework (Dachmarke: Petrol + Grün)
   Pro Seite zusätzlich nur die seiten-spezifischen Komponenten inline.
   ============================================================ */
:root{
  --bg:#F2F6F3; --surface:#FFFFFF; --surface-2:#EAF1EC;
  --fg:#13241F; --muted:#586C66; --line:#E0EAE3;
  --brand:#0F3D3B; --brand-2:#17534E; --brand-ink:#EAF4EE;
  --accent:#8FC66A; --accent-2:#BCE394; --accent-ink:#0E2C12;
  --warm:#E6A84C; --rot:#C0623B;
  --halo-1:rgba(143,198,106,.45); --halo-2:rgba(23,83,78,.40);
  --maxw:1120px; --r:18px; --r-sm:12px;
  --shadow:0 1px 2px rgba(16,40,34,.05), 0 12px 32px -14px rgba(16,40,34,.22);
  --shadow-lg:0 2px 4px rgba(16,40,34,.06), 0 30px 60px -22px rgba(16,40,34,.30);
  --f-display:"Bricolage Grotesque", Georgia, serif;
  --f-body:"Manrope", system-ui, -apple-system, sans-serif;
  color-scheme:light;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0; background:var(--bg); color:var(--fg); font-family:var(--f-body); line-height:1.55; -webkit-font-smoothing:antialiased;}
h1,h2,h3{font-family:var(--f-display); font-weight:700; line-height:1.1; text-wrap:balance; letter-spacing:-.01em; margin:0;}
p{margin:0;}
img{max-width:100%;}
a{color:inherit; text-decoration:none;}
.skip{position:absolute; left:-999px; top:0; background:var(--brand); color:var(--brand-ink); padding:10px 16px; border-radius:0 0 10px 0; z-index:60;}
.skip:focus{left:0;}
:focus-visible{outline:3px solid var(--accent); outline-offset:2px; border-radius:4px;}
.wrap{max-width:var(--maxw); margin-inline:auto; padding-left:max(20px,env(safe-area-inset-left,0px)); padding-right:max(20px,env(safe-area-inset-right,0px));}
.eyebrow{font-size:.78rem; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:var(--brand-2);}
.muted{color:var(--muted);}
.center{margin-inline:auto; text-align:center;}

/* ---- Header ---- */
header.site{position:sticky; top:env(safe-area-inset-top,0px); z-index:20; background:color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter:blur(10px); border-bottom:1px solid var(--line);}
body::before{content:""; position:fixed; inset:0 0 auto; height:env(safe-area-inset-top,0px); background:var(--bg); z-index:21;}
header.site .wrap{display:flex; align-items:center; justify-content:space-between; gap:16px; padding-block:14px;}
.logo{display:flex; align-items:center; gap:12px; font-family:var(--f-display); font-weight:700; font-size:1.18rem; letter-spacing:-.02em;}
.logo-mark{height:40px; width:auto; flex:none; display:block;}
.logo-mark .st0{fill:var(--brand);}
.logo-mark .st1{fill:var(--accent);}
footer.site .logo-mark{height:34px;}
.logo small{display:block; font-family:var(--f-body); font-weight:600; font-size:.6rem; letter-spacing:.14em; text-transform:uppercase; color:var(--muted); margin-top:2px;}
nav.main{display:flex; gap:24px; font-size:.92rem; font-weight:600;}
nav.main a{color:var(--muted); transition:color .18s;}
nav.main a:hover, nav.main a.active{color:var(--fg);}
nav.main a.active{color:var(--brand);}

/* ---- Buttons ---- */
.btn{display:inline-flex; align-items:center; gap:9px; font:inherit; font-weight:700; font-size:.92rem; border-radius:999px; padding:12px 22px; cursor:pointer; border:1.5px solid transparent; transition:transform .16s, box-shadow .2s, background .2s, border-color .2s;}
.btn:hover{transform:translateY(-2px);}
.btn-primary{background:var(--brand); color:var(--brand-ink); box-shadow:var(--shadow);}
.btn-primary:hover{box-shadow:var(--shadow-lg);}
.btn-accent{background:var(--accent); color:var(--accent-ink); box-shadow:var(--shadow);}
.btn-ghost{background:transparent; color:var(--fg); border-color:var(--line);}
.btn-ghost:hover{border-color:var(--brand-2); color:var(--brand-2);}
.btn.sm{padding:9px 16px; font-size:.84rem;}
.arrow{transition:transform .18s;}
.btn:hover .arrow{transform:translateX(3px);}

/* ---- Mobil-Menü ---- */
.burger{display:none; background:var(--surface); border:1.5px solid var(--line); border-radius:11px; width:42px; height:42px; cursor:pointer; color:var(--fg); align-items:center; justify-content:center;}
.burger svg{width:22px; height:22px;}
.mnav{display:none;}

/* ---- Hero-Gerüst ---- */
.hero{position:relative; overflow:hidden;}
.hero .wrap{position:relative; z-index:1; padding-block:56px 64px;}
.blob{position:absolute; border-radius:50%; filter:blur(55px); opacity:.9; z-index:0; pointer-events:none;}
.blob.a{width:540px; height:540px; background:radial-gradient(circle at 30% 30%, var(--halo-1), transparent 70%); top:-180px; right:-120px; animation:float1 16s ease-in-out infinite;}
.blob.b{width:460px; height:460px; background:radial-gradient(circle at 60% 40%, var(--halo-2), transparent 70%); top:40px; left:-160px; animation:float2 20s ease-in-out infinite;}
@keyframes float1{0%,100%{transform:translate(0,0)}50%{transform:translate(-26px,30px)}}
@keyframes float2{0%,100%{transform:translate(0,0)}50%{transform:translate(30px,-22px)}}
.crumb{font-size:.82rem; font-weight:600; color:var(--muted); margin-bottom:18px; display:flex; gap:8px; align-items:center;}
.crumb a:hover{color:var(--fg);} .crumb .sep{opacity:.5;}
.hero-grid{display:grid; grid-template-columns:1.1fr .9fr; gap:46px; align-items:center;}
.pill{display:inline-flex; align-items:center; gap:9px; background:var(--surface); border:1px solid var(--line); border-radius:999px; padding:7px 15px 7px 10px; font-size:.82rem; font-weight:600; color:var(--muted); box-shadow:var(--shadow); margin-bottom:20px;}
.pill .d{width:8px; height:8px; border-radius:50%; background:var(--accent); box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 30%, transparent);}
.hero-h{font-size:clamp(2.3rem,5vw,3.7rem);}
.hero-h .hl{position:relative; white-space:nowrap;}
.hero-h .hl::after{content:""; position:absolute; left:0; right:0; bottom:.06em; height:.28em; background:var(--accent); opacity:.42; border-radius:3px; z-index:-1;}
.hero-sub{font-size:1.15rem; color:var(--muted); margin:20px 0 28px; max-width:42ch;}
.hero-cta{display:flex; gap:13px; flex-wrap:wrap;}
.hero-proof{display:flex; gap:30px; margin-top:34px; flex-wrap:wrap;}
.hero-proof div{display:flex; flex-direction:column;}
.hero-proof b{font-family:var(--f-display); font-size:1.4rem; color:var(--brand); font-variant-numeric:tabular-nums;}
.hero-proof span{font-size:.8rem; color:var(--muted); font-weight:600;}

/* ---- Glas-/Mock-Karten ---- */
.glass{background:var(--surface); border:1px solid var(--line); border-radius:22px; box-shadow:var(--shadow-lg); overflow:hidden;}
.glass .bar{display:flex; align-items:center; gap:6px; padding:12px 14px; border-bottom:1px solid var(--line); background:var(--surface-2);}
.glass .bar i{width:10px; height:10px; border-radius:50%; background:var(--line);}
.glass .bar .t{margin-left:8px; font-size:.74rem; font-weight:700; color:var(--muted);}
.glass .body{padding:16px; display:grid; gap:12px;}
.kpi-row{display:grid; grid-template-columns:1fr 1fr; gap:10px;}
.kpi{background:var(--surface-2); border-radius:12px; padding:12px;}
.kpi .l{font-size:.66rem; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:var(--muted);}
.kpi .v{font-family:var(--f-display); font-size:1.3rem; color:var(--brand); font-variant-numeric:tabular-nums;}
.kpi .v.up{color:var(--accent-ink);}
.kpi .v small{font-size:.7rem;}
.spark{height:64px; border-radius:12px; background:linear-gradient(180deg, color-mix(in srgb,var(--accent) 20%, var(--surface)), var(--surface)); position:relative; overflow:hidden; border:1px solid var(--line);}
.spark svg{position:absolute; inset:0; width:100%; height:100%;}

/* ---- Sektionen ---- */
section{padding-block:66px;}
.sec-head{max-width:62ch; margin-bottom:40px;}
.sec-head h2{font-size:clamp(1.7rem,3.4vw,2.5rem); margin:12px 0 14px;}
.sec-head p{font-size:1.06rem; color:var(--muted);}

/* ---- Icon-Kachel (helleres Grün) ---- */
.ico{width:46px; height:46px; border-radius:13px; background:linear-gradient(135deg,var(--accent),var(--accent-2)); color:var(--accent-ink); display:grid; place-items:center; flex:none; box-shadow:var(--shadow);}
.ico svg{width:23px; height:23px;}

/* ---- Badges / Tags ---- */
.badge{font-size:.64rem; font-weight:800; letter-spacing:.07em; text-transform:uppercase; border-radius:999px; padding:4px 10px; white-space:nowrap;}
.badge.live{background:var(--accent); color:var(--accent-ink);}
.badge.soon{background:var(--surface-2); color:var(--brand-2);}
.badge.dev{background:color-mix(in srgb,var(--warm) 24%, var(--surface)); color:color-mix(in srgb,var(--warm) 62%, var(--fg));}
.tag{font-size:.64rem; font-weight:800; letter-spacing:.07em; text-transform:uppercase; border-radius:999px; padding:5px 11px;}
.tag.dev{background:color-mix(in srgb,var(--warm) 22%, var(--surface)); color:color-mix(in srgb,var(--warm) 62%, var(--fg));}
.tag.eu, .tag.ref{background:var(--surface); border:1px solid var(--line); color:var(--brand-2);}
.tag.ios{background:var(--accent); color:var(--accent-ink);}

/* ---- Statement-Band ---- */
.statement{background:var(--brand); color:var(--brand-ink);}
.statement .wrap{padding-block:54px;}
.statement .eyebrow{color:var(--accent);}
.statement h2{font-size:clamp(1.6rem,3.2vw,2.3rem); max-width:26ch; margin-top:12px;}
.statement p{color:color-mix(in srgb,var(--brand-ink) 80%, transparent); margin-top:16px; max-width:58ch; font-size:1.06rem;}

/* ---- CTA-Band ---- */
.cta-band{position:relative; overflow:hidden; background:linear-gradient(130deg,var(--brand),var(--brand-2)); color:var(--brand-ink); border-radius:26px; padding:54px 44px; text-align:center;}
.cta-band::before{content:""; position:absolute; width:400px; height:400px; border-radius:50%; background:radial-gradient(circle,var(--halo-1),transparent 70%); top:-170px; left:-90px; opacity:.6;}
.cta-band h2{font-size:clamp(1.8rem,3.6vw,2.5rem); position:relative;}
.cta-band p{color:color-mix(in srgb,var(--brand-ink) 82%, transparent); margin:14px auto 26px; max-width:48ch; position:relative; font-size:1.05rem;}
.cta-band .hero-cta{justify-content:center; position:relative;}
.cta-band .btn-ghost{color:var(--brand-ink); border-color:rgba(255,255,255,.3);}
.cta-band .btn-ghost:hover{border-color:var(--brand-ink); color:var(--brand-ink);}

/* ---- Footer ---- */
footer.site{border-top:1px solid var(--line); padding-block:44px 56px; margin-top:20px;}
footer.site .cols{display:flex; justify-content:space-between; gap:28px; flex-wrap:wrap; align-items:flex-start;}
.fcol{display:flex; flex-direction:column; gap:8px; font-size:.9rem; color:var(--muted); max-width:300px;}
.fcol b{color:var(--fg); font-family:var(--f-display); margin-bottom:4px;}
footer.site a:hover{color:var(--fg);}
.legal{margin-top:26px; padding-top:20px; border-top:1px solid var(--line); font-size:.8rem; color:var(--muted); line-height:1.7;}
/* Förderhinweis (Footer) */
.foerder{margin-top:34px; padding-top:24px; border-top:1px solid var(--line);}
.foerder .foerder-txt{font-size:.82rem; color:var(--muted); max-width:62ch; margin-bottom:14px;}
.foerder .eu-logo{width:100%; max-width:460px; height:auto; display:block;}

/* ---- Scroll-Reveal (sichtbarer Ruhezustand) ---- */
.rise{opacity:1; transform:none;}
@media (prefers-reduced-motion:no-preference){
  .js .rise{opacity:0; transform:translateY(18px); transition:opacity .6s ease, transform .6s ease;}
  .js .rise.in{opacity:1; transform:none;}
}
@media (prefers-reduced-motion:reduce){ .blob{animation:none !important;} }

/* ---- Mobil ---- */
@media (max-width:860px){
  .burger{display:inline-flex;}
  header.site .wrap > a.btn{display:none;}
  nav.main{display:none;}
  .mnav.open{display:flex;}
  .mnav{position:fixed; inset:0; z-index:40; background:var(--bg); padding:calc(env(safe-area-inset-top,0px) + 18px) max(20px,env(safe-area-inset-right,0px)) 24px max(20px,env(safe-area-inset-left,0px)); flex-direction:column;}
  .mnav .top{display:flex; justify-content:space-between; align-items:center; margin-bottom:14px;}
  .mnav .mlogo{font-family:var(--f-display); font-weight:700; font-size:1.1rem;}
  .mnav .close{background:var(--surface); border:1.5px solid var(--line); border-radius:11px; width:42px; height:42px; cursor:pointer; color:var(--fg); display:grid; place-items:center;}
  .mnav .mlinks{display:flex; flex-direction:column;}
  .mnav a.ml{font-family:var(--f-display); font-size:1.5rem; font-weight:600; color:var(--fg); padding:16px 2px; border-bottom:1px solid var(--line);}
  .mnav a.mcta{margin-top:20px; justify-content:center; font-size:1rem;}
  .hero-grid{grid-template-columns:1fr; gap:34px;}
}
@media (max-width:540px){
  .hero .wrap{padding-block:40px 46px;}
}

/* ===== Dark Mode: automatisch (System) + manueller Umschalter =====
   Dunkel greift, wenn das System dunkel ist (und nicht manuell auf hell gestellt),
   oder wenn manuell auf dunkel gestellt wurde. */
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#0E1613; --surface:#15211C; --surface-2:#1C2A24;
    --fg:#E8F1EC; --muted:#96A99F; --line:#2A3A33;
    --brand:#18574F; --brand-2:#1F6A62; --brand-ink:#EAF4EE;
    --accent:#8FC66A; --accent-2:#BCE394; --accent-ink:#0E2C12;
    --warm:#E6A84C; --rot:#E07A53;
    --halo-1:rgba(143,198,106,.20); --halo-2:rgba(23,83,78,.40);
    color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --bg:#0E1613; --surface:#15211C; --surface-2:#1C2A24;
  --fg:#E8F1EC; --muted:#96A99F; --line:#2A3A33;
  --brand:#18574F; --brand-2:#1F6A62; --brand-ink:#EAF4EE;
  --accent:#8FC66A; --accent-2:#BCE394; --accent-ink:#0E2C12;
  --warm:#E6A84C; --rot:#E07A53;
  --halo-1:rgba(143,198,106,.20); --halo-2:rgba(23,83,78,.40);
  color-scheme:dark;
}
/* Dark-spezifische Komponenten-Anpassungen (System-dunkel ODER manuell dunkel) */
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]) :is(.eyebrow,.role,.card .role,.more,.card .more,.kpi .v,.kpi .v.up,.hero-proof b,.rrow .dn,.badge.soon,.tag.eu,.tag.ref,.live-dot){ color:var(--accent); }
  :root:not([data-theme="light"]) .logo-mark .st0{ fill:var(--brand-ink); }
}
:root[data-theme="dark"] :is(.eyebrow,.role,.card .role,.more,.card .more,.kpi .v,.kpi .v.up,.hero-proof b,.rrow .dn,.badge.soon,.tag.eu,.tag.ref,.live-dot){ color:var(--accent); }
:root[data-theme="dark"] .logo-mark .st0{ fill:var(--brand-ink); }

/* Förderlogo immer auf weißem Grund (EFRE-Vorgabe + Dark-Mode-Lesbarkeit) */
.foerder .eu-logo, .foerder-foot img, .foerder-box .foerder-logo{ background:#fff; padding:12px; border-radius:10px; }

/* ---- Theme-Umschalter ---- */
.theme-toggle{display:inline-grid; place-items:center; width:42px; height:42px; border-radius:11px; border:1.5px solid var(--line); background:var(--surface); color:var(--fg); cursor:pointer; flex:none; transition:border-color .2s, transform .15s;}
.theme-toggle:hover{border-color:var(--brand-2); transform:translateY(-1px);}
.theme-toggle svg{width:20px; height:20px;}
.theme-toggle .i-sun{display:none;}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]) .theme-toggle .i-sun{display:block;}
  :root:not([data-theme="light"]) .theme-toggle .i-moon{display:none;}
}
:root[data-theme="dark"] .theme-toggle .i-sun{display:block;}
:root[data-theme="dark"] .theme-toggle .i-moon{display:none;}
