/* ==========================================================================
   XNomina — marketing site
   Self-contained, no build step, no external deps. System font stack.
   Family aesthetic (ai.xima.com.ar / Xima AI hub): dark theme, restrained,
   accent used sparingly. Accent swapped from the family blue (#3b82f6) to
   XNomina EMERALD (#10b981 primary / #047857 deep) — matches the app's
   payslip wordmark gradient.
   ========================================================================== */

:root {
  /* Family dark tokens (kept identical to ai.xima.com.ar so XNomina reads as
     part of the Xima family) */
  --bg: #0b0d12;
  --surface: #141823;
  --surface-2: #11151f;
  --text: #e6e8ec;
  --text-muted: #8c93a3;
  --border: #1f2433;

  /* Accent — XNomina emerald (was the family blue) */
  --accent: #10b981;          /* primary emerald */
  --accent-deep: #047857;     /* deep emerald (gradient end, hovers, headings) */
  --accent-bright: #34d399;   /* lighter emerald for text-on-dark legibility */
  --accent-soft: rgba(16, 185, 129, 0.12);
  --accent-line: rgba(16, 185, 129, 0.35);

  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto,
    system-ui, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

a { color: var(--accent-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

h1, h2, h3 { letter-spacing: -0.01em; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow { max-width: 760px; }

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #04130d;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius) 0;
  font-weight: 600;
  z-index: 200;
}
.skip-link:focus { left: 0; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------------------------------------------------------------- Header -- */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 13, 18, 0.82);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Wordmark: emerald payslip mark + "XNomina" (X in emerald) */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand svg { display: block; width: 30px; height: 30px; border-radius: 7px; }
.brand .wordmark .x { color: var(--accent); }

.header-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.header-links {
  display: flex;
  gap: 20px;
  font-size: 14px;
}
.header-links a { color: #a7afbd; } /* a11y: ~5:1 sobre #0b0d12 (era --text-muted 4.2:1) */
.header-links a:hover { color: var(--text); text-decoration: none; }
@media (max-width: 720px) {
  .header-links { display: none; }
}

.lang-switch { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.lang-switch a { color: #a7afbd; } /* a11y: ~5:1 sobre #0b0d12 */
.lang-switch a + a::before { content: " · "; color: var(--border); }
.lang-switch a.active { color: var(--text); font-weight: 600; pointer-events: none; }
.lang-switch a:hover { text-decoration: none; color: var(--text); }

/* ----------------------------------------------------------------- Hero --- */
.hero {
  padding: 92px 0 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  /* subtle emerald radial wash behind the headline */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(620px 320px at 50% -8%, rgba(16, 185, 129, 0.14), transparent 70%);
  pointer-events: none;
}
.hero > .container { position: relative; }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-bright);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(34px, 5.2vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 auto 22px;
  max-width: 14ch;
}
.hero h1 .accent {
  color: var(--accent-bright);
  background: linear-gradient(90deg, var(--accent-bright), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p.sub {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 32px;
}
.hero .trust {
  margin-top: 30px;
  font-size: 13px;
  color: var(--text-muted);
}
.hero .trust .sep { color: var(--border); margin: 0 8px; }

.cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ----------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s, opacity 0.15s;
}
.btn-primary {
  background: var(--accent);
  color: #04130d;
  box-shadow: 0 1px 2px rgba(4, 120, 87, 0.4), 0 8px 24px rgba(16, 185, 129, 0.16);
}
.btn-primary:hover { background: var(--accent-bright); text-decoration: none; transform: translateY(-1px); }
.btn-ghost {
  border-color: var(--border);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-bright); text-decoration: none; }

/* ----------------------------------------------------------------- Sections */
section { padding: 64px 0; }
section.alt {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head { max-width: 720px; margin: 0 auto 40px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.section-head .eyebrow { margin-bottom: 16px; }
.section-head h2 {
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.18;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}
.section-head p.lead {
  font-size: 17px;
  color: var(--text-muted);
  margin: 0;
}

/* ----------------------------------------------------------------- Problem - */
.problem-points {
  list-style: none;
  padding: 0;
  margin: 36px auto 0;
  max-width: 820px;
  display: grid;
  gap: 14px;
}
.problem-points li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 18px;
  color: var(--text-muted);
  font-size: 15px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.problem-points li .x {
  color: var(--accent-bright);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ----------------------------------------------------------------- Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.feature:hover {
  border-color: var(--accent-line);
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.30);
}
.feature .ic {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent-bright);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.feature .ic svg { width: 22px; height: 22px; }
.feature h3 {
  font-size: 17px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.feature p { color: var(--text-muted); margin: 0; font-size: 14.5px; }
.feature.is-ai {
  border-style: dashed;
  border-color: var(--accent-line);
  background: linear-gradient(180deg, var(--surface) 0%, rgba(16, 185, 129, 0.05) 100%);
}
.feature .opt-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-bright);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

/* --------------------------------------------------------------- How it works */
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
  counter-reset: step;
}
.how-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  position: relative;
}
.how-step .step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent-bright);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 16px;
}
.how-step h3 { font-size: 16.5px; margin: 0 0 8px; }
.how-step p { color: var(--text-muted); margin: 0; font-size: 14.5px; }

/* ---------------------------------------------------------------- Compliance */
.compliance-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 860px) {
  .compliance-layout { grid-template-columns: 1fr; gap: 28px; }
}
.compliance-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.compliance-points li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 15px;
  color: var(--text);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.compliance-points li .check {
  color: var(--accent-bright);
  font-weight: 700;
  flex-shrink: 0;
}

/* Mock payslip card — the visual anchor for the compliance section */
.payslip-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.payslip-card .ps-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.payslip-card .ps-title { font-weight: 600; font-size: 14px; }
.payslip-card .ps-status {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-bright);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  padding: 3px 9px;
  border-radius: 999px;
}
.payslip-card .ps-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 7px 0;
  color: var(--text-muted);
}
.payslip-card .ps-row .ps-val { color: var(--text); font-variant-numeric: tabular-nums; }
.payslip-card .ps-row.ps-neg .ps-val { color: #fca5a5; }
.payslip-card .ps-total {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-weight: 700;
  font-size: 15px;
}
.payslip-card .ps-total .ps-val { color: var(--accent-bright); font-variant-numeric: tabular-nums; }
.payslip-card .ps-foot {
  margin-top: 14px;
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.payslip-card .ps-foot svg { width: 13px; height: 13px; color: var(--accent-bright); }

/* ------------------------------------------------------------------- FAQ --- */
.faq {
  max-width: 800px;
  margin: 0 auto;
}
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq details[open] { border-color: var(--accent-line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev {
  flex-shrink: 0;
  color: var(--accent-bright);
  transition: transform 0.18s;
  font-size: 18px;
  line-height: 1;
}
.faq details[open] summary .chev { transform: rotate(45deg); }
.faq details > div {
  padding: 0 20px 18px;
  color: var(--text-muted);
  font-size: 15px;
}

/* --------------------------------------------------------------- Final CTA -- */
.cta-final {
  background:
    radial-gradient(700px 300px at 50% 0%, rgba(16, 185, 129, 0.12), transparent 70%),
    var(--surface-2);
  border-top: 1px solid var(--border);
  text-align: center;
}
.cta-final h2 {
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.cta-final p.lead {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 560px;
  margin: 0 auto 30px;
}

/* ------------------------------------------------------------------ Footer -- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 44px 0 32px;
  font-size: 14px;
  color: var(--text-muted);
  background: var(--bg);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 680px) {
  .footer-top { grid-template-columns: 1fr; gap: 24px; }
}
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { margin: 0; max-width: 42ch; font-size: 14px; }
.footer-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.footer-cols h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 12px;
}
.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols li { margin: 8px 0; }
.footer-cols a { color: var(--text-muted); }
.footer-cols a:hover { color: var(--accent-bright); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 24px;
  font-size: 13px;
}
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--accent-bright); }
.footer-legal {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.8;
  max-width: 70ch;
}

/* --------------------------------------------------------------- Utilities -- */
.center { text-align: center; }
.muted { color: var(--text-muted); }
.nowrap { white-space: nowrap; }
