:root {
  --ink: #080d25;
  --muted: #435170;
  --blue: #1264e8;
  --blue-soft: #dcecff;
  --line: #d7e2f2;
  --page: #fff;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background: var(--page);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

.site-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: clamp(70px, 8.5vh, 92px);
  padding: clamp(12px, 1.6vh, 17px) max(4.3vw, 32px);
  position: relative;
  z-index: 2;
}

.brand {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 800;
  gap: 15px;
  letter-spacing: -1.7px;
  text-decoration: none;
}

.brand-mark { display: block; height: 44px; width: 44px; }
.brand-mark svg { display: block; height: 100%; width: 100%; }

.header-actions { display: flex; gap: 24px; }

.header-button {
  align-items: center;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: clamp(1rem, 1.4vw, 1.35rem);
  font-weight: 700;
  min-height: 55px;
  padding: 0 27px;
  white-space: nowrap;
  text-decoration: none;
}

.header-button--outline { background: white; border: 2px solid var(--blue); color: var(--blue); }
.header-button--solid { background: var(--blue); border: 2px solid var(--blue); color: white; }

.hero {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(520px, .98fr);
  margin: 0 auto;
  max-width: 1360px;
  min-height: clamp(400px, calc(100svh - 410px), 620px);
  padding: clamp(24px, 5.9vh, 64px) 0 clamp(16px, 2.4vh, 26px);
  position: relative;
}

.hero::before {
  background: radial-gradient(ellipse at 74% 33%, rgba(191, 215, 250, .67), rgba(229, 240, 255, .3) 47%, transparent 70%);
  content: "";
  inset: 0 -10vw 0 23%;
  pointer-events: none;
  position: absolute;
}

.hero-copy { padding-left: 5px; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(3.1rem, 5.25vw, 5.2rem); letter-spacing: -3.6px; line-height: .98; margin: 0 0 25px; }
.hero-lead { color: var(--muted); font-size: clamp(1.25rem, 2vw, 1.85rem); font-weight: 700; line-height: 1.35; margin: 0; }
.accent-line { background: var(--blue); border-radius: 99px; height: 6px; margin: 34px 0 25px; width: 84px; }
.hero-support { color: var(--muted); font-size: clamp(1.15rem, 1.55vw, 1.52rem); line-height: 1.38; margin: 0; }

.hero-art { height: clamp(350px, 46.3vh, 500px); overflow: hidden; position: relative; z-index: 1; }
.hero-art img { height: auto; left: -760px; max-width: none; position: absolute; top: -208px; width: 1446px; }

.features { display: grid; gap: clamp(14px, 2.3vh, 25px); grid-template-columns: repeat(4, 1fr); margin: 0 auto; max-width: 1360px; padding: 0 0 clamp(38px, 7.6vh, 82px); position: relative; z-index: 1; }
.feature-card { background: rgba(255, 255, 255, .93); border: 1px solid var(--line); border-radius: 17px; min-height: clamp(205px, 24.8vh, 269px); padding: clamp(12px, 1.4vh, 15px) 36px clamp(18px, 2.3vh, 25px); box-shadow: 0 1px 1px rgba(38, 86, 150, .04); }
.feature-icon { align-items: center; background: var(--blue-soft); border-radius: 12px; display: flex; height: 70px; justify-content: center; margin-bottom: 14px; width: 78px; }
.feature-icon svg { fill: none; height: 43px; stroke: var(--blue); stroke-linecap: round; stroke-linejoin: round; stroke-width: 3.3; width: 43px; }
.feature-card h2 { font-size: clamp(1.65rem, 2.25vw, 2.2rem); letter-spacing: -1.2px; line-height: .98; margin: 0 0 14px; }
.feature-card p { color: #10182c; font-size: clamp(1.08rem, 1.4vw, 1.32rem); line-height: 1.25; margin: 0; }

/* Keep the complete desktop landing page visible on common notebook heights. */
@media (min-width: 801px) and (max-height: 900px) {
  .brand { font-size: clamp(1.8rem, 3vw, 2.5rem); }
  .brand-mark { height: 38px; width: 38px; }
  .header-button { min-height: 46px; padding-inline: 22px; }
  .hero h1 { font-size: clamp(2.8rem, 5.1vw, 4.4rem); margin-bottom: 18px; }
  .hero-lead { font-size: clamp(1.1rem, 1.8vw, 1.55rem); }
  .accent-line { margin: 22px 0 17px; }
  .hero-support { font-size: clamp(1rem, 1.4vw, 1.25rem); }
  .feature-card { padding-inline: clamp(16px, 2.2vw, 28px); }
  .feature-icon { height: 58px; margin-bottom: 10px; width: 66px; }
  .feature-icon svg { height: 36px; width: 36px; }
  .feature-card h2 { font-size: clamp(1.35rem, 2vw, 1.9rem); margin-bottom: 10px; }
  .feature-card p { font-size: clamp(.95rem, 1.25vw, 1.15rem); }
}

.bottom-wave { background: #cfe2ff; border-radius: 55% 55% 0 0 / 35% 35% 0 0; bottom: -75px; height: 130px; left: -4%; position: absolute; transform: rotate(-2deg); width: 108%; }

.site-footer { bottom: 10px; left: 0; position: fixed; text-align: center; width: 100%; z-index: 2; }
.site-footer a, .back-link { color: var(--blue); font-size: .9rem; font-weight: 700; }
.consent-banner { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 16px; bottom: 18px; box-shadow: 0 8px 30px rgba(8, 13, 37, .18); display: flex; gap: 22px; justify-content: space-between; left: 50%; max-width: 1120px; padding: 18px 22px; position: fixed; transform: translateX(-50%); width: calc(100% - 32px); z-index: 5; }
.consent-banner[hidden] { display: none; }
.consent-banner h2 { font-size: 1.1rem; margin: 0 0 5px; }
.consent-banner p { color: var(--muted); font-size: .95rem; line-height: 1.35; margin: 0 0 5px; }
.consent-banner a { color: var(--blue); font-size: .88rem; font-weight: 700; }
.consent-actions { display: flex; flex-shrink: 0; gap: 10px; }
.consent-button { border: 2px solid var(--blue); border-radius: 9px; cursor: pointer; font: inherit; font-size: .9rem; font-weight: 700; min-height: 42px; padding: 0 15px; white-space: nowrap; }
.consent-button--secondary { background: #fff; color: var(--blue); }
.consent-button--primary { background: var(--blue); color: #fff; }

.privacy-page { background: #f7faff; }
.privacy-content { background: #fff; border: 1px solid var(--line); border-radius: 18px; margin: 42px auto 70px; max-width: 900px; padding: 36px clamp(22px, 5vw, 68px); }
.privacy-content h1 { font-size: clamp(2.1rem, 5vw, 3.8rem); letter-spacing: -2px; line-height: 1; margin: 28px 0 10px; }
.privacy-content h2 { font-size: 1.45rem; margin: 34px 0 10px; }
.privacy-content p { color: var(--muted); font-size: 1.05rem; line-height: 1.6; margin: 0 0 12px; }
.privacy-updated { font-size: .9rem !important; }
.privacy-note { background: var(--blue-soft); border-radius: 10px; margin-top: 30px !important; padding: 14px 16px; }

.plans-page { background: #f7faff; }
.plans-content { margin: 42px auto 70px; max-width: 1080px; padding: 0 24px; }
.plans-heading { margin: 30px 0 28px; max-width: 680px; }
.eyebrow, .plan-label, .signup-note { color: var(--blue); font-size: .9rem; font-weight: 800; letter-spacing: .08em; margin: 0 0 10px; text-transform: uppercase; }
.plans-heading h1 { font-size: clamp(2.5rem, 5vw, 4.6rem); letter-spacing: -2px; line-height: 1; margin: 0 0 15px; }
.plans-heading > p:last-child { color: var(--muted); font-size: 1.2rem; line-height: 1.5; margin: 0; }
.plan-card { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 20px; display: grid; gap: 48px; grid-template-columns: 1fr minmax(280px, 360px); padding: clamp(24px, 5vw, 56px); }
.plan-card h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin: 0 0 12px; }
.plan-description { color: var(--muted); font-size: 1.1rem; line-height: 1.5; margin: 0 0 22px; max-width: 510px; }
.plan-card ul { line-height: 2; margin: 0; padding-left: 22px; }
.signup-box { background: var(--blue-soft); border-radius: 15px; padding: 24px; }
.signup-button { align-items: center; background: var(--blue); border-radius: 9px; color: #fff; cursor: pointer; display: inline-flex; font: inherit; font-weight: 800; justify-content: center; min-height: 48px; padding: 0 24px; text-decoration: none; width: 100%; }
.plan-builder-content { margin: 42px auto 70px; max-width: 1120px; padding: 0 24px; }
.builder-heading { margin: 28px 0; max-width: 720px; }
.builder-heading h1 { font-size: clamp(2.5rem, 5vw, 4.4rem); letter-spacing: -2px; line-height: 1; margin: 0 0 14px; }
.builder-heading > p:last-child { color: var(--muted); font-size: 1.15rem; line-height: 1.5; margin: 0; }
.plan-builder { align-items: start; display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr) 340px; }
.builder-section, .builder-summary, .catalog-message { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px; }
.builder-section { grid-column: 1; }
.section-heading { align-items: flex-start; display: flex; gap: 14px; margin-bottom: 22px; }
.step-label { align-items: center; background: var(--blue-soft); border-radius: 50%; color: var(--blue); display: flex; flex: 0 0 34px; font-weight: 800; height: 34px; justify-content: center; margin: 0; }
.section-heading h2 { font-size: 1.45rem; margin: 0 0 5px; }
.section-heading p { color: var(--muted); margin: 0; }
.period-options { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
.period-option, .module-option { border: 2px solid var(--line); border-radius: 12px; cursor: pointer; display: flex; gap: 12px; padding: 16px; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.period-option:has(input:checked), .period-option--selected, .module-option:has(input:checked) { background: #f7faff; border-color: var(--blue); }
.period-option:hover { border-color: #7aa8ef; transform: translateY(-1px); }
.period-option input, .module-option input { accent-color: var(--blue); height: 18px; margin-top: 2px; width: 18px; }
.period-option-content, .module-option-info { display: grid; gap: 5px; }
.period-option small, .module-option small { color: var(--muted); line-height: 1.35; }
.period-option-price { color: var(--blue); font-size: 1.08rem; line-height: 1.2; }
.period-option-total { font-size: .82rem; }
.module-options { display: grid; gap: 12px; }
.module-option { align-items: flex-start; position: relative; }
.module-price { align-self: center; color: var(--blue); font-size: 1rem; margin-left: auto; text-align: right; white-space: nowrap; }
.module-option em { color: var(--blue); font-size: .8rem; font-style: normal; font-weight: 800; margin-left: 12px; white-space: nowrap; }
.module-check { color: var(--blue); font-weight: 800; }
.builder-summary { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 22px; }
.builder-summary h2 { font-size: 1.8rem; margin: 0 0 22px; }
.summary-list { border-top: 1px solid var(--line); margin: 0 0 22px; }
.summary-list div { border-bottom: 1px solid var(--line); display: flex; gap: 16px; justify-content: space-between; padding: 13px 0; }
.summary-list dt { color: var(--muted); }
.summary-list dd { font-weight: 700; margin: 0; text-align: right; }
.summary-list .summary-total dt, .summary-list .summary-total dd { color: var(--blue); font-size: 1.15rem; font-weight: 800; }
.builder-submit { border: 0; margin-bottom: 10px; }
.trial-button { background: #fff; border: 2px solid var(--blue); border-radius: 9px; color: var(--blue); cursor: pointer; font: inherit; font-weight: 800; min-height: 48px; padding: 0 14px; width: 100%; }
.trial-note { color: var(--muted); display: block; line-height: 1.35; margin-top: 12px; }
.catalog-message { margin: 42px auto; max-width: 720px; }
.catalog-message h1 { font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: -2px; margin: 18px 0 12px; }
.catalog-message p { color: var(--muted); line-height: 1.5; }
.demo-summary { background: var(--blue-soft); border-radius: 12px; margin: 24px 0; padding: 16px; }
.demo-summary p { color: var(--ink); margin: 8px 0; }

.form-content { margin: 42px auto 70px; max-width: 720px; padding: 0 24px; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; margin-top: 28px; padding: clamp(24px, 5vw, 48px); }
.form-card h1 { font-size: clamp(2.3rem, 5vw, 4rem); letter-spacing: -2px; line-height: 1; margin: 0 0 14px; }
.form-intro { color: var(--muted); line-height: 1.5; margin: 0 0 24px; }
.registration-form { display: grid; gap: 16px; }
.registration-form label { color: var(--ink); display: grid; font-weight: 700; gap: 7px; }
.registration-form input:not([type="checkbox"]) { border: 1px solid #b8c9e1; border-radius: 8px; font: inherit; min-height: 46px; padding: 0 12px; width: 100%; }
.registration-form input:focus { border-color: var(--blue); outline: 3px solid var(--blue-soft); }
.registration-form input[aria-invalid="true"], .registration-form [aria-invalid="true"] input { border-color: #c62828; }
.registration-form input[aria-invalid="true"]:focus, .registration-form [aria-invalid="true"] input:focus { border-color: #c62828; outline-color: #ffe1e1; }
.required-field::after { color: #8a1c1c; content: "Obrigatório"; font-size: .78rem; font-weight: 700; margin-left: 5px; }
.required-field .field-error::before { content: ""; }
.field-error { color: #8a1c1c !important; display: block; font-size: .85rem; font-weight: 700 !important; }
.field-error[hidden] { display: none; }
.password-field { position: relative; }
.password-field input { padding-right: 48px !important; }
.password-toggle { align-items: center; background: transparent; border: 0; color: var(--muted); cursor: pointer; display: flex; height: 42px; justify-content: center; padding: 0; position: absolute; right: 4px; top: 2px; width: 42px; }
.password-toggle:hover, .password-toggle:focus { color: var(--blue); }
.password-toggle:focus { border-radius: 7px; outline: 3px solid var(--blue-soft); }
.password-toggle svg { fill: none; height: 22px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 22px; }
.registration-form small { color: var(--muted); font-weight: 400; line-height: 1.35; }
.check-label { align-items: start; display: flex !important; font-size: .95rem; font-weight: 400 !important; gap: 9px !important; line-height: 1.4; }
.check-label input { accent-color: var(--blue); flex: 0 0 auto; margin-top: 3px; }
.check-label a { color: var(--blue); font-weight: 700; }
.form-alert, .form-success { border-radius: 9px; line-height: 1.4; margin: 0 0 16px; padding: 12px 14px; }
.form-alert { background: #fff1f1; color: #8a1c1c; }
.form-success { background: #eaf8ef; color: #176336; }
.auth-links { display: flex; gap: 18px; justify-content: space-between; margin-top: 22px; }
.auth-links a, .text-button { color: var(--blue); font-weight: 700; }
.logout-form { margin-top: 18px; text-align: center; }
.text-button { background: transparent; border: 0; cursor: pointer; font: inherit; }
.signup-button:disabled { cursor: not-allowed; opacity: .6; }

.company-content { margin: 42px auto 70px; max-width: 920px; padding: 0 24px; }
.company-card { margin-top: 28px; }
.company-card fieldset { border: 0; border-top: 1px solid var(--line); margin: 28px 0 0; padding: 24px 0 0; }
.inline-field { align-items: center; display: flex; gap: 10px; }
.inline-field input { min-width: 0; }
.inline-field .text-button { flex: 0 0 auto; font-size: .9rem; padding: 0; }
.field-valid { color: #176336 !important; }
.field-invalid { color: #8a1c1c !important; }
dialog { border: 0; border-radius: 16px; box-shadow: 0 18px 70px rgba(14, 39, 76, .24); max-width: min(860px, calc(100% - 32px)); padding: 0; width: 100%; }
dialog::backdrop { background: rgba(10, 28, 58, .42); }
.cnae-dialog { display: grid; gap: 14px; max-height: min(82vh, 760px); overflow: auto; padding: 28px; }
.cnae-dialog h2 { margin: 0; }
.cnae-dialog-heading { align-items: center; display: flex; justify-content: space-between; }
.cnae-close { font-size: 1.8rem; line-height: 1; padding: 4px 10px; }
.cnae-tabs { border-bottom: 1px solid var(--line); display: flex; gap: 8px; }
.cnae-tab { background: transparent; border: 0; border-bottom: 3px solid transparent; color: var(--muted); cursor: pointer; font: inherit; font-weight: 800; padding: 12px 14px; }
.cnae-tab.is-active { border-bottom-color: var(--blue); color: var(--blue); }
.cnae-panel[hidden] { display: none; }
.cnae-breadcrumb { background: var(--blue-soft); border-radius: 8px; color: var(--ink); line-height: 1.45; padding: 10px 12px; }
.cnae-breadcrumb-link { background: transparent; border: 0; color: var(--blue); cursor: pointer; font: inherit; font-weight: 800; padding: 0; }
.cnae-results { display: grid; gap: 8px; max-height: 280px; overflow-y: auto; }
.cnae-result { background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); cursor: pointer; font: inherit; padding: 11px; text-align: left; }
.cnae-result:hover, .cnae-result:focus { border-color: var(--blue); outline: 3px solid var(--blue-soft); }
.company-card legend { font-size: 1.35rem; font-weight: 800; padding: 0 10px 0 0; }
.company-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 18px 0; }
.company-grid-wide { grid-column: 1 / -1; }
.branch-fieldset { border: 0; margin: 0; padding: 0; }
.branch-fieldset legend { color: var(--ink); font-weight: 700; padding: 0; }
.branch-fieldset legend small { color: var(--muted); display: block; font-weight: 400; line-height: 1.35; margin-top: 7px; }
.branch-options { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 7px; }
.branch-option { align-items: center; border: 1px solid #b8c9e1; border-radius: 8px; cursor: pointer; display: flex !important; font-weight: 400 !important; gap: 9px; min-height: 46px; padding: 8px 12px; }
.branch-option:has(input:checked) { background: var(--blue-soft); border-color: var(--blue); }
.branch-option input { accent-color: var(--blue); height: 18px; width: 18px; }
.branch-option:focus-within { border-color: var(--blue); outline: 3px solid var(--blue-soft); }
.field-note { color: var(--muted); line-height: 1.4; margin: 8px 0 0; }
.responsavel-box { background: var(--blue-soft); border-radius: 12px; display: grid; gap: 5px; margin: 18px 0; padding: 16px; }
.responsavel-box span, .responsavel-box small { color: var(--muted); }
.registration-form input[readonly] { background: #f5f8fc; color: var(--ink); }

@media (max-width: 520px) {
  .company-content { padding-inline: 7vw; }
  .company-grid { grid-template-columns: 1fr; }
  .company-grid-wide { grid-column: auto; }
}

@media (min-width: 801px) {
  /* The decorative wave must not create an extra scrollable document area. */
  .bottom-wave { bottom: -1px; position: fixed; z-index: 0; }
}

@media (max-width: 1150px) {
  .site-header { padding-inline: 4vw; }
  .hero, .features { margin-inline: 4vw; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(390px, .9fr); }
  .hero-art img { left: -745px; transform: scale(.83); transform-origin: top left; }
  .feature-card { padding-inline: 23px; }
}

@media (max-width: 800px) {
  .site-header { align-items: flex-start; flex-direction: column; gap: 18px; padding-block: 18px; }
  .header-actions { gap: 10px; width: 100%; }
  .header-button { flex: 1; min-height: 48px; padding-inline: 12px; }
  .hero { display: flex; flex-direction: column; gap: 24px; min-height: 0; padding-block: 48px 20px; }
  .hero-copy { padding-inline: 0; width: 100%; }
  .hero h1 { font-size: clamp(2.8rem, 12vw, 4.4rem); }
  .hero-lead { font-size: 1.25rem; }
  .hero-art { height: 300px; width: 100%; }
  .hero-art img { left: 50%; top: -165px; transform: translateX(-50%) scale(.67); transform-origin: top center; }
  .features { grid-template-columns: repeat(2, 1fr); margin-inline: 4vw; padding-bottom: 70px; }
  .site-footer { position: static; padding: 0 0 16px; }
  .consent-banner { align-items: stretch; flex-direction: column; gap: 14px; }
  .consent-actions { width: 100%; }
  .consent-button { flex: 1; white-space: normal; }
}

@media (max-width: 520px) {
  .brand { font-size: 2.35rem; }
  .brand-mark { height: 38px; width: 38px; }
  .header-actions { flex-direction: column; }
  .header-button { flex: none; width: 100%; }
  .hero { margin-inline: 7vw; }
  .hero h1 { letter-spacing: -2px; }
  .hero-lead { font-size: 1.1rem; }
  .desktop-only { display: none; }
  .hero-art { height: 250px; margin-inline: -7vw; width: calc(100% + 14vw); }
  .hero-art img { top: -137px; transform: translateX(-50%) scale(.55); }
  .features { grid-template-columns: 1fr; margin-inline: 7vw; }
  .feature-card { min-height: auto; padding: 18px 23px 24px; }
  .feature-card h2 { font-size: 1.8rem; }
  .plans-content { margin-top: 28px; padding-inline: 7vw; }
  .plan-card { gap: 28px; grid-template-columns: 1fr; padding: 24px; }
  .plan-builder-content { margin-top: 28px; padding-inline: 7vw; }
  .plan-builder { display: flex; flex-direction: column; }
  .builder-section, .builder-summary { padding: 20px; width: 100%; }
  .period-options { grid-template-columns: 1fr; }
  .builder-summary { position: static; }
  .module-option { flex-wrap: wrap; }
  .module-option-info { flex: 1 1 calc(100% - 78px); min-width: 0; }
  .module-price { margin-left: auto; }
  .module-option em { font-size: .72rem; }
  .module-price { font-size: .9rem; }
  .form-content { margin-top: 28px; padding-inline: 7vw; }
}
