/* ===== MercusTeam v2 — main.css ===== */
:root {
  --bg: #0b0d12;
  --bg2: #12151d;
  --bg3: #171b26;
  --border: #232a3a;
  --text: #e8eaf0;
  --text2: #9aa3b5;
  --accent: #8a2be2;
  --accent2: #14b8a6;
  --grad: linear-gradient(135deg, #8a2be2, #14b8a6);
  --radius: 14px;
  --radius-sm: 8px;
  --font-head: 'Rajdhani', 'Segoe UI', sans-serif;
  --font-body: -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --shadow: 0 8px 30px rgba(0,0,0,.35);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--accent2); text-decoration: none; transition: color .2s; }
a:hover { color: #2dd4bf; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 720px; }
.center { text-align: center; }

/* ===== Nav ===== */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: rgba(11,13,18,.82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; color: var(--text); }
.nav-logo:hover { color: var(--text); }
.nav-logo-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--grad); color: #fff; font-size: .85rem; font-weight: 700; }
.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav-links a { display: block; padding: 8px 14px; border-radius: 8px; color: var(--text2); font-weight: 500; font-size: .95rem; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: rgba(138,43,226,.12); }
.nav-cta { margin-left: 8px; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Buttons ===== */
.btn { display: inline-block; padding: 12px 26px; border-radius: 999px; font-weight: 600; font-size: .95rem; border: none; cursor: pointer; text-align: center; transition: transform .15s, box-shadow .2s, background .2s; font-family: inherit; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 4px 18px rgba(138,43,226,.35); }
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 6px 24px rgba(138,43,226,.5); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }
.btn-sm { padding: 8px 18px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { color: #fff; }

/* ===== Hero ===== */
.hero { position: relative; min-height: 92vh; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; padding: 120px 0 80px; background: radial-gradient(ellipse at 50% -20%, rgba(138,43,226,.22), transparent 60%), radial-gradient(ellipse at 80% 110%, rgba(20,184,166,.1), transparent 50%); }
.hero-particles { position: absolute; inset: 0; pointer-events: none; }
.hero-inner { position: relative; z-index: 2; }
.hero-title { font-family: var(--font-head); font-size: clamp(3rem, 9vw, 5.5rem); font-weight: 700; line-height: 1.05; letter-spacing: .02em; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-subtitle { max-width: 640px; margin: 18px auto 34px; color: var(--text2); font-size: clamp(1rem, 2.5vw, 1.2rem); }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ===== Sections ===== */
.section { padding: 80px 0; }
.section-dark { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { font-family: var(--font-head); font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 700; text-align: center; }
.section-desc { color: var(--text2); text-align: center; margin: 10px 0 44px; }
.section-cta { text-align: center; margin-top: 36px; }

/* ===== Page header (inner pages) ===== */
.page-header { padding: 140px 0 50px; text-align: center; background: radial-gradient(ellipse at 50% -30%, rgba(138,43,226,.18), transparent 60%); }
.page-header-small { padding: 120px 0 30px; }
.page-title { font-family: var(--font-head); font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; }
.page-sub { color: var(--text2); margin-top: 10px; }
.breadcrumbs { margin-bottom: 14px; }
.breadcrumbs a { color: var(--text2); font-size: .9rem; }
.error-code { font-size: clamp(5rem, 14vw, 9rem); font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ===== Services ===== */
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.service-card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 24px; transition: transform .2s, border-color .2s, box-shadow .2s; position: relative; overflow: hidden; }
.service-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--grad); opacity: 0; transition: opacity .2s; }
.service-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.service-card:hover::before { opacity: 1; }
.service-icon { font-size: 2.2rem; margin-bottom: 14px; }
.service-card h3 { font-family: var(--font-head); font-size: 1.3rem; margin-bottom: 8px; }
.service-card p { color: var(--text2); font-size: .95rem; }
.service-price { display: inline-block; margin-top: 14px; padding: 4px 12px; border-radius: 999px; background: rgba(20,184,166,.12); color: #2dd4bf; font-weight: 600; font-size: .85rem; }

/* ===== About / stats ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.about-text { color: var(--text2); font-size: 1.05rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat-item { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 12px; text-align: center; }
.stat-num { display: block; font-family: var(--font-head); font-size: 2.2rem; font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { color: var(--text2); font-size: .85rem; }

/* ===== Works ===== */
.works-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.work-card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.work-cover { height: 200px; background-size: cover; background-position: center; background-color: var(--bg2); }
.work-body { padding: 20px 22px; }
.work-body h3 { font-family: var(--font-head); font-size: 1.2rem; margin-bottom: 6px; }
.work-body p { color: var(--text2); font-size: .92rem; }
.work-tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.work-tags span { padding: 3px 10px; border-radius: 999px; background: rgba(138,43,226,.14); color: #c084fc; font-size: .78rem; }

/* ===== Reviews ===== */
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.review-card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; transition: transform .2s; }
.review-card:hover { transform: translateY(-3px); }
.review-stars { color: #fbbf24; margin-bottom: 10px; letter-spacing: 2px; }
.review-stars span { color: var(--border); }
.review-text { color: var(--text); font-size: .97rem; }
.review-author { margin-top: 14px; color: var(--accent2); font-weight: 600; font-size: .92rem; }
.review-date { color: var(--text2); font-size: .8rem; }

/* ===== Contacts ===== */
.contacts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.contact-item { display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 16px; color: var(--text); text-align: center; transition: transform .2s, border-color .2s; }
.contact-item:hover { transform: translateY(-4px); border-color: var(--accent); color: var(--text); }
.contact-icon { font-size: 2rem; }
.contact-label { color: var(--text2); font-size: .85rem; }
.contact-value { font-weight: 600; font-size: 1.05rem; }
.contact-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin: 40px 0; }
.contact-info-item { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.contact-info-item .contact-icon { font-size: 1.6rem; }

/* ===== Forms ===== */
.contact-form-wrap { max-width: 620px; margin: 46px auto 0; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; }
.form-title { font-family: var(--font-head); font-size: 1.4rem; text-align: center; margin-bottom: 20px; }
.site-form { }
.site-form input, .site-form textarea, .site-form select { width: 100%; padding: 12px 14px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg2); color: var(--text); font-family: inherit; font-size: .95rem; outline: none; transition: border-color .2s; }
.site-form input:focus, .site-form textarea:focus, .site-form select:focus { border-color: var(--accent); }
.site-form textarea { resize: vertical; min-height: 90px; }
.site-form .btn { margin-top: 6px; }
.site-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-label { display: block; margin-bottom: 10px; color: var(--text2); font-size: .95rem; }
.form-status { text-align: center; margin-top: 12px; font-weight: 600; font-size: .92rem; min-height: 1.2em; }
.form-status.ok { color: #34d399; }
.form-status.err { color: #f87171; }
.form-note { text-align: center; color: var(--text2); font-size: .82rem; margin-top: 10px; }

/* ===== Cabinet ===== */
.cabinet-list { margin-top: 30px; display: grid; gap: 14px; }
.cabinet-item { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.cabinet-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cabinet-type { font-weight: 700; font-family: var(--font-head); }
.cabinet-status { padding: 4px 12px; border-radius: 999px; background: rgba(138,43,226,.15); color: #c084fc; font-size: .82rem; font-weight: 600; }
.cabinet-msg { color: var(--text2); font-size: .95rem; }
.cabinet-date { color: var(--text2); font-size: .8rem; }

/* ===== Consult benefits ===== */
.consult-benefits { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }
.benefit-item { background: var(--bg3); border: 1px solid var(--border); border-radius: 999px; padding: 10px 20px; font-size: .92rem; }

/* ===== Blog ===== */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.blog-card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: var(--text); transition: transform .2s, border-color .2s; }
.blog-card:hover { transform: translateY(-4px); border-color: var(--accent); color: var(--text); }
.blog-cover { height: 180px; background-size: cover; background-position: center; background-color: var(--bg2); }
.blog-body { padding: 20px 22px; }
.blog-date { color: var(--text2); font-size: .8rem; }
.blog-title { font-family: var(--font-head); font-size: 1.25rem; margin: 8px 0; }
.blog-excerpt { color: var(--text2); font-size: .92rem; }
.blog-more { color: var(--accent2); font-size: .9rem; font-weight: 600; display: inline-block; margin-top: 10px; }
.article-wrap { max-width: 780px; }
.article-cover { border-radius: var(--radius); margin-bottom: 26px; }
.article-content { font-size: 1.03rem; color: var(--text); }
.article-content h2, .article-content h3 { font-family: var(--font-head); margin: 28px 0 12px; }
.article-content p { margin-bottom: 16px; color: var(--text2); }
.article-content ul, .article-content ol { margin: 0 0 16px 22px; color: var(--text2); }
.article-content img { border-radius: var(--radius); margin: 20px 0; }
.article-content pre { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; overflow-x: auto; margin-bottom: 16px; }
.article-content code { font-family: monospace; font-size: .9em; }
.article-cta { margin-top: 40px; text-align: center; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; }
.article-cta p { margin-bottom: 16px; font-weight: 600; font-size: 1.1rem; }

/* ===== Empty state ===== */
.empty-state { text-align: center; color: var(--text2); background: var(--bg3); border: 1px dashed var(--border); border-radius: var(--radius); padding: 60px 20px; }

/* ===== Footer ===== */
.footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; padding-bottom: 40px; }
.footer-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; margin-bottom: 12px; }
.footer-desc { color: var(--text2); font-size: .9rem; max-width: 260px; }
.footer h4 { font-family: var(--font-head); font-size: 1.05rem; margin-bottom: 14px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 8px; }
.footer ul a { color: var(--text2); font-size: .92rem; }
.footer ul a:hover { color: var(--accent2); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); padding: 18px 0; color: var(--text2); font-size: .85rem; }

/* ===== Scroll top ===== */
.scroll-top { display: none; position: fixed; right: 22px; bottom: 24px; width: 46px; height: 46px; border-radius: 50%; border: none; background: var(--grad); color: #fff; font-size: 1.2rem; cursor: pointer; z-index: 90; box-shadow: 0 4px 16px rgba(0,0,0,.4); transition: transform .2s, opacity .2s; align-items: center; justify-content: center; opacity: 0; }
.scroll-top.show { display: flex; opacity: 1; }
.scroll-top:hover { transform: translateY(-3px); }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .5s ease, transform .5s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .nav-toggle { display: flex; }
  .nav-links { position: fixed; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--border); padding: 16px; gap: 4px; display: none; }
  .nav-links.active { display: flex; }
  .nav-links a { width: 100%; text-align: center; padding: 12px; }
  .nav-cta { margin: 8px 0 0; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .section { padding: 56px 0; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}
