@import url('https://fonts.googleapis.com/css2?family=Fuzzy+Bubbles:wght@400;700&display=swap');

:root {
  --font-color: #333; 
  --footer-color: #999;
}

body {
  color: var(--font-color);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.5em;
}

main {
  max-width: 800px;
  margin: 2em auto;
  padding: 1em;
}

a, a:hover, a:visited {
  /* color: var(--font-color); */
  /* text-decoration-style: wavy; */
}

/* From https://pepelsbey.dev/articles/skewed-highlight/ */
mark, .highlight {
	--mark-color: #FFEA00;
	--mark-skew: 0.25em;
	--mark-height: 1em;
	--mark-overlap: 0.3em;

  font-family: "Fuzzy Bubbles", sans-serif;
  font-weight: bold;
  font-size: 1.1em;

	margin-inline: calc(var(--mark-overlap) * -1);
	padding-inline: var(--mark-overlap);

	background-color: transparent;
	background-image:
		linear-gradient(
			to bottom right,
			transparent 50%,
			var(--mark-color) 50%
		),
		linear-gradient(
			var(--mark-color),
			var(--mark-color)
		),
		linear-gradient(
			to top left,
			transparent 50%,
			var(--mark-color) 50%
		)
	;
	background-size:
		var(--mark-skew) var(--mark-height),
		calc(100% - var(--mark-skew) * 2 + 1px) var(--mark-height),
		var(--mark-skew) var(--mark-height)
	;
	background-position:
		left center,
		center,
		right center
	;
	background-repeat: no-repeat;
	color: inherit;

  -webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

img.logo {
  display: block;
  margin: 1em auto;
  max-width: 50px;
}

h2 {
  font-family: "Fuzzy Bubbles", sans-serif;
  font-size: 1.45em;
  text-align: center;
  line-height: 1.2em;
  margin-bottom: 1.5em;
  transform: rotate(-0.75deg);
}

form.signup {
  --border: #CAE1FC;

  padding: 1em;
  background-color: #ECF4FE;
  border: 1px solid var(--border);
  border-radius: 0.5em;

  input {
    font-size: 1.1em;
    border-radius: 5px;
    border: 1px solid var(--border);
    padding: 0.3em;
  }

  @media screen and (width <= 420px) {
    input[type="email"], input[type="submit"] {
      margin-bottom: 0.5em;
      width: 100%;
    }
  }

  input[type="submit"] {
    color: #FFF;
    /* background-color: #78BA55; */
    background-image: linear-gradient(#78BA55, #8BC26D);
    padding: 0.3em 1em;
    border-color: #78BA55;

    /* &:hover {
      box-shadow: #78BA55 0 0 2px;
    } */
  }

  input[type="email"]:focus {
    outline: 1px solid #A9CEFA;
    border-color: #A9CEFA;
  }
}

footer {
  color: var(--footer-color);
  font-size: 0.8em;
  text-align: center;

  a, a:hover, a:visited {
    color: var(--footer-color);
    text-decoration-style: solid/;
  }

  &:hover {
    .heart {
      color: red;
    }
  }
}

.screenshots {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.screenshots img {
  max-width: 49%;
  border: 1px solid var(--footer-color);
  border-radius: 5px;
  box-shadow: #C4C4C4 0 0 8px;
}

/* From https://danq.me/2025/08/15/details-summary-lightboxes-in-pure-html-css/ */
.lightbox {
  max-width: 49%;
  img {
    max-width: 100%;
  }

  summary {
    display: block;
    cursor: zoom-in;

    &::before {
      content: '';
      backdrop-filter: none;
      /* transition: backdrop-filter 0.5s, background 0.2s; */
      background: transparent;
    }
  }

  & > div img {
    max-width: 98vw;
    max-height: 98vh;
    box-shadow: 0 0 12px #333;
    opacity: 0;
    transition: filter 0.3s, opacity 0.6s;
    filter: blur(6px);
    border: none;
  }

  &[open] > div {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 110;
    pointer-events: none;

    img {
      opacity: 1;
      filter: none;
    }
  }

  &[open] > summary {
    cursor: auto;

    &::before {
      content: '';
      background: #000a;
      backdrop-filter: blur(6px);
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      /* height: 100vw; */
      bottom: 0;
      z-index: 109;
    }
  }
}

body:has(.lightbox[open]) {
  overflow: hidden;
}
