/* Tema público de listmonk para JorgeX: una sola hoja, con los tokens de DESIGN.md.
   Se despliega en el static-dir de listmonk como public/static/style.css.
   Las fuentes se copian desde public/fonts/ del sitio a public/static/fonts/. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/Inter-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/Outfit-latin.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --deep-dark: #101113;
  --surface: #18191d;
  --surface-raised: #1d1f24;
  --surface-muted: #141518;
  --border-subtle: #292b31;
  --border-strong: #3a3c44;
  --fg-1: #f3f4f6;
  --fg-2: #d1d5db;
  --fg-muted: #9ca3af;
  --cyan-400: #22d3ee;
  --purple-400: #a78bfa;
  --danger: #fca5a5;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-width: 320px;
}

body {
  padding: 56px 20px 64px;
  background: var(--deep-dark);
  color: var(--fg-2);
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a {
  color: var(--cyan-400);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--fg-1);
}

:focus-visible {
  outline: 2px solid var(--cyan-400);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  margin: 0 0 16px;
  font-family: "Outfit", system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--fg-1);
}
h1 {
  font-size: clamp(30px, 5vw, 40px);
}
h2 {
  font-size: 26px;
}
h3 {
  font-size: 18px;
}

p {
  margin: 0 0 16px;
}

label {
  cursor: pointer;
  color: var(--fg-1);
}

/* Marca sobre la tarjeta */
.brand {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}
.brand a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg-1);
  font-family:
    ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, monospace;
  font-size: 17px;
  text-decoration: none;
}
.brand img {
  width: 30px;
  height: 30px;
}
.brand span span {
  color: var(--purple-400);
}

/* Tarjeta única de cada página */
.container {
  max-width: 560px;
  margin: 0 auto;
}
.wrap {
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
}
.wrap > :last-child,
.wrap section > :last-child,
form > div > :last-child {
  margin-bottom: 0;
}

.section {
  margin: 0;
}
section + section,
.data-form section,
.unsub-all {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
}

/* Formularios */
input[type="text"],
input[type="email"],
input[type="password"],
select {
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  background: var(--surface-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--fg-1);
  font: inherit;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus {
  outline: none;
  border-color: var(--cyan-400);
}
input::placeholder {
  color: var(--fg-muted);
}
input:focus::placeholder {
  color: transparent;
}
input[disabled] {
  opacity: 0.5;
}
input[type="checkbox"],
input[type="radio"] {
  margin: 0 8px 0 0;
  accent-color: var(--cyan-400);
}

.button,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  background: var(--cyan-400);
  border: 1px solid transparent;
  border-radius: 9999px;
  color: var(--deep-dark);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 160ms var(--ease-out),
    border-color 160ms var(--ease-out);
}
.button:hover,
button:hover,
input[type="submit"]:hover {
  background: #67e8f9;
  color: var(--deep-dark);
}
.button.button-outline,
input.button-outline {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--fg-1);
}
.button.button-outline:hover,
input.button-outline:hover {
  background: var(--surface-raised);
  border-color: var(--border-strong);
  color: var(--fg-1);
}

.center {
  text-align: center;
}
.right {
  margin-top: 24px;
  text-align: right;
}
.small {
  font-size: 0.875em;
}
.error {
  color: var(--danger);
}
.row {
  margin-bottom: 20px;
}

.lists {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}
.lists li {
  margin: 0 0 6px;
}
.lists .description {
  margin: 0 0 14px 26px;
  font-size: 0.875em;
  line-height: 1.5;
  color: var(--fg-muted);
}
.form .nonce {
  display: none;
}
.form .captcha {
  margin-top: 24px;
}

/* Inicio */
.home {
  text-align: center;
}
.home-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

/* Archivo */
.archive {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}
.archive li {
  padding: 14px 0;
  border-top: 1px solid var(--border-subtle);
}
.archive li:first-child {
  border-top: 0;
  padding-top: 0;
}
.archive .date {
  display: block;
  font-size: 0.875em;
  color: var(--fg-muted);
}
.feed {
  margin-right: 12px;
  vertical-align: middle;
}
.pagination {
  margin-top: 28px;
  text-align: center;
}
.pg-page {
  display: inline-block;
  padding: 0 10px;
  text-decoration: none;
}
.pg-page.pg-selected {
  font-weight: 700;
  text-decoration: underline;
}

/* Acceso al panel */
.login .submit {
  margin-top: 20px;
}
.login button {
  width: 100%;
}
.login .small {
  margin-top: 16px;
}
.login button img {
  max-width: 24px;
  margin-right: 10px;
}
.login input[name="totp_code"] {
  font-size: 2em;
  letter-spacing: 5px;
  text-align: center;
}

@media (max-width: 640px) {
  body {
    padding: 32px 16px 48px;
  }
  .wrap {
    padding: 28px 22px;
  }
}
