/*
 Theme Name:   Shelby
 Theme URI:    https://generatepress.com
 Description:  Fast, flexible, customizable
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      1.0
*/


/* variables and fonts */

:root {
  --bg: #FEFEFA;
  --text: #222222;
  --buttons: #138DFF;
  --accent: #2891E6;
  --accent-links: #2891E6;
  --base: #e6e6e2;
  --post-wrapper: var(--bg);
}

@font-face {
  font-family: 'Inter';
  src: url('Inter.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Merriweather';
  src: url('Merriweather.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

[data-theme="dark"] {
  --bg: #161616;
  --accent: #2891E6;
  --accent-links: #57AEFF;
  --text: #e2e8f0;
  --base: #2c2f33;
  --post-wrapper: var(--bg);
}

:is([data-theme="dark"] .site-header, [data-theme="dark"] .blog, [data-theme="dark"] .archive, [data-theme="dark"] .search) {
  --post-wrapper: #222222;
}


/* body and sticky footer */

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  color: var(--text);
}

h1, h2, h3, h4, h5, h6, 
.site-branding .main-title {
  font-family: 'Merriweather', super-serif, Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.container.grid-container {
  width: 100%;
}

.site-footer {
  margin-top: auto;
  padding: 40px 20px 0 20px;
}

.site-header,
.main-navigation,
.separate-containers .page-header,
.separate-containers .paging-navigation,
.separate-containers .comments-area,
.site-info {
  background-color: var(--bg);
}

.separate-containers .inside-article {
  background-color: var(--post-wrapper);
}

.blog,
.archive {
  --post-wrapper: #FEFEFA;
}


/* header */

.main-navigation .main-nav > ul > li > a {
  font-weight: 500;
  font-size: 1rem;
}

.site-branding .main-title a {
  font-size: 1.625rem;
  color: var(--text);
}

.site-header {
  margin-bottom: 20px;
  border-bottom: 1px solid var(--base);
}

.main-navigation .main-nav > ul {
  display: flex;
  align-items: center;
}

.main-navigation .main-nav > ul > li:not(:last-child) {
  margin-left: 20px;
  margin-right: 20px;
}

.main-navigation .main-nav > ul > li:not(:last-child) > a {
  position: relative;
  top: 2px;
  color: var(--accent);
  padding-left: 0;
  padding-right: 0;
  display: inline-block;
  padding-bottom: 6px;
  border-bottom: 2px solid transparent;
  transition: color 0.5s ease, border-color 0.5s ease;
}

.main-navigation .main-nav > ul > li:not(:last-child):is(:hover, :focus, :active, .sfHover, [class*="current-menu-"]) > a {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.main-nav #menu-menu li:last-child {
  background: var(--buttons);
  border-radius: 100px;
}

.main-nav #menu-menu li:last-child a {
  color: var(--base-3);
  line-height: 44px;
}

.main-nav #menu-menu li:last-child:hover {
  filter: brightness(1.1);
}

.main-nav #menu-menu li:last-child:is(:active, [class*="current-menu-"]) {
  filter: brightness(1.0);
}

.mobile-menu-control-wrapper button.menu-toggle:is(:hover, :focus),
.mobile-menu-control-wrapper button.menu-toggle,
.has-inline-mobile-toggle #site-navigation.toggled {
  color: var(--text);
  background-color: transparent;
}

.main-navigation .menu-toggle {
  color: var(--text);
}


/* the toggle */

.light-icon {
  display: none !important;
}

.dark-icon {
  display: block !important;
}

[data-theme="dark"] .light-icon {
  display: block !important;
}

[data-theme="dark"] .dark-icon {
  display: none !important;
}

.main-nav button#theme-toggle {
  padding: 10px 0px;
}

.main-nav button#theme-toggle:is(:hover, :focus, :active, :visited),
.main-nav button#theme-toggle {
  color: var(--accent);
  background: transparent;
}


/* post previews */

:is(body.home, body.archive, body.search) .inside-article {
  background-color: var(--bg);
  max-width: 720px;
  margin: 0 auto 40px auto;
  border-radius: 12px;
  border: 2px solid var(--base);
}

:is(body.home, body.archive, body.search) .inside-article :is(.entry-title a, .entry-header .entry-meta) {
  color: var(--text);
}

:is(body.home, body.archive, body.search) .inside-article footer.entry-meta {
  display: none;
}

:is(body.home, body.archive, body.search) .inside-article h2 {
  font-size: 1.75rem;
}

:is(body.home, body.archive, body.search) .inside-article .post-image img {
  border-radius: 8px;
}


/* page formatting */

.featured-image, 
.page-header-image-single {
  display: none;
}

h1.entry-title {
  font-size: 2rem;
}

body.single-post header.entry-header .entry-meta {
  color: var(--text);
  font-weight: 500;
  text-transform: uppercase;
}

header.entry-header span.byline, 
footer.entry-meta :is(.post-navigation, .cat-links, .tags-links) {
  display: none;
}

.posted-on .updated {
  display: inline-block;
}

.posted-on .updated + .entry-date {
  display: none;
}

.wp-block-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

blockquote, 
.wp-block-quote {
  border-left: 4px solid var(--accent);
}

.entry-content a:not(.wp-block-button__link) {
  color: var(--accent-links);
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color 0.5s ease, text-decoration-color 0.5s ease;
}

.entry-content a:not(.wp-block-button__link):hover {
  color: var(--text);
  text-decoration-color: var(--text);
}

:is(.entry-content > :is(p, h1, h2, h3, h4, h5, h6, ul, ol, blockquote, details), body.single-post footer.entry-meta, body.archive h1.page-title, body.search h1.page-title, body.search .paging-navigation) {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

:is(.wp-block-image, .wp-block-gallery, figure) {
  margin: 28px auto;
}

ol, ul {
  padding-left: 14px;
}


/* page 404 */

body.error404 h1.entry-title, body.error404 .entry-content {
  text-align: center;
}

body.error404 .search-form {
  max-width: 320px;
  margin: 0 auto;
}

body.error404 input.search-field {
  background-color: var(--bg);
  border-radius: 6px;
  border: 2px solid var(--base);
  color: var(--text);
}

body.error404 button.search-submit {
  background-color: var(--buttons);
  border: 2px solid var(--buttons);
  border-radius: 6px;
}


/* landing pages */

body.landing-page .site-header {
  display: none;
}

body.landing-page,
body.landing-page .inside-article,
body.landing-page .site-footer,
body.landing-page .inside-site-info {
  background-color: #222222;
  color: #FFFAF0;
}

body.landing-page, 
body.landing-page :is(h1, h2, h3, h4, h5, h6) {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
}

body.landing-page h1.entry-title {
  text-align: center;
  font-size: 2.25rem;
  font-weight: 600;
}

body.landing-page h5 {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 16px;
}

body.centered #page {
  display: flex;
  flex-direction: column;
  justify-content: center; 
  align-items: center;     
  min-height: 100dvh;       
  box-sizing: border-box;
}

body.landing-page .entry-content {
  margin-top: 1em;
}

body.centered :is(.entry-content, .site-info) {
  width: 100%;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

body.centered .fluentform {
  max-width: 380px;
  margin-top: 32px;
  margin-left: auto;
  margin-right: auto;
}

body.landing-page :is(.ff_btn_style, .fluentform .ff-btn-submit) {
  width: 100%;
  display: block;
  font-size: 1rem;
  font-weight: 600;
  padding: 12px 24px;
}

body.landing-page p.note {
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

body.landing-page .inside-site-info {
  border-top: 0;
  padding-top: 40px;
  padding-bottom: 40px;
}

body.landing-page .copyright-bar ul li, 
body.landing-page .copyright-bar ul li a {
  color: #a2a2a2;
}

body.landing-page ul li:nth-child(1), 
body.landing-page ul li:nth-child(2), 
body.landing-page ul li:nth-child(4) {
  display: none;
}

body.landing-page ul li:nth-child(3) {
  margin: auto;
}


/* forms */

.fluentform .ff-el-form-control {
  background-color: #222222;
  border: 2px solid #848484;
  border-radius: 6px;
  color: #FFFAF0;
  padding: 10px 14px;
  transition: border-color 0.2s ease;
}

:is(body.landing-page, .fluentform) .ff-el-form-control:focus {
  background-color: #222222;
  border-color: var(--accent);
  outline: none;
}

body.landing-page .fluentform .ff-el-form-control:focus {
  color: var(--base-3);
}

.fluentform .ff-message-success {
  border: 0;
  box-shadow: none;
  margin-top: 16px;
  padding: 0;
}

body.landing-page .fluentform .ff-btn-submit:not(.ff_btn_no_style) {
  background-color: var(--buttons);
  border: 0;
  border-radius: 6px;
  transition: filter 0.2s ease, transform 0.1s ease;
  cursor: pointer;
}

body.landing-page .fluentform .ff-btn-submit:not(.ff_btn_no_style):is(:hover, :focus) {
  filter: brightness(1.15);
  opacity: 1;
  outline: none;
}

body.landing-page .fluentform .ff-btn-submit:not(.ff_btn_no_style):active {
  transform: scale(0.98);
}


/* footer */

.site-info {
  max-width: 1020px;
  margin: 0 auto;
}

.inside-site-info {
  border-top: 2px solid var(--base);
  padding: 20px 0;
  display: block;
}

.copyright-bar ul {
  display: flex;
  flex-direction: column;
  text-align: left;
  font-size: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 12px;
}

.copyright-bar ul li a {
  text-decoration: none;
}


/* desktop media queries */

@media (min-width: 769px) {

  /* header */

  .main-navigation .main-nav > ul > li:not(:last-child) > a {
    line-height: 1.2;
  }

  .main-nav #menu-menu li:last-child {
    margin-left: 20px;
  }

  /* page formatting */

  h1.entry-title,
  body.single-post header.entry-header .entry-meta {
    text-align: center;
  }

  /* footer */

  .copyright-bar ul {
    flex-direction: row;
    align-items: center;
  }

  .copyright-bar ul li:first-child {
    margin-right: auto;
  }

  .copyright-bar ul li a {
    color: var(--text);
    border-bottom: 2px solid transparent;
    transition: border-color 0.5s ease;
  }

  .copyright-bar ul li a:hover {
    border-bottom-color: var(--accent);
  }
}


/* mobile media queries */

@media (max-width: 768px) {

  /* header */

  .main-navigation .main-nav > ul > li:not(:last-child) {
    margin: 0 0 20px 20px;
  }

  .main-navigation .main-nav > ul > li:not(:last-child) > a {
    display: block;
    border-bottom: none;
  }

  .main-nav #menu-menu li:last-child a {
    padding: 0 30px 0 30px;
    line-height: 56px;
  }

  .main-navigation .main-nav > ul > li:not(:last-child) > a {
    line-height: 44px;
  }

  .main-navigation .main-nav > ul > li > a {
    font-size: 1.125rem;
    font-weight: 500;
  }

  /* post previews */

  :is(body.home, body.archive, body.search) .inside-article {
    border-radius: 0;
    border-top: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 2px solid var(--base);
    box-shadow: none;
  }

  /* page formatting */

  :is(h1.entry-title, h1) {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.375rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  h4 {
    font-size: 1.125rem;
  }

  :is(h5, h6) {
    font-size: 1rem;
  }

  /* landing pages */

  body.landing-page h1.entry-title {
    font-size: 1.5rem;
  }

  body.landing-page h5 {
    font-size: 1.125rem;
  }

  /* footer */

  .copyright-bar ul {
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: space-between;
    align-items: center;
    row-gap: 16px;
  }

  .copyright-bar ul li:first-child {
    grid-column: 1 / -1;
    order: 1;
    text-align: left;
  }
}