/* ===========================
   The Astro Brief — editorial publication layout
   =========================== */

/* ─── Wrapper for nav + lead split — fills the viewport visually ─── */
.news-hero-wrap {
  position: relative;
  background: #1d1b25;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 64px;
}

/* Subtle accent line under nav */
.news-hero-wrap::before {
  content: '';
  position: absolute;
  top: 92px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.10) 20%, rgba(255,255,255,0.10) 80%, transparent 100%);
  z-index: 0;
}

/* ─── Lead split — intro left, featured story right ─── */
/* flex: 1 to absorb remaining viewport, align-items: center so content is
   vertically centered in the hero instead of stretching awkwardly */
.brief-lead {
  flex: 1;
  max-width: 1380px;
  width: 100%;
  margin: 0 auto;
  padding: 64px 48px 24px;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 72px;
  align-items: center;
}

.brief-lead-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 12px;
  position: relative;
}

.brief-section-tag {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #ea5c84;
  margin-bottom: 24px;
}

/* Short horizontal accent line BEFORE the eyebrow text — editorial pattern */
.brief-section-tag::before {
  content: '';
  display: inline-block;
  width: 32px;
  height: 2px;
  background: #ea5c84;
}

.brief-display {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -1.8px;
  color: #fff;
  margin: 0 0 28px;
}

.brief-display span {
  background: linear-gradient(90deg, #ea5c84 0%, #c07de8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brief-lede {
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 36px;
  max-width: 480px;
  text-wrap: pretty;
}

.brief-byline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
}

.brief-byline-label {
  text-transform: uppercase;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.35);
}

.brief-byline strong { color: #fff; font-weight: 600; }
.brief-byline-sep { color: rgba(255,255,255,0.2); margin: 0 4px; }

.brief-byline-jump {
  margin-left: auto;
  color: #ea5c84;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.brief-byline-jump:hover { opacity: 0.75; }

/* ─── Lead story card (right side) ─── */
.brief-lead-story {
  position: relative;
  display: block;
  width: 100%;
}

.brief-lead-card {
  display: block;
  width: 100%;
  text-decoration: none;
  color: inherit;
  background: #15131d;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.4s cubic-bezier(.2,.8,.2,1);
}

.brief-lead-card:hover {
  border-color: rgba(234, 92, 132, 0.4);
  transform: translateY(-4px);
}

.brief-lead-media {
  position: relative;
  height: 360px;
  overflow: hidden;
  background: #252029;
}

.brief-lead-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(.2,.8,.2,1);
}

.brief-lead-card:hover .brief-lead-media img { transform: scale(1.04); }

.brief-lead-noimg {
  width: 100%; height: 100%;
  background:
    radial-gradient(60% 80% at 30% 30%, rgba(234,92,132,0.4), transparent),
    radial-gradient(60% 80% at 80% 60%, rgba(98,78,186,0.4), transparent),
    #1a1822;
}

.brief-lead-cat {
  position: absolute;
  top: 18px; left: 18px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 10px;
  background: #ea5c84;
  color: #1d1b25;
}

.brief-lead-body {
  padding: 28px 32px 30px;
  display: flex;
  flex-direction: column;
}

.brief-lead-body .brief-section-tag {
  margin-bottom: 14px;
  padding-left: 0;
  color: rgba(234,92,132,0.85);
}

.brief-lead-h {
  font-family: 'Poppins', sans-serif;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.8px;
  color: #fff;
  margin: 0 0 14px;
  text-wrap: balance;
}

.brief-lead-p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.62);
  line-height: 1.65;
  margin: 0 0 22px;
  text-wrap: pretty;
}

.brief-lead-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
}

.brief-lead-foot strong { color: rgba(255,255,255,0.8); font-weight: 600; }
.brief-lead-read {
  color: #ea5c84;
  font-weight: 700;
  white-space: nowrap;
}

/* ─── Empty state (no posts) — sits in the lead-story slot ─── */
.brief-empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  padding: 50px 44px;
  background: #15131d;
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
}

.brief-empty::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px;
  height: 2px;
  background: linear-gradient(90deg, #ea5c84, #c07de8);
}

.brief-empty .brief-section-tag { padding-left: 0; margin-bottom: 18px; }

.brief-empty-h {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -1px;
  color: #fff;
  margin: 0 0 16px;
}

.brief-empty-p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.65;
  margin: 0 0 28px;
  max-width: 440px;
}

.brief-empty-form { display: flex; gap: 10px; flex-wrap: wrap; }

.brief-empty-form input[type="email"] {
  flex: 1 1 220px;
  min-width: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 13px 18px;
  font-size: 0.9rem;
  color: #fff;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.brief-empty-form input[type="email"]::placeholder { color: rgba(255,255,255,0.35); }
.brief-empty-form input[type="email"]:focus { border-color: rgba(234,92,132,0.6); background: rgba(255,255,255,0.07); }

.brief-empty-form button {
  background: #ea5c84;
  color: #1d1b25;
  border: none;
  padding: 13px 22px;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.brief-empty-form button:hover:not(:disabled) {
  background: #fff;
  transform: translateY(-1px);
}

.brief-empty-form button:disabled { opacity: 0.7; cursor: not-allowed; }
.brief-empty-form .newsletter-msg { flex: 1 0 100%; margin: 4px 0 0; font-size: 12px; min-height: 16px; }
.brief-empty-form .newsletter-msg.success { color: #50e0aa; }
.brief-empty-form .newsletter-msg.error   { color: #ea5c84; }

/* ─── Body / archive section ─── */
.news-main { background: #1d1b25; min-height: 40vh; }

.news-body-section {
  max-width: 1320px;
  margin: 0 auto;
  padding: 80px 48px 100px;
}

.brief-section-bar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-wrap: wrap;
}

.brief-section-heading {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #fff;
  position: relative;
  padding-left: 18px;
}
.brief-section-heading::before {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px;
  background: #ea5c84;
}

/* ─── Section meta (story count) ─── */
.brief-section-meta {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  font-variant-numeric: tabular-nums;
}

/* ─── Archive grid ─── */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 24px;
}

.brief-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1);
}

.brief-card:hover { transform: translateY(-4px); }

.brief-card-media {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: #252029;
  margin-bottom: 18px;
}

.brief-card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(.2,.8,.2,1);
}
.brief-card:hover .brief-card-media img { transform: scale(1.05); }

.brief-card-noimg {
  width: 100%; height: 100%;
  background:
    radial-gradient(50% 80% at 30% 30%, rgba(98,78,186,0.45), transparent),
    radial-gradient(50% 80% at 80% 70%, rgba(234,92,132,0.3), transparent),
    #1a1822;
}

.brief-card-cat {
  position: absolute;
  top: 14px; left: 14px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 9px;
  color: #1d1b25;
}

.brief-cat-drops   { background: #50e0aa; color: #07241a; }
.brief-cat-success { background: #c07de8; color: #1f0d2e; }
.brief-cat-news    { background: #ea5c84; color: #2a0612; }
.brief-cat-general { background: #9b8de8; color: #11082a; }

.brief-card-body { padding: 0 2px; }

.brief-card-h {
  font-family: 'Poppins', sans-serif;
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.4px;
  color: #fff;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.brief-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  flex-wrap: wrap;
}

.brief-card-meta strong { color: rgba(255,255,255,0.7); font-weight: 600; }
.brief-dot { color: rgba(255,255,255,0.2); }

/* Wide first card (when more than 1 in archive) */
.brief-card-wide {
  grid-column: span 2;
}
.brief-card-wide .brief-card-media { height: 320px; }
.brief-card-wide .brief-card-h { font-size: 1.55rem; -webkit-line-clamp: 2; }

.brief-grid-empty {
  padding: 60px 0;
  text-align: center;
  color: rgba(255,255,255,0.35);
  font-size: 0.92rem;
}

/* ─── Loading ─── */
.loading-state {
  text-align: center;
  padding: 80px 20px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.loading-dots::after {
  content: '';
  animation: dots 1.4s infinite;
}

@keyframes dots {
  0%   { content: '.'; }
  33%  { content: '..'; }
  66%  { content: '...'; }
  100% { content: ''; }
}

/* ─── Individual Post Page ─── */

/* Post page hero — compact wrapper, NOT min-height: 100vh */
.post-hero-wrap {
  position: relative;
  background: #1d1b25;
  padding-bottom: 36px;
}

/* Post page main — sized to content, no fake min-height */
.post-main {
  background: #1d1b25;
}

.post-hero {
  max-width: 760px;
  margin: 0 auto;
  padding: 36px 32px 8px;
  text-align: left;
}

.post-hero-cat {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 5px 10px;
  margin-bottom: 22px;
  color: #1d1b25;
}

.post-hero-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.12;
  letter-spacing: -1.4px;
  margin: 0 0 22px;
  text-wrap: balance;
}

.post-hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
}

.post-hero-meta strong { color: rgba(255, 255, 255, 0.8); font-weight: 600; }
.post-hero-dot { color: rgba(255, 255, 255, 0.2); }
.post-hero-author { font-weight: 500; }
.post-hero-date,
.post-hero-read { font-weight: 500; }

.post-page-wrapper {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 32px 80px;
}

.post-page-footer {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.82rem;
  font-weight: 600;
  transition: color 0.2s ease;
  text-decoration: none;
}

.back-link:hover { color: #ea5c84; }

.post-page-image {
  width: 100%;
  max-height: 480px;
  overflow: hidden;
  margin-bottom: 40px;
}

.post-page-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

.post-page-content {
  color: #c0bbc9;
  font-size: 1.05rem;
  line-height: 1.85;
}

.post-page-content p { margin-bottom: 1.5em; }
.post-page-content p:last-child { margin-bottom: 0; }

/* Inline images (markdown ![alt](url) syntax in post body) */
.post-page-content .post-figure {
  margin: 2.4em 0;
  text-align: center;
}

.post-page-content .post-figure img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.06);
}

.post-page-content .post-figure figcaption {
  margin-top: 12px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  font-style: italic;
  line-height: 1.5;
  text-align: center;
}

.post-page-content p img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  vertical-align: middle;
}

.cat-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 5px 10px;
}

.cat-badge.drops   { background: #50e0aa; color: #07241a; }
.cat-badge.success { background: #c07de8; color: #1f0d2e; }
.cat-badge.news    { background: #ea5c84; color: #2a0612; }
.cat-badge.general { background: #9b8de8; color: #11082a; }

/* ─── Responsive ─── */
@media (max-width: 1100px) {
  .news-hero-wrap { min-height: auto; padding-bottom: 64px; }
  .brief-lead { grid-template-columns: 1fr; gap: 48px; padding: 56px 32px 0; }
  .brief-lead-intro { padding-right: 0; }
  .brief-display { font-size: clamp(2.2rem, 7vw, 3.4rem); }
  .brief-lede { max-width: 100%; }
  .brief-lead-story { min-height: auto; }
  .articles-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }
  .brief-card-wide { grid-column: span 2; }
  .brief-card-wide .brief-card-media { height: 280px; }
}

@media (max-width: 768px) {
  .news-hero-wrap::before { top: 80px; }
  .brief-lead { padding: 36px 20px 0; gap: 36px; }
  .brief-display { font-size: clamp(2rem, 9vw, 2.8rem); letter-spacing: -1.4px; }
  .brief-lede { font-size: 0.95rem; }

  .brief-lead-media { height: 240px; }
  .brief-lead-body { padding: 22px 22px 24px; }
  .brief-lead-h { font-size: 1.4rem; }

  .brief-empty { padding: 36px 26px; }
  .brief-empty-h { font-size: 1.5rem; }

  .news-body-section { padding: 56px 20px 80px; }
  .brief-section-bar { gap: 14px; }
  .articles-grid { grid-template-columns: 1fr; gap: 36px; }
  .brief-card-wide { grid-column: span 1; }
  .brief-card-wide .brief-card-media,
  .brief-card-media { height: 220px; }
  .brief-card-wide .brief-card-h { font-size: 1.25rem; }
}
