/*
Theme Name:     Daily Draft
Theme URI:      http://shop.restored316designs.com/themes
Template:       kadence
Author:         Restored 316 // Lauren Dierschke
Author URI:     http://shop.restored316designs.com/themes
Description:    A mobile responsive WordPress theme built for the Kadence Framework by Lauren Dierschke of Restored 316.
Version:        1.0.0
License:        GNU General Public License v3.0 (or later)
License URI:    https://www.gnu.org/licenses/gpl-3.0.html
*/

/* Theme customization starts here
-------------------------------------------------------------- */

@font-face {
	font-family: 'Chomsky';
	src: url('fonts/Chomsky.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	text-rendering: optimizeLegibility;
	font-display: swap;
}

.site-branding .site-title {
	text-align: center;
}

/* Newspaper columns belong to the excerpt wrapper. */
.cover-story .loop-entry .entry-summary {
  column-count: 2;
  column-gap: 2.5rem;
  column-rule: 1px solid #B9BEB6;
}

.cover-story .loop-entry .entry-summary p {
  margin-top: 0;
  text-align: justify;
  hyphens: auto;
  font-size: 16px;
  line-height: 1.6;
}

.loop-entry .entry-summary p {
  font-size: 16px;
  line-height: 1.6;
}

/* Native drop cap stays at the text start during column balancing. */
 .cover-story .loop-entry .entry-summary p::first-letter {
  float: none;
  -webkit-initial-letter: 2;
  initial-letter: 2;
  font-family: "Bodoni Moda", Didot, serif;
  font-weight: 900;
  font-size: 3.6em;
  line-height: .8;
  padding: 6px 8px 0 0;
  color: var(--global-palette1);
}

/* Stack to one column on phones */
@media (max-width: 640px) {
  .cover-story .loop-entry .entry-summary { column-count: 1; column-rule: 0; }
}

.cover-story .post-thumbnail {
  position: relative;
  display: block;
}

.cover-story .post-thumbnail::before {
  content: "Cover Story";
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 6px 12px;
  background: var(--global-palette1);   /* your accent blue */
  color: #fff;
  font-family: "Archivo Narrow", Arial, sans-serif;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  letter-spacing: .16em;
  text-transform: uppercase;
  pointer-events: none;
}

/* Remove the grid gap on this list only */
.wp-block-kadence-posts.in-brief.grid-cols {
  row-gap: 0;
  column-gap: 0;
}

/* Line between each post */
.in-brief .kb-post-list-item {
  padding-top: 1em;
  border-bottom: 1px solid #B9BEB6;
}

/* No line after the last one (delete this if you want a closing line) */
.in-brief .kb-post-list-item:last-child {
  border-bottom: 0;
}

/* Tighten the card so the spacing comes only from the list item */
.in-brief .entry-content-wrap {
  padding: 0;
}
.in-brief .entry-taxonomies {
  margin-bottom: 4px;
}
.in-brief .entry-title {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
}

/* Reset the grid gap on this list only */
.wp-block-kadence-posts.most-read.grid-cols {
  row-gap: 0;
  column-gap: 0;
  counter-reset: mostread;
}

/* Each post: number on the left, content on the right, line between */
.most-read .kb-post-list-item {
  counter-increment: mostread;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 8px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid #B9BEB6;
}
.most-read .kb-post-list-item:last-child {
  border-bottom: 0;
}

/* The number */
.most-read .kb-post-list-item::before {
  content: counter(mostread);
  font-family: "Bodoni Moda", Didot, serif;
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
  color: var(--global-palette1);
}

/* Tighten the card */
.most-read .entry-content-wrap { padding: 0; }
.most-read .entry-taxonomies { display: none; }  /* hide category for a cleaner list */
.most-read .entry-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 600;
}

/* Three across, no grid gap */
.wp-block-kadence-posts.the-wire.grid-cols {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  row-gap: 0;
  column-gap: 0;
}

/* Center everything, with a line (palette 3) between posts */
.the-wire .kb-post-list-item {
  display: flex;
  align-items: center;        /* vertical centering */
  justify-content: center;    /* horizontal centering */
  padding: 16px 24px;
}
.the-wire .kb-post-list-item + .kb-post-list-item {
  border-left: 1px solid var(--global-palette3);
}

/* Remove the entry-header bottom margin here only */
.the-wire .entry-header {
  margin-bottom: 0;
}

/* Strip card padding so spacing comes from the list item */
.the-wire .entry-content-wrap { padding: 0; }
.the-wire .entry-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 600;
}

/* Phones: stack, with a horizontal line instead */
@media (max-width: 767px) {
  .wp-block-kadence-posts.the-wire.grid-cols {
    grid-template-columns: minmax(0, 1fr);
  }
  .the-wire .kb-post-list-item + .kb-post-list-item {
    border-left: 0;
    border-top: 1px solid var(--global-palette3);
  }
}

/* Latest Stories block + all archives: lines between columns and rows */
.wp-block-kadence-posts.latest-stories.grid-cols,
.post-archive.grid-cols {
  row-gap: 0;
  column-gap: 0;
  margin: -1px 0 0 -1px;
  clip-path: inset(2px 0 0 2px);
}

/* the list items are the grid cells */
.latest-stories > .kb-post-list-item,
.post-archive.grid-cols > .entry-list-item {
  border-top: 1px solid var(--global-palette7);
  border-left: 1px solid var(--global-palette7);
  padding: 26px 24px;
}

/* strip Kadence's own card spacing so the padding above does the work */
.latest-stories .entry-content-wrap,
.post-archive.grid-cols .entry-content-wrap {
  padding: 0;
}
.post-archive.grid-cols .entry {
  box-shadow: none;
  border-radius: 0;
  background: transparent;
}

.dd-strip {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  font-family: "Archivo Narrow", Arial, sans-serif;
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--global-palette5);
}
.dd-strip a { color: var(--global-palette1); border-bottom: 1px solid currentColor; }
@media (max-width: 640px) { .dd-strip span:nth-child(3) { display: none; } }

html { scroll-behavior: smooth; }
.single-content h2 { scroll-margin-top: 90px; }   /* clears a sticky header */

/* Title area: wider than the text column */
.single-post .entry-header.post-title {
  width: min(960px, calc(100vw - 48px));
  max-width: none;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

/* Featured image: lines up with the masthead */
.single-post .article-post-thumbnail {
  width: min(1242px, calc(100vw - 48px));
  max-width: none;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.single-post .entry-header .entry-meta {
  border-top: 1px solid var(--global-palette7);
  border-bottom: 1px solid var(--global-palette7);
  padding: 12px 0;
  margin-top: 20px;
}

.single-post .single-content > p:first-of-type::first-letter {
  float: left;
  font-weight: 800;
  font-size: 4.2em;
  line-height: .78;
  padding: 8px 10px 0 0;
  color: var(--global-palette1);
}

/* Author box: wider, double rule on top, single rule on the bottom */
.single-post .entry-author {
  width: min(960px, calc(100vw - 48px));
  max-width: none;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  border-top: 3px double var(--global-palette4);
  border-bottom: 1px solid var(--global-palette7);
  padding: 28px 0;
  margin-top: 40px;
}

/* More From the Desk: double rule on top of the whole section */
.entry-related-inner-content {
  border-top: 3px double var(--global-palette4);
  border-bottom: 3px double var(--global-palette4);
  padding: 40px 0;
}

/* Italic section title */
.entry-related-title { font-style: italic; }

/* Lines between posts */
.entry-related .splide__slide { position: relative; }
.entry-related .splide__slide::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -20px;              /* half of the 40px gap between slides */
  width: 1px;
  background: var(--global-palette7);
}

/* Remove the padding so the text lines up with the image's left edge */
.entry-related .entry-content-wrap {
  padding-left: 0;
  padding-right: 0;
}

.dd-toc-title {
  font-family: "Archivo Narrow", Arial, sans-serif;
  font-size: 13px; letter-spacing: .16em; text-transform: uppercase;
  border-bottom: 2px solid currentColor; padding-bottom: 8px; margin: 0 0 6px;
}
.dd-toc ol { list-style: none; margin: 0; padding: 0; }
.dd-toc li { padding: 9px 0; border-bottom: 1px solid var(--global-palette3); font-size: 15.5px; line-height: 1.3; }
.dd-toc a { text-decoration: none; }
.dd-toc a:hover { color: var(--global-palette1); }

/* Small screens: a boxed list above the article */
.dd-toc { margin: 0 0 2em; padding: 18px 20px; background: var(--global-palette8); }

/* Wide screens: float it into the left margin, sticky as you scroll */
@media (min-width: 1240px) {
  .single-content { position: relative; }
  .dd-toc {
    position: absolute; top: 0; bottom: 0; right: 100%;
    width: 200px; margin: 0 40px 0 0; padding: 0; background: none;
  }
  .dd-toc-inner { position: sticky; top: 24px; }
}

/* More From the Desk arrows */
.entry-related .splide__arrow {
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  background: var(--global-palette8);
  border: 1px solid var(--global-palette4);
  opacity: 1;
  transition: background .15s;
}
.entry-related .splide__arrow svg {
  width: 14px;
  height: 14px;
  fill: var(--global-palette4);
  transition: fill .15s;
}

/* Hover: fills with ink, arrow flips to paper */
.entry-related .splide__arrow:hover:not(:disabled) { background: var(--global-palette4); }
.entry-related .splide__arrow:hover:not(:disabled) svg { fill: var(--global-palette8); }

/* Faded when there's nowhere to go, and a visible keyboard focus */
.entry-related .splide__arrow:disabled { opacity: .35; }
.entry-related .splide__arrow:focus-visible { outline: 2px solid var(--global-palette1); outline-offset: 2px; }

.single-content { position: relative; }

/* Widget titles: same small label as In This Article */
.dd-rail-title {
  font-family: "Archivo Narrow", Arial, sans-serif;
  font-size: 13px; letter-spacing: .16em; text-transform: uppercase;
  border-bottom: 2px solid var(--global-palette4);
  padding-bottom: 8px; margin: 0 0 6px;
}
.dd-rail .widget { margin-bottom: 28px; }
.dd-rail ul, .dd-rail ol { list-style: none; margin: 0; padding: 0; }
.dd-rail li {
  padding: 12px 0; border-bottom: 1px solid var(--global-palette7);
  font-size: 16px; line-height: 1.25; font-weight: 600;
}
.dd-rail a { color: inherit; text-decoration: none; }
.dd-rail a:hover { color: var(--global-palette1); }

/* Numbered "Most Read" — add the class most-read to the list block */
.dd-rail .most-read { counter-reset: mr; }
.dd-rail .most-read li { counter-increment: mr; display: grid; grid-template-columns: 32px 1fr; gap: 6px; }
.dd-rail .most-read li::before {
  content: counter(mr); font-size: 26px; line-height: 1; font-weight: 700;
  color: var(--global-palette1);
}

/* Small screens: below the article with a double rule */
.dd-rail { margin: 2em 0 0; padding-top: 20px; border-top: 3px double var(--global-palette4); }

/* Wide screens: in the right margin, sticky */
@media (min-width: 1240px) {
  .dd-rail { position: absolute; top: 0; bottom: 0; left: 100%; width: 200px; margin: 0 0 0 40px; padding: 0; border: 0; }
  .dd-rail-inner { position: sticky; top: 24px; }
}
