/* Bryanse · web de inicio. Solo recursos propios (sin fuentes ni scripts de terceros). */
:root {
  --navy: #0F2A4A;
  --blue: #1E5AA8;
  --blue-mid: #3B7DD8;
  --blue-light: #8CB8F0;
  --grey: #5B6B7C;
  --grey-text: #4A5866;
  --grey-light: #D5DBE2;
  --tile: #E8EEF5;
  --bg: #FFFFFF;
  --console-bg: #0C0C0C;
  --console-fg: #CCCCCC;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", Consolas, "SF Mono", Menlo, "DejaVu Sans Mono", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--navy);
  font-family: var(--sans);
  -webkit-text-size-adjust: 100%;
}
a { color: var(--blue); }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--blue-mid); outline-offset: 2px; }

.top { display: flex; align-items: center; padding: 16px 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); font-weight: 700; font-size: 18px; }

.home {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Banner (encima de la consola, desaparece a los 10 s) */
.banner { position: relative; border-radius: 12px; overflow: hidden; background: var(--tile); transition: opacity .6s ease, max-height .6s ease, margin .6s ease; max-height: 600px; }
.banner.hiding { opacity: 0; max-height: 0; margin-bottom: -20px; }
.banner-link { display: block; }
.banner img { display: block; width: 100%; height: auto; }
.banner-label { position: absolute; top: 8px; left: 8px; background: rgba(15, 42, 74, .85); color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 10px; }
.banner-close { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 16px; border: none; background: rgba(15, 42, 74, .85); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }

/* Consola tipo PowerShell */
.console {
  background: var(--console-bg);
  color: var(--console-fg);
  border-radius: 10px;
  padding: 16px;
  min-height: 148px;
  font-family: var(--mono);
  font-size: 16px;
  line-height: 24px;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 2px 8px rgba(15, 42, 74, .18);
}
.cursor { display: inline-block; width: 9px; height: 18px; margin-left: 1px; vertical-align: -3px; background: var(--console-fg); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Buscador */
.search { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 6px 0 18px; border: 1px solid var(--grey-light); border-radius: 26px; box-shadow: 0 1px 4px rgba(15, 42, 74, .08); }
.search:focus-within { border-color: var(--blue-mid); box-shadow: 0 1px 8px rgba(30, 90, 168, .2); }
.search-icon { color: var(--grey); flex-shrink: 0; }
.search input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font: inherit; font-size: 16px; color: var(--navy); }
.search input::-webkit-search-cancel-button { display: none; }
.search-go { width: 44px; height: 44px; border-radius: 22px; border: none; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }

.engines { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border: none; margin: -8px 0 0; padding: 0; font-size: 13px; color: var(--grey-text); }
.engines legend { float: left; margin-right: 4px; padding: 0; }
.engines label { cursor: pointer; }
.engines input { position: absolute; opacity: 0; pointer-events: none; }
.engines span { display: inline-block; padding: 6px 12px; border-radius: 16px; border: 1px solid var(--grey-light); }
.engines input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.engines input:focus-visible + span { outline: 3px solid var(--blue-mid); outline-offset: 2px; }

/* Accesos rápidos */
.links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 20px; column-gap: 8px; padding-top: 4px; }
.links a { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; color: var(--navy); min-width: 0; }
.links .ico { width: 52px; height: 52px; border-radius: 26px; background: var(--tile); display: flex; align-items: center; justify-content: center; overflow: hidden; font-weight: 600; font-size: 18px; color: var(--blue); }
.links .ico img { width: 28px; height: 28px; object-fit: contain; }
.links .lbl { font-size: 12px; color: var(--grey-text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.links a:hover .ico { background: var(--grey-light); }

/* Descarga */
.download { display: flex; gap: 16px; align-items: flex-start; padding: 16px; border: 1px solid var(--grey-light); border-radius: 14px; margin-top: 8px; }
.download h2 { margin: 0 0 4px; font-size: 16px; }
.download p { margin: 0; font-size: 14px; color: var(--grey-text); line-height: 1.45; }
.download-btn { display: inline-block; margin-top: 12px; padding: 12px 20px; border-radius: 24px; background: var(--blue); color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; }
.download-btn:hover { background: var(--navy); color: #fff; }

.foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; padding: 16px; font-size: 12px; color: var(--grey-text); border-top: 1px solid var(--tile); }

/* Páginas de texto (aviso legal, privacidad) */
.doc { max-width: 720px; margin: 0 auto; padding: 24px 16px 48px; line-height: 1.6; }
.doc h1 { font-size: 26px; }
.doc h2 { font-size: 18px; margin-top: 28px; }
.doc h3 { font-size: 16px; margin: 20px 0 4px; }
.doc .meta { color: var(--grey-text); font-size: 14px; }
.doc ul { padding-left: 22px; }
.doc li { margin: 4px 0; }
.doc .notice { border-left: 4px solid var(--blue); background: var(--tile); padding: 12px 16px; border-radius: 6px; margin: 16px 0; }
.doc .notice p { margin: 6px 0; }
.doc .table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 12px 0; }
.doc .table th, .doc .table td { border: 1px solid var(--tile); padding: 8px; text-align: left; vertical-align: top; }
.doc .table th { background: var(--tile); }
.doc .scroll { overflow-x: auto; }

@media (min-width: 700px) {
  .home { padding-top: 56px; }
  .links { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
  .banner { transition: none; }
}
