/* Psyki — estilos del corpus de contenido (páginas de artículo).
   Independiente de styles.css (la landing). Tono calmado y legible. */

:root {
  --bg: #f4f6f5;
  --surface: #ffffff;
  --ink: #2f343a;
  --ink-soft: rgba(47, 52, 58, 0.74);
  --ink-faint: rgba(47, 52, 58, 0.58);
  --accent: #3e6f86;
  --accent-dark: #2f5a6e;
  --accent-soft: #e3f0f1;
  --accent-tint: #eef5f6;
  --line: #e1e7e6;
  --line-soft: #edf1f0;
  --radius: 16px;
  --radius-sm: 12px;
  --maxw: 680px;
  --measure: 68ch;
  --space: clamp(1rem, 4vw, 1.5rem);
  --shadow-sm: 0 1px 2px rgba(31, 45, 51, 0.05);
  --shadow-md: 0 6px 22px rgba(31, 45, 51, 0.10);
  --font-head: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 10px 0;
  z-index: 10;
}
.skip-link:focus { left: 0; }

a { color: var(--accent-dark); text-decoration-color: var(--line); text-underline-offset: 2px; }
a:hover { text-decoration-color: var(--accent); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  padding: 1.1rem clamp(1rem, 4vw, 2rem);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.site-header .logo { display: inline-flex; }
.site-header .logo img { height: 34px; width: auto; display: block; }

/* Article layout */
.article {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3rem) var(--space) 4rem;
}

/* Limita la medida de línea del cuerpo de texto (~65-72ch) sin estrechar
   los bloques de ancho completo (CTA, FAQ, related, newsletter…). */
.article > p,
.article > ul,
.article > h2,
.article .intro,
.article > .byline {
  max-width: var(--measure);
}

.breadcrumbs {
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin-bottom: 1.25rem;
  letter-spacing: 0.01em;
}
.breadcrumbs a { color: var(--ink-faint); text-decoration-color: transparent; }
.breadcrumbs a:hover { color: var(--accent-dark); text-decoration-color: currentColor; }
.breadcrumbs span { color: var(--ink-soft); }

h1 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.75rem, 4.6vw, 2.5rem);
  line-height: 1.16;
  letter-spacing: -0.018em;
  margin: 0 0 0.6rem;
  max-width: 22ch;
}

.byline {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0 0 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.byline strong { color: var(--ink); font-weight: 600; }
.byline a { color: var(--accent-dark); }

.intro {
  font-size: 1.2rem;
  line-height: 1.62;
  color: var(--ink);
  font-weight: 450;
  margin: 0 0 2rem;
}

.article h2 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.6vw, 1.5rem);
  line-height: 1.28;
  letter-spacing: -0.01em;
  margin: 2.6rem 0 0.85rem;
  scroll-margin-top: 1.5rem;
}
.article h2 a { color: inherit; text-decoration-color: var(--line); }
.article h2 a:hover { text-decoration-color: var(--accent); }

.article p { margin: 0 0 1.15rem; }
.article > p strong { color: var(--ink); font-weight: 600; }

.article ul {
  margin: 0 0 1.4rem;
  padding-left: 0;
  list-style: none;
}
.article ul li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.55rem;
}
.article ul li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.62em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
}

/* FAQ */
.faq-block { margin-top: 3rem; }
.faq-block > h2 { margin-bottom: 1.1rem; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0 1.15rem;
  margin-bottom: 0.6rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.faq-item:hover { border-color: #cdd9d8; }
.faq-item[open] { border-color: var(--accent); box-shadow: var(--shadow-md); }
.faq-item summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--ink);
  cursor: pointer;
  padding: 1rem 0;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  flex: 0 0 auto;
  width: 0.62rem;
  height: 0.62rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-item summary:hover { color: var(--accent-dark); }
.faq-item p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

/* Safety note */
.safety {
  background: var(--accent-soft);
  border: 1px solid #cfe3e3;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1.05rem 1.3rem;
  margin: 2.25rem 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink);
}
.safety p { margin: 0; }
.safety strong { color: var(--accent-dark); }
.safety a { color: var(--accent-dark); }

/* Cita destacada */
.victoria-quote {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  font-style: italic;
  font-size: 1.08rem;
  color: var(--ink);
}

/* Related — tarjetas en grid */
.related-block {
  margin: 3rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.related-label {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--ink-faint);
  margin: 0 0 1.1rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
}
.related-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.1rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.97rem;
  line-height: 1.32;
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.related-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.related-card__arrow {
  flex: 0 0 auto;
  color: var(--accent);
  font-weight: 400;
  transition: transform 0.15s ease;
}
.related-card:hover .related-card__arrow { transform: translateX(3px); }

/* CTA — bloque de conversión destacado */
.article-cta {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #5FAFB3 0%, #3E6F86 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  margin: 3rem 0;
  box-shadow: 0 14px 40px rgba(62, 111, 134, 0.28);
}
.article-cta::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 60%;
  height: 180%;
  background: radial-gradient(circle, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0) 70%);
  pointer-events: none;
}
.article-cta__body { position: relative; max-width: 36rem; }
.article-cta__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0.9;
  margin: 0 0 0.5rem;
}
.article-cta h2 {
  font-family: var(--font-head);
  font-weight: 700;
  margin: 0 0 0.7rem;
  font-size: clamp(1.35rem, 3vw, 1.6rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #fff;
}
.article-cta p { margin: 0 0 1.1rem; color: rgba(255, 255, 255, 0.94); }
.article-cta__action { margin: 1.35rem 0 0; }
.article-cta__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 1.02rem;
  text-decoration: none;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(20, 40, 50, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.article-cta__link span { transition: transform 0.15s ease; }
.article-cta__link:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(20, 40, 50, 0.24);
}
.article-cta__link:hover span { transform: translateX(3px); }

/* Newsletter */
.newsletter-box {
  background: var(--accent-tint);
  border: 1px solid #d8e6e6;
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 1.85rem);
  margin: 2.5rem 0;
}
.newsletter-box h2 { font-family: var(--font-head); font-size: 1.22rem; margin: 0 0 0.4rem; }
.newsletter-box p { color: var(--ink-soft); margin: 0 0 1.1rem; }
.input-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.email-input {
  flex: 1 1 200px;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.email-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(62, 111, 134, 0.15);
}
.submit-btn {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
.submit-btn:hover { background: var(--accent-dark); }
.privacy-check { font-size: 0.83rem; color: var(--ink-soft); margin: 0.85rem 0 0; }

/* Sources */
.sources {
  margin-top: 2.75rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ink-faint);
}
.sources p {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0 0 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
}
.sources ul { padding-left: 1.1rem; margin: 0; }
.sources li { margin-bottom: 0.4rem; }
.sources a { color: var(--ink-soft); }
.sources a:hover { color: var(--accent-dark); }

/* Footer */
.identity {
  background: #2b3a42;
  color: #cdd8da;
  padding: 2.5rem clamp(1rem, 4vw, 2rem);
}
.identity-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
}
.identity h3 { font-family: var(--font-head); font-size: 1rem; margin: 0 0 0.25rem; color: #fff; }
.identity p { margin: 0 0 0.2rem; font-size: 0.9rem; }
.identity a { color: #fff; text-decoration: underline; }

/* Lista del diccionario (hub de enlaces) */
.dict-list { columns: 2; column-gap: 2.5rem; margin: 0 0 1.5rem; }
.dict-list li { break-inside: avoid; }
@media (max-width: 560px) { .dict-list { columns: 1; } }
.disclaimer {
  max-width: var(--maxw);
  margin: 1.5rem auto 0;
  font-size: 0.82rem;
  color: #93a1a4;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 600px) {
  .related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  body { font-size: 1.03125rem; }
  .input-group { flex-direction: column; }
  .submit-btn { width: 100%; }
  .article-cta__link { width: 100%; justify-content: center; }
  .faq-item summary { font-size: 0.98rem; }
}

/* Respeta la preferencia de reducir movimiento */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .related-card:hover { transform: none; }
  .article-cta__link:hover { transform: none; }
}
