/* ==========================================================================
   BE Dampierre — Custom Theme
   Palette: Violet (#7c3aed) / Deep Violet (#6d28d9) / Orange (#f97316)
   Fonts: Playfair Display (headings) / Lato (body)
   ========================================================================== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Lato', 'Helvetica Neue', Arial, sans-serif;
  color: #1f2937;
  background: #fafaf9;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: #7c3aed; text-decoration: none; transition: color .2s ease; }
a:hover { color: #6d28d9; }
a:focus-visible { outline: 2px solid #7c3aed; outline-offset: 3px; border-radius: 3px; }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  color: #111827;
  line-height: 1.25;
  font-weight: 700;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 1.875rem; margin-top: 2.5rem; margin-bottom: .75rem; }
h3 { font-size: 1.375rem; margin-top: 1.75rem; margin-bottom: .5rem; }

p { margin-bottom: 1.25rem; }

/* --- Layout Utilities --- */
.container { max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; }
.container--narrow { max-width: 780px; margin: 0 auto; padding: 0 1.25rem; }

.grid { display: grid; gap: 2rem; }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* --- Header / Nav --- */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .875rem 1.25rem;
  max-width: 1140px;
  margin: 0 auto;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: .625rem;
  text-decoration: none;
}
.site-logo__icon {
  width: 38px; height: 38px;
  background: #7c3aed;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: .875rem;
  letter-spacing: .5px;
}
.site-logo__text {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
}
.site-logo:hover .site-logo__text { color: #7c3aed; }

.site-nav { display: none; }
.site-nav ul { list-style: none; display: flex; gap: 1.75rem; align-items: center; }
.site-nav a {
  font-size: .9rem;
  font-weight: 500;
  color: #4b5563;
  text-decoration: none;
  padding: .25rem 0;
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.site-nav a:hover,
.site-nav a.active { color: #7c3aed; border-bottom-color: #7c3aed; }

@media (min-width: 768px) {
  .site-nav { display: block; }
  .mobile-toggle { display: none !important; }
}

.mobile-toggle {
  background: none; border: none; cursor: pointer;
  padding: .5rem; color: #4b5563;
}
.mobile-toggle svg { width: 24px; height: 24px; }

.mobile-nav {
  display: none;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  padding: 1rem 1.25rem;
}
.mobile-nav.is-open { display: block; }
.mobile-nav ul { list-style: none; }
.mobile-nav a {
  display: block;
  padding: .625rem 0;
  color: #4b5563;
  font-weight: 500;
  border-bottom: 1px solid #f3f4f6;
}
.mobile-nav a:hover { color: #7c3aed; }

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero__image {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(17, 24, 39, .85) 0%,
    rgba(17, 24, 39, .55) 40%,
    rgba(17, 24, 39, .15) 100%
  );
}
.hero__content {
  position: relative;
  z-index: 2;
  padding: 3rem 1.25rem 3.5rem;
  max-width: 1140px;
  margin: 0 auto;
  width: 100%;
}
.hero__tagline {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #f97316;
  margin-bottom: 1rem;
}
.hero__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.25rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  max-width: 680px;
  margin-bottom: 1rem;
}
.hero__subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,.8);
  max-width: 560px;
  line-height: 1.65;
  margin-bottom: 1.75rem;
}
.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: #7c3aed;
  color: #fff;
  font-weight: 600;
  font-size: .95rem;
  padding: .75rem 1.75rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background .2s ease, transform .15s ease;
}
.hero__cta:hover { background: #6d28d9; color: #fff; transform: translateY(-1px); }
.hero__cta svg { width: 18px; height: 18px; }

@media (min-width: 768px) {
  .hero { min-height: 600px; }
  .hero__title { font-size: 3.25rem; }
  .hero__content { padding: 4rem 2rem 4.5rem; }
}

/* --- Section Spacing --- */
.section { padding: 4.5rem 0; }
.section--alt { background: #f5f3ff; }
.section--dark { background: #111827; color: #d1d5db; }
.section__header { text-align: center; margin-bottom: 3rem; }
.section__title { font-size: 2rem; color: #111827; margin-bottom: .75rem; }
.section--dark .section__title { color: #fff; }
.section__lead {
  font-size: 1.05rem;
  color: #6b7280;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.65;
}
.section--dark .section__lead { color: #9ca3af; }

/* --- Card Component --- */
.card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  transition: box-shadow .25s ease, transform .2s ease;
}
.card:hover {
  box-shadow: 0 10px 25px rgba(0,0,0,.08), 0 4px 10px rgba(0,0,0,.04);
  transform: translateY(-3px);
}
.card__image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.card__body { padding: 1.5rem; }
.card__category {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #7c3aed;
  margin-bottom: .625rem;
}
.card__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
  margin-bottom: .75rem;
}
.card__title a { color: inherit; text-decoration: none; }
.card__title a:hover { color: #7c3aed; }
.card__excerpt {
  font-size: .9rem;
  color: #6b7280;
  line-height: 1.65;
  margin-bottom: 1rem;
}
.card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .8rem;
  color: #9ca3af;
}
.card__link {
  font-weight: 600;
  color: #7c3aed;
  text-decoration: none;
}
.card__link:hover { color: #6d28d9; text-decoration: underline; }

/* --- Feature Block --- */
.feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 768px) {
  .feature { grid-template-columns: 1fr 1fr; }
  .feature--reverse .feature__image { order: 2; }
  .feature--reverse .feature__content { order: 1; }
}
.feature__image { border-radius: 10px; overflow: hidden; }
.feature__image img { width: 100%; height: 340px; object-fit: cover; }
.feature__title { font-size: 1.75rem; margin-bottom: 1rem; }
.feature__text {
  color: #4b5563;
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 1.5rem;
}
.feature__list { list-style: none; margin-bottom: 1.5rem; }
.feature__list li {
  padding: .5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: #374151;
  font-size: .95rem;
}
.feature__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .85rem;
  width: 8px; height: 8px;
  background: #f97316;
  border-radius: 50%;
}

/* --- Category Cards --- */
.cat-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }

.cat-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  min-height: 240px;
  display: flex;
  align-items: flex-end;
  text-decoration: none;
  transition: transform .2s ease;
}
.cat-card:hover { transform: translateY(-4px); }
.cat-card__image {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.cat-card:hover .cat-card__image { transform: scale(1.05); }
.cat-card__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(17,24,39,.75), transparent 70%);
}
.cat-card__body {
  position: relative; z-index: 2;
  padding: 1.25rem;
  width: 100%;
}
.cat-card__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .25rem;
}
.cat-card__desc {
  font-size: .85rem;
  color: rgba(255,255,255,.8);
}

/* --- CTA Banner --- */
.cta-banner {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  padding: 3.5rem 2rem;
  text-align: center;
}
.cta-banner__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.cta-banner__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(124,58,237,.88), rgba(109,40,217,.92));
}
.cta-banner__content { position: relative; z-index: 2; }
.cta-banner__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.875rem;
  color: #fff;
  margin-bottom: .75rem;
}
.cta-banner__text {
  color: rgba(255,255,255,.85);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}
.cta-banner__btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: #f97316;
  color: #fff;
  font-weight: 600;
  padding: .75rem 2rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background .2s ease;
}
.cta-banner__btn:hover { background: #ea580c; color: #fff; }

/* --- Reading Progress Bar --- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #7c3aed, #f97316);
  z-index: 200;
  transition: width .1s linear;
}

/* --- Article Hero Full-Width --- */
.article-hero-full {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.article-hero-full__image {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.article-hero-full__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(17, 24, 39, .92) 0%,
    rgba(17, 24, 39, .65) 45%,
    rgba(17, 24, 39, .2) 100%
  );
}
.article-hero-full__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 2.5rem 1.25rem 3rem;
}
.article-hero-full__category {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #f97316;
  background: rgba(249, 115, 22, .12);
  padding: .3rem .75rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}
.article-hero-full__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: .875rem;
}
.article-hero-full__desc {
  font-size: 1.05rem;
  color: rgba(255,255,255,.75);
  line-height: 1.6;
  max-width: 620px;
  margin-bottom: 1.25rem;
}
.article-hero-full__meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .825rem;
  color: rgba(255,255,255,.6);
  flex-wrap: wrap;
}
.article-hero-full__meta span {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.article-hero-full__meta svg { opacity: .6; }
.article-hero-full__meta-sep {
  width: 4px; height: 4px;
  background: rgba(255,255,255,.35);
  border-radius: 50%;
  display: inline-block;
}

@media (min-width: 768px) {
  .article-hero-full { min-height: 500px; }
  .article-hero-full__title { font-size: 2.75rem; }
  .article-hero-full__content { padding: 3rem 2rem 3.5rem; }
}

/* --- Article Body --- */
.article-body {
  padding: 3rem 0 2rem;
}

/* --- Breadcrumb --- */
.breadcrumb {
  font-size: .8rem;
  color: #9ca3af;
  margin-bottom: 1.5rem;
}
.breadcrumb a { color: #6b7280; text-decoration: none; }
.breadcrumb a:hover { color: #7c3aed; }
.breadcrumb__sep { margin: 0 .4rem; color: #d1d5db; }

.breadcrumb--light { margin-bottom: 1.25rem; }
.breadcrumb--light,
.breadcrumb--light a { color: rgba(255,255,255,.5); }
.breadcrumb--light a:hover { color: rgba(255,255,255,.85); }
.breadcrumb--light .breadcrumb__sep { color: rgba(255,255,255,.25); }

/* --- Article Content (Prose) --- */
.prose { max-width: 720px; }

.prose > p:first-of-type::first-letter {
  font-family: 'Playfair Display', Georgia, serif;
  float: left;
  font-size: 3.5rem;
  line-height: .85;
  font-weight: 700;
  color: #7c3aed;
  margin-right: .15rem;
  margin-top: .1rem;
}
.prose h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.625rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: .625rem;
  border-bottom: 2px solid #ede9fe;
  color: #111827;
}
.prose h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: .625rem;
  color: #1f2937;
}
.prose p {
  margin-bottom: 1.375rem;
  line-height: 1.85;
  color: #374151;
  font-size: 1.0125rem;
}
.prose a {
  color: #7c3aed;
  text-decoration: underline;
  text-decoration-color: #ddd6fe;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  transition: text-decoration-color .2s ease;
}
.prose a:hover { text-decoration-color: #7c3aed; }
.prose strong { color: #111827; font-weight: 700; }
.prose ul, .prose ol { margin-bottom: 1.375rem; padding-left: 1.5rem; }
.prose li {
  margin-bottom: .625rem;
  color: #374151;
  line-height: 1.75;
  font-size: 1.0125rem;
}
.prose ul li::marker { color: #f97316; }
.prose ol li::marker { color: #7c3aed; font-weight: 600; }
.prose blockquote {
  border-left: 3px solid #7c3aed;
  padding: 1.25rem 1.75rem;
  margin: 2rem 0;
  background: #faf5ff;
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: #4b5563;
  line-height: 1.75;
}
.prose img {
  border-radius: 10px;
  margin: 2rem 0;
}
.prose hr {
  border: none;
  height: 1px;
  background: #e5e7eb;
  margin: 2.5rem 0;
}

/* --- Article Tags --- */
.article-tags {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}
.article-tags__label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #9ca3af;
  margin-bottom: .75rem;
}
.article-tags__list {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.article-tags__tag {
  display: inline-block;
  font-size: .8rem;
  font-weight: 500;
  color: #6d28d9;
  background: #f5f3ff;
  padding: .35rem .875rem;
  border-radius: 100px;
  text-decoration: none;
  border: 1px solid #ede9fe;
  transition: background .2s ease, color .2s ease;
}
.article-tags__tag:hover {
  background: #7c3aed;
  color: #fff;
  border-color: #7c3aed;
}

/* --- Related Articles Section --- */
.related-section {
  background: #f9fafb;
  padding: 4rem 0;
  margin-top: 1rem;
}
.related-section__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.75rem;
  text-align: center;
  margin-bottom: 2.5rem;
  color: #111827;
}

/* --- Footer --- */
.site-footer { background: #111827; color: #9ca3af; padding: 3.5rem 0 2rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
.footer__heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 1rem;
  font-weight: 700;
}
.footer__text { font-size: .9rem; line-height: 1.65; }
.footer__links { list-style: none; }
.footer__links li { margin-bottom: .5rem; }
.footer__links a {
  color: #9ca3af;
  font-size: .9rem;
  text-decoration: none;
  transition: color .2s ease;
}
.footer__links a:hover { color: #f97316; }
.footer__bottom {
  border-top: 1px solid #1f2937;
  padding-top: 1.5rem;
  text-align: center;
  font-size: .8rem;
  color: #6b7280;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
}
.pagination__btn {
  display: inline-block;
  padding: .5rem 1.25rem;
  background: #7c3aed;
  color: #fff;
  border-radius: 6px;
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
  transition: background .2s ease;
}
.pagination__btn:hover { background: #6d28d9; color: #fff; }
.pagination__info { font-size: .85rem; color: #9ca3af; }

/* --- Print --- */
@media print {
  .site-header, .site-footer, .mobile-toggle, .mobile-nav, .hero__cta,
  .cta-banner, .pagination, .related { display: none; }
  .prose { max-width: 100%; }
  body { color: #000; background: #fff; }
}
