/* kubedebugger.es — tema claro: blanco + azul Azure + naranja/rojo. Sin dependencias externas. */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f9fe;
  --panel: #ffffff;
  --panel-2: #eef5fc;
  --border: #d9e4f2;
  --text: #17293d;
  --muted: #5b6b7e;
  --azure: #0078d4;
  --azure-deep: #005a9e;
  --azure-soft: #e3f0fb;
  --flame: #f25022;
  --flame-deep: #d13438;
  --orange: #ff8c00;
  --green: #107c10;
  --teal: #038387;
  --purple: #8661c5;
  --pink: #e3008c;
  --ink: #0e1a2b;
  --code-bg: #0d1526;
  --code-border: #22314d;
  --maxw: 1120px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(23, 64, 109, .08);
  --shadow-lg: 0 24px 60px rgba(23, 64, 109, .14);
  --grad: linear-gradient(90deg, #0078d4, #f25022);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: #b9dcf7; }

code, pre, .mono {
  font-family: "Cascadia Code", "JetBrains Mono", Consolas, "SF Mono", Menlo, monospace;
}

h1, h2, h3, h4 { line-height: 1.22; letter-spacing: -0.015em; color: var(--text); }
h2 { font-size: 2.1rem; margin: 0 0 .6rem; }
h3 { font-size: 1.22rem; margin: 1.6rem 0 .5rem; }
p  { margin: .6rem 0; }
a  { color: var(--azure); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Cabecera ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
header.site::before {
  content: ""; display: block; height: 4px;
  background: var(--grad);
}
.nav {
  display: flex; align-items: center; gap: 20px;
  max-width: var(--maxw); margin: 0 auto; padding: 10px 24px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.08rem; color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand svg { flex: 0 0 auto; }
.brand .name b { color: var(--azure); }
nav.links { margin-left: auto; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
nav.links a {
  color: var(--muted); padding: 7px 12px; border-radius: 9px;
  font-size: .95rem; font-weight: 500;
}
nav.links a:hover { color: var(--azure); background: var(--azure-soft); text-decoration: none; }
nav.links a.cta {
  color: #fff; background: linear-gradient(120deg, var(--flame), var(--orange));
  font-weight: 700; margin-left: 6px;
  box-shadow: 0 4px 14px rgba(242, 80, 34, .35);
}
nav.links a.cta:hover { filter: brightness(1.07); color: #fff; }

.nav-toggle {
  display: none; margin-left: auto;
  background: #fff; border: 1px solid var(--border); color: var(--text);
  border-radius: 9px; padding: 8px 12px; font-size: 1rem; cursor: pointer;
}

/* ---------- Hero ---------- */
.hero { padding: 64px 0 48px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(620px 340px at 12% 8%, rgba(0, 120, 212, .09), transparent 65%),
    radial-gradient(560px 320px at 88% 20%, rgba(242, 80, 34, .08), transparent 65%),
    radial-gradient(circle at center, rgba(0, 120, 212, .10) 1.2px, transparent 1.3px);
  background-size: auto, auto, 26px 26px;
}
.hero .container { position: relative; }
.hero-grid {
  display: grid; grid-template-columns: 1.08fr .92fr; gap: 32px; align-items: center;
}
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .84rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--azure); border: 1.5px solid #b9dcf7;
  background: var(--azure-soft); padding: 5px 13px; border-radius: 999px;
}
.kicker .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--flame); box-shadow: 0 0 0 3px rgba(242, 80, 34, .18);
}
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); margin: 16px 0 14px; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(95deg, var(--azure) 20%, var(--flame) 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { font-size: 1.16rem; color: var(--muted); max-width: 34em; }
.hero .lead b, .hero .lead strong { color: var(--text); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 8px; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 22px; border-radius: 11px; font-weight: 700; font-size: 1rem;
  border: 1.5px solid var(--border); color: var(--text); background: #fff;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn.primary { background: var(--azure); color: #fff; border-color: var(--azure); box-shadow: 0 6px 18px rgba(0, 120, 212, .30); }
.btn.primary:hover { background: var(--azure-deep); }
.btn.flame { background: linear-gradient(120deg, var(--flame), var(--orange)); color: #fff; border: none; box-shadow: 0 6px 18px rgba(242, 80, 34, .32); }
.btn.flame:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }

.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.badge {
  font-size: .82rem; color: var(--muted);
  border: 1px solid var(--border); background: #fff;
  padding: 4px 12px; border-radius: 999px;
}
.badge b { color: var(--azure); font-weight: 700; }

/* Ilustración del hero */
.hero-art { display: flex; justify-content: center; }
.hero-art svg { width: 100%; max-width: 560px; height: auto; }

/* ---------- Terminal ---------- */
.terminal {
  background: var(--code-bg); border: 1px solid var(--code-border);
  border-radius: var(--radius); margin: 40px 0 0; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.terminal .bar {
  display: flex; gap: 7px; align-items: center;
  padding: 10px 14px; background: #16233c; border-bottom: 1px solid var(--code-border);
}
.terminal .bar i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.terminal .bar i:nth-child(1) { background: #ff5f57; }
.terminal .bar i:nth-child(2) { background: #febc2e; }
.terminal .bar i:nth-child(3) { background: #28c840; }
.terminal .bar span { margin-left: 8px; color: #8ba3c7; font-size: .8rem; font-family: Consolas, monospace; }
.terminal pre {
  margin: 0; padding: 18px 20px; overflow-x: auto;
  font-size: .88rem; line-height: 1.7; color: #dce6f5;
}
.t-prompt { color: #4fc3f7; font-weight: 700; }
.t-cmd { color: #ffffff; }
.t-flag { color: #7fb8ff; }
.t-out { color: #9db4d6; }
.t-ok { color: #6fe08a; }
.t-comment { color: #5f7396; font-style: italic; }

/* ---------- Secciones ---------- */
section { padding: 68px 0; }
section.alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-head { max-width: 46em; margin-bottom: 30px; }
.section-head .tag {
  display: inline-block;
  font-weight: 800; font-size: .82rem; letter-spacing: .09em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 999px; margin-bottom: 10px;
  background: var(--azure-soft); color: var(--azure);
}
.tag.flame { background: #feeee8; color: var(--flame); }
.tag.green { background: #e9f6e9; color: var(--green); }
.tag.purple { background: #f1ecfb; color: var(--purple); }
.tag.teal { background: #e2f4f5; color: var(--teal); }
.section-head p { color: var(--muted); font-size: 1.06rem; }

/* Tarjetas */
.grid { display: grid; gap: 18px; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
.card {
  --c: var(--azure);
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--c); }
.card h3 { margin-top: 10px; font-size: 1.06rem; }
.card p { color: var(--muted); font-size: .95rem; }
.card p code { color: var(--text); }
.icon-chip {
  width: 46px; height: 46px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; color: #fff;
  background: var(--c);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--c) 35%, transparent);
}
.icon-chip.soft { color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); box-shadow: none; border: 1.5px solid color-mix(in srgb, var(--c) 30%, #fff); }
.card.wide { grid-column: span 2; }

/* Tablas */
table.tbl {
  width: 100%; border-collapse: separate; border-spacing: 0; margin: 18px 0;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; font-size: .95rem;
  box-shadow: var(--shadow);
}
table.tbl th, table.tbl td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
table.tbl th { background: var(--panel-2); font-weight: 700; color: var(--text); border-bottom: 2px solid var(--azure); }
table.tbl td { color: var(--muted); }
table.tbl td b, table.tbl td code { color: var(--text); }
table.tbl tr:last-child td { border-bottom: none; }

/* Código */
pre.code {
  background: var(--code-bg); border: 1px solid var(--code-border);
  border-radius: 12px; padding: 16px 18px; overflow-x: auto;
  font-size: .86rem; line-height: 1.65; margin: 12px 0; color: #dce6f5;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02), var(--shadow);
}
pre.code .c { color: #6b7f9e; font-style: italic; }
pre.code .k { color: #7fb8ff; }
pre.code .s { color: #6fe08a; }
pre.code .a { color: #ffb02e; }
code.inline, code {
  background: var(--panel-2); border: 1px solid var(--border);
  padding: 1.5px 6px; border-radius: 6px; font-size: .86em; color: var(--azure-deep);
}
pre.code code { background: none; border: none; color: inherit; padding: 0; }

/* Diagrama de arquitectura (SVG) */
.diagram-wrap {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px 22px 14px; margin: 26px 0;
}
.diagram-wrap svg { width: 100%; height: auto; display: block; }
.flowline {
  stroke-dasharray: 9 7;
  animation: dashmove 1.1s linear infinite;
}
@keyframes dashmove { to { stroke-dashoffset: -32; } }
.pulse-ring { animation: pulsering 2.2s ease-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes pulsering {
  0% { opacity: .55; transform: scale(.92); }
  70% { opacity: 0; transform: scale(1.25); }
  100% { opacity: 0; transform: scale(1.25); }
}

/* Pasos numerados */
.steps { counter-reset: step; margin: 20px 0; padding: 0; list-style: none; }
.steps li { counter-increment: step; position: relative; padding: 0 0 18px 56px; margin: 0; color: var(--muted); }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--azure); color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 5px 13px rgba(0, 120, 212, .30);
}
.steps li:nth-child(even)::before { background: var(--flame); box-shadow: 0 5px 13px rgba(242, 80, 34, .30); }
.steps li b { color: var(--text); }
.steps li code { color: var(--text); }

/* Tabs */
.tabs { margin-top: 8px; }
.tab-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.tab-btns button {
  background: #fff; border: 1.5px solid var(--border); color: var(--muted);
  padding: 10px 20px; border-radius: 11px 11px 0 0; cursor: pointer; font-size: .95rem; font-weight: 600;
  border-bottom: none;
}
.tab-btns button.active { color: #fff; background: var(--azure); border-color: var(--azure); }
.tab-pane {
  display: none; border: 1.5px solid var(--azure); border-radius: 0 var(--radius) var(--radius) var(--radius);
  padding: 22px; background: #fff; box-shadow: var(--shadow);
}
.tab-pane.active { display: block; }

/* FAQ */
details.faq {
  background: #fff; border: 1px solid var(--border);
  border-radius: 12px; margin: 10px 0; padding: 0;
  transition: box-shadow .15s ease;
}
details.faq[open] { box-shadow: var(--shadow); border-color: #b9dcf7; }
details.faq summary {
  cursor: pointer; padding: 15px 18px; font-weight: 700; color: var(--text);
  list-style: none; display: flex; justify-content: space-between; gap: 12px;
}
details.faq summary::after {
  content: "+"; color: var(--flame); font-size: 1.35rem; line-height: 1; font-weight: 700;
}
details.faq[open] summary::after { content: "–"; color: var(--azure); }
details.faq .a { padding: 0 18px 16px; color: var(--muted); }
details.faq .a p:first-child { margin-top: 0; }

/* Descarga */
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 18px; margin: 24px 0; }
.dl-card {
  --c: var(--azure);
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 22px; display: flex; flex-direction: column; gap: 8px; text-align: center;
  align-items: center;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.dl-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--c); }
.dl-card .os-chip {
  width: 60px; height: 60px; border-radius: 17px; font-size: 1.7rem;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--c) 13%, #fff);
  border: 1.5px solid color-mix(in srgb, var(--c) 35%, #fff);
}
.dl-card h3 { margin: 4px 0 0; }
.dl-card .file { color: var(--muted); font-size: .84rem; }
.dl-card .btn { justify-content: center; margin-top: auto; width: 100%; }
.note {
  background: var(--azure-soft); border: 1px solid #b9dcf7;
  border-radius: 12px; padding: 14px 17px; color: #2c4a66; font-size: .94rem; margin: 14px 0;
}
.note b { color: var(--azure-deep); }
.warn {
  background: #fff7ef; border: 1px solid #f7cfae;
  border-radius: 12px; padding: 14px 17px; color: #6e4a26; font-size: .94rem; margin: 14px 0;
}
.warn b { color: #c05600; }

/* Formulario contacto */
form.contact { max-width: 620px; }
form.contact label { display: block; font-weight: 700; margin: 16px 0 6px; font-size: .95rem; }
form.contact input, form.contact textarea, form.contact select {
  width: 100%; background: #fff; color: var(--text);
  border: 1.5px solid var(--border); border-radius: 10px; padding: 11px 13px;
  font: inherit; font-size: .95rem;
}
form.contact input:focus, form.contact textarea:focus, form.contact select:focus {
  outline: none; border-color: var(--azure); box-shadow: 0 0 0 3px rgba(0, 120, 212, .15);
}
form.contact .hint { color: var(--muted); font-size: .85rem; margin-top: 4px; }

/* Pie (oscuro para anclar la página) */
footer.site {
  background: var(--ink); color: #a9bcd6;
  padding: 48px 0 30px; margin-top: 56px; font-size: .93rem;
  border-top: 4px solid;
  border-image: linear-gradient(90deg, #0078d4, #f25022) 1;
}
footer.site .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
footer.site h4 { color: #fff; margin: 0 0 10px; font-size: .95rem; }
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site li { margin: 6px 0; }
footer.site a { color: #a9bcd6; }
footer.site a:hover { color: #4fc3f7; }
footer.site .brand .name { color: #fff; }
footer.site .brand .name b { color: #4fc3f7; }
footer.site .legal-line {
  border-top: 1px solid #23334c; margin-top: 28px; padding-top: 18px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
footer.site code { background: #1a2941; border-color: #2b3d5c; color: #bcd7f5; }

/* Banner de cookies */
#cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 100;
  max-width: 720px; margin: 0 auto;
  background: #fff; border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 18px;
  box-shadow: 0 18px 50px rgba(23, 64, 109, .28);
  display: none; gap: 16px; align-items: center; flex-wrap: wrap;
  font-size: .92rem; color: var(--muted);
}
#cookie-banner.show { display: flex; }
#cookie-banner .txt b { color: var(--text); }
#cookie-banner .txt a { white-space: nowrap; }
#cookie-banner button {
  background: var(--azure); color: #fff; font-weight: 700;
  border: none; border-radius: 9px; padding: 9px 20px; cursor: pointer; margin-left: auto;
  box-shadow: 0 4px 12px rgba(0, 120, 212, .3);
}
#cookie-banner button:hover { background: var(--azure-deep); }

/* Legal */
.legal h2 { margin-top: 2rem; }
.legal h2:first-child { margin-top: 0; }
.legal h2 { font-size: 1.45rem; padding-top: 1rem; border-top: 1px dashed var(--border); }
.legal h2:first-child { border-top: none; padding-top: 0; }
.legal ul { color: var(--muted); }
.legal p, .legal li { max-width: 54em; }

/* Responsive */
@media (max-width: 900px) {
  .grid.c3, .grid.c4 { grid-template-columns: repeat(2, 1fr); }
  footer.site .cols { grid-template-columns: 1fr 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .hero-art svg { max-width: 440px; }
}
@media (max-width: 680px) {
  body { font-size: 15.5px; }
  .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; }
  .card.wide { grid-column: auto; }
  .nav-toggle { display: block; }
  nav.links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch; padding: 10px 16px 16px;
    box-shadow: var(--shadow-lg);
  }
  nav.links.open { display: flex; }
  nav.links a { padding: 11px 12px; }
  nav.links a.cta { margin: 6px 0 0; text-align: center; }
  .hero { padding: 40px 0 32px; }
  section { padding: 46px 0; }
}
