/*
Theme Name: WrkDrvn
Theme URI: https://wrkdrvn.com
Author: WrkDrvn
Author URI: https://wrkdrvn.com
Description: Isometric-Circuit-Theme für WrkDrvn — Software, AI-Integration, Security, EU-Hosting. Dark, technisch, mit bewegten Neuron-Firing-Hintergründen.
Version: 0.1.0
Requires at least: 6.2
Tested up to: 6.5
Requires PHP: 7.4
License: GPL v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wrkdrvn
Tags: custom-menu, custom-logo, translation-ready, two-columns, editor-style
*/

/* ─── DESIGN TOKENS ──────────────────────────────────────────────────── */
:root {
  --wd-bg: #07090F;
  --wd-bg-2: #0C0F18;
  --wd-panel: #121724;
  --wd-line: rgba(255, 255, 255, 0.06);
  --wd-line-strong: rgba(255, 255, 255, 0.14);
  --wd-text: #EAEEF6;
  --wd-muted: #8A94A8;
  --wd-faint: #4A5468;
  --wd-accent: #E06545;
  --wd-accent-2: #c54e2e;
  --wd-cyan: #7DD3FC;

  --wd-font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --wd-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  --wd-radius-sm: 6px;
  --wd-radius: 8px;
  --wd-radius-lg: 12px;
  --wd-radius-xl: 16px;

  --wd-container: 1440px;
}

/* ─── RESET ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--wd-bg);
  color: var(--wd-text);
  font-family: var(--wd-font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video, canvas { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ─── LAYOUT ─────────────────────────────────────────────────────────── */
.wd-container { max-width: var(--wd-container); margin: 0 auto; padding: 0 48px; }
@media (max-width: 900px) { .wd-container { padding: 0 24px; } }

/* ─── HEADER ─────────────────────────────────────────────────────────── */
.wd-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 9, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--wd-line);
}
.wd-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 48px; max-width: var(--wd-container); margin: 0 auto;
}
.wd-brand {
  font-family: var(--wd-font-mono); font-size: 18px; font-weight: 600;
  letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px;
}
.wd-brand__dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--wd-accent);
  box-shadow: 0 0 12px var(--wd-accent);
}
.wd-nav { display: flex; gap: 32px; font-family: var(--wd-font-mono); font-size: 14px; }
.wd-nav a { color: var(--wd-muted); transition: color 0.15s; }
.wd-nav a:hover, .wd-nav a.current-menu-item, .wd-nav .current-menu-item > a { color: var(--wd-text); }
.wd-header__actions { display: flex; align-items: center; gap: 16px; }
.wd-lang-switcher { font-family: var(--wd-font-mono); font-size: 12px; color: var(--wd-faint); letter-spacing: 0.1em; }
.wd-lang-switcher a { margin: 0 4px; }
.wd-lang-switcher a.current-lang { color: var(--wd-text); }

/* ─── BUTTONS ────────────────────────────────────────────────────────── */
.wd-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--wd-font-mono); font-size: 14px;
  padding: 14px 24px; border-radius: var(--wd-radius);
  border: 1px solid var(--wd-line); background: var(--wd-panel); color: var(--wd-text);
  transition: all 0.15s;
}
.wd-btn:hover { border-color: var(--wd-line-strong); }
.wd-btn--primary {
  background: linear-gradient(180deg, var(--wd-accent) 0%, var(--wd-accent-2) 100%);
  color: #fff; border: none;
  box-shadow: 0 0 0 1px rgba(224, 101, 69, 0.4), 0 8px 32px rgba(224, 101, 69, 0.25);
}
.wd-btn--primary:hover { filter: brightness(1.08); }

/* ─── CHIPS ──────────────────────────────────────────────────────────── */
.wd-chip {
  display: inline-block; font-family: var(--wd-font-mono); font-size: 11px;
  padding: 6px 12px; border-radius: 999px; letter-spacing: 0.15em;
  text-transform: uppercase;
}
.wd-chip--accent { color: var(--wd-accent); border: 1px solid rgba(224, 101, 69, 0.33); background: rgba(224, 101, 69, 0.08); }
.wd-chip--cyan { color: var(--wd-cyan); border: 1px solid rgba(125, 211, 252, 0.33); background: rgba(125, 211, 252, 0.08); }

/* ─── HERO ───────────────────────────────────────────────────────────── */
.wd-hero { padding: 80px 48px 96px; position: relative; overflow: hidden; }
.wd-hero__grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center;
  max-width: var(--wd-container); margin: 0 auto;
}
.wd-hero__eyebrow { font-family: var(--wd-font-mono); font-size: 12px; color: var(--wd-muted); letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 24px; }
.wd-hero__title {
  font-family: var(--wd-font-mono); font-weight: 600;
  font-size: 88px; line-height: 0.98; letter-spacing: -0.045em;
  margin: 0 0 32px;
}
.wd-hero__title--accent {
  background: linear-gradient(90deg, var(--wd-cyan) 0%, var(--wd-text) 40%, var(--wd-accent) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.wd-hero__lead {
  font-size: 18px; color: var(--wd-muted); line-height: 1.6;
  max-width: 540px; margin: 0 0 36px;
}
.wd-hero__lead em { color: var(--wd-text); font-style: normal; }
.wd-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.wd-hero__canvas-wrap {
  position: relative; aspect-ratio: 620 / 460;
  border-radius: var(--wd-radius-lg);
  overflow: hidden;
}
.wd-hero__canvas { width: 100%; height: 100%; display: block; }

@media (max-width: 900px) {
  .wd-hero__grid { grid-template-columns: 1fr; gap: 32px; }
  .wd-hero__title { font-size: 56px; }
}

/* ─── TRUST BAR ──────────────────────────────────────────────────────── */
.wd-trust {
  padding: 32px 48px;
  border-top: 1px solid var(--wd-line);
  border-bottom: 1px solid var(--wd-line);
  background: var(--wd-bg-2);
}
.wd-trust__inner {
  display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap;
  max-width: var(--wd-container); margin: 0 auto;
  font-family: var(--wd-font-mono); font-size: 11px; color: var(--wd-faint); letter-spacing: 0.2em;
}
.wd-trust__logos { display: flex; gap: 56px; color: var(--wd-muted); font-size: 14px; letter-spacing: 0.05em; flex-wrap: wrap; }

/* ─── SECTION ────────────────────────────────────────────────────────── */
.wd-section { padding: 80px 48px; position: relative; max-width: var(--wd-container); margin: 0 auto; }
.wd-section--bg2 { background: var(--wd-bg-2); max-width: none; }
.wd-section--bg2 .wd-section__inner { max-width: var(--wd-container); margin: 0 auto; }
.wd-section__head { margin-bottom: 40px; }
.wd-section__title {
  font-family: var(--wd-font-mono); font-size: 48px; font-weight: 600;
  margin: 16px 0 0; letter-spacing: -0.04em; line-height: 1.05;
}

/* ─── SERVICES GRID ──────────────────────────────────────────────────── */
.wd-services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.wd-service-card {
  padding: 28px; background: var(--wd-panel); border: 1px solid var(--wd-line);
  border-radius: var(--wd-radius-lg); position: relative; overflow: hidden; min-height: 260px;
}
.wd-service-card__bg { position: absolute; inset: 0; opacity: 0.65; }
.wd-service-card__bg canvas { width: 100%; height: 100%; display: block; }
.wd-service-card__fade {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(18, 23, 36, 0.93) 75%);
  pointer-events: none;
}
.wd-service-card__corner {
  position: absolute; top: -40px; right: -40px; width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 101, 69, 0.12), transparent 70%);
  pointer-events: none;
}
.wd-service-card__body { position: relative; }
.wd-service-card__icon { font-family: var(--wd-font-mono); font-size: 36px; color: var(--wd-accent); margin-bottom: 20px; }
.wd-service-card__title { font-family: var(--wd-font-mono); font-size: 22px; margin: 0 0 10px; letter-spacing: -0.02em; }
.wd-service-card__text { font-family: var(--wd-font-mono); font-size: 13px; color: var(--wd-muted); line-height: 1.6; margin: 0; }
.wd-service-card__stack {
  position: absolute; bottom: 20px; left: 28px; right: 28px;
  padding-top: 16px; border-top: 1px solid var(--wd-line);
  font-family: var(--wd-font-mono); font-size: 11px; color: var(--wd-cyan); letter-spacing: 0.1em;
}
@media (max-width: 900px) {
  .wd-services { grid-template-columns: 1fr 1fr; }
  .wd-section__title { font-size: 36px; }
}
@media (max-width: 600px) {
  .wd-services { grid-template-columns: 1fr; }
}

/* ─── WORKFLOW ───────────────────────────────────────────────────────── */
.wd-workflow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; }
.wd-workflow::before {
  content: ''; position: absolute; top: 28px; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--wd-line), var(--wd-line), transparent);
}
.wd-step { position: relative; padding: 0 16px; }
.wd-step__num {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--wd-bg); border: 1px solid var(--wd-accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--wd-font-mono); font-size: 14px; color: var(--wd-accent); margin-bottom: 24px;
  box-shadow: 0 0 0 4px var(--wd-bg-2), 0 0 24px rgba(224, 101, 69, 0.2);
}
.wd-step__title { font-family: var(--wd-font-mono); font-size: 20px; margin: 0 0 8px; letter-spacing: -0.02em; }
.wd-step__text { font-family: var(--wd-font-mono); font-size: 13px; color: var(--wd-muted); line-height: 1.6; margin: 0; }
@media (max-width: 900px) {
  .wd-workflow { grid-template-columns: 1fr 1fr; gap: 40px 16px; }
  .wd-workflow::before { display: none; }
}
@media (max-width: 600px) {
  .wd-workflow { grid-template-columns: 1fr; }
}

/* ─── CTA ────────────────────────────────────────────────────────────── */
.wd-cta__wrap {
  padding: 60px 48px; background: var(--wd-panel); border: 1px solid var(--wd-line);
  border-radius: var(--wd-radius-xl); position: relative; overflow: hidden;
}
.wd-cta__bg { position: absolute; inset: 0; opacity: 0.4; pointer-events: none; }
.wd-cta__grid { position: relative; display: grid; grid-template-columns: 2fr 1fr; gap: 40px; align-items: center; }
.wd-cta__title { font-family: var(--wd-font-mono); font-size: 44px; margin: 0; letter-spacing: -0.04em; line-height: 1.05; }
.wd-cta__title em { color: var(--wd-accent); font-style: normal; }
.wd-cta__text { font-family: var(--wd-font-mono); font-size: 14px; color: var(--wd-muted); margin-top: 16px; max-width: 500px; line-height: 1.7; }
.wd-cta__actions { display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 900px) { .wd-cta__grid { grid-template-columns: 1fr; } .wd-cta__title { font-size: 32px; } }

/* ─── FOOTER ─────────────────────────────────────────────────────────── */
.wd-footer { border-top: 1px solid var(--wd-line); padding: 48px 48px 32px; background: var(--wd-bg); }
.wd-footer__inner {
  max-width: var(--wd-container); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
}
.wd-footer__col h4 { font-family: var(--wd-font-mono); font-size: 12px; color: var(--wd-faint); letter-spacing: 0.15em; text-transform: uppercase; margin: 0 0 16px; }
.wd-footer__col ul { list-style: none; padding: 0; margin: 0; }
.wd-footer__col li { font-family: var(--wd-font-mono); font-size: 13px; margin-bottom: 8px; color: var(--wd-muted); }
.wd-footer__col a:hover { color: var(--wd-text); }
.wd-footer__bottom {
  max-width: var(--wd-container); margin: 32px auto 0; padding-top: 24px;
  border-top: 1px solid var(--wd-line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  font-family: var(--wd-font-mono); font-size: 11px; color: var(--wd-faint); letter-spacing: 0.1em;
}
@media (max-width: 900px) { .wd-footer__inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .wd-footer__inner { grid-template-columns: 1fr; } }

/* ─── FLUENT FORMS OVERRIDE ──────────────────────────────────────────── */
.fluentform { font-family: var(--wd-font-mono) !important; }
.fluentform .ff-el-input--label label,
.fluentform .ff-el-form-control-wrapper label { color: var(--wd-muted) !important; font-size: 12px !important; letter-spacing: 0.1em; text-transform: uppercase; }
.fluentform input[type="text"],
.fluentform input[type="email"],
.fluentform input[type="tel"],
.fluentform textarea,
.fluentform select {
  background: var(--wd-panel) !important;
  border: 1px solid var(--wd-line) !important;
  color: var(--wd-text) !important;
  border-radius: var(--wd-radius) !important;
  font-family: var(--wd-font-mono) !important;
  padding: 12px 14px !important;
}
.fluentform input:focus,
.fluentform textarea:focus {
  border-color: var(--wd-accent) !important;
  box-shadow: 0 0 0 3px rgba(224, 101, 69, 0.15) !important;
  outline: none !important;
}
.fluentform button.ff-btn-submit {
  background: linear-gradient(180deg, var(--wd-accent) 0%, var(--wd-accent-2) 100%) !important;
  border: none !important; color: #fff !important;
  font-family: var(--wd-font-mono) !important; padding: 14px 24px !important;
  border-radius: var(--wd-radius) !important;
}

/* ─── WP CORE CLASSES ────────────────────────────────────────────────── */
.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { display: block; margin: 0 auto 16px; }
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px); position: absolute !important;
  height: 1px; width: 1px; overflow: hidden;
}

/* ─── BLOG / SINGLE ──────────────────────────────────────────────────── */
/* Haupt-Container volle Breite für Single-Posts. !important sichert die
   Regel gegen die generische :has()-Regel unten ab. */
body.single .wd-main {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}
/* Beitrag-Container ebenfalls vollbreit; alle direkten Kinder (Titel, Meta,
   Content, Thumbnail) in zentrierter 900px-Lesespalte. */
body.single .wd-post {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}
body.single .wd-post > * {
    max-width: 900px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: clamp(24px, 5vw, 80px) !important;
    padding-right: clamp(24px, 5vw, 80px) !important;
    box-sizing: border-box !important;
}
body.single .wd-post > h1 {
    padding-top: 80px !important;
}
body.single .wd-post__content {
    padding-bottom: 80px !important;
}

/* Generische Vollbreite für Seiten/Beiträge mit .wd-post, ABER nur wenn kein
   Kontakt-Shortcode enthalten (Kontaktseiten regeln ihr Layout selbst).
   Single-Posts werden oben per body.single bereits behandelt — diese Regel
   greift zusätzlich für reguläre Seiten (page) in Browsern mit :has()-Support. */
.wd-main:has(.wd-post):not(:has(.wd-contact-page)) {
    width: 100%;
    box-sizing: border-box;
    padding: clamp(24px, 5vw, 80px);
}

/* Lesespalte für reguläre Seiten (nicht-single): 800px zentriert. */
.wd-post { max-width: 800px; margin: 0 auto; }
.wd-post h1 { font-family: var(--wd-font-mono); font-size: 48px; letter-spacing: -0.04em; line-height: 1.1; margin: 0 0 16px; }
.wd-post__meta { font-family: var(--wd-font-mono); font-size: 12px; color: var(--wd-faint); letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 40px; }
.wd-post__content { max-width: 800px; margin: 0 auto; }
.wd-post__content p { font-size: 17px; line-height: 1.75; color: var(--wd-text); margin: 0 0 20px; }
.wd-post__content h2 { font-family: var(--wd-font-mono); font-size: 28px; margin: 48px 0 16px; letter-spacing: -0.02em; }
.wd-post__content h3 { font-family: var(--wd-font-mono); font-size: 20px; margin: 32px 0 12px; }
.wd-post__content a { color: var(--wd-accent); text-decoration: underline; text-underline-offset: 3px; }
.wd-post__content blockquote { border-left: 2px solid var(--wd-accent); padding-left: 24px; margin: 32px 0; color: var(--wd-muted); font-style: italic; }
.wd-post__content code { background: var(--wd-panel); padding: 2px 6px; border-radius: 4px; font-family: var(--wd-font-mono); font-size: 0.9em; }
.wd-post__content pre { background: var(--wd-panel); padding: 20px; border-radius: var(--wd-radius); overflow-x: auto; }

.wd-blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.wd-blog-card { padding: 32px; background: var(--wd-panel); border: 1px solid var(--wd-line); border-radius: var(--wd-radius-lg); transition: border-color 0.15s; }
.wd-blog-card:hover { border-color: var(--wd-line-strong); }
.wd-blog-card h3 { font-family: var(--wd-font-mono); font-size: 22px; margin: 0 0 12px; letter-spacing: -0.02em; }
.wd-blog-card__meta { font-family: var(--wd-font-mono); font-size: 11px; color: var(--wd-faint); letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 16px; }
.wd-blog-card__excerpt { color: var(--wd-muted); font-size: 14px; line-height: 1.6; }
@media (max-width: 700px) { .wd-blog-grid { grid-template-columns: 1fr; } }

/* === DEBUG: temporärer Sichtbarkeits-Beweis für Single-Posts === */
/* Roter Rahmen um main.wd-main + blauer Rahmen um .wd-post.
   Wenn main wirklich vollbreit ist, läuft der rote Rahmen bis zum
   Bildschirmrand. Der blaue Rahmen zeigt die .wd-post-Ausdehnung.
   NACH VERIFIKATION DIESEN BLOCK LÖSCHEN. */
body.single .wd-main {
    outline: 4px solid red !important;
}
body.single .wd-post {
    outline: 4px solid #00ffff !important;
}
