/**
 * Deson Power — Main Stylesheet
 *
 * This file is loaded on every page via wp_enqueue_style.
 * CSS custom properties (design tokens) are also defined here
 * as a fallback to ensure they are always available, since
 * WordPress child themes don't automatically load the root style.css
 * in some configurations.
 *
 * Home-specific styles: home.css
 * Product-specific styles: products.css
 * Responsive overrides: responsive.css
 * Font declarations: fonts.css
 */

/* ==========================================================================
   Design Tokens (CSS Custom Properties)
   ========================================================================== */

:root {
    /* ---- Color System: Backgrounds ---- */
    --deson-bg-primary: #0c0f1a;
    --deson-bg-secondary: #151a28;
    --deson-bg-tertiary: #1c2235;
    --deson-bg-card: #111624;
    --deson-bg-overlay: rgba(12, 15, 26, 0.92);
    --deson-bg-hero-gradient: linear-gradient(180deg, rgba(12, 15, 26, 0.3) 0%, rgba(12, 15, 26, 0.75) 60%, #0c0f1a 100%);

    /* ---- Color System: Text ---- */
    --deson-text-primary: #FFFFFF;
    --deson-text-secondary: #B0B8CC;
    --deson-text-tertiary: #7A8299;
    --deson-text-inverse: #0c0f1a;

    /* ---- Color System: Accent (senmarck.com-inspired gold/amber) ---- */
    --deson-accent: #d97706;
    --deson-accent-hover: #b45309;
    --deson-accent-active: #92400e;
    --deson-accent-light: rgba(217, 119, 6, 0.10);
    --deson-accent-medium: rgba(217, 119, 6, 0.18);
    --deson-accent-glow: rgba(217, 119, 6, 0.30);

    /* ---- Color System: Border & Divider ---- */
    --deson-border: #2a3045;
    --deson-border-light: #3a4160;
    --deson-border-subtle: #1e2438;

    /* ---- Color System: Semantic ---- */
    --deson-success: #00C853;
    --deson-warning: #FFB300;
    --deson-error: #FF3D00;

    /* ---- Typography ---- */
    --deson-font-sans: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --deson-font-mono: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;

    /* Font Weights */
    --deson-font-weight-regular: 400;
    --deson-font-weight-semibold: 600;
    --deson-font-weight-bold: 700;

    /* Font Sizes */
    --deson-text-xs: 0.75rem;
    --deson-text-sm: 0.875rem;
    --deson-text-base: 1rem;
    --deson-text-lg: 1.125rem;
    --deson-text-xl: 1.25rem;
    --deson-text-2xl: 1.5rem;
    --deson-text-3xl: 2rem;
    --deson-text-4xl: 2.5rem;
    --deson-text-5xl: 3rem;
    --deson-text-6xl: 4rem;

    /* Line Heights */
    --deson-leading-tight: 1.15;
    --deson-leading-snug: 1.35;
    --deson-leading-normal: 1.6;
    --deson-leading-relaxed: 1.8;

    /* ---- Spacing ---- */
    --deson-section-gap: 120px;
    --deson-section-gap-md: 80px;
    --deson-section-gap-sm: 60px;
    --deson-content-padding: 60px;
    --deson-card-padding: 40px;
    --deson-card-gap: 32px;
    --deson-card-gap-sm: 24px;
    --deson-element-gap: 16px;
    --deson-element-gap-sm: 8px;

    /* ---- Layout ---- */
    --deson-max-width: 1280px;
    --deson-max-width-narrow: 860px;
    --deson-header-height: 72px;
    --deson-header-height-mobile: 60px;

    /* ---- Border Radius ---- */
    --deson-radius-sm: 4px;
    --deson-radius-md: 8px;
    --deson-radius-lg: 12px;
    --deson-radius-xl: 16px;
    --deson-radius-full: 9999px;

    /* ---- Shadows ---- */
    --deson-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --deson-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --deson-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --deson-shadow-glow: 0 0 20px var(--deson-accent-glow);

    /* ---- Transitions ---- */
    --deson-transition-fast: 150ms ease;
    --deson-transition: 300ms ease;
    --deson-transition-slow: 500ms ease;

    /* ---- Z-index Scale ---- */
    --deson-z-base: 1;
    --deson-z-sticky: 100;
    --deson-z-overlay: 200;
    --deson-z-modal: 300;
    --deson-z-toast: 400;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}
body {
    font-family: var(--deson-font-sans);
    font-size: var(--deson-text-base);
    font-weight: var(--deson-font-weight-regular);
    line-height: var(--deson-leading-normal);
    color: var(--deson-text-primary);
    background-color: var(--deson-bg-primary);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--deson-font-sans);
    font-weight: var(--deson-font-weight-bold);
    line-height: var(--deson-leading-tight);
    color: var(--deson-text-primary);
    margin-bottom: 1rem;
}
h1 { font-size: var(--deson-text-6xl); letter-spacing: -0.03em; }
h2 { font-size: var(--deson-text-5xl); letter-spacing: -0.02em; }
h3 { font-size: var(--deson-text-3xl); letter-spacing: -0.01em; }
h4 { font-size: var(--deson-text-2xl); letter-spacing: -0.005em; }
h5 { font-size: var(--deson-text-xl); }
h6 { font-size: var(--deson-text-lg); }

p {
    margin-bottom: 1rem;
    color: var(--deson-text-secondary);
    line-height: var(--deson-leading-relaxed);
}

a {
    color: var(--deson-accent);
    text-decoration: none;
    transition: color var(--deson-transition-fast);
}
a:hover { color: var(--deson-accent-hover); }

img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; padding: 0; margin: 0; }

::selection { background: var(--deson-accent); color: var(--deson-text-primary); }

:focus-visible {
    outline: 2px solid var(--deson-accent);
    outline-offset: 2px;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--deson-bg-primary); }
::-webkit-scrollbar-thumb { background: var(--deson-border); border-radius: var(--deson-radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--deson-border-light); }

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.deson-container {
    width: 100%;
    max-width: var(--deson-max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

.deson-section {
    padding-top: var(--deson-section-gap);
    padding-bottom: var(--deson-section-gap);
}

.deson-section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--deson-accent);
    margin-bottom: 12px;
}

.deson-section-title {
    font-size: var(--deson-text-5xl);
    font-weight: var(--deson-font-weight-bold);
    line-height: var(--deson-leading-tight);
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    color: var(--deson-text-primary);
}

.deson-section-description {
    font-size: var(--deson-text-lg);
    color: var(--deson-text-secondary);
    max-width: 640px;
    line-height: var(--deson-leading-relaxed);
}

.deson-text-center { text-align: center; }
.deson-visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

@keyframes desonFadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes desonFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.deson-animate-in { animation: desonFadeInUp 0.6s ease forwards; }

.deson-stagger-children > * {
    opacity: 0;
    animation: desonFadeInUp 0.6s ease forwards;
}
.deson-stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.deson-stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.deson-stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.deson-stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.deson-stagger-children > *:nth-child(5) { animation-delay: 0.5s; }

@media print {
    body { background: #fff; color: #000; }
}

/* ==========================================================================
   Header & Navigation (shared across all pages)
   ========================================================================== */

.deson-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    height: var(--deson-header-height);
    background: rgba(12, 15, 26, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: background var(--transition-normal);
}

.deson-header--scrolled {
    background: rgba(12, 15, 26, 0.98);
    border-bottom-color: var(--deson-border);
}

.deson-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--deson-max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.deson-header__logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.deson-header__logo img,
.deson-header__logo svg {
    height: 36px;
    width: auto;
}

.deson-header__nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.deson-header__nav-list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.deson-header__nav-item {
    position: relative;
}

.deson-header__nav-link {
    display: block;
    padding: 8px 16px;
    font-size: var(--deson-text-sm);
    font-weight: 600;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    border-radius: var(--deson-radius-sm);
    transition: var(--transition-fast);
}

.deson-header__nav-link:hover,
.deson-header__nav-link--active {
    color: var(--color-white, #FFFFFF);
}

.deson-header__nav-link--active {
    background: var(--deson-accent-light);
}

.deson-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Hamburger (mobile) */
.deson-header__hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px; height: 44px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
}

.deson-header__hamburger span {
    display: block;
    width: 24px; height: 2px;
    background: var(--color-white, #FFFFFF);
    border-radius: 2px;
    transition: var(--transition-normal);
}

/* Mobile menu panel */
.deson-mobile-menu {
    display: none;
    position: fixed;
    top: var(--deson-header-height);
    left: 0; right: 0; bottom: 0;
    background: var(--deson-bg-primary);
    z-index: 200;
    padding: 32px 24px;
    overflow-y: auto;
}

.deson-mobile-menu--open {
    display: block;
}

.deson-mobile-menu__list {
    list-style: none;
    margin: 0; padding: 0;
}

.deson-mobile-menu__link {
    display: block;
    padding: 16px 0;
    font-size: var(--deson-text-xl);
    font-weight: 600;
    color: var(--color-white, #FFFFFF);
    text-decoration: none;
    border-bottom: 1px solid var(--deson-border-subtle);
    transition: color var(--transition-fast);
}

.deson-mobile-menu__link:hover {
    color: var(--deson-accent);
}

/* Language switcher */
.deson-lang-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
}

.deson-lang-switcher__btn {
    padding: 6px 12px;
    font-size: var(--deson-text-sm);
    font-weight: 600;
    color: rgba(255,255,255,0.75);
    background: none;
    border: none;
    border-radius: var(--deson-radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-fast);
}

.deson-lang-switcher__btn:hover {
    color: var(--color-white, #FFFFFF);
}

.deson-lang-switcher__btn--active {
    color: var(--deson-accent);
    background: var(--deson-accent-light);
}

.deson-lang-switcher__divider {
    width: 1px; height: 16px;
    background: var(--deson-border);
}

/* ==========================================================================
   Footer (shared across all pages)
   ========================================================================== */

.deson-footer {
    background: var(--deson-bg-primary);
    border-top: 1px solid var(--deson-border);
    padding: 80px 0 0;
}

.deson-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 60px;
}

.deson-footer__brand {
    max-width: 300px;
}

.deson-footer__logo {
    margin-bottom: 20px;
}

.deson-footer__logo img,
.deson-footer__logo svg {
    height: 32px;
    width: auto;
}

.deson-footer__desc {
    font-size: var(--deson-text-sm);
    color: var(--deson-text-secondary);
    line-height: var(--deson-leading-relaxed);
    margin-bottom: 0;
}

.deson-footer__heading {
    font-size: var(--deson-text-sm);
    font-weight: 600;
    color: var(--color-white, #FFFFFF);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}

.deson-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.deson-footer__link-item {
    margin-bottom: 10px;
}

.deson-footer__link {
    font-size: var(--deson-text-sm);
    color: var(--deson-text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.deson-footer__link:hover {
    color: var(--deson-accent);
}

.deson-footer__bottom {
    border-top: 1px solid var(--deson-border-subtle);
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.deson-footer__copyright {
    font-size: var(--deson-text-sm);
    color: var(--deson-text-tertiary);
    margin: 0;
}

.deson-footer__legal-links {
    display: flex;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.deson-footer__legal-link {
    font-size: var(--deson-text-sm);
    color: var(--deson-text-tertiary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.deson-footer__legal-link:hover {
    color: var(--deson-text-secondary);
}

/* Buttons (shared) */
.deson-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: var(--deson-font-sans);
    font-size: var(--deson-text-base);
    font-weight: 600;
    line-height: 1;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-normal);
    white-space: nowrap;
    min-height: 48px;
    min-width: 44px;
}

.deson-btn--primary {
    background: var(--deson-accent);
    color: var(--color-white, #FFFFFF);
}

.deson-btn--primary:hover {
    background: var(--deson-accent-hover);
    color: var(--color-white, #FFFFFF);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(217, 119, 6, 0.3);
}

.deson-btn--primary:active {
    background: var(--deson-accent-active);
    transform: translateY(0);
}

.deson-btn--secondary {
    background: transparent;
    color: var(--color-white, #FFFFFF);
    border: 2px solid rgba(255,255,255,0.3);
}

.deson-btn--secondary:hover {
    border-color: var(--deson-accent);
    background: var(--deson-accent);
    color: var(--color-white, #FFFFFF);
    transform: translateY(-1px);
}

.deson-btn--ghost {
    background: transparent;
    color: var(--deson-text-secondary);
}

.deson-btn--ghost:hover {
    color: var(--deson-accent);
    background: var(--deson-accent-light);
}

.deson-btn--lg {
    padding: 18px 40px;
    font-size: var(--deson-text-lg);
    min-height: 56px;
}

.deson-btn--sm {
    padding: 10px 20px;
    font-size: var(--deson-text-sm);
    min-height: 40px;
}

.deson-btn__arrow {
    transition: transform var(--transition-fast);
}

.deson-btn:hover .deson-btn__arrow {
    transform: translateX(4px);
}
