:root {
  --background: #f3f4f6;
  --surface: #ffffff;
  --surface-muted: #f9fafb;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text-primary: #171717;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff6ff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 12px 24px rgba(37, 99, 235, 0.12);
  --container: 1200px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--accent-hover);
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: min(var(--container), 100% - 48px);
  margin: 0 auto;
}

.section {
  padding: 96px 0;
}

.section__header {
  max-width: 680px;
  margin-bottom: 48px;
  position: relative;
  z-index: 1;
}

.section__title {
  margin: 0 0 12px;
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 600;
  color: var(--text-primary);
}

.section__subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--fs-lg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: var(--fs-base);
  border: 1px solid transparent;
  transition: background 0.2s ease, border 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--accent-hover);
  color: #ffffff;
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background: var(--accent-soft);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-secondary);
}

.btn-ghost:hover,
.btn-ghost:focus {
  background: var(--surface-muted);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  font-weight: 600;
  font-size: calc(var(--fs-lg) * 1.4);
}

.logo__icon {
  width: 45px;
  height: 45px;
}

.logo__text {
  letter-spacing: 0.02em;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.2vw, 16px);
  font-size: clamp(0.95rem, 1.1vw, var(--fs-base));
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.primary-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  white-space: nowrap;
  border-radius: 10px;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.primary-nav::-webkit-scrollbar {
  display: none;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: var(--accent);
  background: var(--surface-muted);
}

.primary-nav a.is-active {
  color: var(--accent);
  background: var(--surface-muted);
  border-bottom-color: var(--accent);
}

.primary-nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.header__actions {
  display: flex;
  gap: 8px;
}

#lang-en { order: 1; }
#lang-ru { order: 2; }
#try-now { order: 3; }
#menu-toggle { order: 4; }

.lang-switch {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border 0.2s ease, color 0.2s ease;
}

.lang-switch--wide {
  width: auto;
  padding: 0 12px;
}

.lang-switch:hover,
.lang-switch:focus-visible {
  background: var(--surface-muted);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

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

.lang-switch.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.menu-toggle {
  display: none;
  font-size: 18px;
}

main {
  flex: 1;
}

.hero {
  background: var(--surface);
}

.hero__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 48px;
  align-items: center;
}

.hero__content {
  grid-column: span 6;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero__tag {
  margin: 0;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
}

.hero__title {
  margin: 0;
  font-size: clamp(2.5rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.hero__subtitle {
  margin: 0;
  font-size: var(--fs-lg);
  color: var(--text-secondary);
}

.hero__bullets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__bullets li {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-size: var(--fs-sm);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero__visual {
  grid-column: span 6;
  display: flex;
  justify-content: center;
}

.hero__preview-card {
  width: 100%;
  max-width: 552px;
  padding: 24px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.partners {
  background: var(--surface-muted);
  padding: 48px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.partners__title {
  text-align: center;
  color: var(--text-secondary);
  font-size: var(--fs-lg);
  font-weight: 700;
  margin: 0 0 32px;
}

.partners__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 32px 48px;
}

.partner-logo {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 1.125rem;
  opacity: 0.7;
  transition: opacity 0.2s;
  user-select: none;
}

.partner-logo:hover {
  opacity: 1;
  color: var(--text-primary);
}

.metrics {
  background: var(--background);
}

.metrics__grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.metrics__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.metrics__value {
  margin: 0 0 8px;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 600;
  color: var(--text-primary);
}

.metrics__value--infinity {
  position: relative;
  color: transparent;
}
.metrics__value--infinity::before {
  content: "∞";
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  font-size: 2.5em;
  line-height: 1;
  color: var(--text-primary);
}

.metrics__label {
  margin: 0 0 4px;
  font-size: var(--fs-base);
  color: var(--text-secondary);
}

.metrics__description {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.features {
  background: var(--surface);
}

.feature-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 220px;
}

.feature-card img {
  width: 40px;
  height: 40px;
}

.feature-card h3 {
  margin: 0;
  font-size: var(--fs-xl);
  color: var(--text-primary);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.feature-card p {
  margin: 0;
  color: var(--text-secondary);
}

.feature-card a {
  font-weight: 600;
}

.timeline {
  background: var(--background);
}

.timeline__track {
  position: relative;
  display: grid;
  gap: 24px;
  padding-left: 32px;
}

.timeline__track::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 15px;
  width: 2px;
  background: var(--border);
}

.timeline__step {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.timeline__icon {
  grid-column: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
}

.timeline__icon img {
  width: 64px;
  height: 64px;
}

.timeline__content {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timeline__step h3 {
  margin: 0;
  font-size: var(--fs-lg);
  color: var(--text-primary);
}

.timeline__step p {
  margin: 0;
  color: var(--text-secondary);
}

.use-cases {
  background: var(--surface);
}

.use-cases__grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.use-case-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.use-case-card img {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.use-case-card h3 {
  margin: 0;
  color: var(--text-primary);
}

.use-case-card p {
  margin: 0;
  color: var(--text-secondary);
}

/* Components Carousel */
.components-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
  /* z-index to ensure cards float above header if they overlap */
  z-index: 2;
  /* Remove margin that pushed layout */
}

.components__slider {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; /* Firefox */
  padding-bottom: 24px; /* Space for shadows */
  -ms-overflow-style: none; /* IE/Edge */
  /* Add padding INSIDE the scroll container to push cards down without moving the container itself */
  padding-top: 24px; 
  margin-top: -12px; /* Pull container up slightly to compensate visual gap if needed, or keep flush */
}

.components__slider::-webkit-scrollbar {
  display: none;
}

.component-card {
  flex: 0 0 100%; /* Mobile: 1 card */
  scroll-snap-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 400px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative; /* For z-index context */
}

@media (min-width: 768px) {
  .component-card {
    flex: 0 0 calc(50% - 12px); /* Tablet: 2 cards */
    min-height: 480px;
  }
}

@media (min-width: 1024px) {
  .component-card {
    flex: 0 0 calc(33.333% - 16px); /* Desktop: 3 cards */
  }
}

.component-card:hover {
  transform: translateY(-8px); /* Slightly more lift */
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
  z-index: 2; /* Bring above neighbors */
}

/* ... icon/text styles unchanged ... */
.component-icon {
  width: 48px;
  height: 48px;
  padding: 10px;
  background: var(--accent-soft);
  border-radius: 12px;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.component-card h3 {
  margin: 0;
  font-size: var(--fs-xl);
  color: var(--text-primary);
}

.component-card__desc {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--fs-lg);
  line-height: 1.5;
}

.component-card__details {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-base);
  flex: 1; 
}

.component-card__bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.component-card__bullets li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-secondary);
  /* Increase font size for better readability */
  font-size: var(--fs-base);
  line-height: 1.5;
}

.component-card__bullets li::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: 8px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Controls */
.components__controls {
  /* Default mobile layout: below slider */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
}

.components__indicators {
  display: flex;
  gap: 8px;
}

.comp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.comp-dot.is-active {
  background: var(--accent);
  transform: scale(1.2);
}

.components__nav-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.components__nav-btn:hover {
  background: var(--surface-muted);
  color: var(--accent);
  border-color: var(--accent);
}

/* Desktop: Floating buttons */
@media (min-width: 1024px) {
  .components-wrapper {
    /* Ensure buttons can be absolute relative to this */
    padding-left: 0;
    padding-right: 0;
  }
  
  .components__controls {
    /* Hide the container for buttons below, BUT keep indicators if desired? 
       Actually, let's restructure: buttons move to absolute positions, indicators stay below.
    */
    position: static;
    margin-top: 0;
    display: block; /* We'll control children individually */
  }

  .components__indicators {
    display: flex;
    justify-content: center;
    margin-top: 24px;
  }

  .components__nav-btn {
    position: absolute;
    /* Center vertically relative to the wrapper, adjusting for the padding offset we added earlier */
    top: calc(50% - 12px); 
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    font-size: 28px;
  }

  #comp-prev {
    left: -24px; /* Hang slightly outside container */
  }

  #comp-next {
    right: -24px;
  }

  .components__nav-btn:hover {
    background: var(--surface);
    box-shadow: var(--shadow-md);
    transform: translateY(-50%) scale(1.1);
  }
}

/* Large screens: move buttons further out if space permits */
@media (min-width: 1300px) {
  #comp-prev { left: -64px; }
  #comp-next { right: -64px; }
}

@media (hover: none) and (pointer: coarse) {
  .components__controls {
    display: flex; /* Show indicators below */
  }
  .components__nav-btn {
    display: none; /* Hide arrows on touch, use swipe */
  }
}

.get-started {
  background: var(--surface);
}

.steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 24px;
}

.steps-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.steps-list h3 {
  margin: 0 0 12px;
  color: var(--text-primary);
}

.steps-list p {
  margin: 0;
  color: var(--text-secondary);
}

.steps-list pre {
  margin: 16px 0 0;
  padding: 16px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Courier New', Courier, monospace;
  font-size: var(--fs-sm);
  overflow-x: auto;
}

.cta {
  background: var(--accent-soft);
}

.cta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.cta__content h2 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 3vw, 2.5rem);
}

.cta__content p {
  margin: 0;
  color: var(--text-secondary);
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.faq {
  background: var(--surface);
}

.faq__list {
  display: grid;
  gap: 16px;
}

.faq__item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 0 24px;
}

.faq__item[open] {
  background: var(--surface-muted);
}

.faq__item summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 0;
  font-weight: 600;
  color: var(--text-primary);
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item p {
  margin: 0 0 24px;
  color: var(--text-secondary);
}

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}

.footer__grid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: start;
}

.footer__brand,
.footer__links,
.footer__contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.footer__brand {
  transform: translateY(-4px);
}

.footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
}

.footer__logo .logo__icon {
  width: 40px;
  height: 40px;
}

.footer__brand .logo__text {
  font-weight: 700;
  font-size: var(--fs-xl);
}

#footer-tagline {
  margin: -6px 0 0;
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
}

#footer-tagline:hover,
#footer-tagline:focus {
  color: var(--accent);
}

.footer__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}

.footer__links ul,
.footer__links li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer__links h3,
.footer__contact h3 {
  margin: 0;
  font-weight: 700;
}

.footer__links a {
  color: var(--text-secondary);
  font-size: var(--fs-base);
}

.footer__links a:hover,
.footer__links a:focus {
  color: var(--accent);
}

.footer__contact a {
  display: inline-block;
  margin: 0;
}

.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.footer__contact-links ul,
.footer__contact-links li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer__contact-links a {
  color: var(--text-secondary);
  font-size: var(--fs-base);
}

.footer__contact-links a:hover,
.footer__contact-links a:focus {
  color: var(--accent);
}

.footer__lang {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__lang-buttons {
  display: flex;
  gap: 8px;
}

.footer__legal {
  margin: 48px 0 0;
  text-align: center;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.footer__legal { cursor: pointer; }
.footer__legal:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

.lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.lightbox__dialog {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px;
  max-width: 720px;
  width: calc(100% - 48px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: none;
  background: var(--surface-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
}

.lightbox__close:hover,
.lightbox__close:focus {
  background: var(--border);
}

@media (max-width: 1024px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero__content,
  .hero__visual {
    grid-column: span 12;
  }

  .hero__visual {
    order: 0;
    margin-bottom: 0;
  }
  
  .desktop-only {
    display: none !important;
  }
}

.lead-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.lead-form input { padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; width: 100%; }
.lead-form button { padding: 8px 12px; background: var(--accent); color: white; border: none; border-radius: 8px; cursor: pointer; font-weight: 600; transition: background 0.2s; }
.lead-form button:hover { background: var(--accent-hover); }
.lead-form button:disabled { opacity: 0.7; cursor: not-allowed; }

@media (max-width: 768px) {
  .container {
    width: calc(100% - 32px);
  }
  .site-header {
    z-index: 1100;
  }

  .header__inner {
    flex-wrap: wrap;
    gap: 16px;
  }

  .primary-nav {
    display: none;
    position: fixed;
    top: 64px;
    right: 0;
    bottom: 0;
    width: min(60vw, 360px);
    background: var(--surface);
    padding: 16px;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
    border-left: 1px solid var(--border);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.25);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    will-change: transform;
  }

  .primary-nav.is-open {
    display: flex;
    transform: translateX(0);
  }

  .menu-toggle {
    display: inline-block;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .cta__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta__actions .btn {
    width: 100%;
  }

  .footer__cta .btn {
    width: 100%;
  }
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 900;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
.header-cta {
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .header__actions .header-cta {
    width: auto;
  }
}
.presentation {
  background: var(--surface);
}

.pdf-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.pdf-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Increase icon sizes (arrows, fullscreen) without changing button size */
.pdf-controls #pdf-first,
.pdf-controls #pdf-prev,
.pdf-controls #pdf-next,
.pdf-controls #pdf-last,
.pdf-controls #pdf-fullscreen {
  font-size: calc(var(--fs-base) * 1.4);
  line-height: 1;
  font-weight: 400;
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pdf-indicator {
  min-width: 72px;
  text-align: center;
  color: var(--text-secondary);
}

.pdf-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}

.pdf-modal[hidden] { display: none; }

.pdf-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
}

.pdf-modal__dialog {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 12px;
  width: 92vw;
  height: 88vh;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pdf-modal__content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 60vh;
}

.pdf-modal__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  position: sticky;
  bottom: 0;
  background: var(--surface);
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.pdf-modal__controls .btn {
  height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (hover: none) and (pointer: coarse) {
  .pdf-modal__controls #pdf-modal-download {
    width: 40px;
    height: 40px;
    aspect-ratio: 1 / 1;
    padding: 0;
    border-radius: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

.pdf-preview canvas { cursor: pointer; }

/* Modal icons bigger (arrows, fullscreen); keep uniform button size */
.pdf-modal__controls #pdf-modal-first,
.pdf-modal__controls #pdf-modal-prev,
.pdf-modal__controls #pdf-modal-next,
.pdf-modal__controls #pdf-modal-last {
  font-size: calc(var(--fs-base) * 1.4);
  line-height: 1;
  font-weight: 400;
}
.pdf-modal__controls #pdf-fullscreen {
  font-size: calc(var(--fs-base) * 1.4);
  line-height: 1;
  font-weight: 400;
}

/* Download icon bigger only on mobile (desktop keeps text label) */
@media (hover: none) and (pointer: coarse) {
  .pdf-modal__controls #pdf-modal-download {
    font-size: calc(var(--fs-base) * 1.4);
    line-height: 1;
    font-weight: 400;
  }
}

.pdf-modal__content canvas {
  max-width: 100%;
  height: auto;
}

.pdf-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: var(--surface-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .pdf-modal__dialog { width: 96vw; height: 82vh; }
  .pdf-modal__content { min-height: 50vh; }
}
@media (hover: none) and (pointer: coarse) {
  .pdf-controls {
    gap: 6px;
  }
  .pdf-controls #pdf-first,
  .pdf-controls #pdf-prev,
  .pdf-controls #pdf-next,
  .pdf-controls #pdf-last,
  .pdf-modal__controls #pdf-modal-first,
  .pdf-modal__controls #pdf-modal-prev,
  .pdf-modal__controls #pdf-modal-next,
  .pdf-modal__controls #pdf-modal-last {
    display: none;
  }
  .pdf-indicator {
    min-width: auto;
    font-size: var(--fs-sm);
  }
  #pdf-download,
  #pdf-modal-download,
  #pdf-fullscreen {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}
.media-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1110;
}

.media-modal[hidden] { display: none; }

.media-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
}

.media-modal__dialog {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 16px;
  width: 92vw;
  max-height: 90vh;
  overflow: auto;
  max-width: 960px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.media-modal__title {
  margin: 0;
  font-size: var(--fs-lg);
  color: var(--text-primary);
}

.media-modal__tabs {
  display: flex;
  gap: 8px;
}
.media-modal__tabs .btn.is-active {
  border-bottom: 2px solid var(--accent);
}

.media-modal__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.media-modal__input {
  flex: 1 1 320px;
  min-width: 240px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
}

.media-modal__error {
  color: var(--danger);
  font-size: var(--fs-sm);
}

.media-modal__preview {
  position: relative;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-modal__preview iframe,
.media-modal__preview video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: var(--radius-md);
}

.media-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: var(--surface-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .media-modal__dialog { width: 96vw; }
}
.blog-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1120;
}
.blog-modal[hidden] { display: none; }
.blog-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
}
.blog-modal__dialog {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 12px 16px 16px;
  width: 92vw;
  max-width: 960px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.blog-modal__title { margin: 0; font-size: var(--fs-xl); color: var(--text-primary); }
.blog-modal__content { color: var(--text-secondary); font-size: var(--fs-lg); line-height: 1.75; }
.blog-modal__content img, .blog-modal__content video, .blog-modal__content iframe { width: 100%; height: auto; border-radius: var(--radius-md); }
.blog-modal__content video, .blog-modal__content iframe { aspect-ratio: 16 / 9; }
.blog-modal__close { position: absolute; top: 12px; right: 12px; border: none; background: var(--surface-muted); width: 32px; height: 32px; border-radius: 50%; font-size: 18px; cursor: pointer; }
@media (max-width: 768px) { .blog-modal__dialog { width: 96vw; } }

/* Typography for rich content */
.prose {
  max-width: none;
  width: 100%;
}
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--text-primary); margin: 1.25em 0 0.5em; line-height: 1.25; }
.prose h1 { font-size: clamp(1.75rem, 3.5vw, 2.25rem); }
.prose h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.prose h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
.prose p { margin: 0.75em 0; }
.prose strong { color: var(--text-primary); font-weight: 700; }
.prose em { font-style: italic; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0.75em 0; }
.prose li { margin: 0.25em 0; }
.prose code { background: var(--surface-muted); border: 1px solid var(--border); border-radius: 6px; padding: 0.1em 0.35em; font-family: 'Courier New', Courier, monospace; }
.prose pre { background: var(--surface-muted); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; overflow-x: auto; }
.prose blockquote { border-left: 3px solid var(--border-strong); margin: 1em 0; padding-left: 1em; color: var(--text-secondary); }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 1.5em 0; }
/* Floating chat button */
.chat-fab { position: fixed; right: 16px; bottom: 16px; z-index: 1200; height: 40px; padding: 0 16px; border-radius: 10px; }

.chat-big-cta {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 16px;
  z-index: 1190;
  padding: 12px 24px;
  height: 48px;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  transition: opacity 0.25s ease, transform 0.25s ease;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: var(--fs-lg);
}

.chat-big-cta.is-hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(12px);
  pointer-events: none;
}

@media (max-width: 768px) {
  .chat-big-cta {
    height: 46px;
    bottom: 12px;
  }
}

.chat-big-cta:hover,
.chat-big-cta:focus {
  background: var(--accent-soft);
}

/* Chat modal */
.chat-modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 1125; }
.chat-modal[hidden] { display: none; }
.chat-modal__backdrop { position: absolute; inset: 0; background: rgba(15,23,42,0.75); }
.chat-modal__dialog { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 24px 48px rgba(15,23,42,0.25); width: min(720px, 92vw); height: 92vh; display: flex; flex-direction: column; gap: 8px; padding: 12px 16px 16px; }
.chat-modal__title { margin: 0 0 4px; font-size: var(--fs-xl); color: var(--text-primary); }
.chat-modal__close { position: absolute; top: 12px; right: 12px; border: none; background: var(--surface-muted); width: 32px; height: 32px; border-radius: 50%; font-size: 18px; cursor: pointer; }
.chat-modal__error { color: #b91c1c; font-size: var(--fs-sm); }
.chat-modal__messages { flex: 1; min-height: 240px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px; background: var(--surface-muted); display: flex; flex-direction: column; gap: 8px; }
.msg { display: flex; align-items: flex-end; }
.msg--user { justify-content: flex-end; }
.msg--assistant { justify-content: flex-start; }
.msg__bubble { display: block; width: fit-content; max-width: 85%; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; box-shadow: var(--shadow-sm); overflow-wrap: anywhere; word-break: break-word; font-size: var(--fs-base); line-height: 1.5; }
.msg__bubble p { margin: 0; }
.msg__bubble.prose { width: auto; }
.msg__bubble.prose h1, .msg__bubble.prose h2, .msg__bubble.prose h3, .msg__bubble.prose h4 { margin: 0.5em 0 0.25em; }
.msg__bubble.prose ul, .msg__bubble.prose ol { margin: 0.25em 0; padding-left: 1em; }
.msg__bubble.prose blockquote { margin: 0.5em 0; }
.msg__bubble.prose pre { margin: 0.4em 0; }
.msg--user .msg__bubble { background: var(--accent-soft); border-color: var(--border); }
.chat-modal__composer { display: flex; gap: 8px; align-items: center; }
.chat-modal__input { flex: 1; min-height: 40px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; font-size: var(--fs-base); line-height: 1.6; font-family: inherit; resize: vertical; background: var(--surface); color: var(--text-primary); }
.chat-modal__input::placeholder { color: var(--text-muted); }
.chat-modal__send { width: 40px; height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: transparent; border-color: var(--accent); color: var(--accent); }
.chat-modal__send svg { display: block; }
.chat-modal__send.is-sending { pointer-events: none; opacity: 0.75; }
.chat-modal__send.is-sending::before { content: ""; width: 18px; height: 18px; border: 2px solid var(--accent); border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
.chat-modal__send.is-sending svg { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.typing-dots { display: flex; gap: 4px; align-items: center; justify-content: center; height: 24px; padding: 0 4px; }
.typing-dot { width: 6px; height: 6px; background: var(--text-muted); border-radius: 50%; animation: typing-bounce 1.4s infinite ease-in-out both; }
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes typing-bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }

@media (max-width: 768px) {
  .chat-modal__dialog { width: 96vw; height: 92vh; }
}

/* Contact Modal Styles */
.contact-modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 1130; }
.contact-modal[hidden] { display: none; }
.contact-modal__backdrop { position: absolute; inset: 0; background: rgba(15,23,42,0.75); }
.contact-modal__dialog { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 24px 48px rgba(15,23,42,0.25); width: min(480px, 92vw); display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.contact-modal__title { margin: 0; font-size: var(--fs-xl); color: var(--text-primary); text-align: center; }
.contact-modal__subtitle { margin: 0; font-size: var(--fs-base); color: var(--text-secondary); text-align: center; }
.contact-modal__close { position: absolute; top: 16px; right: 16px; border: none; background: var(--surface-muted); width: 32px; height: 32px; border-radius: 50%; font-size: 18px; cursor: pointer; }
.contact-modal__close:hover { background: var(--border); }
.contact-form { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.contact-form label { font-size: var(--fs-sm); font-weight: 600; color: var(--text-primary); }
.contact-form input, .contact-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: var(--fs-base); font-family: inherit; background: var(--surface); color: var(--text-primary); }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.contact-form textarea { resize: vertical; min-height: 80px; }
.contact-form button { width: 100%; padding: 12px; background: var(--accent); color: white; border: none; border-radius: 10px; font-weight: 600; font-size: var(--fs-base); cursor: pointer; transition: background 0.2s; }
.contact-form button:hover { background: var(--accent-hover); }
.contact-form button:disabled { opacity: 0.7; cursor: not-allowed; }
.contact-success { text-align: center; color: #16a34a; font-weight: 600; padding: 24px 0; }
