/* DikeTest — landing (diketech.co)
   Sistema visual: papel cálido, tinta casi negra, un solo acento índigo.
   Sin fuentes externas: pila del sistema (Segoe UI Variable en Windows). */

:root {
  --paper: #f6f5f2;
  --paper-2: #efede8;
  --card: #fbfaf8;
  --white: #ffffff;
  --ink: #111318;
  --ink-2: #3a3e47;
  --ink-3: #5d626d;
  --line: #e2dfd8;
  --line-2: #d4d0c7;
  --accent: #4338ca;
  --accent-ink: #312a9e;
  --accent-soft: #ecebfb;
  --ok: #157a4a;
  --warn: #9a5b00;
  --code-bg: #14161b;
  --code-ink: #e6e7ea;
  --code-dim: #8b909c;
  --code-key: #a5b4fc;
  --code-str: #86efac;
  --code-fn: #fcd34d;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 0 rgba(17, 19, 24, .04), 0 12px 32px -18px rgba(17, 19, 24, .22);
  --font: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, Menlo, monospace;
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--font);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); color: var(--ink); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
code, pre, kbd { font-family: var(--mono); }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 17px/1 var(--font-display); letter-spacing: -.01em; }
.brand svg { width: 26px; height: 26px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; list-style: none; }
.nav-links a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; font-size: 14.5px; color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); background: var(--paper-2); }
.nav-cta { margin-left: 8px; }
.menu-btn { display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); cursor: pointer; }
.menu-btn svg { width: 20px; height: 20px; margin: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 18px; border-radius: 10px;
  font: 500 15px/1 var(--font); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background .15s ease, border-color .15s ease, transform .15s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #262a33; }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { color: var(--ink); border-color: var(--line-2); background: transparent; }
.btn-ghost:hover { background: var(--white); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn-lg { min-height: 52px; padding: 0 22px; font-size: 16px; border-radius: 12px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--accent); text-decoration: none; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Type ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: .6; }
.display {
  font-size: clamp(2.5rem, 1.4rem + 4.6vw, 4.6rem);
  font-weight: 350; line-height: 1.03; letter-spacing: -.035em;
}
.display em { font-style: normal; color: var(--ink-3); }
.h2 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3rem); font-weight: 380; line-height: 1.08; letter-spacing: -.03em; }
.h3 { font-size: 1.3rem; font-weight: 520; line-height: 1.25; letter-spacing: -.015em; }
.lead { font-size: clamp(1.05rem, 1rem + .35vw, 1.22rem); color: var(--ink-2); line-height: 1.6; }
.muted { color: var(--ink-3); }

/* ---------- Sections ---------- */
section { position: relative; }
.section { padding: clamp(72px, 9vw, 128px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 18px; max-width: 760px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head .lead { max-width: 640px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 8vw, 104px) 0 clamp(56px, 7vw, 96px); overflow: hidden; }
.hero-copy { display: grid; justify-items: center; text-align: center; gap: 22px; max-width: 900px; margin-inline: auto; }
.hero-copy .lead { max-width: 660px; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }
.hero-meta { font: 400 13px/1.4 var(--mono); color: var(--ink-3); min-height: 1.4em; }
.hero-meta span + span::before { content: "·"; margin: 0 8px; }
.hero-visual { margin-top: clamp(44px, 6vw, 72px); }

/* ---------- App window mockup ---------- */
.window {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.window-bar { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--card); }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.window-title { font: 500 12.5px/1 var(--mono); color: var(--ink-3); }
.window-title b { color: var(--ink); font-weight: 600; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; font: 600 11.5px/1 var(--mono); letter-spacing: .02em; }
.pill-ok { background: #e3f4ea; color: var(--ok); }
.pill-run { background: var(--accent-soft); color: var(--accent-ink); }
.pill-warn { background: #fbefd9; color: var(--warn); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.window-bar .pill { margin-left: auto; }

.app { display: grid; grid-template-columns: 216px 1fr; min-height: 460px; }
.app-side { border-right: 1px solid var(--line); background: var(--card); padding: 14px 10px; display: grid; align-content: start; gap: 2px; }
.app-side .group { font: 600 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding: 14px 10px 8px; }
.app-side .item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; color: var(--ink-2); }
.app-side .item svg { width: 16px; height: 16px; color: var(--ink-3); }
.app-side .item.on { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); font-weight: 550; }
.app-side .item.on svg { color: var(--accent); }
.app-main { display: grid; grid-template-rows: auto 1fr; min-width: 0; }
.app-tabs { display: flex; gap: 2px; padding: 10px 14px 0; border-bottom: 1px solid var(--line); }
.app-tabs span { padding: 8px 12px; font-size: 13px; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.app-tabs span.on { color: var(--ink); border-color: var(--ink); font-weight: 550; }
.app-body { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-width: 0; }
.app-pane { padding: 18px; min-width: 0; }
.app-pane + .app-pane { border-left: 1px solid var(--line); }
.pane-label { font: 600 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }

.chat { display: grid; gap: 12px; }
.bubble { padding: 12px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; }
.bubble.user { background: var(--paper-2); color: var(--ink); justify-self: end; max-width: 92%; }
.bubble.agent { background: var(--white); border: 1px solid var(--line); }
.bubble.agent b { font-weight: 600; }
.steps { display: grid; gap: 7px; margin-top: 4px; font: 400 12.5px/1.45 var(--mono); color: var(--ink-2); list-style: none; }
.steps li { display: flex; gap: 8px; align-items: baseline; }
.steps li::before { content: "✓"; color: var(--ok); font-weight: 700; }
.steps li.run::before { content: "●"; color: var(--accent); }

.code {
  margin: 0; background: var(--code-bg); color: var(--code-ink); border-radius: 10px; padding: 14px 0;
  font: 400 12.5px/1.75 var(--mono); overflow: hidden; counter-reset: ln;
}
.code .l { display: block; padding: 0 16px 0 46px; position: relative; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.code .l::before { counter-increment: ln; content: counter(ln); position: absolute; left: 0; width: 30px; text-align: right; color: #565b66; }
.code .k { color: var(--code-key); } .code .s { color: var(--code-str); } .code .f { color: var(--code-fn); } .code .c { color: var(--code-dim); }
.code .hl { background: rgba(165, 180, 252, .1); box-shadow: inset 2px 0 0 var(--code-key); }

/* ---------- Format strip ---------- */
.formats { padding: 28px 0 0; }
.formats p { text-align: center; font: 600 11.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; }
.chips li { padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: 14px; color: var(--ink-2); }

/* ---------- Feature rows ---------- */
.feature-list { display: grid; gap: clamp(72px, 9vw, 120px); }
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.feature:nth-child(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature:nth-child(even) .feature-copy { order: 2; }
.feature-copy { display: grid; gap: 16px; align-content: start; }
.feature-tag { font: 600 12px/1 var(--mono); color: var(--accent); letter-spacing: .06em; }
.ticks { display: grid; gap: 10px; list-style: none; margin-top: 6px; }
.ticks li { position: relative; padding-left: 28px; color: var(--ink-2); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .42em; width: 16px; height: 16px; border-radius: 5px;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.3l2.2 2.2 4.8-5' fill='none' stroke='%234338ca' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
}
.feature-visual { min-width: 0; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel-body { padding: 18px; }

/* tablas de mockup */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font: 600 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding: 0 10px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .m { font-family: var(--mono); font-size: 12px; }
.method { display: inline-block; min-width: 46px; font: 700 11px/1 var(--mono); padding: 4px 6px; border-radius: 5px; text-align: center; }
.get { background: #e3f4ea; color: var(--ok); } .post { background: #fbefd9; color: var(--warn); } .put { background: var(--accent-soft); color: var(--accent-ink); } .del { background: #fbe4e4; color: #a12626; }

/* barras de carga */
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.metric { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--card); }
.metric span { display: block; font: 600 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.metric b { display: block; margin-top: 8px; font: 450 22px/1 var(--font-display); letter-spacing: -.02em; }
.chart { width: 100%; height: auto; }

/* scores */
.scores { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.score { display: grid; justify-items: center; gap: 8px; padding: 14px 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: 12.5px; color: var(--ink-2); text-align: center; }
.ring { width: 64px; height: 64px; }

/* historia de usuario */
.story { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--card); font-size: 13.5px; color: var(--ink-2); }
.story b { color: var(--ink); }
.case { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.case:last-child { border-bottom: 0; }
.case code { font-size: 11.5px; color: var(--ink-3); }

/* ---------- Grid cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: grid; gap: 12px; align-content: start; }
.card .icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--white); border: 1px solid var(--line); color: var(--accent); }
.card .icon svg { width: 20px; height: 20px; }
.card p { color: var(--ink-2); font-size: 15px; }

/* ---------- Steps ---------- */
.how { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; list-style: none; }
.how li { padding: 28px 24px; display: grid; gap: 10px; align-content: start; }
.how li + li { border-left: 1px solid var(--line); }
.how li::before { counter-increment: step; content: "0" counter(step); font: 600 12px/1 var(--mono); color: var(--accent); letter-spacing: .08em; }
.how p { color: var(--ink-2); font-size: 15px; }

/* ---------- Security (dark band) ---------- */
.dark { background: #0f1116; color: #d7d9df; }
.dark .eyebrow { color: #a1a6b3; }
.dark .h2, .dark .h3 { color: #fff; }
.dark .lead { color: #b9bdc7; }
.dark + .section { border-top: 0; }
.sec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #262a33; border: 1px solid #262a33; border-radius: var(--radius); overflow: hidden; }
.sec-grid > div { background: #13151b; padding: 28px; display: grid; gap: 10px; align-content: start; }
.sec-grid p { color: #b0b4bf; font-size: 15px; }
.sec-grid svg { width: 22px; height: 22px; color: #a5b4fc; }

/* ---------- Download ---------- */
.download { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: clamp(28px, 5vw, 56px); box-shadow: var(--shadow); }
.download-copy { display: grid; gap: 18px; }
.req { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 14.5px; }
.req div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 16px; background: var(--card); }
.req div + div { border-top: 1px solid var(--line); }
.req dt { color: var(--ink-3); }
.req dd { margin: 0; color: var(--ink); font-weight: 500; text-align: right; }
.req dd code { font-size: 12.5px; }
.dl-note { font-size: 13.5px; color: var(--ink-3); }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.faq-list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; padding: 22px 0; font: 500 17px/1.4 var(--font-display); color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 300 24px/1 var(--font); color: var(--ink-3); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; color: var(--ink-2); max-width: 680px; }

/* ---------- CTA + footer ---------- */
.cta-final { text-align: center; display: grid; justify-items: center; gap: 22px; }
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 40px; font-size: 14px; color: var(--ink-3); }
.foot { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.foot h2 { font: 600 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.foot ul { list-style: none; display: grid; gap: 8px; }
.foot a { text-decoration: none; color: var(--ink-2); }
.foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.foot-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .app { grid-template-columns: 180px 1fr; }
  .app-body { grid-template-columns: 1fr; }
  .app-pane + .app-pane { border-left: 0; border-top: 1px solid var(--line); }
  .how { grid-template-columns: repeat(2, 1fr); }
  .how li:nth-child(3) { border-left: 0; }
  .how li:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 860px) {
  .nav-links, .nav-cta { display: none; }
  .menu-btn { display: grid; }
  .site-header.open .nav-links {
    display: grid; position: absolute; left: 0; right: 0; top: 64px; padding: 10px 20px 18px;
    background: var(--paper); border-bottom: 1px solid var(--line); gap: 2px;
  }
  .site-header.open .nav-links a { padding: 12px; font-size: 16px; }
  .feature, .feature:nth-child(even) { grid-template-columns: 1fr; }
  .feature:nth-child(even) .feature-copy { order: 0; }
  .grid-3, .sec-grid { grid-template-columns: 1fr; }
  .download, .faq { grid-template-columns: 1fr; }
  .foot { grid-template-columns: 1fr 1fr; }
  .app { grid-template-columns: 1fr; min-height: 0; }
  .app-side { display: none; }
}
@media (max-width: 560px) {
  .how { grid-template-columns: 1fr; }
  .how li + li { border-left: 0; border-top: 1px solid var(--line); }
  .metrics { grid-template-columns: 1fr 1fr 1fr; }
  .metric b { font-size: 18px; }
  .scores { grid-template-columns: repeat(2, 1fr); }
  .hero-actions .btn { width: 100%; }
  .foot { grid-template-columns: 1fr; }
  .code { font-size: 11.5px; }
}

/* ---------- Ajustes de mockups ---------- */
figure.window { margin: 0; }
.window-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.window-bar .pill { flex: none; white-space: nowrap; }
.app-tabs { overflow: hidden; }
.app-tabs span { white-space: nowrap; }
@media (max-width: 560px) {
  .window-bar .pill { display: none; }
  .app-tabs span:nth-child(-n+2) { display: none; }
  .panel-body { padding: 14px; }
  .tbl th, .tbl td { padding-left: 6px; padding-right: 6px; }
  .tbl { font-size: 12px; }
}

/* ---------- Página de descarga ---------- */
.dl-page { min-height: calc(100vh - 64px); }
.dl-card { max-width: 620px; margin-inline: auto; display: grid; gap: 18px; justify-items: start;
  background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: clamp(24px, 5vw, 48px); box-shadow: var(--shadow); }
.dl-state { display: grid; gap: 20px; width: 100%; }
.dl-state[hidden] { display: none; }
.dl-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 560px) { .dl-actions .btn { width: 100%; } }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--accent-ink); }
