/* IsAt MG — a night sky studio page; each game card carries its own colour world. */
:root {
  --night: #120b1d;
  --night-2: #1e1233;
  --ink: #f4eefb;
  --soft: #b6a8c9;
  --line: rgba(255, 255, 255, 0.1);
  --glass: rgba(255, 255, 255, 0.06);
  --puf-a: #ffe7a3;
  --puf-b: #ff8f86;
  --puf-ink: #4a2240;
  --kefe-a: #efe2da;
  --kefe-b: #f2c7b2;
  --kefe-ink: #2e2622;
  --accent: #ffbd45;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--night);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Avenir Next", "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}

/* Slow drifting colour clouds and a few stars behind everything. */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(1200px 700px at 50% -10%, var(--night-2), var(--night));
  overflow: hidden;
}
.sky span {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.32;
  animation: drift 26s ease-in-out infinite alternate;
}
.sky span:nth-child(1) { background: #ff7a66; left: -20vmax; top: -10vmax; }
.sky span:nth-child(2) { background: #6b4cd6; right: -25vmax; top: 20vmax; animation-delay: -9s; }
.sky span:nth-child(3) { background: #2f8580; left: 10vmax; bottom: -35vmax; animation-delay: -17s; opacity: 0.22; }
.sky i {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.5;
  animation: twinkle 4s ease-in-out infinite;
}
@keyframes drift { to { transform: translate(8vmax, 6vmax) scale(1.1); } }
@keyframes twinkle { 50% { opacity: 0.1; } }

a { color: inherit; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

header.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.02em;
}
.brand img { width: 38px; height: 38px; }
.brand small { font-weight: 600; color: var(--soft); font-size: 14px; letter-spacing: 0.08em; }
nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
nav a {
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line);
}
nav a.lang { background: var(--ink); color: var(--night); border-color: transparent; }

.hero { text-align: center; padding: 72px 0 40px; }
.hero .mark { width: 120px; height: 120px; animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.hero h1 {
  margin: 26px auto 12px;
  max-width: 760px;
  font-size: clamp(38px, 7vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #ffb39c, var(--accent), #b9a2ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p { color: var(--soft); max-width: 600px; margin: 0 auto; font-size: 19px; }

h2.section {
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--soft);
  margin: 64px 0 18px;
}

/* Game cards: the game's own sky, its icon, a phone and a short line. */
.games { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.game {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
  min-height: 420px;
  padding: 28px;
  border-radius: 32px;
  text-decoration: none;
  overflow: hidden;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}
.game:hover { box-shadow: 0 40px 80px rgba(0, 0, 0, 0.45); }
.game.puf { background: linear-gradient(160deg, var(--puf-a), var(--puf-b)); color: var(--puf-ink); }
.game.kefe { background: linear-gradient(160deg, var(--kefe-a), var(--kefe-b)); color: var(--kefe-ink); }
.game .icon { width: 76px; height: 76px; border-radius: 18px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18); }
.game h3 { margin: 16px 0 4px; font-size: 34px; line-height: 1.1; }
.game.kefe h3 { font-family: Didot, "Bodoni 72", "Times New Roman", serif; letter-spacing: 0.3em; font-weight: 400; }
.game p { margin: 0 0 16px; opacity: 0.8; }
.game .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.game .tags span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
}
.game .go { display: inline-block; margin-top: 18px; font-weight: 800; }
.game .phone {
  width: 150px;
  border-radius: 22px;
  border: 5px solid rgba(0, 0, 0, 0.75);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
  transform: rotate(4deg) translateY(10px);
}

.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.principle {
  padding: 22px;
  border-radius: 24px;
  background: var(--glass);
  border: 1px solid var(--line);
}
.principle b { display: block; font-size: 17px; margin-bottom: 6px; }
.principle span { color: var(--soft); font-size: 15px; }
.principle .dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  margin-bottom: 14px;
  background: radial-gradient(circle at 35% 30%, #fff8, transparent 40%), var(--c, #ff7a66);
}

.contact {
  margin: 64px 0 20px;
  padding: 36px;
  border-radius: 32px;
  text-align: center;
  background: var(--glass);
  border: 1px solid var(--line);
}
.contact h3 { margin: 0 0 6px; font-size: 28px; }
.contact p { margin: 0 0 18px; color: var(--soft); }
.contact a.mail {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--night);
  font-weight: 800;
  text-decoration: none;
}

footer { padding: 26px 0 40px; text-align: center; color: var(--soft); font-size: 14px; }

@media (max-width: 820px) {
  .games { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  header.top { flex-direction: column; align-items: flex-start; }
  nav { justify-content: flex-start; }
  .game { grid-template-columns: 1fr; min-height: 0; }
  .game .phone { width: 130px; justify-self: end; margin-top: -40px; }
  .principles { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
