/* ============================================================
   legal-ia.carreira.cloud — estilos
   CSS puro, sem frameworks. Tokens da marca IA Appliance.
   ============================================================ */

:root {
  --brand-primary: #1d4ed8;
  --brand-primary-dark: #1e40af;
  --brand-accent: #3b82f6;
  --brand-50: #eff6ff;
  --brand-100: #dbeafe;

  --surface-0: #ffffff;
  --surface-1: #f8fafc;
  --surface-2: #f1f5f9;
  --surface-3: #e2e8f0;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --border-subtle: #e2e8f0;
  --border-default: #cbd5e1;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.10);
  --maxw: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html.dark {
  --brand-primary: #3b82f6;
  --brand-primary-dark: #2563eb;
  --brand-accent: #60a5fa;
  --brand-50: #172554;
  --brand-100: #1e3a8a;

  --surface-0: #0b1220;
  --surface-1: #0f172a;
  --surface-2: #15203a;
  --surface-3: #1e293b;

  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-inverse: #0b1220;

  --border-subtle: #1e293b;
  --border-default: #334155;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
}

/* ----------------------------- Base ----------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--surface-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.2; color: var(--text-primary); margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); font-weight: 750; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 1rem; color: var(--text-secondary); }
a { color: var(--brand-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand-primary); color: #fff; padding: 0.6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.eyebrow {
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem;
  font-weight: 700; color: var(--brand-primary); margin: 0 0 0.6rem;
}
.section-lead { font-size: 1.1rem; color: var(--text-muted); max-width: 56ch; margin-bottom: 2rem; }

/* ----------------------------- Botões ----------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-weight: 650; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid transparent; transition: background .15s, color .15s, transform .05s, border-color .15s;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.9rem; }
.btn-lg { padding: 0.8rem 1.5rem; font-size: 1.02rem; }
.btn-primary { background: var(--brand-primary); color: #fff; }
.btn-primary:hover { background: var(--brand-primary-dark); }
.btn-ghost { background: transparent; color: var(--text-primary); border-color: var(--border-default); }
.btn-ghost:hover { background: var(--surface-2); }

/* ----------------------------- Header ----------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface-0) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}
.header-inner { display: flex; align-items: center; gap: 1rem; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 800; color: var(--text-primary); }
.brand:hover { text-decoration: none; }
.brand-name { font-size: 1.05rem; letter-spacing: -0.01em; }
.brand-accent { color: var(--brand-primary); }

.main-nav { display: flex; gap: 1.5rem; margin-left: 1rem; }
.main-nav a { color: var(--text-secondary); font-weight: 550; font-size: 0.95rem; }
.main-nav a:hover { color: var(--brand-primary); text-decoration: none; }

.header-actions { display: flex; align-items: center; gap: 0.6rem; margin-left: auto; }

.lang-switcher { display: inline-flex; border: 1px solid var(--border-default); border-radius: 999px; overflow: hidden; }
.lang-switcher button {
  background: transparent; border: 0; padding: 0.35rem 0.7rem; font-size: 0.82rem; font-weight: 700;
  color: var(--text-muted); cursor: pointer;
}
.lang-switcher button.active { background: var(--brand-primary); color: #fff; }

.theme-toggle {
  width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--border-default);
  background: var(--surface-1); cursor: pointer; font-size: 1rem; color: var(--text-secondary);
  display: inline-flex; align-items: center; justify-content: center;
}
.theme-toggle:hover { background: var(--surface-2); }
.theme-icon-dark { display: none; }
html.dark .theme-icon-light { display: none; }
html.dark .theme-icon-dark { display: inline; }

.menu-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: 6px; }
.menu-toggle span { width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; }

/* ----------------------------- Secções ----------------------------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-alt { background: var(--surface-1); }
.section h2 { margin-bottom: 0.5rem; }

/* ----------------------------- Hero ----------------------------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5.5rem);
  background:
    radial-gradient(900px 520px at 85% -15%, color-mix(in srgb, var(--brand-accent) 24%, transparent), transparent),
    radial-gradient(700px 400px at 0% 110%, color-mix(in srgb, var(--brand-primary) 12%, transparent), transparent),
    var(--surface-0);
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.hero-copy { max-width: 36rem; }
.hero h1 { margin-bottom: 1rem; }
.hero-sub { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--text-secondary); max-width: 60ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.8rem 0 1.5rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 1.5rem; padding-top: 0.5rem; }
.hero-badges li { color: var(--text-muted); font-size: 0.95rem; }
.hero-badges strong { color: var(--brand-primary); font-size: 1.25rem; font-weight: 800; margin-right: 0.3rem; }
.hero-media { position: relative; }

/* ----------------------------- Imagens / Media ----------------------------- */
.media-frame {
  position: relative; margin: 0; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-md);
  border: 1px solid var(--border-subtle); background: var(--surface-2);
}
.media-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, color-mix(in srgb, var(--brand-primary) 22%, transparent));
}
.hero-media .media-frame { aspect-ratio: 4 / 3; }
.media-badge {
  position: absolute; bottom: -0.9rem; left: -0.9rem; z-index: 2;
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--surface-0); border: 1px solid var(--border-subtle);
  border-radius: 999px; padding: 0.55rem 1.1rem 0.55rem 0.85rem; box-shadow: var(--shadow-md);
}
.media-badge strong {
  font-size: 1.4rem; font-weight: 800; color: var(--brand-primary); line-height: 1;
}
.media-badge span { font-size: 0.82rem; color: var(--text-muted); line-height: 1.2; }
.hero-media .media-badge { right: -0.6rem; left: auto; bottom: auto; top: -0.9rem; }

/* ----------------------------- Grids / Cards ----------------------------- */
.grid { display: grid; gap: 1.1rem; margin-top: 2rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--surface-0); border: 1px solid var(--border-subtle);
  border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--brand-primary) 35%, var(--border-subtle)); }
.section-alt .card { background: var(--surface-0); }
.card h3 { margin-bottom: 0.4rem; }
.card p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.feature-icon {
  width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: var(--brand-50); font-size: 1.4rem; margin-bottom: 0.9rem;
}

/* ----------------------------- Solução / Soberania ----------------------------- */
.solution-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem; align-items: center; }
.check-list li, .cross-list li {
  position: relative; padding-left: 1.8rem; margin-bottom: 0.7rem; color: var(--text-secondary);
}
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0; color: #fff; font-size: 0.7rem; font-weight: 800;
  width: 1.15rem; height: 1.15rem; border-radius: 999px; background: var(--brand-primary);
  display: flex; align-items: center; justify-content: center;
}
.cross-list li::before {
  content: "—"; position: absolute; left: 0; top: 0; color: var(--text-muted); font-weight: 800;
}
.honesty { background: var(--surface-2); border: 1px solid var(--border-subtle); border-radius: var(--radius); padding: 1.5rem; }
.honesty h3 { margin-bottom: 0.9rem; }

.solution-seal { display: flex; justify-content: center; }
.solution-media { position: relative; }
.solution-media .media-frame { aspect-ratio: 4 / 3; }
.seal {
  width: 200px; height: 200px; border-radius: 999px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; color: #fff;
  background: linear-gradient(145deg, var(--brand-primary), var(--brand-primary-dark));
  box-shadow: var(--shadow-md);
}
.seal-big { font-size: 3.2rem; font-weight: 800; line-height: 1; }
.seal-label { font-size: 0.85rem; margin-top: 0.5rem; opacity: 0.95; }

/* ----------------------------- Diferenciador ----------------------------- */
.sov-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.sov-media { position: relative; position: sticky; top: 90px; }
.sov-media .media-frame { aspect-ratio: 3 / 4; }
.sov-content > .eyebrow { margin-top: 0.2rem; }
.sov-content .honesty { margin-top: 1.8rem; }

/* ----------------------------- Steps ----------------------------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; margin-top: 2rem; }
.steps li {
  background: var(--surface-0); border: 1px solid var(--border-subtle); border-radius: var(--radius);
  padding: 1.4rem; box-shadow: var(--shadow-sm);
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 999px; background: var(--brand-primary); color: #fff; font-weight: 800; margin-bottom: 0.8rem;
}
.steps h3 { margin-bottom: 0.3rem; }
.steps p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }

/* ----------------------------- KPIs ----------------------------- */
.results { background: var(--brand-primary); color: #fff; }
.results h2 { color: #fff; text-align: center; margin-bottom: 2rem; }
.kpi-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 2.5rem; }
.kpi { display: flex; flex-direction: column; align-items: center; min-width: 120px; }
.kpi-value { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; line-height: 1; }
.kpi-label { margin-top: 0.4rem; font-size: 0.9rem; opacity: 0.92; }

/* ----------------------------- Pricing ----------------------------- */
.pricing-grid { margin-top: 2rem; align-items: stretch; }
.price-card {
  position: relative; display: flex; flex-direction: column; text-align: center; background: var(--surface-0);
  border: 1px solid var(--border-subtle); border-radius: var(--radius); padding: 2.2rem 1.8rem;
  box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease;
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.price-card.featured { border-color: var(--brand-primary); box-shadow: var(--shadow-md); }
.price-badge {
  position: absolute; top: -0.8rem; left: 50%; transform: translateX(-50%);
  background: var(--brand-primary); color: #fff; font-size: 0.72rem; font-weight: 700;
  padding: 0.3rem 0.85rem; border-radius: 999px; letter-spacing: 0.02em; white-space: nowrap;
}
.price-badge.soft { background: var(--surface-3); color: var(--text-secondary); }
.price-name { font-size: 1.3rem; margin-bottom: 0.25rem; }
.price-tag { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 1rem; }
.price-value { font-size: 2.4rem; font-weight: 800; color: var(--text-primary); margin: 0.2rem 0; line-height: 1.1; }
.price-note { color: var(--text-muted); margin-bottom: 1.4rem; font-size: 0.9rem; }
.price-card .check-list { text-align: left; margin: 0 0 1.6rem; flex: 1 1 auto; }
.price-card .btn { margin-top: auto; align-self: center; }
.price-foot { text-align: center; margin-top: 1.8rem; color: var(--text-muted); font-size: 0.95rem; }

/* Callout SaaS — advogados independentes / pequenos escritórios */
.solo-note {
  display: grid; grid-template-columns: 168px 1fr; gap: 1.6rem; align-items: center;
  margin-top: 2.5rem; padding: 1.4rem; border: 1px solid var(--border-subtle);
  border-radius: var(--radius); background: var(--surface-1); box-shadow: var(--shadow-sm);
}
.solo-img { width: 168px; height: 168px; object-fit: cover; object-position: center top; border-radius: var(--radius-sm); }
.solo-note h3 { margin-bottom: 0.3rem; }
.solo-note p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 0.9rem; }

/* ----------------------------- Contacto ----------------------------- */
.section-cta { background: var(--surface-1); }
.cta-inner { max-width: 680px; margin: 0 auto; text-align: center; }
.contact-form { text-align: left; margin-top: 1.5rem; display: grid; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contact-form label { display: grid; gap: 0.35rem; font-size: 0.9rem; font-weight: 600; color: var(--text-secondary); }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 0.7rem 0.85rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border-default); background: var(--surface-0); color: var(--text-primary);
  font-family: inherit; font-size: 0.95rem;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--brand-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 25%, transparent);
}
.contact-form .btn { justify-self: start; }
.form-hint { font-size: 0.82rem; color: var(--text-muted); margin: 0; }

/* ----------------------------- Footer ----------------------------- */
.site-footer { border-top: 1px solid var(--border-subtle); background: var(--surface-0); padding: 2rem 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; justify-content: space-between; }
.footer-note { margin: 0; color: var(--text-muted); font-size: 0.9rem; }
.footer-copy { margin: 0; color: var(--text-muted); font-size: 0.9rem; }

/* ----------------------------- Responsivo ----------------------------- */
@media (max-width: 860px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .solution-inner { grid-template-columns: 1fr; }
  .solution-seal { order: -1; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { max-width: 520px; }
  .hero-media .media-badge { left: -0.6rem; right: auto; }
  .sov-grid { grid-template-columns: 1fr; }
  .sov-media { position: static; max-width: 460px; }
  .sov-media .media-frame { aspect-ratio: 16 / 10; }
  .solo-note { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .solo-img { width: 140px; height: 140px; }

  .menu-toggle { display: flex; }
  .main-nav {
    position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; margin: 0;
    background: var(--surface-0); border-bottom: 1px solid var(--border-subtle);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .site-header.nav-open .main-nav { max-height: 320px; }
  .main-nav a { padding: 0.9rem 1.25rem; border-top: 1px solid var(--border-subtle); }
  .header-actions .btn-sm { display: none; }
}

@media (max-width: 520px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .main-nav { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
