/**
 * Landing pública (/) — tema escuro, CTAs comerciais.
 */

html.landing-html,
html.landing-html body.landing-body {
  background-color: #0b0c10 !important;
  color: #e4e7ec;
}

html.landing-html {
  scroll-behavior: smooth;
}

html.landing-html .theme-toggle {
  display: none !important;
}

body.landing-body .main.landing-main {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 1 1 auto;
  background: transparent !important;
}

/*
 * Logo no header: design-system.css define .logo .logo-img { display: none } e só
 * .app-top-header__logo reverte — a landing usa .landing-top-header__logo.
 */
.landing-top-header__logo.logo .logo-img,
.landing-top-header__logo #header-logo-img {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 45px !important;
  height: 45px !important;
  max-width: 45px !important;
  max-height: 45px !important;
  min-width: 45px !important;
  min-height: 45px !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
}

@media (max-width: 767px) {
  .landing-top-header__logo #header-logo-img,
  .landing-top-header__logo.logo .logo-img {
    width: 32px !important;
    height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
  }
}

/* Header (marcação em base.html) */
.landing-top-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px 24px;
  background: rgba(11, 12, 16, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Mesmo alinhamento que .site-header .logo (página de login): flex + gap entre ícone e «eritvs» */
.landing-top-header__logo.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  text-decoration: none;
}

.landing-top-header__logo .logo-text {
  font-family: 'Roboto Slab', serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1;
  align-self: center;
  color: #f8fafc !important;
}

.landing-top-header__nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.landing-top-header__link {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: #94a3b8;
  text-decoration: none;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.landing-top-header__link:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.06);
}

.landing-top-header__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
  transition: transform 0.15s, box-shadow 0.2s;
}

.landing-top-header__btn--ghost {
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

.landing-top-header__btn--ghost:hover {
  border-color: rgba(78, 96, 255, 0.6);
  box-shadow: 0 0 24px rgba(78, 96, 255, 0.25);
  transform: translateY(-1px);
}

/* Conteúdo */
.landing-wrap {
  overflow-x: hidden;
}

.landing-hero {
  position: relative;
  padding: 48px 24px 88px;
  text-align: center;
}

.landing-hero__glow {
  position: absolute;
  inset: -20% -10% auto;
  height: 70%;
  background: radial-gradient(
    ellipse 60% 50% at 50% 0%,
    rgba(78, 96, 255, 0.35),
    transparent 70%
  );
  pointer-events: none;
}

.landing-hero__inner {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.landing-hero__eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a5b4fc;
  background: rgba(78, 96, 255, 0.15);
  border: 1px solid rgba(129, 140, 248, 0.35);
  border-radius: 999px;
}

.landing-hero h1 {
  margin: 0 0 20px;
  font-family: 'Inter', 'Roboto', system-ui, sans-serif;
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #f8fafc;
}

.landing-hero__lead {
  margin: 0 auto 32px;
  max-width: 640px;
  font-size: 1.125rem;
  line-height: 1.65;
  color: #94a3b8;
}

.landing-hero__cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 56px;
}

.landing-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  color: #fff !important;
  text-decoration: none;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  background: linear-gradient(135deg, #4e60ff 0%, #7c3aed 100%);
  box-shadow: 0 12px 40px rgba(78, 96, 255, 0.35);
  transition: transform 0.15s, box-shadow 0.2s;
}

.landing-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 48px rgba(124, 58, 237, 0.4);
}

.landing-btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  color: #e2e8f0 !important;
  text-decoration: none;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s, background 0.2s;
}

.landing-btn-secondary:hover {
  border-color: rgba(78, 96, 255, 0.5);
  background: rgba(78, 96, 255, 0.12);
}

/*
 * Mockup hero — proporções iguais aos ficheiros em static/images/landing_page/
 * (atualizar se trocar os JPGs). Evita distorção e borrão por escalamento errado.
 * img_start: 3797×1870 | img_end: 3802×1884
 */
.landing-hero__mock {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  /* Palco: proporção média das duas capturas (~2,02:1) */
  aspect-ratio: 7600 / 3754;
  min-height: 0;
  overflow: visible;
}

.landing-hero__mock-card {
  position: absolute;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0c0e14;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  box-sizing: border-box;
  height: auto;
  /* Sem rotação: transform em bitmaps deixa o conteúdo turvo por subpixels */
}

/* img_start.jpg — 3797×1870 px */
.landing-hero__mock-card--back {
  width: 75%;
  aspect-ratio: 3797 / 1870;
  left: 0%;
  top: 15%;
  opacity: 0.92;
}

/* img_end.jpg — 3802×1884 px */
.landing-hero__mock-card--front {
  width: 75%;
  aspect-ratio: 3802 / 1884;
  right: 0;
  bottom: 0;
  background: #0c0e14;
}

/* Imagem inteira visível, centrada, escala uniforme (nitidez melhor que cover+rotate) */
.landing-hero__mock-inner {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 11px;
  background: #0a0c10;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-hero__mock-img {
  display: block;
  margin: 0;
  padding: 0;
  flex: 0 1 auto;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center center;
}

.landing-hero__mock-bar {
  height: 8px;
  width: 40%;
  border-radius: 4px;
  background: linear-gradient(90deg, #4e60ff, #7c3aed);
  opacity: 0.9;
}

.landing-hero__mock-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
  min-height: 0;
}

.landing-hero__mock-chart {
  border-radius: 8px;
  background: rgba(78, 96, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.landing-hero__mock-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.landing-hero__mock-pill {
  height: 36px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
}

.landing-section {
  padding: 64px 24px;
}

.landing-section--tight {
  padding-top: 32px;
}

.landing-section h2 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  text-align: center;
  color: #f1f5f9;
}

.landing-section__intro {
  margin: 0 auto 40px;
  max-width: 560px;
  text-align: center;
  font-size: 1.05rem;
  color: #94a3b8;
  line-height: 1.6;
}

.landing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.landing-card {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}

.landing-card:hover {
  transform: translateY(-4px);
  border-color: rgba(78, 96, 255, 0.35);
}

.landing-card__thumb {
  aspect-ratio: 1024 / 506;
  background: #0a0c10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
}

/* second_card.jpg — 1024×507 */
.landing-card__thumb--507 {
  aspect-ratio: 1024 / 507;
}

.landing-card__img {
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center center;
}

.landing-card__thumb-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 60%;
  width: 100%;
}

.landing-card__bar {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #7c3aed, #4e60ff);
  opacity: 0.85;
}

.landing-card__bar:nth-child(2) {
  height: 75%;
}
.landing-card__bar:nth-child(3) {
  height: 55%;
}

.landing-card__body {
  padding: 20px;
}

.landing-card__body h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: #f8fafc;
}

.landing-card__body p {
  margin: 0;
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.5;
}

.landing-feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

@media (min-width: 900px) {
  .landing-feature {
    grid-template-columns: 1fr 1fr;
  }
  .landing-feature--flip .landing-feature__visual {
    order: -1;
  }
}

.landing-feature__text h2 {
  text-align: left;
  margin-bottom: 16px;
}

.landing-feature__text p {
  margin: 0 0 20px;
  font-size: 1.05rem;
  color: #94a3b8;
  line-height: 1.65;
}

.landing-feature__visual {
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0a0c10;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

/* layer_center.jpg — 1024×616 */
.landing-feature__visual--layer-center {
  aspect-ratio: 1024 / 616;
}

/* third_part.png — 800×603 */
.landing-feature__visual--third-part {
  aspect-ratio: 800 / 603;
}

.landing-feature__visual-inner {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
}

.landing-feature__visual-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center center;
}

.landing-icons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.landing-icon-card {
  padding: 24px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
}

.landing-icon-card svg {
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  color: #818cf8;
}

.landing-icon-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: #f1f5f9;
}

.landing-icon-card p {
  margin: 0;
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.5;
}

.landing-dual-cta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 700px) {
  .landing-dual-cta {
    grid-template-columns: 1fr 1fr;
  }
}

.landing-dual-cta__card {
  padding: 32px 28px;
  border-radius: 16px;
  text-align: center;
}

.landing-dual-cta__card--accent {
  background: linear-gradient(135deg, #2563eb 0%, #4e60ff 50%, #6366f1 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.landing-dual-cta__card--dark {
  background: #12151c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

.landing-dual-cta__card h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.landing-dual-cta__card p {
  margin: 0 0 20px;
  font-size: 14px;
  opacity: 0.92;
  line-height: 1.5;
}

.landing-dual-cta__card .landing-btn-primary {
  background: #fff;
  color: #1e3a8a !important;
  box-shadow: none;
}

.landing-dual-cta__card .landing-btn-primary:hover {
  background: #f1f5f9;
}

.landing-dual-cta__card--dark .landing-btn-secondary {
  border-color: rgba(255, 255, 255, 0.25);
}

#contato.landing-section {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

html.landing-html .site-footer {
  background: #07080c !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 0;
}

html.landing-html .site-footer p {
  color: #94a3b8 !important;
}

html.landing-html .site-footer a {
  color: #c7d2fe !important;
}

.landing-footer-extra {
  margin: 0 0 12px;
  font-size: 14px;
}

.landing-footer-extra a {
  color: #a5b4fc !important;
  font-weight: 600;
  text-decoration: none;
}

.landing-footer-extra a:hover {
  text-decoration: underline;
}

body.landing-modal-open {
  overflow: hidden;
}

.landing-contact-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  box-sizing: border-box;
}

.landing-contact-modal.is-open {
  display: flex;
}

.landing-contact-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.landing-contact-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  max-height: min(90vh, 640px);
  overflow-y: auto;
  margin: 0;
  padding: 0;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(165deg, #141824 0%, #0c0e14 45%, #0a0b10 100%);
  box-shadow:
    0 0 0 1px rgba(78, 96, 255, 0.12),
    0 32px 80px rgba(0, 0, 0, 0.65),
    0 0 120px rgba(78, 96, 255, 0.08);
}

.landing-contact-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 0;
}

.landing-contact-modal__eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a5b4fc;
}

.landing-contact-modal__title {
  margin: 0;
  font-family: 'Inter', 'Roboto', system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.landing-contact-modal__close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: -4px -6px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.landing-contact-modal__close:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(129, 140, 248, 0.35);
  color: #f1f5f9;
}

.landing-contact-modal__lead {
  margin: 0;
  padding: 10px 22px 18px;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.55;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.landing-contact-modal__form {
  display: grid;
  gap: 6px;
  padding: 18px 22px 22px;
}

.landing-contact-modal__label {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}

.landing-contact-modal__label:first-of-type {
  margin-top: 0;
}

.landing-contact-modal__optional {
  font-weight: 500;
  color: #64748b;
}

.landing-contact-modal__form input,
.landing-contact-modal__form textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: 11px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(7, 9, 14, 0.85);
  color: #f8fafc;
  padding: 11px 14px;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.landing-contact-modal__form textarea {
  resize: vertical;
  min-height: 120px;
}

.landing-contact-modal__form input:focus,
.landing-contact-modal__form textarea:focus {
  outline: none;
  border-color: rgba(129, 140, 248, 0.55);
  box-shadow: 0 0 0 3px rgba(78, 96, 255, 0.2);
}

.landing-contact-modal__submit {
  width: 100%;
  margin-top: 14px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.landing-contact-alert {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  width: min(92vw, 520px);
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  box-shadow: 0 14px 36px rgba(2, 6, 23, 0.48);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.landing-contact-alert.is-visible {
  opacity: 1;
}

.landing-contact-alert.is-success {
  color: #d1fae5;
  border-color: rgba(16, 185, 129, 0.55);
  background: rgba(6, 78, 59, 0.92);
}

.landing-contact-alert.is-error {
  color: #fee2e2;
  border-color: rgba(239, 68, 68, 0.55);
  background: rgba(127, 29, 29, 0.92);
}
