/*
Theme Name: Berlin Studio
Theme URI: https://artemiy.de
Author: Berlin Studio
Description: Custom WordPress theme for a Berlin video production agency. Built from static HTML/CSS sources (index.html, service.html, news_article.html, case.html) using Lazy Blocks for Gutenberg blocks and post meta.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: berlin-studio
*/

/* =========================================================================
   GLOBAL / SHARED ACROSS ALL TEMPLATES
   Only rules verified identical (or safely superset) across index.html,
   service.html, news_article.html and case.html live here. Everything
   with page-specific numeric/property differences lives in the
   page-scoped stylesheets in assets/css/ to avoid cross-page collisions.
   ========================================================================= */

:root {
    color-scheme: dark;
    --bg-dark: #080808;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-solid: #0f0f11;
    --accent: #e99db1;
    --accent-rgb: 233, 157, 177;
    --text-main: #FFFFFF;
    --text-muted: #86868b;
    --glass: blur(16px) saturate(180%);
    --radius-lg: 32px;
    --radius-sm: 16px;
}

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.5;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.03;
    pointer-events: none;
    z-index: 9999;
}

.container { width: min(1300px, 92%); margin: 0 auto; }

/* HEADER & NAVIGATION (identical structure across all page variants) */
header {
    position: fixed;
    top: 20px; left: 50%;
    transform: translateX(-50%);
    width: min(1200px, 95%);
    z-index: 1000;
    padding: 16px 32px;
    border-radius: 100px;
    background: rgba(15, 15, 15, 0.7);
    backdrop-filter: var(--glass);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.4s ease;
}

.logo { font-weight: 900; font-size: 20px; letter-spacing: -1px; text-transform: uppercase; color: #fff; text-decoration: none; position: relative; z-index: 1001;}
.logo span { color: var(--accent); }

.nav-links { display: flex; gap: 28px; align-items: center; }

.nav-item { position: relative; padding: 10px 0; }

.nav-link-main {
    text-decoration: none; color: #ffffff;
    font-size: 13px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.05em; opacity: 1;
    transition: 0.3s; display: flex; align-items: center; gap: 6px; cursor: pointer;
}

.nav-link-main:hover, .nav-item:hover .nav-link-main { color: var(--accent); }
.arrow-icon { font-size: 8px; transition: transform 0.3s ease; display: inline-block; }
.nav-item:hover .arrow-icon { transform: rotate(180deg); }

.dropdown {
    position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(10px);
    background: rgba(15, 15, 15, 0.95); backdrop-filter: var(--glass);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 20px;
    min-width: 220px; padding: 12px; opacity: 0; visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    display: flex; flex-direction: column; gap: 4px; z-index: 1002;
}

.nav-item::after { content: ""; position: absolute; top: 100%; left: 0; width: 100%; height: 20px; }
.nav-item:hover .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

.dropdown a {
    text-decoration: none; color: #fff; font-size: 12px; font-weight: 500;
    padding: 12px 16px; border-radius: 12px; transition: 0.2s; opacity: 0.7; white-space: nowrap;
}

.dropdown a:hover { background: rgba(255, 255, 255, 0.05); opacity: 1; color: var(--accent); padding-left: 20px; }

.btn-cta {
    background: var(--accent); color: #fff; padding: 12px 28px; border-radius: 100px;
    font-weight: 700; font-size: 13px; text-decoration: none; border: none; cursor: pointer;
    transition: 0.3s; display: inline-block;
}
.btn-cta:hover { transform: scale(1.05); box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.3); }
.btn-cta.large { padding: 18px 48px; font-size: 16px; }

/* Contact form submit button: content-width pill (not stretched to the
   card), with a standing glow so it draws the eye as the primary action. */
.contact-submit-btn {
    display: block; margin: 8px auto 0;
    box-shadow: 0 8px 28px rgba(var(--accent-rgb), 0.45);
}
.contact-submit-btn:hover { box-shadow: 0 8px 32px rgba(var(--accent-rgb), 0.6); }

/* FORM CONTROLS (shared by the Contact Form and Budget Calculator blocks, used on Home and the Contact page) */
.field { margin-bottom: 24px; }
label { display: block; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; color: var(--text-muted); }

select, input, textarea {
    width: 100%; padding: 18px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1);
    background-color: rgba(255,255,255,0.05); color: #fff; font-size: 15px; outline: none; transition: 0.3s; font-family: inherit;
}

select {
    appearance: none; -webkit-appearance: none; -moz-appearance: none; cursor: pointer; padding-right: 48px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e99db1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat; background-position: right 18px center; background-size: 16px;
}

option { background-color: #1a1a1a; color: #ffffff; font-weight: 500; }
select:focus, input:focus, textarea:focus { border-color: var(--accent); background-color: rgba(255,255,255,0.1); }

#contact .bento-card label { color: #ffffff; }
#contact .bento-card input::placeholder,
#contact .bento-card textarea::placeholder { color: rgba(255, 255, 255, 0.6); }

.lang-switch {
    display: inline-flex; align-items: center; gap: 4px; text-decoration: none;
    font-size: 12px; font-weight: 800; letter-spacing: 0.5px; color: rgba(255,255,255,0.45);
    margin-right: 8px;
}
.lang-switch span { transition: 0.2s; }
.lang-switch span.is-active { color: #ffffff; }
.lang-switch:hover span:not(.is-active) { color: var(--accent); }
.lang-switch-sep { color: rgba(255,255,255,0.25); }

.mobile-menu-btn {
    display: none; flex-direction: column; justify-content: space-between;
    width: 24px; height: 18px; cursor: pointer; z-index: 1001; background: transparent; border: none; padding: 0;
}

.mobile-menu-btn .bar { width: 100%; height: 2px; background-color: #ffffff; border-radius: 10px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.mobile-menu-btn.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.mobile-menu-btn.active .bar:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* SCROLL REVEAL ANIMATIONS (identical across index/service/news; no-op on case study) */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}
.reveal.active { opacity: 1; transform: translateY(0); }

.delay-100 { transition-delay: 50ms; }
.delay-200 { transition-delay: 100ms; }
.delay-300 { transition-delay: 150ms; }
.delay-400 { transition-delay: 200ms; }
.delay-500 { transition-delay: 250ms; }

/* THEME MODE UTILITY CLASSES (canonical bg-dark / bg-light system, required on every Lazy Block root section) */
.bg-light { background-color: #ffffff; color: #1a1a1a; }
.bg-light h2, .bg-light h3, .bg-light h4 { color: #000000; }
.bg-light .section-lead, .bg-light p, .bg-light .text-muted { color: #4a4a4a; }

.bg-dark { background-color: var(--bg-dark); color: #ffffff; }
.bg-dark h2, .bg-dark h3, .bg-dark h4 { color: #ffffff; }
.bg-dark .text-muted { color: rgba(255,255,255,0.7); }

section.bg-light + section.bg-light { padding-top: 15px; }
section.bg-dark + section.bg-dark { padding-top: 15px; }

/* h2 / .section-lead base sizes differ per template (64px vs 56px) — defined in home.css / service.css / news-article.css instead of here. */

/* PRE-FOOTER CTA (standard 120px variant used on home + news; service.css overrides to its 100px variant) */
.pre-footer-cta {
    padding: 120px 0;
    background: #ffffff;
    border-top: none;
    position: relative;
    text-align: center;
}

.cta-arrow-wrapper {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-120%);
    width: 80px;
    height: 120px;
    z-index: 10;
}

.cta-arrow-wrapper path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawArrow 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.5s;
}

@keyframes drawArrow { to { stroke-dashoffset: 0; } }

.cta-subhead {
    color: #666666;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 20px;
}

.cta-head {
    font-size: clamp(40px, 6vw, 80px);
    font-weight: 900;
    font-style: normal;
    margin-bottom: 40px;
    letter-spacing: -2px;
    color: #080808;
    padding: 0;
    line-height: 1.1;
}

.cta-head span { color: #d86984; }

.pre-footer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 42px;
    border-radius: 100px;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--accent);
    box-shadow: 0 10px 20px rgba(233, 157, 177, 0.3);
}

.pre-footer-btn:hover {
    background: transparent;
    color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(233, 157, 177, 0.4);
}

/* FOOTER (byte-identical across all four source files) */
.main-footer {
    background: #030303;
    padding: 80px 0 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 60px;
}

.footer-col h4 {
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
    position: relative;
    display: inline-block;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    opacity: 0.5;
}

.footer-col p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin-top: 16px;
    max-width: 90%;
}

.footer-logo { font-size: 24px; margin-bottom: 10px; display: inline-block; color: #fff; text-decoration: none; font-weight: 900; }
.footer-logo span { color: var(--accent); }

.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 12px; }

.footer-col ul a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-col ul a:hover { color: var(--accent); transform: translateX(5px); }

.contact-info li { display: flex; gap: 12px; align-items: center; color: var(--text-muted); font-size: 14px; }
.contact-info span { font-size: 16px; }

.social-links { display: flex; gap: 20px; margin-top: 24px; }

.social-links a { color: #fff; text-decoration: none; font-size: 14px; font-weight: 600; transition: 0.3s; opacity: 0.7; }
.social-links a:hover { color: var(--accent); opacity: 1; }

.footer-bottom {
    padding: 24px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: rgba(255,255,255,0.4);
}

/* GLOBAL RESPONSIVE: header / mobile nav (identical breakpoint behaviour across templates) */
@media (max-width: 900px) {
    header { padding: 12px 24px; }
    .mobile-menu-btn { display: flex; }

    .nav-links {
        position: absolute; top: 100%; left: 0; right: 0; margin-top: 10px; background: rgba(15, 15, 15, 0.95);
        backdrop-filter: var(--glass); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 24px;
        flex-direction: column; align-items: flex-start; padding: 24px; gap: 20px; box-shadow: 0 20px 40px rgba(0,0,0,0.5);
        opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-links.active { opacity: 1; visibility: visible; transform: translateY(0); }
    .nav-item { width: 100%; padding: 0; }
    .nav-link-main { font-size: 16px; padding: 8px 0; justify-content: space-between; width: 100%; }
    .nav-item::after { display: none; }

    .dropdown {
        position: relative !important; left: 0 !important; transform: none !important; background: transparent;
        border: none; box-shadow: none; padding: 10px 0 0 16px; width: 100%; display: none; opacity: 1;
        visibility: visible; margin-top: 0;
    }

    .nav-item:hover .dropdown { display: none; }
    .nav-item.open .dropdown { display: flex; }
    .nav-item.open .arrow-icon { transform: rotate(180deg); }
    .dropdown a { font-size: 14px; padding: 8px 0; }
    .dropdown a:hover { padding-left: 10px; background: transparent; }
    .btn-cta { width: 100%; text-align: center; margin-top: 10px; }

    .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
    .cta-arrow-wrapper { transform: translateX(-50%); top: -70px; }
}

@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* LOGO CLOUD (shared block: homepage + service page) */
.logo-cloud { display: grid; grid-template-columns: repeat(6, 1fr); gap: 50px; align-items: center; justify-items: center; position: relative; z-index: 1; }
.logo-cloud img { max-width: 130px; width: 100%; opacity: 0.4; filter: brightness(0) invert(1); transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.logo-cloud img:hover { opacity: 1; transform: scale(1.1); filter: none; }

@media (max-width: 1100px) {
    .logo-cloud { grid-template-columns: repeat(3, 1fr); gap: 30px; }
}

/* Contact form AJAX feedback message (additive; no existing selector affected) */
.form-message { margin-top: 16px; font-size: 14px; font-weight: 600; min-height: 0; }
.form-message--success { color: #4caf82; }
.form-message--error { color: #e05252; }
