/* ============================================
   LexiKurs - Product Showcase Styles
   Nordic Structuralism meets Digital Humanism
   ============================================ */

/* --- Color Variables --- */
:root {
    --lk-slate: #4A5568;
    --lk-slate-light: #718096;
    --lk-slate-dark: #2D3748;
    --lk-slate-darker: #1A202C;
    --lk-coral: #E53E3E;
    --lk-coral-hover: #C53030;
    --lk-coral-light: #FED7D7;
    --lk-teal: #38B2AC;
    --lk-teal-light: #B2F5EA;
    --lk-gold: #D69E2E;
    --lk-gold-light: #FEFCBF;
    --lk-silver: #A0AEC0;
    --lk-bronze: #C4702B;
    --lk-epic: #9F7AEA;
    --lk-glass-bg: rgba(255, 255, 255, 0.08);
    --lk-glass-border: rgba(255, 255, 255, 0.15);
    --lk-section-alt: #f7fafc;
}

[data-theme="dark"] {
    --lk-glass-bg: rgba(0, 0, 0, 0.2);
    --lk-glass-border: rgba(255, 255, 255, 0.08);
    --lk-section-alt: #1a202c;
}

/* --- Sub-Navigation --- */
.lk-subnav {
    background: var(--lk-slate-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.lk-subnav::-webkit-scrollbar {
    display: none;
}
.lk-subnav a {
    transition: background-color 0.2s ease, color 0.2s ease;
}
.lk-subnav a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* --- Hero Section --- */
.lk-hero {
    background: linear-gradient(135deg, var(--lk-slate-darker) 0%, var(--lk-slate) 50%, var(--lk-slate-light) 100%);
    position: relative;
    overflow: hidden;
}
.lk-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
    pointer-events: none;
}
.lk-hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    pointer-events: none;
}
.lk-hero-blob-1 {
    width: 400px; height: 400px;
    background: var(--lk-coral);
    top: -100px; right: -100px;
}
.lk-hero-blob-2 {
    width: 300px; height: 300px;
    background: var(--lk-teal);
    bottom: -80px; left: -60px;
}

/* --- Glassmorphism Cards --- */
.lk-glass-card {
    background: var(--lk-glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--lk-glass-border);
    border-radius: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.lk-glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Light mode glass cards (on white backgrounds) */
.lk-glass-card-light {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
[data-theme="dark"] .lk-glass-card-light {
    background: rgba(45, 55, 72, 0.5);
    border-color: rgba(255, 255, 255, 0.08);
}
.lk-glass-card-light:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* --- Section Styles --- */
.lk-section {
    padding: 5rem 1rem;
}
.lk-section-alt {
    background-color: var(--lk-section-alt);
}
@media (min-width: 640px) {
    .lk-section {
        padding: 5rem 1.5rem;
    }
}
@media (min-width: 1024px) {
    .lk-section {
        padding: 6rem 2rem;
    }
}

/* --- CTA Button --- */
.lk-btn-coral {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background-color: var(--lk-coral);
    color: #fff;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    text-decoration: none;
    border: none;
    cursor: pointer;
}
.lk-btn-coral:hover {
    background-color: var(--lk-coral-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.4);
}
.lk-btn-coral:focus-visible {
    outline: 3px solid var(--lk-coral);
    outline-offset: 3px;
}

.lk-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background-color: transparent;
    color: #fff;
    font-weight: 600;
    border-radius: 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
    transition: background-color 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
    cursor: pointer;
}
.lk-btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.7);
}
.lk-btn-outline:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

/* --- Course Path / Timeline --- */
.lk-timeline {
    position: relative;
    padding-left: 2.5rem;
}
.lk-timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--lk-teal) 0%, var(--lk-slate) 50%, var(--lk-coral) 100%);
    border-radius: 3px;
}
.lk-timeline-item {
    position: relative;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.lk-timeline-dot {
    position: absolute;
    left: -1.75rem;
    top: 1.75rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--lk-slate);
    border: 3px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 700;
    color: #fff;
    z-index: 1;
}
[data-theme="dark"] .lk-timeline-dot {
    border-color: #1a202c;
}
.lk-timeline-dot.active {
    background: var(--lk-teal);
    box-shadow: 0 0 0 4px rgba(56, 178, 172, 0.3);
}
.lk-timeline-dot.locked {
    background: var(--lk-silver);
}

/* --- Badge Shields --- */
.lk-badge-shield {
    width: 5rem;
    height: 5.5rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}
.lk-badge-shield:hover {
    transform: scale(1.1);
}
.lk-badge-shield svg {
    width: 100%;
    height: 100%;
}
.lk-badge-bronze { --badge-color: var(--lk-bronze); }
.lk-badge-silver { --badge-color: var(--lk-silver); }
.lk-badge-gold { --badge-color: var(--lk-gold); }
.lk-badge-epic { --badge-color: var(--lk-epic); }

/* --- Match Score Ring --- */
.lk-score-ring {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.lk-score-ring svg {
    transform: rotate(-90deg);
}
.lk-score-ring-bg {
    stroke: rgba(0, 0, 0, 0.1);
}
[data-theme="dark"] .lk-score-ring-bg {
    stroke: rgba(255, 255, 255, 0.1);
}
.lk-score-ring-fill {
    stroke: var(--lk-teal);
    stroke-linecap: round;
    transition: stroke-dashoffset 1.5s ease-out;
}
.lk-score-ring-text {
    position: absolute;
    font-size: 2rem;
    font-weight: 800;
    color: var(--lk-slate-dark);
}
[data-theme="dark"] .lk-score-ring-text {
    color: #f7fafc;
}

/* --- Stat Cards --- */
.lk-stat-card {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
[data-theme="dark"] .lk-stat-card {
    background: var(--lk-slate-dark);
    border-color: rgba(255, 255, 255, 0.06);
}
.lk-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}
.lk-stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
}

/* --- Role Hierarchy Diagram --- */
.lk-role-card {
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    border-left: 4px solid;
    transition: transform 0.2s ease;
}
.lk-role-card:hover {
    transform: translateX(4px);
}

/* --- Roadmap Phase Cards --- */
.lk-phase-card {
    position: relative;
    padding: 2rem;
    border-radius: 1rem;
    border: 2px solid rgba(0, 0, 0, 0.08);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
[data-theme="dark"] .lk-phase-card {
    border-color: rgba(255, 255, 255, 0.08);
}
.lk-phase-card.active {
    border-color: var(--lk-teal);
    box-shadow: 0 0 0 4px rgba(56, 178, 172, 0.15);
}
.lk-phase-number {
    position: absolute;
    top: -1rem;
    left: 2rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--lk-slate);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

/* --- Feature Grid Icons --- */
.lk-icon-box {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* --- Dashboard Mockup --- */
.lk-mockup {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
}
[data-theme="dark"] .lk-mockup {
    border-color: rgba(255, 255, 255, 0.1);
}
.lk-mockup-header {
    background: var(--lk-slate-dark);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.lk-mockup-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
}
.lk-mockup-body {
    padding: 1.5rem;
    background: #fff;
}
[data-theme="dark"] .lk-mockup-body {
    background: #1a202c;
}

/* --- Progress Bar --- */
.lk-progress {
    height: 0.625rem;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.08);
    overflow: hidden;
}
[data-theme="dark"] .lk-progress {
    background: rgba(255, 255, 255, 0.08);
}
.lk-progress-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 1.5s ease-out;
}

/* --- Tab Navigation --- */
.lk-tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}
[data-theme="dark"] .lk-tabs {
    border-color: rgba(255, 255, 255, 0.08);
}
.lk-tab {
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--lk-slate-light);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}
.lk-tab:hover {
    color: var(--lk-slate-dark);
}
[data-theme="dark"] .lk-tab:hover {
    color: #f7fafc;
}
.lk-tab.active {
    color: var(--lk-coral);
    border-bottom-color: var(--lk-coral);
}
.lk-tab:focus-visible {
    outline: 2px solid var(--lk-coral);
    outline-offset: -2px;
    border-radius: 0.25rem 0.25rem 0 0;
}
.lk-tab-panel {
    display: none;
}
.lk-tab-panel.active {
    display: block;
}

/* --- Bridge SVG Decoration --- */
.lk-bridge-decoration {
    opacity: 0.06;
    pointer-events: none;
}
[data-theme="dark"] .lk-bridge-decoration {
    opacity: 0.04;
}

/* --- Checklist --- */
.lk-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
}
.lk-check-icon {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    color: var(--lk-teal);
    margin-top: 0.125rem;
}

/* --- JSON Code Block --- */
.lk-code-block {
    background: var(--lk-slate-darker);
    color: #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.5rem;
    font-family: 'Cascadia Code', 'Fira Code', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    overflow-x: auto;
}
.lk-code-key { color: #90cdf4; }
.lk-code-string { color: #68d391; }
.lk-code-bool { color: #f6ad55; }
.lk-code-number { color: #fc8181; }

/* --- CTA Section --- */
.lk-cta-section {
    background: linear-gradient(135deg, var(--lk-slate-dark) 0%, var(--lk-slate) 100%);
    position: relative;
    overflow: hidden;
}

/* --- Scroll Animations (self-contained for LexiKurs) --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.animate-on-scroll.animate-slide-left {
    transform: translateX(-30px);
}
.animate-on-scroll.animate-slide-left.is-visible {
    transform: translateX(0);
}
.animate-on-scroll.animate-slide-right {
    transform: translateX(30px);
}
.animate-on-scroll.animate-slide-right.is-visible {
    transform: translateX(0);
}
.animate-on-scroll.animate-scale {
    transform: scale(0.9);
}
.animate-on-scroll.animate-scale.is-visible {
    transform: scale(1);
}

/* Stagger items */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.stagger-children.is-visible .stagger-item,
.is-visible .stagger-item {
    opacity: 1;
    transform: translateY(0);
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    .lk-glass-card,
    .lk-glass-card-light,
    .lk-stat-card,
    .lk-badge-shield,
    .lk-role-card,
    .lk-btn-coral,
    .lk-btn-outline,
    .lk-score-ring-fill,
    .lk-progress-fill {
        transition: none !important;
    }
    .lk-hero-blob {
        display: none;
    }
    .animate-on-scroll,
    .stagger-item {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* --- Print --- */
@media print {
    .lk-subnav,
    .lk-hero-blob {
        display: none !important;
    }
    .lk-hero {
        background: #4A5568 !important;
        color: #fff !important;
    }
}
