/* ─── Núcleo · design tokens ─── */
@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:ital,wght@0,300..800;1,400..600&family=JetBrains+Mono:wght@400;500;600&family=Inter:wght@300..700&family=Geist:wght@300..700&display=swap');

:root {
  /* Ember palette (default) */
  --paper: #fbfaf7;
  --paper-2: #f3f1ea;
  --paper-3: #e9e6dc;
  --ink: #15140f;
  --ink-2: #2c2a23;
  --ink-3: #56524a;
  --ink-4: #8a857a;
  --ink-5: #b6b0a3;
  --hair: rgba(21,20,15,0.10);
  --hair-2: rgba(21,20,15,0.06);
  --accent: #b14a1f;
  --accent-tint: #f5e9e1;
  --accent-soft: rgba(177,74,31,0.10);
  --positive: #2f6d3c;
  --positive-tint: #e6efe1;
  --negative: #8b2a16;
  --negative-tint: #f3e3dc;
  --warn: #9a6a07;
  --warn-tint: #f4ead0;

  /* type */
  --sans: 'Hanken Grotesk', ui-sans-serif, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --serif: 'Hanken Grotesk', ui-sans-serif, system-ui, sans-serif;

  /* radii */
  --r-0: 0px;
  --r-1: 3px;
  --r-2: 5px;
  --r-3: 8px;
  --r-pill: 999px;

  /* density baselines */
  --pad-1: 6px;
  --pad-2: 10px;
  --pad-3: 14px;
  --pad-4: 20px;
  --pad-5: 28px;
}

/* Indigo palette (Stripe-like alt) */
:root[data-palette="indigo"] {
  --paper: #fcfcff;
  --paper-2: #f4f3fb;
  --paper-3: #ebe9f7;
  --ink: #0d0b22;
  --ink-2: #211e3b;
  --ink-3: #4a4565;
  --ink-4: #7d779a;
  --ink-5: #b5b0c7;
  --accent: #4f46e5;
  --accent-tint: #e6e3fb;
  --accent-soft: rgba(79,70,229,0.10);
}

/* Mono palette (pure typographic) */
:root[data-palette="mono"] {
  --paper: #fcfcfb;
  --paper-2: #f3f3f1;
  --paper-3: #e8e7e3;
  --ink: #111111;
  --ink-2: #2b2b2b;
  --ink-3: #555555;
  --ink-4: #898989;
  --ink-5: #b8b8b8;
  --accent: #111111;
  --accent-tint: #e9e8e3;
  --accent-soft: rgba(17,17,17,0.06);
}

/* Forest palette — papers más blancos para sensación limpia */
:root[data-palette="forest"] {
  --paper: #ffffff;          /* blanco puro como surface principal */
  --paper-2: #f6f7f4;         /* gris-blanco levísimamente verdoso */
  --paper-3: #ebede7;         /* hairlines visibles cuando se necesita */
  --ink: #11140f;
  --ink-2: #25291f;
  --ink-3: #4a5142;
  --ink-4: #7b8073;
  --ink-5: #afb1a4;
  --accent: #2f6d3c;
  --accent-tint: #e0ebd9;
  --accent-soft: rgba(47,109,60,0.10);
}

/* Type swaps */
:root[data-type="inter"]   { --sans: 'Inter', system-ui, sans-serif; }
:root[data-type="geist"]   { --sans: 'Geist', system-ui, sans-serif; }
:root[data-type="hanken"]  { --sans: 'Hanken Grotesk', system-ui, sans-serif; }

/* ── base text styles used everywhere ── */
.nx        { font-family: var(--sans); color: var(--ink); font-feature-settings: "ss01","cv11"; }
.nx-num    { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.nx-eyebrow{ font-size: 11px; letter-spacing: 0.10em; text-transform: uppercase; color: var(--ink-4); font-weight: 600; font-family: var(--sans); }
.nx-mono-eyebrow{ font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-4); font-weight: 500; }
.nx-display{ font-family: var(--sans); font-weight: 500; letter-spacing: -0.035em; line-height: 1.02; color: var(--ink); }
.nx-h1     { font-family: var(--sans); font-weight: 500; letter-spacing: -0.025em; line-height: 1.05; color: var(--ink); }
.nx-h2     { font-family: var(--sans); font-weight: 500; letter-spacing: -0.02em;  line-height: 1.1;  color: var(--ink); }
.nx-h3     { font-family: var(--sans); font-weight: 500; letter-spacing: -0.015em; line-height: 1.2;  color: var(--ink); }
.nx-body   { font-family: var(--sans); font-weight: 400; line-height: 1.55; color: var(--ink-2); }
.nx-lede   { font-family: var(--sans); font-weight: 400; line-height: 1.4; color: var(--ink-3); letter-spacing: -0.005em; }
.nx-meta   { font-family: var(--sans); font-weight: 400; color: var(--ink-4); }

/* ── product chrome primitives (used in mockups) ── */
.np-frame {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  height: 100%;
  display: flex;
  flex-direction: column;
  font-feature-settings: "ss01","cv11";
}
.np-topbar {
  height: 44px;
  border-bottom: 1px solid var(--hair);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
  flex-shrink: 0;
}
.np-side {
  width: 200px;
  border-right: 1px solid var(--hair);
  padding: 14px 10px;
  flex-shrink: 0;
}
.np-side-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--ink-3);
  border-radius: 5px;
  cursor: default;
}
.np-side-item.active { color: var(--ink); background: var(--accent-soft); }
.np-side-section { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-4); margin: 16px 10px 6px; font-weight: 600; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 6px; font: 500 13px/1 var(--sans); cursor: default; border: 1px solid transparent; transition: background .12s; }
.btn-primary   { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--ink-2); }
.btn-secondary { background: var(--paper); color: var(--ink); border-color: var(--hair); }
.btn-secondary:hover { background: var(--paper-2); }
.btn-ghost     { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--paper-2); }
.btn-accent    { background: var(--accent); color: #fff; }
.btn-sm { height: 24px; padding: 0 8px; font-size: 12px; }
.btn-lg { height: 38px; padding: 0 16px; font-size: 14px; }

/* ── Inputs ── */
.input { height: 30px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--hair); background: var(--paper); color: var(--ink); font: 400 13px/1 var(--sans); outline: none; }
.input:focus { border-color: var(--ink-3); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder { color: var(--ink-4); }

/* ── Pills / badges ── */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: 999px; font: 500 11px/1 var(--sans); }
.pill-neutral  { background: var(--paper-2); color: var(--ink-3); }
.pill-accent   { background: var(--accent-tint); color: var(--accent); }
.pill-positive { background: var(--positive-tint); color: var(--positive); }
.pill-warn     { background: var(--warn-tint); color: var(--warn); }
.pill-negative { background: var(--negative-tint); color: var(--negative); }
.pill .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* ── Hairlines ── */
.hr { height: 1px; background: var(--hair); }
.hr-strong { height: 1px; background: var(--hair); }

/* Tabular numbers helper */
.tab-nums { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* Table */
.tbl { width: 100%; border-collapse: collapse; font: 400 13px/1.4 var(--sans); }
.tbl th { text-align: left; padding: 10px 14px; font-size: 11px; color: var(--ink-4); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; border-bottom: 1px solid var(--hair); }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--hair-2); color: var(--ink-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); }

/* Card */
.card { background: var(--paper); border: 1px solid var(--hair); border-radius: 8px; }

/* The dot — visual motif */
.nucleo-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.nucleo-dot.lg { width: 12px; height: 12px; }
.nucleo-dot.sm { width: 6px; height: 6px; }

.nucleo-ring {
  position: relative;
  display: inline-block;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1px solid var(--accent);
}
.nucleo-ring::after {
  content: ''; position: absolute; inset: 0; margin: auto;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  top: 0; bottom: 0; left: 0; right: 0;
}

/* Subtle striped placeholder for imagery */
.img-placeholder {
  background-image: repeating-linear-gradient(135deg, var(--paper-2) 0 8px, var(--paper-3) 8px 16px);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-4);
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ─── Mobile overrides (≤ 768px) ───
   La landing está armada con inline styles. Para no reescribirla entera,
   los componentes llevan className `nl-*` y acá los reseteamos via
   media query con !important (gana sobre inline style).
   Prefijo `nl-` = solo landing, no toca el dashboard. */

html, body { overflow-x: hidden; }

@media (max-width: 768px) {
  /* Container: padding más chico, evita scroll horizontal */
  .nl-container {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* Tipografía hero / títulos: bajar a tamaños que entren */
  .nl-display { font-size: 38px !important; line-height: 1.05 !important; }
  .nl-h1-lg   { font-size: 28px !important; line-height: 1.1  !important; }
  .nl-h1-md   { font-size: 24px !important; line-height: 1.15 !important; }
  .nl-lede-lg { font-size: 16px !important; }

  /* Sections: paddings verticales más humanos */
  .nl-section-pad { padding-top: 56px !important; padding-bottom: 32px !important; }

  /* Grids → 1 columna */
  .nl-grid-2,
  .nl-grid-3,
  .nl-grid-4,
  .nl-hero-grid,
  .nl-2col-grid,
  .nl-footer-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  /* Stats: 2x2 luce mejor que stack */
  .nl-stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 24px !important;
  }
  .nl-stats-grid > * {
    border-left: none !important;
    padding-left: 0 !important;
  }
  .nl-stats-num { font-size: 26px !important; }

  /* Nav: ocultar links centrales (Product/System/Pricing/Docs) */
  .nl-nav-links { display: none !important; }

  /* Hero: ocultar el preview gigante del director — ilegible a 320px */
  .nl-hero-preview { display: none !important; }
  .nl-hero-callout { display: none !important; }

  /* Hero CTAs: full-width apilados */
  .nl-hero-ctas {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100%;
  }
  .nl-hero-ctas > a {
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
  }

  /* Compare table: rearmar como cards apiladas */
  .nl-compare-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }
  .nl-compare-row > * { border-left: none !important; }
  .nl-compare-row > *:not(:first-child) { border-top: 1px solid var(--hair-2) !important; }
  .nl-compare-header { display: none !important; }
  /* Cada celda muestra a qué columna pertenece */
  .nl-compare-cell::before {
    content: attr(data-col);
    display: block;
    font-family: var(--mono);
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-4);
    margin-bottom: 4px;
    font-weight: 500;
  }
  .nl-compare-cell[data-col=""]::before,
  .nl-compare-cell.nl-compare-label::before { display: none; }
  .nl-compare-label {
    background: var(--paper-3) !important;
    font-weight: 600 !important;
    color: var(--ink-2) !important;
  }

  /* Product section header (kicker + título grande) */
  .nl-section-h1 { font-size: 30px !important; }
  .nl-section-lede { font-size: 15px !important; }

  /* ResponsiveMockup wrapper — más prolijo, menos sombra */
  .nl-mockup-frame {
    border-radius: 6px !important;
    box-shadow: 0 6px 18px rgba(21,20,15,0.06) !important;
  }

  /* Library cards: sin min-height, padding más chico */
  .nl-lib-card { min-height: 0 !important; padding: 22px 20px !important; }

  /* CTA card */
  .nl-cta-card {
    padding: 36px 28px !important;
    border-radius: 10px !important;
  }
  .nl-cta-deco { display: none !important; }
  .nl-cta-h1   { font-size: 26px !important; }
  .nl-cta-ctas {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .nl-cta-ctas > a {
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
  }

  /* En general, todos los buttons dentro de la landing en mobile usan
     border-box para evitar que padding + width:100% rebase el contenedor. */
  .nl-container .btn { box-sizing: border-box; }

  /* Footer bottom strip */
  .nl-footer-bottom {
    flex-direction: column !important;
    gap: 14px !important;
    align-items: flex-start !important;
  }
}

/* Videos ambiente (hero y CTA): respetar reduced-motion (queda el poster) */
@media (prefers-reduced-motion: reduce) {
  .nl-cta-video, .nl-hero-video { display: none; }
}
