/* ==========================================================================
   zyntec.ru — Shared Design System (Notion Warm Minimal + Linear Dark)
   Used by: main landing page, wb-report.zyntec.ru, removebackground.zyntec.ru
   ========================================================================== */

/* --- Design Tokens --- */
:root {
  /* Light — Notion Warm Minimal */
  --bg: #ffffff;
  --bg-alt: #f6f5f4;
  --text: rgba(0,0,0,0.95);
  --text-secondary: #615d59;
  --text-muted: #a39e98;
  --accent: #0075de;
  --accent-hover: #005bab;
  --border: rgba(0,0,0,0.1);
  --card-bg: #ffffff;
  --card-shadow: rgba(0,0,0,0.04) 0px 4px 18px, rgba(0,0,0,0.02) 0px 1px 3px;
  --radius-sm: 4px;
  --radius-md: 12px;
  --radius-pill: 9999px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --max-width: 1200px;
}

/* Dark — Linear-inspired */
[data-theme="dark"] {
  --bg: #08090a;
  --bg-alt: #0f1011;
  --text: #f7f8f8;
  --text-secondary: #d0d6e0;
  --text-muted: #8a8f98;
  --accent: #5e6ad2;
  --accent-hover: #828fff;
  --border: rgba(255,255,255,0.07);
  --card-bg: rgba(255,255,255,0.015);
  --card-shadow: none;
}

[data-theme="dark"] .btn-primary { background: #5e6ad2; }
[data-theme="dark"] .btn-primary:hover { background: #828fff; }
[data-theme="dark"] .badge { background: rgba(94,106,210,0.15); color: #828fff; }
[data-theme="dark"] .nav-header { background: rgba(8,9,10,0.92); }
[data-theme="dark"] .service-card { border-color: rgba(255,255,255,0.07); background: rgba(255,255,255,0.015); }
[data-theme="dark"] .blog-card { border-color: rgba(255,255,255,0.07); background: rgba(255,255,255,0.015); }
[data-theme="dark"] .btn-secondary { border-color: rgba(255,255,255,0.08); }
[data-theme="dark"] .btn-secondary:hover { background: rgba(255,255,255,0.03); }
[data-theme="dark"] .theme-btn:hover { background: rgba(255,255,255,0.05); }
[data-theme="dark"] .cta-section { background: var(--bg-alt); }
[data-theme="dark"] .nav-links a:hover { color: var(--accent); }
[data-theme="dark"] .footer { background: var(--bg); }

/* Dark mode — mobile overlay needs darker background */
[data-theme="dark"] .mobile-nav-overlay { background: rgba(0,0,0,0.55); }

/* --- Base Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* --- Container --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* --- Section --- */
.section { padding: 80px 0; }
.section:nth-child(even) { background: var(--bg-alt); }

.section-title {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  text-align: center;
  margin-bottom: 12px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.13rem;
  font-weight: 500;
  margin-bottom: 48px;
}

/* --- Navigation Header --- */
.nav-header {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.03em;
}
.nav-logo:hover { text-decoration: none; }

.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text);
  transition: color 0.2s;
  /* Touch target min 44px */
  padding: 10px 2px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav-links a:hover { color: var(--accent); text-decoration: none; }

.nav-actions { display: flex; align-items: center; gap: 12px; }

/* --- Hamburger Menu Button --- */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.hamburger:hover { background: var(--bg-alt); }
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Mobile Nav Overlay --- */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 57px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.3);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.3s;
}
.mobile-nav-overlay.open { display: block; opacity: 1; }

.mobile-nav-panel {
  position: fixed;
  top: 57px;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transform: translateY(-110%);
  transition: transform 0.3s ease;
  padding: 16px 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* Adjust mobile panel/overlay top when nav is shorter on tiny screens */
@media (max-width: 375px) {
  .mobile-nav-overlay { top: 51px; }
  .mobile-nav-panel { top: 51px; }
}
.mobile-nav-panel.open { transform: translateY(0); }
.mobile-nav-panel a {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  padding: 14px 0;
  min-height: 48px;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.mobile-nav-panel a:last-child { border-bottom: none; }
.mobile-nav-panel a:hover { color: var(--accent); text-decoration: none; }

/* --- Buttons --- */
.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  display: inline-block;
  min-height: 44px;
  line-height: 1.2;
}
.btn-primary:hover {
  background: var(--accent-hover);
  text-decoration: none;
  transform: scale(1.02);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1.1rem;
  border-radius: 6px;
  min-height: 52px;
}

.btn-secondary {
  display: inline-block;
  padding: 10px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 600;
  font-size: 0.94rem;
  transition: background 0.2s;
  min-height: 44px;
  line-height: 1.4;
}
.btn-secondary:hover { background: var(--bg-alt); text-decoration: none; }

.theme-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 6px 10px;
  line-height: 1;
  transition: background 0.2s;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.theme-btn:hover { background: var(--bg-alt); }

/* --- Hero Section --- */
.hero { padding: 100px 0 80px; text-align: center; }
.hero-content { max-width: 720px; margin: 0 auto; }
.hero h1 {
  font-size: 3.4rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1.0;
  margin-bottom: 20px;
}
.hero-subtitle {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 36px;
}
.hero-cta { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.hero-hint { font-size: 0.88rem; color: var(--text-muted); }

/* --- Hero Trust Row --- */
.hero-trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 24px;
  margin-top: 16px;
}
.trust-item {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}
@media (max-width: 600px) {
  .hero-trust-row { flex-direction: column; align-items: center; gap: 6px; }
  .trust-item { white-space: normal; }
}

/* --- Benefits Grid --- */
.benefits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.benefit-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--card-bg);
  transition: transform 0.2s, box-shadow 0.2s;
}
.benefit-item:hover {
  transform: translateY(-2px);
  box-shadow: rgba(0,0,0,0.04) 0px 8px 24px;
}
.benefit-icon { font-size: 1.6rem; flex-shrink: 0; margin-top: 2px; }
.benefit-item strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.benefit-item p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}
@media (max-width: 600px) {
  .benefits-grid { grid-template-columns: 1fr; }
}

/* --- Testimonials --- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.testimonial-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  background: var(--card-bg);
  position: relative;
  margin: 0;
}
.testimonial-card p {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 16px;
  font-style: italic;
}
.testimonial-card footer {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.testimonial-card footer strong {
  font-size: 0.85rem;
  font-weight: 700;
}
.testimonial-card footer span {
  font-size: 0.8rem;
  color: var(--text-muted);
}
@media (max-width: 768px) {
  .testimonials-grid { grid-template-columns: 1fr; }
}

/* --- Service "Coming Soon" --- */
.badge-soon {
  background: rgba(94,106,210,0.12) !important;
  color: var(--accent) !important;
}
.service-coming {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.4;
}

/* --- CTA Trust Notes --- */
.cta-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.cta-trust-note {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Pulse Animation for Primary CTA --- */
.pulse-animation {
  animation: pulse-cta 2s ease-in-out infinite;
}
@keyframes pulse-cta {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,117,222,0.3); }
  50% { box-shadow: 0 0 0 8px rgba(0,117,222,0); }
}
[data-theme="dark"] .pulse-animation {
  animation-name: pulse-cta-dark;
}
@keyframes pulse-cta-dark {
  0%, 100% { box-shadow: 0 0 0 0 rgba(94,106,210,0.35); }
  50% { box-shadow: 0 0 0 8px rgba(94,106,210,0); }
}
/* Stop pulse on hover — user is already engaging */
.pulse-animation:hover {
  animation: none;
}
/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .pulse-animation { animation: none !important; }
}

/* --- Services Grid --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}
.service-card:hover {
  transform: translateY(-2px);
  box-shadow: rgba(0,0,0,0.06) 0px 8px 28px, rgba(0,0,0,0.03) 0px 2px 6px;
}
.service-icon { font-size: 2rem; margin-bottom: 16px; display: block; }
.service-card h3 {
  font-size: 1.38rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}
.service-card p {
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}
.service-link { font-weight: 600; font-size: 0.94rem; }

.badge {
  display: inline-block;
  background: #f2f9ff;
  color: #097fe8;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* --- Blog Section --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.blog-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.2s;
  background: var(--card-bg);
}
.blog-card:hover { transform: translateY(-2px); }
.blog-card-body { padding: 24px; }
.blog-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  display: block;
}
.blog-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 8px 0;
  line-height: 1.3;
}
.blog-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}
.blog-date { font-size: 0.81rem; color: var(--text-muted); }
.blog-more { text-align: center; margin-top: 36px; }

/* --- CTA Section --- */
.cta-section { background: var(--bg-alt); }
.cta-content { text-align: center; max-width: 600px; margin: 0 auto; }
.cta-content h2 {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 16px;
}
.cta-content p {
  font-size: 1.13rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

/* --- Footer --- */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 56px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 8px;
  line-height: 1.5;
}
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links strong { font-size: 0.88rem; font-weight: 600; margin-bottom: 4px; }
.footer-links a,
.footer-links span {
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.footer-links a:hover { color: var(--accent); text-decoration: none; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  color: var(--text-muted);
  font-size: 0.81rem;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ======================================================================
   RESPONSIVE DESIGN
   ====================================================================== */

/* --- Tablet (768px - 1023px) --- */
@media (max-width: 1024px) {
  .hero h1 { font-size: 3rem; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* --- Mobile (<768px) --- */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links { display: none; }

  /* Mobile nav layout: hamburger left, logo centered, theme right */
  .nav-inner {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    justify-items: center;
  }
  .nav-inner .hamburger { justify-self: start; }
  .nav-inner .nav-logo { grid-column: 2; }
  .nav-inner .nav-actions { grid-column: 3; justify-self: end; }
  /* Hide the CTA button in nav-actions on mobile — it's in the mobile panel */
  .nav-actions .btn-primary { display: none; }

  .hero h1 { font-size: 2.2rem; }
  .hero { padding: 60px 0 60px; }
  .hero-subtitle { font-size: 1.1rem; }

  .section-title { font-size: 2.2rem; }
  .section-subtitle { font-size: 1.05rem; margin-bottom: 32px; }

  .services-grid { grid-template-columns: 1fr; gap: 16px; }
  .service-card { padding: 24px; }
  .service-card h3 { font-size: 1.2rem; }

  .blog-grid { grid-template-columns: 1fr; }

  .section { padding: 56px 0; }

  .cta-content h2 { font-size: 2rem; }
  .cta-content p { font-size: 1.05rem; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer { padding: 40px 0 20px; }
}

/* --- Small Mobile (<600px) --- */
@media (max-width: 600px) {
  .container { padding: 0 16px; }

  .hero h1 { font-size: 2rem; }
  .hero { padding: 64px 0 48px; }
  .hero-subtitle { font-size: 1rem; margin-bottom: 28px; }

  .section-title { font-size: 1.8rem; }
  .section-subtitle { font-size: 0.95rem; }

  .services-grid { gap: 14px; }
  .service-card { padding: 20px; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }

  .cta-content h2 { font-size: 1.7rem; }
  .section { padding: 48px 0; }

  .blog-card-body { padding: 18px; }

  .btn-lg {
    padding: 12px 24px;
    font-size: 1rem;
  }
}

/* --- Tiny Mobile (<375px) --- */
@media (max-width: 375px) {
  .hero h1 { font-size: 1.7rem; }
  .hero-subtitle { font-size: 0.92rem; }
  .section-title { font-size: 1.5rem; }
  .service-card h3 { font-size: 1.1rem; }
  .nav-inner { height: 50px; }
  .nav-logo { font-size: 0.95rem; }
}

/* --- Large Desktop (>1200px) --- */
@media (min-width: 1200px) {
  .hero h1 { font-size: 3.8rem; }
}

/* --- Touch-friendly sizing (prevents iOS zoom on focus) --- */
button, a, input, select, textarea { font-size: 16px; }

/* --- Skip link (accessibility) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 8px;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.94rem;
  z-index: 200;
  transition: top 0.15s;
}
.skip-link:focus {
  top: 8px;
  text-decoration: none;
  outline: 2px solid var(--accent-hover);
  outline-offset: 2px;
}

/* --- About section inner wrapper --- */
.about-inner {
  max-width: 720px;
  margin: 0 auto;
}

/* --- Testimonials section --- */
.testimonials { margin-top: 48px; }
.testimonials-title {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 24px;
}

/* --- About CTA section --- */
.about-cta-wrapper { text-align: center; margin-top: 40px; }
.about-cta-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* --- Focus visible styles for keyboard navigation --- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
:focus:not(:focus-visible) {
  outline: none;
}

/* --- Fix contrast in dark mode --- */
[data-theme="dark"] {
  --text-muted: #9ca3af;
}

/* --- Mobile nav CTA button --- */
.mobile-nav-panel .btn-primary {
  text-align: center;
  margin-top: 8px;
  display: block;
}

/* --- FAQ inner wrapper --- */
.faq-inner {
  max-width: 720px;
  margin: 0 auto;
}

/* --- Inline SVG icons (emoji-free portal) --- */
.service-icon svg, .benefit-icon svg, .trust-item svg, .cta-trust-note svg, .theme-btn svg {
  stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round;
}
.service-icon svg { width: 1em; height: 1em; color: var(--accent); }
.benefit-icon svg { width: 1em; height: 1em; color: var(--accent); }
.trust-item svg { width: 1em; height: 1em; vertical-align: -0.15em; margin-right: 5px; color: var(--accent); }
.cta-trust-note svg { width: 1em; height: 1em; vertical-align: -0.15em; margin-right: 6px; }
.theme-btn svg { width: 1em; height: 1em; }
