/* ============================================================
   Decorator — Premium Article Template
   Supplement to /styles.css — load after it on article pages
   ============================================================ */

/* ---------- Reading Progress Bar ---------- */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: transparent;
  z-index: 9999;
  pointer-events: none;
}
#reading-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #C99846, #E0A93A);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.08s linear;
  will-change: transform;
}

/* ---------- Article Layout ---------- */
.article-premium {
  padding: 0 0 7rem;
}

/* ---------- Article Hero ---------- */
.article-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 0;
}

.article-hero-gradient {
  width: 100%;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  position: relative;
}

/* Hero variant: warm cream/sand */
.hero-warm {
  background: linear-gradient(135deg, #F5EFE6 0%, #FAF6EC 45%, #EDE4D5 100%);
}
/* Hero variant: dusty rose */
.hero-rose {
  background: linear-gradient(135deg, #F4E5E1 0%, #FAF1ED 45%, #ECD7D0 100%);
}
/* Hero variant: muted green */
.hero-green {
  background: linear-gradient(135deg, #E8EEE3 0%, #F4F7EE 45%, #D9E5D4 100%);
}
/* Hero variant: slate blue */
.hero-slate {
  background: linear-gradient(135deg, #E4E8F0 0%, #F0F3F8 45%, #D8DDE8 100%);
}

/* SVG pattern overlay inside hero */
.article-hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  pointer-events: none;
}

.article-hero-content {
  position: relative;
  z-index: 2;
  padding: 3.5rem 0 3rem;
  width: 100%;
}

.article-hero-inner {
  max-width: 840px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.article-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #C99846;
  background: rgba(201,152,70,0.1);
  border: 1px solid rgba(201,152,70,0.25);
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  margin-bottom: 1.25rem;
}

.article-hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: #0A0A0A;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.125rem;
}

.article-hero-deck {
  font-size: 1.175rem;
  color: #525252;
  line-height: 1.7;
  font-weight: 400;
  max-width: 680px;
  margin-bottom: 1.5rem;
}

.article-hero-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.825rem;
  color: #737373;
  flex-wrap: wrap;
}

.article-hero-meta .meta-sep {
  width: 3px;
  height: 3px;
  background: #C99846;
  border-radius: 50%;
  display: inline-block;
}

/* ---------- Article Body Layout ---------- */
.article-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 0;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 4rem;
  align-items: start;
}

/* ---------- TOC Sidebar ---------- */
.article-toc {
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  scrollbar-width: none;
}
.article-toc::-webkit-scrollbar { display: none; }

.toc-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #A3A3A3;
  margin-bottom: 0.875rem;
  display: block;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 1.5px solid #E5E5E5;
}

.toc-list li {
  margin: 0;
}

.toc-list a {
  display: block;
  font-size: 0.825rem;
  font-weight: 500;
  color: #737373;
  line-height: 1.45;
  padding: 0.35rem 0 0.35rem 1rem;
  border-left: 2px solid transparent;
  margin-left: -1.5px;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}

.toc-list a:hover {
  color: #0A0A0A;
  border-left-color: #E5E5E5;
}

.toc-list a.toc-active {
  color: #C99846;
  border-left-color: #C99846;
  font-weight: 600;
}

/* ---------- Article Main Column ---------- */
.article-main {
  min-width: 0;
  max-width: 720px;
}

/* Drop cap on first paragraph */
.article-main .article-body > p:first-of-type::first-letter {
  font-size: 4em;
  float: left;
  line-height: 0.85;
  padding-right: 8px;
  padding-top: 6px;
  color: #C99846;
  font-weight: 800;
}

.article-body {
  font-size: 1.0625rem;
  color: #525252;
  line-height: 1.8;
  letter-spacing: -0.005em;
}

.article-body h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0A0A0A;
  margin: 3rem 0 1rem;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body h3 {
  font-size: 1.075rem;
  font-weight: 700;
  color: #0A0A0A;
  margin: 2rem 0 0.65rem;
  letter-spacing: -0.015em;
}

.article-body p {
  font-size: 1.0625rem;
  color: #525252;
  line-height: 1.8;
  margin-bottom: 1.375rem;
  letter-spacing: -0.005em;
}

.article-body ul,
.article-body ol {
  margin: 1rem 0 1.5rem 1.5rem;
}

.article-body li {
  font-size: 1.0625rem;
  color: #525252;
  line-height: 1.75;
  margin-bottom: 0.5rem;
}

.article-body ul li { list-style: disc; }
.article-body ol li { list-style: decimal; }

/* ---------- Pull Quote ---------- */
.pull-quote {
  font-size: 1.25rem;
  font-style: italic;
  font-weight: 500;
  color: #0A0A0A;
  border-left: 3px solid #C99846;
  padding: 8px 0 8px 24px;
  margin: 2.25rem 0;
  line-height: 1.55;
}

/* ---------- Tip Callout ---------- */
.tip-callout {
  background: #FAF6EC;
  border-left: 3px solid #C99846;
  padding: 1rem 1.25rem;
  border-radius: 6px;
  margin: 1.75rem 0;
}

.tip-callout-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #C99846;
  margin-bottom: 0.4rem;
}

.tip-callout p {
  font-size: 0.9625rem;
  color: #525252;
  line-height: 1.65;
  margin-bottom: 0;
}

/* ---------- Numbered List Cards ---------- */
.numbered-cards {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.numbered-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: #FAFAFA;
  border: 1px solid #E5E5E5;
  border-radius: 10px;
  padding: 1.125rem 1.25rem;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}

.numbered-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.07);
  border-color: rgba(201,152,70,0.3);
}

.card-num {
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: #C99846;
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.02em;
  margin-top: 0.1rem;
}

.card-body {
  flex: 1;
  min-width: 0;
}

.card-body h4 {
  font-size: 0.975rem;
  font-weight: 700;
  color: #0A0A0A;
  margin-bottom: 0.3rem;
  letter-spacing: -0.01em;
}

.card-body p {
  font-size: 0.9125rem;
  color: #525252;
  line-height: 1.65;
  margin-bottom: 0;
}

.card-tip {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #C99846;
}

/* ---------- Palette Swatches ---------- */
.palette-swatches {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0 0.5rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.swatch-block {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.08);
}

.swatch-hex {
  font-size: 0.65rem;
  color: #737373;
  font-family: 'Menlo', 'Consolas', monospace;
  letter-spacing: 0.02em;
}

/* ---------- Article Tags ---------- */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.article-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  color: #737373;
  background: #F5F5F5;
  border: 1px solid #E5E5E5;
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
}

/* ---------- Author Callout ---------- */
.article-author-card {
  background: #FAFAFA;
  border: 1px solid #E5E5E5;
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  margin: 3rem 0 2rem;
}

.article-author-card p {
  font-size: 0.9375rem;
  color: #525252;
  line-height: 1.7;
  margin-bottom: 0;
}

.article-author-card strong {
  color: #0A0A0A;
}

/* ---------- Related Articles ---------- */
.article-related {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid #E5E5E5;
}

.article-related-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #C99846;
  margin-bottom: 1.25rem;
  display: block;
}

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

.related-card {
  background: #FAFAFA;
  border: 1px solid #E5E5E5;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}

.related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  border-color: rgba(201,152,70,0.3);
}

.related-card-thumb {
  height: 90px;
  position: relative;
  overflow: hidden;
}

.related-card-body {
  padding: 0.875rem 1rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.related-card-eyebrow {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #C99846;
  margin-bottom: 0.3rem;
}

.related-card-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #0A0A0A;
  line-height: 1.35;
  letter-spacing: -0.01em;
  flex: 1;
  margin-bottom: 0.4rem;
}

.related-card-read {
  font-size: 0.8rem;
  font-weight: 600;
  color: #C99846;
}

/* ---------- Inline Email Signup ---------- */
.article-signup {
  background: #FAF6EC;
  border: 1px solid rgba(201,152,70,0.2);
  border-radius: 12px;
  padding: 1.75rem 2rem;
  margin-top: 2.5rem;
  text-align: center;
}

.article-signup h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0A0A0A;
  margin-bottom: 0.4rem;
  letter-spacing: -0.015em;
}

.article-signup p {
  font-size: 0.9rem;
  color: #737373;
  margin-bottom: 1.125rem;
}

.article-signup-form {
  display: flex;
  gap: 0.5rem;
  max-width: 400px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.article-signup-form input[type="email"] {
  flex: 1;
  min-width: 180px;
  padding: 0.65rem 1rem;
  border: 1.5px solid #E5E5E5;
  border-radius: 8px;
  background: #fff;
  color: #0A0A0A;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.article-signup-form input[type="email"]:focus {
  border-color: #C99846;
}

/* ---------- Blog Preview Section (homepage) ---------- */
.blog-preview {
  background: #fff;
}

.blog-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.blog-preview-card {
  background: #fff;
  border: 1px solid #E5E5E5;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.blog-preview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.09);
  border-color: rgba(201,152,70,0.3);
}

.blog-preview-thumb {
  height: 140px;
  position: relative;
  overflow: hidden;
}

.blog-preview-body {
  padding: 1.25rem 1.375rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-preview-eyebrow {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #C99846;
  margin-bottom: 0.4rem;
}

.blog-preview-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #0A0A0A;
  line-height: 1.35;
  letter-spacing: -0.015em;
  margin-bottom: 0.5rem;
}

.blog-preview-body p {
  font-size: 0.875rem;
  color: #737373;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1rem;
}

.blog-preview-read {
  font-size: 0.85rem;
  font-weight: 600;
  color: #C99846;
}

.blog-preview-card:hover .blog-preview-read {
  color: #D9AD5C;
}

.blog-preview-more {
  text-align: center;
  margin-top: 0.5rem;
}

.blog-preview-more a {
  font-size: 0.975rem;
  font-weight: 600;
  color: #C99846;
  text-decoration: none;
  border-bottom: 1px solid rgba(201,152,70,0.35);
  padding-bottom: 0.1em;
  transition: color 0.15s, border-color 0.15s;
}

.blog-preview-more a:hover {
  color: #D9AD5C;
  border-color: #D9AD5C;
}

/* ---------- Blog Index Upgrade ---------- */
.blog-card-thumb {
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.blog-card-featured {
  grid-column: 1 / -1;
}

.blog-card-featured .blog-card-thumb {
  height: 200px;
}

.blog-card-featured h2 {
  font-size: 1.375rem;
}

/* ---------- Mobile TOC Collapse ---------- */
.toc-mobile-toggle {
  display: none;
  width: 100%;
  background: #FAFAFA;
  border: 1px solid #E5E5E5;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #525252;
  cursor: pointer;
  text-align: left;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.toc-mobile-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 0.25s;
}

.toc-mobile-toggle.open svg {
  transform: rotate(180deg);
}

.toc-mobile-panel {
  display: none;
  background: #FAFAFA;
  border: 1px solid #E5E5E5;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
}

.toc-mobile-panel .toc-list {
  border-left: none;
}

.toc-mobile-panel .toc-list a {
  padding: 0.3rem 0;
  border-left: none;
  font-size: 0.9rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .article-toc {
    display: none;
  }

  .toc-mobile-toggle {
    display: flex;
  }

  .blog-preview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .article-hero-gradient {
    min-height: 260px;
  }

  .article-hero-content {
    padding: 2.5rem 0 2rem;
  }

  .blog-preview-grid {
    grid-template-columns: 1fr;
  }

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

  .palette-swatches {
    gap: 0.35rem;
  }

  .swatch-block {
    width: 44px;
    height: 44px;
  }
}
