/* ==========================================================================
   Faro — landing pública
   AgentWorks suite palette.
   Vanilla CSS, no build step. Shared by / and /login.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

:root {
  /* Palette tokens — the only place with palette hex values */
  --primary: #4C1D95;
  --primary-light: #6D28D9;
  --primary-dark: #2E1065;
  --primary-foreground: #FFFFFF;

  --secondary: #A3E635;
  --secondary-light: #BEF264;
  --secondary-dark: #4D7C0F;
  --secondary-foreground: #1A2E05;

  --background: #FAF8FF;
  --surface: #FFFFFF;
  --foreground: #1B1526;
  --muted: #F1ECFB;
  --muted-foreground: #5F5875;
  --border: #E8E3F5;
  --ring: #6D28D9;

  --success: #2F7D52;
  --warning: #B45309;
  --error: #B3261E;
  --info: #2563EB;

  /* Derived tokens */
  --hero-gradient: linear-gradient(140deg in oklab, var(--primary-dark) 0%, var(--primary) 48%, var(--secondary-dark) 130%);
  --cta-gradient: linear-gradient(120deg in oklab, var(--primary) 0%, var(--secondary) 100%);
  --aside-gradient: linear-gradient(120deg in oklab, var(--primary) 0%, var(--secondary) 100%);

  /* Typography */
  --font-heading: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
                  Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;

  /* Shape */
  --radius-card: 16px;
  --radius-input: 12px;
  --radius-pill: 999px;
  --container: 1200px;

  /* Elevation */
  --shadow-card: 0 12px 32px -18px rgba(15, 23, 42, 0.18);
  --shadow-preview: 0 40px 80px -40px rgba(0, 0, 0, 0.55);
  --shadow-focus: 0 0 0 3px color-mix(in srgb, var(--ring) 35%, transparent);
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease,
              color 150ms ease, box-shadow 150ms ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
  box-shadow: 0 10px 24px -14px color-mix(in srgb, var(--secondary) 70%, transparent);
}

.btn-secondary:hover { background: var(--secondary-light); }

.btn-ghost-white {
  background: transparent;
  color: var(--primary-foreground);
  border-color: color-mix(in srgb, var(--primary-foreground) 32%, transparent);
}

.btn-ghost-white:hover {
  background: color-mix(in srgb, var(--primary-foreground) 10%, transparent);
}

.btn-outline-white {
  background: transparent;
  color: var(--primary-foreground);
  border-color: color-mix(in srgb, var(--primary-foreground) 55%, transparent);
}

.btn-outline-white:hover {
  background: color-mix(in srgb, var(--primary-foreground) 12%, transparent);
}

.btn-white {
  background: var(--surface);
  color: var(--primary-dark);
}

.btn-white:hover { background: color-mix(in srgb, var(--surface) 88%, var(--secondary-light)); }

/* --- Hero --------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--hero-gradient);
  color: var(--primary-foreground);
  padding-bottom: 4.5rem;
}

.blob {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
}

.blob-top {
  top: -140px;
  right: -120px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, color-mix(in srgb, var(--secondary) 55%, transparent) 0%, transparent 70%);
  filter: blur(40px);
}

.blob-bottom {
  bottom: -180px;
  left: -140px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, color-mix(in srgb, var(--primary-foreground) 18%, transparent) 0%, transparent 70%);
  filter: blur(40px);
}

.nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.25rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
}

.brand-product { color: var(--secondary-light); }

.nav-links {
  display: none;
  align-items: center;
  gap: 1.75rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a {
  color: color-mix(in srgb, var(--primary-foreground) 82%, transparent);
  transition: color 150ms ease;
}

.nav-links a:hover { color: var(--primary-foreground); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
  padding-top: 2.5rem;
}

.hero-copy { max-width: 36rem; }

.badge-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.9rem;
  border: 1px solid color-mix(in srgb, var(--primary-foreground) 26%, transparent);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--primary-foreground) 10%, transparent);
  color: var(--primary-foreground);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero h1 {
  margin-top: 1.25rem;
  font-size: 2.4rem;
  line-height: 1.08;
}

.accent-text { color: var(--secondary-light); }

.hero-subtitle {
  margin-top: 1.1rem;
  max-width: 32rem;
  font-size: 1.05rem;
  color: color-mix(in srgb, var(--primary-foreground) 84%, transparent);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.9rem;
}

/* --- Preview card (glass) ---------------------------------------------- */

.preview-card {
  width: 100%;
  max-width: 26rem;
  justify-self: start;
  padding: 1.5rem;
  border-radius: var(--radius-card);
  border: 1px solid color-mix(in srgb, var(--primary-foreground) 18%, transparent);
  background: color-mix(in srgb, var(--primary-dark) 55%, transparent);
  box-shadow: var(--shadow-preview);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.preview-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.preview-head h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

.preview-note {
  font-size: 0.75rem;
  color: color-mix(in srgb, var(--primary-foreground) 65%, transparent);
}

.preview-list { display: grid; gap: 1rem; }

.preview-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.preview-label { color: color-mix(in srgb, var(--primary-foreground) 82%, transparent); }
.preview-value { font-weight: 700; font-variant-numeric: tabular-nums; }

.preview-bar {
  display: block;
  height: 0.45rem;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--primary-foreground) 16%, transparent);
  overflow: hidden;
}

.preview-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--secondary-light);
}

/* --- Features ----------------------------------------------------------- */

.section { padding: 5rem 0 1rem; }

.section-head {
  max-width: 40rem;
  margin-bottom: 2.5rem;
}

.section-kicker {
  display: inline-block;
  margin-bottom: 0.7rem;
  color: var(--secondary-dark);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-head h2 { font-size: 1.9rem; }

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.feature-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
}

.icon-chip svg { width: 26px; height: 26px; }

.feature-card h3 {
  margin-top: 1.1rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.feature-card p {
  margin-top: 0.45rem;
  color: var(--muted-foreground);
  font-size: 0.95rem;
}

/* --- CTA band ----------------------------------------------------------- */

.cta-band {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 4rem 0 5rem;
  padding: 2rem 1.5rem;
  border-radius: var(--radius-card);
  background: var(--cta-gradient);
  color: var(--primary-foreground);
  box-shadow: 0 24px 48px -32px color-mix(in srgb, var(--secondary-dark) 80%, transparent);
}

.cta-copy h2 { font-size: 1.6rem; }

.cta-copy p {
  margin-top: 0.5rem;
  color: var(--primary-foreground);
  font-size: 0.98rem;
}

/* --- Footer ------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 2.5rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.brand-dark { color: var(--foreground); }
.brand-dark .brand-product { color: var(--secondary-dark); }

.footer-brand p {
  margin-top: 0.6rem;
  color: var(--muted-foreground);
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  font-size: 0.92rem;
  color: var(--muted-foreground);
}

.footer-links a:hover { color: var(--primary); }

.footer-copy {
  color: var(--muted-foreground);
  font-size: 0.85rem;
}

/* --- Login -------------------------------------------------------------- */

.login-page { background: var(--surface); }

.login-layout {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}

.login-aside {
  display: none;
  position: relative;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  padding: 3rem;
  overflow: hidden;
  background: var(--aside-gradient);
  color: var(--primary-foreground);
}

.login-aside::after {
  content: "";
  position: absolute;
  top: -160px;
  right: -160px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--primary-foreground) 18%, transparent) 0%, transparent 70%);
  filter: blur(30px);
  pointer-events: none;
}

.login-aside > * { position: relative; z-index: 1; }

.login-aside h2 {
  max-width: 18ch;
  font-size: 2rem;
}

.benefits { display: grid; gap: 1rem; }

.benefit {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 1rem;
  color: color-mix(in srgb, var(--primary-foreground) 92%, transparent);
}

.benefit-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary-foreground) 20%, transparent);
  color: var(--primary-foreground);
}

.benefit-check svg { width: 16px; height: 16px; }

.login-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  background: var(--background);
}

.login-mobile-brand {
  display: inline-flex;
  align-self: flex-start;
  margin-bottom: 2rem;
  color: var(--foreground);
}

.login-card {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 2.5rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: 0 24px 48px -32px color-mix(in srgb, var(--primary-dark) 45%, transparent);
}

.login-card h1 {
  font-size: 1.8rem;
}

.login-intro {
  margin-top: 0.5rem;
  color: var(--muted-foreground);
  font-size: 0.95rem;
}

.login-form {
  display: grid;
  gap: 1.1rem;
  margin-top: 1.9rem;
}

.field { display: grid; gap: 0.4rem; }

.field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--foreground);
}

.field input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: var(--surface);
  color: var(--foreground);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field input::placeholder { color: color-mix(in srgb, var(--muted-foreground) 75%, transparent); }

.field input:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: var(--shadow-focus);
}

.field-hint {
  color: var(--muted-foreground);
  font-size: 0.8rem;
}

.form-error {
  padding: 0.65rem 0.85rem;
  border: 1px solid color-mix(in srgb, var(--error) 40%, transparent);
  border-radius: var(--radius-input);
  background: color-mix(in srgb, var(--error) 8%, transparent);
  color: var(--error);
  font-size: 0.88rem;
  font-weight: 500;
}

.btn-block { width: 100%; }

.login-back {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted-foreground);
}

.login-back a {
  color: var(--secondary-dark);
  font-weight: 600;
}

.login-back a:hover { text-decoration: underline; }

/* --- Responsive --------------------------------------------------------- */

@media (min-width: 640px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr auto; align-items: start; }
  .footer-copy { grid-column: 1 / -1; }
  .cta-band { padding: 2rem 3rem; }
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-actions { margin-left: 0; }

  .hero-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 3rem;
    padding-top: 4rem;
  }

  .hero { padding-bottom: 6rem; }
  .hero h1 { font-size: 3.4rem; }
  .hero-subtitle { font-size: 1.15rem; }
  .preview-card { justify-self: end; }

  .section-head h2 { font-size: 2.2rem; }
  .cta-band { flex-direction: row; align-items: center; }

  .login-layout { grid-template-columns: 1fr 1fr; }
  .login-aside { display: flex; }
  .login-mobile-brand { display: none; }
  .login-main { padding: 3rem; }
}

@media (min-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
}
