/* ==========================================================================
   Intellectum Lab — Case Study shared stylesheet
   Premium black/white minimal — matches index.html brand voice.
   ========================================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --black: #000000;
    --white: #ffffff;
    --gray-100: #f8f8f8;
    --gray-200: #e8e8e8;
    --gray-300: #d8d8d8;
    --gray-400: #888888;
    --gray-500: #666666;
    --gray-600: #444444;
    --max-width: 1200px;
}

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--black);
    line-height: 1.6;
    background: var(--white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; }
::selection { background: var(--black); color: var(--white); }

/* ---------- Header / nav ---------- */
header {
    position: fixed; top: 0; width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    z-index: 1000;
    transition: all 0.3s ease;
}
header.scrolled { background: var(--white); box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
nav { max-width: var(--max-width); margin: 0 auto; padding: 1.25rem 2rem; display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.25rem; font-weight: 700; color: var(--black); text-decoration: none; display: flex; align-items: center; gap: 0.75rem; }
.logo-icon { width: 36px; height: 36px; background: transparent; border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.logo-icon img { width: 24px; height: 24px; object-fit: contain; }
.nav-links { display: flex; gap: 2rem; align-items: center; transform: translateY(2px); }
.nav-links a { color: var(--gray-600); text-decoration: none; font-weight: 500; font-size: 0.875rem; transition: color 0.2s ease; }
.nav-links a:hover { color: var(--black); }
.nav-links a.nav-cta { background: var(--black); color: var(--white); padding: 0.5rem 1rem; border-radius: 4px; }
.nav-links a.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }

.nav-dropdown { position: relative; }
.nav-dropdown-toggle { color: var(--gray-600); font-weight: 500; font-size: 0.875rem; cursor: pointer; display: flex; align-items: center; gap: 0.25rem; }
.nav-dropdown-toggle:hover { color: var(--black); }
.nav-dropdown-menu {
    position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    margin-top: 0.5rem; padding-top: 0.5rem;
    background: var(--white); border: 1px solid var(--gray-200); border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    min-width: 280px; opacity: 0; visibility: hidden;
    transition: all 0.2s ease; z-index: 1001;
}
.nav-dropdown:hover .nav-dropdown-menu { opacity: 1; visibility: visible; margin-top: 0; }
.nav-dropdown-menu a { display: block; padding: 0.75rem 1.25rem; color: var(--gray-600); font-size: 0.875rem; border-bottom: 1px solid var(--gray-200); }
.nav-dropdown-menu a:last-child { border-bottom: none; }
.nav-dropdown-menu a:hover { background: var(--gray-100); color: var(--black); }
.nav-dropdown-menu a .nav-menu-title { display: block; color: var(--black); font-weight: 600; font-size: 0.875rem; margin-bottom: 0.125rem; }
.nav-dropdown-menu a .nav-menu-sub { display: block; color: var(--gray-500); font-weight: 400; font-size: 0.75rem; line-height: 1.4; }

.nav-fsqs { display: inline-flex; align-items: center; text-decoration: none; padding: 0.25rem 0.5rem; border-radius: 4px; transition: background 0.2s ease; }
.nav-fsqs:hover { background: var(--gray-100); }
.nav-fsqs img { height: 36px; width: auto; display: block; }

.mobile-menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; z-index: 1001; color: var(--black); }
.mobile-nav-links { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(10px); flex-direction: column; align-items: center; justify-content: center; gap: 2rem; z-index: 1000; padding: 2rem; overflow-y: auto; }
.mobile-nav-links.active { display: flex; }
.mobile-nav-links a { font-size: 1.25rem; color: var(--black); text-decoration: none; font-weight: 600; padding: 0.75rem 1.5rem; border-radius: 8px; transition: all 0.2s ease; }
.mobile-nav-links a:hover { background: var(--gray-100); }
.mobile-accordion { display: flex; flex-direction: column; align-items: center; width: 100%; }
.mobile-accordion-toggle { font-size: 1.25rem; font-weight: 600; color: var(--black); background: none; border: none; cursor: pointer; padding: 0.75rem 1.5rem; border-radius: 8px; display: flex; align-items: center; gap: 0.5rem; }
.mobile-accordion-toggle:hover { background: var(--gray-100); }
.mobile-accordion-arrow { display: inline-block; transition: transform 0.3s ease; font-size: 0.9rem; }
.mobile-accordion.open .mobile-accordion-arrow { transform: rotate(90deg); }
.mobile-accordion-panel { display: none; flex-direction: column; align-items: center; gap: 0.5rem; padding: 0.5rem 0; }
.mobile-accordion.open .mobile-accordion-panel { display: flex; }
.mobile-accordion-panel a { font-size: 1.05rem !important; color: var(--gray-600) !important; font-weight: 500 !important; }

/* ---------- Case Hero ---------- */
.case-hero {
    padding: 10rem 2rem 5rem;
    background: var(--black);
    color: var(--white);
}
.case-hero-inner { max-width: var(--max-width); margin: 0 auto; }
.breadcrumb { font-size: 0.8125rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--gray-400); text-decoration: none; }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb .sep { color: var(--gray-600); margin: 0 0.5rem; }
.case-meta { display: flex; flex-wrap: wrap; gap: 0.625rem; margin-bottom: 2rem; }
.case-meta span { padding: 0.4rem 0.85rem; border: 1px solid var(--gray-600); border-radius: 999px; font-size: 0.75rem; color: var(--gray-300); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.case-hero h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); font-weight: 900; letter-spacing: -0.03em; line-height: 1.1; max-width: 980px; color: var(--white); margin-bottom: 1.5rem; }
.case-hero .lede { font-size: 1.1875rem; color: var(--gray-300); max-width: 820px; line-height: 1.7; margin-bottom: 3rem; }
.case-hero-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; padding-top: 2.5rem; border-top: 1px solid var(--gray-600); }
.hero-metric strong { display: block; font-size: 2.25rem; font-weight: 900; color: var(--white); letter-spacing: -0.02em; line-height: 1; }
.hero-metric span { display: block; margin-top: 0.625rem; font-size: 0.75rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }

/* ---------- Sections ---------- */
.section { padding: 6rem 2rem; max-width: var(--max-width); margin: 0 auto; }
.section.narrow { max-width: 880px; }
.section.bg-gray { background: var(--gray-100); max-width: none; margin: 0; }
.section.bg-gray .section-inner { max-width: var(--max-width); margin: 0 auto; }

.section-label { font-size: 0.8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 1rem; color: var(--gray-500); }
h2 { font-size: clamp(1.875rem, 3.5vw, 2.5rem); font-weight: 900; letter-spacing: -0.02em; margin-bottom: 1.25rem; line-height: 1.2; }
h3 { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 0.75rem; }
.section-subtitle { font-size: 1.0625rem; color: var(--gray-500); line-height: 1.7; max-width: 720px; }
.section-header { margin-bottom: 3rem; }

.prose { color: var(--gray-600); font-size: 1.0625rem; line-height: 1.8; }
.prose p { margin-bottom: 1.25rem; }
.prose p strong { color: var(--black); }
.prose em { color: var(--gray-600); }
.prose code { font-family: 'SF Mono', Menlo, Monaco, Consolas, monospace; font-size: 0.9rem; padding: 0.125rem 0.375rem; background: var(--gray-100); border-radius: 3px; color: var(--black); }

/* Client / engagement card */
.client-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: 12px; padding: 2rem; margin-bottom: 3rem; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.client-card h4 { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gray-400); margin-bottom: 0.5rem; }
.client-card p { font-size: 0.9375rem; color: var(--gray-600); line-height: 1.65; }
.client-card strong { color: var(--black); }

/* Architecture diagram */
.arch-diagram { background: var(--black); color: var(--white); border-radius: 12px; padding: 2.5rem; margin-top: 2rem; font-family: 'SF Mono', Menlo, Monaco, Consolas, monospace; font-size: 0.875rem; line-height: 1.9; overflow-x: auto; }
.arch-diagram .arch-row { display: flex; align-items: center; gap: 1rem; padding: 0.625rem 0; border-bottom: 1px solid var(--gray-600); flex-wrap: wrap; }
.arch-diagram .arch-row:last-child { border-bottom: none; }
.arch-diagram .arch-step { color: var(--white); font-weight: 700; min-width: 28px; }
.arch-diagram .arch-label { color: var(--gray-400); min-width: 180px; }
.arch-diagram .arch-value { color: var(--white); flex: 1; }

/* Tech tags */
.tech-tags { display: flex; flex-wrap: wrap; gap: 0.625rem; margin-top: 2rem; }
.tech-tag { font-family: 'SF Mono', Menlo, Monaco, Consolas, monospace; font-size: 0.8125rem; padding: 0.5rem 1rem; background: var(--white); border: 1px solid var(--gray-200); border-radius: 999px; color: var(--gray-600); }
.tech-tag.accent { background: var(--black); color: var(--white); border-color: var(--black); }

/* Results grid */
.results-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.5rem; }
.result-card { padding: 2rem; background: var(--white); border: 1px solid var(--gray-200); border-radius: 12px; transition: all 0.3s ease; }
.result-card:hover { border-color: var(--black); transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,0,0,0.06); }
.result-card strong { display: block; color: var(--black); font-size: 2.25rem; font-weight: 900; letter-spacing: -0.02em; line-height: 1; margin-bottom: 0.75rem; }
.result-card h4 { font-size: 0.9375rem; font-weight: 700; color: var(--black); margin-bottom: 0.5rem; }
.result-card p { color: var(--gray-500); font-size: 0.875rem; line-height: 1.6; }

/* Quote block */
.quote-block { margin-top: 3rem; padding: 2.5rem 3rem; background: var(--black); color: var(--white); border-radius: 16px; position: relative; }
.quote-block::before { content: '\201C'; position: absolute; top: 1.25rem; left: 1.75rem; font-family: Georgia, serif; font-size: 4.5rem; color: var(--gray-600); line-height: 1; opacity: 0.7; }
.quote-block .quote-text { font-size: 1.1875rem; color: var(--gray-200); line-height: 1.65; margin-bottom: 1.5rem; padding-left: 3rem; font-style: italic; }
.quote-block .quote-author { padding-left: 3rem; font-size: 0.8125rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }

/* Timeline */
.timeline-list { margin-top: 2rem; list-style: none; padding: 0; }
.timeline-list li { padding: 1.5rem 1.75rem; background: var(--white); border: 1px solid var(--gray-200); border-radius: 10px; margin-bottom: 0.75rem; display: grid; grid-template-columns: 160px 1fr; gap: 1.5rem; align-items: start; }
.timeline-list li .tl-week { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gray-500); font-weight: 700; padding-top: 0.25rem; }
.timeline-list li .tl-body h4 { font-size: 1rem; font-weight: 700; color: var(--black); margin-bottom: 0.375rem; }
.timeline-list li .tl-body p { color: var(--gray-500); font-size: 0.9375rem; line-height: 1.65; }

/* Related cases */
.related-cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2rem; }
.related-case { padding: 1.75rem; background: var(--white); border: 1px solid var(--gray-200); border-radius: 12px; text-decoration: none; color: inherit; transition: all 0.2s ease; }
.related-case:hover { border-color: var(--black); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
.related-case .rc-label { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gray-500); margin-bottom: 0.625rem; display: block; font-weight: 700; }
.related-case h3 { font-size: 1.0625rem; color: var(--black); margin-bottom: 0.5rem; }
.related-case p { font-size: 0.875rem; color: var(--gray-500); line-height: 1.6; }

/* CTA block */
.cta-block { background: var(--black); color: var(--white); padding: 6rem 2rem; text-align: center; }
.cta-block-inner { max-width: 760px; margin: 0 auto; }
.cta-block .section-label { color: var(--gray-400); }
.cta-block h2 { color: var(--white); margin-bottom: 1.25rem; }
.cta-block p { font-size: 1.0625rem; color: var(--gray-400); margin-bottom: 2.25rem; line-height: 1.7; }
.cta-options { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.cta-option { display: inline-flex; align-items: center; padding: 1rem 2rem; border-radius: 4px; text-decoration: none; font-weight: 600; font-size: 0.9375rem; transition: all 0.2s ease; }
.cta-option.primary { background: var(--white); color: var(--black); }
.cta-option.primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,255,255,0.15); }
.cta-option.secondary { background: transparent; color: var(--white); border: 1px solid var(--gray-600); }
.cta-option.secondary:hover { border-color: var(--white); transform: translateY(-2px); }

/* ---------- Footer ---------- */
footer { background: var(--gray-100); padding: 4rem 2rem 2rem; }
.footer-content { max-width: var(--max-width); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 4rem; }
.footer-brand p { color: var(--gray-500); font-size: 0.875rem; line-height: 1.7; margin-top: 1rem; max-width: 320px; }
.footer-links h4 { font-size: 0.8125rem; font-weight: 600; margin-bottom: 1.25rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray-400); }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 0.625rem; }
.footer-links a, .footer-links span { color: var(--gray-600); text-decoration: none; font-size: 0.875rem; transition: color 0.2s ease; }
.footer-links a:hover { color: var(--black); }
.footer-bottom { max-width: var(--max-width); margin: 4rem auto 0; padding-top: 2rem; border-top: 1px solid var(--gray-200); display: flex; justify-content: space-between; align-items: center; color: var(--gray-400); font-size: 0.8125rem; }
.footer-impressum { max-width: var(--max-width); margin: 2rem auto 0; font-size: 0.75rem; color: var(--gray-400); }
.footer-fsqs { margin-top: 1.5rem; display: inline-flex; align-items: center; gap: 0.875rem; padding: 0.75rem 1rem; background: var(--white); border: 1px solid var(--gray-200); border-radius: 8px; text-decoration: none; max-width: 340px; transition: all 0.2s ease; }
.footer-fsqs:hover { border-color: var(--black); }
.footer-fsqs img { height: 44px; width: auto; flex-shrink: 0; }
.footer-fsqs-text { font-size: 0.75rem; line-height: 1.4; color: var(--gray-500); }
.footer-fsqs-text strong { display: block; color: var(--black); font-weight: 700; font-size: 0.8125rem; margin-bottom: 0.125rem; }

/* ---------- Animations ---------- */
[data-animate] { opacity: 1; transform: translateY(0); }
.js-enabled [data-animate] { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
.js-enabled [data-animate].visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .case-hero-metrics { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
    .client-card { grid-template-columns: 1fr; }
    .results-grid, .related-cases { grid-template-columns: repeat(2, 1fr); }
    .footer-content { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .nav-fsqs img { height: 30px; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu-toggle { display: block; }
    .case-hero { padding: 8rem 1.5rem 3rem; }
    .case-hero h1 { font-size: 2rem; }
    .case-hero-metrics { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
    .hero-metric strong { font-size: 1.625rem; }
    .results-grid, .related-cases { grid-template-columns: 1fr; }
    .arch-diagram { padding: 1.5rem; font-size: 0.8125rem; }
    .arch-diagram .arch-row { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
    .arch-diagram .arch-label { min-width: 0; }
    .quote-block { padding: 1.75rem; }
    .quote-block .quote-text, .quote-block .quote-author { padding-left: 0; }
    .quote-block::before { left: 1rem; top: 0.5rem; }
    .timeline-list li { grid-template-columns: 1fr; gap: 0.375rem; }
    .footer-content { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
    .cta-options { flex-direction: column; }
    .section { padding: 4rem 1.5rem; }
}
