/* ============================================================
   Design System — original blue premium tech-agency identity
   ============================================================ */

:root {
  --primary-dark: #0a1f44;
  --primary: #103e91;
  --primary-mid: #1656c9;
  --primary-light: #4f86e8;
  --accent: #17b6e8;
  --accent-dark: #0f8ec0;

  --background: #f5f8fd;
  --surface: #ffffff;
  --surface-alt: #eef3fc;
  --text: #101828;
  --text-secondary: #47536b;
  --muted: #6b7690;
  --border: #dde5f3;
  --border-strong: #c3d1ea;

  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(10, 31, 68, 0.06), 0 1px 3px rgba(10, 31, 68, 0.08);
  --shadow-md: 0 8px 24px rgba(10, 31, 68, 0.10);
  --shadow-lg: 0 20px 48px rgba(10, 31, 68, 0.16);

  --container: 1200px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --background: #070d1c;
    --surface: #0e1830;
    --surface-alt: #121f3d;
    --text: #eef2fb;
    --text-secondary: #b7c2dc;
    --muted: #8592b4;
    --border: #1e2c4d;
    --border-strong: #2c3d66;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --background: #070d1c;
  --surface: #0e1830;
  --surface-alt: #121f3d;
  --text: #eef2fb;
  --text-secondary: #b7c2dc;
  --muted: #8592b4;
  --border: #1e2c4d;
  --border-strong: #2c3d66;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--primary-mid); text-decoration: none; }
a:hover { color: var(--accent-dark); }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; color: var(--text); margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 4vw, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); letter-spacing: -0.01em; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; color: var(--text-secondary); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

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

.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.section-alt { background: var(--surface-alt); }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-mid);
  background: rgba(22, 86, 201, 0.08);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}

.section-head { max-width: 720px; margin: 0 0 40px; }
.section-head.centered { margin-left: auto; margin-right: auto; text-align: center; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  min-height: 44px;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary-mid), var(--accent-dark));
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { color: #fff; box-shadow: var(--shadow-lg); }
.btn-outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--primary-mid); color: var(--primary-mid); }
.btn-ghost-light {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; min-height: 36px; }
.btn-block { width: 100%; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Badge / pill */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--surface-alt);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.badge-demo { background: rgba(217, 119, 6, 0.12); color: var(--warning); border-color: rgba(217,119,6,0.3); }
.badge-status-new { background: rgba(22,86,201,0.12); color: var(--primary-mid); }
.badge-status-won { background: rgba(22,163,74,0.12); color: var(--success); }
.badge-status-lost { background: rgba(220,38,38,0.12); color: var(--danger); }

/* Forms */
.form-group { margin-bottom: 18px; }
label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; color: var(--text); }
input[type="text"], input[type="email"], input[type="tel"], input[type="url"],
input[type="password"], input[type="number"], select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  min-height: 44px;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-mid);
  box-shadow: 0 0 0 4px rgba(22, 86, 201, 0.12);
}
.form-error { color: var(--danger); font-size: 0.82rem; margin-top: 4px; }
.form-hint { color: var(--muted); font-size: 0.82rem; margin-top: 4px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; }
.checkbox-row input { width: auto; min-height: auto; margin-top: 4px; }
.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: 0.92rem; }
.alert-success { background: rgba(22,163,74,0.1); color: var(--success); border: 1px solid rgba(22,163,74,0.3); }
.alert-error { background: rgba(220,38,38,0.1); color: var(--danger); border: 1px solid rgba(220,38,38,0.3); }

/* Header */
.topbar {
  background: var(--primary-dark);
  color: #cfe0ff;
  font-size: 0.82rem;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; padding-bottom: 8px; gap: 12px; flex-wrap: wrap; }
.topbar a { color: #cfe0ff; }
.topbar a:hover { color: #fff; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.logo { font-weight: 800; font-size: 1.25rem; color: var(--text); display: flex; align-items: center; gap: 8px; }
.logo .logo-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--primary-mid), var(--accent));
  display: inline-block;
}
.main-nav { display: flex; align-items: center; gap: 4px; min-width: 0; }
.main-nav > ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; flex-wrap: nowrap; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a, .main-nav > ul > li > button {
  display: flex; align-items: center; gap: 4px; white-space: nowrap;
  padding: 10px 10px; font-weight: 600; font-size: 0.9rem;
  color: var(--text); background: none; border: none; cursor: pointer; font-family: inherit;
  border-radius: var(--radius-sm);
}
.main-nav > ul > li > a:hover, .main-nav > ul > li > button:hover { background: var(--surface-alt); color: var(--primary-mid); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.dropdown-panel {
  display: none;
  position: absolute; top: 100%; left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 18px;
  min-width: 620px;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 24px;
}
.main-nav li.has-dropdown:hover .dropdown-panel,
.main-nav li.has-dropdown.open .dropdown-panel { display: grid; }
.dropdown-panel a { display: block; padding: 8px 10px; border-radius: 8px; font-size: 0.9rem; color: var(--text-secondary); }
.dropdown-panel a:hover { background: var(--surface-alt); color: var(--primary-mid); }
.dropdown-panel .dd-cat { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; margin: 10px 0 4px; padding: 0 10px; }

.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; }

.mobile-nav {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  background: var(--surface);
  overflow-y: auto;
}
.mobile-nav.open { display: block; }
.mobile-nav .mn-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.mobile-nav ul { list-style: none; margin: 0; padding: 8px 8px 24px; }
.mobile-nav > ul > li > a, .mobile-nav > ul > li > button {
  display: flex; width: 100%; justify-content: space-between; align-items: center;
  padding: 16px 12px; font-size: 1.02rem; font-weight: 600; color: var(--text);
  background: none; border: none; text-align: left; font-family: inherit; cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.mobile-nav .submenu { display: none; padding-left: 12px; }
.mobile-nav .submenu.open { display: block; }
.mobile-nav .submenu a { padding: 12px; display: block; color: var(--text-secondary); border-bottom: 1px solid var(--border); }
.mobile-nav .mn-cta { padding: 20px 12px; }

@media (max-width: 1240px) {
  .main-nav { display: none; }
  .hamburger { display: block; }
  .header-actions .btn { display: none; }
}

/* Footer */
.site-footer { background: var(--primary-dark); color: #b9caee; padding: 64px 0 24px; }
.site-footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 16px; }
.site-footer a { color: #b9caee; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; font-size: 0.9rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 48px; padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.85rem; color: #8fa3d1; }
.social-row { display: flex; gap: 10px; margin-top: 16px; }
.social-row a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; }
.newsletter-form { display: flex; gap: 8px; margin-top: 10px; }
.newsletter-form input { flex: 1; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* Breadcrumb */
.breadcrumb { padding: 16px 0; font-size: 0.85rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary-mid); }
.breadcrumb .sep { margin: 0 6px; }

/* Hero */
.hero {
  background: radial-gradient(1200px 500px at 80% -10%, rgba(23,182,232,0.25), transparent),
              linear-gradient(160deg, var(--primary-dark), var(--primary) 60%, var(--primary-mid));
  color: #fff;
  padding: 88px 0 96px;
  position: relative;
  overflow: hidden;
}
.hero .container { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; position: relative; z-index: 1; }
.hero h1 { color: #fff; }
.hero p.lead { color: #cfe0ff; font-size: 1.1rem; max-width: 540px; }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 28px; margin-top: 40px; flex-wrap: wrap; }
.hero-trust div { color: #cfe0ff; font-size: 0.85rem; }
.hero-trust strong { display: block; font-size: 1.4rem; color: #fff; }
.hero-art { position: relative; }
@media (max-width: 900px) { .hero .container { grid-template-columns: 1fr; } .hero-art { order: -1; } }

.page-hero {
  background: linear-gradient(160deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 56px 0 64px;
}
.page-hero h1 { color: #fff; margin-bottom: 12px; }
.page-hero p { color: #cfe0ff; max-width: 640px; font-size: 1.05rem; }

/* FAQ accordion */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 18px 4px; display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; font-size: 1rem; color: var(--text); font-family: inherit;
}
.faq-q .icon { transition: transform 0.2s ease; color: var(--primary-mid); font-size: 1.3rem; }
.faq-item.open .faq-q .icon { transform: rotate(45deg); }
.faq-a { display: none; padding: 0 4px 20px; color: var(--text-secondary); }
.faq-item.open .faq-a { display: block; }

/* Stats */
.stats-band { background: var(--primary-dark); color: #fff; padding: 40px 0; }
.stats-band .grid-4 { text-align: center; }
.stats-band strong { display: block; font-size: 2.1rem; font-weight: 800; }
.stats-band span { color: #b9caee; font-size: 0.88rem; }

/* Process steps */
.process-step { position: relative; padding-left: 54px; }
.process-step .num {
  position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-mid), var(--accent));
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700;
}

/* Pagination */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 32px; }
.pagination a, .pagination span {
  min-width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); border: 1px solid var(--border); font-weight: 600; font-size: 0.9rem;
  color: var(--text);
}
.pagination a:hover { border-color: var(--primary-mid); color: var(--primary-mid); }
.pagination .current { background: var(--primary-mid); color: #fff; border-color: var(--primary-mid); }

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-16 { gap: 16px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--primary-mid); color: #fff;
  padding: 12px 18px; z-index: 1000; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
