/* ============================================================
   BSE Express V4 — Design System
   Reference: Free SAAS Landing Page (Figma Community)
   Font: Inter | Monochrome palette | Zero shadows
   ============================================================ */

/* --- Theme Variables --- */
:root,
[data-theme="light"] {
  --bg-primary: #FFFFFF;
  --bg-secondary: #F7F8FA;
  --bg-card: #FFFFFF;
  --text-primary: #0F1D32;
  --text-secondary: #374151;
  --text-tertiary: #6B7280;
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);
  --accent: #0F1D32;
  --accent-hover: #1a2d47;
  --accent-10: rgba(15, 29, 50, 0.06);
  --accent-text: #FFFFFF;
  --logo-filter: none;
}

[data-theme="dark"] {
  --bg-primary: #0F1D32;
  --bg-secondary: #0A1628;
  --bg-card: #162540;
  --text-primary: #FFFFFF;
  --text-secondary: #D1D5DB;
  --text-tertiary: #9CA3AF;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --accent: #FFFFFF;
  --accent-hover: #E5E7EB;
  --accent-10: rgba(255, 255, 255, 0.08);
  --accent-text: #0F1D32;
  --logo-filter: brightness(0) invert(1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-secondary);
  background-color: var(--bg-primary);
  transition: background-color 0.3s, color 0.3s;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

/* --- Typography --- */
h1,
h2,
h3,
h4 {
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
  transition: color 0.3s;
}

h1 {
  font-size: 52px;
  font-weight: 600;
  line-height: 1.1;
}

h2 {
  font-size: 38px;
  font-weight: 500;
}

h3 {
  font-size: 22px;
  font-weight: 500;
}

h4 {
  font-size: 18px;
  font-weight: 500;
}

p {
  max-width: 640px;
  color: var(--text-secondary);
  transition: color 0.3s;
}

.section-label {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}

/* --- Layout --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
  transition: background-color 0.3s;
}

.section--secondary {
  background-color: var(--bg-secondary);
}

.section--primary {
  background-color: var(--bg-primary);
}

.section__header {
  text-align: center;
  margin-bottom: 64px;
}

.section__header p {
  margin: 16px auto 0;
  color: var(--text-tertiary);
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: border-color 0.3s, background-color 0.3s;
}

.card:hover {
  border-color: var(--border-hover);
}

.card-grid {
  display: grid;
  gap: 24px;
}

.card-grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.card-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.card-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.card__icon {
  font-size: 32px;
  margin-bottom: 16px;
  line-height: 1;
}

.card__title {
  color: var(--text-primary);
  margin-bottom: 8px;
}

.card__text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s, opacity 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--accent-text);
  border: none;
}

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

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
}

.btn-ghost {
  background: none;
  border: none;
  color: var(--text-primary);
  padding: 0;
  font-weight: 500;
}

.btn-ghost:hover {
  opacity: 0.8;
}

.btn-ghost::after {
  content: ' →';
}

.btn-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* --- Header --- */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  transition: background-color 0.3s, border-color 0.3s;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.header__logo {
  height: 36px;
  width: auto;
  filter: var(--logo-filter);
  transition: filter 0.3s;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header__nav-list {
  display: flex;
  gap: 24px;
}

.header__nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.header__nav-link:hover {
  color: var(--text-primary);
}

.header__nav-link--portal {
  color: var(--accent) !important;
  font-weight: 500;
}

.header__login-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  white-space: nowrap;
  text-decoration: none;
}

.header__login-btn svg {
  flex-shrink: 0;
}

.mobile-menu__link--portal {
  color: var(--accent) !important;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-switch {
  display: flex;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
}

.lang-switch__btn {
  color: var(--text-tertiary);
  padding: 4px;
  transition: color 0.2s;
}

.lang-switch__btn--active {
  color: var(--text-primary);
}

.theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  border-radius: 8px;
  transition: color 0.2s;
}

.theme-toggle:hover {
  color: var(--text-primary);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

[data-theme="light"] .theme-icon--sun {
  display: none;
}

[data-theme="light"] .theme-icon--moon {
  display: block;
}

[data-theme="dark"] .theme-icon--sun {
  display: block;
}

[data-theme="dark"] .theme-icon--moon {
  display: none;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: background-color 0.3s;
}

/* Mobile menu overlay */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1001;
  background-color: var(--bg-primary);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  transition: background-color 0.3s;
}

.mobile-menu.is-open {
  display: flex;
}

.mobile-menu__close {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 28px;
  color: var(--text-primary);
  line-height: 1;
}

.mobile-menu__link {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-primary);
}

.mobile-menu__link:hover {
  color: var(--text-tertiary);
}

/* --- Hero (Always Dark) --- */
.hero {
  position: relative;
  background: #0A1628;
  padding: 120px 0 96px;
  overflow: hidden;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10, 22, 40, 0.85), rgba(10, 22, 40, 0.6));
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 64px;
  align-items: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 24px;
}

.hero__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.8);
}

.hero h1 {
  color: #FFFFFF;
  margin-bottom: 20px;
}

.hero__accent {
  color: #FFFFFF;
}

/* Hero & MidCTA always-dark button overrides */
.hero .btn-primary,
.midcta .btn-primary {
  background-color: #FFFFFF;
  color: #0F1D32;
}

.hero .btn-primary:hover,
.midcta .btn-primary:hover {
  background-color: rgba(255, 255, 255, 0.9);
}

.hero__subtitle {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.7);
  max-width: 560px;
  margin-bottom: 24px;
  line-height: 1.6;
}

.hero__checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 32px;
}

.hero__checklist li {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.8);
}

.hero__checklist li::before {
  content: '✓ ';
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.hero__buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.hero .btn-secondary {
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
}

.hero .btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

.hero__note {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
}

.hero__stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero__stat {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  text-align: center;
  min-width: 160px;
}

.hero__stat-number {
  font-size: 36px;
  font-weight: 600;
  color: #FFFFFF;
  line-height: 1;
  margin-bottom: 4px;
}

.hero__stat-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

/* --- Marquee --- */
.marquee {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  overflow: hidden;
  transition: background-color 0.3s, border-color 0.3s;
}

.marquee__track {
  display: flex;
  gap: 32px;
  white-space: nowrap;
  animation: marquee-scroll 40s linear infinite;
}

.marquee__content {
  display: flex;
  gap: 32px;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  text-transform: uppercase;
  flex-shrink: 0;
}

.marquee__content span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.marquee__content svg.icon {
  flex-shrink: 0;
  vertical-align: middle;
  opacity: 0.7;
}

.marquee__dot {
  color: var(--text-tertiary);
}

@keyframes marquee-scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* --- Trust Bar (4 Pillars) --- */
.trustbar {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  background-color: var(--bg-primary);
  transition: background-color 0.3s, border-color 0.3s;
}

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

.trustbar__pillar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.trustbar__pillar-icon {
  flex-shrink: 0;
  color: var(--text-secondary);
  opacity: 0.6;
}

.trustbar__pillar-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.trustbar__pillar-sub {
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.3;
}

@media (max-width: 768px) {
  .trustbar__pillars {
    gap: 16px 24px;
    justify-content: flex-start;
  }
}

/* --- Pain Points, Why, Testimonials (card grids) --- */
.card__icon {
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.card__icon svg {
  display: block;
}

.card__stars {
  color: var(--text-primary);
  font-size: 16px;
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.card__quote {
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 15px;
  line-height: 1.6;
}

.card__author {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 15px;
}

.card__role {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* --- Services / Comparison --- */
.delivery-badge {
  display: inline-block;
  padding: 4px 12px;
  background-color: var(--accent-10);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  margin-bottom: 12px;
}

.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 64px;
}

.comparison__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  transition: border-color 0.3s, background-color 0.3s;
}

.comparison__card--recommended {
  border-color: var(--text-primary);
}

.comparison__badge {
  display: inline-block;
  padding: 4px 10px;
  background-color: var(--text-primary);
  color: var(--bg-primary);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
  margin-bottom: 16px;
}

.comparison__subtitle {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 20px;
}

.comparison__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.comparison__list li {
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.comparison__bridge {
  text-align: center;
  margin-top: 32px;
  font-size: 15px;
  color: var(--text-tertiary);
  font-style: italic;
}

.comparison__note {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-tertiary);
}

/* --- Mid CTA (Always Dark) --- */
.midcta {
  background: #0A1628;
  padding: 80px 0;
  text-align: center;
}

.midcta h2 {
  color: #FFFFFF;
  margin-bottom: 12px;
}

.midcta p {
  color: rgba(255, 255, 255, 0.7);
  margin: 0 auto 32px;
}

.midcta .btn-secondary {
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
}

.midcta .btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

/* --- Process --- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.process-step {
  text-align: center;
}

.process-step__number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--text-primary);
  color: var(--bg-primary);
  font-weight: 600;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  transition: background-color 0.3s, color 0.3s;
}

.process-step__emoji {
  margin-bottom: 8px;
  display: flex;
  justify-content: center;
  color: var(--text-secondary);
}

.process-step__title {
  margin-bottom: 8px;
}

.process-step__text {
  font-size: 14px;
  color: var(--text-tertiary);
  max-width: 320px;
  margin: 0 auto;
}

/* --- Stats --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  text-align: center;
  margin-bottom: 48px;
}

.stat__number {
  font-size: 48px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 8px;
}

.stat__label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stats__map {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s;
}

.stats__map iframe {
  display: block;
  width: 100%;
  height: 300px;
  border: none;
}

/* --- Warehouse --- */
.warehouse-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.warehouse-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.warehouse-feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  transition: border-color 0.3s, background-color 0.3s;
}

.warehouse-feature h4 {
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.warehouse-feature h4 svg.icon {
  flex-shrink: 0;
  opacity: 0.7;
}

.warehouse-feature p {
  font-size: 14px;
  color: var(--text-tertiary);
  margin: 0;
}

/* --- Portal Preview --- */
.portal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.portal-features {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 32px 0;
}

.portal-feature {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.portal-feature__icon {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
}

.portal-feature__title {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 15px;
}

.portal-feature__desc {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.portal-mockup {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  background: var(--bg-card);
  transition: border-color 0.3s, background-color 0.3s;
}

.portal-badge {
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-tertiary);
  font-style: italic;
}

/* --- Payment --- */
.payment-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.payment-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
}

.payment-card__icon {
  flex-shrink: 0;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
}

.payment-card__title {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 15px;
}

.payment-card__desc {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* --- FAQ Accordion --- */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  background: var(--bg-card);
  transition: background-color 0.3s, color 0.3s;
}

.faq-arrow {
  font-size: 14px;
  color: var(--text-tertiary);
  transition: transform 0.3s;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item.is-open .faq-arrow {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer__inner {
  padding: 0 24px 20px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.faq-more {
  text-align: center;
  margin-top: 24px;
}

/* --- Calculator --- */
.calc {
  max-width: 720px;
  margin: 0 auto;
}

.calc-stepper {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 48px;
}

.calc-stepper__step {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calc-stepper__circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  border: 2px solid var(--border);
  color: var(--text-tertiary);
  transition: all 0.3s;
}

.calc-stepper__step--active .calc-stepper__circle {
  background-color: var(--text-primary);
  border-color: var(--text-primary);
  color: var(--bg-primary);
}

.calc-stepper__step--completed .calc-stepper__circle {
  background-color: var(--text-primary);
  border-color: var(--text-primary);
  color: var(--bg-primary);
}

.calc-stepper__line {
  width: 40px;
  height: 2px;
  background-color: var(--border);
  transition: background-color 0.3s;
}

.calc-stepper__step--completed+.calc-stepper__line {
  background-color: var(--text-primary);
}

.calc-step {
  display: none;
}

.calc-step.is-active {
  display: block;
}

.calc-step h3 {
  text-align: center;
  margin-bottom: 32px;
}

.calc-options {
  display: grid;
  gap: 16px;
}

.calc-options--2 {
  grid-template-columns: 1fr 1fr;
}

.calc-options--4 {
  grid-template-columns: repeat(4, 1fr);
}

.calc-option {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s;
  background: var(--bg-card);
}

.calc-option:hover {
  border-color: var(--border-hover);
}

.calc-option.is-selected {
  border-color: var(--text-primary);
}

.calc-option__icon {
  margin-bottom: 8px;
  display: flex;
  justify-content: center;
  color: var(--text-secondary);
}

.calc-option__title {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 15px;
}

.calc-option__desc {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.calc-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

.calc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calc-field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
}

.calc-field input,
.calc-field select {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  transition: border-color 0.2s, background-color 0.3s, color 0.3s;
}

.calc-field input:focus,
.calc-field select:focus {
  outline: none;
  border-color: var(--text-primary);
}

.calc-field.has-error input,
.calc-field.has-error select {
  border-color: #EF4444;
}

.calc-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
}

/* Estimate result (Step 3) */
.calc-estimate {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  background: var(--bg-card);
  margin-bottom: 24px;
  transition: border-color 0.3s, background-color 0.3s;
}

.calc-estimate__row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 15px;
  color: var(--text-secondary);
}

.calc-estimate__row--total {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 16px;
  font-weight: 600;
  font-size: 18px;
  color: var(--text-primary);
}

.calc-estimate__disclaimer {
  font-size: 13px;
  color: var(--text-tertiary);
  text-align: center;
  margin: 16px 0 24px;
  font-style: italic;
}

/* Thank you */
.calc-thankyou {
  text-align: center;
  padding: 48px 0;
}

.calc-thankyou__icon {
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
  color: var(--accent);
}

/* --- Footer (Always Dark) --- */
.footer {
  background: #0A1628;
  padding: 64px 0 32px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer__logo {
  height: 32px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 16px;
}

.footer__desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
  max-width: 280px;
}

.footer__heading {
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__link {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s;
}

.footer__link:hover {
  color: #FFFFFF;
}

.footer__divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: 24px;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
}

/* --- Floating CTA (Mobile) --- */
.floating-cta {
  display: none;
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 999;
  background: var(--text-primary);
  border-radius: 8px;
  padding: 12px 16px;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.floating-cta__btn {
  color: var(--bg-primary);
  font-weight: 600;
  font-size: 14px;
}

.floating-cta__icons {
  display: flex;
  gap: 12px;
}

.floating-cta__icon {
  color: #FFFFFF;
  opacity: 0.9;
}

.floating-cta__icon svg {
  width: 20px;
  height: 20px;
}

/* --- Responsive --- */
@media (max-width: 1024px) {

  .card-grid--3,
  .card-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .payment-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 24px;
  }

  h3 {
    font-size: 18px;
  }

  .section {
    padding: 64px 0;
  }

  .section__header {
    margin-bottom: 48px;
  }

  /* Header mobile */
  .header__nav-list,
  .lang-switch {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  /* Hero */
  .hero {
    padding: 96px 0 64px;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero__stats {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero__stat {
    min-width: 120px;
    padding: 16px;
  }

  .hero__stat-number {
    font-size: 28px;
  }

  /* Card grids */
  .card-grid--2,
  .card-grid--3,
  .card-grid--4 {
    grid-template-columns: 1fr;
  }

  /* Comparison */
  .comparison {
    grid-template-columns: 1fr;
  }

  /* Process */
  .process-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* Warehouse */
  .warehouse-grid {
    grid-template-columns: 1fr;
  }

  /* Portal */
  .portal-grid {
    grid-template-columns: 1fr;
  }

  /* Payment */
  .payment-grid {
    grid-template-columns: 1fr;
  }

  /* Calculator */
  .calc-options--2,
  .calc-options--4 {
    grid-template-columns: 1fr;
  }

  .calc-fields {
    grid-template-columns: 1fr;
  }

  .calc-stepper__line {
    width: 24px;
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  /* Floating CTA */
  .floating-cta.is-visible {
    display: flex;
  }

  /* Trust bar */
  .trustbar__items {
    gap: 16px;
  }

  /* Marquee */
  .marquee__content {
    gap: 20px;
  }
}

/* --- НДС Savings Calculator --- */
.nds-calc {
  max-width: 720px;
  margin: 0 auto;
}

.nds-calc__slider-wrap {
  text-align: center;
  margin-bottom: 40px;
}

.nds-calc__label {
  display: block;
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.nds-calc__slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  outline: none;
  margin-bottom: 12px;
}

.nds-calc__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg-primary);
  transition: transform 0.15s;
}

.nds-calc__slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.nds-calc__slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg-primary);
}

.nds-calc__value {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.nds-calc__cards {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 32px;
}

.nds-calc__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px;
  text-align: center;
  transition: border-color 0.2s;
}

.nds-calc__card:hover {
  border-color: var(--border-hover);
}

.nds-calc__card-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.nds-calc__card-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.nds-calc__card-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.nds-calc__card-amount {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.nds-calc__card-amount--lost {
  color: #DC2626;
}

.nds-calc__card-amount--saved {
  color: #16A34A;
}

.nds-calc__card-desc {
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.5;
}

.nds-calc__vs {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-align: center;
}

.nds-calc__cta {
  text-align: center;
}

@media (max-width: 640px) {
  .nds-calc__cards {
    grid-template-columns: 1fr;
  }

  .nds-calc__vs {
    padding: 8px 0;
  }

  .nds-calc__value {
    font-size: 24px;
  }
}

/* --- Sticky CTA Bar --- */
.sticky-cta {
  position: fixed;
  top: 65px;
  left: 0;
  right: 0;
  z-index: 998;
  background: var(--accent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 0;
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  pointer-events: none;
}

.sticky-cta.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.sticky-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sticky-cta__text {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}

.sticky-cta__btn.btn-sm {
  padding: 8px 20px;
  font-size: 13px;
  background: #FFFFFF;
  color: #0F1D32;
  border-radius: 8px;
}

.sticky-cta__btn.btn-sm:hover {
  background: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
  .sticky-cta {
    display: none;
  }
}

/* --- Card Solution (micro-answers) --- */
.card__solution {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
}

/* --- Quiz --- */
.quiz {
  max-width: 640px;
  margin: 48px auto 0;
  padding: 48px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-card);
  text-align: center;
  transition: border-color 0.3s, background-color 0.3s;
}

.quiz__title {
  font-size: 24px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.quiz__subtitle {
  font-size: 16px;
  color: var(--text-tertiary);
  margin-bottom: 32px;
}

/* Progress */
.quiz__progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
}

.quiz__progress-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-tertiary);
  background: var(--bg-card);
  transition: all 0.2s;
}

.quiz__progress-dot.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.quiz__progress-dot.completed {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.quiz__progress-line {
  width: 40px;
  height: 1px;
  background: var(--border);
}

/* Questions */
.quiz__step {
  display: none;
}

.quiz__step.active {
  display: block;
  animation: quizFadeIn 0.35s ease;
}

@keyframes quizFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.quiz__question {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.quiz__options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz__option {
  display: block;
  width: 100%;
  padding: 16px 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  font-family: 'Inter', sans-serif;
}

.quiz__option:hover {
  border-color: var(--border-hover);
  background: var(--bg-secondary);
  transform: translateY(-1px);
}

.quiz__option:active,
.quiz__option.selected {
  border-color: var(--accent);
  color: var(--text-primary);
}

/* Result */
.quiz__result {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-card);
  text-align: center;
}

.quiz__result-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.quiz__result-title {
  font-size: 24px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.quiz__result-text {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}

.quiz__result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.quiz__result-actions .btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: 'Inter', sans-serif;
}

.quiz__result-actions .btn--primary {
  background: var(--accent);
  color: #fff;
  border: none;
}

.quiz__result-actions .btn--secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.quiz__restart {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
  font-family: 'Inter', sans-serif;
  transition: color 0.2s;
}

.quiz__restart:hover {
  color: var(--text-primary);
}

.quiz-result-alt-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-tertiary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.quiz-result-alt-link:hover {
  color: var(--text-primary);
}

[data-theme="dark"] .quiz-result-alt-link {
  color: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .quiz-result-alt-link:hover {
  color: rgba(255, 255, 255, 0.9);
}

/* Mobile */
@media (max-width: 768px) {
  .quiz {
    padding: 32px 16px;
    margin-top: 32px;
  }

  .quiz__title {
    font-size: 20px;
  }

  .quiz__question {
    font-size: 17px;
  }

  .quiz__option {
    font-size: 14px;
    padding: 12px 16px;
  }

  .quiz__result-actions {
    flex-direction: column;
  }
}

/* Dark theme */
[data-theme="dark"] .quiz__option {
  background: var(--bg-card);
}

[data-theme="dark"] .quiz__result {
  background: var(--bg-card);
}

/* --- Team Section --- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  justify-items: center;
}

.team-card {
  text-align: center;
  padding: 24px 16px;
}

.team-card__photo-wrap {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 16px;
  border: 2px solid var(--border);
  transition: transform 0.3s ease;
}

.team-card:hover .team-card__photo-wrap {
  transform: scale(1.05);
}

.team-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team-card__name {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.team-card__role {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-tertiary);
  line-height: 1.5;
}

@media (max-width: 1024px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .team-card {
    padding: 16px 8px;
  }

  .team-card__photo-wrap {
    width: 96px;
    height: 96px;
  }

  .team-card__name {
    font-size: 16px;
  }

  .team-card__role {
    font-size: 13px;
  }
}

/* --- AI Assistant Widget --- */
.ai-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 998;
}

.ai-widget__btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  transition: border-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-widget__btn:hover {
  border-color: var(--border-hover);
}

.ai-widget__avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Tooltip */
.ai-widget__tooltip {
  position: absolute;
  bottom: 68px;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
}

.ai-widget__tooltip.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.ai-widget__tooltip::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 20px;
  width: 10px;
  height: 10px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transform: rotate(45deg);
}

/* Chat Window */
.ai-chat {
  position: absolute;
  bottom: 68px;
  right: 0;
  width: 380px;
  height: 520px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.ai-chat.is-open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.ai-chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 56px;
  background: var(--accent);
  color: #FFFFFF;
  border-radius: 16px 16px 0 0;
  flex-shrink: 0;
}

.ai-chat__header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
}

.ai-chat__header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  background: rgba(255, 255, 255, 0.15);
}

.ai-chat__close {
  background: none;
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  padding: 4px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.ai-chat__close:hover {
  opacity: 1;
}

/* Messages */
.ai-chat__messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-chat__msg {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  max-width: 90%;
}

.ai-chat__msg--bot {
  align-self: flex-start;
}

.ai-chat__msg--user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.ai-chat__msg-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  flex-shrink: 0;
  margin-top: 4px;
}

.ai-chat__msg-bubble {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
}

.ai-chat__msg--bot .ai-chat__msg-bubble {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.ai-chat__msg--user .ai-chat__msg-bubble {
  background: var(--accent);
  color: #FFFFFF;
}

.ai-chat__msg-bubble a {
  color: inherit;
  text-decoration: underline;
}

/* Quick Replies */
.ai-chat__quick-replies {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}

.ai-chat__chip {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
}

.ai-chat__chip:hover {
  border-color: var(--border-hover);
  background: var(--bg-secondary);
}

/* Input */
.ai-chat__input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.ai-chat__input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  font-family: inherit;
  background: transparent;
  color: var(--text-primary);
}

.ai-chat__input::placeholder {
  color: var(--text-tertiary);
}

.ai-chat__send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #FFFFFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.ai-chat__send:hover {
  opacity: 0.85;
}

@media (max-width: 768px) {
  .ai-widget {
    bottom: 80px;
  }

  .ai-chat {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    border-radius: 16px 16px 0 0;
  }

  .ai-widget__tooltip {
    right: 0;
    bottom: 68px;
  }
}