/*
  Dermagic Journal — brand polish on top of Webbloom.
  Loaded after the Webbloom base/components stylesheets in head.html.
*/

:root {
  --wb-bg: #F8F6F1;            /* warm cream page background */
  --wb-text: #3E3B36;          /* warm dark brown body text */
  --wb-text-light: #6b675f;
  --wb-light: #F8F6F1;
  --wb-rule: #E8E2D4;          /* hairline divider */
}

html, body {
  background: var(--wb-bg);
  color: var(--wb-text);
}

/* Editorial serif headings — leans into "Science Meets Nature" */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--wb-font-heading);
  color: var(--wb-text);
  letter-spacing: -0.01em;
}
h1 { font-weight: 700; }
h2, h3 { font-weight: 600; }

/* Header on cream */
.wb-header {
  background: var(--wb-bg);
  border-bottom: 1px solid var(--wb-rule);
}
.wb-header-logo img { max-height: 56px; width: auto; }
.wb-header-nav a { color: var(--wb-text); }
.wb-header-nav a.active,
.wb-header-nav a:hover { color: var(--wb-primary); }

/* Article body — readable column */
main { padding: 2em 0 4em; }
.dm-article {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.25em;
}
.dm-article h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 0.25em;
}
.dm-article .dm-meta {
  color: var(--wb-text-light);
  font-size: 0.9rem;
  margin-bottom: 2em;
  border-bottom: 1px solid var(--wb-rule);
  padding-bottom: 1.25em;
}
.dm-article p { font-size: 1.075rem; line-height: 1.75; }
.dm-article img { border-radius: 6px; margin: 1.5em 0; }
.dm-article a { color: var(--wb-primary); border-bottom: 1px solid color-mix(in srgb, var(--wb-primary) 30%, transparent); }
.dm-article a:hover { border-bottom-color: var(--wb-primary); }
.dm-article h2, .dm-article h3 { margin-top: 1.75em; margin-bottom: 0.5em; }
.dm-article blockquote {
  border-left: 3px solid var(--wb-primary);
  padding: 0.25em 1.25em;
  margin: 1.5em 0;
  font-style: italic;
  color: var(--wb-text-light);
}

/* Listing grid */
.dm-list {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25em;
}
.dm-list-header { margin-bottom: 2.5em; }
.dm-list-header h1 { font-size: clamp(2.2rem, 5vw, 3rem); margin-bottom: 0.3em; }
.dm-list-header p { color: var(--wb-text-light); font-size: 1.1rem; max-width: 640px; }

.dm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2em;
}
.dm-card {
  background: #fff;
  border: 1px solid var(--wb-rule);
  border-radius: 8px;
  padding: 1.5em;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.dm-card:hover {
  box-shadow: 0 8px 24px rgba(44, 62, 43, 0.08);
  transform: translateY(-2px);
}
.dm-card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5em;
  line-height: 1.3;
}
.dm-card h2 a { color: var(--wb-text); }
.dm-card h2 a:hover { color: var(--wb-primary); }
.dm-card .dm-meta { font-size: 0.85rem; color: var(--wb-text-light); margin-bottom: 0.75em; }
.dm-card .dm-summary { color: var(--wb-text-light); font-size: 0.95rem; }

/* Lede (intro paragraph rendered from .Description) */
.dm-article .dm-lede {
  font-size: 1.2rem;
  line-height: 1.65;
  color: var(--wb-text);
  border-left: 3px solid var(--wb-accent);
  padding: 0.25em 1.25em;
  margin: 1em 0 2em;
  font-family: var(--wb-font-heading);
  font-style: italic;
}

/* FAQ block */
.dm-faq {
  margin-top: 3em;
  padding-top: 2em;
  border-top: 1px solid var(--wb-rule);
}
.dm-faq h2 {
  font-size: 1.5rem;
  margin-bottom: 1em;
}
.dm-faq dl { display: block; }
.dm-faq dt {
  font-family: var(--wb-font-heading);
  font-size: 1.1rem;
  color: var(--wb-text);
  margin-top: 1.5em;
  margin-bottom: 0.4em;
  font-weight: 600;
}
.dm-faq dd {
  margin: 0 0 1em 0;
  color: var(--wb-text);
  line-height: 1.7;
}
.dm-faq dd p:last-child { margin-bottom: 0; }

/* Categories / tags */
.dm-tags { margin-top: 2em; padding-top: 1.5em; border-top: 1px solid var(--wb-rule); }
.dm-tags a {
  display: inline-block;
  font-size: 0.8rem;
  padding: 0.25em 0.75em;
  margin: 0 0.25em 0.5em 0;
  background: #fff;
  border: 1px solid var(--wb-rule);
  border-radius: 999px;
  color: var(--wb-text-light);
}
.dm-tags a:hover { color: var(--wb-primary); border-color: var(--wb-primary); }

/* Product cross-sell card (used by the `product` shortcode) */
.dm-product {
  display: block;
  background: #fff;
  border: 1px solid var(--wb-rule);
  border-radius: 8px;
  padding: 1.25em 1.5em;
  margin: 1.5em 0;
  text-decoration: none !important;
  border-bottom: 1px solid var(--wb-rule) !important;
}
.dm-product:hover { border-color: var(--wb-primary) !important; }
.dm-product .dm-product-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--wb-accent);
  margin-bottom: 0.25em;
}
.dm-product .dm-product-name {
  font-family: var(--wb-font-heading);
  font-size: 1.15rem;
  color: var(--wb-text);
  margin-bottom: 0.25em;
}
.dm-product .dm-product-cta {
  font-size: 0.9rem;
  color: var(--wb-primary);
  font-weight: 500;
}

/* Footer — keep dark forest brand for contrast */
.wb-footer { background: var(--wb-primary); color: rgba(255,255,255,0.85); }
.wb-footer h4 { color: #fff; }
.wb-footer a { color: rgba(255,255,255,0.8); }
.wb-footer a:hover { color: #fff; }
.wb-copyright { background: var(--wb-primary-hover); color: rgba(255,255,255,0.7); }
