/* ─────────────────────────────────────────────
   Juara Magazine — Custom Stylesheet
   Complements TailwindCSS CDN
   ───────────────────────────────────────────── */

/* ── Base ─────────────────────────────────── */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: #ea580c;
  color: #fff;
}

/* ── Focus & Accessibility ────────────────── */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #ea580c;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Hero parallax layer ──────────────────── */
.hero-bg {
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
}

.hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(12, 10, 9, 0.72) 0%,
    rgba(12, 10, 9, 0.45) 50%,
    rgba(12, 10, 9, 0.25) 100%
  );
}

/* ── Fade-in animation ────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Card image hover ─────────────────────── */
.card-img-wrap {
  overflow: hidden;
}

.card-img-wrap img {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.group:hover .card-img-wrap img {
  transform: scale(1.05);
}

/* ── Prose typography ─────────────────────── */
.prose {
  max-width: 68ch;
}

.prose h2 {
  margin-top: 2.75rem;
  margin-bottom: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.prose h2:first-child {
  border-top: none;
  padding-top: 0;
}

.prose h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.prose p {
  margin-bottom: 1.125rem;
  line-height: 1.8;
}

.prose ul, .prose ol {
  margin-bottom: 1.125rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose blockquote {
  border-left: 3px solid #ea580c;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #57534e;
  background: #fafaf9;
  border-radius: 0 0.5rem 0.5rem 0;
}

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

.prose img {
  border-radius: 0.75rem;
  margin: 2rem auto;
}

.prose table {
  font-size: 0.925rem;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.prose thead th {
  background: #f9fafb;
  font-weight: 600;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid #e5e7eb;
}

.prose tbody td {
  padding: 0.625rem 1rem;
  border-bottom: 1px solid #f3f4f6;
}

.prose tbody tr:last-child td {
  border-bottom: none;
}

/* ── Article lead paragraph ──────────────── */
.article-body > p:first-child {
  font-size: 1.2rem;
  line-height: 1.75;
  color: #44403c;
}

/* ── Line clamp ───────────────────────────── */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Separator ────────────────────────────── */
.section-sep {
  width: 48px;
  height: 3px;
  background: #ea580c;
  border-radius: 2px;
}

/* ── Print ────────────────────────────────── */
@media print {
  header, footer, nav, .no-print, #reading-progress { display: none !important; }
  .prose { max-width: 100%; }
  body { background: #fff; }
}
