/* ============================================================
   Bitrix24 Automation Builder — Landing Page Styles
   ============================================================ */

/* Google Fonts loaded via <link> in HTML */

/* ── Custom Properties ─────────────────────────────────────── */
:root {
  --color-primary:     #2DD4BF;
  --color-primary-dark:#00B4A4;
  --color-primary-pale:#E6FBF9;
  --color-navy:        #1e293b;
  --color-navy-light:  #334155;
  --color-navy-muted:  #475569;
  --color-bg:          #f8fafc;
  --color-white:       #ffffff;
  --color-text:        #1e293b;
  --color-muted:       #64748b;
  --color-border:      #e2e8f0;
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --radius:    8px;
  --radius-lg: 16px;
  --max-width: 1120px;
  --shadow:    0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.12), 0 4px 10px rgba(0,0,0,.08);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ── Utility ────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  transition: background 0.15s, color 0.15s, transform 0.1s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--color-primary);
  color: var(--color-navy);
}
.btn-primary:hover { background: var(--color-primary-dark); }

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn-secondary:hover { background: rgba(45,212,191,0.08); }

.btn-outline-white {
  background: transparent;
  color: var(--color-white);
  border: 2px solid rgba(255,255,255,0.4);
}
.btn-outline-white:hover { border-color: var(--color-white); background: rgba(255,255,255,0.06); }

.btn-lg { padding: 14px 32px; font-size: 1rem; }

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-navy);
  height: 64px;
  border-bottom: 1px solid var(--color-navy-light);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.navbar-logo img { height: 32px; width: auto; }

.navbar-links {
  display: none;
  align-items: center;
  gap: 32px;
}
.navbar-links a {
  color: rgba(255,255,255,0.75);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.15s;
}
.navbar-links a:hover { color: var(--color-white); }

.navbar-cta { display: none; }

.navbar-hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}
.navbar-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* Mobile nav drawer */
.navbar-mobile {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--color-navy-light);
  padding: 20px 24px;
  flex-direction: column;
  gap: 16px;
  border-bottom: 1px solid var(--color-navy-muted);
}
.navbar-mobile.is-open { display: flex; }
.navbar-mobile a {
  color: rgba(255,255,255,0.85);
  font-size: 1rem;
  font-weight: 500;
  padding: 6px 0;
}
.navbar-mobile .btn { width: 100%; justify-content: center; }

@media (min-width: 768px) {
  .navbar-links { display: flex; }
  .navbar-cta { display: flex; }
  .navbar-hamburger { display: none; }
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  background: var(--color-navy);
  padding: 80px 0 72px;
  overflow: hidden;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(45,212,191,0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(45,212,191,0.12);
  color: var(--color-primary);
  border: 1px solid rgba(45,212,191,0.25);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 4px 14px;
  margin-bottom: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--color-white);
  margin-bottom: 20px;
}
.hero h1 span { color: var(--color-primary); }
.hero-sub {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.7);
  max-width: 520px;
  margin-bottom: 36px;
  line-height: 1.7;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-visual {
  display: none;
  justify-content: center;
  align-items: center;
}
.hero-visual img {
  width: 180px;
  height: auto;
  opacity: 0.9;
  filter: drop-shadow(0 0 32px rgba(45,212,191,0.35));
}

@media (min-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr 1fr; }
  .hero-visual { display: flex; }
}

/* ── Features ───────────────────────────────────────────────── */
.features {
  padding: 80px 0;
  background: var(--color-white);
}
.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-header h2 {
  font-size: clamp(1.625rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--color-navy);
  margin-bottom: 12px;
}
.section-header p {
  font-size: 1.0625rem;
  color: var(--color-muted);
  max-width: 560px;
  margin: 0 auto;
}

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

.feature-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.feature-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--color-primary-pale);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.feature-icon svg { color: var(--color-primary-dark); }

.feature-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 10px;
}
.feature-card p {
  font-size: 0.9375rem;
  color: var(--color-muted);
  line-height: 1.65;
}

/* ── Stats Bar ──────────────────────────────────────────────── */
.stats-bar {
  background: var(--color-navy);
  padding: 40px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  text-align: center;
}
@media (min-width: 640px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }

.stat-number {
  display: block;
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.65);
  font-weight: 500;
}

/* ── Pricing ─────────────────────────────────────────────────── */
.pricing {
  padding: 80px 0;
  background: var(--color-bg);
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 860px;
  margin: 0 auto;
}
@media (min-width: 640px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }

.pricing-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.pricing-card.featured {
  border: 2px solid var(--color-primary);
  box-shadow: 0 0 0 4px rgba(45,212,191,0.08);
  position: relative;
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: var(--color-navy);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 100px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pricing-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pricing-price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-navy);
  line-height: 1;
}
.pricing-price sub { font-size: 1rem; font-weight: 500; vertical-align: baseline; }
.pricing-price .period { font-size: 1rem; font-weight: 500; color: var(--color-muted); }

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9375rem;
  color: var(--color-navy-muted);
}
.pricing-features li::before {
  content: '';
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300B4A4'%3E%3Cpath d='M20.285 7.298l-10.99 10.99a1 1 0 01-1.414 0L3.715 14.14a1 1 0 011.414-1.414l3.459 3.46 10.282-10.3a1 1 0 011.415 1.412z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

.pricing-cta { margin-top: auto; }
.pricing-cta .btn { width: 100%; justify-content: center; }

.pricing-note {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--color-muted);
  margin-top: 24px;
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  background: var(--color-navy);
  padding: 56px 0 32px;
  border-top: 1px solid var(--color-navy-light);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }

.footer-logo img { height: 28px; margin-bottom: 14px; }
.footer-tagline {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.65;
  max-width: 280px;
  margin-bottom: 16px;
}
.footer-copy {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.35);
}

.footer-col h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.65);
  transition: color 0.15s;
}
.footer-col ul li a:hover { color: var(--color-white); }

.footer-bottom {
  border-top: 1px solid var(--color-navy-light);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.footer-bottom p { font-size: 0.8125rem; color: rgba(255,255,255,0.35); }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.45);
  transition: color 0.15s;
}
.footer-bottom-links a:hover { color: var(--color-white); }

/* ── Legal Pages ────────────────────────────────────────────── */
.legal-page {
  background: var(--color-white);
  min-height: 60vh;
}
.legal-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}
.legal-container h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-navy);
  margin-bottom: 8px;
}
.legal-meta {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--color-border);
}
.legal-container h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-navy);
  margin: 36px 0 12px;
}
.legal-container h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-navy);
  margin: 24px 0 8px;
}
.legal-container p {
  font-size: 0.9375rem;
  color: var(--color-navy-muted);
  line-height: 1.75;
  margin-bottom: 12px;
}
.legal-container ul, .legal-container ol {
  margin: 10px 0 16px 20px;
}
.legal-container li {
  font-size: 0.9375rem;
  color: var(--color-navy-muted);
  line-height: 1.7;
  margin-bottom: 6px;
}
.legal-container ul { list-style: disc; }
.legal-container ol { list-style: decimal; }
.legal-container strong { color: var(--color-navy); }
.legal-uppercase {
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  color: var(--color-navy) !important;
  text-transform: uppercase;
  line-height: 1.8 !important;
}
.legal-container dl { margin: 12px 0 20px; }
.legal-container dt {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-navy);
  margin-top: 12px;
}
.legal-container dd {
  font-size: 0.9375rem;
  color: var(--color-navy-muted);
  line-height: 1.7;
  margin-left: 16px;
}
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--color-primary-dark);
  font-weight: 600;
  margin-bottom: 32px;
  transition: opacity 0.15s;
}
.legal-back:hover { opacity: 0.75; }
