/* ═══════════════════════════════════════════════════════════════
   JOÃOGPT — Article Layout & Prose
   Inclui: hero, prose, byline, callout, pullquote, share bar,
           integração com tweet-card (.tweet-card, .tweet-thread)
   ═══════════════════════════════════════════════════════════════ */

/* ── Article hero ─────────────────────────────────────────────── */
.article-hero {
  padding-top: calc(var(--nav-h) + 64px);
  padding-bottom: 56px;
  background: var(--void);
  position: relative;
  overflow: hidden;
}

.article-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 0%,
    rgba(196, 245, 90, 0.07) 0%,
    transparent 70%);
  pointer-events: none;
}

.article-hero-inner {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ── Breadcrumb & meta row ────────────────────────────────────── */
.article-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.article-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--t-fast);
}

.article-breadcrumb:hover {
  color: var(--electric);
}

.article-meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}

.article-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 99px;
}

.tag-launch   { background: rgba(196,245,90,0.12);  color: #C4F55A; }
.tag-analysis { background: rgba(232,255,138,0.10); color: #E8FF8A; }
.tag-model    { background: rgba(158,227,58,0.12);  color: #9EE33A; }
.tag-tool     { background: rgba(118,224,48,0.12);  color: #76E030; }
.tag-opinion  { background: rgba(245,166,35,0.12);  color: #F5A623; }

.article-date, .article-read {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ── Hero title & excerpt ─────────────────────────────────────── */
.article-title {
  font-family: var(--font-headline);
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.article-excerpt {
  font-size: var(--text-lg);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 640px;
  margin-bottom: 36px;
}

/* ── Byline bar ───────────────────────────────────────────────── */
.article-byline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.article-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.article-author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-headline);
  font-size: 14px;
  font-weight: 700;
  color: #080810;
  flex-shrink: 0;
}

.article-author-name {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.article-author-handle {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Share bar in byline */
.article-share {
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface-high);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast);
  text-decoration: none;
}

.share-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-light);
}

.share-btn svg { flex-shrink: 0; }

/* ── Main layout ──────────────────────────────────────────────── */
.article-main {
  padding-bottom: 120px;
}

.article-layout {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--container-px);
}

/* ── Prose ────────────────────────────────────────────────────── */
.article-prose {
  padding-top: 52px;
}

.article-prose p {
  font-size: var(--text-base);
  line-height: 1.8;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.article-prose p:last-child {
  margin-bottom: 0;
}

/* Lead paragraph */
.article-prose .article-lead {
  font-size: var(--text-lg);
  line-height: 1.7;
  color: var(--text-primary);
  font-weight: 400;
  margin-bottom: 32px;
}

/* Headings in prose */
.article-prose h2 {
  font-family: var(--font-headline);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin: 52px 0 20px;
  line-height: 1.25;
}

.article-prose h3 {
  font-family: var(--font-headline);
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 36px 0 14px;
}

/* Divider */
.article-prose hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 48px 0;
}

/* Links */
.article-prose a {
  color: var(--electric);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(196, 245, 90, 0.3);
  transition: color var(--t-fast), text-decoration-color var(--t-fast);
}

.article-prose a:hover {
  color: #fff;
  text-decoration-color: rgba(255,255,255,0.4);
}

/* Strong */
.article-prose strong {
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Pull quote ───────────────────────────────────────────────── */
.article-pullquote {
  position: relative;
  margin: 40px 0;
  padding: 28px 32px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}

.article-pullquote::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient-brand);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.article-pullquote p {
  font-family: var(--font-headline);
  font-size: var(--text-xl);
  line-height: 1.5;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 !important;
  font-style: italic;
}

.article-pullquote cite {
  display: block;
  font-size: var(--text-xs);
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 14px;
}

/* ── Callout / Key facts box ──────────────────────────────────── */
.article-callout {
  margin: 36px 0;
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  background: rgba(196, 245, 90, 0.05);
  border: 1px solid rgba(196, 245, 90, 0.15);
}

.article-callout-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-headline);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--electric);
  margin-bottom: 16px;
}

.article-callout-title svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.article-callout ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article-callout ul li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--text-secondary);
}

.article-callout ul li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--electric);
  margin-top: 7px;
  flex-shrink: 0;
}

/* Warning callout variant */
.article-callout.warning {
  background: rgba(245, 166, 35, 0.06);
  border-color: rgba(245, 166, 35, 0.18);
}

.article-callout.warning .article-callout-title {
  color: #F5A623;
}

.article-callout.warning ul li::before {
  background: #F5A623;
}

/* ── Tweet embed spacing inside prose ────────────────────────── */
/* tweet-context já está definido em tweets.css — ajuste de margens no contexto editorial */
.article-prose .tweet-context {
  margin-top: 44px;
  margin-bottom: 4px;
}

.article-prose .tweet-card {
  margin-top: 4px;
  margin-bottom: 44px;
}

.article-prose .tweet-thread {
  margin-top: 44px;
  margin-bottom: 44px;
}

.article-prose .tweet-note {
  margin-top: -32px;
  margin-bottom: 44px;
}

/* ── Article divider label ────────────────────────────────────── */
.article-section-sep {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 52px 0 48px;
  color: var(--text-muted);
}

.article-section-sep::before,
.article-section-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.article-section-sep span {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── Author box ───────────────────────────────────────────────── */
.article-author-box {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin: 64px 0 0;
  padding: 28px 32px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

.article-author-box-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-headline);
  font-size: 22px;
  font-weight: 700;
  color: #080810;
  flex-shrink: 0;
}

.article-author-box-name {
  font-family: var(--font-headline);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.article-author-box-handle {
  font-size: var(--text-xs);
  color: var(--electric);
  margin-bottom: 12px;
}

.article-author-box-bio {
  font-size: var(--text-sm);
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.article-author-box-follow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--electric);
  transition: color var(--t-fast), gap var(--t-fast);
}

.article-author-box-follow:hover {
  color: var(--neon);
  gap: 10px;
}

/* ── Newsletter CTA inside article ───────────────────────────── */
.article-newsletter-cta {
  margin-top: 64px;
  padding: 36px 40px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.article-newsletter-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-glow);
  pointer-events: none;
}

.article-newsletter-cta-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(196, 245, 90, 0.10);
  border: 1px solid rgba(196, 245, 90, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--electric);
  position: relative;
  z-index: 1;
}

.article-newsletter-cta h3 {
  font-family: var(--font-headline);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.article-newsletter-cta p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.article-newsletter-form {
  display: flex;
  gap: 10px;
  max-width: 400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.article-newsletter-form .form-input {
  flex: 1;
  background: var(--surface-high);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 16px;
  font-size: var(--text-sm);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--t-fast);
  font-family: var(--font-body);
}

.article-newsletter-form .form-input:focus {
  border-color: var(--electric);
}

.article-newsletter-form .form-input::placeholder {
  color: var(--text-muted);
}

/* ── Related articles ─────────────────────────────────────────── */
.article-related {
  margin-top: 80px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.article-related-title {
  font-family: var(--font-headline);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.article-related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.article-related-card {
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color var(--t-base);
  display: block;
}

.article-related-card:hover {
  border-color: rgba(196, 245, 90, 0.3);
}

.article-related-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--electric);
  margin-bottom: 10px;
}

.article-related-card h4 {
  font-family: var(--font-headline);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.article-related-card p {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ── Progress bar ─────────────────────────────────────────────── */
.article-progress {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(42, 42, 66, 0.5);
  z-index: 99;
}

.article-progress-bar {
  height: 100%;
  background: var(--gradient-brand);
  width: 0%;
  transition: width 0.1s linear;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .article-hero {
    padding-top: calc(var(--nav-h) + 40px);
    padding-bottom: 40px;
  }

  .article-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .article-share { display: none; } /* hidden on mobile, share via footer */

  .article-pullquote {
    padding: 22px 22px 22px 28px;
  }

  .article-pullquote p {
    font-size: var(--text-lg);
  }

  .article-author-box {
    flex-direction: column;
    gap: 16px;
    padding: 24px;
  }

  .article-newsletter-cta {
    padding: 28px 24px;
  }

  .article-newsletter-form {
    flex-direction: column;
  }

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

/* ── Reveal animations ────────────────────────────────────────── */
.article-prose .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.article-prose .reveal.visible {
  opacity: 1;
  transform: none;
}
