/*
 * kacieji.com: the look of the WordPress theme Kale (LyraThemes, light) as the site used it,
 * rebuilt without Bootstrap or JavaScript. Colours, fonts, sizes and spacing are Kale's
 * (its style.css on top of Bootstrap 3; the theme's customizer added nothing).
 * Mobile first; Kale's breakpoints: 768, 992 and 1200 px.
 * The Content-Security-Policy forbids inline styles: every look lives in this file.
 */

/* Fonts: latin subsets from Google Fonts, the families and weights Kale loaded
   (SIL Open Font License, see ../fonts/LICENSE.txt). Montserrat is one variable file. */

@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/lato-latin-300-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/lato-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Lato";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/lato-latin-400-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/lato-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Lato";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/lato-latin-700-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/montserrat-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url("../fonts/raleway-latin-200-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/caveat-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --text: #545454;        /* body text */
  --dark: #000;           /* headings, links, the menu */
  --tagline: #646464;
  --muted: #555;          /* previous/next post links */
  --rule: #000;           /* horizontal rules */
  --ornament: #c4c4c4;    /* the short double lines beside the tagline and category names */
  --current: #f3f3f3;     /* the current menu item */
  --quote-rule: #eee;     /* left rule of block quotes */
  --font-body: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-heading: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-logo: "Raleway", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-tagline: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --line: 1.42857143;     /* Bootstrap's line height: 18.57px at 13px */
}

/* Base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.8125rem; /* 13px */
  line-height: var(--line);
}

img {
  max-width: 100%;
  height: auto;
  border: 0;
  vertical-align: middle;
}

a {
  color: var(--dark);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--dark);
  outline-offset: 2px;
}

p {
  margin: 0 0 10px;
}

hr {
  height: 0;
  margin: 35px 0;
  border: 0;
  border-top: 1px solid var(--rule);
}

figure {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  margin: 20px 0 10px;
  color: var(--dark);
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.1;
  text-transform: uppercase;
}

blockquote {
  margin: 0 0 20px;
  padding: 10px 20px;
  border-left: 5px solid var(--quote-rule);
  font-size: 1.09375rem; /* 17.5px */
}

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

.screen-reader-text,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 100;
  padding: 15px 23px 14px;
  border-radius: 3px;
  background: #f1f1f1;
  box-shadow: 0 0 2px 2px rgb(0 0 0 / 60%);
  color: #21759b;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: normal;
  text-decoration: none;
}

/* Page: Bootstrap's container (1170px on wide screens) */

.site {
  margin: 0 auto;
  padding: 0 15px;
}

@media (min-width: 768px) {
  .site {
    width: 750px;
  }
}

@media (min-width: 992px) {
  .site {
    width: 970px;
  }
}

@media (min-width: 1200px) {
  .site {
    width: 1170px;
  }
}

/* Header: the site name, the tagline between short double lines, the menu between rules */

.site-header {
  line-height: 20px;
  text-align: center;
}

/* Kale printed the site name as a heading (black) on the home page only; elsewhere it has the
   body text's grey. */
.site-title {
  margin: 0;
  padding-top: 12px;
  color: var(--text);
  font-family: var(--font-logo);
  font-size: 1.875rem; /* 30px */
  font-weight: 200;
  line-height: 1;
  letter-spacing: 10px;
  text-transform: uppercase;
}

.site-title--home {
  color: var(--dark);
}

.site-title a {
  color: inherit;
}

.site-title a:hover,
.site-title a:focus {
  text-decoration: none;
}

.site-tagline {
  margin: 15px 0 20px;
  color: var(--tagline);
  font-family: var(--font-tagline);
  font-size: 1.125rem; /* 18px */
  text-transform: lowercase;
}

.site-tagline span,
.block-title span {
  position: relative;
  display: inline-block;
  max-width: 100%;
  padding: 0 26px;
}

.site-tagline span::before,
.site-tagline span::after,
.block-title span::before,
.block-title span::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 20px;
  height: 4px;
  margin-top: -2px;
  border-top: 1px solid var(--ornament);
  border-bottom: 1px solid var(--ornament);
}

.site-tagline span::after,
.block-title span::after {
  right: 0;
  left: auto;
}

/* The menu: on small screens its items wrap into centred rows (Kale hid them behind a
   JavaScript button). */

.site-nav {
  margin-bottom: 25px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.site-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav li {
  display: inline-block;
}

.site-nav a {
  display: block;
  padding: 10px;
  color: var(--dark);
  font-family: var(--font-heading);
  font-size: 0.625rem; /* 10px */
  line-height: 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.site-nav a:hover,
.site-nav a:focus {
  color: #333;
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  background: var(--current);
  color: var(--dark);
}

.site-nav a:focus-visible {
  outline-offset: -2px;
}

@media (min-width: 768px) {
  .site-header {
    padding-top: 20px;
  }

  .site-title {
    padding-top: 0;
    font-size: 3.75rem; /* 60px */
  }

  .site-tagline {
    margin-bottom: 40px;
  }

  .site-nav {
    margin-bottom: 45px;
  }

  .site-nav a {
    padding: 23px 10px;
  }
}

@media (min-width: 992px) {
  .site-nav a {
    padding-right: 15px;
    padding-left: 15px;
  }
}

@media (min-width: 1200px) {
  .site-nav a {
    padding-right: 27px;
    padding-left: 27px;
    font-size: 0.6875rem; /* 11px */
    letter-spacing: 2px;
  }
}

/* Main column: the whole width, or on large screens Kale's 8 of 12 columns with its
   (empty) sidebar beside it. It holds its floating pictures. */

.site-main {
  display: flow-root;
}

@media (min-width: 992px) {
  .site-main--column {
    width: calc((100% + 30px) * 2 / 3 - 30px);
  }
}

/* The home page banner, with Kale's light grey veil */

.frontpage-banner {
  position: relative;
  margin-bottom: 51px; /* Kale's 40px, plus the title's 11px that its grid kept apart */
}

.frontpage-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #555;
  opacity: 0.15;
}

.frontpage-banner img {
  display: block;
}

/* Pages and posts */

.entry {
  margin-bottom: 35px;
}

.entry-title {
  margin: 0.5em 0;
  font-size: 1.375rem; /* 22px */
  line-height: 1.3;
  letter-spacing: 1px;
}

.entry-post > .entry-title {
  margin-top: 20px; /* Kale's (empty) entry header above a post's title */
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin: 0.5em 0;
}

.entry-content h2 {
  font-size: 1.25rem; /* 20px */
}

.entry-content h3 {
  font-size: 1.125rem; /* 18px */
}

.entry-content h4 {
  font-size: 1rem; /* 16px */
}

.entry-content .h5 {
  font-size: 0.875rem; /* 14px, Kale's level-5 heading */
}

.entry-content a {
  text-decoration: underline;
}

.entry-content a:hover,
.entry-content a:focus {
  text-decoration: none;
}

.alignleft {
  float: left;
  margin: 5px 20px 20px 0;
}

.alignright {
  float: right;
  margin: 5px 0 20px 20px;
}

.aligncenter {
  display: block;
  margin: 5px auto;
}

figure.alignleft {
  margin: 0.5em 1em 0.5em 0;
}

figure.aligncenter {
  display: table;
  margin-top: 0;
  margin-bottom: 0;
}

figure img {
  vertical-align: bottom;
}

.text-center {
  text-align: center;
}

/* An empty line above (WordPress used a paragraph holding a space) */
.gap-above {
  margin-top: calc(1.42857em + 20px); /* one line of text and the gaps around it */
}

/* The large quote on the home page */
.quote-large {
  margin-bottom: 1em;
  padding: 0 1em;
}

.quote-large p {
  font-size: 1.5em;
  font-style: italic;
  line-height: 1.6;
}

.quote-large cite {
  display: block;
  font-size: 1.125em;
  text-align: right;
}

/* YouTube videos: a 16:9 box, 560 × 315 as before, smaller on narrow screens */
.video {
  max-width: 560px;
  margin-bottom: 10px;
  aspect-ratio: 16 / 9;
}

.video iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Contact: the three icons, centred below an empty line */
.social-links {
  display: flex;
  justify-content: center;
  margin-top: calc(1.42857em + 10px);
}

.social-links img {
  display: block;
}

/* Text pasted from a word processor in one post (it kept its font) */
.calibri {
  color: #000;
  font-family: Calibri, Carlito, sans-serif;
}

/* The Google Play link in place of Google's badge picture */
.entry-content .google-play {
  display: inline-block;
  padding: 6px 14px 7px;
  border: 1px solid #a6a6a6;
  border-radius: 6px;
  background: #000;
  color: #fff;
  font-size: 1.125rem;
  line-height: 1.1;
  text-decoration: none;
}

.google-play span {
  display: block;
  font-size: 0.5625rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.entry-content .google-play:hover,
.entry-content .google-play:focus {
  text-decoration: underline;
}

/* A post's footer ("Filed Under: ...") and the rule under the post */

.entry-post {
  border-bottom: 1px solid var(--rule);
}

.entry-footer {
  clear: both;
  margin: 30px 0 50px;
}

.entry-meta {
  margin: 0;
  color: var(--dark);
  font-size: 0.6875rem; /* 11px */
  font-style: italic;
  line-height: 1.688; /* one line of body text */
}

.entry-meta span {
  font-weight: 700;
  letter-spacing: 0.6px;
}

.entry-meta a {
  color: inherit;
}

/* Previous and next post, with Kale's arrows */

.post-nav {
  display: flex;
  flex-wrap: wrap;
  column-gap: 20px;
  margin: 25px 0;
  padding: 2px 0 8px; /* Kale: 10px below; its icon font set the text 2px lower */
}

.post-nav a {
  color: var(--muted);
  font-family: var(--font-heading);
  font-size: 0.625rem; /* 10px on small phones, 11px from 481px */
  line-height: 26px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.post-nav a:hover,
.post-nav a:focus {
  color: var(--dark);
  text-decoration: none;
}

.post-nav__next {
  margin-left: auto;
  text-align: right;
}

.post-nav__previous::before,
.post-nav__next::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 11px;
  background: currentColor;
  vertical-align: -1px;
}

.post-nav__previous::before {
  margin-right: 10px;
  clip-path: polygon(0 50%, 40% 0, 40% 32%, 100% 32%, 100% 68%, 40% 68%, 40% 100%);
}

.post-nav__next::after {
  margin-left: 10px;
  clip-path: polygon(100% 50%, 60% 0, 60% 32%, 0 32%, 0 68%, 60% 68%, 60% 100%);
}

@media (min-width: 481px) {
  .post-nav a {
    font-size: 0.6875rem; /* 11px */
  }
}

/* The Blog page: WordPress's "Latest Posts" list */

.latest-posts {
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.latest-posts img {
  display: block;
}

.latest-posts h2 {
  margin: 0;
  color: inherit;
  font: inherit;
  letter-spacing: normal;
  text-transform: none;
}

.entry-content .latest-posts h2 a,
.entry-content .latest-posts .read-more {
  text-decoration: none;
}

.entry-content .latest-posts h2 a:hover,
.entry-content .latest-posts .read-more:hover {
  text-decoration: underline;
}

.latest-posts p {
  margin: 0.5em 0 1em;
}

/* Category pages: the name between double lines, then the posts in three columns */

.block-title {
  margin: 0 0 35px;
  font-size: 0.875rem; /* 14px on small phones */
  letter-spacing: 2px;
  text-align: center;
}

/* One column (the posts' margins meet, as in Kale) up to 992px, then rows of three. */
.post-grid {
  display: flow-root;
}

.entry-small .entry-thumb {
  display: block;
  margin-bottom: 25px;
}

.entry-thumb img {
  display: block;
}

.entry-small .entry-title {
  font-size: 1.125rem; /* 18px */
}

.entry-small .entry-title:first-child {
  margin-top: 25px; /* Kale's empty picture box above posts without a picture */
}

.entry-title a {
  color: var(--dark);
}

.entry-summary {
  margin-bottom: 15px;
  line-height: 22px;
  text-align: justify;
}

.entry-summary .read-more {
  color: var(--text);
  font-weight: 300;
}

/* Kale's (empty) meta line under each excerpt */
.entry-small::after {
  content: "";
  display: block;
  height: 22px;
}

@media (min-width: 481px) {
  .block-title {
    font-size: 1rem; /* 16px */
  }
}

@media (min-width: 992px) {
  .post-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 30px;
  }

  /* Kale's script gave the titles in a row the same height, so that the excerpts line up.
     In an aligned row (see category_page()) the posts share the row's four tracks: picture,
     title, excerpt and meta line. Margins do not merge in a grid: the picture's margin
     stands for the title's top margin, and the summary's for its paragraph's. */
  .post-row--aligned > .entry-small {
    display: grid;
    grid-row: span 4;
    grid-template-rows: subgrid;
  }

  .post-row--aligned .entry-thumb {
    grid-row: 1;
  }

  .post-row--aligned .entry-title {
    grid-row: 2;
  }

  .post-row--aligned .entry-thumb + .entry-title {
    margin-top: 0;
  }

  .post-row--aligned .entry-summary {
    grid-row: 3;
  }

  .post-row--aligned .entry-summary p {
    margin-bottom: 0;
  }

  .post-row--aligned > .entry-small::after {
    grid-row: 4;
  }
}

/* Footer: a rule and the copyright line */

.site-footer {
  margin-top: 35px;
  padding: 65px 0 20px;
  border-top: 1px solid var(--rule);
  text-align: center;
}

.site-footer p {
  margin: 0;
}

/* No animations or transitions for people who ask for less motion. The one animated picture
   (the cover in "Demigoddess 101 is Out!") is swapped for its still in its <picture>. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
