:root {
    --landing-primary: #3730a3;
    --landing-primary-hover: #4f46e5;
    --landing-primary-active: #312e81;
    --landing-ink: #1e293b;
    --landing-muted: #526176;
    --landing-border: #e2e8f0;
    --landing-surface: #f8fafc;
    --landing-surface-strong: #f1f5f9;
    --landing-success: #10b981;
    --landing-success-dark: #047857;
    --landing-white: #fff;
    --landing-shadow-sm: 0 1px 3px rgba(15, 23, 42, .1), 0 1px 2px rgba(15, 23, 42, .06);
    --landing-shadow-lg: 0 18px 40px rgba(30, 41, 59, .14), 0 4px 10px rgba(30, 41, 59, .08);
    --landing-ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; color: var(--landing-ink); background: var(--landing-white); font-family: "Source Sans Pro", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
svg { display: block; }
.landing-container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 100; top: 12px; left: 12px; padding: 10px 14px; color: #fff; background: var(--landing-primary); border-radius: 6px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; z-index: 20; top: 0; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--landing-border); }
.header-inner { min-height: 72px; display: flex; align-items: center; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--landing-ink); text-decoration: none; font-size: 1.5rem; font-weight: 700; }
.brand-mark { width: 34px; height: 38px; display: grid; place-items: center; color: var(--landing-primary); }
.brand-mark svg { width: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.site-nav { display: flex; gap: 32px; margin-left: auto; }
.site-nav a { color: var(--landing-ink); text-decoration: none; font-weight: 600; }
.site-nav a:hover { color: var(--landing-primary); }
.header-login { margin-left: 8px; }

.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 11px 18px; border: 1px solid transparent; border-radius: 6px; text-decoration: none; font-weight: 700; line-height: 1.25; transition: transform 180ms var(--landing-ease), background-color 180ms var(--landing-ease), border-color 180ms var(--landing-ease), box-shadow 180ms var(--landing-ease); }
.button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0); }
.button:focus-visible, .site-nav a:focus-visible, .text-link:focus-visible, .footer-links a:focus-visible { outline: 3px solid rgba(79, 70, 229, .35); outline-offset: 3px; }
.button-primary { color: #fff; background: var(--landing-primary); box-shadow: 0 5px 8px rgba(55, 48, 163, .2); }
.button-primary:hover { color: #fff; background: var(--landing-primary-hover); }
.button-primary:active { background: var(--landing-primary-active); }
.button-secondary { color: var(--landing-primary); background: #fff; border-color: var(--landing-primary); }
.button-secondary:hover { color: var(--landing-primary-active); background: var(--landing-surface); border-color: var(--landing-primary-active); }

.hero { overflow: hidden; padding: clamp(64px, 8vw, 104px) 0 72px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(540px, 1.2fr); gap: clamp(38px, 4vw, 58px); align-items: center; }
.hero-copy, .flow-visual, .product-preview { min-width: 0; }
.hero-copy h1 { max-width: 650px; margin: 0; color: var(--landing-ink); font-size: clamp(3rem, 4.5vw, 4.1rem); line-height: 1.02; letter-spacing: -.038em; text-wrap: balance; overflow-wrap: normal; }
.hero-copy > p:not(.hero-note) { max-width: 580px; margin: 28px 0 0; color: var(--landing-muted); font-size: clamp(1.12rem, 1.5vw, 1.34rem); line-height: 1.55; text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-note { margin: 20px 0 0; color: var(--landing-muted); font-size: 1rem; }

.flow-visual { position: relative; min-height: 540px; display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: center; }
.company-stream { position: relative; z-index: 1; display: grid; gap: 32px; }
.company-node { position: relative; z-index: 2; min-height: 74px; display: flex; align-items: center; gap: 10px; padding: 12px; background: #fff; border-radius: 8px; box-shadow: var(--landing-shadow-sm); }
.company-node > span { flex: 0 0 34px; height: 34px; display: grid; place-items: center; color: var(--landing-primary); background: var(--landing-surface-strong); border-radius: 6px; font-weight: 700; }
.company-node strong, .company-node small { display: block; }
.company-node strong { font-size: .875rem; }
.company-node small { margin-top: 2px; color: var(--landing-muted); font-size: .8125rem; line-height: 1.4; }
.flow-lines { position: absolute; z-index: 0; top: -46px; left: 82px; width: 230px; height: 320px; overflow: visible; }
.flow-lines path { fill: none; stroke: var(--landing-primary-hover); stroke-width: 2; }
.flow-lines circle { fill: var(--landing-primary); stroke: #fff; stroke-width: 3; }
.product-preview { position: relative; z-index: 2; overflow: hidden; background: #fff; border-radius: 12px; box-shadow: var(--landing-shadow-lg); }
.preview-heading, .preview-filters, .preview-footer { padding: 18px 20px; }
.preview-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.preview-label { color: var(--landing-primary); font-size: .8125rem; font-weight: 700; }
.preview-heading h2 { margin: 2px 0 0; color: var(--landing-ink); font-size: 1.5rem; line-height: 1.25; }
.sync-status { display: inline-flex; align-items: center; gap: 6px; color: var(--landing-success-dark); font-size: .8125rem; font-weight: 700; }
.sync-status i { width: 8px; height: 8px; background: var(--landing-success); border-radius: 50%; }
.preview-filters { display: grid; grid-template-columns: 1.2fr 1fr; gap: 10px; padding-top: 0; }
.preview-filters span { padding: 9px 11px; color: var(--landing-ink); background: var(--landing-surface); border: 1px solid var(--landing-border); border-radius: 6px; font-size: .875rem; font-weight: 600; }
.preview-filters small { display: block; margin-bottom: 2px; color: var(--landing-muted); font-size: .8125rem; line-height: 1.4; }
.document-list { border-top: 1px solid var(--landing-border); }
.document-row { min-height: 62px; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto 28px; gap: 10px; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--landing-border); }
.document-row > div strong, .document-row > div small { display: block; }
.document-row > div strong { font-size: .875rem; }
.document-row > div small { margin-top: 2px; color: var(--landing-muted); font-size: .8125rem; line-height: 1.4; }
.doc-type { width: 34px; height: 34px; display: grid; place-items: center; color: #fff; border-radius: 6px; font-size: .8125rem; font-weight: 700; }
.type-nfe { background: #3b82f6; }.type-nfce { background: var(--landing-success); }.type-cte { background: #6366f1; }.type-mdfe { background: #f59e0b; }.type-sat { background: var(--landing-primary); }
.ready { padding: 4px 8px; color: var(--landing-success-dark); background: #d1fae5; border-radius: 999px; font-size: .8125rem; font-weight: 700; }
.download-icon { width: 28px; height: 28px; display: grid; place-items: center; color: var(--landing-primary); border: 1px solid var(--landing-border); border-radius: 6px; font-weight: 800; }
.preview-footer { display: flex; justify-content: space-between; gap: 16px; color: var(--landing-muted); background: var(--landing-surface); font-size: .8125rem; line-height: 1.4; }
.preview-footer strong { color: var(--landing-primary); }

.section { padding: clamp(72px, 9vw, 112px) 0; }
.benefits { background: var(--landing-surface); border-block: 1px solid var(--landing-border); }
.benefits-layout { display: grid; grid-template-columns: 1.05fr .92fr 1.08fr; gap: 22px; align-items: stretch; }
.section-intro { padding: 24px 36px 24px 0; }
.section-intro h2, .section-heading h2, .integration h2, .final-cta h2 { margin: 0; color: var(--landing-ink); font-size: clamp(2.1rem, 3.5vw, 3.15rem); line-height: 1.08; letter-spacing: -.03em; text-wrap: balance; }
.section-intro h2 span { color: var(--landing-primary); }
.section-intro p, .section-heading p, .integration-grid > div p { max-width: 58ch; margin: 22px 0 0; color: var(--landing-muted); font-size: 1rem; line-height: 1.65; }
.benefit-primary { display: flex; flex-direction: column; justify-content: flex-end; min-height: 330px; padding: 28px; color: #fff; background: var(--landing-primary); border-radius: 12px; box-shadow: 0 10px 18px rgba(55, 48, 163, .18); }
.benefit-primary h3 { max-width: 12ch; margin: auto 0 12px; color: #fff; font-size: 1.5rem; line-height: 1.25; }
.benefit-primary p { margin: 0; color: #e0e7ff; line-height: 1.55; }
.feature-icon { min-width: 42px; height: 42px; padding-inline: 8px; display: grid; place-items: center; color: var(--landing-primary); background: var(--landing-surface-strong); border-radius: 6px; font-size: .8125rem; font-weight: 700; }
.benefit-stack { display: grid; gap: 18px; }
.benefit-stack article { display: grid; grid-template-columns: 42px 1fr; gap: 18px; align-items: start; padding: 26px; background: #fff; border-radius: 12px; box-shadow: var(--landing-shadow-sm); }
.benefit-stack h3 { margin: 2px 0 8px; color: var(--landing-ink); font-size: 1.125rem; line-height: 1.35; }
.benefit-stack p { margin: 0; color: var(--landing-muted); line-height: 1.55; }

.section-heading { display: flex; justify-content: space-between; gap: 48px; align-items: end; }
.section-heading p { margin-top: 12px; }
.text-link { flex: 0 0 auto; color: var(--landing-primary); font-weight: 700; text-decoration: none; }
.text-link:hover { color: var(--landing-primary-hover); }
.workflow-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 52px 0 0; padding: 0; list-style: none; }
.workflow-list li { position: relative; display: grid; grid-template-columns: 42px 1fr; gap: 14px; padding-right: 24px; }
.workflow-list li:not(:last-child)::after { content: ""; position: absolute; top: 20px; left: 42px; right: 0; height: 1px; background: var(--landing-border); }
.workflow-list li > span { position: relative; z-index: 1; width: 42px; height: 42px; display: grid; place-items: center; color: #fff; background: var(--landing-primary); border-radius: 50%; font-weight: 800; }
.workflow-list li > div { position: relative; z-index: 1; padding: 58px 0 0; margin-left: -56px; }
.workflow-list strong { font-size: 1rem; }
.workflow-list p { margin: 8px 0 0; color: var(--landing-muted); line-height: 1.5; }

.integration { background: var(--landing-primary-active); }
.integration-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 80px; align-items: center; }
.integration h2 { color: #fff; }
.integration-grid > div p { color: var(--landing-surface-strong); }
.document-types { margin: 0; padding: 0; list-style: none; }
.document-types li { display: grid; grid-template-columns: 96px 1fr; align-items: center; min-height: 58px; border-bottom: 1px solid rgba(255,255,255,.14); }
.document-types li:first-child { border-top: 1px solid rgba(255,255,255,.14); }
.document-types strong { color: #818cf8; font-size: 1.125rem; }
.document-types span { color: var(--landing-surface); }

.final-cta { padding: 72px 0; background: var(--landing-primary); }
.final-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 48px; }
.final-cta h2 { max-width: 650px; color: #fff; }
.final-cta p { margin: 14px 0 0; color: #e0e7ff; font-size: 1rem; line-height: 1.5; }
.final-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.button-light { color: var(--landing-primary); background: #fff; }
.button-light:hover { color: var(--landing-primary-active); background: #f8fafc; }
.button-outline-light { color: #fff; background: transparent; border-color: rgba(255,255,255,.6); }
.button-outline-light:hover { color: #fff; background: rgba(255,255,255,.1); border-color: #fff; }

.site-footer { padding: 48px 0; background: var(--landing-ink); }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 28px 80px; align-items: start; }
.footer-brand { color: #fff; }
.footer-inner > div > p { margin: 8px 0 0; color: #94a3b8; }
.footer-links { display: grid; gap: 9px; text-align: right; }
.footer-links a { color: var(--landing-surface-strong); text-decoration: none; }
.footer-links a:hover { color: #fff; }
.copyright { grid-column: 1 / -1; margin: 0; padding-top: 24px; color: #94a3b8; border-top: 1px solid rgba(255,255,255,.12); }

@media (max-width: 1080px) {
    .site-nav { display: none; }
    .header-login { margin-left: auto; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-copy { max-width: 760px; }
    .flow-visual { width: min(100%, 780px); margin-inline: auto; }
    .benefits-layout { grid-template-columns: 1fr 1fr; }
    .section-intro { grid-column: 1 / -1; padding-right: 0; }
    .integration-grid { gap: 48px; }
}

@media (max-width: 760px) {
    .landing-container { width: min(1180px, calc(100% - 28px)); }
    .header-inner { min-height: 64px; }
    .header-login { padding-inline: 13px; }
    .hero { padding-top: 52px; }
    .hero-copy h1 { font-size: clamp(2.45rem, 11vw, 3.15rem); line-height: 1.04; text-wrap: pretty; overflow-wrap: break-word; }
    .hero-actions { align-items: stretch; flex-direction: column; }
    .hero-actions .button { width: 100%; }
    .flow-visual { min-height: auto; display: block; margin-top: 16px; }
    .company-stream { display: none; }
    .product-preview { border-radius: 8px; }
    .document-row { grid-template-columns: 34px minmax(0, 1fr) 28px; padding-inline: 12px; }
    .document-row .ready { display: none; }
    .preview-heading, .preview-filters, .preview-footer { padding-inline: 14px; }
    .preview-footer { align-items: flex-start; flex-direction: column; gap: 4px; }
    .benefits-layout, .integration-grid { grid-template-columns: 1fr; }
    .benefit-primary { min-height: 280px; }
    .section-heading { align-items: flex-start; flex-direction: column; gap: 24px; }
    .workflow-list { grid-template-columns: 1fr; gap: 28px; }
    .workflow-list li { min-height: auto; padding-right: 0; }
    .workflow-list li:not(:last-child)::after { top: 42px; bottom: -28px; left: 20px; right: auto; width: 1px; height: auto; }
    .workflow-list li > div { padding: 2px 0 0; margin-left: 0; }
    .integration-grid { gap: 36px; }
    .final-cta-inner { align-items: flex-start; flex-direction: column; }
    .final-actions { width: 100%; justify-content: flex-start; }
    .final-actions .button { width: 100%; }
    .footer-inner { grid-template-columns: 1fr; }
    .footer-links { text-align: left; }
    .copyright { grid-column: auto; }
}

@media (max-width: 420px) {
    .brand { font-size: 1.125rem; }
    .brand-mark { width: 30px; height: 34px; }
    .header-inner { gap: 14px; }
    .header-login { max-width: 142px; min-height: 44px; padding-inline: 11px; font-size: .875rem; white-space: nowrap; }
    .preview-filters { grid-template-columns: 1fr; }
    .document-row > div small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .benefit-stack article { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
