/*
Theme Name: Wundermachbar
Theme URI: https://www.wundermachbar.de
Author: [Dein Name]
Author URI: [Deine Website]
Description: Maßgeschneidertes, leichtgewichtiges WordPress-Theme für Wundermachbar. Optimiert für Elementor Pro, Barrierefreiheit (WCAG 2.1 AA), SEO und Performance. Inklusive Mailchimp-Newsletter-Integration.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wundermachbar
Tags: elementor, accessibility-ready, custom-colors, custom-logo, custom-menu, featured-images, translation-ready

Wundermachbar – Kreativ. Machbar. Wunderbar.
*/

/* ==========================================================================
   CSS Custom Properties – Warm & Kreativ Farbpalette
   ========================================================================== */
:root {
    /* Primärfarben */
    --wm-primary: #E07A5F;         /* Terracotta Warm */
    --wm-primary-dark: #C4603F;
    --wm-primary-light: #F2B8A2;

    /* Sekundärfarben */
    --wm-secondary: #3D405B;       /* Tiefes Indigoblau */
    --wm-secondary-dark: #2B2D40;
    --wm-secondary-light: #81849A;

    /* Akzentfarben */
    --wm-accent: #F2CC8F;          /* Warmes Gold */
    --wm-accent-dark: #D4A85A;
    --wm-accent-light: #FBE8C6;

    /* Neutrale Farben */
    --wm-white: #FAFAF7;
    --wm-offwhite: #F4F1EB;
    --wm-gray-100: #E8E5DF;
    --wm-gray-200: #D1CEC8;
    --wm-gray-300: #A8A5A0;
    --wm-gray-400: #7A7772;
    --wm-gray-500: #4D4A45;
    --wm-black: #2C2926;

    /* Feedback-Farben */
    --wm-success: #81B29A;
    --wm-warning: #F2CC8F;
    --wm-error: #E07A5F;
    --wm-info: #3D405B;

    /* Typografie */
    --wm-font-heading: 'DM Serif Display', Georgia, serif;
    --wm-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --wm-font-accent: 'Caveat', cursive;

    /* Schriftgrößen (fluid) */
    --wm-text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --wm-text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
    --wm-text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --wm-text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
    --wm-text-xl: clamp(1.375rem, 1.1rem + 1.2vw, 2rem);
    --wm-text-2xl: clamp(1.75rem, 1.3rem + 2vw, 2.75rem);
    --wm-text-3xl: clamp(2.25rem, 1.5rem + 3.5vw, 4rem);

    /* Abstände */
    --wm-space-xs: 0.25rem;
    --wm-space-sm: 0.5rem;
    --wm-space-md: 1rem;
    --wm-space-lg: 2rem;
    --wm-space-xl: 4rem;
    --wm-space-2xl: 6rem;

    /* Weitere */
    --wm-radius-sm: 4px;
    --wm-radius-md: 8px;
    --wm-radius-lg: 16px;
    --wm-radius-full: 9999px;
    --wm-shadow-sm: 0 1px 3px rgba(44, 41, 38, 0.08);
    --wm-shadow-md: 0 4px 12px rgba(44, 41, 38, 0.1);
    --wm-shadow-lg: 0 12px 32px rgba(44, 41, 38, 0.12);
    --wm-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --wm-max-width: 1200px;
}

/* ==========================================================================
   Reset & Base – Barrierearm
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

/* Reduced Motion Präferenz */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    font-family: var(--wm-font-body);
    font-size: var(--wm-text-base);
    line-height: 1.7;
    color: var(--wm-black);
    background-color: var(--wm-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ==========================================================================
   Typografie
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--wm-font-heading);
    font-weight: 400;
    line-height: 1.2;
    color: var(--wm-secondary);
    margin-bottom: var(--wm-space-md);
}

h1 { font-size: var(--wm-text-3xl); }
h2 { font-size: var(--wm-text-2xl); }
h3 { font-size: var(--wm-text-xl); }
h4 { font-size: var(--wm-text-lg); }
h5 { font-size: var(--wm-text-base); font-weight: 600; }
h6 { font-size: var(--wm-text-sm); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

p {
    margin-bottom: var(--wm-space-md);
}

a {
    color: var(--wm-primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color var(--wm-transition);
}

a:hover,
a:focus-visible {
    color: var(--wm-primary-dark);
}

/* Focus Styles – Barrierefreiheit */
:focus-visible {
    outline: 3px solid var(--wm-primary);
    outline-offset: 3px;
    border-radius: var(--wm-radius-sm);
}

:focus:not(:focus-visible) {
    outline: none;
}

/* Skip Link – Barrierefreiheit */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--wm-space-md);
    z-index: 10000;
    padding: var(--wm-space-sm) var(--wm-space-md);
    background: var(--wm-secondary);
    color: var(--wm-white);
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 var(--wm-radius-md) var(--wm-radius-md);
}

.skip-link:focus {
    top: 0;
}

/* ==========================================================================
   Layout
   ========================================================================== */
.site-container {
    max-width: var(--wm-max-width);
    margin: 0 auto;
    padding: 0 var(--wm-space-lg);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    padding: var(--wm-space-md) 0;
    background: var(--wm-white);
    border-bottom: 1px solid var(--wm-gray-100);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .site-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--wm-space-lg);
}

.site-branding {
    display: flex;
    align-items: center;
    gap: var(--wm-space-sm);
}

.site-title {
    font-family: var(--wm-font-heading);
    font-size: var(--wm-text-xl);
    margin: 0;
    color: var(--wm-secondary);
}

.site-title a {
    text-decoration: none;
    color: inherit;
}

.site-description {
    font-family: var(--wm-font-accent);
    color: var(--wm-primary);
    font-size: var(--wm-text-sm);
    margin: 0;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: var(--wm-space-lg);
    align-items: center;
}

.main-navigation a {
    text-decoration: none;
    color: var(--wm-gray-500);
    font-size: var(--wm-text-sm);
    font-weight: 500;
    position: relative;
    padding: var(--wm-space-xs) 0;
    transition: color var(--wm-transition);
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--wm-primary);
    transition: width var(--wm-transition);
}

.main-navigation a:hover::after,
.main-navigation .current-menu-item a::after {
    width: 100%;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
    color: var(--wm-secondary);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--wm-space-sm);
    color: var(--wm-secondary);
}

.menu-toggle .hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    position: relative;
    transition: background var(--wm-transition);
}

.menu-toggle .hamburger::before,
.menu-toggle .hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: currentColor;
    left: 0;
    transition: transform var(--wm-transition);
}

.menu-toggle .hamburger::before { top: -7px; }
.menu-toggle .hamburger::after { bottom: -7px; }

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--wm-white);
        box-shadow: var(--wm-shadow-lg);
        padding: var(--wm-space-lg);
    }

    .main-navigation.is-open {
        display: block;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: var(--wm-space-md);
    }
}

/* ==========================================================================
   Content
   ========================================================================== */
.site-main {
    min-height: 60vh;
}

.entry-header {
    padding: var(--wm-space-2xl) 0 var(--wm-space-xl);
    text-align: center;
}

.entry-title {
    font-size: var(--wm-text-3xl);
    color: var(--wm-secondary);
}

.entry-content {
    max-width: 720px;
    margin: 0 auto;
    padding-bottom: var(--wm-space-2xl);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.wm-button,
.wp-block-button__link,
button[type="submit"],
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    gap: var(--wm-space-sm);
    padding: 0.75em 1.75em;
    font-family: var(--wm-font-body);
    font-size: var(--wm-text-sm);
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--wm-radius-full);
    cursor: pointer;
    transition: all var(--wm-transition);
    background: var(--wm-primary);
    color: var(--wm-white);
}

.wm-button:hover,
.wp-block-button__link:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
    background: var(--wm-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--wm-shadow-md);
}

.wm-button--outline {
    background: transparent;
    border-color: var(--wm-primary);
    color: var(--wm-primary);
}

.wm-button--outline:hover {
    background: var(--wm-primary);
    color: var(--wm-white);
}

/* ==========================================================================
   Mailchimp Newsletter Form
   ========================================================================== */
.wm-newsletter {
    background: var(--wm-offwhite);
    border-radius: var(--wm-radius-lg);
    padding: var(--wm-space-xl);
    text-align: center;
    max-width: 640px;
    margin: var(--wm-space-2xl) auto;
}

.wm-newsletter__title {
    font-family: var(--wm-font-heading);
    font-size: var(--wm-text-xl);
    color: var(--wm-secondary);
    margin-bottom: var(--wm-space-sm);
}

.wm-newsletter__description {
    color: var(--wm-gray-400);
    margin-bottom: var(--wm-space-lg);
}

.wm-newsletter__form {
    display: flex;
    gap: var(--wm-space-sm);
    max-width: 480px;
    margin: 0 auto;
}

.wm-newsletter__form input[type="email"] {
    flex: 1;
    padding: 0.75em 1.25em;
    border: 2px solid var(--wm-gray-200);
    border-radius: var(--wm-radius-full);
    font-family: var(--wm-font-body);
    font-size: var(--wm-text-sm);
    background: var(--wm-white);
    transition: border-color var(--wm-transition);
}

.wm-newsletter__form input[type="email"]:focus {
    border-color: var(--wm-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(224, 122, 95, 0.2);
}

.wm-newsletter__form input[type="email"]::placeholder {
    color: var(--wm-gray-300);
}

.wm-newsletter__privacy {
    font-size: var(--wm-text-xs);
    color: var(--wm-gray-300);
    margin-top: var(--wm-space-md);
}

@media (max-width: 480px) {
    .wm-newsletter__form {
        flex-direction: column;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: var(--wm-secondary);
    color: var(--wm-gray-200);
    padding: var(--wm-space-2xl) 0 var(--wm-space-lg);
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--wm-space-xl);
    margin-bottom: var(--wm-space-xl);
}

.footer-widgets .widget-title {
    font-family: var(--wm-font-heading);
    font-size: var(--wm-text-lg);
    color: var(--wm-white);
    margin-bottom: var(--wm-space-md);
}

.footer-widgets a {
    color: var(--wm-gray-200);
}

.footer-widgets a:hover {
    color: var(--wm-accent);
}

.site-info {
    border-top: 1px solid var(--wm-secondary-light);
    padding-top: var(--wm-space-lg);
    text-align: center;
    font-size: var(--wm-text-xs);
    color: var(--wm-secondary-light);
}

/* ==========================================================================
   Elementor Overrides – Saubere Integration
   ========================================================================== */
.elementor-page .site-main {
    padding: 0;
}

.elementor-page .entry-header {
    display: none;
}

.elementor-page .entry-content {
    max-width: none;
    padding: 0;
}

/* Elementor Section Spacing */
.elementor-section {
    padding: var(--wm-space-xl) 0;
}

/* Elementor Buttons erben Theme-Styles */
.elementor-button {
    font-family: var(--wm-font-body) !important;
    border-radius: var(--wm-radius-full) !important;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.wm-text-accent {
    font-family: var(--wm-font-accent);
    color: var(--wm-primary);
}

/* ==========================================================================
   WordPress Core Block Styles
   ========================================================================== */
.wp-block-image {
    margin-bottom: var(--wm-space-lg);
}

.wp-block-quote {
    border-left: 4px solid var(--wm-primary);
    padding-left: var(--wm-space-lg);
    margin: var(--wm-space-lg) 0;
    font-style: italic;
    color: var(--wm-gray-500);
}

.wp-block-separator {
    border: none;
    border-top: 2px solid var(--wm-gray-100);
    margin: var(--wm-space-xl) auto;
    max-width: 120px;
}
