/* ===== VARIABLES ===== */
:root {
    --ink: #0a0a0a;
    --paper: #ffffff;
    --cream: #f7f5f1;
    --accent: #c8372d;
    --accent-dark: #a12d25;
    --olive: #4a5c3e;
    --olive-light: #6b7f5a;
    /* Textul secundar de pe tot site-ul. Vechiul #8a847a dădea 3,71:1 pe alb,
       sub pragul WCAG AA de 4,5:1 — iar cu el sunt scrise aproape toate
       paragrafele. #6f6a60 păstrează nuanța caldă și urcă la 5,37:1 pe alb,
       4,93:1 pe --cream. */
    --warm-gray: #6f6a60;
    --light-border: rgba(10,10,10,0.08);
    --serif: 'Instrument Serif', Georgia, serif;
    --sans: 'DM Sans', system-ui, sans-serif;

    /* Pictograme folosite din CSS (::before), unde nu putem pune un <svg>.
       Desenate ca măști, deci culoarea vine din `background` — la fel ca
       `currentColor` la pictogramele inline din HTML. Contur Tabler Icons (MIT).
       Ghilimelele simple sunt obligatorii: `#` neescapat rupe url(). */
    --i-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5l10 -10'/%3E%3C/svg%3E");
    --i-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z'/%3E%3Cpath d='M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0'/%3E%3Cpath d='M8 11v-4a4 4 0 1 1 8 0v4'/%3E%3C/svg%3E");
    --i-alert: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0z'/%3E%3Cpath d='M12 16h.01'/%3E%3C/svg%3E");
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--sans);
    background: var(--paper);
    color: var(--ink);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

/* `hidden` trebuie să bată `display` venit dintr-o clasă. .btn-primary e
   inline-flex, deci fără `!important` atributul `hidden` de pe #btnSubmit nu
   face nimic și butonul „Trimite Cererea de Ofertă" rămâne vizibil pe toți
   pașii wizardului, lângă „Continuă". */
[hidden] { display: none !important; }

/* Ancorele (#servicii, #de-ce-noi) aterizează sub bara fixă de sus dacă nu
   rezervăm înălțimea ei. Respectat și de `scroll-behavior: smooth`, și de
   `scrollIntoView` din js/main.js. */
section[id], header[id] { scroll-margin-top: 6rem; }

/* Inel de focus vizibil peste tot. Fără el, navigarea cu tastatura e oarbă:
   linkurile din meniu, butoanele și cardurile-opțiune nu arătau nimic. */
:focus-visible {
    outline: 3px solid rgba(200,55,45,0.55);
    outline-offset: 3px;
    border-radius: 3px;
}

/* Sari peste meniu — primul element focusabil din pagină. */
.skip-link {
    position: absolute; left: 1rem; top: -100%;
    z-index: 200;
    background: var(--ink); color: #fff;
    padding: 0.8rem 1.2rem; border-radius: 0 0 8px 8px;
    font-size: 0.9rem; font-weight: 600;
}
.skip-link:focus { top: 0; }

/* ===== NAVBAR ===== */
nav {
    position: fixed; top: 0; width: 100%; z-index: 100;
    padding: 1.2rem 4%;
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--light-border);
    transition: all 0.4s ease;
}
nav.scrolled { padding: 0.8rem 4%; box-shadow: 0 4px 30px rgba(0,0,0,0.06); }
.nav-logo { font-family: var(--sans); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 2.5rem; list-style: none; align-items: center; }
.nav-links a { text-decoration: none; color: var(--ink); font-size: 0.9rem; font-weight: 500; letter-spacing: 0.02em; transition: color 0.3s; position: relative; }
.nav-links a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background: var(--accent); transition: width 0.3s; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta { background: var(--accent) !important; color: #fff !important; padding: 0.65rem 1.5rem; border-radius: 6px; font-weight: 600 !important; transition: background 0.3s, transform 0.2s !important; }
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--accent-dark) !important; transform: translateY(-1px); }
.mobile-menu { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.mobile-menu span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 6px 0; transition: all 0.3s; }
/* `absolute` față de <nav> (care e `fixed`, deci e blocul containing), nu
   `fixed` cu `top: 60px`: bara are ~84px pe telefon, deci valoarea fixă
   acoperea logoul și hamburgerul. Așa panoul stă mereu exact sub bară și se
   ajustează singur când `nav.scrolled` îi scade înălțimea. */
.nav-links.mobile-open {
    display: flex; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; flex-direction: column; padding: 2rem; gap: 1.5rem;
    border-bottom: 1px solid var(--light-border);
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    max-height: calc(100dvh - 100%); overflow-y: auto;
}
/* Butonul de comandă rămâne vizibil în bară pe telefon. Înainte trăia doar
   în `.nav-links`, care e `display: none` sub 768px — adică singura cale de
   conversie a site-ului era ascunsă în spatele hamburgerului. */
.nav-cta-mobile { display: none; }

/* ===== BUTTONS ===== */
.btn-primary { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--accent); color: #fff; padding: 1rem 2rem; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 1rem; transition: all 0.3s; border: none; cursor: pointer; }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(200,55,45,0.25); }
.btn-primary svg { transition: transform 0.3s; }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-secondary { display: inline-flex; align-items: center; gap: 0.5rem; background: transparent; color: var(--ink); padding: 1rem 2rem; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 1rem; border: 2px solid var(--light-border); transition: all 0.3s; }
.btn-secondary:hover { border-color: var(--ink); background: rgba(10,10,10,0.03); }
.btn-small { padding: 0.6rem 1.4rem; font-size: 0.9rem; }
.btn-white { background: #fff; color: var(--ink); }
.btn-white:hover { background: var(--cream); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }

/* ===== PICTOGRAME =====
   Contur Tabler Icons (MIT), inline în HTML ca <svg class="i">. Moștenesc
   culoarea prin `currentColor`, deci se colorează din containerul lor. Au
   înlocuit emoji-urile, care se desenau altfel pe fiecare sistem de operare
   și erau citite cu voce tare de cititoarele de ecran. */
.i { display: inline-block; vertical-align: middle; flex-shrink: 0; }

.label-icon { color: var(--accent); }
.service-icon.red   { color: var(--accent); }
.service-icon.green { color: var(--olive); }
.service-icon.warm  { color: var(--warm-gray); }
.feature-card .icon { color: var(--olive); }
.contact-card-icon  { color: var(--accent); }
.value-icon         { color: var(--accent); }
/* Pictograma din titlul unei casete info stă pe linie cu textul, nu deasupra. */
.info-box h4 { display: flex; align-items: center; gap: 0.55rem; }
.info-box h4 .i { color: var(--accent); }
.form-success .icon { color: var(--olive); }

/* ===== SECTION HELPERS ===== */
.section-tag { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); font-weight: 700; margin-bottom: 1rem; }
.section-title { font-family: var(--serif); font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 1rem; max-width: 650px; }
.section-title em { font-style: italic; color: var(--accent); }
.section-desc { color: var(--warm-gray); font-size: 1.1rem; line-height: 1.7; max-width: 550px; margin-bottom: 3.5rem; }

/* ===== PAGE HEADER ===== */
.page-header { padding: 10rem 4% 4rem; background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.page-header::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: radial-gradient(circle at 20% 50%, rgba(200,55,45,0.08) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(74,92,62,0.06) 0%, transparent 40%); pointer-events: none; }
.page-header-inner { max-width: 1400px; margin: 0 auto; position: relative; z-index: 1; }
/* Opacitățile de aici erau 0.4 — adică 3,8:1 pe fundalul --ink, sub pragul
   AA. La 0.6 ajung la ~7,5:1 fără să strice ierarhia față de titlu. */
.page-header .section-tag { color: rgba(255,255,255,0.6); }
.page-header .section-title { color: #fff; max-width: 800px; }
.page-header .section-desc { color: rgba(255,255,255,0.7); max-width: 600px; margin-bottom: 0; }
.breadcrumb { font-size: 0.85rem; color: rgba(255,255,255,0.6); margin-bottom: 1.5rem; }
.breadcrumb a { color: rgba(255,255,255,0.72); transition: color 0.3s; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb span { margin: 0 0.5rem; }

/* ===== CONTENT ===== */
.content-section { padding: 5rem 4%; }
.content-inner { max-width: 1400px; margin: 0 auto; }
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.content-text h2 { font-family: var(--serif); font-size: 2rem; margin-bottom: 1.2rem; letter-spacing: -0.02em; }
.content-text h2 em { font-style: italic; color: var(--accent); }
.content-text p { color: var(--warm-gray); font-size: 1rem; line-height: 1.8; margin-bottom: 1.2rem; }
.content-text ul { list-style: none; margin-bottom: 2rem; }
.content-text ul li { padding: 0.6rem 0; padding-left: 1.8rem; position: relative; color: var(--ink); font-size: 0.95rem; line-height: 1.6; }
/* Bifa e desenată ca mască SVG, nu ca glifă „✓": caracterul se randa diferit
   pe fiecare sistem și era citit cu voce tare de cititoarele de ecran. */
.content-text ul li::before {
    content: ''; position: absolute; left: 0; top: 0.85rem;
    width: 15px; height: 15px; background: var(--olive);
    -webkit-mask: var(--i-check) center / contain no-repeat;
            mask: var(--i-check) center / contain no-repeat;
}

/* Feature cards */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin: 3rem 0; }
.feature-card { background: var(--cream); border-radius: 14px; padding: 2rem; border: 1px solid var(--light-border); transition: all 0.3s; }
.feature-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,0.06); }
.feature-card .icon { font-size: 2rem; margin-bottom: 1rem; display: block; }
.feature-card h3 { font-family: var(--serif); font-size: 1.2rem; margin-bottom: 0.6rem; }
.feature-card p { color: var(--warm-gray); font-size: 0.9rem; line-height: 1.6; }

/* Info box */
.info-box { background: var(--cream); border-radius: 14px; padding: 2rem; border-left: 4px solid var(--accent); margin: 2rem 0; }
.info-box h4 { font-family: var(--serif); font-size: 1.2rem; margin-bottom: 0.6rem; }
.info-box p { color: var(--warm-gray); font-size: 0.95rem; line-height: 1.6; margin: 0; }

/* Specs table */
.specs-table { width: 100%; border-collapse: collapse; margin: 2rem 0; font-size: 0.95rem; }
.specs-table th, .specs-table td { padding: 1rem 1.2rem; text-align: left; border-bottom: 1px solid var(--light-border); }
.specs-table th { background: var(--cream); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--warm-gray); }
.specs-table td { color: var(--ink); }
.specs-table tr:hover td { background: rgba(247,245,241,0.5); }

/* Inline CTA */
.inline-cta { background: var(--ink); color: #fff; border-radius: 20px; padding: 3.5rem; text-align: center; margin: 4rem 0; position: relative; overflow: hidden; }
.inline-cta::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: radial-gradient(circle at 50% 50%, rgba(200,55,45,0.1) 0%, transparent 60%); pointer-events: none; }
.inline-cta h3 { font-family: var(--serif); font-size: 2rem; margin-bottom: 0.8rem; position: relative; z-index: 1; }
.inline-cta p { color: rgba(255,255,255,0.6); margin-bottom: 2rem; font-size: 1.05rem; position: relative; z-index: 1; }
.inline-cta .btn-primary { position: relative; z-index: 1; }

/* ===== FORM FIELDS (folosite de configuratorul de comandă) ===== */
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 0.5rem; color: var(--ink); }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 0.85rem 1rem; border: 2px solid var(--light-border); border-radius: 8px; font-family: var(--sans); font-size: 0.95rem; background: #fff; color: var(--ink); transition: border-color 0.3s; }
/* `outline: none` la :focus lăsa doar schimbarea de culoare a bordurii ca
   indiciu. Păstrăm bordura, dar inelul de la :focus-visible rămâne. */
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--accent); }
.form-group input:focus-visible, .form-group textarea:focus-visible, .form-group select:focus-visible { outline-offset: 1px; }
/* Câmp respins de validare — marcat din order-wizard.js. */
.form-group input[aria-invalid="true"], .form-group textarea[aria-invalid="true"] { border-color: var(--accent); background: rgba(200,55,45,0.03); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
/* ===== CARDURI CONTACT ===== */
/* Fără `align-items: start`: cardul de Email n-are paragraf de program, deci
   cele trei ieșeau de înălțimi diferite. Grila le întinde egal implicit. */
.contact-info-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.contact-card { background: var(--cream); border-radius: 14px; padding: 1.8rem; display: flex; gap: 1rem; align-items: flex-start; transition: all 0.3s; }
.contact-card:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.06); }
.contact-card-icon { width: 48px; height: 48px; border-radius: 12px; background: rgba(200,55,45,0.08); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.contact-card h4 { font-size: 1rem; font-weight: 600; margin-bottom: 0.3rem; }
.contact-card p { color: var(--warm-gray); font-size: 0.9rem; line-height: 1.5; }
.contact-card a { color: var(--accent); font-weight: 600; font-size: 0.95rem; }

/* Form success */
.form-success { display: none; text-align: center; padding: 3rem 2rem; }
.form-success.show { display: block; }
.form-success .icon { font-size: 3rem; margin-bottom: 1rem; }
.form-success h3 { font-family: var(--serif); font-size: 1.5rem; margin-bottom: 0.5rem; }
.form-success p { color: var(--warm-gray); }

/* ===== FOOTER ===== */
footer { background: var(--ink); color: rgba(255,255,255,0.62); padding: 4rem 4% 2rem; }
.footer-inner { max-width: 1400px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-brand .nav-logo { color: #fff; font-size: 1.4rem; margin-bottom: 1rem; display: block; }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; max-width: 300px; }
.footer-col h5 { color: #fff; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1.2rem; }
.footer-col a,
.footer-col .footer-address { display: block; color: rgba(255,255,255,0.62); text-decoration: none; font-size: 0.9rem; margin-bottom: 0.7rem; transition: color 0.3s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 2rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: 0.82rem; }
/* Legătura spre designer — instrument intern, protejat cu parolă la nivel de
   edge function. E discretă intenționat: un client care o apasă vede o casetă
   de autentificare, nu un serviciu pe care i l-am promis. */
.footer-legal { color: rgba(255,255,255,0.62); text-decoration: none; transition: color 0.3s; }
.footer-legal:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-admin { display: inline-flex; align-items: center; gap: 0.4rem; color: rgba(255,255,255,0.55); text-decoration: none; font-size: 0.82rem; transition: color 0.3s; white-space: nowrap; }
.footer-admin::before {
    content: ''; width: 13px; height: 13px; background: currentColor;
    -webkit-mask: var(--i-lock) center / contain no-repeat;
            mask: var(--i-lock) center / contain no-repeat;
}
.footer-admin:hover { color: rgba(255,255,255,0.85); }

/* ===== ANIMATIONS ===== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@keyframes fadeSlideUp { from { opacity: 0; transform: translateY(25px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* `.reveal` pornește de la opacity 0 și e făcut vizibil de IntersectionObserver
   din js/main.js. Fără JS, aproape tot conținutul paginii rămâne invizibil —
   fiecare pagină încarcă și un <noscript> care anulează starea inițială. */

/* Mișcarea nu e obligatorie pentru nimeni. Aici cad: revelările la scroll,
   fadeSlideUp din hero și din pașii wizardului, plutirea și pulsul infinit. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .content-grid { grid-template-columns: 1fr; gap: 2rem; }
    .feature-grid, .contact-info-cards { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu { display: block; }
    /* Comanda rămâne la un singur tap, fără să treacă prin hamburger. */
    .nav-cta-mobile { display: inline-flex; padding: 0.55rem 1rem; font-size: 0.85rem; margin-left: auto; margin-right: 0.5rem; }
    /* Butonul din bară rămâne pe loc când se deschide panoul; ascundem în
       schimb dublura din listă (CTA-ul e mereu ultimul element din meniu). */
    .nav-links.mobile-open li:last-child { display: none; }
    .feature-grid, .contact-info-cards { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
    .page-header { padding: 7rem 4% 3rem; }
}
