/* ================================================
   Miniemprende.com — Sistema de diseno v3 Apple-level
   Craft obsesivo. Tipografia dramatica. Motion premium.
   Mobile-first solido. Brand voice intacta.
   ================================================ */

/* ===== Reset minimo y predictible ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
*:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
img, svg, video, picture { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; color: inherit; background: none; border: none; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
table { border-collapse: collapse; border-spacing: 0; }
::selection { background: var(--ink); color: var(--paper); }

/* ===== Tokens ===== */
:root {
  /* Color — monochrome + acento */
  --ink: #08090a;
  --ink-2: #15181b;
  --ink-3: #2a2f35;
  --muted: #5c6571;
  --muted-2: #8a929b;
  --line: #e9ecef;
  --line-2: #d4d9df;
  --paper: #ffffff;
  --paper-2: #f7f8fa;
  --paper-3: #eef1f4;

  --accent: #0e7c6f;
  --accent-2: #0a5d54;
  --accent-3: #d9eee9;
  --accent-glow: rgba(14, 124, 111, 0.18);

  --good: #1f7a45;
  --warn: #b1551a;
  --danger: #b91c1c;

  /* Tipografia */
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter var", "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter var", "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, "Courier New", monospace;

  /* Type scale — clamp() para escala dramatica */
  --t-xs: 0.78rem;
  --t-sm: 0.875rem;
  --t-base: 1rem;
  --t-lg: 1.125rem;
  --t-xl: clamp(1.2rem, 0.8vw + 1rem, 1.45rem);
  --t-2xl: clamp(1.5rem, 1.5vw + 1.1rem, 2rem);
  --t-3xl: clamp(2rem, 2.5vw + 1.2rem, 3rem);
  --t-4xl: clamp(2.5rem, 4vw + 1.4rem, 4.5rem);
  --t-5xl: clamp(3rem, 6vw + 1.5rem, 6rem);
  --t-6xl: clamp(3.5rem, 8vw + 1.5rem, 8rem);

  /* Spacing */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;
  --s-11: 160px;
  --s-12: 192px;

  --max: 1240px;
  --max-narrow: 760px;
  --max-text: 65ch;
  --gutter: clamp(20px, 4vw, 48px);

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  --sh-1: 0 1px 2px rgba(8, 9, 10, 0.04), 0 1px 3px rgba(8, 9, 10, 0.05);
  --sh-2: 0 4px 12px rgba(8, 9, 10, 0.06), 0 10px 30px rgba(8, 9, 10, 0.06);
  --sh-3: 0 12px 32px rgba(8, 9, 10, 0.10), 0 32px 80px rgba(8, 9, 10, 0.08);
  --sh-4: 0 30px 80px rgba(8, 9, 10, 0.14), 0 50px 140px rgba(8, 9, 10, 0.10);
  --sh-accent: 0 12px 40px rgba(14, 124, 111, 0.18);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --header-h: 64px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-padding-top: var(--header-h);
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-base);
  line-height: 1.55;
  letter-spacing: -0.005em;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

/* ===== Tipografia ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.04;
  color: var(--ink);
}
h1 { font-size: var(--t-5xl); letter-spacing: -0.04em; line-height: 0.98; }
h2 { font-size: var(--t-3xl); letter-spacing: -0.03em; line-height: 1.08; font-weight: 600; }
h3 { font-size: var(--t-xl); letter-spacing: -0.015em; line-height: 1.25; font-weight: 600; }
h4 { font-size: var(--t-lg); line-height: 1.35; font-weight: 600; }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-4);
}
.eyebrow.muted { color: var(--muted); }

.section-lead {
  font-size: var(--t-xl);
  color: var(--muted);
  max-width: var(--max-text);
  margin-bottom: var(--s-6);
  line-height: 1.5;
  font-weight: 400;
}
.section-lead.left { margin-left: 0; }
.section-lead a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-thickness 0.18s var(--ease);
}
.section-lead a:hover { text-decoration-thickness: 2px; }
.section.ink .section-lead a { color: var(--accent-3); }

.proof-line {
  font-size: var(--t-sm);
  color: var(--muted);
  margin-top: var(--s-5);
}

.muted { color: var(--muted); font-size: var(--t-xs); }

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.narrow { max-width: var(--max-narrow); }

.section { padding: var(--s-10) 0; }
.section.compact { padding: var(--s-8) 0; }
.section.alt { background: var(--paper-2); }
.section.ink {
  background: var(--ink);
  color: var(--paper);
}
.section.ink h1, .section.ink h2, .section.ink h3, .section.ink h4 { color: var(--paper); }
.section.ink .section-lead { color: rgba(255,255,255,0.7); }
.section.ink .eyebrow { color: var(--accent-3); }

.section-heading {
  max-width: 820px;
  margin-bottom: var(--s-7);
}
.section-heading h2 + p { margin-top: var(--s-4); }
.section-heading p:last-child { margin-bottom: 0; }

/* ===== Skip link ===== */
.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  border-radius: var(--r-md);
  z-index: 1000;
  transition: top 0.2s var(--ease);
}
.skip-link:focus-visible { top: 16px; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.7);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(255,255,255,0.86);
}
/* Cuando el nav mobile esta abierto, quitamos backdrop-filter
   para que position:fixed del overlay no se anclee al header. */
body.nav-open .site-header {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: var(--paper);
  border-bottom-color: var(--line);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  height: var(--header-h);
  width: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  flex-shrink: 0;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  gap: var(--s-6);
  align-items: center;
  flex: 1;
  justify-content: center;
}
.site-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  opacity: 0.7;
  position: relative;
  padding: 4px 0;
  transition: opacity 0.18s var(--ease);
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  transform: translateX(-50%) scale(0);
  transition: transform 0.22s var(--ease-spring);
}
.site-nav a:hover { opacity: 1; }
.site-nav a[aria-current="page"] { opacity: 1; }
.site-nav a[aria-current="page"]::after { transform: translateX(-50%) scale(1); }

.site-nav-cta {
  flex-shrink: 0;
  padding: 10px 18px !important;
  font-size: 0.9rem !important;
}

.site-nav-mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.site-nav-mobile-toggle:hover { background: var(--paper-2); }

@media (max-width: 720px) {
  .site-header .site-nav,
  .site-header .site-nav-cta { display: none !important; }
  .site-header .site-nav-mobile-toggle { display: inline-flex !important; }
  .site-header .site-nav.open {
    display: flex !important;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    flex-direction: column;
    background: var(--paper);
    padding: var(--s-6) var(--gutter);
    gap: var(--s-5);
    align-items: flex-start;
    z-index: 99;
    overflow-y: auto;
  }
  .site-header .site-nav.open a { font-size: var(--t-2xl); font-weight: 600; }
}

/* ===== Buttons ===== */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 22px;
  border-radius: var(--r-pill);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
  transition: transform 0.15s var(--ease-out), background 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.2s var(--ease), color 0.18s var(--ease);
  will-change: transform;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); transition-duration: 80ms; }

.button-primary {
  background: var(--ink);
  color: var(--paper);
}
.button-primary:hover {
  background: var(--ink-2);
  box-shadow: 0 8px 20px rgba(8, 9, 10, 0.25);
}

.button-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}
.button-secondary:hover {
  background: var(--paper-2);
  border-color: var(--ink);
}

.button-accent {
  background: var(--accent);
  color: var(--paper);
}
.button-accent:hover {
  background: var(--accent-2);
  box-shadow: var(--sh-accent);
}

.button-ghost {
  background: transparent;
  color: var(--ink);
}
.button-ghost:hover { background: var(--paper-2); }

.button-text {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.button-text:hover { color: var(--accent); transform: none; }
.button-text::after {
  content: "\2192";
  display: inline-block;
  transition: transform 0.22s var(--ease-out);
}
.button-text:hover::after { transform: translateX(4px); }

.button-row {
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
  margin-top: var(--s-5);
}
.button-row.centered { justify-content: center; }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: var(--s-10) 0 var(--s-9);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(800px circle at 80% 20%, var(--accent-glow), transparent 50%);
  pointer-events: none;
  z-index: 0;
}
.hero > .container { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-8);
  align-items: center;
}
@media (min-width: 940px) {
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s-9); }
}

.hero-copy h1 {
  margin: var(--s-3) 0 var(--s-5);
  max-width: 14ch;
}
.hero-copy > p {
  font-size: var(--t-xl);
  color: var(--muted);
  max-width: 56ch;
  line-height: 1.45;
}

.compact-hero { padding: var(--s-9) 0 var(--s-7); position: relative; overflow: hidden; }
.compact-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(700px circle at 85% 10%, var(--accent-glow), transparent 55%);
  pointer-events: none;
}
.compact-hero > .container { position: relative; }
.compact-hero h1 { font-size: var(--t-4xl); max-width: 18ch; margin: var(--s-3) 0 var(--s-5); line-height: 1.02; letter-spacing: -0.035em; }
.compact-hero p { font-size: var(--t-xl); color: var(--muted); max-width: 60ch; line-height: 1.45; }

.post-hero {
  padding: var(--s-9) 0 var(--s-6);
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}
.post-hero h1 { font-size: var(--t-4xl); margin: var(--s-3) 0 var(--s-4); max-width: 24ch; }
.post-lead {
  font-size: var(--t-xl);
  color: var(--muted);
  max-width: 60ch;
  margin: 0 0 var(--s-5);
  font-weight: 400;
}

/* ===== Product mockup ===== */
.product-mockup {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: var(--s-6);
  box-shadow: var(--sh-3);
  transform: perspective(1400px) rotateY(-2deg) rotateX(1deg);
  transition: transform 0.6s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.product-mockup::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, var(--accent-glow), transparent 40%);
  pointer-events: none;
  opacity: 0.6;
}
.product-mockup:hover { transform: perspective(1400px) rotateY(0) rotateX(0); }
.product-mockup .browser-dots {
  display: flex;
  gap: 6px;
  margin-bottom: var(--s-4);
}
.product-mockup .browser-dots span {
  width: 11px;
  height: 11px;
  border-radius: var(--r-pill);
  background: var(--line-2);
}
.product-mockup .browser-dots span:nth-child(1) { background: #ff5f57; }
.product-mockup .browser-dots span:nth-child(2) { background: #febc2e; }
.product-mockup .browser-dots span:nth-child(3) { background: #28c840; }
.product-mockup .url-bar {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  padding: 8px 12px;
  background: var(--paper-2);
  border-radius: var(--r-sm);
  margin-bottom: var(--s-5);
}
.product-mockup h3 { font-size: var(--t-2xl); margin: var(--s-4) 0 var(--s-3); }
.product-mockup p { color: var(--muted); margin-bottom: var(--s-5); }
.product-mockup .button-row { margin-top: 0; }
.product-mockup .button { pointer-events: none; padding: 10px 16px; font-size: 0.85rem; }

/* ===== Operator portrait ===== */
.operator-portrait {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.operator-portrait img {
  width: 100%;
  border-radius: var(--r-xl);
  box-shadow: var(--sh-3);
  object-fit: cover;
  aspect-ratio: 4 / 5;
}
.operator-portrait .op-card {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-xl);
  background: var(--ink);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: var(--sh-3);
}
.operator-portrait .op-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at 70% 30%, rgba(14,124,111,0.45), transparent 60%);
}
.operator-portrait .op-monogram {
  position: relative;
  font-family: var(--display);
  font-size: clamp(7rem, 16vw, 12rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--paper);
  line-height: 1;
}
.operator-portrait .op-pulse {
  position: absolute;
  top: 22%;
  right: 24%;
  width: 16px;
  height: 16px;
  border-radius: var(--r-pill);
  background: var(--good);
}
.operator-portrait .op-pulse::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: var(--r-pill);
  background: var(--good);
  opacity: 0.35;
  animation: pulse 2.4s var(--ease) infinite;
}
.operator-portrait figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.operator-portrait .op-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--t-lg);
  letter-spacing: -0.02em;
}
.operator-portrait .op-role {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ===== Cards ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s-5);
}
.card-grid.two { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.card-grid.three { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card {
  position: relative;
  padding: var(--s-6);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: transform 0.3s var(--ease-out), border-color 0.2s var(--ease), box-shadow 0.3s var(--ease-out);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-glow), transparent 40%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
  z-index: -1;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
  box-shadow: var(--sh-2);
}
.card:hover::after { opacity: 1; }
.card .card-icon {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: var(--s-4);
  letter-spacing: 0.05em;
}
.card .card-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--s-3);
}
.card h3 { font-size: var(--t-xl); margin-bottom: var(--s-3); line-height: 1.25; }
.card p { color: var(--muted); margin-bottom: var(--s-4); flex: 1; font-size: 0.96rem; line-height: 1.55; }
.card .button-text { margin-top: auto; }

/* ===== Split feature ===== */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-7);
  align-items: center;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--s-9); }
}
.split-copy h2 { margin: var(--s-3) 0 var(--s-4); }

/* ===== Feature list ===== */
.feature-list {
  display: grid;
  gap: var(--s-3);
  margin: var(--s-5) 0 0;
}
.feature-list li {
  padding-left: 30px;
  position: relative;
  color: var(--ink);
  line-height: 1.5;
  font-size: 0.96rem;
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: var(--r-pill);
  background: var(--accent-3);
  border: 1.5px solid var(--accent);
}
.feature-list li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 12px;
  width: 7px;
  height: 4px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* ===== Dashboard reto ===== */
.dashboard {
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: var(--s-7);
  box-shadow: var(--sh-2);
  position: relative;
  overflow: hidden;
}
.dashboard::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at 90% 10%, var(--accent-glow), transparent 50%);
  pointer-events: none;
}
.dashboard > * { position: relative; }
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-4);
  flex-wrap: wrap;
  margin-bottom: var(--s-6);
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--line);
}
.dashboard-title {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.dashboard-title .pulse {
  width: 8px;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--good);
  position: relative;
}
.dashboard-title .pulse::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: var(--r-pill);
  background: var(--good);
  opacity: 0.3;
  animation: pulse 2s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.5); opacity: 0; }
}
.dashboard-period {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--muted);
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--s-4);
}
.kpi {
  padding: var(--s-5);
  border-radius: var(--r-md);
  background: var(--paper);
  border: 1px solid var(--line);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease-out);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.kpi:hover { border-color: var(--line-2); transform: translateY(-2px); }
.kpi-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.kpi-value {
  font-family: var(--display);
  font-size: var(--t-3xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.kpi-delta {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}
.kpi-delta.positive { color: var(--good); }
.kpi-delta.warn { color: var(--warn); }
.dashboard-footer {
  margin-top: var(--s-5);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  font-size: 0.88rem;
  color: var(--muted);
  flex-wrap: wrap;
}

/* ===== Timeline del reto ===== */
.reto-timeline {
  margin: var(--s-3) 0 var(--s-7);
  padding-top: var(--s-6);
}
.tl-track {
  position: relative;
  height: 3px;
  background: var(--line-2);
  border-radius: var(--r-pill);
}
.tl-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--accent);
  border-radius: var(--r-pill);
  transition: width 1s var(--ease-out);
}
.tl-dots {
  display: flex;
  justify-content: space-between;
  margin-top: -8px;
}
.tl-dot {
  position: relative;
  width: 13px;
  height: 13px;
  border-radius: var(--r-pill);
  background: var(--paper);
  border: 2px solid var(--line-2);
}
.tl-dot.done { background: var(--accent); border-color: var(--accent); }
.tl-dot.now {
  background: var(--accent);
  border-color: var(--accent);
  width: 15px;
  height: 15px;
  margin-top: -1px;
  box-shadow: 0 0 0 5px var(--accent-glow);
}
.tl-dot.future { background: var(--paper); border-color: var(--line-2); }
.tl-here {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}
.tl-label {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  color: var(--muted);
  white-space: nowrap;
}
.tl-dots .tl-dot:first-child .tl-label { left: 0; transform: none; }
.tl-dots .tl-dot:last-child .tl-label { left: auto; right: 0; transform: none; }

/* ===== Tool strip ===== */
.tool-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  justify-content: center;
}
.tool-strip span {
  font-size: 0.88rem;
  color: var(--muted);
  padding: 8px 16px;
  background: var(--paper-2);
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
}

/* ===== Pricing ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
}
@media (min-width: 720px) {
  .pricing-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
.pricing-card {
  padding: var(--s-7);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  transition: transform 0.2s var(--ease-out), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.pricing-card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--line-2); }
.pricing-card.highlighted {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--sh-3);
}
.pricing-card.highlighted * { color: var(--paper); }
.pricing-card.highlighted .eyebrow { color: var(--accent-3); }
.pricing-card.highlighted .desc { color: rgba(255,255,255,0.7); }
.pricing-card.highlighted ul li::before { color: var(--accent-3); }
.pricing-card .price {
  font-size: var(--t-3xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-top: var(--s-2);
}
.pricing-card .desc { color: var(--muted); }
.pricing-card ul {
  margin-top: var(--s-4);
  display: grid;
  gap: var(--s-2);
}
.pricing-card ul li {
  font-size: 0.92rem;
  padding-left: 22px;
  position: relative;
}
.pricing-card ul li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ===== Process list ===== */
.process-list {
  counter-reset: process;
  display: grid;
  gap: var(--s-4);
}
.process-list li {
  counter-increment: process;
  padding: var(--s-5) var(--s-6) var(--s-5) 80px;
  background: var(--paper-2);
  border-radius: var(--r-md);
  position: relative;
  border: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}
.process-list li:hover { border-color: var(--line); }
.process-list li::before {
  content: counter(process, decimal-leading-zero);
  position: absolute;
  left: var(--s-6);
  top: var(--s-5);
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}
.process-list li strong { display: block; margin-bottom: 4px; font-weight: 600; }

/* ===== FAQ ===== */
.faq {
  display: grid;
}
.faq details {
  border-top: 1px solid var(--line);
  padding: var(--s-5) 0;
}
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: var(--t-lg);
  list-style: none;
  position: relative;
  padding-right: 40px;
  transition: color 0.18s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 14px;
  height: 14px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s var(--ease);
}
.faq summary:hover { color: var(--accent); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p {
  margin-top: var(--s-3);
  color: var(--muted);
  max-width: 70ch;
  line-height: 1.6;
}

/* ===== Trust box ===== */
.trust-box {
  padding: var(--s-6) var(--s-7);
  background: var(--accent-3);
  border-radius: var(--r-lg);
  margin: var(--s-7) 0;
  position: relative;
}
.trust-box h3 { font-size: var(--t-lg); margin-bottom: var(--s-2); }
.trust-box p { color: var(--ink-2); margin: 0; }
.trust-box ul { margin-top: var(--s-4); display: grid; gap: var(--s-2); }
.trust-box ul li {
  font-size: 0.92rem;
  padding-left: 20px;
  position: relative;
}
.trust-box ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ===== Final CTA ===== */
.final-cta {
  padding: var(--s-11) 0;
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.final-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(900px circle at 50% 0%, rgba(14, 124, 111, 0.22), transparent 60%);
  pointer-events: none;
}
.final-cta > .container { position: relative; }
.final-cta .eyebrow { color: var(--accent-3); }
.final-cta h2 {
  color: var(--paper);
  font-size: var(--t-4xl);
  max-width: 20ch;
  margin: 0 auto var(--s-5);
}
.final-cta p {
  color: rgba(255,255,255,0.72);
  max-width: 56ch;
  margin: 0 auto var(--s-6);
  font-size: var(--t-lg);
}
.final-cta .button-primary { background: var(--paper); color: var(--ink); }
.final-cta .button-primary:hover { background: rgba(255,255,255,0.9); box-shadow: 0 12px 30px rgba(255,255,255,0.15); }
.final-cta .button-secondary {
  color: var(--paper);
  border-color: rgba(255,255,255,0.3);
}
.final-cta .button-secondary:hover { background: rgba(255,255,255,0.08); border-color: var(--paper); }

/* ===== Footer ===== */
.site-footer {
  padding: var(--s-9) 0 var(--s-7);
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.site-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-7);
}
@media (min-width: 720px) {
  .site-footer-grid { grid-template-columns: 1.4fr 2fr; }
}
.site-footer-brand .brand { font-size: 1.1rem; margin-bottom: var(--s-3); }
.site-footer-brand p { color: var(--muted); max-width: 38ch; line-height: 1.55; font-size: 0.94rem; }
.site-footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--s-3) var(--s-5);
}
.site-footer-links a {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
  padding: 4px 0;
  transition: color 0.18s var(--ease);
}
.site-footer-links a:hover { color: var(--ink); }
.site-footer-bottom {
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-3);
  font-size: 0.78rem;
  color: var(--muted);
}

/* ===== Calculator ===== */
.calculator {
  background: var(--paper);
  padding: var(--s-7);
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
}
.calculator .form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--s-4);
  margin-bottom: var(--s-5);
}
.calculator label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--muted);
  font-weight: 500;
}
.calculator select,
.calculator input {
  padding: 12px 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.95rem;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.calculator select:focus,
.calculator input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 4px var(--accent-3);
}
.calculator-result {
  margin-top: var(--s-5);
  padding: var(--s-5) var(--s-6);
  border-radius: var(--r-md);
  background: var(--accent-3);
  display: none;
  border: 1px solid rgba(14, 124, 111, 0.2);
}
.calculator-result.visible { display: block; animation: fadeUp 0.45s var(--ease-out); }
.calculator-result .range {
  font-family: var(--display);
  font-size: var(--t-3xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent-2);
  margin-bottom: var(--s-3);
}
.calculator-result .note {
  font-size: 0.9rem;
  color: var(--ink-2);
  margin-bottom: var(--s-3);
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Contact form ===== */
.contact-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: var(--s-7);
  display: grid;
  gap: var(--s-4);
  box-shadow: var(--sh-1);
}
.contact-form .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
}
.contact-form .form-full { grid-column: 1 / -1; }
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--muted);
  font-weight: 500;
}
.contact-form label span {
  font-size: 0.78rem;
  color: var(--muted-2);
  font-weight: 400;
  font-style: italic;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  padding: 12px 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.95rem;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 4px var(--accent-3);
}
.contact-form .checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: var(--s-2);
}
.contact-form .checkbox input { accent-color: var(--accent); margin-top: 3px; }
.contact-form .checkbox span { font-size: 0.86rem; color: var(--ink); font-style: normal; }
.contact-form .form-note { font-size: 0.78rem; color: var(--muted); margin: 0; }
.contact-form .form-status { font-size: 0.88rem; color: var(--accent-2); margin: 0; }

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

/* ===== Blog ===== */
.breadcrumbs {
  margin-bottom: var(--s-4);
  font-size: 0.78rem;
  color: var(--muted);
}
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumbs li + li::before {
  content: "\2044";
  margin-right: 6px;
  color: var(--line-2);
}
.breadcrumbs a { color: var(--muted); transition: color 0.18s var(--ease); }
.breadcrumbs a:hover { color: var(--ink); }

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-top: var(--s-5);
}
.category-pill {
  padding: 8px 16px;
  border-radius: var(--r-pill);
  background: var(--paper-2);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--line);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.category-pill:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--s-5);
}
.post-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform 0.3s var(--ease-out), border-color 0.2s var(--ease), box-shadow 0.3s var(--ease-out);
}
.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
  box-shadow: var(--sh-2);
}
.post-card-link { display: block; padding: var(--s-6); height: 100%; }
.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--s-3);
}
.post-card-meta span + span::before {
  content: "\00B7";
  margin-right: var(--s-3);
  color: var(--line-2);
}
.post-card h3 { font-size: var(--t-xl); margin-bottom: var(--s-3); line-height: 1.25; }
.post-card p { color: var(--muted); margin-bottom: var(--s-4); font-size: 0.95rem; line-height: 1.55; }
.post-card-cta { font-weight: 600; color: var(--ink); font-size: 0.88rem; }
.post-card-cta::after {
  content: " \2192";
  display: inline-block;
  transition: transform 0.22s var(--ease-out);
}
.post-card:hover .post-card-cta::after { transform: translateX(4px); }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  font-size: 0.88rem;
  color: var(--muted);
}
.post-meta a { color: var(--accent); font-weight: 500; }

.post-content {
  font-size: 1.075rem;
  line-height: 1.75;
  color: var(--ink);
}
.post-content > * { max-width: 70ch; }
.post-content h2 {
  margin-top: 2.2em;
  margin-bottom: 0.6em;
  font-size: var(--t-2xl);
}
.post-content h3 {
  margin-top: 1.8em;
  margin-bottom: 0.5em;
  font-size: var(--t-xl);
}
.post-content p { margin-bottom: 1.2em; }
.post-content ul, .post-content ol { margin-bottom: 1.4em; padding-left: 1.5em; list-style: revert; }
.post-content li { margin-bottom: 0.4em; }
.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 6px 0 6px 20px;
  margin: 1.6em 0;
  color: var(--muted);
  font-style: italic;
}
.post-content code {
  background: var(--paper-2);
  padding: 2px 8px;
  border-radius: var(--r-sm);
  font-size: 0.92em;
  font-family: var(--mono);
  border: 1px solid var(--line);
}
.post-content pre {
  background: var(--ink);
  color: var(--paper);
  padding: var(--s-5);
  border-radius: var(--r-md);
  overflow-x: auto;
  font-size: 0.88rem;
  margin: 1.4em 0;
}
.post-content pre code { background: transparent; color: inherit; padding: 0; border: 0; }
.post-content table {
  width: 100%;
  margin: 1.6em 0;
  font-size: 0.95rem;
}
.post-content table th,
.post-content table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.post-content table th { font-weight: 600; background: var(--paper-2); }
.post-content hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2.4em 0;
  max-width: 70ch;
}
.post-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-thickness 0.18s var(--ease);
}
.post-content a:hover { text-decoration-thickness: 2px; }

.empty-state {
  padding: var(--s-7);
  background: var(--paper-2);
  border: 1px dashed var(--line-2);
  border-radius: var(--r-lg);
  text-align: center;
  color: var(--muted);
}

/* ===== Newsletter inline ===== */
.newsletter-inline {
  margin-top: var(--s-8);
  padding: var(--s-7);
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-xl);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--s-6);
  position: relative;
  overflow: hidden;
}
.newsletter-inline::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(500px circle at 100% 0%, rgba(14, 124, 111, 0.25), transparent 60%);
  pointer-events: none;
}
.newsletter-inline > * { position: relative; }
.newsletter-inline .eyebrow { color: var(--accent-3); }
.newsletter-inline h3 { font-size: var(--t-xl); margin: var(--s-2) 0 var(--s-2); color: var(--paper); max-width: 38ch; }
.newsletter-inline p { color: rgba(255,255,255,0.66); margin: 0; font-size: 0.92rem; max-width: 52ch; }
.newsletter-inline .button-primary { background: var(--paper); color: var(--ink); }
.newsletter-inline .button-primary:hover { background: rgba(255,255,255,0.9); box-shadow: 0 12px 30px rgba(255,255,255,0.15); }

@media (max-width: 720px) {
  .newsletter-inline { grid-template-columns: 1fr; padding: var(--s-6); }
}

/* ===== Tools comparator ===== */
.comparator-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--s-4);
  margin-bottom: var(--s-5);
}
.comparator-filters label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--muted);
  font-weight: 500;
}
.comparator-filters select {
  padding: 12px 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--paper);
  font-size: 0.95rem;
  transition: border-color 0.18s var(--ease);
}
.comparator-filters select:focus { outline: none; border-color: var(--ink); }
.comparator-wrapper {
  overflow-x: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--sh-1);
}
.comparator-table {
  width: 100%;
  min-width: 780px;
}
.comparator-table th,
.comparator-table td {
  padding: var(--s-4) var(--s-5);
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 0.9rem;
}
.comparator-table th {
  background: var(--paper-2);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.comparator-table tbody tr.hidden { display: none; }
.comparator-empty {
  padding: var(--s-6);
  color: var(--muted);
  text-align: center;
}

/* ===== Tool cards ===== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s-5);
}
.tool-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease-out);
}
.tool-card:hover { border-color: var(--line-2); box-shadow: var(--sh-1); transform: translateY(-2px); }
.tool-card h2 { font-size: var(--t-xl); margin-bottom: var(--s-3); }
.tool-detail { margin-top: var(--s-3); font-size: 0.92rem; }
.tool-detail strong {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.tool-detail.warning span { color: var(--warn); }

/* ===== Notice ===== */
.notice {
  padding: var(--s-4) var(--s-5);
  background: var(--accent-3);
  border-radius: var(--r-md);
  margin-bottom: var(--s-5);
  font-size: 0.92rem;
  color: var(--ink-2);
}
.notice strong { color: var(--ink); }

/* ===== Legal ===== */
.legal-content h2 { margin-top: 2em; margin-bottom: 0.6em; font-size: var(--t-xl); }
.legal-content p { color: var(--muted); margin-bottom: 1em; max-width: 70ch; line-height: 1.6; }
.legal-content ul { margin-bottom: 1em; padding-left: 1.3em; list-style: revert; }
.legal-content ul li { margin-bottom: 0.3em; color: var(--muted); }
.legal-notice {
  padding: var(--s-4) var(--s-5);
  background: var(--paper-2);
  border-left: 3px solid var(--muted);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  margin-bottom: var(--s-5);
  font-size: 0.92rem;
  color: var(--muted);
}

/* ===== Contact grid ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-7);
}
@media (min-width: 880px) {
  .contact-grid { grid-template-columns: 1fr 1fr; gap: var(--s-9); }
}
.contact-card {
  padding: var(--s-5);
  background: var(--paper-2);
  border-radius: var(--r-md);
  margin-top: var(--s-4);
}
.contact-card strong { display: block; font-weight: 600; margin-bottom: 4px; }

/* ===== Motion: reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
