/* Minimal reset */

* {
  margin: 0;
  padding: 0;
  font-size: 1em;
  font-weight: normal;
  font-family: inherit;
}

a,
abbr,
acronym,
b,
cite,
code,
dfn,
em,
i,
label,
q,
span,
strong,
time {
  font-size: inherit;
  font-weight: inherit;
}

/* end minimal reset */

:root {
  --color-main: hsl(18, 100%, 46%);
  --color-light: hsl(0, 41%, 97%);
  --color-light-pop: white;
  --color-foreground: hsl(224, 18%, 24%);
  --color-highlight-dark: hsla(50, 100%, 70%, 100%);
  --color-highlight: hsla(50, 100%, 80%, 100%);
  --color-highlight-light: hsla(50, 100%, 90%, 100%);
  --color-main-highlight: hsl(18, 100%, 56%);
  --base-font-size: clamp(1.1em, calc(0.95em + 0.675vw), 1.4em);
  --box-shadow:
    0.05rem 0.1rem 0.15rem hsl(0 0 0 / 0.05),
    0.075rem 0.15rem 0.225rem hsl(0 0 0 / 0.05),
    0.125rem 0.25rem 0.375rem hsl(0 0 0 / 0.05),
    0.2rem 0.4rem 0.6rem hsl(0 0 0 / 0.05),
    0.3rem 0.6rem 0.9rem hsl(0 0 0 / 0.05);

  --box-shadow-heavy:
    0.05rem 0.1rem 0.15rem hsl(0 0 0 / 0.15),
    0.075rem 0.15rem 0.225rem hsl(0 0 0 / 0.15),
    0.125rem 0.25rem 0.375rem hsl(0 0 0 / 0.15);
}

:root {
  font-family: lexend, -apple-system, BlinkMacSystemFont, Helvetica, sans-serif;
  font-optical-sizing: auto;
}

@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/quicksand-medium.woff) format('woff');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/fonts/lexend-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/fonts/lexend-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

html {
  font-size: var(--base-font-size);
}

body {
  color: var(--color-foreground);
  background-image: linear-gradient(to bottom right,
      var(--color-light),
      #f6f3eb);
  line-height: 1.4;
  min-width: 32ch;
}

.container {
  width: max(300px, calc(100% - 4em));
  box-sizing: content-box;
  margin: 0 auto;
  padding: 0;
}

h1 {
  font-size: 1.5rem;
  margin: 1.5rem auto 1rem auto;
  text-align: center;
}

footer {
  margin-top: 2rem;
}

.cards {
  margin: 1rem auto 0 auto;
  padding-left: 0;
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem 2rem;
  justify-content: center;
}

.cards li {
  max-height: calc(18rem);
  max-width: 18rem;
  display: none;
}

.cards li[data-show=true] {
  display: block;
}

img.card {
  border-radius: 1rem;
  width: 100%;
  height: calc(100% - 1.8rem);
  object-fit: contain;
}

p.card {
  font-size: 3rem;
  text-align: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

p.card a {
  text-decoration: none
}

p.attribution {
  margin-top: 0.6rem;
  font-size: 0.6rem;
}

p.attribution,
p.attribution a {
  color: rgb(60, 60, 60)
}

/* Modal styles */
.modal {
  opacity: 0;
  position: absolute;
  width: 100%;
  height: 0;
  top: 0;
  left: 0;
  overflow: hidden;
  background: rgba(0, 0, 0, .8);
  transition: transform 0.8s;
  transform-style: preserve-3d;
  transform: rotateY(90deg);
}

.modal:target {
  height: 100%;
  opacity: 1;
  transform: rotateY(0deg);
}

body:has(.modal:target) {
  height: 100vh;
  overflow-y: hidden;
  padding-right: 15px;
  position: fixed;
}

.modal:has(+ :target),
.modal:target+.modal {
  transform: rotateY(90deg);
  transition-delay: 0.8s;
  transition-property: height, opacity;
}

.modal__content {
  border-radius: 1rem;
  position: relative;
  background: #fff;
  padding: 20px;
  width: 80%;
  height: 80%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 200;
}

.modal__content__close {
  position: absolute;
  top: -0.75rem;
  right: -0.75rem;
  width: 1.5rem;
  font-size: 1.5rem;
  line-height: 1.5rem;
  border-radius: 50%;
  text-align: center;
  text-decoration: none;
  padding: 5px;
  background: #2980b9;
  color: #fff;
}

.modal__close {
  &::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
  }
}