/* DevPartner by David Meléndez — estilos compartidos
   Marca: tokens Taskless (degradado #00A8FF → #7B61FF, Inter 800, navy)
   Acento propio: lenguaje de terminal macOS (JetBrains Mono) */

:root {
  --blue: #00A8FF;
  --purple: #7B61FF;
  --navy: #1A1A2E;
  --dark: #0D0D1A;
  --bg: #F4F4F8;
  --rule: #E0E0EA;
  --white: #FFFFFF;
  --muted: #5B5B72;
  --muted-dark: #A6A6BE;
  --tint: #E8EAF8;
  --wa: #25D366;
  --grad: linear-gradient(135deg, #00A8FF 0%, #7B61FF 100%);

  /* terminal */
  --term-bg: #16162A;
  --term-bar: #22223A;
  --term-line: #2E2E4A;
  --term-text: #E6E6F2;
  --term-dim: #8A8AA8;
  --term-prompt: #00A8FF;
  --term-str: #B9ABFF;
  --mac-red: #FF5F57;
  --mac-yellow: #FEBC2E;
  --mac-green: #28C840;

  --ok: #0E9F6E;
  --ok-tint: #E3F6EE;
  --warn: #B7791F;
  --warn-tint: #FBF1DE;
  --info-tint: #E3F1FC;
  --violet-tint: #EEEAFF;

  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --max: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 500; font-size: 17px; line-height: 1.6;
  color: var(--navy); background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.mono { font-family: var(--mono); }
[data-price] { white-space: nowrap; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px; border: 0;
  font-weight: 700; font-size: 16px; text-decoration: none; text-align: center;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px -10px rgba(123,97,255,.65); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: #2a2a46; }
.btn-ghost { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 2px var(--rule); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--navy); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--tint); }
.btn-ghost-dark { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.22); }
.btn-ghost-dark:hover { box-shadow: inset 0 0 0 2px #fff; }

/* ---------- Header ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244,244,248,.88);
  backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s ease;
}
.nav.scrolled { border-bottom-color: var(--rule); }
.nav .wrap { max-width: 1340px; }
.nav-inner { display: flex; align-items: center; gap: 18px; height: 70px; }
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 800; font-size: 22px; letter-spacing: -.02em; flex: none; }
.logo .less { color: var(--blue); }

/* Terminal del header */
.term-chip {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  height: 36px; padding: 0 14px 0 12px; border-radius: 10px;
  background: var(--term-bg); color: var(--term-text);
  font-family: var(--mono); font-size: 13px; line-height: 1;
  box-shadow: inset 0 0 0 1px var(--term-line), 0 6px 18px -10px rgba(13,13,26,.6);
  text-decoration: none; flex: 0 1 400px; min-width: 0;
}
.term-dots { display: flex; gap: 5px; flex: none; }
.term-dots i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.term-dots i:nth-child(1) { background: var(--mac-red); }
.term-dots i:nth-child(2) { background: var(--mac-yellow); }
.term-dots i:nth-child(3) { background: var(--mac-green); }
.term-line { display: flex; align-items: center; white-space: nowrap; overflow: hidden; min-width: 0; }
.term-path { color: var(--term-prompt); font-weight: 700; }
.term-caret { color: var(--term-str); margin: 0 7px; }
.term-cmd { color: var(--term-text); overflow: hidden; text-overflow: clip; }
.term-cmd .s { color: var(--term-str); }
.term-cursor { width: 7px; height: 15px; background: var(--term-text); margin-left: 2px; flex: none; animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--muted); white-space: nowrap; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--navy); }
.nav .btn { min-height: 42px; padding: 0 18px; font-size: 15px; white-space: nowrap; flex: none; }
.nav-menu-btn { display: none; width: 42px; height: 42px; border-radius: 10px; border: 0; background: var(--white); box-shadow: inset 0 0 0 1px var(--rule); align-items: center; justify-content: center; flex: none; }
.nav-drawer { display: none; }
.btn-label-short { display: none; }

@media (max-width: 1240px) { .nav-links { gap: 18px; } .nav-links a:last-child { display: none; } }
@media (max-width: 960px) { .term-chip { flex: 1 1 auto; max-width: 420px; } }
@media (max-width: 960px) {
  .nav-links { display: none; }
  .term-chip { margin-right: auto; }
  .nav-menu-btn { display: inline-flex; }
  .nav-drawer { border-top: 1px solid var(--rule); background: var(--bg); }
  .nav-drawer.open { display: block; }
  .nav-drawer ul { padding: 10px 0 18px; display: grid; gap: 2px; }
  .nav-drawer a { display: block; padding: 11px 0; text-decoration: none; font-weight: 700; color: var(--navy); }
}
@media (max-width: 640px) {
  .logo span { display: none; }
  .term-chip { padding: 0 10px; gap: 8px; font-size: 12px; }
  .term-path { display: none; }
  .term-caret { margin-left: 0; }
  .term-line { justify-content: flex-end; flex: 1 1 auto; }
  .term-caret, .term-cmd, .term-cursor { flex: none; }
  .term-cmd { overflow: visible; }
  .nav-inner { gap: 10px; }
  .nav .btn-label-long { display: none; }
  .nav .btn-label-short { display: inline; }
  .nav .btn { padding: 0 14px; }
}
@media (max-width: 380px) { .term-dots { display: none; } }

/* ---------- Tipografía de secciones ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-head { max-width: 680px; margin-bottom: clamp(32px, 5vw, 52px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.h2 { font-weight: 800; font-size: clamp(30px, 4.2vw, 48px); line-height: 1.08; letter-spacing: -.03em; }
.lead { margin-top: 16px; font-size: clamp(17px, 1.5vw, 19px); color: var(--muted); max-width: 60ch; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }
.cmt { font-family: var(--mono); font-size: 13.5px; color: var(--purple); font-weight: 500; margin-bottom: 14px; display: block; }
.text-link { font-weight: 700; color: var(--navy); text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.text-link:hover { color: var(--purple); }

/* ---------- Ventana macOS (tablero de ejemplo) ---------- */
.window {
  background: var(--term-bg); color: var(--term-text);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--term-line), 0 40px 80px -36px rgba(26,26,46,.65), 0 18px 36px -20px rgba(123,97,255,.35);
}
.window-bar { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 14px; background: var(--term-bar); border-bottom: 1px solid var(--term-line); }
.window-bar .term-dots i { width: 11px; height: 11px; }
.window-title { font-family: var(--mono); font-size: 12.5px; color: var(--term-dim); margin: 0 auto; transform: translateX(-22px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.window-body { padding: 18px 18px 20px; font-family: var(--mono); font-size: 13.5px; line-height: 1.55; }
.wb-cmd { color: var(--term-dim); }
.wb-cmd b { color: var(--term-prompt); font-weight: 700; }
.wb-cmd em { color: var(--term-str); font-style: normal; }
.board { margin: 14px 0 16px; display: grid; gap: 8px; }
.task { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 9px; background: rgba(255,255,255,.035); box-shadow: inset 0 0 0 1px var(--term-line); }
.task-id { color: var(--term-dim); font-size: 12px; }
.task-name { color: var(--term-text); font-family: Inter, system-ui, sans-serif; font-weight: 600; font-size: 14.5px; min-width: 0; }
.pill { font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 999px; white-space: nowrap; font-family: var(--mono); }
.pill.analysis { background: rgba(0,168,255,.16); color: #6CCBFF; }
.pill.dev { background: rgba(123,97,255,.22); color: #C4B8FF; }
.pill.review { background: rgba(254,188,46,.16); color: #FFD27A; }
.pill.done { background: rgba(40,200,64,.16); color: #7EE38F; }
.pill.queue { background: rgba(255,255,255,.07); color: var(--term-dim); }
.task.active { box-shadow: inset 0 0 0 1px rgba(123,97,255,.65); background: rgba(123,97,255,.08); }
.wb-log { border-top: 1px dashed var(--term-line); padding-top: 12px; color: var(--term-dim); font-size: 12.5px; }
.wb-log .ok { color: #7EE38F; }
.window-tag { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { background: var(--dark); color: #fff; padding: 56px 0 28px; }
.footer-inner { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 36px; }
.footer .logo { color: #fff; }
.footer-svc { margin-top: 16px; font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.footer-svc small { font-weight: 600; color: var(--muted-dark); font-size: 14px; }
.footer-tag { margin-top: 6px; color: var(--muted-dark); font-size: 14.5px; max-width: 36ch; }
.footer-tag .mono { color: var(--term-str); font-size: 13px; }
.footer h3 { font-size: 13.5px; font-weight: 700; color: var(--muted-dark); margin-bottom: 12px; }
.footer-links { display: grid; gap: 8px; font-size: 15px; }
.footer-links a { text-decoration: none; color: #E6E6F2; }
.footer-links a:hover { color: var(--blue); }
.footer-bottom { margin-top: 44px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: 13.5px; color: var(--muted-dark); }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Páginas de detalle ---------- */
.page-hero { padding: clamp(48px, 7vw, 88px) 0 clamp(28px, 4vw, 44px); }
.page-hero h1 { font-weight: 800; font-size: clamp(34px, 5vw, 58px); line-height: 1.05; letter-spacing: -.035em; max-width: 18ch; }
.page-hero .lead { max-width: 62ch; }
.crumb { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-bottom: 18px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumb a { color: var(--purple); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }

.doc { display: grid; grid-template-columns: 240px 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; padding-bottom: clamp(64px, 8vw, 104px); }
.toc { position: sticky; top: 94px; font-size: 14.5px; }
.toc p { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.toc ol { display: grid; gap: 4px; border-left: 2px solid var(--rule); }
.toc a { display: block; padding: 4px 0 4px 14px; margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; color: var(--muted); font-weight: 600; }
.toc a:hover { color: var(--navy); border-left-color: var(--blue); }
.doc-body { min-width: 0; max-width: 760px; }
.doc-body > section { padding: 28px 0; border-top: 1px solid var(--rule); scroll-margin-top: 90px; }
.doc-body > section:first-child { border-top: 0; padding-top: 0; }
.doc-body h2 { font-size: clamp(22px, 2.4vw, 27px); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin-bottom: 14px; }
.doc-body h3 { font-size: 18px; font-weight: 700; margin: 18px 0 8px; }
.doc-body p { color: #33334A; margin-top: 10px; }
.doc-body p:first-of-type { margin-top: 0; }
.doc-body ul.bul { display: grid; gap: 8px; margin-top: 12px; }
.doc-body ul.bul li { position: relative; padding-left: 22px; color: #33334A; }
.doc-body ul.bul li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 7px; height: 7px; border-radius: 2px; background: var(--grad); }
.doc-body ul.no li::before { background: #C9C9D8; }
.doc-body ul.bul + p, .doc-body .window + h3 { margin-top: 16px; }
.example { margin-top: 14px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--white); box-shadow: inset 0 0 0 1px var(--rule); font-size: 15.5px; color: var(--muted); }
.example b { color: var(--navy); }
.callout { margin-top: 16px; padding: 16px 18px; border-radius: var(--radius-md); background: var(--violet-tint); color: #2C2550; font-size: 15.5px; }
.callout b { color: var(--navy); }
.table-wrap { overflow-x: auto; margin-top: 16px; border-radius: var(--radius-md); box-shadow: inset 0 0 0 1px var(--rule); background: var(--white); }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-size: 13.5px; color: var(--muted); font-weight: 700; background: #FAFAFD; }
tr:last-child td { border-bottom: 0; }
.yes { color: var(--ok); font-weight: 700; }
.no-t { color: #B4344D; font-weight: 700; }
.maybe { color: var(--warn); font-weight: 700; }
.stack-cell { font-family: var(--mono); font-size: 13.5px; }
@media (max-width: 860px) { .doc { grid-template-columns: 1fr; } .toc { position: static; } }

.cta-band { background: var(--navy); color: #fff; border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 44px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: clamp(64px, 8vw, 104px); }
.cta-band h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; max-width: 26ch; }
.cta-band p { color: var(--muted-dark); margin-top: 6px; font-size: 15px; }
