/* Ted CRM — landing. Sistema de diseño: tokens, tipografía del sistema (SF en Apple), luz y oscuro. */
:root {
  color-scheme: light dark;
  /* Mismos tokens que el dashboard de Ted CRM (app/src/index.css): grises neutros en OKLCH,
     radio 0 (`rounded-none` en shadcn/ui salvo avatares) y un solo azul de acento (el mismo
     `--chart-2` del dashboard), no una paleta de marketing aparte. */
  --bg: oklch(1 0 0);
  --bg-tint: oklch(0.97 0 0);
  --surface: oklch(1 0 0);
  --text: oklch(0.145 0 0);
  --text-2: oklch(0.556 0 0);
  --line: oklch(0.922 0 0);
  --primary: oklch(0.205 0 0);
  --primary-ink: oklch(0.985 0 0);
  --accent: oklch(0.623 0.214 259.815);
  --accent-ink: #ffffff;
  --accent-soft: oklch(0.94 0.03 259.815);
  --ok: #1f9d55;
  --ok-soft: #e6f6ec;
  --bubble-in: #e9e9eb;
  --bubble-out: #d9fdd3;
  --bubble-out-ink: #0b3d1e;
  --dark-bg: oklch(0.145 0 0);
  --dark-surface: oklch(0.205 0 0);
  --dark-text: oklch(0.985 0 0);
  --dark-text-2: oklch(0.708 0 0);
  --nav-bg: var(--bg);
  --shadow: 0 0 0 1px var(--line);
  --shadow-sm: 0 0 0 1px var(--line);
  --font: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 0px;
}

@font-face {
  font-family: "JetBrains Mono Variable";
  src: url("fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: oklch(0.145 0 0);
    --bg-tint: oklch(0.269 0 0);
    --surface: oklch(0.205 0 0);
    --text: oklch(0.985 0 0);
    --text-2: oklch(0.708 0 0);
    --line: oklch(1 0 0 / 12%);
    --primary: oklch(0.87 0 0);
    --primary-ink: oklch(0.205 0 0);
    --accent: oklch(0.809 0.105 251.813);
    --accent-ink: oklch(0.145 0 0);
    --accent-soft: oklch(0.3 0.06 259.815);
    --ok: #30d158;
    --ok-soft: #10301b;
    --bubble-in: #2c2c2e;
    --bubble-out: #144d37;
    --bubble-out-ink: #e7fff0;
    --dark-bg: oklch(0.08 0 0);
    --dark-surface: oklch(0.205 0 0);
    --nav-bg: var(--bg);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 0; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); color: var(--text); padding: 10px 14px; border-radius: 0; box-shadow: var(--shadow); }
.skip:focus { left: 12px; }

.wrap { width: min(1120px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap--narrow { width: min(760px, 100% - 2 * var(--gutter)); }
.center { text-align: center; }
.br-lg { display: none; }
@media (min-width: 760px) { .br-lg { display: inline; } }

/* Tipografía */
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 6.4vw, 4.4rem); line-height: 1.08; letter-spacing: -0.02em; font-weight: 600; }
h2 { font-size: clamp(1.75rem, 4.2vw, 2.8rem); line-height: 1.12; letter-spacing: -0.015em; font-weight: 600; }
h3 { font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.01em; font-weight: 600; }
p { margin: 0; text-wrap: pretty; }
.eyebrow { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--text-2); margin-bottom: 14px; }
.lead { font-size: clamp(1.05rem, 1.8vw, 1.3rem); line-height: 1.5; color: var(--text-2); max-width: 46ch; letter-spacing: 0; }
.hero__copy .lead, .center .lead { margin-inline: auto; }
.lead--dark { color: var(--dark-text-2); margin-inline: 0; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: var(--primary-ink); border-radius: 0;
  padding: 10px 20px; font-weight: 500; font-size: 0.9rem; letter-spacing: -0.01em;
  transition: transform .15s ease, filter .15s ease, background-color .15s ease;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn:active { transform: scale(0.97); }
.btn--sm { padding: 6px 14px; font-size: 0.85rem; }
.btn--lg { padding: 14px 28px; font-size: 1.05rem; }
.btn--light { background: var(--dark-text); color: var(--dark-bg); }
.btn--outline { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn-text { font-size: 1.1rem; font-weight: 500; }
.btn-text span { display: inline-block; transition: transform .15s ease; }
.btn-text:hover { text-decoration: none; }
.btn-text:hover span { transform: translateX(3px); }
.link-quiet { color: var(--text); font-size: 0.85rem; opacity: .8; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; margin-top: 30px; }
.cta-row--center { justify-content: center; }

/* Navegación */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--line);
}
.nav__inner { width: min(1120px, 100% - 2 * var(--gutter)); margin-inline: auto; height: 56px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; font-size: 1.05rem; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.nav__links { display: none; gap: 28px; margin-left: auto; }
.nav__links a { color: var(--text); font-size: 0.85rem; opacity: .8; }
.nav__links a:hover { opacity: 1; text-decoration: none; }
.nav__actions { display: flex; align-items: center; gap: 16px; margin-left: auto; }
@media (min-width: 860px) { .nav__links { display: flex; } .nav__actions { margin-left: 0; } }

/* Hero */
.hero { padding-block: clamp(56px, 9vw, 112px) 0; text-align: center; }
.hero h1 { max-width: 16ch; margin-inline: auto; }
.hero .lead { margin-top: 22px; }
.hero .cta-row { justify-content: center; }
.stage { position: relative; margin-top: clamp(48px, 7vw, 88px); display: grid; gap: 20px; justify-items: center; }
.caption { text-align: center; font-size: 0.8rem; color: var(--text-2); margin-top: 18px; padding-bottom: 8px; }

/* Ventana del CRM (ilustración en HTML/CSS) */
.window { margin: 0; width: 100%; max-width: 1000px; background: var(--surface); border-radius: 0; box-shadow: var(--shadow); overflow: hidden; text-align: left; }
.window__bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg-tint); }
.window__bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.window__bar i:nth-child(2) { background: #febc2e; }
.window__bar i:nth-child(3) { background: #28c840; }
.window__bar span { margin-inline: auto; font-size: 0.78rem; color: var(--text-2); transform: translateX(-24px); }
.window__body { display: grid; grid-template-columns: 1fr; }
.side { display: none; padding: 16px 12px; border-right: 1px solid var(--line); background: var(--bg-tint); }
.side__item { display: block; padding: 8px 12px; border-radius: 0; font-size: 0.85rem; color: var(--text-2); }
.side__item.is-on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr); gap: 12px; padding: 16px; overflow-x: auto; }
.col { display: grid; align-content: start; gap: 10px; }
.col h3 { font-size: 0.8rem; font-weight: 600; color: var(--text-2); display: flex; align-items: center; justify-content: space-between; padding: 0 2px; letter-spacing: 0; }
.col h3 b { font-weight: 600; background: var(--bg-tint); border-radius: 0; padding: 1px 8px; font-size: 0.72rem; }
.deal { display: grid; gap: 2px; padding: 12px 14px; background: var(--surface); border-radius: 0; box-shadow: var(--shadow-sm); }
.deal em { font-style: normal; font-weight: 600; font-size: 0.88rem; }
.deal span { color: var(--text-2); font-size: 0.78rem; }
.deal strong { font-size: 0.85rem; font-variant-numeric: tabular-nums; margin-top: 4px; }
.deal--won { background: var(--ok-soft); border-color: transparent; }
.deal--won strong { color: var(--ok); }
@media (min-width: 900px) { .window__body { grid-template-columns: 172px 1fr; } .side { display: block; } }

/* Teléfono con la conversación */
.phone { margin: 0; width: min(320px, 100%); background: var(--surface); border-radius: 4px; padding: 10px; box-shadow: var(--shadow); position: relative; text-align: left; }
.phone__notch { width: 86px; height: 8px; background: var(--text); opacity: .8; border-radius: 0 0 6px 6px; margin: -10px auto 10px; }
.phone__head { display: flex; align-items: center; gap: 10px; padding: 4px 10px 12px; border-bottom: 1px solid var(--line); }
.phone__head strong { display: block; font-size: 0.9rem; line-height: 1.2; }
.phone__head small { color: var(--text-2); font-size: 0.72rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 0.75rem; font-weight: 700; }  /* circular: es la única excepción del dashboard (Avatar) */
.chat { display: grid; gap: 8px; padding: 14px 6px 8px; }
.msg { max-width: 84%; padding: 9px 13px; border-radius: 18px; font-size: 0.86rem; line-height: 1.35; letter-spacing: -0.005em; }
.msg--in { background: var(--bubble-in); justify-self: start; border-bottom-left-radius: 6px; }
.msg--out { background: var(--bubble-out); color: var(--bubble-out-ink); justify-self: end; border-bottom-right-radius: 6px; }
@media (min-width: 1000px) {
  /* El teléfono sube sobre la mitad inferior de la ventana: deja ver los encabezados y las primeras tarjetas de todas las columnas. */
  .phone { position: absolute; right: 0; bottom: -150px; }
  .stage { padding-bottom: 150px; }
}

/* Secciones */
.section { padding-block: clamp(72px, 11vw, 140px); }
.section--tint { background: var(--bg-tint); }
.section h2 { max-width: 20ch; }
.center h2 { margin-inline: auto; }

.trio { display: grid; gap: 40px; margin-top: 56px; }
.trio article { display: grid; gap: 12px; align-content: start; }
.trio svg { width: 48px; height: 48px; }
.trio p { color: var(--text-2); max-width: 32ch; }
.ic-bg { fill: var(--accent-soft); }
.ic-fg { fill: var(--accent); }
.ic-line { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ic-line--fat { stroke-width: 3; }
@media (min-width: 760px) { .trio { grid-template-columns: repeat(3, 1fr); gap: 48px; } }

/* Bento */
.bento { display: grid; gap: 16px; margin-top: 48px; }
.tile { background: var(--surface); border-radius: 0; padding: 28px; display: grid; gap: 10px; align-content: start; box-shadow: var(--shadow-sm); }
.tile p { color: var(--text-2); font-size: 1rem; max-width: 44ch; }
.tile--wide { align-content: space-between; }
@media (min-width: 760px) {
  .bento { grid-template-columns: repeat(3, 1fr); }
  .tile--wide { grid-column: span 2; }
  .tile--full { grid-column: 1 / -1; min-height: 0; }
  .tile { min-height: 220px; }
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chips span { font-size: 0.75rem; font-weight: 500; color: var(--accent); background: var(--accent-soft); border-radius: 0; padding: 5px 12px; }
.slots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.slots span { font-size: 0.8rem; font-variant-numeric: tabular-nums; border: 1px solid var(--line); border-radius: 0; padding: 6px 12px; }
.slots .is-taken { color: var(--text-2); text-decoration: line-through; opacity: .6; }
.slots .is-pick { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.stages { display: flex; gap: 6px; margin-top: 14px; height: 10px; }
.stages i { flex: 0 0 auto; width: var(--w); border-radius: 0; background: var(--accent); opacity: .9; }
.stages i:nth-child(2) { opacity: .65; }
.stages i:nth-child(3) { opacity: .45; }
.stages i:nth-child(4) { background: var(--ok); opacity: 1; }

/* Pasos (secuencia real) */
.steps { list-style: none; margin: 56px 0 0; padding: 0; display: grid; gap: 0; counter-reset: paso; border-top: 1px solid var(--line); }
.steps li { counter-increment: paso; display: grid; gap: 4px; padding: 26px 0 26px 64px; border-bottom: 1px solid var(--line); position: relative; }
.steps li::before { content: counter(paso); position: absolute; left: 0; top: 24px; width: 40px; height: 40px; border-radius: 0; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.steps p { color: var(--text-2); max-width: 52ch; }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, 1fr); border-top: 0; gap: 28px; }
  .steps li { padding: 64px 0 0; border-bottom: 0; border-top: 1px solid var(--line); }
  .steps li::before { top: 16px; }
}

/* TedDev */
.section--dark { background: var(--dark-bg); color: var(--dark-text); }
.section--dark .eyebrow { color: var(--dark-text-2); }
.services { display: grid; gap: 14px; margin: 48px 0 44px; }
.services article { background: var(--dark-surface); border-radius: 0; padding: 26px; display: grid; gap: 8px; align-content: start; }
.services p { color: var(--dark-text-2); font-size: 1rem; }
@media (min-width: 700px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .services { grid-template-columns: repeat(3, 1fr); } }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding-block: 4px; }
details:first-of-type { margin-top: 36px; border-top: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 18px 0; font-size: 1.15rem; font-weight: 600; letter-spacing: -0.015em; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.6rem; font-weight: 300; color: var(--text-2); transition: transform .2s ease; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--text-2); padding: 0 0 20px; max-width: 60ch; }

/* Contacto y pie */
.section--cta { background: var(--bg-tint); }
.section--cta .lead { margin-top: 18px; }
.mail { margin-top: 22px; color: var(--text-2); font-size: 0.95rem; user-select: all; }
.mail a { color: var(--text); font-weight: 600; }
.footer { padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px)); font-size: 0.8rem; color: var(--text-2); border-top: 1px solid var(--line); }
.footer__inner { display: grid; gap: 8px; }
.footer a { color: var(--text-2); text-decoration: underline; }
@media (min-width: 760px) { .footer__inner { grid-template-columns: 1fr auto auto; gap: 28px; align-items: center; } }

/* Entrada suave: siempre visible en reposo, solo se mueve al cargar */
@media (prefers-reduced-motion: no-preference) {
  .hero__copy > * { animation: subir .7s cubic-bezier(.2, .7, .2, 1) both; }
  .hero__copy > :nth-child(2) { animation-delay: .06s; }
  .hero__copy > :nth-child(3) { animation-delay: .12s; }
  .hero__copy > :nth-child(4) { animation-delay: .18s; }
  .tile, .services article { transition: transform .25s ease; }
  .tile:hover, .services article:hover { transform: translateY(-3px); }
}
@keyframes subir { from { transform: translateY(14px); opacity: .01; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Páginas legales (privacidad, términos, eliminación de datos) */
.legal { padding-block: 56px 88px; }
.legal__body { width: min(760px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.legal h1 { font-size: clamp(30px, 5vw, 44px); letter-spacing: -0.02em; line-height: 1.1; margin: 8px 0 8px; text-wrap: balance; }
.legal h2 { font-size: 21px; letter-spacing: -0.01em; margin: 36px 0 10px; }
.legal p, .legal li { color: var(--text); line-height: 1.65; font-size: 17px; }
.legal ul { padding-left: 22px; display: grid; gap: 6px; margin: 10px 0; }
.legal .meta { color: var(--text-2); font-size: 15px; }
.legal .back { display: inline-block; margin-bottom: 20px; font-size: 15px; }
.footer__legal { display: flex; gap: 18px; flex-wrap: wrap; }
