:root {
  --bg: #ffffff;
  --surface: #f5f3ff;
  --primary: #6d28d9;
  --primary-dark: #5b21b6;
  --secondary: #15803d;
  --navy: #0f2540;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 14px;
  --font-heading: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--navy);
  margin: 0 0 0.5em;
  line-height: 1.2;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; margin-bottom: 1em; }
h3 { font-size: 1.1rem; font-weight: 600; }

p { margin: 0 0 1em; color: var(--text); }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 0.6em;
}
.eyebrow-light { color: #c9a8f5; }
.lead { font-size: 1.15rem; color: var(--text-muted); max-width: 46ch; }
.lead-light { color: #cbd5e1; }

.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #ffffff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface); }
.btn-small { padding: 9px 18px; font-size: 0.85rem; }

/* header */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 20;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--navy);
  text-decoration: none;
  margin-right: auto;
}
.brand:hover { text-decoration: none; }
.brand-small { font-size: 0.95rem; }
.nav { display: flex; gap: 28px; }
.nav a { color: var(--text); font-weight: 500; font-size: 0.95rem; }
.nav a:hover { color: var(--primary); text-decoration: none; }
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--navy); display: block; }

.nav-dropdown { position: relative; }
.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-dropdown-trigger:hover { color: var(--primary); text-decoration: none; }
.nav-caret { transition: transform 0.15s ease; flex-shrink: 0; }
.nav-dropdown-menu {
  list-style: none;
  margin: 0;
  padding: 8px;
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 37, 64, 0.14);
  min-width: 190px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 30;
}
/* Invisible hover bridge: keeps :hover alive while the cursor crosses the
   gap between the trigger and the menu, so the menu doesn't close early. */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 14px;
}
.nav-dropdown-menu li a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}
.nav-dropdown-menu li a:hover { background: var(--surface); color: var(--primary); }

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown:hover .nav-caret,
.nav-dropdown:focus-within .nav-caret { transform: rotate(180deg); }

/* hero */
.hero { padding: 72px 0 40px; position: relative; overflow: hidden; }
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('assets/vitrage-hero.svg');
  background-repeat: no-repeat;
  background-position: top right;
  background-size: 480px;
  z-index: 0;
}
.hero.hero-fintech::before {
  background-image: url('assets/vitrage-fintech-hero.svg');
  background-position: top left;
  background-size: 460px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 32px;
  position: relative;
  z-index: 1;
}
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border-radius: 24px;
  padding: 48px;
}
.hero-visual img { width: 100%; height: auto; max-width: 220px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }

/* sections */
.section { padding: 72px 0; }
.section-tint { background: var(--surface); position: relative; overflow: hidden; }
.section-tint::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('assets/vitrage-work.svg'), url('assets/vitrage-work-2.svg');
  background-repeat: no-repeat, no-repeat;
  background-position: bottom left, top right;
  background-size: 850px, 650px;
  z-index: 0;
}
.section-tint.section-tint-fintech::before {
  background-image: url('assets/vitrage-fintech-tint.svg'), url('assets/vitrage-fintech-tint-2.svg');
  background-position: bottom right, top left;
  background-size: 820px, 560px;
}
.section-tint > .container { position: relative; z-index: 1; }

.section-dark { background: var(--navy); position: relative; overflow: hidden; }
.section-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('assets/vitrage-contact.svg'), url('assets/vitrage-contact-2.svg');
  background-repeat: no-repeat, no-repeat;
  background-position: top right, bottom left;
  background-size: 900px, 700px;
  z-index: 0;
}
.section-dark.section-dark-fintech::before {
  background-image: url('assets/vitrage-fintech-dark.svg'), url('assets/vitrage-fintech-dark-2.svg');
  background-position: bottom left, top right;
  background-size: 820px, 620px;
}
.section-dark > .container { position: relative; z-index: 1; }
.section-dark h2 { color: #ffffff; }

.grid { display: grid; gap: 24px; margin-top: 8px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); max-width: 560px; }

.card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 14px;
}
.badge-purple { background: var(--primary); }
.badge-navy { background: var(--navy); }
.badge-green { background: var(--secondary); }

.case-card { background: #ffffff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
a.case-card { display: block; color: inherit; text-decoration: none; transition: transform 0.15s ease, box-shadow 0.15s ease; }
a.case-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 12px 32px rgba(15, 37, 64, 0.12); }
.case-thumb { height: 160px; background: linear-gradient(135deg, var(--surface), #ffffff); border-bottom: 1px solid var(--border); }
.case-card h3, .case-card p, .case-card .tag { padding-left: 24px; padding-right: 24px; }
.case-card h3 { margin-top: 16px; }
.case-card p:last-child { padding-bottom: 24px; }
.tag {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--surface);
  padding: 4px 10px;
  border-radius: 999px;
}

.person { text-align: left; }
.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 600;
  margin-bottom: 14px;
}
.person p { color: var(--text-muted); margin: 0; }

/* contact */
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.contact-list { list-style: none; padding: 0; margin: 20px 0 0; color: #cbd5e1; }
.contact-list li { margin-bottom: 10px; }
.contact-list a { color: #ffffff; }

.telegram-qr {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding: 14px;
  background: #ffffff;
  border-radius: var(--radius);
  max-width: 340px;
  text-decoration: none;
  transition: transform 0.15s ease;
}
.telegram-qr:hover { text-decoration: none; transform: translateY(-2px); }
.telegram-qr img { display: block; width: 90px; height: 90px; flex-shrink: 0; }
.telegram-qr span { display: flex; flex-direction: column; gap: 4px; }
.telegram-qr strong { font-family: var(--font-heading); color: var(--navy); font-size: 0.95rem; }
.telegram-qr em { font-style: normal; color: var(--text-muted); font-size: 0.82rem; }

.contact-form { display: flex; flex-direction: column; gap: 10px; }
.contact-form label { font-size: 0.85rem; color: #cbd5e1; margin-top: 8px; }
.contact-form input, .contact-form textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #2c4460;
  background: #16324a;
  color: #ffffff;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #8ca3bd; }
.contact-form button { margin-top: 10px; align-self: flex-start; }

.form-status { margin: 10px 0 0; font-size: 0.9rem; color: #86efac; }
.form-status-error { color: #fca5a5; }
.modal-form .form-status { color: var(--secondary); }
.modal-form .form-status-error { color: #dc2626; }

/* footer */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-inner p { margin: 0; color: var(--text-muted); font-size: 0.85rem; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--text-muted); font-size: 0.85rem; }

@media (max-width: 860px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .btn.btn-small { display: none; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; padding: 32px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; }
  .hero::before { background-size: 300px; }
  .section-tint::before, .section-dark::before { background-size: 420px, 320px; }
  .hero.hero-fintech::before { background-size: 280px; }
  .section-tint.section-tint-fintech::before,
  .section-dark.section-dark-fintech::before { background-size: 380px, 260px; }
  .nav-dropdown { width: 100%; }
  .nav-dropdown-trigger { width: 100%; justify-content: space-between; }
  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 4px 0 0 12px;
    min-width: 0;
  }
  .nav-dropdown-menu li a { color: var(--text-muted); padding: 7px 0; }
  .nav-caret { display: none; }
}

/* modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 37, 64, 0.55);
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}
.modal-overlay.open { display: flex; }
body.modal-open { overflow: hidden; }

.modal {
  position: relative;
  background: #ffffff;
  border-radius: 18px;
  padding: 36px;
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(15, 37, 64, 0.3);
}
.modal-lead { font-size: 0.95rem; margin-bottom: 1.2em; }
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  color: var(--navy);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: var(--border); }

.modal-form { display: flex; flex-direction: column; gap: 10px; }
.modal-form label { font-size: 0.85rem; color: var(--text-muted); margin-top: 8px; }
.modal-form input,
.modal-form select,
.modal-form textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
}
.modal-form select { appearance: auto; }
.modal-form button { margin-top: 10px; align-self: flex-start; }

.nav.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  gap: 14px;
}
