/*
Theme Name: Motech Studio Theme
Theme URI: https://motechstudio.de
Author: Motech Studio
Author URI: https://motechstudio.de
Description: Ein exklusives, ultraschnelles Gutenberg Block-Theme für Motech Studio. Entwickelt für High-End Agency UI, Glassmorphism, Dark/Light Mode, mobile Optimierung und native RTL/Mehrsprachigkeit.
Version: 1.5.0
Text Domain: motech-studio-theme
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
*/

/* ==========================================================================
   DESIGN TOKENS & CSS VARIABLES (MOTECH STUDIO DESIGN SYSTEM)
   ========================================================================== */
:root {
  /* Color Palette - Dark Mode Defaults */
  --motech-bg-dark: #0a0b0e;
  --motech-bg-surface: #12151e;
  --motech-bg-card: rgba(255, 255, 255, 0.03);
  --motech-border: rgba(255, 255, 255, 0.08);

  --motech-primary: #6366f1;       /* Electric Indigo */
  --motech-primary-hover: #4f46e5;
  --motech-secondary: #8b5cf6;     /* Deep Violet */
  --motech-accent: #06b6d4;        /* Electric Cyan */
  --motech-gradient-brand: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  --motech-gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.02) 100%);

  --motech-text-main: #f8fafc;
  --motech-text-muted: #94a3b8;
  --motech-text-dim: #64748b;
  --motech-heading-color: #ffffff;

  --motech-header-bg: rgba(10, 11, 14, 0.85);

  /* Typography */
  --motech-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --motech-font-heading: 'Outfit', 'Inter', sans-serif;

  /* Spacing System */
  --motech-space-xs: 0.5rem;
  --motech-space-sm: 1rem;
  --motech-space-md: 2rem;
  --motech-space-lg: 4rem;
  --motech-space-xl: 7rem;

  /* Layout & Glassmorphism Defaults */
  --motech-radius-sm: 8px;
  --motech-radius-md: 16px;
  --motech-radius-lg: 24px;
  --motech-radius-pill: 9999px;
  --motech-glass-blur: blur(16px);
  --motech-shadow-glow: 0 0 35px rgba(99, 102, 241, 0.18);
  --motech-transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   HIGH-END LIGHT MODE OVERRIDES
   ========================================================================== */
body.light-mode {
  --motech-bg-dark: #f8fafc;
  --motech-bg-surface: #ffffff;
  --motech-bg-card: rgba(255, 255, 255, 0.92);
  --motech-border: rgba(99, 102, 241, 0.15);

  --motech-text-main: #0f172a;
  --motech-text-muted: #475569;
  --motech-text-dim: #64748b;
  --motech-heading-color: #0f172a;

  --motech-header-bg: rgba(255, 255, 255, 0.88);

  --motech-shadow-glow: 0 20px 40px -15px rgba(99, 102, 241, 0.12), 0 0 1px rgba(15, 23, 42, 0.1);
  color: var(--motech-text-main) !important;
  background-color: var(--motech-bg-dark) !important;
}

body.light-mode .wp-block-group,
body.light-mode .has-obsidian-dark-background-color,
body.light-mode .has-surface-slate-background-color {
  background-color: var(--motech-bg-dark) !important;
  color: var(--motech-text-main) !important;
}

body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode h4,
body.light-mode h5,
body.light-mode h6,
body.light-mode .wp-block-heading {
  color: var(--motech-heading-color) !important;
}

body.light-mode p,
body.light-mode li {
  color: var(--motech-text-main);
}

body.light-mode .has-text-muted-color,
body.light-mode .wp-block-paragraph.has-text-muted-color {
  color: var(--motech-text-muted) !important;
}

body.light-mode .motech-glass-card {
  background: var(--motech-bg-card) !important;
  border: 1px solid rgba(99, 102, 241, 0.15) !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05) !important;
}

body.light-mode .motech-header-sticky {
  background: var(--motech-header-bg) !important;
  border-bottom: 1px solid rgba(99, 102, 241, 0.15) !important;
}

body.light-mode .motech-nav-links a {
  color: #0f172a !important;
}

body.light-mode .motech-badge {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.25);
  color: #4f46e5;
}

body.light-mode input,
body.light-mode textarea,
body.light-mode select {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid rgba(99, 102, 241, 0.2) !important;
}

/* Base Body Styles */
body {
  background-color: var(--motech-bg-dark);
  color: var(--motech-text-main);
  font-family: var(--motech-font-family);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Heading Styling */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--motech-font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--motech-heading-color);
  letter-spacing: -0.02em;
}

/* Gradient Text Modifier */
.motech-text-gradient {
  background: var(--motech-gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Glassmorphic Card Container */
.motech-glass-card {
  background: var(--motech-bg-card);
  backdrop-filter: var(--motech-glass-blur);
  -webkit-backdrop-filter: var(--motech-glass-blur);
  border: 1px solid var(--motech-border);
  border-radius: var(--motech-radius-md);
  padding: var(--motech-space-md);
  transition: var(--motech-transition);
}

.motech-glass-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: var(--motech-shadow-glow);
  transform: translateY(-4px);
}

/* Custom Primary Button */
.wp-block-button__link,
.motech-btn-primary {
  background: var(--motech-gradient-brand) !important;
  color: #ffffff !important;
  border-radius: var(--motech-radius-pill) !important;
  padding: 0.85rem 2rem !important;
  font-weight: 600 !important;
  font-family: var(--motech-font-heading) !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35) !important;
  transition: var(--motech-transition) !important;
  border: none !important;
}

.wp-block-button__link:hover,
.motech-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(99, 102, 241, 0.55) !important;
  opacity: 0.95;
}

/* Minimalist Icon-Only Pill Theme Switcher Toggle */
.motech-theme-toggle-wrapper {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--motech-border);
  border-radius: var(--motech-radius-pill);
  padding: 3px;
  cursor: pointer;
  user-select: none;
  transition: var(--motech-transition);
}

body.light-mode .motech-theme-toggle-wrapper {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(99, 102, 241, 0.2);
}

.motech-theme-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.85rem;
  transition: var(--motech-transition);
  cursor: pointer;
}

.motech-theme-pill.active {
  background: var(--motech-gradient-brand);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.motech-theme-pill.inactive {
  opacity: 0.4;
}

/* Mobile Hamburger Menu Toggle Button - DESKTOP HIDDEN RULE */
button.motech-mobile-toggle-btn,
.motech-mobile-toggle-btn,
#motech-mobile-toggle-btn {
  display: none !important;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--motech-border);
  color: var(--motech-text-main);
  padding: 0.4rem 0.75rem;
  border-radius: var(--motech-radius-sm);
  font-size: 1.25rem;
  cursor: pointer;
  transition: var(--motech-transition);
}

/* Technical Grid Layouts */
.motech-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--motech-space-md);
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVE LAYOUT (ANTI-SLOP MOBILE UI)
   ========================================================================== */
@media screen and (max-width: 768px) {
  /* SHOW Mobile Hamburger Toggle ONLY on mobile screens */
  button.motech-mobile-toggle-btn,
  .motech-mobile-toggle-btn,
  #motech-mobile-toggle-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  /* Hide Desktop Text Navigation on Mobile */
  .motech-nav-links {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--motech-bg-surface);
    border-bottom: 1px solid var(--motech-border);
    flex-direction: column !important;
    padding: 1.5rem !important;
    gap: 1.25rem !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  }

  .motech-nav-links.mobile-open {
    display: flex !important;
  }

  /* Responsive Mobile Typography & Layouts */
  h1, .wp-block-heading.has-text-align-center {
    font-size: 2.2rem !important;
    line-height: 1.2 !important;
  }

  h2 {
    font-size: 1.75rem !important;
  }

  .wp-block-buttons {
    flex-direction: column !important;
    width: 100% !important;
  }

  .wp-block-button,
  .wp-block-button__link {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .motech-grid-3 {
    grid-template-columns: 1fr !important;
  }

  .motech-glass-card {
    padding: 1.25rem !important;
  }

  /* Form Fields Mobile Height */
  input, textarea, select {
    font-size: 16px !important;
  }

  form div {
    flex-direction: column !important;
  }
}

/* RTL Layout Compatibility Rules */
[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}
