/* =========================================
   Crimson Mirage Bauhandwerk — style.css
   Tech-futuristic aesthetic with brand fidelity
   Layout: FLEXBOX ONLY (no grid/columns)
   ========================================= */

/* =========================
   CSS RESET / NORMALIZE
   ========================= */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: #E8EEF2; background-color: #0C1115; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
svg { display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus { outline: 2px solid #34E5FF; outline-offset: 2px; }

/* =========================
   THEME VARIABLES
   ========================= */
:root {
  --primary: #6B0F12; /* karminrot */
  --primary-600: #810F14;
  --secondary: #2E3A43; /* stahlgrau */
  --secondary-700: #1F2A31;
  --accent: #F7F3ED; /* off-white */
  --bg-0: #0C1115; /* base background */
  --bg-1: #0F151B; /* elevated surface */
  --text: #E8EEF2; /* primary text on dark */
  --muted: #A9B3BA; /* muted text */
  --ink: #13181C; /* dark ink on light */
  --neon: #34E5FF; /* tech glow accent */
  --success: #2BD576;
  --warning: #FFD166;
}

/* Fallbacks for older browsers that ignore custom properties */
body { background-color: #0C1115; color: #E8EEF2; }

/* =========================
   TYPOGRAPHY
   ========================= */
body { font-size: 16px; }

h1, h2, h3, h4 { font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; margin: 0 0 16px; line-height: 1.25; letter-spacing: 0.2px; }

h1 { font-size: 32px; }
h2 { font-size: 24px; margin-top: 8px; }
h3 { font-size: 18px; }
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
li { margin: 0; }
strong { font-weight: 700; }

@media (min-width: 768px) {
  h1 { font-size: 44px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }
}

/* =========================
   GLOBAL LAYOUT HELPERS (Flex Only)
   ========================= */
.container { display: flex; justify-content: center; width: 100%; padding: 0 16px; }
.content-wrapper { display: flex; flex-direction: column; gap: 20px; width: 100%; max-width: 1200px; }

/* Mandatory spacing and alignment patterns */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; display: flex; flex-direction: column; gap: 12px; }
.content-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.text-image-section { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

@media (max-width: 768px) {
  .text-image-section { flex-direction: column; align-items: center; }
}

/* =========================
   ELEVATION & SURFACES
   ========================= */
.surface { background-color: var(--bg-1); border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; box-shadow: 0 6px 18px rgba(0,0,0,0.28); }

/* =========================
   HEADER & NAVIGATION
   ========================= */
.site-header { position: sticky; top: 0; z-index: 1000; background-color: rgba(15,21,27,0.92); backdrop-filter: saturate(120%); border-bottom: 1px solid rgba(52,229,255,0.18); box-shadow: 0 6px 24px rgba(0,0,0,0.3); }
.site-header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; padding: 14px 0; }

.logo { display: flex; align-items: center; }
.logo img { height: 36px; width: auto; filter: drop-shadow(0 0 10px rgba(52,229,255,0.25)); }

.main-nav { display: none; align-items: center; gap: 18px; }
.main-nav a { color: #DCE5EA; padding: 8px 6px; border-radius: 8px; transition: color .2s ease, background-color .2s ease, box-shadow .3s ease; }
.main-nav a:hover { color: #FFFFFF; background-color: rgba(52,229,255,0.08); box-shadow: 0 0 0 1px rgba(52,229,255,0.3) inset; }
.main-nav a[aria-current="page"] { color: #FFFFFF; background-color: rgba(107,15,18,0.28); box-shadow: 0 0 0 1px rgba(107,15,18,0.6) inset, 0 0 18px rgba(107,15,18,0.35); }

.header-ctas { display: none; align-items: center; gap: 10px; }

.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background-color: rgba(46,58,67,0.5); color: #E8EEF2; border: 1px solid rgba(52,229,255,0.25); cursor: pointer; transition: transform .2s ease, box-shadow .3s ease; }
.mobile-menu-toggle:hover { transform: translateY(-1px); box-shadow: 0 0 14px rgba(52,229,255,0.35); }

@media (min-width: 992px) {
  .main-nav { display: flex; }
  .header-ctas { display: flex; }
  .mobile-menu-toggle { display: none; }
}

/* =========================
   MOBILE MENU (Overlay + Slide)
   ========================= */
.mobile-menu { position: fixed; inset: 0; background-color: rgba(8,12,16,0.9); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .35s ease; z-index: 1200; }
.mobile-menu.open { transform: translateX(0); }

.mobile-menu-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 10px; background-color: rgba(46,58,67,0.7); color: #E8EEF2; border: 1px solid rgba(52,229,255,0.25); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }

.mobile-nav { display: flex; flex-direction: column; gap: 8px; margin-top: 64px; padding: 16px; }
.mobile-nav a { display: flex; align-items: center; padding: 14px 12px; border-radius: 10px; color: #E8EEF2; background-color: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.06); transition: background-color .2s ease, border-color .2s ease, box-shadow .3s ease; }
.mobile-nav a:hover { background-color: rgba(52,229,255,0.08); border-color: rgba(52,229,255,0.3); box-shadow: 0 0 0 1px rgba(52,229,255,0.35) inset; }
.mobile-nav a[aria-current="page"] { background-color: rgba(107,15,18,0.35); border-color: rgba(107,15,18,0.75); box-shadow: 0 0 18px rgba(107,15,18,0.45); }

/* =========================
   HERO SECTIONS
   ========================= */
.hero { position: relative; overflow: hidden; background-color: #0B1217; padding: 48px 0; border-bottom: 1px solid rgba(52,229,255,0.12); }
.hero .container { position: relative; }
.hero .content-wrapper { padding: 8px 0; }
.hero p { color: #C9D4DA; }
.hero ul { color: #D6E1E7; }

/* subtle tech gradient (solid fallback + light gradient) */
.hero::before { content: ""; position: absolute; inset: -10%; background: radial-gradient(60% 60% at 80% 10%, rgba(52,229,255,0.16), rgba(107,15,18,0.18) 40%, rgba(12,17,21,0) 70%); pointer-events: none; z-index: 0; }
.hero .content-wrapper > * { position: relative; z-index: 1; }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.trust { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: #BFD3DB; }
.trust span { display: inline-flex; align-items: center; gap: 8px; background-color: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); padding: 8px 10px; border-radius: 999px; }
.trust img { width: 16px; height: 16px; }

/* =========================
   BUTTONS
   ========================= */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px; border-radius: 12px; border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .3s ease, background-color .2s ease, border-color .2s ease, color .2s ease; text-align: center; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background-color: var(--primary); color: #FFFFFF; border-color: rgba(107,15,18,0.8); box-shadow: 0 8px 22px rgba(107,15,18,0.35), 0 0 0 1px rgba(107,15,18,0.6) inset; }
.btn-primary:hover { background-color: var(--primary-600); box-shadow: 0 10px 26px rgba(107,15,18,0.5), 0 0 24px rgba(107,15,18,0.55), 0 0 0 1px rgba(107,15,18,0.8) inset; }

.btn-secondary { background-color: transparent; color: #E8EEF2; border-color: rgba(52,229,255,0.4); box-shadow: 0 0 0 1px rgba(52,229,255,0.4) inset; }
.btn-secondary:hover { background-color: rgba(52,229,255,0.08); box-shadow: 0 0 18px rgba(52,229,255,0.35), 0 0 0 1px rgba(52,229,255,0.6) inset; }

/* =========================
   GENERIC SECTIONS & TEXT BLOCKS
   ========================= */
section { margin-bottom: 60px; padding: 40px 0; }
.text-section { display: flex; flex-direction: column; gap: 12px; }

/* Alternating subtle surfaces for readability */
main section:nth-of-type(even) { background-color: #0E141A; }
main section:nth-of-type(odd) { background-color: transparent; }

/* Links in content */
.content-wrapper a { color: #BDEBFA; text-decoration: underline; text-underline-offset: 2px; }
.content-wrapper a:hover { color: #FFFFFF; text-decoration-thickness: 2px; }

/* Icon alignment inside text */
.text-section img { display: inline-block; vertical-align: middle; margin-right: 6px; }

/* =========================
   LISTS & STEPS
   ========================= */
ol { counter-reset: item; }
ol > li { position: relative; padding-left: 36px; }
ol > li::before { content: counter(item) "."; counter-increment: item; position: absolute; left: 0; top: 0; color: #BDEBFA; font-weight: 700; }

/* =========================
   TESTIMONIALS (Light surface, dark text)
   ========================= */
.testimonial-card { background-color: var(--accent); color: var(--ink); border: 1px solid rgba(46,58,67,0.18); border-radius: 14px; box-shadow: 0 10px 24px rgba(0,0,0,0.18); }
.testimonial-card p { margin: 0; }
.testimonial-card strong { color: #11181C; }

/* =========================
   CARDS (Generic)
   ========================= */
.card { background-color: var(--bg-1); border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; padding: 18px; box-shadow: 0 8px 22px rgba(0,0,0,0.28); }
.card:hover { box-shadow: 0 10px 28px rgba(0,0,0,0.36); }

/* =========================
   FOOTER
   ========================= */
.site-footer { background-color: #0A0F13; border-top: 1px solid rgba(52,229,255,0.14); padding-top: 32px; }
.site-footer .content-wrapper { gap: 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.footer-links > div { display: flex; flex-direction: column; gap: 10px; min-width: 220px; flex: 1 1 220px; }
.footer-links h3 { color: #FFFFFF; font-size: 16px; margin-bottom: 6px; }
.footer-links a { color: #C8D3DA; }
.footer-links a:hover { color: #FFFFFF; text-decoration: underline; text-underline-offset: 2px; }
.footer-brand { color: #C8D3DA; }
.social { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.copyright { display: flex; justify-content: center; padding: 16px 0 28px; border-top: 1px solid rgba(255,255,255,0.06); color: #9FB0B9; }

/* =========================
   NAV ACTIVE STATES / UTILITIES
   ========================= */
[aria-current="page"] { position: relative; }
[aria-current="page"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -6px; height: 2px; background: linear-gradient(90deg, rgba(52,229,255,0) 0%, rgba(52,229,255,0.8) 50%, rgba(52,229,255,0) 100%); border-radius: 2px; }

/* =========================
   RESPONSIVE ALIGNMENT
   ========================= */
@media (min-width: 768px) {
  .content-wrapper { gap: 24px; }
  .hero { padding: 64px 0; }
}

/* =========================
   ACCESSIBLE TABLE-LIKE LAYOUTS WITH FLEX (if needed)
   ========================= */
.content-grid > * { flex: 1 1 300px; }
.card-container > * { flex: 1 1 280px; }

/* =========================
   FORMS (generic, for future use)
   ========================= */
input[type="text"], input[type="email"], input[type="tel"], textarea { width: 100%; background-color: #0F151B; color: #E8EEF2; border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; padding: 12px 14px; transition: border-color .2s ease, box-shadow .2s ease; }
input:focus, textarea:focus { border-color: rgba(52,229,255,0.4); box-shadow: 0 0 0 3px rgba(52,229,255,0.15); }
label { display: flex; margin-bottom: 6px; color: #CCD7DE; }

/* =========================
   COOKIE CONSENT BANNER & MODAL
   ========================= */
.cookie-banner { position: fixed; left: 50%; transform: translateX(-50%) translateY(20px); bottom: 0; width: min(960px, 92%); background-color: #0F151B; color: #E8EEF2; border: 1px solid rgba(52,229,255,0.18); border-radius: 14px; padding: 16px; box-shadow: 0 18px 44px rgba(0,0,0,0.45), 0 0 0 1px rgba(52,229,255,0.15) inset; display: none; flex-direction: column; gap: 12px; z-index: 1400; opacity: 0; transition: transform .35s ease, opacity .35s ease; }
.cookie-banner.show { display: flex; transform: translateX(-50%) translateY(0); opacity: 1; }
.cookie-banner .cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-banner .btn { padding: 10px 14px; border-radius: 10px; }
.cookie-accept { background-color: var(--success); color: #082011; border-color: rgba(43,213,118,0.8); }
.cookie-accept:hover { box-shadow: 0 0 20px rgba(43,213,118,0.35); }
.cookie-reject { background-color: transparent; color: #E8EEF2; border: 1px solid rgba(255,255,255,0.25); }
.cookie-reject:hover { background-color: rgba(255,255,255,0.06); }
.cookie-settings { background-color: transparent; color: #BDEBFA; border: 1px solid rgba(52,229,255,0.45); }
.cookie-settings:hover { background-color: rgba(52,229,255,0.08); box-shadow: 0 0 16px rgba(52,229,255,0.35); }

.cookie-overlay { position: fixed; inset: 0; background: rgba(8,12,16,0.65); display: none; align-items: center; justify-content: center; z-index: 1500; }
.cookie-overlay.show { display: flex; }
.cookie-modal { background-color: #0F151B; border: 1px solid rgba(52,229,255,0.2); border-radius: 16px; width: min(720px, 92%); padding: 18px; box-shadow: 0 18px 48px rgba(0,0,0,0.6); display: flex; flex-direction: column; gap: 16px; }
.cookie-modal-header { display: flex; justify-content: space-between; align-items: center; }
.cookie-modal-body { display: flex; flex-direction: column; gap: 12px; }
.cookie-category { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border-radius: 12px; background-color: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); }
.cookie-modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* Toggle switch */
.switch { position: relative; width: 44px; height: 26px; background-color: #24313A; border-radius: 999px; border: 1px solid rgba(255,255,255,0.12); transition: background-color .2s ease, border-color .2s ease; display: inline-flex; align-items: center; }
.switch::after { content: ""; width: 20px; height: 20px; background: #E8EEF2; border-radius: 50%; margin-left: 3px; transition: transform .25s ease; box-shadow: 0 2px 8px rgba(0,0,0,0.35); }
.switch.on { background-color: rgba(52,229,255,0.35); border-color: rgba(52,229,255,0.6); }
.switch.on::after { transform: translateX(18px); }

/* =========================
   UTILITIES & MISC
   ========================= */
.muted { color: var(--muted); }
.center { display: flex; align-items: center; justify-content: center; }
.spacer-20 { height: 20px; }
.hide { display: none !important; }

/* Ensure minimum spacing between content blocks */
.content-wrapper > * + * { margin-top: 0; }
.content-wrapper > .testimonial-card { margin-top: 0; }
.content-wrapper > * { min-height: 0; }

/* =========================
   PAGE-SPECIFIC TWEAKS
   ========================= */
/* 404 highlight */
body:has(main h1:contains("Seite nicht gefunden")) .hero { background-color: #120F12; }
/* Note: :has and :contains are progressive enhancement; safe to ignore if unsupported. */

/* =========================
   MEDIA QUERIES
   ========================= */
@media (min-width: 992px) {
  .footer-links { justify-content: space-between; }
}

/* =========================
   HYPERLINK STATES
   ========================= */
a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* =========================
   SAFETY: Prevent overlaps with adequate spacing
   ========================= */
.hero-ctas .btn, .header-ctas .btn { margin: 0; }
.content-wrapper > .testimonial-card + .testimonial-card { margin-top: 20px; }

/* =========================
   PRINT (basic)
   ========================= */
@media print {
  .site-header, .site-footer, .mobile-menu, .cookie-banner, .cookie-overlay { display: none !important; }
  body { background: #FFFFFF; color: #000000; }
}
