/* ==========================================================================
   We Buy Exotics — Blog post (article detail)
   Layers on top of styles.css and blog.css: reuses the tokens, buttons, light
   navigation and footer from the first, the post card from the second, and
   adds only what this page introduces — the post masthead, the article column
   with its contents rail, and the inline conversion card.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Masthead — back link, title, date and the lead image
   -------------------------------------------------------------------------- */

.phero{
  background:var(--n50);
  display:flex;
  align-items:center;
}

.phero__copy{
  flex:1 1 0;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:24px;
  padding-right:48px;
}

.phero__back{
  display:inline-flex;
  align-items:center;
  align-self:flex-start;
  gap:6px;
  padding:2px 6px;
  margin-left:-6px;
  border-radius:var(--r-sm);
  font-size:14px;
  line-height:20px;
  color:var(--n500);
  transition:color .18s ease, background-color .18s ease;
}
.phero__back:hover{ color:var(--ink); background:rgba(0,0,0,.05); }

.phero__meta{ display:flex; flex-direction:column; gap:12px; }
.phero__title{
  margin:0;
  font-family:var(--font-head);
  font-weight:900;
  font-size:48px;
  line-height:48px;
  letter-spacing:-1px;
  color:var(--ink);
}
.phero__date{ font-size:14px; line-height:20px; color:var(--n500); }

.phero__media{
  flex:1 1 0;
  min-width:0;
  height:320px;
  border-radius:6px;
  overflow:hidden;
}
.phero__media img{ width:100%; height:100%; object-fit:cover; }

/* --------------------------------------------------------------------------
   Article — contents rail beside a single 800px column
   -------------------------------------------------------------------------- */

.article{
  background:#fff;
  display:grid;
  grid-template-columns:300px minmax(0, 1fr);
  column-gap:100px;
  align-items:start;
}

/* Contents rail ---------------------------------------------------------- */

.toc{
  position:sticky;
  top:32px;
  display:flex;
  flex-direction:column;
  gap:16px;
}
.toc a{
  font-size:16px;
  line-height:24px;
  color:var(--n500);
  transition:color .18s ease;
}
.toc a:hover{ color:var(--ink); }
.toc a.is-current{ font-weight:700; color:var(--red-bright); }

/* Prose ------------------------------------------------------------------ */

.prose{ display:flex; flex-direction:column; gap:32px; }

/* Scoped to the written blocks so the inline CTA below keeps its own type. */
.prose__intro p,
.prose__block p{ font-size:16px; line-height:24px; color:var(--ink); }
.prose__intro p + p,
.prose__block p + p,
.prose__block p + .prose__list,
.prose__block .prose__list + p{ margin-top:16px; }

/* A numbered part of the article: a heading block plus its sub-headings. */
.prose__section{ display:flex; flex-direction:column; gap:24px; }
.prose__block{ display:flex; flex-direction:column; }

.prose__h2{
  margin:0 0 16px;
  font-family:var(--font-head);
  font-weight:700;
  font-size:30px;
  line-height:32px;
  color:var(--red-bright);
  scroll-margin-top:32px;
}
.prose__h3{
  margin:0 0 16px;
  font-family:var(--font-head);
  font-weight:700;
  font-size:24px;
  line-height:28.8px;
  color:var(--n700);
}

.prose__list{
  list-style:disc;
  padding-left:24px;
  font-size:16px;
  line-height:24px;
  color:var(--ink);
}
.prose__list li + li{ margin-top:8px; }
.prose__list strong{ font-weight:700; }

.prose__link{ text-decoration:underline; text-underline-offset:2px; }
.prose__link:hover{ color:var(--red); }

/* --------------------------------------------------------------------------
   Inline conversion card — the closing CTA, scaled into the article column
   -------------------------------------------------------------------------- */

.pcta{
  position:relative;
  isolation:isolate;
  display:flex;
  align-items:center;
  gap:48px;
  min-height:256px;
  padding:32px;
  border-radius:var(--r-xl);
  overflow:hidden;
  color:var(--n50);
  background:linear-gradient(-75.38deg, var(--red) 0%, var(--red-deep) 100%);
}
.pcta__inner{
  position:relative;
  z-index:1;
  flex:1 1 0;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:24px;
}
.pcta__head{ display:flex; flex-direction:column; gap:12px; }
.pcta__lede{ max-width:375px; color:var(--n300); }
.pcta__actions{ display:flex; gap:10px; flex-wrap:wrap; }
.pcta__car{
  position:absolute;
  right:-300px;
  top:calc(50% + 49px);
  transform:translateY(-50%);
  width:570px;
  padding-bottom:3rem;
  max-width:none;
  height:auto;
  z-index:0;
  pointer-events:none;
}

/* --------------------------------------------------------------------------
   Related posts
   -------------------------------------------------------------------------- */

.related{
  background:#fff;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:64px;
}
.related__inner{
  width:100%;
  display:flex;
  flex-direction:column;
  gap:48px;
}
.related__head{
  display:flex;
  align-items:center;
  gap:24px;
}
.related__head .h2{ flex:1 1 0; min-width:0; }
.related__head .btn{ flex:none; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width:1200px){
  .article{ grid-template-columns:260px minmax(0, 1fr); column-gap:64px; }
  /* Aca el riel se come ancho y la tarjeta queda mas angosta: el auto baja un
     poco para no meterse debajo de los botones. */
  .pcta__car{ right:-300px; width:500px; }
}

@media (max-width:1024px){
  /* The rail has nowhere to sit once the column goes full width. */
  .toc{ display:none; }
  .article{ display:block; }

  .phero{ flex-direction:column; align-items:stretch; gap:24px; }
  .phero__copy{ padding-right:0; }
  .phero__title{ font-size:40px; line-height:42px; }
  .phero__media{ flex:none; height:240px; }

  /* Apilada, igual que en telefono: el auto cruza todo el ancho de la tarjeta
     y asoma 30px por la derecha. El alto del auto es ~42% de su ancho, asi que
     el espacio que se le reserva abajo se calcula sobre el ancho de la tarjeta
     (34.7% del ancho + el aire de arriba) y la proporcion sale igual en
     cualquier pantalla: siempre quedan ~31px entre los botones y el techo del
     auto, de 1024 a 390. */
  .pcta{ flex-direction:column; align-items:stretch; gap:24px;
         padding-bottom:calc(34.7% + 92px); }
  .pcta__car{ right:-30px; top:auto; bottom:-8px; transform:none;
              width:calc(100% + 60px); }

  .related__head{ flex-direction:column; align-items:stretch; }
}

@media (max-width:640px){
  .phero__title{ font-size:32px; line-height:34px; letter-spacing:-.5px; }

  .prose__h2{ font-size:26px; line-height:28px; }
  .prose__h3{ font-size:20px; line-height:24px; }

  .related{ gap:48px; }
  .related__inner{ gap:32px; }

  /* Los laterales se achican; el auto y el espacio de abajo ya los resuelve
     la regla de arriba, que es proporcional. */
  .pcta{ padding-left:20px; padding-right:20px; padding-top:24px; }
  .pcta__actions{ flex-direction:column; align-items:stretch; }
  .pcta__actions .btn{ width:100%; }
}
