:root {
    --bg: #0b0d14;
    --bg-soft: #12151f;
    --bg-card: #161a26;
    --border: #232838;
    --text: #e7e9f0;
    --text-dim: #9aa1b4;
    --accent: #7c5cfc;
    --accent-2: #22d3ee;
    --accent-grad: linear-gradient(135deg, #7c5cfc 0%, #22d3ee 100%);
    --success: #34d399;
    --warn: #fbbf24;
    --danger: #f87171;
    --radius: 14px;
    --max-width: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    line-height: 1.55;
}

a { color: inherit; text-decoration: none; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

img { max-width: 100%; display: block; }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 13, 20, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
}

.logo {
    font-weight: 800;
    font-size: 1.25rem;
    background: var(--accent-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.main-nav a {
    color: var(--text-dim);
    font-size: 0.95rem;
    transition: color .15s ease;
    white-space: nowrap;
}

.main-nav a:hover { color: var(--text); }

.nav-cta {
    background: var(--accent-grad);
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 600;
}

.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.burger span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}


.nav-logout-form { display: inline; margin: 0; }
.nav-logout {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    color: var(--text-dim);
    font: inherit;
    cursor: pointer;
}
.nav-logout:hover { color: var(--text); }
.form-note {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(124,92,252,.08);
    border: 1px solid rgba(124,92,252,.2);
    color: var(--text-dim);
    font-size: .88rem;
    line-height: 1.5;
}

/* ---------- Buttons / forms ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: transform .15s ease, opacity .15s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--accent-grad); color: #fff; }

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-outline:hover { border-color: var(--accent); }

.btn-block { width: 100%; }

form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="tel"],
form textarea,
form select {
    width: 100%;
    padding: 13px 16px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.95rem;
    margin-bottom: 12px;
    font-family: inherit;
}

form input:focus, form textarea:focus, form select:focus {
    outline: none;
    border-color: var(--accent);
}

.field-errors { color: var(--danger); font-size: 0.85rem; margin: -8px 0 12px; }

.helptext { color: var(--text-dim); font-size: 0.82rem; margin: -8px 0 12px; }

label { font-size: 0.9rem; color: var(--text-dim); display: block; margin-bottom: 6px; }

/* ---------- Alerts ---------- */
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin: 16px 0;
    font-size: 0.95rem;
}
.alert-success { background: rgba(52, 211, 153, .12); border: 1px solid var(--success); color: var(--success); }
.alert-error, .alert-danger { background: rgba(248, 113, 113, .12); border: 1px solid var(--danger); color: var(--danger); }
.alert-info { background: rgba(124, 92, 252, .12); border: 1px solid var(--accent); color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
    padding: 90px 0 70px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 400px;
    background: var(--accent-grad);
    opacity: 0.18;
    filter: blur(120px);
    z-index: -1;
}

.eyebrow {
    display: inline-block;
    color: var(--accent-2);
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 16px;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
    margin: 0 0 20px;
    line-height: 1.15;
}

.hero p.lead {
    max-width: 640px;
    margin: 0 auto 34px;
    color: var(--text-dim);
    font-size: 1.1rem;
}

.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.trust-row {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 60px;
    color: var(--text-dim);
}

.trust-row strong {
    display: block;
    font-size: 1.6rem;
    color: var(--text);
}

.price-note-hero {
    max-width: 760px;
    margin: 0 auto 28px;
}

.price-note {
    color: var(--text-dim);
    background: rgba(124, 92, 252, .08);
    border: 1px solid rgba(124, 92, 252, .35);
    border-radius: 12px;
    padding: 14px 18px;
    font-size: .92rem;
}

.price-note strong { color: var(--text); }

.service-pricing-note {
    margin-top: 28px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.service-pricing-note div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.service-pricing-note strong { font-size: .95rem; }
.service-pricing-note span { color: var(--text-dim); font-size: .88rem; }

.mechanics-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 42px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-image: radial-gradient(circle at top right, rgba(34,211,238,.12), transparent 58%);
}

.mechanics-band h2 {
    margin: 0 0 12px;
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.mechanics-band p {
    margin: 0;
    max-width: 720px;
    color: var(--text-dim);
}

.pricing-rules {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 18px;
}

.pricing-rule {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.pricing-rule strong {
    display: block;
    margin-bottom: 8px;
}

.pricing-rule span {
    color: var(--text-dim);
    font-size: .9rem;
}

.pricing-disclaimer {
    color: var(--text-dim);
    font-size: .9rem;
    text-align: center;
    margin: 0 0 30px;
}

/* ---------- Sections ---------- */
section { padding: 70px 0; }

.section-head {
    text-align: center;
    max-width: 620px;
    margin: 0 auto 46px;
}

.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 12px; }
.section-head p { color: var(--text-dim); }

/* ---------- Cards grid ---------- */
.grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: border-color .15s ease, transform .15s ease;
}

.card:hover { border-color: var(--accent); transform: translateY(-3px); }

.card .icon { font-size: 1.8rem; margin-bottom: 14px; }
.card h3 { margin: 0 0 10px; font-size: 1.1rem; }
.card p { color: var(--text-dim); margin: 0; font-size: 0.95rem; }

/* ---------- Pricing ---------- */
.price-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    position: relative;
}

.price-card.featured {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), 0 20px 50px -20px rgba(124, 92, 252, .5);
}

.price-card .badge {
    position: absolute;
    top: -12px;
    right: 24px;
    background: var(--accent-grad);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
}

.price-card .price {
    font-size: 2rem;
    font-weight: 800;
    margin: 14px 0 4px;
}

.price-card .price span {
    font-size: 0.95rem;
    color: var(--text-dim);
    font-weight: 400;
}

/* ---------- Portfolio ---------- */
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .15s ease, border-color .15s ease;
}

.project-card:hover { transform: translateY(-4px); border-color: var(--accent); }

.project-cover {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.project-card .body { padding: 22px; }
.project-card h3 { margin: 0 0 8px; }
.project-card .client { color: var(--accent-2); font-size: 0.85rem; margin-bottom: 8px; }
.project-card p { color: var(--text-dim); font-size: 0.92rem; margin: 0; }

.project-detail-cover {
    height: 240px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    margin-bottom: 34px;
}

.tag {
    display: inline-block;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    margin: 0 8px 8px 0;
}

/* ---------- Testimonials ---------- */
.testimonial {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
}

.testimonial .stars { color: var(--warn); margin-bottom: 12px; }
.testimonial .author { margin-top: 16px; font-weight: 600; }
.testimonial .role { color: var(--text-dim); font-size: 0.85rem; }

/* ---------- FAQ ---------- */
.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
}

.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: "+";
    color: var(--accent);
    font-size: 1.3rem;
}

.faq-item[open] summary::after { content: "−"; }

.faq-item p { color: var(--text-dim); margin: 14px 0 0; }

/* ---------- Contact ---------- */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.contact-info-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.contact-info-item .icon { font-size: 1.4rem; }
.contact-info-item strong { display: block; }
.contact-info-item span { color: var(--text-dim); font-size: 0.9rem; }

/* ---------- Auth pages ---------- */
.auth-wrap {
    max-width: 420px;
    margin: 60px auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
}

.auth-wrap h1 { font-size: 1.5rem; margin-top: 0; }
.auth-switch { text-align: center; margin-top: 18px; color: var(--text-dim); font-size: 0.9rem; }
.auth-switch a { color: var(--accent); font-weight: 600; }

/* ---------- Dashboard ---------- */
.dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 12px; }

.order-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 14px;
    gap: 16px;
    flex-wrap: wrap;
}

.order-row h3 { margin: 0 0 4px; font-size: 1.05rem; }
.order-row .meta { color: var(--text-dim); font-size: 0.85rem; }

.status-badge {
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}
.status-new { background: rgba(124,92,252,.15); color: var(--accent); }
.status-in_progress { background: rgba(34,211,238,.15); color: var(--accent-2); }
.status-review { background: rgba(251,191,36,.15); color: var(--warn); }
.status-done { background: rgba(52,211,153,.15); color: var(--success); }
.status-cancelled { background: rgba(248,113,113,.15); color: var(--danger); }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
}

/* ---------- Order chat ---------- */
.chat-thread { display: flex; flex-direction: column; gap: 14px; margin: 30px 0; }

.chat-bubble {
    max-width: 70%;
    padding: 14px 18px;
    border-radius: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.chat-bubble.mine {
    align-self: flex-end;
    background: var(--accent-grad);
    color: #fff;
    border: none;
}

.chat-bubble .meta { font-size: 0.75rem; opacity: 0.7; margin-bottom: 6px; }

/* ---------- CTA band ---------- */
.cta-band {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 50px;
    text-align: center;
    background-image: radial-gradient(circle at top right, rgba(124,92,252,.15), transparent 60%);
}

.cta-band h2 { margin-top: 0; }

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 60px;
    padding-top: 50px;
    background: var(--bg-soft);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 30px;
    padding-bottom: 30px;
}

.footer-tagline { color: var(--text-dim); font-size: 0.9rem; margin-top: 10px; }

.footer-contacts, .footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-dim);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 20px;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.82rem;
}

/* ---------- Error pages ---------- */
.error-page {
    text-align: center;
    padding: 120px 20px;
}
.error-page .code {
    font-size: 6rem;
    font-weight: 800;
    background: var(--accent-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .contact-layout { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
    .pricing-rules { grid-template-columns: 1fr; }
    .mechanics-band { flex-direction: column; align-items: flex-start; }
    .service-pricing-note { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 720px) {
    .main-nav {
        position: fixed;
        inset: 68px 0 0 0;
        background: var(--bg);
        flex-direction: column;
        align-items: flex-start;
        padding: 30px 24px;
        gap: 18px;
        transform: translateX(100%);
        transition: transform .2s ease;
        border-top: 1px solid var(--border);
    }
    .main-nav.open { transform: translateX(0); }
    .burger { display: flex; }
    .nav-cta { align-self: flex-start; }
}
