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

:root {
  --primary: #0A2540;
  --primary-light: #1E5FA8;
  --accent: #00A86B;
  --accent-dark: #008F5A;
  --gold: #F5A623;
  --danger: #E53E3E;
  --bg: #FFFFFF;
  --bg-soft: #F7F9FC;
  --bg-dark: #06182B;
  --text: #0A2540;
  --text-soft: #4A5568;
  --border: #E2E8F0;
  --shadow-sm: 0 1px 3px rgba(10, 37, 64, 0.08);
  --shadow-md: 0 4px 20px rgba(10, 37, 64, 0.08);
  --shadow-lg: 0 20px 50px rgba(10, 37, 64, 0.12);
  --shadow-xl: 0 30px 80px rgba(10, 37, 64, 0.18);
  --radius: 14px;
  --radius-lg: 24px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  background: var(--bg);
}

h1, h2, h3, h4 { font-family: 'Space Grotesk', 'Inter', sans-serif; line-height: 1.2; font-weight: 700; }

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-14px); }
}
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

header {
  position: fixed; top: 0; left: 0; right: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}
header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.nav {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.logo-mark {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  filter: drop-shadow(0 6px 14px rgba(10, 37, 64, 0.22));
}
.logo-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.logo-name {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--primary);
  line-height: 1.1;
}
.logo-homolog {
  margin-top: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-dark);
  line-height: 1.2;
  white-space: nowrap;
}

.nav-links {
  display: flex; align-items: center; gap: 28px;
  list-style: none;
}
.nav-links a {
  font-size: 15px; font-weight: 500; color: var(--text);
  position: relative; transition: color var(--transition);
}
.nav-links a:hover { color: var(--accent); }
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -6px;
  width: 0; height: 2px; background: var(--accent);
  transition: width var(--transition);
}
.nav-links a:hover::after { width: 100%; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 10px;
  font-size: 15px; font-weight: 600;
  transition: all var(--transition); cursor: pointer;
  white-space: nowrap;
}
.btn-ghost {
  background: transparent; color: var(--primary);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--primary); background: var(--bg-soft); }

.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 6px 20px rgba(0, 168, 107, 0.3);
}
.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 168, 107, 0.4);
}

.btn-outline-light {
  background: transparent; color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}
.btn-outline-light:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }

.btn-lg { padding: 16px 32px; font-size: 16px; border-radius: 12px; }

.menu-toggle {
  display: none; font-size: 26px; background: none;
  color: var(--primary); cursor: pointer; line-height: 1;
}

.hero {
  padding: 160px 0 100px;
  background:
    radial-gradient(circle at 15% 20%, rgba(0, 168, 107, 0.10) 0%, transparent 45%),
    radial-gradient(circle at 85% 60%, rgba(30, 95, 168, 0.10) 0%, transparent 45%),
    linear-gradient(180deg, #FAFCFE 0%, #FFFFFF 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 55%; height: 100%;
  background-image: radial-gradient(circle, rgba(10,37,64,0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to left, black, transparent);
  -webkit-mask-image: linear-gradient(to left, black, transparent);
  pointer-events: none;
}

.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 60px; align-items: center;
  position: relative; z-index: 1;
}

.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 100px;
  font-size: 13px; font-weight: 600;
  background: #fff; color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.badge.dgi { background: #E8F9F1; color: var(--accent-dark); border-color: #C6F0DE; }
.badge.new { background: #FFF6E5; color: #B47500; border-color: #FFE4B0; }

.hero h1 {
  font-size: clamp(36px, 5vw, 60px);
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  color: var(--primary);
}
.hero h1 .highlight {
  background: linear-gradient(120deg, var(--accent), var(--primary-light));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p.lead {
  font-size: 19px; color: var(--text-soft);
  max-width: 560px; margin-bottom: 34px;
}

.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }

.hero-trust {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding-top: 26px; border-top: 1px solid var(--border);
  font-size: 14px; color: var(--text-soft);
}
.hero-trust strong { color: var(--primary); font-weight: 700; }

.hero-visual { position: relative; }
.mockup {
  background: #fff; border-radius: var(--radius-lg);
  padding: 26px; box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  animation: float 6s ease-in-out infinite;
  position: relative; z-index: 2;
}
.mockup-top {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 18px; margin-bottom: 18px;
  border-bottom: 2px solid var(--bg-soft);
}
.mockup-title { font-size: 15px; font-weight: 700; font-family: 'Space Grotesk', 'Inter', sans-serif; color: var(--primary); }
.mockup-status {
  display: inline-flex; align-items: center; gap: 5px;
  background: #E8F9F1; color: var(--accent-dark);
  padding: 5px 11px; border-radius: 100px;
  font-size: 12px; font-weight: 600;
}
.mockup-row {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 14px; color: var(--text-soft);
  padding: 9px 0; border-bottom: 1px dashed var(--border);
}
.mockup-row strong { color: var(--text); }
.mockup-total {
  display: flex; justify-content: space-between;
  padding: 14px 0 4px; font-size: 17px; font-weight: 700;
  color: var(--primary);
}
.mockup-total span:last-child { color: var(--accent); }

.mockup-secure {
  margin-top: 16px; padding-top: 16px;
  border-top: 2px solid var(--bg-soft);
  display: flex; align-items: center; gap: 14px;
}
.qr-box {
  width: 68px; height: 68px; border-radius: 8px;
  background:
    repeating-conic-gradient(var(--primary) 0% 25%, #fff 0% 50%) 0 0/11px 11px;
  border: 2px solid var(--bg-soft);
  flex-shrink: 0;
}
.mockup-secure-info { font-size: 11px; color: var(--text-soft); line-height: 1.5; }
.mockup-secure-info strong { color: var(--primary); font-size: 12px; }

.hero-float-card {
  position: absolute; background: #fff;
  padding: 14px 18px; border-radius: 14px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
  display: flex; align-items: center; gap: 11px;
  font-size: 13px; font-weight: 600; z-index: 3;
}
.hero-float-card .icon {
  width: 36px; height: 36px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
}
.card-1 { top: -18px; left: -26px; animation: float 5s ease-in-out infinite 0.5s; }
.card-1 .icon { background: #E8F9F1; }
.card-2 { bottom: 30px; right: -34px; animation: float 5.5s ease-in-out infinite 1s; }
.card-2 .icon { background: #FFF6E5; }
.hero-float-card small { display: block; color: var(--text-soft); font-weight: 500; font-size: 11px; }

.ticker-wrap {
  background: var(--primary); color: #fff;
  padding: 14px 0; overflow: hidden;
  font-size: 14px; font-weight: 500;
}
.ticker { display: flex; gap: 60px; width: max-content; animation: ticker 30s linear infinite; }
.ticker-item { display: inline-flex; align-items: center; gap: 8px; opacity: 0.9; white-space: nowrap; }
.ticker-item::before { content: '●'; color: var(--accent); font-size: 8px; }

section { padding: 100px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 64px; }
.section-tag {
  display: inline-block; padding: 7px 16px; border-radius: 100px;
  background: #E8F9F1; color: var(--accent-dark);
  font-size: 13px; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; margin-bottom: 18px;
}
.section-head h2 {
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.02em; margin-bottom: 16px; color: var(--primary);
}
.section-head p { font-size: 18px; color: var(--text-soft); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 24px;
}
.feature-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px 28px;
  transition: all var(--transition); position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--primary-light));
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--transition);
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg); border-color: transparent;
}
.feature-card:hover::before { transform: scaleX(1); }

.feature-icon {
  width: 54px; height: 54px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin-bottom: 20px;
  background: linear-gradient(135deg, #E8F9F1, #D6F2E6);
}
.feature-card h3 { font-size: 19px; margin-bottom: 10px; }
.feature-card p { color: var(--text-soft); font-size: 15px; }

.ai-section {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #0A2540 100%);
  color: #fff; position: relative; overflow: hidden;
}
.ai-section::before {
  content: ''; position: absolute;
  top: -50%; right: -20%;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(0, 168, 107, 0.25) 0%, transparent 70%);
  border-radius: 50%;
}
.ai-section .section-head { position: relative; z-index: 1; }
.ai-section .section-tag { background: rgba(0, 168, 107, 0.2); color: #6EE7B7; }
.ai-section .section-head h2 { color: #fff; }
.ai-section .section-head p { color: rgba(255, 255, 255, 0.75); }

.ai-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px; position: relative; z-index: 1;
}
.ai-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius); padding: 28px;
  backdrop-filter: blur(10px);
  transition: all var(--transition);
}
.ai-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-4px);
  border-color: rgba(0, 168, 107, 0.5);
}
.ai-card .ai-icon {
  font-size: 30px; margin-bottom: 16px;
  display: inline-block; animation: float 4s ease-in-out infinite;
}
.ai-card h3 { font-size: 18px; margin-bottom: 9px; color: #fff; }
.ai-card p { color: rgba(255, 255, 255, 0.7); font-size: 14.5px; }

.comparison-wrap {
  overflow-x: auto; border-radius: var(--radius);
  border: 1px solid var(--border); background: #fff;
  box-shadow: var(--shadow-md);
}
table.compare {
  width: 100%; border-collapse: collapse; min-width: 780px;
}
.compare th, .compare td {
  padding: 18px 20px; text-align: left;
  border-bottom: 1px solid var(--border); font-size: 15px;
}
.compare thead th {
  background: var(--bg-soft); font-size: 14px;
  font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.4px; color: var(--text-soft);
}
.compare thead th.ours {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
}
.compare tbody tr:last-child td { border-bottom: none; }
.compare tbody tr:hover { background: #FAFCFE; }
.compare tbody th {
  font-weight: 600;
  color: var(--primary);
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  background: transparent;
}
.compare td.ours { background: #F0FBF6; font-weight: 600; }
.compare .check { color: var(--accent); font-weight: 900; font-size: 18px; }
.compare .cross { color: var(--danger); font-weight: 700; font-size: 18px; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px; align-items: stretch;
}
.price-card {
  background: #fff; border: 2px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px 30px;
  display: flex; flex-direction: column;
  transition: all var(--transition); position: relative;
}
.price-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.price-card.featured {
  border-color: var(--accent);
  box-shadow: 0 20px 50px rgba(0, 168, 107, 0.18);
  transform: scale(1.03);
}
.price-card.featured:hover { transform: scale(1.03) translateY(-6px); }

.price-tag-pop {
  position: absolute; top: -14px; left: 50%;
  transform: translateX(-50%);
  background: var(--accent); color: #fff;
  padding: 6px 18px; border-radius: 100px;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  box-shadow: 0 6px 16px rgba(0, 168, 107, 0.4);
}
.price-name { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.price-desc { font-size: 14px; color: var(--text-soft); margin-bottom: 22px; min-height: 42px; }
.price-amount {
  display: flex; align-items: baseline; gap: 5px;
  margin-bottom: 6px;
}
.price-amount .num { font-size: 44px; font-weight: 800; color: var(--primary); letter-spacing: -0.03em; font-family: 'Space Grotesk', sans-serif; }
.price-amount .cur { font-size: 20px; font-weight: 700; color: var(--primary); }
.price-amount .per { font-size: 15px; color: var(--text-soft); font-weight: 500; }
.price-note { font-size: 13px; color: var(--text-soft); margin-bottom: 26px; }
.price-list { list-style: none; margin-bottom: 30px; flex-grow: 1; }
.price-list li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 0; font-size: 14.5px; color: var(--text-soft);
}
.price-list li::before {
  content: '✓'; color: var(--accent); font-weight: 900; flex-shrink: 0;
}
.price-card .btn { width: 100%; }
.admin-note {
  text-align: center; margin-top: 28px;
  font-size: 13px; color: var(--text-soft); font-style: italic;
}

.steps { background: var(--bg-soft); }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
}
.step { text-align: center; }
.step-num {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; margin: 0 auto 22px;
  font-family: 'Space Grotesk', sans-serif;
  box-shadow: 0 10px 26px rgba(10, 37, 64, 0.25);
}
.step h3 { font-size: 19px; margin-bottom: 10px; }
.step p { color: var(--text-soft); font-size: 15px; }

.faq { background: var(--bg-soft); }
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 14px; background: #fff;
  overflow: hidden; transition: all var(--transition);
}
.faq-item.open { box-shadow: var(--shadow-md); border-color: var(--accent); }
.faq-q {
  width: 100%; background: none; padding: 22px 26px;
  display: flex; justify-content: space-between; align-items: center;
  text-align: left; font-size: 16px; font-weight: 600;
  color: var(--primary); gap: 16px;
}
.faq-q .arrow {
  font-size: 22px; color: var(--accent);
  transition: transform var(--transition); flex-shrink: 0;
}
.faq-item.open .faq-q .arrow { transform: rotate(45deg); }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 26px; color: var(--text-soft); font-size: 15px;
}
.faq-item.open .faq-a { max-height: 400px; padding: 0 26px 22px; }

.cta-band { padding-top: 40px; }
.cta-final {
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
  color: #fff; text-align: center; border-radius: var(--radius-lg);
  padding: 80px 40px; position: relative; overflow: hidden;
}
.cta-final::before {
  content: ''; position: absolute; top: -100px; right: -100px;
  width: 400px; height: 400px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}
.cta-final::after {
  content: ''; position: absolute; bottom: -80px; left: -80px;
  width: 300px; height: 300px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}
.cta-final h2 {
  font-size: clamp(30px, 4vw, 46px);
  margin-bottom: 18px; position: relative; z-index: 1; color: #fff;
}
.cta-final p {
  font-size: 18px; opacity: 0.92;
  max-width: 600px; margin: 0 auto 36px;
  position: relative; z-index: 1;
}
.cta-buttons {
  display: flex; gap: 14px; justify-content: center;
  flex-wrap: wrap; position: relative; z-index: 1;
}
.cta-final .btn-primary { background: #fff; color: var(--accent-dark); box-shadow: none; }
.cta-final .btn-primary:hover { background: #F0FBF6; transform: translateY(-2px); }

footer {
  background: var(--bg-dark); color: rgba(255, 255, 255, 0.75);
  padding: 80px 0 30px; margin-top: 100px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 56px;
}
.footer-brand .logo { margin-bottom: 18px; }
.footer-brand .logo-name { color: #fff; }
.footer-brand .logo-homolog { color: #6EE7B7; }
.footer-brand p { font-size: 14.5px; line-height: 1.7; margin-bottom: 20px; }
.footer-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-badges .badge {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.12);
  font-size: 12px; padding: 6px 12px;
}
.footer-title {
  color: #fff; font-size: 15px; font-weight: 700;
  margin-bottom: 20px; font-family: 'Space Grotesk', sans-serif;
}
.footer-col a {
  display: block; font-size: 14px; margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.65);
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 28px; display: flex;
  justify-content: space-between; align-items: center;
  font-size: 13px; flex-wrap: wrap; gap: 14px;
}
.footer-bottom .made {
  color: rgba(255, 255, 255, 0.72);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.technova {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-weight: 700;
}
.technova img { width: 22px; height: 22px; border-radius: 6px; }
.heart { color: #ff4d6d; }

.nav-mobile-cta { display: none; }

@media (max-width: 1100px) {
  .nav-links { gap: 18px; }
  .logo-name { font-size: 16px; }
}

@media (max-width: 968px) {
  .nav-links { display: none; }
  .menu-toggle { display: block; }
  .nav-links.mobile-open {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; padding: 24px;
    box-shadow: var(--shadow-lg); gap: 20px;
    border-top: 1px solid var(--border);
  }
  .nav-mobile-cta { display: block; width: 100%; text-align: center; }
  .hero { padding: 140px 0 80px; }
  .hero-grid { grid-template-columns: 1fr; gap: 50px; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero-text { text-align: center; }
  .hero-badges, .hero-buttons, .hero-trust { justify-content: center; }
  .card-1, .card-2 { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .price-card.featured { transform: none; }
  .price-card.featured:hover { transform: translateY(-6px); }
}
@media (max-width: 720px) {
  .nav-actions .btn-ghost { display: none; }
  .nav-actions .btn { padding: 10px 14px; font-size: 14px; }
  .logo-homolog { display: none; }
}
@media (max-width: 560px) {
  section { padding: 70px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-bottom .made { justify-content: center; }
  .hero-buttons .btn-lg,
  .cta-buttons .btn-lg { width: 100%; }
  .cta-final { padding: 56px 20px; }
  .logo-name { font-size: 15px; }
}

.api-band {
  padding: 100px 0;
  background: linear-gradient(180deg, #F7F9FC 0%, #FFFFFF 100%);
}
.api-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.api-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
}
.api-item h3 { font-size: 18px; margin-bottom: 8px; color: var(--primary); }
.api-item p { color: var(--text-soft); font-size: 15px; }
.api-lead {
  max-width: 760px;
  margin: 36px auto 0;
  text-align: center;
  font-size: 18px;
  color: var(--primary);
  font-weight: 600;
}

.tva-notice { padding: 28px 0 10px; }
.tva-card {
  background: #fff;
  border: 1px solid #C6F0DE;
  border-left: 6px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-md);
}
.tva-card h2 {
  font-size: clamp(26px, 3vw, 36px);
  color: var(--primary);
  margin: 8px 0 14px;
}
.tva-lead { font-size: 17px; color: var(--text-soft); max-width: 820px; margin-bottom: 28px; }
.tva-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.tva-grid h3 { font-size: 18px; margin-bottom: 12px; color: var(--primary); }
.tva-grid ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.tva-grid li {
  position: relative;
  padding-left: 22px;
  color: var(--text-soft);
  font-size: 15px;
}
.tva-grid li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.tva-grid strong { color: var(--primary); }
.tva-when {
  margin-top: 24px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #E8F9F1;
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 15px;
}
.tva-source { margin-top: 14px; font-size: 13px; color: var(--text-soft); }
.tva-source a { color: var(--primary-light); text-decoration: underline; }

.externalisation {
  padding: 100px 0;
  background: linear-gradient(180deg, #FFFFFF 0%, #F7F9FC 100%);
  position: relative;
  overflow: hidden;
}
.externalisation::before {
  content: '';
  position: absolute;
  top: 10%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 168, 107, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.section-tag.service {
  background: linear-gradient(135deg, #EBF1FF, #E8F9F1);
  color: var(--primary);
}
.highlight-text {
  background: linear-gradient(120deg, var(--accent), var(--primary-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ext-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.ext-steps { display: flex; flex-direction: column; gap: 6px; }
.ext-step {
  display: flex;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 14px;
  transition: all var(--transition);
}
.ext-step:hover {
  background: #fff;
  box-shadow: var(--shadow-md);
  transform: translateX(6px);
}
.ext-step-num {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 6px 16px rgba(10, 37, 64, 0.2);
}
.ext-step-content h3 {
  font-size: 17px;
  margin-bottom: 4px;
  color: var(--primary);
}
.ext-step-content p {
  font-size: 14.5px;
  color: var(--text-soft);
  line-height: 1.55;
}
.ext-guarantee {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding: 20px 22px;
  background: linear-gradient(135deg, #E8F9F1 0%, #D6F2E6 100%);
  border-radius: 14px;
  border: 1px solid #C6F0DE;
}
.ext-guarantee-icon { font-size: 32px; flex-shrink: 0; }
.ext-guarantee strong {
  display: block;
  color: var(--accent-dark);
  font-size: 15px;
  margin-bottom: 3px;
}
.ext-guarantee p { font-size: 13.5px; color: var(--text-soft); margin: 0; }
.ext-visual { position: relative; }
.ext-chat {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  max-width: 440px;
  margin: 0 auto;
}
.ext-chat-header {
  background: linear-gradient(135deg, #075E54, #128C7E);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ext-chat-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.ext-chat-header strong { display: block; font-size: 15px; font-weight: 600; }
.ext-chat-header small { font-size: 12px; opacity: 0.85; }
.ext-chat-body {
  padding: 20px;
  background-color: #ECE5DD;
  background-image: radial-gradient(circle, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.msg { display: flex; flex-direction: column; max-width: 85%; }
.msg.client { align-self: flex-start; }
.msg.plateforme { align-self: flex-end; }
.msg.system { align-self: center; max-width: 100%; }
.msg-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #1f2937;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.msg.client .msg-bubble { background: #fff; border-top-left-radius: 4px; }
.msg.plateforme .msg-bubble { background: #DCF8C6; border-top-right-radius: 4px; }
.msg.system .msg-bubble {
  background: rgba(255, 255, 255, 0.9);
  border: 1px dashed #B8D4C2;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
}
.msg-status { display: block; color: var(--accent-dark); font-weight: 600; }
.msg-status:first-child { color: var(--primary); font-weight: 500; }
.msg-code {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 8px;
  background: rgba(10, 37, 64, 0.06);
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  font-size: 11.5px;
  color: var(--primary);
  font-weight: 600;
}
.msg-bubble.doc {
  font-weight: 600;
  color: var(--primary);
  background: #fff;
  border: 1px solid var(--border);
}
.msg-time {
  font-size: 11px;
  color: rgba(0, 0, 0, 0.45);
  margin-top: 3px;
  padding: 0 4px;
}
.msg.plateforme .msg-time { text-align: right; }
.ext-benefits {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}
.ext-benefit {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.ext-benefit:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.ext-benefit-icon { font-size: 22px; flex-shrink: 0; }
.ext-benefit strong { display: block; font-size: 14px; color: var(--primary); }
.ext-benefit small { font-size: 12.5px; color: var(--text-soft); }
.ext-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 56px;
}

.homologation { padding: 20px 0 80px; }
.homolog-panel {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: center;
  padding: 42px 36px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 15% 20%, rgba(0, 168, 107, 0.18), transparent 42%),
    linear-gradient(135deg, #07182e 0%, #0b3d6e 55%, #0A2540 100%);
  box-shadow: var(--shadow-xl);
  color: #fff;
}
.homolog-cards { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.homolog-card {
  position: relative;
  width: 230px;
  min-height: 148px;
  background: #fff;
  color: var(--primary);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}
.dgi-seal { width: 72px; height: 72px; flex-shrink: 0; }
.dgi-copy {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.dgi-copy span {
  display: block;
  margin-top: 6px;
  color: #C8102E;
  font-size: 11px;
}
.invoice-card { overflow: visible; }
.invoice-card img { position: relative; z-index: 1; flex-shrink: 0; }
.paper, .paper-2 {
  position: absolute;
  left: 14px;
  top: 22px;
  width: 54px;
  height: 68px;
  border-radius: 8px;
  background: #eef3f8;
  border: 1px solid #d7e0ea;
  transform: rotate(10deg);
}
.paper-2 { transform: rotate(-8deg) translate(8px, 2px); background: #fff; }
.invoice-word {
  position: relative;
  z-index: 1;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
}
.invoice-word strong { display: block; color: #C8102E; }
.homolog-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}
.homolog-pill::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #F5A623;
  box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.2);
}
.homolog-copy h2 {
  font-size: clamp(28px, 3vw, 40px);
  color: #fff;
  margin-bottom: 14px;
}
.homolog-copy h2 span { color: #3B82F6; }
.homolog-copy p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  margin-bottom: 22px;
}
.homolog-copy strong { color: #fff; }
.homolog-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.homolog-chips span {
  padding: 8px 14px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 968px) {
  .api-grid { grid-template-columns: 1fr 1fr; }
  .ext-layout { grid-template-columns: 1fr; gap: 48px; }
  .ext-chat, .ext-benefits { max-width: 100%; }
  .ext-step:hover { transform: none; }
  .homolog-panel { grid-template-columns: 1fr; padding: 28px 20px; }
  .tva-grid { grid-template-columns: 1fr; }
  .tva-card { padding: 24px 18px; }
}
@media (max-width: 560px) {
  .ext-step { padding: 14px 12px; }
  .ext-step-num { width: 38px; height: 38px; font-size: 16px; }
  .api-grid { grid-template-columns: 1fr; }
  .ext-cta .btn, .homolog-card { width: 100%; }
}
