/*** GLOBAL ***/

:root {
  --color-accent: #1bcacd;
  --dot-margin-top: 0.5rem;
  --dot-size: 32px;
  font: normal 18px/1.4 Calibri, 'Gill Sans', sans-serif;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  align-items: center;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.3s;
}

body > * {
  width: 100%;
  max-width: 1280px;
}

header,
footer {
  text-align: center;
}

header > *,
footer > * {
  margin-left: 1.25rem;
  margin-right: 1.25rem;
}

header {
  margin-top: 1rem;
}

footer {
  border-top: 4px solid #000;
  font-size: 0.875rem;
  margin-top: 2rem;
}

footer a[href] {
  white-space: nowrap;
}
footer a[href]:hover,
.content a[href]:hover {
  -webkit-filter: brightness(0.75);
  filter: brightness(0.75);
}

footer p {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

:not(.shadow) > a[target]::after {
  content: url(data:image/gif;base64,R0lGODlhCgAKAIAAAAAAAP///yH5BAEAAAEALAAAAAAKAAoAAAIVjA+peaFtgJONMlRxhq5zSUHgsgQFADs=);
  line-height: 1;
  margin-left: 0.2rem;
  vertical-align: middle;
}

blockquote {
  position: relative;
  border-left: 0.25rem solid #999;
  font-style: italic;
  padding-left: 1em;
}

code {
  color: #666;
  font-family: Consolas, monospace;
  font-size: 90%;
  font-weight: bold;
  overflow-wrap: anywhere;
}

figure > img {
  max-width: 100%;
}

h1,
h2,
h3 {
  line-height: 1.2;
}
h1 + p {
  margin-top: -0.5rem;
  margin-bottom: 2rem;
}
h1 + p a {
  display: inline-block;
}

ol ul,
ul ol {
  margin: 0.5rem 0;
}

ol li:not(:last-child),
ul li:not(:last-child) {
  margin-bottom: 0.3rem;
}

strong {
  font-weight: 600;
}

.bolt li {
  list-style-type: '⚡  ';
}

.content {
  padding: 0 1.5rem;
}
.content > * {
  line-height: 1.5;
}

.icons a {
  display: inline-block;
  margin: 0 0.25em;
}
.icons img {
  border: 0;
}

.logo {
  vertical-align: middle;
}

.shadow a:focus img,
.shadow a:hover img {
  filter: drop-shadow(1px 2px 3px rgba(0, 0, 0, 0.3));
}
.shadow a:active img {
  -webkit-filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
  transform: translateY(2px);
}

.text-center {
  text-align: center;
}

/*** CAROUSEL ***/

.carousel {
  position: relative;
  overflow: hidden;
  text-align: center;
}

.carousel__container {
  display: flex;
}

.carousel__slide {
  flex: 0 0 100%;
}
.carousel__slide__img {
  max-width: min(640px, 100vw);
  max-height: min(400px, calc(100vh - var(--dot-size) - var(--dot-margin-top)));
  cursor: grab;
  transition: transform 0.3s;
}

/* Hover zoom */
.zoom .carousel__slide__img {
  cursor: zoom-in;
  -o-object-fit: cover;
  object-fit: cover;
  transform-origin: var(--x) var(--y);
}
.hover-zoom .carousel__slide__img {
  cursor: zoom-out;
  transform: scale(var(--zoom, 1));
}
.hover-zoom .carousel__slide__img:hover {
  --zoom: 2; /* Native dimensions (1280 x 800) */
}

.carousel__button {
  position: absolute;
  top: 50%;
  height: 8%;
  aspect-ratio: 1;
  background: transparent;
  border: 0;
  cursor: pointer;
  fill: var(--color-accent);
  opacity: 0.6;
  padding: 0;
  touch-action: manipulation;
  transform: translateY(-50%);
}
.carousel__button:disabled {
  cursor: default;
  opacity: 0.2;
}
.carousel__button:not(:disabled):focus,
.carousel__button:not(:disabled):hover {
  opacity: 1;
}
.carousel__button__svg {
  width: 100%;
  height: 100%;
}
.carousel__button--prev {
  left: 2vw;
}
.carousel__button--next {
  right: 2vw;
}

.carousel__dots {
  display: flex;
  justify-content: center;
  margin-top: var(--dot-margin-top);
}
.carousel__dot {
  width: var(--dot-size);
  height: var(--dot-size);
  align-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  margin: 0 0.5rem;
  padding: 0;
}
.carousel__dot::after {
  width: 100%;
  height: 4px;
  background: #efefef;
  border-radius: 2px;
  content: '';
}
.carousel__dot[aria-current="true"]::after {
  background: var(--color-accent);
}

/*** IMAGE ZOOM ***/

.image-zoom {
  margin-top: 40px;
  margin-bottom: 40px;
  text-align: center;
}
.image-zoom img {
  width: 50%;
  max-width: 100vw;
  box-shadow: 0 8px 24px rgb(149 157 165 / 0.2);
  cursor: zoom-in;
  transform: scale(1);
  transition: box-shadow 0.3s, transform 0.3s;
}
.image-zoom input[type="checkbox"] {
  display: none;
}
.image-zoom input[type="checkbox"]:checked + img {
  box-shadow: 0 22px 70px 4px rgb(0 0 0 / 0.56);
  cursor: zoom-out;
  transform: scale(2);
}
.image-zoom label {
  display: inline-block;
}
