/* Tema del blog de Pudokids. Los tokens son los de la app (src/app/globals.css), registro "adult":
   Plus Jakarta Sans, radios de 12–20 px, violeta de marca. Si cambian en la app, se copian aquí. */

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: italic;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/plus-jakarta-sans-latin-wght-italic.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ───────────── Tokens: modo claro ───────────── */
:root {
  --background: #f7f6fb;
  --foreground: #1b1530;
  --surface: #ffffff;
  --surface-2: #f0eef7;
  --border: #e2deee;
  --input-border: #8a84a3;
  --muted-foreground: #5d5773;
  --ring: #6d4aff;
  --primary: #6440f5;
  --primary-foreground: #ffffff;
  --primary-soft: #ece7ff;
  --primary-text: #5531e0;
  --points-soft: #fff4d6;
  --points-text: #8a5a00;
  --shadow-color: 104 74 255;
  --shadow-strength: 0.08;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  /* Si en Ghost (Diseño → Marca) se elige otra letra, Ghost define --gh-font-*; si no, va la de la app. */
  --font-sans: var(--gh-font-body, "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif);
  --font-heading: var(--gh-font-heading, var(--font-sans));
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}
/* Ghost inyecta su color de acento en :root después de esta hoja; html:root le gana. El color real se fija
   además en Configuración → Diseño → Marca (#6440F5), que es lo que usa la ventana de suscripción. */
html:root { --ghost-accent-color: var(--primary); }

/* ───────────── Tokens: modo oscuro (sigue al sistema) ───────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --background: #0e0c18;
    --foreground: #f2f0fa;
    --surface: #17142a;
    --surface-2: #211d38;
    --border: #302b4b;
    --input-border: #6f6893;
    --muted-foreground: #aaa3c4;
    --ring: #a48fff;
    --primary: #7556ff;
    --primary-foreground: #ffffff;
    --primary-soft: #261f4d;
    --primary-text: #b9a9ff;
    --points-soft: #33280d;
    --points-text: #ffd36e;
    --shadow-color: 0 0 0;
    --shadow-strength: 0.45;
    color-scheme: dark;
  }
}

/* ───────────── Base ───────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01";
}
h1, h2, h3, h4, .pk-logo-text { font-family: var(--font-heading); }
img { max-width: 100%; height: auto; }
a { color: var(--primary-text); }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 4px; }

.pk-skip {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--surface); color: var(--foreground); padding: 10px 16px; border-radius: var(--radius-sm);
}
.pk-skip:focus { top: 12px; }

.pk-container { max-width: 1152px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .pk-container { padding: 0 24px; } }
.pk-narrow { max-width: 720px; margin-left: auto; margin-right: auto; padding: 0 16px; }
.pk-main { min-height: 60vh; padding-bottom: 64px; }

/* ───────────── Botones (como buttonVariants de la app) ───────────── */
.pk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: var(--radius-md);
  font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap;
  border: 0; cursor: pointer;
  transition: transform 150ms var(--ease-out), box-shadow 150ms var(--ease-out), filter 150ms var(--ease-out);
}
.pk-btn:active { transform: scale(0.97); }
.pk-btn-sm { padding: 0 16px; font-size: 14px; }
.pk-btn-lg { min-height: 56px; padding: 0 24px; font-size: 18px; border-radius: var(--radius-lg); }
.pk-btn-primary {
  background: var(--primary); color: var(--primary-foreground);
  box-shadow: 0 4px 14px rgb(var(--shadow-color) / calc(var(--shadow-strength) * 2.5));
}
.pk-btn-primary:hover { filter: brightness(1.1); box-shadow: 0 8px 24px rgb(var(--shadow-color) / calc(var(--shadow-strength) * 3.5)); }
.pk-btn-ghost { color: var(--foreground); background: transparent; }
.pk-btn-ghost:hover { background: var(--surface-2); }
.pk-btn-outline { border: 2px solid var(--input-border); background: var(--surface); color: var(--foreground); }
.pk-btn-outline:hover { border-color: var(--primary); color: var(--primary-text); }

/* ───────────── Encabezado y pie ───────────── */
.pk-header { border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--background) 92%, transparent); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 5; }
.pk-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; }
.pk-logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--foreground); text-decoration: none; }
.pk-logo img { border-radius: 10px; }
.pk-logo-text { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.pk-logo-accent { color: var(--primary-text); }
.pk-logo-tag {
  font-size: 13px; font-weight: 700; color: var(--primary-text); background: var(--primary-soft);
  padding: 2px 10px; border-radius: 999px;
}
.pk-nav { display: flex; align-items: center; gap: 8px; }
.pk-hide-mobile { display: none; }
@media (min-width: 640px) { .pk-hide-mobile { display: inline-flex; } }

.pk-footer { border-top: 1px solid var(--border); padding: 32px 0; color: var(--muted-foreground); font-size: 14px; }
.pk-footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.pk-footer-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--foreground); }
.pk-footer-brand img { border-radius: 8px; }
.pk-footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.pk-footer-links a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; color: var(--muted-foreground); text-decoration: none; }
.pk-footer-links a:hover { color: var(--primary-text); }
.pk-footer-copy { margin: 0; width: 100%; }
@media (min-width: 900px) { .pk-footer-copy { width: auto; } }

/* ───────────── Portada y listados ───────────── */
.pk-hero { padding: 40px 0 24px; }
@media (min-width: 640px) { .pk-hero { padding: 64px 0 32px; } }
.pk-eyebrow {
  display: inline-block; margin: 0 0 12px; padding: 6px 12px; border-radius: 999px;
  background: var(--points-soft); color: var(--points-text); font-size: 14px; font-weight: 700;
}
.pk-hero-title { margin: 0; font-size: clamp(30px, 5vw, 48px); line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; max-width: 20ch; }
.pk-accent { color: var(--primary-text); }
.pk-hero-lead { margin: 16px 0 0; max-width: 60ch; font-size: 18px; color: var(--muted-foreground); }
.pk-author { display: flex; align-items: center; gap: 20px; }
.pk-avatar { border-radius: 999px; object-fit: cover; }

.pk-grid { display: grid; gap: 20px; grid-template-columns: 1fr; margin-top: 8px; }
@media (min-width: 720px) { .pk-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .pk-grid { grid-template-columns: repeat(3, 1fr); } }

.pk-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 2px 10px rgb(var(--shadow-color) / var(--shadow-strength)); transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out); }
.pk-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgb(var(--shadow-color) / calc(var(--shadow-strength) * 2)); }
.pk-card-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.pk-card-image { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--primary-soft); }
.pk-card-image-empty { display: grid; place-items: center; }
.pk-card-image-empty img { border-radius: 16px; }
.pk-card-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.pk-card-title { margin: 0; font-size: 20px; line-height: 1.25; font-weight: 800; letter-spacing: -0.01em; }
.pk-card-excerpt { margin: 0; color: var(--muted-foreground); }
.pk-card-body .pk-meta { margin-top: auto; padding-top: 4px; }

.pk-chip {
  align-self: flex-start; display: inline-block; padding: 4px 10px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary-text); font-size: 13px; font-weight: 700; text-decoration: none;
}
a.pk-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; }
.pk-meta { margin: 0; color: var(--muted-foreground); font-size: 14px; }
.pk-meta a { color: inherit; font-weight: 600; }
.pk-empty { padding: 48px 0; color: var(--muted-foreground); font-size: 18px; }

.pk-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 20px; margin-top: 40px; }

/* ───────────── Artículo ───────────── */
.pk-article-header { padding-top: 40px; display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 640px) { .pk-article-header { padding-top: 64px; } }
.pk-article-title { margin: 0; font-size: clamp(30px, 5vw, 44px); line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; }
.pk-article-lead { margin: 0; font-size: 20px; color: var(--muted-foreground); }
.pk-article-image { margin: 32px auto 0; max-width: 1040px; padding: 0 16px; }
.pk-article-image img { display: block; width: 100%; border-radius: var(--radius-lg); }
.pk-article-image figcaption { margin-top: 10px; text-align: center; color: var(--muted-foreground); font-size: 14px; }

/* Contenido del editor de Ghost: columna de lectura de 720 px; tarjetas anchas y de ancho completo salen de ella. */
.pk-content {
  display: grid;
  grid-template-columns: [full-start] minmax(16px, 1fr) [wide-start] minmax(0, 160px) [main-start] min(720px, calc(100% - 32px)) [main-end] minmax(0, 160px) [wide-end] minmax(16px, 1fr) [full-end];
  margin-top: 32px; font-size: 18px; line-height: 1.75;
}
.pk-content > * { grid-column: main-start / main-end; }
.pk-content > .kg-width-wide { grid-column: wide-start / wide-end; }
.pk-content > .kg-width-full { grid-column: full-start / full-end; }
.pk-content > .kg-width-full img { border-radius: 0; }
.pk-content > * + * { margin-top: 1.25em; margin-bottom: 0; }
.pk-content > :first-child { margin-top: 0; }
.pk-content h2 { margin-top: 2em; font-size: 28px; line-height: 1.25; font-weight: 800; letter-spacing: -0.01em; }
.pk-content h3 { margin-top: 1.6em; font-size: 22px; line-height: 1.3; font-weight: 800; }
.pk-content h4 { margin-top: 1.4em; font-size: 19px; font-weight: 800; }
.pk-content p, .pk-content li { overflow-wrap: break-word; }
.pk-content ul, .pk-content ol { padding-left: 1.3em; }
.pk-content li + li { margin-top: 0.4em; }
.pk-content li::marker { color: var(--primary-text); font-weight: 700; }
.pk-content a { color: var(--primary-text); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.pk-content strong { font-weight: 800; }
.pk-content blockquote:not([class]) {
  margin-left: 0; margin-right: 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--primary);
  font-size: 20px; font-style: italic;
}
.pk-content blockquote.kg-blockquote-alt { font-size: 24px; font-style: italic; text-align: center; color: var(--muted-foreground); padding: 0 24px; }
.pk-content hr { width: 100%; height: 0; border: 0; border-top: 1px solid var(--border); margin: 2.5em 0; }
.pk-content img, .pk-content figure img { border-radius: var(--radius-md); }
.pk-content figure { margin-left: 0; margin-right: 0; }
.pk-content figcaption { margin-top: 10px; text-align: center; color: var(--muted-foreground); font-size: 15px; }
.pk-content code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: 0.9em; }
.pk-content pre { background: #1b1530; color: #f2f0fa; padding: 16px 20px; border-radius: var(--radius-md); overflow-x: auto; font-size: 15px; line-height: 1.5; }
.pk-content pre code { background: none; padding: 0; }
.pk-content table { width: 100%; border-collapse: collapse; font-size: 16px; display: block; overflow-x: auto; }
.pk-content th, .pk-content td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.pk-content .kg-callout-card { border-radius: var(--radius-md); }
.pk-content .kg-btn-accent, .pk-content .kg-header-card-button { border-radius: var(--radius-md); }
.pk-content .kg-btn, .pk-content .kg-header-card-button { min-height: 44px; display: inline-flex; align-items: center; }
.pk-content iframe { max-width: 100%; }
/* Tarjetas del editor con fondo claro propio: texto oscuro también en modo oscuro. */
.pk-content .kg-header-card.kg-style-light,
.pk-content .kg-signup-card.kg-style-light,
.pk-content .kg-bookmark-card a.kg-bookmark-container,
.pk-content .kg-product-card-container { color: #1b1530; }

/* ───────────── Invitación a crear cuenta ───────────── */
.pk-cta {
  margin-top: 56px; padding: 32px 24px; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl);
  box-shadow: 0 10px 32px rgb(var(--shadow-color) / var(--shadow-strength));
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
@media (min-width: 640px) { .pk-cta { padding: 40px 48px; } }
.pk-cta-mark { border-radius: 16px; }
.pk-cta-eyebrow { margin: 0; color: var(--points-text); background: var(--points-soft); font-size: 14px; font-weight: 700; padding: 6px 12px; border-radius: 999px; }
.pk-cta-title { margin: 0; font-size: clamp(24px, 4vw, 32px); line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; }
.pk-cta-list { margin: 0; padding: 0; list-style: none; text-align: left; display: flex; flex-direction: column; gap: 8px; max-width: 34em; }
.pk-cta-list li { position: relative; padding-left: 28px; }
.pk-cta-list li::before {
  content: ""; position: absolute; left: 0; top: 0.35em; width: 18px; height: 18px; border-radius: 999px;
  background: var(--primary-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235531e0' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
@media (prefers-color-scheme: dark) {
  .pk-cta-list li::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b9a9ff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  }
}
.pk-cta .pk-btn { margin-top: 6px; width: 100%; max-width: 360px; }
.pk-cta-trust { margin: 0; color: var(--muted-foreground); font-size: 14px; max-width: 34em; }
.pk-cta-subscribe { margin: 4px 0 0; padding-top: 14px; border-top: 1px solid var(--border); width: 100%; color: var(--muted-foreground); font-size: 15px; }
.pk-cta-subscribe a { font-weight: 700; display: inline-block; padding: 10px 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .pk-card:hover { transform: none; }
}
