:root {
  --white: #f6f6f6;
  --wool: #e8e8e8;
  --grey: #333;
  --red: #B30406;
  --dark-red: #980200;
  --header: #111
  background-color: #f6f6f6;
  font-family: "DM Sans", sans-serif;
  color: var(--grey);
  /* Contact form stuff */
  --radio-width: 20px;
  --radio-border-width: 3px;
  --radio-inset: 5px;
  --radio-color: #980200;
  --radio-border-color: #980200;
  --check-border-width: 2px;
  --form-color: #eee;
}
/* ------ MAIN STUFF -------- */
*, *::after, *::before {
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  line-height: 1.5;
  font-family: "DM Sans", sans-serif;
  color: var(--grey);
}


/* ------ MENU ICON -------- */
header ul {
  position: absolute;
  opacity: 0;
  transform: translateX(-100vw);
  transition: transform 300ms ease;
}

.menu-icon {
  position: fixed;
  top: 8px;
  left: 8px;
  background-color: var(--grey);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  padding: 1rem;
  z-index: 2;
  }

/* override the width and height attributes in the SVG markup  */
 .menu-icon svg {
  width: 28px;
  height: auto;
} 

.menu-icon line {
  stroke: var(--white);
  stroke-width: 3px;
  stroke-linecap: round;
  transform-origin: center;
  transition: transform 300ms ease;
}

.menu-icon line:first-child {
  transform: translateY(16%)
}

.menu-icon line:last-child {
  transform: translateY(-16%);
}

/* JavaScript toggles a "close" class on the <nav> when the menu-icon is clicked */
.close nav {
  display: block;
}

.close line:first-child {
  transform: rotate(135deg);
}

.close line:last-child {
  transform: rotate(-135deg);
}

.close ul {
  opacity: 1;
  transform: translateX(0);
}

/* ------ MENU ICON CLOSE-------- */

nav {
display: none;
background-color: var(--grey);
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100vh;
z-index: 1;
padding: 6rem 2rem 0;
}

nav ul {
  list-style-type: none;
  padding: 0;
}

nav li {
  border-bottom: 1px solid var(--white);
}

nav li a {
  display: inline-block;
  padding: 1em;
  font-size: 1.25rem;
  font-weight: 200;
  color: var(--white);
}

nav li a:hover {
  text-decoration: underline;
}

/*------ HERO SETUP ------*/
.hero {
  position: relative;
  color: var(--white);
  margin-bottom: 6rem;
  align-self: stretch;
  display: flex;
  justify-content: center;
  /* height: 100vh; */
 }

 /* this will center then crop the image to fit the hero container */
.hero img {
  height: 100%;
  object-fit: cover;
}


.hero h1 {
  font-size: clamp(1rem, 7vw, 7rem);
  margin: 0;
 }

.hero_overlay {
  position: absolute;
  align-self: center;
  flex-direction: column;
  flex-wrap: nowrap;
  text-shadow: 2px 3px #333;
  font-size: clamp(1rem, 4vw, 3.25rem);
  display: flex;
  inset: 10 0 0 0;
  align-items: center;
}

main {
  padding: 0 1rem;
  width: 100%;
  max-width: 70rem;
  margin: 0 auto;
}

article {
  margin-bottom: 4rem;
  max-width: 70rem;
  display: flex;
}



/* ------------------------------------------ */

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

a[href]:hover {
  font-weight: bold;
  color: var(--wool);
}

h1,
h2,
h3 {
  font-family: "Lora", serif;
  line-height: 1.1;
  color: var(--header);
}

img {
  width: 100%;
  height: auto;
  display: block;
}

picture img {
  max-width: none;
  height: 100%;
}

.panel {
  display: flex;
  background-color: #e8e8e8;
  padding: 1rem;
  flex-direction: column;
}

.text-wrapper {
  order: 1;
  }


* {
  box-sizing: border-box;
}

.cards {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 1rem;
  height: 275px;
  margin: 0 1rem 6rem;
  flex-direction: column;
  background-color: #e8e8e8;
  padding: 2rem;
}

.card {
  margin: 0px;
  padding: 0px;
  flex: 1 1 0;
  color: var(--white);
  font-weight: bold;
  text-align: center;
  border: 1px solid var(--grey);
  background-color: var(--grey);
 display:block;
}

.card:hover {
  color: var(--wool);
  box-shadow: 3px 3px 4px rgba(51, 51, 51, 0.6);
  transition: box-shadow 100ms ease;
}

.card p {
  transform: scale(.9);
  font-size: 18px;
  transition: transform 300ms;
  line-height: 1;
}

section.cards {
  height: fit-content;
  margin: 0 1rem 6rem;
}

.special {
margin: 0 1rem 3rem;
}

.card:hover p {
  transform: scale(1);
}

.container {
  padding: 0 1rem;
  width: 100%;
  max-width: 50rem;
  margin: 0 auto;
}

.button {
  display: inline-block;
  color: var(--white);
  font-size: 14px;
  font-weight: bold;
  padding: 0.8rem 1rem;
  border-radius: 1000px;
  transition: background-color 300ms ease;
  background-color: var(--dark-red);
}

.button:hover {
  background-color: var(--red);
  cursor: pointer;
}

.text-content .button {
  margin-top: 2rem;
}


/* ------------------------------------------ */

svg {
  width: 200px;
}

/* temp fix to size about img */
img[srcset] {
  width: 50%;
  height: auto;
  margin: 2rem auto;
}


nav ul {
  margin: 0;
}

/* -------------contact page stuff---------- */
.contact main {
  margin-bottom: 3rem;
}

.contact .image-wrapper {
  max-width: 300px;
  min-width: 100px;
  align-self: center;
}

.contact form {
  display: grid;
}

.contact .fieldset-wrapper,
.contact button,
.contact form > label {
  display: block;
  margin-top: 1.5rem;
}

.contact form > label:first-of-type {
  margin-top: 0;
}

.contact .fieldset-wrapper {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1rem;
}

.contact fieldset {
  display: contents;
  border: none;
  padding: 0;
  margin: 0;
}

.margin {
margin-bottom: 6rem;
}

.contact legend {
  grid-column: 1 / -1;
}

.contact button {
  justify-self: center;
  margin-bottom: 6rem;
}

.contact main {
  display: flex;
  flex-direction: column;
}

.contact svg {
  width: 100%;
  height: auto;
}

.contact .svg-wrapper {
  max-width: 300px;
  min-width: 100px;
  align-self: center;
}

input[type=checkbox], input[type=radio] {
  appearance: none;
  -webkit-appearance: none ;
  width: var(--radio-width);
  height: var(--radio-width);
  border: var(--radio-border-width) solid var(--radio-border-color);

  display: grid;
  align-items: center;
  justify-content: center;
}

input[type=radio] {
  border-radius: 50%;
}


input[type=checkbox]::after, input[type=radio]::after {
  content: "";
  display: block;

  grid-row: 1/ span 1;
  grid-column: 1/ span 1;
 }

 input[type=checkbox]::after {
  width: calc(var(--radio-width) - 3*var(--radio-inset));
  height: calc(var(--radio-width) - 2*var(--radio-inset));
  border-right: var(--radio-border-width) solid var(--radio-border-color);
  border-bottom: var(--radio-border-width) solid var(--radio-border-color);
  
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 50ms;
 }


  input[type=radio]::after { 
  width: calc(var(--radio-width) - 2*var(--radio-inset));
  height: calc(var(--radio-width) - 2*var(--radio-inset));
  background-color: var(--radio-color);
  border-radius: 50%;   
  transform: scale(0);
  transition: transform 100ms;
  }

  input[type=radio]:checked::after{
    transform: scale(1);
    }

    input[type=checkbox]:checked::after{
      opacity: 1;
      }
    


@media (min-width: 601px) {

  .contact form > label,
  .contact .fieldset-wrapper,
  .contact button {
    margin-top: 0;
  }

  .contact main {
    display: flex;
    flex-direction: row;
  }

  .contact .svg-wrapper {
    align-self:flex-start;
    margin-top: 0;
  }
}


/* ------------------------------------------ */


@media (min-width: 401px) {
  /* tablet CSS */
.panel {
   flex-direction: row;
   gap: 50px;
 }
 
 .left {
  order: 1;
  flex: .6
}

.text-wrapper {
  order: 0;
  flex: .6
}

.image-wrapper {
flex: .4;
}

h2{
  margin: 0;
}

.cards {
  display: flex;
   flex-direction: row;
   flex-wrap: wrap;  
}

.cards > * {
  flex: 1 1 33%;
}

/*-------Navigation-----*/
header {
  background-color: var(--dark-red);
  color: var(--white);
  display: flex;
  justify-content: flex-end;
  align-self: stretch;
}

header ul {
  position: static;
  opacity: 1;
  transform: none;
  transition: none;
}

.menu-icon {
  display: none;
}


nav {
  display: contents;
  margin: 0;
  padding: 0;
}

nav a {
  padding: 0px 20px;
  font-size: large;
  display: inline-block;
}

nav a[href]:hover {
  text-decoration-line: underline;
  color: var(--wool);
  font-weight: lighter;
}

nav ul {
  display: flex;
  flex-direction: row;
  list-style-type: none;
  margin: 0;
  padding: 0;
}

nav ul a {
  display: block;
  padding: 1.5rem;
}

nav li {
  border-bottom: none;
}

}

@media (min-width: 601px) {
  .contact form {
    grid-template-columns: max-content 1fr;
    column-gap: 1rem;
    row-gap: 1.5rem;
  }

  .contact button,
  .contact .fieldset-wrapper {
    grid-column: 2 / span 1;
  }

  .contact form > label {
    justify-self: end;
  }

  .contact .fieldset-wrapper,
  .contact button,
  .contact form > label {
    margin-top: 0;
  }

  .contact button {
    justify-self: start;
  }
}


@media (min-width: 801px) {
  /* desktop CSS */
  .cards {
    flex-direction: row; 
    flex-wrap: nowrap;
  }
  .cards > * {
    flex: 1 1 0;}
  }