/* Peak · consultoría de compras — estilos de peak.com.es */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/manrope-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/dm-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/dm-mono-latin-500-normal.woff2") format("woff2");
}

:root {
  --bg: #F4F6F9;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --border: #DCE2EA;
  --border-2: #E8EDF3;
  --line: #E3E8EF;
  --input: #CBD5E1;
  --text: #0D1726;
  --text-2: #44526A;
  --ink-2: #2A3850;
  --muted: #5B6B82;
  --accent: #2152E8;
  --accent-hover: #1A45C4;
  --tint: #EEF3FF;
  --tint-ink: #1A3FB5;
  --grey-bar: #B8C4D6;
  --warn-bg: #FFF4E8;
  --warn-border: #F5C99A;
  --warn-ink: #8A4B0F;
  --mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
.mono { font-family: var(--mono); }

.skip {
  position: absolute; left: -9999px; top: 12px; z-index: 100;
  padding: 10px 14px; background: var(--text); color: #fff; border-radius: 8px;
}
.skip:focus { left: 12px; }

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: clamp(20px, 4vw, 56px);
  padding-right: clamp(20px, 4vw, 56px);
}

/* ---------- cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(1.4) blur(6px);
}
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 32px; min-height: 72px; padding-top: 10px; padding-bottom: 10px;
}
.brand { display: flex; align-items: center; min-height: 44px; }
.brand img { display: block; height: 34px; width: auto; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; font-size: 15px; font-weight: 600; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 12px 0; }
.nav a:hover { color: var(--accent); }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 24px; border-radius: 10px; border: 1px solid transparent;
  font-family: inherit; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #FFFFFF; }
.btn-primary:hover { background: var(--accent-hover); color: #FFFFFF; }
.btn-primary:disabled { opacity: 0.6; cursor: progress; }
.btn-secondary { background: #FFFFFF; color: var(--text); border-color: var(--input); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.nav .btn { min-height: 44px; padding: 0 18px; border-radius: 8px; font-size: 15px; color: #FFFFFF; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- portada ---------- */
.hero .wrap {
  display: flex; flex-wrap: wrap; align-items: center; gap: 56px;
  padding-top: 80px; padding-bottom: 88px;
}
.hero-text { flex: 1 1 500px; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.chip {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border: 1px solid var(--input); border-radius: 999px; background: #FFFFFF;
  font-family: var(--mono); font-size: 12.5px; color: var(--text-2);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
h1 {
  margin: 0; font-size: clamp(38px, 4.6vw, 66px); font-weight: 800; line-height: 1.04;
  letter-spacing: -0.035em; text-wrap: balance;
}
.lead { margin: 0; max-width: 560px; font-size: 19px; line-height: 1.6; color: var(--text-2); text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 24px; font-family: var(--mono); font-size: 13px; color: var(--muted); }

/* panel de ejemplo */
.panel {
  flex: 1 1 520px; min-width: 0; background: #FFFFFF; border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(13, 23, 38, 0.06), 0 18px 40px rgba(13, 23, 38, 0.08); overflow: hidden;
}
.panel-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px;
  padding: 16px 20px; border-bottom: 1px solid var(--border-2);
}
.panel-title { font-size: 15px; font-weight: 800; }
.tag-example {
  font-family: var(--mono); font-size: 12px; padding: 4px 10px; border-radius: 6px;
  background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--warn-ink);
}
.panel-body { padding: 20px; display: flex; flex-direction: column; gap: 22px; }
.chart { display: flex; flex-direction: column; gap: 12px; }
.chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.chart-title { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.legend { display: flex; gap: 14px; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 2px; }
.sw-now, .bar-now { background: var(--grey-bar); }
.sw-best, .bar-best { background: var(--accent); }
.bar-row { display: flex; align-items: center; gap: 12px; }
.bar-label { flex: 0 0 96px; font-size: 13px; color: var(--ink-2); }
.bars { flex: 1 1 auto; display: flex; flex-direction: column; gap: 4px; }
.bar { display: block; height: 8px; border-radius: 4px; }
/* anchos de las barras del ejemplo */
.w32 { width: 32%; } .w34 { width: 34%; } .w43 { width: 43%; } .w46 { width: 46%; } .w52 { width: 52%; } .w58 { width: 58%; } .w64 { width: 64%; } .w70 { width: 70%; } .w80 { width: 80%; } .w92 { width: 92%; }
.bar-delta { flex: 0 0 60px; text-align: right; font-family: var(--mono); font-size: 12.5px; }

.compare { border: 1px solid var(--border-2); border-radius: 10px; overflow: hidden; }
.compare-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px;
  padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border-2);
}
.compare-head span:last-child { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.scroll-x { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
.compare table { min-width: 340px; font-size: 13.5px; }
.compare th {
  padding: 10px 14px; border-bottom: 1px solid var(--border-2);
  font-size: 12px; font-weight: 600; color: var(--muted); text-align: right;
}
.compare td { padding: 10px 14px; border-bottom: 1px solid var(--border-2); text-align: right; }
.compare th:first-child, .compare td:first-child { text-align: left; }
.compare tr:last-child td { border-bottom: 0; }
.compare .best { background: var(--tint); }
.compare .best td:first-child { font-weight: 700; }
.num { font-family: var(--mono); }
.pill-best {
  margin-left: 6px; padding: 2px 6px; border-radius: 4px; background: var(--accent); color: #FFFFFF;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
}
.saving { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.saving span { font-size: 13px; color: var(--text-2); }
.saving strong { font-family: var(--mono); font-size: 22px; font-weight: 500; color: var(--accent); }

/* ---------- secciones ---------- */
.section { padding: 96px 0; }
.section-white { background: #FFFFFF; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section > .wrap { display: flex; flex-direction: column; gap: 48px; }
.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.kicker { font-family: var(--mono); font-size: 13px; color: var(--accent); }
h2 {
  margin: 0; font-size: clamp(28px, 3.2vw, 46px); font-weight: 800; line-height: 1.1;
  letter-spacing: -0.03em; text-wrap: balance;
}
.section-head p { margin: 0; font-size: 18px; line-height: 1.6; color: var(--text-2); text-wrap: pretty; }
h3 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }

/* método */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 36px 0; }
.step { flex: 1 1 250px; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding-right: 28px; }
.step-rail { display: flex; align-items: center; gap: 12px; }
.step-num {
  flex: 0 0 44px; height: 44px; border-radius: 50%; border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 15px; font-weight: 500; color: var(--accent);
}
.step-line { flex: 1 1 auto; height: 2px; background: var(--border-2); }
.step p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text-2); text-wrap: pretty; }
.deliverable {
  margin-top: auto; align-self: flex-start; padding: 6px 10px; border-radius: 6px;
  background: var(--tint); color: var(--tint-ink); font-size: 13.5px; font-weight: 700; line-height: 1.4;
}

/* categorías */
.table-card { background: #FFFFFF; border: 1px solid var(--border); border-radius: 14px; overflow-x: auto; }
.cat-table th {
  white-space: nowrap;
  padding: 14px 20px; border-bottom: 1px solid var(--border); background: var(--surface-2);
  font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--muted); text-align: left;
}
.cat-table td { padding: 16px 20px; border-bottom: 1px solid var(--border-2); vertical-align: top; }
.cat-table tr:last-child td { border-bottom: 0; }
.code { font-family: var(--mono); font-size: 13px; color: var(--accent); white-space: nowrap; }
.cat-name { font-size: 15.5px; font-weight: 700; }
.cat-desc { font-size: 15px; color: var(--text-2); }
.cat-vars { font-family: var(--mono); font-size: 13px; color: var(--ink-2); }
.type { display: inline-flex; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.type-direct { background: var(--tint); color: var(--tint-ink); }
.type-indirect { background: #F1F5F9; color: #334155; }
.type-capex { background: var(--warn-bg); color: var(--warn-ink); }

/* honorarios */
.fees { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.calc {
  flex: 1 1 520px; min-width: 0; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 18px;
}
.calc-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.calc-head strong { font-size: 16px; font-weight: 800; }
.calc dl { margin: 0; display: flex; flex-direction: column; }
.calc-row {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline;
  gap: 6px 16px; padding: 12px 0; border-bottom: 1px solid var(--line);
}
.calc-row dt { font-size: 15px; color: var(--text-2); }
.calc-row dt .mono { font-size: 13px; color: var(--muted); }
.calc-row dd { margin: 0; font-family: var(--mono); font-size: 16px; }
.calc-total dt { font-family: var(--mono); color: var(--text); }
.calc-total dd { font-size: 26px; font-weight: 500; color: var(--accent); }
.calc-row:last-child { border-bottom: 0; }
.terms { flex: 1 1 380px; min-width: 0; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.terms li { display: flex; gap: 14px; align-items: flex-start; }
.terms svg { flex: 0 0 22px; margin-top: 2px; }
.terms strong { display: block; font-size: 17px; font-weight: 800; }
.terms li span { display: block; margin-top: 4px; font-size: 15.5px; line-height: 1.55; color: var(--text-2); }

/* herramientas */
.tools { display: flex; flex-wrap: wrap; gap: 24px; }
.tool {
  flex: 1 1 300px; min-width: 0; background: #FFFFFF; border: 1px solid var(--border);
  border-radius: 14px; padding: 26px; display: flex; flex-direction: column; gap: 14px;
}
.tool-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--tint); display: flex; align-items: center; justify-content: center; }
.tool p { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--text-2); }

/* contacto */
.section.contact > .wrap { flex-direction: row; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.contact-info { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.contact-info p { margin: 0; font-size: 18px; line-height: 1.6; color: var(--text-2); }
.contact-list { margin: 12px 0 0; border-top: 1px solid var(--line); }
.contact-list div { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-list dt { flex: 0 0 96px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.contact-list dd { margin: 0; font-size: 16px; }
.contact-list a { font-weight: 600; }
.contact-form {
  position: relative; flex: 1 1 520px; min-width: 0; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 14px; padding: 28px; display: flex; flex-direction: column; gap: 18px;
}
.field-row { display: flex; flex-wrap: wrap; gap: 18px; }
.field { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.contact-form > .field { flex: 0 0 auto; }
.field label { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.field input, .field textarea {
  width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--input); border-radius: 8px;
  background: #FFFFFF; color: var(--text); font-family: inherit; font-size: 16px;
}
.field textarea { height: auto; min-height: 128px; padding: 12px 14px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.form-status { margin: 0; font-size: 15px; font-weight: 600; }
.form-status.ok { color: #0F7A3D; }
.form-status.err { color: #B42318; }
.legal-note { margin: 0; font-size: 13px; line-height: 1.55; color: var(--muted); }

/* pie */
.site-footer { border-top: 1px solid var(--border); }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px;
  padding-top: 28px; padding-bottom: 28px; font-size: 14px; color: var(--muted);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* páginas de texto (aviso legal, privacidad, gracias) */
.doc { padding: 72px 0 96px; }
.doc .wrap { max-width: 820px; display: flex; flex-direction: column; gap: 18px; }
.doc h1 { font-size: clamp(32px, 4vw, 48px); }
.doc h2 { font-size: 22px; letter-spacing: -0.01em; margin-top: 18px; }
.doc p, .doc li { font-size: 16.5px; line-height: 1.65; color: var(--text-2); }
.doc p { margin: 0; }
.doc ul { margin: 0; padding-left: 22px; }
.doc .updated { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.pending { padding: 1px 6px; border: 1px dashed #C2701F; color: var(--warn-ink); font-family: var(--mono); font-size: 14px; }

/* ---------- móvil ---------- */
@media (max-width: 760px) {
  .nav a:not(.btn) { display: none; }
  .brand img { height: 30px; }
  .site-header .wrap { min-height: 64px; }
  html { scroll-padding-top: 76px; }
  .hero .wrap { padding-top: 44px; padding-bottom: 56px; gap: 40px; }
  .lead { font-size: 18px; }
  .section { padding: 64px 0; }
  .section > .wrap { gap: 36px; }
  .panel-body { padding: 16px; }
  .bar-label { flex-basis: 84px; }
  .compare table { min-width: 0; font-size: 12.5px; }
  .compare th, .compare td { padding: 9px 8px; }
  .pill-best { margin-left: 4px; padding: 1px 5px; }
  .step { padding-right: 0; }
  .calc, .contact-form { padding: 20px; }

  /* la tabla de categorías pasa a fichas */
  .cat-table, .cat-table tbody, .cat-table tr, .cat-table td { display: block; }
  .cat-table thead { display: none; }
  .cat-table tr { padding: 18px 18px 20px; border-bottom: 1px solid var(--border-2); }
  .cat-table tr:last-child { border-bottom: 0; }
  .cat-table td { padding: 3px 0; border: 0; }
  .cat-table td.cat-vars::before {
    content: "Qué negociamos: "; font-family: "Manrope", sans-serif; font-weight: 700; color: var(--ink-2);
  }
  .cat-table td:last-child { padding-top: 10px; }
}
