/* ==========================================================================
   Miami Marketer Blog — article reading area overrides + blog-only components
   Loaded AFTER site-chrome.css (production styles). Only defines what's NEW
   or different: light body, article layout, TL;DR, FAQ, CTA block, reveals.
   ========================================================================== */

/* ---------- Override: light body for reading, keep header/footer dark ---------- */
html, body {
  background: #ffffff;
  color: #0d0d0d;
}
body {
  font-family: var(--font-body, "Inter", -apple-system, sans-serif);
  font-size: 1.125rem;
  line-height: 1.75;
}

/* Blog article link styling (overrides production's light-on-dark link styles) */
.article__body a,
.article__body a:visited {
  color: #c40010;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.article__body a:hover {
  color: #fc0311;
}

/* Make sure article headings are dark on white, not production's white */
.article h1, .article h2, .article h3, .article h4, .article h5, .article h6,
.article__body h1, .article__body h2, .article__body h3, .article__body h4 {
  color: #0d0d0d;
}
.article__body strong { color: #0d0d0d; }
.article__body p,
.article__body li { color: #0d0d0d; }

/* Push content below fixed production header */
.site-main {
  padding-top: 120px;
  padding-bottom: 4rem;
  background: #ffffff;
}

/* ---------- Article (single) layout ---------- */
.article {
  max-width: 68ch;
  margin-inline: auto;
  padding-block: 2rem 1rem;
  padding-inline: 1.25rem;
}
@media (min-width: 768px) { .article { padding-inline: 0; } }

.article__breadcrumb {
  font-size: 0.875rem;
  color: #5a5a5a;
  margin-bottom: 1rem;
  display: none;
}
@media (min-width: 1024px) { .article__breadcrumb { display: block; } }
.article__breadcrumb a { color: #5a5a5a; text-decoration: none; }
.article__breadcrumb a:hover { color: #fc0311; }
.article__breadcrumb .sep { margin: 0 0.4rem; color: #8a8a8a; }

.article__header { margin-bottom: 2rem; }
.article__title {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin-bottom: 1rem;
  color: #0d0d0d;
}
.article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: #5a5a5a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.article__meta .dot { color: #8a8a8a; }
.article__meta .tag {
  background: #f7f7f8;
  padding: 3px 10px;
  border-radius: 4px;
  text-transform: none;
  letter-spacing: 0;
  color: #c40010;
  font-weight: 700;
}

.article__hero { margin-bottom: 2.5rem; }
.article__hero img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
.article__hero-caption {
  font-size: 0.875rem;
  color: #8a8a8a;
  text-align: center;
  margin-top: 0.75rem;
}

.article__body {
  font-size: 1.0625rem;
  line-height: 1.75;
}
@media (min-width: 1024px) { .article__body { font-size: 1.125rem; } }

.article__body p { margin: 0 0 1.2em; color: #0d0d0d; }
.article__body p:first-of-type { font-size: 1.1em; }
.article__body h2 {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 2.25rem;
  line-height: 1.15;
  margin-top: 2.5em;
  margin-bottom: 0.5em;
  color: #0d0d0d;
}
.article__body h3 {
  font-family: var(--font-body, Inter, sans-serif);
  font-weight: 700;
  font-size: 1.375rem;
  margin-top: 2em;
  margin-bottom: 0.4em;
  color: #0d0d0d;
}
.article__body ul, .article__body ol { margin: 0 0 1.4em 1.5em; }
.article__body li { margin-bottom: 0.5em; }
.article__body li::marker { color: #fc0311; }
.article__body img {
  margin: 2rem auto;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.article__body blockquote {
  border-left: 3px solid #fdc054;
  padding: 0.2em 0 0.2em 1.25em;
  margin: 1.5em 0;
  font-style: italic;
  color: #5a5a5a;
}
.article__body code {
  font-family: "JetBrains Mono", Menlo, monospace;
  font-size: 0.9em;
  background: #ececee;
  padding: 2px 6px;
  border-radius: 4px;
}
.article__body hr {
  border: 0;
  border-top: 1px solid #e2e2e4;
  margin: 3em 0;
}

/* ---------- TL;DR block ---------- */
.tldr {
  background: #f7f7f8;
  border-top: 3px solid #fdc054;
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  margin: 2rem 0 2.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.tldr__label {
  font-family: var(--font-body, Inter, sans-serif);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
  color: #c89009;
  margin-bottom: 0.75rem;
}
.tldr ul { margin: 0; padding-left: 1.25rem; }
.tldr li { margin-bottom: 0.4em; color: #0d0d0d; font-size: 1rem; line-height: 1.55; }
.tldr li:last-child { margin-bottom: 0; }
.tldr li::marker { color: #fdc054; }

/* ---------- Soft inline CTA ---------- */
.cta-soft {
  background: #f7f7f8;
  border-left: 3px solid #fc0311;
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.25rem;
  margin: 1.8rem 0;
  font-size: 1rem;
  color: #0d0d0d;
}
.cta-soft a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; color: #c40010; }
.cta-soft::before { content: "→ "; color: #fc0311; font-weight: 800; }

/* ---------- Closing CTA block ---------- */
.cta-block {
  background: #f7f7f8;
  border: 1px solid #e2e2e4;
  border-radius: 12px;
  padding: 2rem 1.75rem;
  margin: 3rem 0 2rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}
.cta-block::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #fc0311, #fdc054);
}
.cta-block__eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
  color: #fc0311;
  margin-bottom: 0.6rem;
}
.cta-block__headline {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.875rem;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  color: #0d0d0d;
}
@media (min-width: 640px) { .cta-block__headline { font-size: 2.25rem; } }
.cta-block__pitch {
  color: #5a5a5a;
  font-size: 1.05rem;
  max-width: 50ch;
  margin-bottom: 1.5rem;
}
.cta-block .btn { margin-top: 0.5rem; }
.cta-block .btn .arrow { font-weight: 900; transition: transform 0.2s ease; }
.cta-block .btn:hover .arrow { transform: translateX(3px); }

/* ---------- Popups (scroll-triggered, not annoying) ---------- */
/* State-toggled via [data-state="open"]. Transitions run on every open/close. */
.mm-popup {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  pointer-events: none;
}
.mm-popup[data-state="open"] {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.mm-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 13, 13, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.mm-popup__card {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  padding: 2.25rem 1.75rem 2rem;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  transform: translateY(32px);
  transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
  border-top: 4px solid transparent;
  background-image: linear-gradient(#ffffff, #ffffff), linear-gradient(90deg, #fc0311, #fdc054);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}
.mm-popup[data-state="open"] .mm-popup__card { transform: translateY(0); }

@media (min-width: 640px) { .mm-popup__card { padding: 2.5rem 2rem 2rem; } }

.mm-popup__close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: #8a8a8a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, background 0.2s ease;
  padding: 0;
}
.mm-popup__close:hover { color: #0d0d0d; background: #ececee; }

.mm-popup__eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 800;
  color: #fc0311;
  margin-bottom: 0.75rem;
}
.mm-popup__headline {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  line-height: 1.1;
  margin: 0 0 0.85rem;
  color: #0d0d0d;
  max-width: 18ch;
  letter-spacing: 0.01em;
}
.mm-popup__pitch {
  color: #5a5a5a;
  font-size: 1rem;
  line-height: 1.55;
  margin: 0 0 1.5rem;
}
.mm-popup__card .btn {
  width: auto;
}
.mm-popup__secondary {
  display: block;
  background: none;
  border: 0;
  color: #5a5a5a;
  font-size: 0.875rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  margin-top: 1rem;
  padding: 0.5rem 0 0;
  transition: color 0.2s ease;
  text-align: left;
  font-family: inherit;
}
.mm-popup__secondary:hover { color: #c40010; }

body.mm-popup-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .mm-popup, .mm-popup__card {
    transition: opacity 0.01s linear;
    transform: none;
  }
}

/* ---------- Share buttons ---------- */
.article__share {
  margin: 3rem 0 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid #e2e2e4;
  border-bottom: 1px solid #e2e2e4;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.article__share-label {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #5a5a5a;
  margin-right: 0.5rem;
}
.article__share-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f7f7f8;
  border: 1px solid #e2e2e4;
  color: #5a5a5a;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  padding: 0;
  position: relative;
}
.share-btn:hover {
  background: #0d0d0d;
  color: #ffffff;
  border-color: #0d0d0d;
  transform: translateY(-1px);
}
.share-btn--linkedin:hover { background: #0a66c2; border-color: #0a66c2; }
.share-btn--x:hover        { background: #0d0d0d; border-color: #0d0d0d; }
.share-btn--facebook:hover { background: #1877f2; border-color: #1877f2; }
.share-btn--whatsapp:hover { background: #25d366; border-color: #25d366; }
.share-btn--email:hover    { background: #fc0311; border-color: #fc0311; }
.share-btn--sms:hover      { background: #fc0311; border-color: #fc0311; }
.share-btn--copy:hover     { background: #c40010; border-color: #c40010; color: #ffffff; }
.share-btn--native:hover   { background: #fc0311; border-color: #fc0311; }

.share-btn__tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #0d0d0d;
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}
.share-btn.show-tooltip .share-btn__tooltip { opacity: 1; }

/* SMS button hidden on desktop (useless there) */
@media (min-width: 768px) {
  .share-btn--mobile-only { display: none; }
}

/* ---------- FAQ ---------- */
.faq { margin-top: 3rem; }
.faq__title {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 2.25rem;
  line-height: 1.15;
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: #0d0d0d;
}
.faq__items { display: grid; gap: 0; }
.faq__item {
  border-bottom: 1px solid #e2e2e4;
  padding: 1.25rem 0;
}
.faq__item:last-child { border-bottom: none; }
.faq__q { font-weight: 700; font-size: 1.1rem; margin-bottom: 0.5rem; color: #0d0d0d; }
.faq__a { color: #5a5a5a; margin: 0; line-height: 1.65; }

/* ---------- Author bio ---------- */
.author-bio {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  background: #f7f7f8;
  padding: 1.5rem;
  border-radius: 12px;
  margin-top: 3rem;
  border: 1px solid #e2e2e4;
}
.author-bio__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 0 0 3px #fc0311;
}
.author-bio__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.author-bio__info { flex: 1; }
.author-bio__name { font-weight: 800; color: #0d0d0d; margin-bottom: 0.25rem; font-size: 1.05rem; }
.author-bio__bio { font-size: 0.925rem; color: #5a5a5a; line-height: 1.55; }

/* ---------- Related posts ---------- */
.related {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e2e4;
}
.related__title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
  color: #5a5a5a;
  margin-bottom: 1.5rem;
}
.related__grid { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .related__grid { grid-template-columns: repeat(3, 1fr); } }
.related__card {
  display: block;
  padding: 1.25rem;
  border: 1px solid #e2e2e4;
  border-radius: 12px;
  text-decoration: none;
  color: #0d0d0d;
  background: #ffffff;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.35s ease;
}
.related__card:hover {
  border-color: #fc0311;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  color: #0d0d0d;
}
.related__card h4 { font-size: 1.05rem; margin: 0 0 0.3rem; line-height: 1.3; color: #0d0d0d; }
.related__card p { font-size: 0.875rem; color: #5a5a5a; margin: 0; }

/* ---------- Page hero (blog index) ---------- */
.page-hero {
  padding: 3rem 0 2.5rem;
  text-align: center;
  border-bottom: 1px solid #e2e2e4;
  margin-bottom: 3rem;
}
.page-hero h1 {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  line-height: 1.05;
  max-width: 22ch;
  margin-inline: auto;
  color: #0d0d0d;
}
.page-hero__tagline {
  max-width: 50ch;
  margin: 1rem auto 0;
  color: #5a5a5a;
  font-size: 1.05rem;
}

/* ---------- Post list (blog index) ---------- */
.post-list {
  display: grid;
  gap: 2.5rem;
  max-width: 68ch;
  margin-inline: auto;
  padding: 3rem 1.25rem 0;
}
@media (min-width: 768px) { .post-list { padding-inline: 0; padding-top: 4rem; } }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.post-card {
  padding: 0 0 2.5rem;
  border-bottom: 1px solid #e2e2e4;
}
.post-card:last-child { border-bottom: none; }
.post-card__meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: #5a5a5a;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.post-card__meta .dot { color: #8a8a8a; }
.post-card__title {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 2rem;
  line-height: 1.1;
  margin-bottom: 0.4rem;
}
.post-card__title a { color: #0d0d0d; text-decoration: none; }
.post-card__title a:hover { color: #fc0311; }
.post-card__desc { color: #5a5a5a; font-size: 1.05rem; margin-bottom: 0.8rem; }
.post-card__read { font-size: 0.925rem; font-weight: 600; color: #c40010; text-decoration: none; }
.post-card__read:hover { color: #fc0311; }

/* ---------- Scroll-reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.stagger-1 { transition-delay: 0.08s; }
.stagger-2 { transition-delay: 0.16s; }
.stagger-3 { transition-delay: 0.24s; }
.stagger-4 { transition-delay: 0.32s; }
.stagger-5 { transition-delay: 0.40s; }

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-anim { opacity: 0; animation: fadeSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.hero-anim-1 { animation-delay: 0.12s; }
.hero-anim-2 { animation-delay: 0.26s; }
.hero-anim-3 { animation-delay: 0.40s; }
.hero-anim-4 { animation-delay: 0.54s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-anim { opacity: 1; animation: none; }
}

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #fc0311;
  color: #ffffff;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 999;
}
.skip-link:focus { top: 0; }

/* Focus rings on interactive elements */
:focus-visible { outline: 2px solid #fc0311; outline-offset: 2px; border-radius: 2px; }

/* Print */
@media print {
  .site-header, .site-footer, .cta-block, .cta-soft, .related { display: none; }
  body { color: #000; background: #fff; }
  a { color: #000; text-decoration: underline; }
}
