/* ═══════════════════════════════════════════════════════════════
   Meu portal NFe — style.css
   ═══════════════════════════════════════════════════════════════ */

/* ─── TOKENS ────────────────────────────────────────────────── */
:root {
  --red:        #C8102E;
  --red-dark:   #9B0D22;
  --red-light:  #F5E6E9;
  --cream:      #FAF8F5;
  --ink:        #1A1510;
  --ink-soft:   #4A4440;
  --ink-muted:  #8A8480;
  --white:      #FFFFFF;
  --border:     rgba(26,21,16,.08);
  --shadow-sm:  0 2px 12px rgba(200,16,46,.08);
  --shadow-md:  0 8px 40px rgba(200,16,46,.14);
  --shadow-lg:  0 24px 80px rgba(200,16,46,.18);
  --r-sm: 8px;
  --r-md: 16px;
  --r-lg: 28px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --max: 1160px;
  --nav-h: 72px;
}

/* ─── RESET ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--cream); color: var(--ink); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ─── BUTTONS ────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-body); font-weight: 600; font-size: .95rem; border-radius: 50px; padding: 14px 30px; cursor: pointer; border: none; transition: all .22s ease; white-space: nowrap; }
.btn-primary { background: var(--red); color: var(--white); box-shadow: 0 4px 20px rgba(200,16,46,.35); }
.btn-primary:hover { background: var(--red-dark); box-shadow: 0 8px 30px rgba(200,16,46,.45); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--ink); border: 2px solid var(--border); }
.btn-outline:hover { border-color: var(--red); color: var(--red); transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ─── NAV ────────────────────────────────────────────────────── */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100;  height: var(--nav-h); background: rgba(250,248,245,.92); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); transition: box-shadow .3s; padding-top: 10px; }
.nav.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,.08); }
.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav__logo-img { height: 50px; width: auto; display: none; object-fit: contain; }
.nav__logo-fallback { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.2rem; font-weight: 900; color: var(--ink); letter-spacing: -.5px; }
.nav__logo-mark { width: 36px; height: 36px; border-radius: 9px; background: var(--red); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav__logo-mark svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2.5; }
.nav__links { display: flex; align-items: center; gap: 32px; }
.nav__links a { font-size: .9rem; font-weight: 500; color: var(--ink-soft); transition: color .2s; }
.nav__links a:hover { color: var(--red); }
.nav__cta { display: flex; align-items: center; gap: 12px; }
.nav__menu-btn { display: none; background: none; border: none; cursor: pointer; padding: 4px; color: var(--ink); }
.nav__menu-btn svg { width: 24px; height: 24px; }
.nav__mobile { display: none; flex-direction: column; position: fixed; top: var(--nav-h); left: 0; right: 0; background: var(--cream); border-bottom: 1px solid var(--border); padding: 24px; gap: 16px; z-index: 99; }
.nav__mobile.open { display: flex; }
.nav__mobile a { font-size: 1rem; font-weight: 500; color: var(--ink-soft); padding: 10px 0; border-bottom: 1px solid var(--border); }
.nav__mobile .btn { width: 100%; justify-content: center; margin-top: 8px; }

/* ─── HERO ───────────────────────────────────────────────────── */
.hero { padding-top: calc(var(--nav-h) + 80px); padding-bottom: 100px; overflow: hidden; position: relative; }
.hero__bg { position: absolute; inset: 0; z-index: 0; background: radial-gradient(ellipse 60% 60% at 90% 20%, rgba(200,16,46,.07) 0%, transparent 70%), radial-gradient(ellipse 40% 50% at 10% 80%, rgba(200,16,46,.05) 0%, transparent 70%); }
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero__badge { display: inline-flex; align-items: center; gap: 8px; background: var(--red-light); color: var(--red-dark); font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 6px 14px; border-radius: 50px; margin-bottom: 24px; }
.hero__badge span { width: 6px; height: 6px; border-radius: 50%; background: var(--red); flex-shrink: 0; }
.hero__headline { font-family: var(--font-display); font-size: clamp(2.4rem, 4vw, 3.6rem); font-weight: 900; line-height: 1.1; letter-spacing: -.03em; color: var(--ink); margin-bottom: 20px; }
.hero__headline em { font-style: normal; color: var(--red); }
.hero__sub { font-size: 1.05rem; line-height: 1.7; color: var(--ink-soft); max-width: 480px; margin-bottom: 36px; }
.hero__checks { display: flex; flex-direction: column; gap: 10px; margin-bottom: 40px; }
.hero__check { display: flex; align-items: center; gap: 10px; font-size: .92rem; font-weight: 500; color: var(--ink-soft); }
.hero__check svg { width: 20px; height: 20px; flex-shrink: 0; background: var(--red); border-radius: 50%; padding: 4px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 52px; }
.hero__stats { display: flex; gap: 32px; flex-wrap: wrap; padding-top: 32px; border-top: 1px solid var(--border); }
.hero__stat-value { font-family: var(--font-display); font-size: 1.7rem; font-weight: 900; color: var(--ink); line-height: 1; }
.hero__stat-label { font-size: .78rem; font-weight: 500; color: var(--ink-muted); margin-top: 4px; }
.hero__visual { position: relative; display: flex; justify-content: center; align-items: center; }
.hero__card-main { background: var(--white); border-radius: var(--r-lg); padding: 28px; width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); position: relative; z-index: 2; }
.hero__card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.hero__card-title { font-weight: 700; font-size: 1rem; color: var(--ink); }
.hero__card-badge { background: #E8F5E9; color: #2E7D32; font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 50px; letter-spacing: .04em; }
.hero__card-metric { font-family: var(--font-display); font-size: 2.4rem; font-weight: 900; color: var(--ink); line-height: 1; margin-bottom: 6px; }
.hero__card-sub { font-size: .82rem; color: var(--ink-muted); margin-bottom: 20px; }
.hero__card-bar { height: 6px; background: var(--red-light); border-radius: 99px; overflow: hidden; margin-bottom: 16px; }
.hero__card-bar-fill { height: 100%; background: var(--red); border-radius: 99px; width: 0; transition: width 1.4s cubic-bezier(.4,0,.2,1); }
.hero__card-clients { display: flex; align-items: center; gap: 8px; }
.hero__card-avatars { display: flex; }
.hero__card-avatars span { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--white); background: var(--red); display: flex; align-items: center; justify-content: center; font-size: .65rem; font-weight: 700; color: var(--white); margin-left: -8px; }
.hero__card-avatars span:first-child { margin-left: 0; }
.hero__card-client-text { font-size: .8rem; color: var(--ink-soft); font-weight: 500; }
.hero__float-1, .hero__float-2 { position: absolute; z-index: 3; background: var(--white); border-radius: var(--r-md); padding: 14px 18px; box-shadow: var(--shadow-md); border: 1px solid var(--border); }
.hero__float-1 { bottom: -10px; left: -20px; }
.hero__float-2 { top: 30px; right: -20px; }
.hero__float-label { font-size: .7rem; color: var(--ink-muted); font-weight: 500; margin-bottom: 2px; }
.hero__float-val { font-weight: 700; font-size: .95rem; color: var(--ink); }
.hero__float-val span { color: var(--red); }

/* ─── SECTIONS SHARED ────────────────────────────────────────── */
.section-label { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red); margin-bottom: 12px; }
.section-title { font-family: var(--font-display); font-size: clamp(1.9rem, 3vw, 2.8rem); font-weight: 900; line-height: 1.15; letter-spacing: -.02em; color: var(--ink); margin-bottom: 16px; }
.section-title em { font-style: normal; color: var(--red); }
.section-sub { font-size: 1rem; line-height: 1.7; color: var(--ink-soft); max-width: 540px; }
.section-header { margin-bottom: 64px; }
.section-header.center { text-align: center; }
.section-header.center .section-sub { margin: 0 auto; }

/* ─── HOW IT WORKS ───────────────────────────────────────────── */
.how { padding: 100px 0; background: var(--white); }
.how__steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; position: relative; }
.how__steps::before { content: ''; position: absolute; top: 40px; left: calc(12.5% + 20px); right: calc(12.5% + 20px); height: 2px; background: linear-gradient(90deg, var(--red) 0%, var(--red-light) 100%); z-index: 0; }
.how__step { position: relative; z-index: 1; background: var(--cream); border-radius: var(--r-lg); padding: 32px 24px; text-align: center; border: 1px solid var(--border); transition: transform .3s, box-shadow .3s; }
.how__step:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.how__step-num { width: 52px; height: 52px; border-radius: 50%; background: var(--red); color: var(--white); font-family: var(--font-display); font-size: 1.2rem; font-weight: 900; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; box-shadow: 0 4px 16px rgba(200,16,46,.35); }
.how__step-icon { width: 44px; height: 44px; margin: 0 auto 16px; color: var(--red); }
.how__step-title { font-weight: 700; font-size: 1rem; margin-bottom: 8px; }
.how__step-text { font-size: .88rem; line-height: 1.6; color: var(--ink-soft); }

/* ─── WHY ────────────────────────────────────────────────────── */
.why { padding: 100px 0; background: var(--cream); }
.why__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.why__features { display: flex; flex-direction: column; gap: 28px; margin-top: 40px; }
.why__feature { display: flex; gap: 18px; align-items: flex-start; }
.why__feature-icon { width: 48px; height: 48px; flex-shrink: 0; background: var(--red-light); border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; color: var(--red); transition: background .25s; }
.why__feature:hover .why__feature-icon { background: var(--red); color: var(--white); }
.why__feature-icon svg { width: 22px; height: 22px; }
.why__feature-title { font-weight: 700; font-size: .98rem; margin-bottom: 4px; }
.why__feature-text { font-size: .88rem; line-height: 1.6; color: var(--ink-soft); }
.why__visual { position: relative; }
.why__mockup { background: var(--ink); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4/3; display: flex; flex-direction: column; }
.why__mockup-bar { height: 36px; background: #2A2520; display: flex; align-items: center; padding: 0 16px; gap: 8px; flex-shrink: 0; }
.why__mockup-dot { width: 10px; height: 10px; border-radius: 50%; }
.why__mockup-body { flex: 1; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.why__mockup-row { display: flex; gap: 10px; }
.why__mockup-block { background: rgba(255,255,255,.06); border-radius: 8px; height: 40px; }
.why__mockup-block.wide { flex: 3; }
.why__mockup-block.narrow { flex: 1; }
.why__mockup-block.full { flex: 1; height: 60px; }
.why__mockup-block.red { background: rgba(200,16,46,.5); }
.why__mockup-block.green { background: rgba(46,125,50,.4); height: 28px; }
.why__mockup-table { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.why__mockup-tr { display: flex; gap: 8px; align-items: center; }
.why__mockup-td { background: rgba(255,255,255,.05); border-radius: 4px; height: 22px; flex: 1; }
.why__mockup-td.highlight { background: rgba(200,16,46,.25); }
.why__badge-float { position: absolute; bottom: -20px; right: -20px; background: var(--red); color: var(--white); border-radius: var(--r-md); padding: 18px 22px; box-shadow: var(--shadow-md); text-align: center; }
.why__badge-float strong { font-family: var(--font-display); font-size: 1.8rem; font-weight: 900; display: block; line-height: 1; }
.why__badge-float span { font-size: .75rem; opacity: .85; }

/* ─── TESTIMONIALS ───────────────────────────────────────────── */
.testimonials { padding: 100px 0; background: var(--white); }
.testimonials__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial-card { background: var(--cream); border-radius: var(--r-lg); padding: 28px; border: 1px solid var(--border); display: flex; flex-direction: column; gap: 16px; transition: transform .3s, box-shadow .3s; }
.testimonial-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.testimonial-card.featured { background: var(--red); color: var(--white); border-color: var(--red); }
.testimonial-card.featured .tc-text,
.testimonial-card.featured .tc-author { color: rgba(255,255,255,.85); }
.tc-stars { display: flex; gap: 3px; }
.tc-stars svg { width: 16px; height: 16px; fill: #F59E0B; }
.testimonial-card.featured .tc-stars svg { fill: #FFF9C4; }
.tc-text { font-size: .9rem; line-height: 1.7; color: var(--ink-soft); flex: 1; }
.tc-footer { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.tc-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--red-light); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 900; font-size: .95rem; color: var(--red); }
.testimonial-card.featured .tc-avatar { background: rgba(255,255,255,.2); color: var(--white); }
.tc-name { font-weight: 700; font-size: .9rem; }
.tc-author { font-size: .78rem; color: var(--ink-muted); }

/* ─── FAQ ────────────────────────────────────────────────────── */
.faq { padding: 100px 0; background: var(--cream); }
.faq__list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq__item { background: var(--white); border-radius: var(--r-md); border: 1px solid var(--border); overflow: hidden; transition: box-shadow .25s; }
.faq__item.open { box-shadow: var(--shadow-sm); }
.faq__q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px; background: none; border: none; cursor: pointer; text-align: left; font-family: var(--font-body); font-size: .97rem; font-weight: 600; color: var(--ink); transition: color .2s; }
.faq__item.open .faq__q { color: var(--red); }
.faq__icon { width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; transition: all .25s; }
.faq__icon svg { width: 14px; height: 14px; transition: transform .35s; }
.faq__item.open .faq__icon { background: var(--red); border-color: var(--red); }
.faq__item.open .faq__icon svg { transform: rotate(45deg); stroke: var(--white); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .4s cubic-bezier(.4,0,.2,1), padding .3s; padding: 0 24px; font-size: .92rem; line-height: 1.75; color: var(--ink-soft); }
.faq__item.open .faq__a { max-height: 300px; padding: 0 24px 22px; }

/* ─── CTA / FORM ─────────────────────────────────────────────── */
.cta-section { padding: 100px 0; background: var(--ink); position: relative; overflow: hidden; }
.cta-section::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 80% at 70% 50%, rgba(200,16,46,.18) 0%, transparent 70%); }
.cta__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.cta__label { color: rgba(200,16,46,.8); margin-bottom: 12px; }
.cta__title { font-family: var(--font-display); font-size: clamp(2rem, 3.5vw, 3rem); font-weight: 900; color: var(--white); line-height: 1.15; letter-spacing: -.02em; margin-bottom: 20px; }
.cta__title em { font-style: normal; color: var(--red); }
.cta__sub { font-size: 1rem; line-height: 1.7; color: rgba(255,255,255,.6); }
.cta__points { display: flex; flex-direction: column; gap: 12px; margin-top: 32px; }
.cta__point { display: flex; align-items: center; gap: 12px; font-size: .9rem; color: rgba(255,255,255,.75); font-weight: 500; }
.cta__point svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--red); }
.cta__form { background: var(--white); border-radius: var(--r-lg); padding: 40px 36px; box-shadow: var(--shadow-lg); }
.form-title { font-weight: 700; font-size: 1.15rem; margin-bottom: 4px; }
.form-sub { font-size: .85rem; color: var(--ink-muted); margin-bottom: 28px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.form-group input { width: 100%; padding: 13px 16px; border: 1.5px solid var(--border); border-radius: var(--r-sm); font-family: var(--font-body); font-size: .93rem; color: var(--ink); background: var(--cream); transition: border-color .2s, background .2s; outline: none; }
.form-group input:focus { border-color: var(--red); background: var(--white); }
.form-group input::placeholder { color: var(--ink-muted); }
.cta__form .btn { width: 100%; justify-content: center; margin-top: 8px; padding: 16px; position: relative; }
.btn-loading { display: none; align-items: center; gap: 8px; }
.btn.loading .btn-label { display: none; }
.btn.loading .btn-loading { display: flex; }
.btn.loading { opacity: .85; pointer-events: none; cursor: not-allowed; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 18px; height: 18px; animation: spin .8s linear infinite; }
.form-required { color: var(--red); margin-left: 2px; }
.form-error { display: none; font-size: .78rem; color: #D32F2F; margin-top: 5px; font-weight: 500; }
.form-group.has-error input { border-color: #D32F2F; background: #fff8f8; }
.form-group.has-error .form-error { display: block; }
.form-error-global { display: none; font-size: .83rem; color: #D32F2F; font-weight: 500; background: #fff0f0; border: 1px solid #fcc; border-radius: var(--r-sm); padding: 10px 14px; margin-bottom: 12px; }
.form-error-global.visible { display: block; }
.form-disclaimer { font-size: .75rem; color: var(--ink-muted); text-align: center; margin-top: 14px; line-height: 1.5; display: flex; align-items: center; justify-content: center; gap: 5px; }

/* ─── FOOTER ─────────────────────────────────────────────────── */
.footer { background: #110D0A; padding: 60px 0 32px; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.07); }
.footer__brand-text { font-size: .88rem; line-height: 1.7; color: rgba(255,255,255,.45); max-width: 300px; margin-top: 16px; }
.footer__col-title { font-weight: 700; font-size: .85rem; color: rgba(255,255,255,.7); margin-bottom: 16px; letter-spacing: .05em; text-transform: uppercase; }
.footer__links { display: flex; flex-direction: column; gap: 10px; }
.footer__links a { font-size: .88rem; color: rgba(255,255,255,.4); transition: color .2s; }
.footer__links a:hover { color: var(--white); }
.footer__contact { display: flex; flex-direction: column; gap: 10px; }
.footer__contact-item { display: flex; align-items: flex-start; gap: 10px; font-size: .85rem; color: rgba(255,255,255,.45); line-height: 1.5; }
.footer__contact-item svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: var(--red); }
.footer__bottom { padding-top: 28px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer__copy { font-size: .8rem; color: rgba(255,255,255,.3); }
.footer__logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.2rem; font-weight: 900; color: #fff; letter-spacing: -.5px; margin-bottom: 0; }
.footer__logo-mark { width: 36px; height: 36px; border-radius: 9px; background: var(--red); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.footer__logo-mark svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2.5; }
.footer__logo-img { height: 70px; width: auto; object-fit: contain; }
.footer__logo-fallback { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.2rem; font-weight: 900; color: #fff; letter-spacing: -.5px; }

/* ─── ANIMATIONS ─────────────────────────────────────────────── */
.fade-up { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up-delay-1 { transition-delay: .1s; }
.fade-up-delay-2 { transition-delay: .2s; }
.fade-up-delay-3 { transition-delay: .3s; }
.fade-up-delay-4 { transition-delay: .4s; }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: 48px; }
  .hero__visual { order: -1; }
  .hero__card-main { max-width: 380px; margin: 0 auto; }
  .hero__float-1, .hero__float-2 { display: none; }
  .why__grid { grid-template-columns: 1fr; gap: 48px; }
  .why__badge-float { bottom: -10px; right: 0; }
  .cta__inner { grid-template-columns: 1fr; gap: 48px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .how__steps { grid-template-columns: 1fr 1fr; }
  .how__steps::before { display: none; }
  .testimonials__grid { grid-template-columns: 1fr; }
  .nav__links, .nav__cta .btn-outline { display: none; }
  .nav__menu-btn { display: block; }
  .footer__grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .how__steps { grid-template-columns: 1fr; }
  .hero__stats { gap: 20px; }
  .cta__form { padding: 28px 20px; }
}