/* ==========================================================================
   EXPERT DEBARASĂRI — sistem de stil optimizat pentru performanță
   Paletă: cerneală (navy închis) + oțel (albastru structural) + alamă (accent cald)
   Tipografie: Fraunces (titluri, serifă editorială) / Inter (text) / IBM Plex Mono (etichete)
   ========================================================================== */

:root {
    --ink: #10161f;
    --ink-soft: #1c2531;
    --ink-muted: #3a4453;
    --steel: #3e5c76;
    --steel-deep: #2c4459;
    --steel-soft: #e8edf1;
    --brass: #b4884a;
    --brass-deep: #93692f;
    --brass-soft: #f1e6d2;
    --paper: #f7f4ee;
    --paper-deep: #eee8da;
    --surface: #ffffff;
    --line: #ddd5c4;
    --line-strong: #c7bca4;
    --text: #1c2531;
    --text-muted: #5b6472;
    --white: #ffffff;
    --whatsapp: #25d366;
    --whatsapp-deep: #1ebe57;
    --phone-color: var(--steel-deep);

    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'IBM Plex Mono', Courier, monospace;

    /* Tranziții scurtate pentru randare percepută mai rapidă (FPS crescut) */
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 10px -2px rgba(16, 22, 31, 0.08);
    --shadow-md: 0 18px 40px -14px rgba(16, 22, 31, 0.18);
    --shadow-lg: 0 32px 64px -20px rgba(16, 22, 31, 0.28);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--text); line-height: 1.7; background: var(--paper); overflow-x: hidden; }

.container { width: 90%; max-width: 1200px; margin: 0 auto; }
.section-padding { padding: 110px 0; }
.bg-light { background-color: var(--paper-deep); }
.text-center { text-align: center; }

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, .hamburger:focus-visible {
    outline: 2px solid var(--brass);
    outline-offset: 3px;
}
@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;
    }
}

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
h2 { font-size: clamp(2.1rem, 3vw, 2.75rem); margin-bottom: 25px; }

.subtitle {
    font-family: var(--font-mono);
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    color: var(--steel-deep);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 16px;
}
.subtitle::before { content: ''; display: block; width: 34px; height: 2px; background: var(--brass); }
.text-center .subtitle { align-items: center; }
.text-center .subtitle::before { margin: 0 auto; }

.text-gradient { color: var(--brass); font-style: italic; font-weight: 500; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 16px 34px; border-radius: 4px; text-decoration: none;
    font-weight: 600; font-size: 1.02rem; transition: var(--transition);
    cursor: pointer; border: 1px solid transparent;
}
.btn-primary { background-color: var(--ink); color: var(--white); box-shadow: 0 4px 14px rgba(16, 22, 31, 0.25); }
.btn-primary:hover { background-color: var(--steel-deep); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.btn-whatsapp { background-color: var(--whatsapp); color: var(--white); }
.btn-whatsapp:hover { background-color: var(--whatsapp-deep); transform: translateY(-3px); box-shadow: 0 18px 34px -12px rgba(37, 211, 102, 0.45); }
.w-100 { width: 100%; }

header {
    background: rgba(247, 244, 238, 0.92); backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    position: fixed; width: 100%; top: 0; z-index: 1000; transition: var(--transition);
}
header.scrolled { padding: 4px 0; background: rgba(247, 244, 238, 0.98); box-shadow: var(--shadow-sm); }
.nav-container { display: flex; justify-content: space-between; align-items: center; height: 68px; }
.logo { font-family: var(--font-display); font-size: 1.55rem; font-weight: 600; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.logo i { color: var(--brass); font-size: 1.7rem; }
.logo span { color: var(--steel-deep); font-style: italic; }
.nav-links { display: flex; list-style: none; gap: 36px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--text); font-weight: 500; transition: var(--transition); font-size: 1.02rem; position: relative; }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: -5px; width: 0; height: 1px; background: var(--brass); transition: var(--transition); }
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }
.btn-nav { background-color: var(--ink); color: var(--white) !important; padding: 12px 26px; border-radius: 4px; }
.btn-nav::after { display: none; }
.btn-nav:hover { background-color: var(--brass-deep); transform: translateY(-2px); }
.hamburger { display: none; font-size: 1.8rem; cursor: pointer; color: var(--ink); }

.hero { height: 100vh; min-height: 650px; position: relative; display: flex; align-items: center;
    background: url('fundal.webp') center/cover no-repeat; will-change: transform; }
.hero::before {
    content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 64px 64px;
}
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(110deg, rgba(16, 22, 31, 0.95), rgba(16, 22, 31, 0.58)); }
.hero-content { position: relative; z-index: 1; color: var(--white); max-width: 750px; margin-top: 70px; }
.badge-glass {
    font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.82rem; font-weight: 600;
    display: inline-block; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 8px 20px; border-radius: 2px; margin-bottom: 26px;
}
.hero-content h1 { font-size: clamp(2.6rem, 5vw, 4.2rem); color: var(--white); margin-bottom: 25px; font-weight: 600; }
.hero-content p { font-size: 1.18rem; margin-bottom: 45px; color: #d7dce3; line-height: 1.8; }
.hero-buttons { display: flex; gap: 20px; }

/* Optimizare de Randare Off-Screen (Content Visibility) */
.about, .portfolio, .services, .reviews, .contact, footer {
    content-visibility: auto;
    contain-intrinsic-size: 1000px;
}

.about-container { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.about-desc { font-size: 1.14rem; color: var(--text-muted); margin-bottom: 45px; }
.features-grid { display: flex; flex-direction: column; gap: 26px; }
.feature-item { display: flex; align-items: flex-start; gap: 22px; transition: var(--transition); padding: 20px; border-radius: 6px; border: 1px solid transparent; will-change: transform; }
.feature-item:hover { background: var(--surface); border-color: var(--line); transform: translateX(8px); box-shadow: var(--shadow-sm); }
.feature-icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; color: var(--brass-deep); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 4px; flex-shrink: 0; }
.feature-content h4 { font-size: 1.12rem; margin-bottom: 8px; color: var(--ink); font-weight: 600; }
.feature-content p { color: var(--text-muted); font-size: 1rem; margin: 0; }
.about-image { position: relative; border-radius: 8px; overflow: hidden; box-shadow: var(--shadow-lg); will-change: transform; }
.about-image img { width: 100%; height: 400px; object-fit: cover; display: block; filter: saturate(0.95); transition: var(--transition); will-change: transform; }
.about-image::after { content: ''; position: absolute; inset: 16px; border: 1px solid rgba(255, 255, 255, 0.6); opacity: 0; transition: var(--transition); pointer-events: none; }
.about-image:hover img { transform: scale(1.04); }
.about-image:hover::after { inset: 9px; opacity: 1; }

.ba-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 50px; }
.ba-card { display: flex; flex-direction: column; gap: 15px; background: var(--surface); padding: 14px; border-radius: 8px; box-shadow: var(--shadow-sm); transition: var(--transition); border: 1px solid var(--line); will-change: transform; }
.ba-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-md); border-color: var(--brass); }
.ba-images-wrapper.single-img { position: relative; display: block; width: 100%; height: 320px; border-radius: 4px; overflow: hidden; }
.ba-images-wrapper.single-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; will-change: transform; }
.ba-images-wrapper.single-img::after { content: ''; position: absolute; inset: 0; border: 1px solid rgba(255, 255, 255, 0); transition: var(--transition); pointer-events: none; }
.ba-card:hover .ba-images-wrapper.single-img img { transform: scale(1.05); }
.ba-card:hover .ba-images-wrapper.single-img::after { border-color: rgba(255, 255, 255, 0.65); inset: 7px; }
.ba-caption { text-align: center; font-family: var(--font-mono); font-weight: 500; color: var(--text-muted); font-size: 0.9rem; padding: 12px 10px 6px 10px; letter-spacing: 0.01em; }

.section-header { max-width: 650px; margin: 0 auto 60px auto; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px; }
.service-card { background: var(--surface); padding: 50px 35px; border-radius: 8px; box-shadow: var(--shadow-sm); transition: var(--transition); border: 1px solid var(--line); text-align: center; will-change: transform; }
.service-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-md); border-color: var(--steel); }
.icon-wrapper { width: 88px; height: 88px; background: var(--steel-soft); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 30px auto; transition: var(--transition); }
.service-card:hover .icon-wrapper { background: var(--ink); transform: scale(1.08); }
.icon-wrapper i { font-size: 2.6rem; color: var(--steel-deep); transition: var(--transition); }
.service-card:hover .icon-wrapper i { color: var(--white); }
.service-card h3 { font-size: 1.35rem; margin-bottom: 15px; font-weight: 600; }
.service-card p { font-size: 1.03rem; color: var(--text-muted); }

.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 32px; }
.review-card { background: var(--surface); padding: 34px; border-radius: 8px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); transition: var(--transition); will-change: transform; }
.review-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.review-header { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.avatar { width: 52px; height: 52px; border-radius: 4px; background: var(--ink); color: var(--white); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; }
.bg-2 { background: var(--steel-deep); }
.bg-3 { background: var(--brass-deep); }
.bg-4 { background: #5b4636; }
.bg-5 { background: #6b4a4a; }
.bg-6 { background: #3e5c76; }
.reviewer-name { font-family: var(--font-display); font-size: 1.12rem; margin-bottom: 4px; font-weight: 600; }
.stars { color: var(--brass); font-size: 0.98rem; letter-spacing: 2px; }
.review-text { color: var(--text-muted); font-style: italic; font-size: 1.02rem; line-height: 1.7; }

.contact-wrapper { display: grid; grid-template-columns: 1fr 1.5fr; background: var(--surface); border-radius: 10px; box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid var(--line); }
.contact-info { background: var(--ink); padding: 60px; position: relative; overflow: hidden; }
.contact-info::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
}
.text-white { color: var(--white) !important; }
.text-light-blue { color: #9aa6b4; margin-bottom: 50px; font-size: 1.08rem; position: relative; }
.info-items { display: flex; flex-direction: column; gap: 34px; position: relative; z-index: 1; }
.info-item { display: flex; align-items: center; gap: 24px; }
.info-item .icon { width: 54px; height: 54px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; color: var(--brass); transition: var(--transition); flex-shrink: 0 !important; }
.info-item:hover .icon { background: var(--brass); color: var(--ink); border-color: var(--brass); }
.info-item h5 { color: #8b96a5; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.78rem; margin-bottom: 8px; font-weight: 600; }
.info-item a { color: var(--white); text-decoration: none; font-weight: 600; font-size: 1.12rem; transition: var(--transition); }
.info-item a:hover { color: var(--brass); }
.contact-form-container { padding: 60px; background: var(--surface); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.form-group { margin-bottom: 28px; }
.form-group label { display: block; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; margin-bottom: 12px; color: var(--steel-deep); font-size: 0.74rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 14px 2px; border: none; border-bottom: 1.5px solid var(--line-strong);
    border-radius: 0; font-family: var(--font-body); font-size: 1.02rem; background-color: transparent; color: var(--text); transition: var(--transition);
}
.form-group select {
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6472' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat; background-position: right 2px center; background-size: 16px; padding-right: 26px;
}
.form-group textarea { border: 1.5px solid var(--line-strong); border-radius: 6px; padding: 14px 16px; background-color: var(--paper); resize: vertical; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--brass); }

footer { background-color: var(--ink); color: #9aa6b4; padding: 90px 0 22px 0; }
.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 50px; margin-bottom: 50px; }
.footer-logo { font-family: var(--font-display); color: var(--white); margin-bottom: 25px; display: inline-flex; font-size: 1.4rem; }
.footer-col h4 { color: var(--white); margin-bottom: 25px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.85rem; font-weight: 600; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 18px; display: flex; align-items: center; gap: 12px; font-size: 1.02rem; }
.footer-col a { color: #9aa6b4; text-decoration: none; transition: var(--transition); }
.footer-col a:hover { color: var(--brass); padding-left: 5px; }
.footer-bottom { text-align: center; padding-top: 25px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.02em; }

/* Butoane Plutitoare (Optimizate pentru performanță) */
.floating-buttons { position: fixed; bottom: 30px; right: 30px; display: flex; flex-direction: column; gap: 15px; z-index: 999; }
.float-btn { width: 62px; height: 62px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 30px; color: white; box-shadow: var(--shadow-md); cursor: pointer; transition: var(--transition); position: relative; z-index: 1; will-change: transform; }
.float-btn:hover { transform: scale(1.12); }

/* Animații performante (fără layout thrashing) */
.whatsapp-btn { background-color: var(--whatsapp); }
.whatsapp-btn::before {
    content: ''; position: absolute; inset: 0; border-radius: 50%;
    background-color: var(--whatsapp); z-index: -1;
    animation: pulse-anim 2s infinite;
}
.phone-btn { background-color: var(--phone-color); }
.phone-btn::before {
    content: ''; position: absolute; inset: 0; border-radius: 50%;
    background-color: var(--phone-color); z-index: -1;
    animation: pulse-anim 2s infinite; animation-delay: 1s;
}
@keyframes pulse-anim {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.6); opacity: 0; }
}
.chat-toggle-btn { background-color: var(--ink); }

.chat-widget { position: fixed; bottom: 108px; right: 30px; width: 340px; background: var(--surface); border-radius: 10px; box-shadow: var(--shadow-lg); display: none; flex-direction: column; z-index: 1000; overflow: hidden; border: 1px solid var(--line); }
.chat-header { background: var(--ink); color: var(--white); padding: 18px 25px; display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-family: var(--font-display); font-size: 1.08rem; }
.chat-body { padding: 24px; height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; background: var(--paper); }
.chat-message { max-width: 85%; padding: 13px 17px; border-radius: 10px; font-size: 0.94rem; line-height: 1.5; }
.bot-msg { background: var(--paper-deep); color: var(--text); align-self: flex-start; border-bottom-left-radius: 3px; }
.user-msg { background: var(--steel-deep); color: var(--white); align-self: flex-end; border-bottom-right-radius: 3px; }
.chat-options { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.chat-option-btn { background: var(--surface); border: 1px solid var(--steel-deep); color: var(--steel-deep); padding: 12px 18px; border-radius: 6px; cursor: pointer; font-size: 0.88rem; font-weight: 600; text-align: left; transition: var(--transition); }
.chat-option-btn:hover { background: var(--steel-deep); color: var(--white); transform: translateX(5px); }

.reveal { opacity: 0; transform: translateY(45px); transition: all 0.9s cubic-bezier(0.5, 0, 0, 1); will-change: opacity, transform; }
.reveal.active { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* Banner Cookies */
.cookie-banner { position: fixed; bottom: 0; left: 0; width: 100%; background-color: var(--ink); color: var(--white); padding: 16px 30px; display: flex; justify-content: space-between; align-items: center; z-index: 10000; box-shadow: 0 -10px 30px rgba(16, 22, 31, 0.2); transform: translateY(100%); transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); border-top: 1px solid var(--steel-deep); }
.cookie-banner.show { transform: translateY(0); }
.cookie-content { font-size: 0.95rem; font-family: var(--font-body); }
.cookie-content a { color: var(--brass); text-decoration: none; font-weight: 600; transition: var(--transition); }
.cookie-content a:hover { color: var(--brass-soft); text-decoration: underline; }
.cookie-banner .btn-accept { background-color: var(--brass); color: var(--ink); border: none; padding: 12px 28px; border-radius: 4px; font-family: var(--font-body); font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: var(--transition); margin-left: 20px; flex-shrink: 0; }
.cookie-banner .btn-accept:hover { background-color: var(--brass-soft); transform: translateY(-2px); }

/* Responsive */
@media (max-width: 1024px) {
    .ba-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 992px) {
    .hero-content h1 { font-size: 3.1rem; }
    .about-container { grid-template-columns: 1fr; }
    .contact-wrapper { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .nav-links { position: absolute; right: 0; top: 70px; background: var(--paper); flex-direction: column; width: 100%; padding: 30px 0; box-shadow: var(--shadow-md); transform: translateY(-150%); opacity: 0; transition: var(--transition); gap: 25px; border-bottom: 1px solid var(--line); }
    .nav-links.nav-active { transform: translateY(0); opacity: 1; }
    .hamburger { display: block; }
    .logo { font-size: 1.25rem; }

    .hero { height: auto !important; min-height: auto !important; padding-bottom: 50px !important; }
    .hero-content { margin-top: 110px; margin-bottom: 20px; }
    .hero-content h1 { font-size: 2.2rem; line-height: 1.2; margin-bottom: 15px; }
    .hero-content p { font-size: 1rem; margin-bottom: 30px; }
    .hero-buttons { flex-direction: column; width: 100%; gap: 15px; }
    .hero-buttons .btn { width: 100%; margin: 0; }

    .ba-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .contact-info, .contact-form-container { padding: 35px; }
    .footer-content { grid-template-columns: 1fr; }

    .info-item a { font-size: 0.83rem; word-break: break-word; display: block; }
    .footer-bottom { padding: 20px 15px 90px 15px !important; }
    .footer-bottom p { white-space: normal; word-wrap: break-word; line-height: 1.6; }

    .floating-buttons { bottom: 20px; right: 15px; gap: 10px; }
    .float-btn { width: 45px; height: 45px; font-size: 20px; }
    .chat-widget { width: calc(100% - 30px); right: 15px; bottom: 85px; }

    .cookie-banner { flex-direction: column; text-align: center; gap: 16px; padding: 20px 15px; padding-bottom: env(safe-area-inset-bottom, 20px); }
    .cookie-banner .btn-accept { margin-left: 0; width: 100%; }
}