:root {
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --gray-950: #030712;
  --red-50: #fdf4f3;
  --red-100: #fce7e7;
  --red-200: #f8d3d4;
  --red-300: #f2afb0;
  --red-400: #ea8286;
  --red-500: #dd565e;
  --red-600: #c93546;
  --red-700: #a92739;
  --red-800: #972639;
  --red-900: #792234;
  --red-950: #430e17;
}

body {
  font-family: 'Solway', serif;
  background-color: var(--gray-200);
}

svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* HEADER */

header {
  position: fixed;
  width: 100%;
  background-color: var(--gray-100);
  z-index: 100;
}

.header-logo {
  position: absolute;
  width: 10vw;
  height: 10vw;
  min-width: 6rem;
  min-height: 6rem;
  filter: drop-shadow(0 0 9px rgba(0, 0, 0, 0.1));
  z-index: 101;
}

.header-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.5rem;
  background-color: white;
  clip-path: polygon(0 0, 100% 0, 97% 96%, 0 100%);
}

header nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem;
  padding-left: max(10vw, 6rem);
}

.header-main {
  font-size: 1.5rem;
  color: var(--red-900);
  white-space: nowrap;
  padding: 0 0.5rem;
}

.header-main:hover {
  color: black;
}

.menu {
  padding: 0.25rem;
  cursor: pointer;
}

.menu svg {
  width: 24px;
  height: 24px;
  transition: color 0.3s ease;
}

.menu:hover svg {
  color: var(--red-900);
}

.menu input,
.menu input:not(:checked) ~ .menu-hide,
.menu input:checked ~ .menu-show {
  display: none;
}

header ul {
  position: absolute;
  top: 100%;
  left: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  background-color: var(--gray-100);
  transition: transform 0.3s ease;
}

.menu:has(input:checked) ~ ul {
  transform: translateX(-100%);
} 

header ul a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--gray-800);
  transition: color 0.3s ease;
}

header ul a:hover,
header ul a.selected {
  color: var(--red-900);
}

@media screen and (min-width: 680px) {
  .menu {
    display: none;
  }

  header ul {
    position: static;
    width: unset;
    flex-direction: row;
    align-items: center;
    padding: 0 0.25rem;
    transition: none;
  }

  .menu:has(input:checked) ~ ul {
    transform: none;
  } 

  header ul a {
    padding: 0.25rem 0.5rem;
  }
}

/* MAIN */

.top-spacing {
  padding-top: max(10vw, 6rem);
}

.bottom-spacing {
  padding-bottom: 2rem;
}

main {
  font-size: 0.875rem;
}

main img {
  border-radius: 0.25rem;
}

.banner-image {
  width: 100%;
  height: 40vh;
  min-height: 30vw;
  object-fit: cover;
  object-position: bottom;
  border-radius: 0;
}

main h2 {
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 1px;
  font-size: 1.125rem;
  line-height: 1.75rem;
  margin-top: 1rem;
}

main h3 {
  margin-top: 0.5rem;
  font-weight: bold;
  font-style: italic;
  font-size: 1rem;
}

main p {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

main ul {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  list-style-type: disc;
}

main a {
  color: var(--red-800);
  text-decoration: underline;
  transition: color 0.2s ease;
}

main a:hover {
  color: var(--gray-950);
}

.contrast {
  background-color: var(--gray-900);
  color: var(--gray-200);
}

.container {
  padding: 0.5rem 1rem 1rem;
  max-width: 960px;
  margin: 0 auto;
}

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem 1rem;
}

.images {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 320px;
}

@media screen and (min-width: 560px) {
  .split {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  }

  .images {
    margin-top: 1.5rem;
  }
}

.split-fair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem 3rem;
}

@media screen and (min-width: 560px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

@media screen and (min-width: 860px) {
  .cards {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.card {
  display: flex;
  flex-direction: column;
}

.card-spacer {
  margin-top: auto;
}

/* FOOTER */

footer {
  background-color: var(--gray-900);
  color: var(--gray-400);
  padding: 1rem 0;
}

footer .container {
  display: flex;
  justify-content: space-between;
}

footer .copyright {
  margin-top: 0.5rem;
  font-size: 0.825rem;
  color: var(--gray-500);
}

footer h3 {
  font-size: 1.25rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
  margin-top: 0.25rem;
}

.footer-links svg {
  width: 24px;
  height: 24px;
  transition: color 0.3s;
}

.footer-links a:hover svg {
  color: var(--gray-200);
}

footer .editor {
  width: max-content;
  font-size: 0.825rem;
  color: var(--gray-500);
  cursor: pointer;
}

footer .editor:hover {
  text-decoration: underline;
}

/* COMPONENTS */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 0.25rem;
  background-image: linear-gradient(40deg, var(--gray-800), var(--gray-400));
  background-size: 200% 200%;
  color: var(--gray-200);
  text-decoration: none;
  font-size: 1rem;
  cursor: pointer;
  transition: background-position 0.3s, color 0.3s;
}

.btn:hover {
  background-position: 100% 100%;
  color: var(--gray-50);
}

.btn svg {
  flex-shrink: 0;
  transition: transform 0.3s;
}

.btn:hover svg {
  transform: scale(1.2);
}

/* EDITOR */

.editing [data-edit] {
  margin: 1.5rem 2rem 1.5rem 0.5rem;
  position: relative;
  cursor: pointer;
}

.editing [data-edit]::before {
  content: '';
  position: absolute;
  display: block;
  left: -8px;
  top: -8px;
  width: calc(100% + 16px);
  height: calc(100% + 16px);
  background-color: var(--gray-400);
  border-radius: 0.25rem;
  opacity: 0.2;
}

.editing [data-edit]:hover::before {
  opacity: 0.3;
}

.editing [data-edit]::after {
  content: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16"><path d="M22.853,1.148a3.626,3.626,0,0,0-5.124,0L1.465,17.412A4.968,4.968,0,0,0,0,20.947V23a1,1,0,0,0,1,1H3.053a4.966,4.966,0,0,0,3.535-1.464L22.853,6.271A3.626,3.626,0,0,0,22.853,1.148ZM5.174,21.122A3.022,3.022,0,0,1,3.053,22H2V20.947a2.98,2.98,0,0,1,.879-2.121L15.222,6.483l2.3,2.3ZM21.438,4.857,18.932,7.364l-2.3-2.295,2.507-2.507a1.623,1.623,0,1,1,2.295,2.3Z"/></svg>');
  position: absolute;
  display: block;
  left: calc(100% + 12px);
  top: -8px;
  width: 24px;
  height: 24px;
  padding: 3px 4px;
  background-color: var(--gray-400);
  border-radius: 0.25rem;
  opacity: 0.2;
}

.editing [data-edit]:hover::after {
  opacity: 0.6;
}

.editing [data-edit]:has(.banner-image) {
  margin: 0;
}

.editing [data-edit]:has(.banner-image)::before {
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

.editing [data-edit]:has(.banner-image)::after {
  top: unset;
  left: unset;
  right: 8px;
  bottom: 8px;
}

.modal-container {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 200;
  width: 100vw;
  height: 100vh;
  padding: 1rem;
  background-color: #0005;
}

.modal {
  max-width: 620px;
  margin: 5rem auto;
  padding: 1rem;
  background-color: var(--gray-100);
  border-radius: 0.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  overscroll-behavior: none;
}

.modal h2 {
  font-size: 1.25rem;
}

.modal input,
.modal textarea {
  width: 100%;
  padding: 0.5rem;
  background-color: var(--gray-300);
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

.modal p {
  font-size: 0.875rem;
  color: var(--gray-700);
}

.modal a {
  text-decoration: underline;
}

.modal a:hover {
  color: var(--gray-950);
}

.modal input[type="file"] {
  padding: 0.25rem 0.5rem;
}

.modal input::file-selector-button {
  background-color: var(--gray-400);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  cursor: pointer;
}

.toast {
  position: fixed;
  right: 8px;
  bottom: 8px;
  padding: 0.25rem 1rem;
  background-color: var(--gray-400);
  border-radius: 0.25rem;
}

.toast-error {
  background-color: var(--red-500);
}
