/* Paleta: Midnight Abyss #000180 · Orchid Glaze #E7A0FE · Meadow Light #D0FFA3 */
@font-face {
  font-family: "Marquisette";
  src: url("fonts/Marquisette.woff2") format("woff2"), url("fonts/Marquisette.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
:root {
  --abyss: #000180;
  --abyss-deep: #000050;
  --abyss-soft: #0a0c9a;
  --orchid: #e7a0fe;
  --orchid-deep: #c66cf0;
  --meadow: #d0ffa3;
  --meadow-deep: #a6f25f;
  --text: #f6eeff;
  --muted: #b8b4ec;
  --line: rgba(231, 160, 254, .28);
  --danger: #ff6b9a;
  --font-title: "Marquisette", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--text); min-height: 100vh;
  font: 15px/1.5 "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(180deg, var(--meadow) 0%, var(--orchid) 40%, #3a1bb5 75%, var(--abyss) 100%);
}
header, main, footer { max-width: 980px; margin: 0 auto; padding: 0 16px; }
header { padding-top: 32px; }
header h1 { margin: 0 0 4px; font-size: 32px; font-weight: 800; color: var(--orchid); letter-spacing: -.5px; }
header p { margin: 0 0 22px; color: var(--text); }
header b { color: var(--meadow); }
footer { padding: 8px 16px 40px; }
footer p { margin: 0; display: inline-block; background: var(--abyss); color: var(--muted); padding: 8px 14px; border-radius: 12px; }
h2 { margin: 0 0 12px; font-size: 19px; font-weight: 800; color: var(--orchid); }
h3 { margin: 22px 0 8px; font-size: 15px; font-weight: 700; color: var(--meadow); }

.card {
  background: var(--abyss); border-radius: 24px; padding: 20px; margin-bottom: 22px;
  box-shadow: 0 8px 0 var(--abyss-deep), 0 18px 40px rgba(0, 0, 60, .35);
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
.row.between { justify-content: space-between; margin: 0; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
label.check { flex-direction: row; align-items: center; }

input, select, button, .button {
  font: inherit; color: var(--text); background: var(--abyss-deep); border: 1.5px solid var(--line);
  border-radius: 12px; padding: 9px 13px;
}
input:focus, select:focus { outline: none; border-color: var(--orchid); }
input[type=url] { flex: 1 1 320px; min-width: 0; }
input[type=number] { width: 110px; }
input[type=checkbox] { accent-color: var(--meadow); }
input[type=file] { border: none; padding: 0; background: none; color: var(--muted); }
input[type=file]::file-selector-button {
  font: inherit; font-weight: 600; color: var(--abyss); background: var(--meadow);
  border: none; border-radius: 10px; padding: 6px 12px; margin-right: 8px; cursor: pointer;
}

button, .button {
  background: var(--orchid); border: none; color: var(--abyss); font-weight: 700; cursor: pointer;
  text-decoration: none; display: inline-block; box-shadow: 0 4px 0 var(--orchid-deep);
  transition: transform .08s, box-shadow .08s, filter .15s;
}
button:hover, .button:hover { filter: brightness(1.05); }
button:active, .button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--orchid-deep); }
button:disabled { opacity: .55; cursor: wait; }
button.alt, .button.alt { background: var(--meadow); box-shadow: 0 4px 0 var(--meadow-deep); }
button.alt:active, .button.alt:active { box-shadow: 0 1px 0 var(--meadow-deep); }
button.ghost { background: transparent; color: var(--text); border: 1.5px solid var(--line); box-shadow: none; font-weight: 600; }
button.ghost:hover { border-color: var(--orchid); }
button.danger { color: var(--danger); }
button.icon { background: transparent; border: none; box-shadow: none; padding: 5px; color: var(--orchid); line-height: 0; }
button.icon:hover { color: var(--meadow); }
button.icon.del:hover { color: var(--danger); }
button.icon svg { width: 18px; height: 18px; fill: currentColor; }
kbd { font: 600 11px ui-monospace, monospace; border: 1px solid currentColor; border-radius: 5px; padding: 0 4px; opacity: .7; }
.pill { background: var(--meadow); color: var(--abyss); border-radius: 99px; padding: 0 10px; font-size: 13px; vertical-align: middle; }

video { width: 100%; max-height: 60vh; background: #000; border-radius: 16px; display: block; }
#timeline { width: 100%; height: 56px; margin-top: 10px; border-radius: 12px; background: var(--abyss-deep); cursor: pointer; display: block; }
#in-out { color: var(--meadow); }

.tabs { display: flex; gap: 6px; margin-top: 16px; border-bottom: 1.5px solid var(--line); }
.tab { background: none; border: none; box-shadow: none; border-bottom: 3px solid transparent; border-radius: 0; color: var(--muted); padding: 8px 12px; }
.tab:active { transform: none; box-shadow: none; }
.tab.active { color: var(--orchid); border-bottom-color: var(--orchid); }
.pane { padding-top: 6px; }

.status { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.bar { flex: 0 0 220px; height: 10px; background: var(--abyss-deep); border-radius: 99px; overflow: hidden; }
.bar > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--orchid), var(--meadow)); transition: width .3s; }
.status.error span { color: var(--danger); }

table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th, td { text-align: left; padding: 6px; border-bottom: 1px solid var(--line); }
th { font-size: 12px; color: var(--muted); font-weight: 500; }
td input { width: 100%; padding: 6px 9px; }
td.t input { width: 96px; font-family: ui-monospace, monospace; }
td.d { color: var(--meadow); }
tr.bad td.d { color: var(--danger); font-weight: 700; }
td.actions { white-space: nowrap; text-align: right; }

#results { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 8px; }
#results li { display: flex; justify-content: space-between; align-items: center; background: var(--abyss-deep); border-radius: 12px; padding: 9px 14px; }
#results a { color: var(--meadow); font-weight: 600; }

@media (max-width: 640px) {
  table thead { display: none; }
  table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  table td { border: none; padding: 2px; }
  td.n { display: none; }
  td.name, td.actions { grid-column: 1 / -1; }
  .bar { flex-basis: 120px; }
}

/* ---------------------------------------------------------------- navegación y contenido SEO */
.topnav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; margin-bottom: 26px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--orchid); text-decoration: none; }
.brand img { border-radius: 8px; }
.topnav .links { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.topnav .links a { color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; opacity: .85; }
.topnav .links a:hover, .topnav .links a[aria-current] { color: var(--meadow); opacity: 1; }
header h1 { font-size: clamp(26px, 4.5vw, 38px); line-height: 1.2; color: var(--text); }
header .lead { font-size: 16px; }

.content p { margin: 0 0 8px; color: var(--text); }
.content h3 { margin: 0 0 4px; }
.content .grid + h3 { margin: 22px 0 10px; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps li { counter-increment: s; background: var(--abyss-deep); border-radius: 16px; padding: 14px 16px; }
.steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--orchid); color: var(--abyss); font-weight: 800; margin-bottom: 8px; }
.steps p, .grid p { color: var(--muted); font-size: 14px; margin: 0; }
.grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid li { background: var(--abyss-deep); border-radius: 16px; padding: 14px 16px; border-left: 4px solid var(--meadow); }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: var(--abyss-deep); border: 1.5px solid var(--line); border-radius: 99px; padding: 4px 12px; font-size: 13px; }
details { background: var(--abyss-deep); border-radius: 14px; padding: 12px 16px; margin-bottom: 8px; }
summary { cursor: pointer; font-weight: 600; color: var(--text); }
summary::marker { color: var(--orchid); }
details[open] summary { color: var(--orchid); margin-bottom: 6px; }
details p { color: var(--muted); }
.linkgrid { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.linkgrid a { display: block; background: var(--abyss-deep); border-radius: 12px; padding: 10px 14px; color: var(--meadow); font-weight: 600; text-decoration: none; }
.linkgrid a:hover { background: var(--abyss-soft); }
footer { display: grid; gap: 10px; }
footer p { max-width: 100%; }
.footnav { display: flex; flex-wrap: wrap; gap: 6px 14px; background: var(--abyss); padding: 10px 14px; border-radius: 12px; }
.footnav a { color: var(--orchid); text-decoration: none; }
.footnav a:hover { color: var(--meadow); }

/* ---------------------------------------------------------------- tipografía de títulos */
h1, h2, h3, .brand, summary {
  font-family: var(--font-title);
  font-weight: 400;
  font-synthesis: none; /* la fuente tiene un solo peso: evita negritas falsas */
  letter-spacing: 0;
}
header h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.15; }
h2 { font-size: 26px; }
h3 { font-size: 19px; }
.brand { font-size: 28px; }
summary { font-size: 18px; }

/* ---------------------------------------------------------------- encabezado sobre el verde pastel */
.brand { color: var(--abyss); }
.topnav .links a { color: var(--abyss); opacity: .8; }
.topnav .links a:hover, .topnav .links a[aria-current] { color: #5a1fb0; opacity: 1; }
header h1 { color: var(--abyss); }
header p, header .lead { color: var(--abyss); }
header b { color: #5a1fb0; }

/* ---------------------------------------------------------------- decoración animada del fondo */
#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* ---------------------------------------------------------------- portada a pantalla completa */
.hero {
  min-height: calc(100vh - 100px); min-height: calc(100svh - 100px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding-bottom: 24px;
}
header .hero h1 { font-size: clamp(52px, 9vw, 116px); line-height: 1.02; margin: 0 0 18px; max-width: 12ch; }
header .hero .lead { font-size: clamp(16px, 2vw, 20px); max-width: 640px; margin: 0 0 40px; }
.scroll-hint { display: inline-flex; flex-direction: column; align-items: center; gap: 0; color: var(--abyss); text-decoration: none; }
.scroll-hint svg { width: 64px; height: 38px; fill: none; stroke: currentColor; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round;
  animation: hint 1.8s ease-in-out infinite; }
.scroll-hint svg + svg { margin-top: -14px; animation-delay: .2s; opacity: .55; }
.scroll-hint span { margin-top: 6px; font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.scroll-hint:hover { color: #5a1fb0; }
@keyframes hint { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .scroll-hint svg { animation: none; } }
html { scroll-behavior: smooth; }
#source { scroll-margin-top: 24px; }
