@font-face {
  font-family: 'font';
  src: url('https://www.antoninocardillo.com/en/fonts/font.woff2') format('woff2');
}

body {
  font-family: font, eb-garamond, "times new roman", serif;
  background: rgba(60,100,100,1.00);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.WM {
  width: 80%;
  padding: 10%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  position: relative;
}

.container {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

.container img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  box-sizing: border-box;
  border: 0;
  filter: contrast(90%);
  opacity: 0;
  animation: fadeIn 1s ease-in forwards;
  transition: filter 0.2s ease-in-out;
}

.container img:hover {
  filter: contrast(100%) brightness(110%);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lang-links {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
}

.lang-links a {
  position: absolute;
  font-size: 0.85rem;
  text-decoration: none;
  padding: 0.3em 0.5em;
  border-radius: 2px;
  pointer-events: all;
  transform-origin: center;
  transition: color 0.4s ease 0.1s, opacity 0.2s ease;
}



.lang-links a.de { top: 0; left: 0; }
.lang-links a.en { top: 0; right: 0; }
.lang-links a.fr { bottom: 0; left: 0; }
.lang-links a.it { bottom: 0; right: 0; }

a:link,
a:visited {
  color: #fff;
  text-decoration: none;
}
a:hover,
a:focus {
  color: red;
  text-decoration: underline;
}
@media screen and (orientation: portrait) {
  .container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (prefers-color-scheme: dark) {
  body {
    background: #000;
  }

  .WM {
    -webkit-filter: invert(1);
    filter: invert(1);
    position: relative;
  }

  .lang-links {
    filter: invert(1); /* annulla il filtro per i link */
  }

  .lang-links a {
    color: #ccc;
  }

  .lang-links a:hover {
    color: #fff;
  }
}
