:root {
  --navy: #102a43;
  --navy-deep: #081b2c;
  --white: #ffffff;
  --steel: #486581;
  --oxford: #30343b;
  --surface: #f3f6f9;
  --blue-pale: #dceaf5;
  --line: rgba(72, 101, 129, 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--oxford);
  background: var(--white);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.shell {
  width: min(1180px, calc(100% - 3rem));
  margin-inline: auto;
}

.blog-grid-bg,
.article-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(16, 42, 67, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 42, 67, 0.055) 1px, transparent 1px);
  background-size: 76px 76px;
  pointer-events: none;
}

.blog-eyebrow {
  margin: 0 0 1rem;
  color: var(--steel);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.blog-hero {
  position: relative;
  isolation: isolate;
  min-height: 720px;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 9rem 0 6rem;
  background: linear-gradient(135deg, #fff 0%, #f6f9fb 58%, #eaf2f8 100%);
}

.blog-hero::before {
  content: "JOURNAL";
  position: absolute;
  z-index: -1;
  top: 7rem;
  left: 50%;
  color: rgba(16, 42, 67, 0.032);
  font-family: var(--serif);
  font-size: clamp(8rem, 20vw, 19rem);
  font-weight: 700;
  line-height: 0.78;
  transform: translateX(-50%);
  white-space: nowrap;
}

.blog-hero__glow {
  position: absolute;
  z-index: -1;
  top: 12%;
  right: 6%;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(72, 101, 129, 0.18), transparent 67%);
  filter: blur(10px);
}

.blog-hero__layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(21rem, 0.75fr);
  gap: clamp(4rem, 10vw, 9rem);
  align-items: center;
}

.blog-hero h1 {
  max-width: 11ch;
  margin: 0;
  color: var(--navy);
  font-family: var(--serif);
  font-size: clamp(4rem, 7vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1.02;
}

.blog-hero__copy > p:last-child {
  max-width: 42rem;
  margin: 2rem 0 0;
  color: rgba(48, 52, 59, 0.72);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.8;
}

.blog-signal {
  position: relative;
  min-height: 25rem;
  padding: 2rem;
  overflow: hidden;
  border: 1px solid rgba(72, 101, 129, 0.18);
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 2rem 5rem rgba(16, 42, 67, 0.1);
  backdrop-filter: blur(18px);
}

.blog-signal::before {
  content: "";
  position: absolute;
  right: -5rem;
  bottom: -8rem;
  width: 21rem;
  height: 21rem;
  border: 1px solid rgba(72, 101, 129, 0.15);
  border-radius: 50%;
  box-shadow: 0 0 0 2.6rem rgba(72, 101, 129, 0.035), 0 0 0 5.2rem rgba(72, 101, 129, 0.025);
}

.blog-signal__label,
.blog-signal__code {
  color: var(--steel);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.blog-signal svg {
  position: absolute;
  inset: 4.7rem 1rem auto;
  width: calc(100% - 2rem);
  fill: rgba(255, 255, 255, 0.8);
  stroke: var(--steel);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.blog-signal .signal-path {
  fill: none;
  stroke-dasharray: 620;
  stroke-dashoffset: 620;
  animation: signal-draw 2.2s var(--ease) 500ms forwards;
}

.blog-signal__code {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
}

@keyframes signal-draw {
  to { stroke-dashoffset: 0; }
}

.blog-library {
  position: relative;
  padding: clamp(7rem, 11vw, 11rem) 0;
  background: var(--white);
}

.blog-library__header {
  display: grid;
  grid-template-columns: 1fr minmax(18rem, 0.52fr);
  gap: 4rem;
  align-items: end;
  margin-bottom: clamp(3.5rem, 6vw, 5.5rem);
}

.blog-library h2 {
  margin: 0;
  color: var(--navy);
  font-family: var(--serif);
  font-size: clamp(3rem, 5vw, 5.25rem);
  letter-spacing: -0.05em;
  line-height: 1.04;
}

.blog-library__header > p {
  margin: 0;
  color: rgba(48, 52, 59, 0.68);
  line-height: 1.75;
}

.blog-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
}

.blog-card {
  --pointer-x: 50%;
  --pointer-y: 50%;
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(16, 42, 67, 0.12);
  border-radius: 1.5rem;
  background: var(--white);
  box-shadow: 0 1.1rem 3.5rem rgba(16, 42, 67, 0.07);
  transition: transform 500ms var(--ease), box-shadow 500ms ease, border-color 500ms ease;
}

.blog-card:hover {
  border-color: rgba(72, 101, 129, 0.3);
  box-shadow: 0 2rem 5rem rgba(16, 42, 67, 0.14);
  transform: translateY(-0.75rem);
}

.blog-card__glow {
  position: absolute;
  z-index: 3;
  inset: 0;
  opacity: 0;
  background: radial-gradient(circle at var(--pointer-x) var(--pointer-y), rgba(169, 199, 226, 0.2), transparent 34%);
  pointer-events: none;
  transition: opacity 350ms ease;
}

.blog-card:hover .blog-card__glow {
  opacity: 1;
}

.blog-card__visual {
  position: relative;
  height: 13rem;
  overflow: hidden;
  border-bottom: 1px solid rgba(16, 42, 67, 0.09);
  background:
    linear-gradient(rgba(16, 42, 67, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 42, 67, 0.05) 1px, transparent 1px),
    linear-gradient(145deg, #f7fafc, #e9f1f7);
  background-size: 38px 38px, 38px 38px, auto;
}

.blog-card__visual::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  background: rgba(72, 101, 129, 0.1);
  filter: blur(32px);
  transform: translate(-50%, -50%);
}

.blog-card__visual svg {
  position: absolute;
  z-index: 1;
  inset: 50% auto auto 50%;
  width: 84%;
  fill: rgba(255, 255, 255, 0.75);
  stroke: var(--steel);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
  transform: translate(-50%, -50%);
  transition: transform 700ms var(--ease);
}

.blog-card:hover .blog-card__visual svg {
  transform: translate(-50%, -50%) scale(1.045);
}

.blog-card__number {
  position: absolute;
  z-index: 2;
  top: 1.25rem;
  left: 1.4rem;
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.blog-card__body {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 25rem;
  flex-direction: column;
  padding: 1.8rem;
}

.blog-card__meta {
  display: flex;
  min-height: 2.1rem;
  justify-content: space-between;
  gap: 1rem;
  color: var(--steel);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.45;
  text-transform: uppercase;
}

.blog-card h3 {
  margin: 1.65rem 0 1rem;
  color: var(--navy);
  font-family: var(--serif);
  font-size: clamp(1.75rem, 2.5vw, 2.35rem);
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.blog-card h3 a {
  text-decoration: none;
}

.blog-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.blog-card__body > p {
  margin: 0 0 2rem;
  color: rgba(48, 52, 59, 0.7);
  line-height: 1.7;
}

.blog-card__link {
  position: relative;
  z-index: 2;
  width: fit-content;
  margin-top: auto;
  color: var(--navy);
  font-size: 0.73rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.blog-card__link span {
  display: inline-block;
  margin-left: 0.35rem;
  transition: transform 280ms var(--ease);
}

.blog-card:hover .blog-card__link span {
  transform: translate(0.18rem, -0.18rem);
}

.blog-note {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: center;
  margin-bottom: clamp(6rem, 10vw, 10rem);
  padding: clamp(2rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--surface);
}

.blog-note > span {
  color: var(--steel);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.blog-note p {
  margin: 0;
  color: var(--navy);
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.3;
}

.blog-note a {
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.blog-reveal,
.article-reveal {
  opacity: 0;
  transform: translateY(2.5rem);
  transition: opacity 760ms ease, transform 980ms var(--ease);
}

.blog-reveal.is-visible,
.article-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Artículo */
.reading-progress {
  position: fixed;
  z-index: 150;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: rgba(72, 101, 129, 0.12);
}

.reading-progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--steel);
  transform: scaleX(0);
  transform-origin: left;
  will-change: transform;
}

.article-hero {
  position: relative;
  overflow: hidden;
  padding: 9rem 0 7rem;
  background: linear-gradient(145deg, #fff, #edf4f9);
}

.article-hero__inner {
  position: relative;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--steel);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-decoration: none;
  text-transform: uppercase;
}

.article-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin-top: clamp(4.5rem, 8vw, 7.5rem);
  color: var(--steel);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.article-hero__meta span + span::before {
  content: "·";
  margin-right: 1.4rem;
}

.article-hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  gap: clamp(3rem, 9vw, 8rem);
  align-items: end;
  margin-top: 1.7rem;
}

.article-hero h1 {
  max-width: 13ch;
  margin: 0;
  color: var(--navy);
  font-family: var(--serif);
  font-size: clamp(3.7rem, 7.2vw, 7.3rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1.02;
}

.article-hero h1 + p {
  max-width: 48rem;
  margin: 2rem 0 0;
  color: rgba(48, 52, 59, 0.72);
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
  line-height: 1.8;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
}

.article-tags span {
  padding: 0.58rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--steel);
  background: rgba(255, 255, 255, 0.62);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-orbit {
  position: relative;
  width: 17rem;
  height: 17rem;
}

.article-orbit > span {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 700;
  transform: translate(-50%, -50%);
}

.article-orbit svg {
  width: 100%;
  fill: none;
  stroke: rgba(72, 101, 129, 0.32);
  stroke-width: 1;
  animation: orbit-rotate 30s linear infinite;
}

.article-orbit i {
  position: absolute;
  z-index: 1;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--steel);
}

.article-orbit i:nth-of-type(1) { top: 15%; left: 25%; }
.article-orbit i:nth-of-type(2) { right: 8%; bottom: 35%; width: 0.48rem; height: 0.48rem; }
.article-orbit i:nth-of-type(3) { bottom: 7%; left: 42%; width: 0.35rem; height: 0.35rem; }

@keyframes orbit-rotate {
  to { transform: rotate(360deg); }
}

.article-layout {
  display: grid;
  grid-template-columns: 15rem minmax(0, 45rem);
  gap: clamp(3rem, 8vw, 8rem);
  justify-content: center;
  padding-block: clamp(6rem, 10vw, 10rem);
}

.article-aside {
  position: sticky;
  top: 8rem;
  align-self: start;
  padding-top: 0.5rem;
}

.article-aside > p {
  margin: 0 0 1.4rem;
  color: var(--steel);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.article-aside ol {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-aside a {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: 0.7rem;
  color: rgba(48, 52, 59, 0.62);
  font-size: 0.83rem;
  line-height: 1.45;
  text-decoration: none;
  transition: color 200ms ease;
}

.article-aside a:hover {
  color: var(--navy);
}

.article-aside a span {
  color: var(--steel);
  font-size: 0.66rem;
  font-weight: 800;
}

.article-content {
  min-width: 0;
}

.article-intro {
  margin: 0 0 4rem;
  color: var(--navy);
  font-family: var(--serif);
  font-size: clamp(1.65rem, 2.7vw, 2.35rem);
  letter-spacing: -0.025em;
  line-height: 1.42;
}

.article-section {
  scroll-margin-top: 8rem;
  padding: 1rem 0 3.7rem;
  border-top: 1px solid var(--line);
}

.article-section h2 {
  max-width: 18ch;
  margin: 1.3rem 0 1.8rem;
  color: var(--navy);
  font-family: var(--serif);
  font-size: clamp(2.2rem, 3.8vw, 3.5rem);
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.article-section p {
  margin: 0 0 1.5rem;
  color: rgba(48, 52, 59, 0.78);
  font-size: 1.05rem;
  line-height: 1.9;
}

.article-takeaway {
  position: relative;
  margin: 1.5rem 0 0;
  padding: clamp(2.2rem, 5vw, 3.7rem);
  overflow: hidden;
  border-radius: 1.25rem;
  color: var(--white);
  background: var(--navy);
}

.article-takeaway::after {
  content: "";
  position: absolute;
  right: -5rem;
  bottom: -7rem;
  width: 17rem;
  height: 17rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  box-shadow: 0 0 0 2.5rem rgba(255, 255, 255, 0.03), 0 0 0 5rem rgba(255, 255, 255, 0.02);
}

.article-takeaway span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.article-takeaway p {
  position: relative;
  z-index: 1;
  max-width: 14ch;
  margin: 1.5rem 0 0;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4vw, 3.7rem);
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.next-article {
  padding: clamp(5rem, 9vw, 8rem) 0;
  background: var(--surface);
}

.next-article p {
  margin: 0 0 1.4rem;
  color: var(--steel);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.next-article a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
  color: var(--navy);
  text-decoration: none;
}

.next-article strong {
  max-width: 18ch;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 5rem);
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.next-article a > span {
  display: grid;
  width: 4.5rem;
  height: 4.5rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 1.5rem;
  transition: color 300ms ease, background 300ms ease, transform 300ms var(--ease);
}

.next-article a:hover > span {
  color: var(--white);
  background: var(--navy);
  transform: translateX(0.3rem);
}

@media (max-width: 980px) {
  .blog-hero__layout,
  .blog-library__header {
    grid-template-columns: 1fr;
  }

  .blog-signal {
    width: min(100%, 38rem);
  }

  .blog-cards {
    grid-template-columns: 1fr;
  }

  .blog-card {
    display: grid;
    grid-template-columns: minmax(17rem, 0.8fr) 1fr;
  }

  .blog-card__visual {
    height: auto;
    min-height: 22rem;
    border-right: 1px solid rgba(16, 42, 67, 0.09);
    border-bottom: 0;
  }

  .blog-card__body {
    min-height: 22rem;
  }

  .article-hero__layout {
    grid-template-columns: 1fr;
  }

  .article-orbit {
    display: none;
  }

  .article-layout {
    grid-template-columns: minmax(0, 45rem);
  }

  .article-aside {
    position: static;
    padding: 0 0 2rem;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 2.4rem, 1180px);
  }

  .blog-hero {
    min-height: auto;
    padding: 10rem 0 5rem;
  }

  .blog-hero h1 {
    font-size: clamp(3.45rem, 16vw, 5rem);
  }

  .blog-signal {
    min-height: 19rem;
  }

  .blog-card {
    display: block;
  }

  .blog-card__visual {
    height: 12rem;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(16, 42, 67, 0.09);
  }

  .blog-card__body {
    min-height: 23rem;
  }

  .blog-note {
    grid-template-columns: 1fr;
  }

  .article-hero {
    padding: 10rem 0 5rem;
  }

  .article-hero__meta {
    gap: 0.7rem 1rem;
    margin-top: 4rem;
  }

  .article-hero__meta span + span::before {
    margin-right: 1rem;
  }

  .article-hero h1 {
    font-size: clamp(3.2rem, 14vw, 4.9rem);
  }

  .article-layout {
    padding-block: 5rem;
  }

  .next-article a {
    grid-template-columns: 1fr;
  }

  .next-article a > span {
    width: 3.8rem;
    height: 3.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .blog-reveal,
  .article-reveal {
    opacity: 1;
    transform: none;
  }
}

/* Páginas legales y de error */
.legal-hero {
  position: relative;
  overflow: hidden;
  padding: 11rem 0 5rem;
  background: linear-gradient(145deg, #fff, #edf4f9);
}

.legal-hero .shell {
  position: relative;
}

.legal-hero p {
  margin: 0 0 1rem;
  color: var(--steel);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.legal-hero h1 {
  margin: 0 0 1.3rem;
  color: var(--navy);
  font-family: var(--serif);
  font-size: clamp(3.5rem, 7vw, 6.5rem);
  letter-spacing: -0.055em;
  line-height: 1.03;
}

.legal-hero span {
  color: rgba(48, 52, 59, 0.62);
  font-size: 0.85rem;
}

.legal-content {
  max-width: 52rem;
  padding-block: clamp(5rem, 9vw, 8rem);
}

.legal-content section {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
}

.legal-content h2 {
  margin: 0 0 1rem;
  color: var(--navy);
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  letter-spacing: -0.035em;
}

.legal-content p {
  margin: 0;
  color: rgba(48, 52, 59, 0.76);
  line-height: 1.85;
}

.legal-content a {
  color: var(--navy);
  font-weight: 700;
}

.error-main {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #fff, #eaf2f8);
}

.error-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(16, 42, 67, 0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(16, 42, 67, 0.055) 1px, transparent 1px);
  background-size: 76px 76px;
}

.error-main__inner {
  position: relative;
  padding-block: 10rem 5rem;
}

.error-main__inner > p {
  margin: 0 0 1rem;
  color: var(--steel);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.error-main h1 {
  max-width: 10ch;
  margin: 0;
  color: var(--navy);
  font-family: var(--serif);
  font-size: clamp(4rem, 9vw, 8rem);
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.error-main__inner > span {
  display: block;
  max-width: 36rem;
  margin-top: 2rem;
  color: rgba(48, 52, 59, 0.68);
  line-height: 1.75;
}

.error-main__inner > a {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  min-height: 3.4rem;
  margin-top: 2.5rem;
  padding: 0 1.4rem;
  border-radius: 0.55rem;
  color: var(--white);
  background: var(--navy);
  font-weight: 800;
  text-decoration: none;
}
