* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding-top: 160px;
  font-family: Helvetica, Arial, sans-serif;
  color: #333;
  background-color: #cbbfa8;
  background-image: url("../images/mongolian_pattern.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  background-attachment: scroll;
}

.site-header {
  display: flex;
  justify-content: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 27px 40px;
}

.site-header .banner {
  max-width: 100%;
  height: auto;
  border: 3px solid #c9a349;
  border-radius: 16px;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.card {
  background: #fff;
  border: 3px solid #c9a349;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  padding: 40px 32px 48px;
}

.hero-visual {
  position: relative;
  margin: -40px -32px -48px;
}

.hero-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

.hero-visual .grid {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  padding: 0 4.5%;
}

.websites .hero-visual .grid {
  grid-template-columns: repeat(3, 20%);
  justify-content: space-between;
}

.clients .hero-visual .grid {
  grid-template-columns: repeat(2, 1fr);
  max-width: 44%;
  margin: 0 auto;
  gap: 4%;
  top: 64%;
}

.section-title {
  text-align: center;
  font-size: 1.6rem;
  margin-top: 0;
  margin-bottom: 4px;
}

.hint {
  text-align: center;
  color: #777;
  font-size: 0.9rem;
  margin-top: 0;
  margin-bottom: 32px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 32px;
  padding: 24px;
}

.tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 2 / 1;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  overflow: visible;
  transform: scale(1);
  transform-origin: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 0 1px #000;
  z-index: 1;
}

.tile--dark {
  background: #166537;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 8px;
}

.tile--padded img {
  width: 90%;
  height: 90%;
}

.tile:hover,
.tile:focus-visible {
  transform: scale(1.1);
  box-shadow: 0 0 0 1px #000, 0 4px 16px rgba(0, 0, 0, 0.15);
  z-index: 2;
}

.site-tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 2 / 1;
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  transform: scale(1);
  transform-origin: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 0 1px #000;
}

.site-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 8px;
}

.site-tile--padded img {
  width: 90%;
  height: 90%;
}

.site-tile--cornsilk {
  background: cornsilk;
}

.site-tile:hover,
.site-tile:focus-visible {
  transform: scale(1.1);
  box-shadow: 0 0 0 1px #000, 0 4px 16px rgba(0, 0, 0, 0.15);
  z-index: 2;
}

.tile.active {
  transform: scale(1.7);
  background: transparent;
  box-shadow: none;
  z-index: 3;
}

.tile-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 8px 24px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.tile.active .tile-overlay {
  opacity: 1;
  pointer-events: auto;
}

.tile-overlay p {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.4;
  text-align: center;
  color: #333;
}

.site-footer {
  text-align: center;
  padding: 0px 16px 120px;
  color: #555;
}

.site-footer a {
  color: #333;
}
