:root {
  /* fonts */
  --cursive: "Merienda", cursive;
  --serif: "Alegreya", serif;
  
  /* colors */
  --green: #187740;
  --red: #c44536;
  --white: #ffffff;
  
  --body-bkg: color-mix(in oklch, var(--green), white 75%);
  --body-stripe: color-mix(in oklch, var(--green), white 62.5%);
  --day-bkg: color-mix(in oklch, var(--red), black 25%);
  --day-txt: var(--white);
  --card-color: var(--white);
  --link-color: var(--green);
}

* {
  margin: 0;
  padding: 0;
  line-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  row-gap: 1rem;
  
  padding: 4rem 5vw;
  
  /* background */
  background-image: linear-gradient(0deg, transparent 50%, var(--body-stripe) 50%);
  background-size: 32px 32px;
  background-color: var(--body-bkg);
}

.title {
  font-family: var(--cursive);
  font-size: 4rem;
  text-align: center;
  
  /* TODO: more work styling this */
}

.cards-container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  row-gap: 2rem;
  column-gap: 5vw;
  
  align-items: center;
  justify-content: center;
}

section {
  display: flex;
  justify-content: center;
}

.card-holder {
  --unit: 1rem;
  
  display: grid;
  grid-template-columns:
    calc(var(--unit) * 2.5)
    calc(var(--unit) * 15)
    calc(var(--unit) * 2.5);
  
  grid-template-rows:
    calc(var(--unit) * 4)
    calc(var(--unit) * 4)
    calc(var(--unit) * 17.5)
    calc(var(--unit) * 2.5);
    
  .card {
    grid-row: 2 / 4;
    grid-column: 2 / 3;
    
    background-color: var(--card-color);
    transition: translate 0.25s;
    
    box-shadow: 0px 0px 8px 2px grey;
  }
  
  button.open-day {
    grid-row: 3 / 5;
    grid-column: 1 / 4;

    background: var(--day-bkg);
    border: none;
    
    font-size: 10rem;
    font-family: var(--cursive);
    color: var(--day-txt);
    text-align: center;

    /* for the card behind */
    z-index: 1;
  }
  
  &:has(button.open-day:hover, .card:hover) .card {
    translate: 0 calc(var(--unit) * -2);
  }
}

dialog {
  margin: auto;
  padding: min(2.5rem, 5vw);
  width: min(35rem, 75vw);
}

.day-content {
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 1rem;
  
  .close-day {
    grid-column-start: 2;
    font-size: 2rem;
    padding: 0 0.5rem;
    
    border: none;
    color: var(--green);
    background-color: color-mix(in oklch, var(--green), white 75%);
    border-radius: 0.5rem;
    cursor: pointer;
  }
  
  h2 {
    grid-column-start: 1;
    grid-row-start: 1;
    
    font-family: var(--cursive);
    
    padding-bottom: 0.5rem;
  }
  
  p {
    grid-column: span 2;
    
    font-family: var(--serif);
    line-height: 150%;
  }
  
  a, a:visited {
    color: green;
    text-decoration: underline;
  }
  
  .icon {
    height: 1rem;
    float: left;
    padding-top: 0.25rem;
    padding-right: 0.25rem;
  }
}
