/* CSS by ///ADD/// JONATHAN NEWKIRK */

/* Imported Fonts */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,opsz,wdth,wght@0,18..144,87..112,300..900;1,18..144,87..112,300..900&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap');

/* ///ADD/// CSS Reset */

/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/* Root Variables */
:root {
  --blue-bulletin: #1D3557;
  --news-flash: #E63946;
  --watchdog-white: #F1FAEE;
  --truth-text: #333;
  --story-subtitle: #457B9D;
  --font-body: "Source Sans 3", sans-serif;
  --font-heading: 'Merriweather', serif;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
  --transition: all 0.5s ease;
}

/* Manual Light/Dark Mode Styles*/
body.light-mode {
  background-color: var(--watchdog-white);
  color: var(--truth-text);
}
body.dark-mode {
  background-color: var(--truth-text);
  color: var(--watchdog-white);
}
#theme-toggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: var(--watchdog-white);
  border: 1px solid var(--blue-bulletin);
  border-radius: 1.5rem;
  cursor: pointer;
}

/* ///ADD/// Skip Link Styles */

.skip-to-content-links{
    display: flex;           /* make links inline */
    gap: 1rem;
    position: absolute;
    top: 0;
    left: 0;
    background: var(--watchdog-white);
    z-index: 1000;
    padding: 0.5rem;
    font-family: 'Merriweather', serif;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    font-size: 0.75rem;
    line-height: 1.2;
    font-weight: 500;
}

.skip-to-content-links a{
    display: inline-block;
    padding: 1rem;
    text-decoration: none;
}

.skip-to-content-links:focus-within {
    transform: translateY(0);
}

/* ///ADD/// Navigation Styles */


header {
 background-color: var(--blue-bulletin);
  color: var(--watchdog-white);
  padding: 1rem;
  margin-bottom: 3rem;
}

header h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  padding: 0;
  margin-bottom: .75rem;
}

header .tagline {
  font-family: var(--font-heading);
  color: var(--watchdog-white);
  padding: 0;
}

.mobile-nav {
  margin-top: 1rem;
}

.menu-button {
  display: block;
  text-align: center;
  background-color: var(--news-flash);
  color: var(--watchdog-white);
  border-radius: 0.25rem;
  cursor: pointer;
  padding: 0.75rem;
}

.menu {
  display: flex;
  flex-direction: column;
  margin-top: .5rem;
  gap: 0.5rem;
}

#menu-toggle:not(:checked) ~ .menu {
  display: none;
}

nav li a{
  background-color: var(--watchdog-white);
  display: block;
  text-align: center;
  padding: 1rem;
  text-decoration: none;
  align-content: center;
  font-family: 'Merriweather', serif;
  color: var(--truth-text);
  border-bottom: 1px solid var(--truth-text);
}



/* ///ADD/// Global Layout Styles */

body{
      background-color: var(--watchdog-white);
}

.container{
  margin: auto;
  padding: 0 1rem;
}

.breaking-news-article {
  background-color: var(--news-flash);
  color: var(--watchdog-white);
  padding: 1rem;
  margin: 1rem auto;
  border: var(--truth-text) solid 1px;
  box-shadow: var(--shadow);
}

.breaking-news-article video {
  width: 100%;
  height: auto;
}

video{
  padding-top: .5rem;
}

#featured-articles-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.article {
  border: var(--story-subtitle) solid 1px;
  box-shadow: var(--shadow);
  padding: 1rem;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.form-group input{
  min-height: 1.5rem;
}

form{
  background-color: var(--news-flash);
  color: var(--watchdog-white);
  padding: 1rem;
  margin: 1rem auto;
  box-shadow: var(--shadow);
}

fieldset{
  border: 1px solid var(--truth-text);
  padding: 1rem;
  margin: auto;
}

fieldset label{
  display: block;
  flex-direction: column;
  margin-bottom: 1rem;
}

 form button {
  display: block;
  text-align: center;
  margin: auto;
  width: 100%;
  background-color: var(--blue-bulletin);
  color: var(--watchdog-white);
  border-radius: 0.25rem;
  cursor: pointer;
  padding: 0.75rem;
  margin-top: 1rem;;
  box-shadow: var(--shadow);
}

.social-links {
  display: flex;
  gap: 1rem;
  padding-top: .5rem;
}

.social-links a {
  color: var(--watchdog-white);
  transition: var(--transition);
}

footer{
  background-color: var(--blue-bulletin);
  padding: 1rem;
}

/* ///ADD/// Global Text Styles */

main h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin: 2rem 0 2rem 0;
}
.container h2 {
  margin-bottom: 1rem;
}

.breaking-news-article h3 {
  font-family: var(--font-heading);
  color: var(--watchdog-white);
  font-size: 1rem;
  margin-bottom: .5rem;
}

.breaking-news-article p {
  font-family: var(--font-body);
  color: var(--watchdog-white);
  font-size: .75rem;
}

blockquote{
  font-family: var(--font-body);
  font-style: italic;
  margin: auto;
  padding: 1rem 0 1rem 0;
}

main h3 {
  font-family: var(--font-heading);
}

article h3{
  font-family: var(--font-heading);
  margin-bottom: .5rem;
  line-height: 1.2em;
}

main p{
  font-family: var(--font-body);
  line-height: 1.6;
}

#alerts h3{
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-top: 2rem;
}

#alerts p{
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  margin-top: 1rem;
}

.form-group label {
  font-family: var(--font-body);
  color: var(--watchdog-white);
  font-size: .75rem;
  margin-bottom: .25rem;
}

#notification-preferences legend {
  font-family: var(--font-body);
  color: var(--watchdog-white);
  text-transform: uppercase;
  font-size: 1rem;
}

form button{
  font-family: var(--font-body);
  text-transform: uppercase;
}

footer{
  color: var(--watchdog-white);
}

footer svg {
  fill: var(--watchdog-white);
  background-color: var(--news-flash);
  padding: .5rem;
  border-radius: .25rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

/* ///ADD/// medium styles 620px */

@media (min-width: 620px) {

.menu {
    display: flex !important;
    flex-direction: row;
  }

  .menu li a {
    border-bottom: none;
  }

.menu li a {
    display: inline-block;
    color: var(--watchdog-white);
    background-color: var(--news-flash);
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    margin-right: .5rem;
  }

.menu-button {
  display: none;
}

#menu-toggle{
  display: none;
}

#breaking-news {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

#featured-articles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

#form-field {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: .5rem;
  }

#checkboxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
}

/* ///ADD/// large styles 920px */

@media (min-width: 920px) {

.menu{
  display: flex;
}

.menu li a {
    display: inline-block;
    color: var(--watchdog-white);
    background-color: var(--news-flash);
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    margin-right: .5rem;
  }

.menu-button {
  display: none;
}

#breaking-news {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

#featured-articles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

#form-field {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: .5rem;
  }

#checkboxes {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}
}

/* ///ADD/// x-large styles 1024px */

@media (min-width: 1024px) {

main{
  padding: 0 10rem;
}

#header-contents{
  margin-left: 10rem;
}

.menu{
  display: flex;
}

.menu li a {
    display: inline-block;
    color: var(--watchdog-white);
    background-color: var(--news-flash);
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    margin-right: .5rem;
  }

.menu-button {
  display: none;
}

#breaking-news {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

#featured-articles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 1rem;
}

#form-field {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: .5rem;
  }

#checkboxes {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

#footer-contents{
  margin-left: 10rem;
}
}

/* ///ADD/// Interaction Queries for color scheme light and dark and motion preference */

@media (prefers-color-scheme: dark) { 
body.dark-mode { 
    background: var(--truth-text); 
    color: var(--watchdog-white); 
  } 
}


@media (prefers-color-scheme: light) {
body.light-mode{
    background: var(--watchdog-white);
    color: var(--truth-text);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}



/* ///ADD///  Feature Query for :has() that checks if the #menu-toggle is checked */

@supports (selector(:has(#menu-toggle:checked))) {
  #menu-toggle:checked ~ .menu {
    display: flex;
  }
}