/* FX SAM Chatbot public pages shared polish */

:root {
  --fx-bg: #020617;
  --fx-text: #f8fafc;
  --fx-muted: rgba(226,232,240,.72);
  --fx-soft: rgba(148,163,184,.16);
  --fx-blue: #2563eb;
  --fx-cyan: #06b6d4;
  --fx-green: #22c55e;
  --fx-amber: #f59e0b;
  --fx-danger: #ef4444;
}

html {
  scroll-behavior: smooth;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
}

a,
button,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: rgba(37, 99, 235, .45);
  color: #fff;
}

/* Better keyboard accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(103, 232, 249, .55);
  outline-offset: 3px;
}

/* Shared premium button behavior */
.btn,
button {
  will-change: transform;
}

.btn:active,
button:active {
  transform: translateY(0) scale(.99);
}

/* Shared responsive helpers */
.container {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Prevent long text from breaking mobile layouts */
.card,
.feature-card,
.pricing-card,
.step-card,
.proof-card,
.faq-card,
.hero-panel,
.form-panel,
.login-panel,
.subscription-plan-card,
.upgrade-plan-card {
  overflow-wrap: anywhere;
}

/* Shared nav polish */
.nav {
  box-shadow: 0 10px 40px rgba(2, 6, 23, .18);
}

.brand-mark {
  flex: 0 0 auto;
}

/* Shared forms */
input,
select,
textarea {
  color-scheme: dark;
}

input[type="file"] {
  cursor: pointer;
}

/* Shared glass cards */
.feature-card,
.pricing-card,
.step-card,
.proof-card,
.faq-card,
.hero-panel,
.form-panel,
.login-panel,
.product-preview,
.compare-wrap,
.content {
  backdrop-filter: blur(14px);
}

/* Shared CTA hover */
.btn.primary:hover,
button.primary:hover {
  filter: brightness(1.06);
}

/* Make tables mobile-safe */
.table-wrap,
.compare-wrap {
  -webkit-overflow-scrolling: touch;
}

/* Reduce motion accessibility */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* Mobile global polish */
@media (max-width: 620px) {
  body {
    overflow-x: hidden;
  }

  .nav-actions {
    flex-wrap: wrap;
  }

  .btn,
  button {
    min-height: 46px;
  }
}

/* Large desktop: use screen space better */
@media (min-width: 1600px) {
  .container {
    width: min(1640px, calc(100% - 40px)) !important;
  }
}

/* Public legal / content pages */
.legal-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(37,99,235,.25), transparent 34rem),
    radial-gradient(circle at top right, rgba(6,182,212,.18), transparent 34rem),
    var(--fx-bg);
  color: var(--fx-text);
}

.legal-page a {
  color: inherit;
  text-decoration: none;
}

.legal-page .container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.legal-page .nav {
  border-bottom: 1px solid rgba(148,163,184,.12);
  background: rgba(2,6,23,.72);
  backdrop-filter: blur(18px);
}

.legal-page .nav-inner {
  min-height: 76px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.legal-page .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 950;
  font-size: 21px;
}

.legal-page .brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg,var(--fx-blue),var(--fx-cyan));
}

.legal-page .links {
  display: flex;
  gap: 16px;
  color: var(--fx-muted);
  font-weight: 850;
  flex-wrap: wrap;
}

.legal-hero {
  padding: 70px 0 24px;
  text-align: center;
}

.legal-eyebrow {
  display: inline-flex;
  color: #bfdbfe;
  border: 1px solid rgba(96,165,250,.26);
  background: rgba(37,99,235,.12);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 13px;
  margin-bottom: 18px;
}

.legal-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(40px,6vw,70px);
  line-height: .95;
  letter-spacing: -.06em;
}

.legal-lead {
  color: var(--fx-muted);
  font-size: 17px;
  line-height: 1.7;
  max-width: 820px;
  margin: 0 auto;
}

.legal-content {
  border: 1px solid var(--fx-soft);
  border-radius: 30px;
  background: rgba(15,23,42,.56);
  padding: 34px;
  margin: 34px auto 72px;
  box-shadow: 0 24px 70px rgba(2,6,23,.22);
  max-width: 980px;
}

.legal-content h2 {
  margin: 28px 0 10px;
  letter-spacing: -.035em;
}

.legal-content p,
.legal-content li {
  color: var(--fx-muted);
  line-height: 1.75;
}

.legal-note {
  border: 1px solid rgba(96,165,250,.24);
  background: rgba(37,99,235,.10);
  border-radius: 20px;
  padding: 16px;
  color: #bfdbfe !important;
}

.legal-footer {
  border-top: 1px solid rgba(148,163,184,.12);
  padding: 28px 0;
  color: rgba(226,232,240,.64);
  font-size: 13px;
}

@media (max-width: 700px) {
  .legal-page .links {
    display: none;
  }

  .legal-page .nav-inner {
    height: auto;
    padding: 14px 0;
  }

  .legal-content {
    padding: 24px;
  }

  .legal-page .container {
    width: min(100% - 18px, 1200px);
  }
}

/* Legal pages typography fix */
.legal-page {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.legal-page h1,
.legal-page h2,
.legal-page h3,
.legal-page .brand,
.legal-page .links {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

.legal-page .brand {
  letter-spacing: -.03em;
}

.legal-page .links a {
  transition: color .16s ease, transform .16s ease;
}

.legal-page .links a:hover {
  color: #67e8f9;
  transform: translateY(-1px);
}

.legal-hero {
  min-height: 360px;
  display: flex;
  align-items: center;
}

.legal-hero h1 {
  max-width: 1160px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 950;
}

.legal-content {
  font-size: 16px;
}

.legal-content h2 {
  color: #f8fafc;
  font-weight: 950;
}

.legal-content ul {
  padding-left: 22px;
}

.legal-content li {
  margin: 8px 0;
}

@media (min-width: 1300px) {
  .legal-content {
    max-width: 1120px;
  }
}

@media (max-width: 700px) {
  .legal-hero {
    min-height: auto;
    padding-top: 52px;
  }

  .legal-hero h1 {
    font-size: 40px;
  }
}

/* Public contact page */
.contact-page {
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37,99,235,.25), transparent 34rem),
    radial-gradient(circle at top right, rgba(6,182,212,.18), transparent 34rem),
    var(--fx-bg);
  color: var(--fx-text);
}

.contact-page a {
  color: inherit;
  text-decoration: none;
}

.contact-wrap {
  padding: 76px 0 82px;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(460px, .9fr) minmax(520px, 1.1fr);
  gap: clamp(24px, 4vw, 60px);
  align-items: start;
}

.contact-hero h1 {
  margin: 18px 0;
  font-size: clamp(42px, 5vw, 72px);
  line-height: .94;
  letter-spacing: -.06em;
  font-weight: 950;
}

.contact-benefits {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.contact-benefit {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(148,163,184,.14);
  background: rgba(15,23,42,.48);
  border-radius: 20px;
  padding: 14px 16px;
}

.contact-benefit span {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: rgba(37,99,235,.16);
  border: 1px solid rgba(96,165,250,.18);
}

.contact-benefit strong {
  color: #f8fafc;
}

.contact-card {
  border: 1px solid rgba(148,163,184,.16);
  border-radius: 34px;
  background:
    radial-gradient(circle at top left, rgba(37,99,235,.14), transparent 34%),
    rgba(15,23,42,.58);
  padding: 30px;
  box-shadow: 0 26px 80px rgba(2,6,23,.30);
  backdrop-filter: blur(14px);
}

.contact-card h2 {
  margin: 0 0 8px;
  font-size: 32px;
  letter-spacing: -.04em;
}

.contact-muted {
  color: var(--fx-muted);
  line-height: 1.6;
  margin: 0 0 20px;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: rgba(226,232,240,.92);
  font-weight: 900;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,.22);
  background: rgba(2,6,23,.45);
  color: #f8fafc;
  padding: 12px 14px;
  font: inherit;
  outline: none;
}

.contact-form input,
.contact-form select {
  min-height: 48px;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: rgba(96,165,250,.74);
  box-shadow: 0 0 0 4px rgba(37,99,235,.14);
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0 20px;
  color: #fff !important;
  font-weight: 950;
  cursor: pointer;
  background: linear-gradient(135deg, var(--fx-blue), var(--fx-cyan));
  box-shadow: 0 18px 42px rgba(37,99,235,.34);
}

.contact-error {
  border: 1px solid rgba(239,68,68,.32);
  background: rgba(239,68,68,.12);
  color: #fecaca;
  border-radius: 18px;
  padding: 13px 15px;
  margin-bottom: 16px;
  font-weight: 850;
}

.contact-success {
  text-align: center;
  padding: 28px 10px;
}

.contact-success p {
  color: var(--fx-muted);
  line-height: 1.6;
  margin-bottom: 22px;
}

@media (max-width: 980px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .contact-wrap {
    padding-top: 48px;
  }

  .contact-card {
    padding: 22px;
    border-radius: 26px;
  }

  .contact-hero h1 {
    font-size: 42px;
  }
}
