/* ============================================================
   Játéksarok — jatek.snuki.hu nyitóoldal
   a játékokkal közös skandináv paletta, modern csempe-ráccsal
   ============================================================ */

:root {
  --paper: #f3ebdb;
  --card: #fbf7ec;
  --ink: #22304a;
  --ink-2: #4a5872;
  --line: #d9cbab;
  --blue: #1f4e8c;
  --blue-deep: #16365f;
  --sun: #f2b23e;
  --sun-deep: #d3961d;
  --sun-ink: #3d2c05;
  --red: #bf4530;

  --font-display: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: Corbel, Candara, "Segoe UI", "Trebuchet MS", sans-serif;
  --font-mono: Consolas, "Cascadia Mono", "Courier New", monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  overflow-x: hidden;
}

/* papírszemcse */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.48 0 0 0 0 0.36 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* háttér-ragyogások */
.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
}
.glow-sun {
  width: 520px; height: 520px;
  right: -140px; top: -160px;
  background: radial-gradient(circle, rgba(242, 178, 62, .38), transparent 65%);
}
.glow-blue {
  width: 640px; height: 640px;
  left: -220px; bottom: -260px;
  background: radial-gradient(circle, rgba(31, 78, 140, .22), transparent 65%);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  padding: 92px 24px 40px;
  text-align: center;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding: 5px 16px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .14em;
  background: var(--card);
  box-shadow: 0 2px 0 rgba(34, 48, 74, .18);
  animation: rise .6s ease both;
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(46px, 9vw, 84px);
  line-height: 1.02;
  letter-spacing: .04em;
  animation: rise .6s ease .08s both;
}
.hero-title::after {
  content: "";
  display: block;
  width: 86px;
  height: 5px;
  margin: 18px auto 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--sun), var(--sun-deep));
}

.hero-tagline {
  margin: 20px auto 0;
  max-width: 480px;
  color: var(--ink-2);
  font-size: 18px;
  animation: rise .6s ease .16s both;
}

/* lebegő dísz-kockák */
.float-die {
  position: absolute;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  /* px-ben, mert a %-os padding a befoglaló blokk szélességéhez számolódna */
  padding: 8px;
  background: linear-gradient(150deg, #fffdf6, #f1ead6);
  border: 2px solid var(--ink);
  border-radius: 18%;
  opacity: .5;
  box-shadow: 4px 6px 0 rgba(34, 48, 74, .12);
  animation: floaty 7s ease-in-out infinite;
  z-index: 0;
}
.fd-1 { width: 58px; height: 58px; left: 12%; top: 58px; transform: rotate(-14deg); }
.fd-2 { width: 42px; height: 42px; right: 16%; top: 96px; transform: rotate(11deg); animation-delay: -2.4s; padding: 6px; }
.fd-3 { width: 34px; height: 34px; left: 24%; bottom: -6px; transform: rotate(22deg); animation-delay: -4.8s; padding: 5px; }

.fp {
  width: 66%; height: 66%;
  place-self: center;
  border-radius: 50%;
  background: var(--ink);
}
.fp.p1 { grid-area: 1 / 1; }
.fp.p3 { grid-area: 1 / 3; }
.fp.p5 { grid-area: 2 / 2; background: var(--red); }
.fp.p7 { grid-area: 3 / 1; }
.fp.p9 { grid-area: 3 / 3; }

@keyframes floaty {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -14px; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- játék-csempék ---------- */

.games {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 34px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px 26px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  text-decoration: none;
  color: inherit;
  box-shadow:
    0 2px 0 rgba(34, 48, 74, .06),
    0 14px 34px rgba(34, 48, 74, .10);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  animation: rise .55s ease both;
}
.games .tile:nth-child(1) { animation-delay: .22s; }
.games .tile:nth-child(2) { animation-delay: .30s; }
.games .tile:nth-child(3) { animation-delay: .38s; }
.games .tile:nth-child(4) { animation-delay: .46s; }

a.tile:hover {
  transform: translateY(-7px);
  border-color: var(--sun-deep);
  box-shadow:
    0 2px 0 rgba(34, 48, 74, .06),
    0 24px 48px rgba(34, 48, 74, .18),
    0 0 0 3px rgba(242, 178, 62, .35);
}
a.tile:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
}
a.tile:active { transform: translateY(-3px); }

.tile-icon {
  width: 74px;
  height: 74px;
  padding: 11px;
  border-radius: 20px;
  background: linear-gradient(160deg, #f7c159, var(--sun) 60%, var(--sun-deep));
  box-shadow: inset 0 -3px 6px rgba(61, 44, 5, .22), 0 6px 14px rgba(211, 150, 29, .35);
  transition: transform .18s ease;
}
.tile-icon svg { display: block; width: 100%; height: 100%; }
a.tile:hover .tile-icon { transform: rotate(-6deg) scale(1.05); }

.tile-name {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: 27px;
  letter-spacing: .03em;
}

.tile-desc {
  margin: 0;
  color: var(--ink-2);
  font-size: 15.5px;
  flex: 1;
}

.tile-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-weight: 700;
  color: var(--blue);
}
.tile-arrow { transition: transform .18s ease; }
a.tile:hover .tile-arrow { transform: translateX(6px); }

/* "hamarosan" csempe */
.tile-soon {
  border-style: dashed;
  border-width: 2px;
  background: transparent;
  box-shadow: none;
  opacity: .75;
}
.tile-icon-soon {
  background: transparent;
  box-shadow: none;
  padding: 4px;
}
.tile-soon .tile-name { color: var(--ink-2); }

/* ---------- lábléc ---------- */

.foot {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 48px 24px 30px;
  text-align: center;
  color: var(--ink-2);
  font-size: 13px;
  letter-spacing: .08em;
}

/* ---------- reszponzív és csökkentett mozgás ---------- */

@media (max-width: 640px) {
  .hero { padding-top: 64px; }
  .fd-1 { left: 4%; }
  .fd-2 { right: 5%; }
}

@media (prefers-reduced-motion: reduce) {
  .float-die,
  .hero-eyebrow,
  .hero-title,
  .hero-tagline,
  .tile { animation: none !important; }
  .tile, .tile-icon, .tile-arrow { transition: none !important; }
}
