@font-face {
  font-family: 'Arima';
  src: url('Arima-VariableFont_wght.ttf') format('truetype-variations');
  font-weight: 100 700;
  font-display: swap;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --night-top:    #1a2a55;
  --night-mid:    #0c1638;
  --night-bot:    #03060f;
  --star-blue:    #7faaff;
  --star-white:   #eef3ff;
  --accent-blue:  #6ea8ff;
  --accent-pink:  #ec4899;
  --accent-amber: #f59e0b;

  --ink-100: #f4f6ff;
  --ink-80:  rgba(244, 246, 255, 0.82);
  --ink-65:  rgba(244, 246, 255, 0.65);
  --ink-45:  rgba(244, 246, 255, 0.45);
  --ink-25:  rgba(244, 246, 255, 0.22);
  --ink-10:  rgba(244, 246, 255, 0.10);

  --glass-bg:   rgba(255, 255, 255, 0.05);
  --glass-bg-2: rgba(255, 255, 255, 0.08);
  --glass-bd:   rgba(255, 255, 255, 0.12);

  --r-12: 12px; --r-16: 16px; --r-20: 20px; --r-24: 24px; --r-pill: 999px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --font-display: 'Arima', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html, body { height: 100%; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-ui);
  color: var(--ink-100);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--night-bot);
  position: relative;
}

/* Night gradient on a fixed layer; background-attachment: fixed
   is unsupported on iOS Safari so the gradient lives here instead */
body::after {
  content: '';
  position: fixed; inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom,
      var(--night-top) 0%,
      var(--night-mid) 45%,
      var(--night-bot) 100%);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Vignette: darker at edges, even darker as you scroll past hero */
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%,
      transparent 0%,
      rgba(0, 0, 0, 0.35) 60%,
      rgba(0, 0, 0, 0.65) 100%);
  pointer-events: none;
  z-index: 1;
}

.starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ===========================================================
   Page shell
   =========================================================== */
.page {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding:
    max(24px, env(safe-area-inset-top))
    max(32px, env(safe-area-inset-right))
    max(96px, env(safe-area-inset-bottom))
    max(32px, env(safe-area-inset-left));
}

/* Top bar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0 32px;
}
.back-link {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--ink-65);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--ink-10);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s var(--ease-out);
}
.back-link:hover { color: var(--ink-100); border-color: var(--ink-25); transform: translateX(-2px); }

.studio-tag {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-45);
  font-weight: 600;
}
.studio-tag a { color: inherit; text-decoration: none; transition: color 0.3s; }
.studio-tag a:hover { color: var(--ink-100); }

/* ===========================================================
   Hero
   =========================================================== */
.hero {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 32px;
  align-items: center;
  min-height: 70vh;
  padding: 32px 0 80px;
}

.hero__content { display: flex; flex-direction: column; gap: 24px; }

.hero__logo {
  width: 100%;
  max-width: 360px;
  height: auto;
  filter: drop-shadow(0 12px 40px rgba(110, 168, 255, 0.35));
  animation: logo-bob 7s ease-in-out infinite;
}
@keyframes logo-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-6px) rotate(-0.5deg); }
}

.hero__tag {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.4;
  color: var(--ink-80);
  max-width: 420px;
  text-wrap: pretty;
}
.hero__tag em {
  font-style: italic;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent-amber), var(--accent-pink));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stores {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px 12px 18px;
  background: var(--glass-bg-2);
  border: 1px solid var(--ink-10);
  border-radius: var(--r-16);
  text-decoration: none;
  color: var(--ink-100);
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.store-btn:hover {
  transform: translateY(-2px);
  border-color: var(--ink-25);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 32px rgba(110, 168, 255, 0.25);
}
.store-btn[aria-disabled="true"] {
  opacity: 0.7;
  cursor: default;
}
.store-btn[aria-disabled="true"]:hover {
  transform: none;
  background: var(--glass-bg-2);
  border-color: var(--ink-10);
  box-shadow: none;
}
.store-btn svg { width: 28px; height: 28px; flex-shrink: 0; }
.store-btn__lines { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.store-btn__small {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-65);
}
.store-btn__big {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}
.store-badge {
  display: inline-flex;
  width: 160px;
  height: 50px;
  border-radius: var(--r-16);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.store-badge img { width: 100%; height: 100%; object-fit: contain; display: block; }
.store-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(110, 168, 255, 0.25);
}
.platforms__label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-45);
  margin-bottom: 10px;
}
.platforms__row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.platform-link {
  display: inline-flex;
  transition: transform 0.3s var(--ease-out);
}
.platform-link:hover { transform: translateY(-2px); }
.platform-icon { width: 32px; height: 32px; object-fit: contain; display: block; }

.hero__shot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.hero__shot img {
  display: block;
  width: 115%;
  max-width: none;
  height: auto;
  margin: 0 -7.5%;
  border-radius: 32px;
  filter:
    drop-shadow(0 30px 60px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 60px rgba(110, 168, 255, 0.20));
}
.hero__shot-glow {
  position: absolute;
  inset: 10% 15%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(110, 168, 255, 0.25), transparent 70%);
  filter: blur(60px);
  z-index: -1;
  animation: glow-pulse 6s ease-in-out infinite;
}
@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 0.9; transform: scale(1.05); }
}

/* ===========================================================
   Section headings
   =========================================================== */
.section {
  padding: 80px 0;
}
.section__head {
  text-align: center;
  margin-bottom: 48px;
}
.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 4.5vw, 48px);
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff, #c5d4ff 60%, #7faaff);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
  text-wrap: balance;
}
.section__lede {
  color: var(--ink-65);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 auto;
  text-wrap: pretty;
}

/* ===========================================================
   Mechanics
   =========================================================== */
.mechanics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.mechanic {
  position: relative;
  padding: 28px 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--glass-bd);
  border-radius: var(--r-20);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.4s var(--ease-out), border-color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
  overflow: hidden;
}
.mechanic:hover {
  transform: translateY(-3px);
  border-color: var(--ink-25);
  box-shadow: 0 18px 48px rgba(110, 168, 255, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.10);
}
.mechanic__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-bottom: 18px;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.mechanic__icon svg { width: 22px; height: 22px; }
.mechanic:nth-child(2) .mechanic__icon { background: linear-gradient(135deg, #f59e0b, #ec4899); box-shadow: 0 8px 20px rgba(236, 72, 153, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.mechanic:nth-child(3) .mechanic__icon { background: linear-gradient(135deg, #8b5cf6, #ec4899); box-shadow: 0 8px 20px rgba(139, 92, 246, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.mechanic:nth-child(4) .mechanic__icon { background: linear-gradient(135deg, #ec4899, #f59e0b); box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.mechanic h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink-100);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.mechanic p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-65);
  text-wrap: pretty;
}

/* ===========================================================
   Game modes
   =========================================================== */
.modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.mode {
  position: relative;
  padding: 26px 22px 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--glass-bd);
  border-radius: var(--r-20);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.4s var(--ease-out), border-color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
  overflow: hidden;
}
.mode::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, var(--mode-tint, rgba(110, 168, 255, 0.10)), transparent 55%);
  pointer-events: none;
  opacity: 0.7;
  transition: opacity 0.4s var(--ease-out);
}
.mode:hover {
  transform: translateY(-3px);
  border-color: var(--ink-25);
  box-shadow: 0 18px 48px rgba(110, 168, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.10);
}
.mode:hover::after { opacity: 1; }
.mode__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--mode-grad, linear-gradient(135deg, #3b82f6, #8b5cf6));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-bottom: 16px;
  box-shadow: 0 8px 20px var(--mode-glow, rgba(59, 130, 246, 0.35)), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  position: relative;
  z-index: 1;
}
.mode__icon svg { width: 22px; height: 22px; }
.mode__name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink-100);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}
.mode__desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-65);
  text-wrap: pretty;
  position: relative;
  z-index: 1;
}
.mode--adventure  { --mode-grad: linear-gradient(135deg, #f59e0b, #ec4899); --mode-glow: rgba(236, 72, 153, 0.35); --mode-tint: rgba(245, 158, 11, 0.12); }
.mode--classic    { --mode-grad: linear-gradient(135deg, #3b82f6, #8b5cf6); --mode-glow: rgba(59, 130, 246, 0.35);  --mode-tint: rgba(59, 130, 246, 0.12); }
.mode--timed      { --mode-grad: linear-gradient(135deg, #06b6d4, #3b82f6); --mode-glow: rgba(6, 182, 212, 0.35);   --mode-tint: rgba(6, 182, 212, 0.12); }
.mode--quest      { --mode-grad: linear-gradient(135deg, #8b5cf6, #ec4899); --mode-glow: rgba(139, 92, 246, 0.35);  --mode-tint: rgba(139, 92, 246, 0.12); }
.mode--daily      { --mode-grad: linear-gradient(135deg, #10b981, #06b6d4); --mode-glow: rgba(16, 185, 129, 0.35);  --mode-tint: rgba(16, 185, 129, 0.12); }

/* ===========================================================
   Relics encyclopedia
   =========================================================== */
.cultures {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 36px;
}
.culture-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  padding: 7px 18px 7px 10px;
  background: var(--glass-bg);
  border: 1px solid var(--ink-10);
  border-radius: var(--r-pill);
  color: var(--ink-65);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.culture-btn--all { padding: 7px 18px; }
.culture-btn__icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
  transition: transform 0.3s var(--ease-out);
}
.culture-btn:hover .culture-btn__icon { transform: scale(1.08); }
.culture-btn:hover { color: var(--ink-100); border-color: var(--ink-25); transform: translateY(-1px); }
.culture-btn[aria-pressed="true"] {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.30), rgba(139, 92, 246, 0.30));
  border-color: rgba(139, 92, 246, 0.55);
  color: var(--ink-100);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.30);
}

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

.relic {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 24px 16px 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-bd);
  border-radius: var(--r-20);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.4s var(--ease-out), border-color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
  overflow: hidden;
}
.relic:hover {
  transform: translateY(-3px);
  border-color: var(--ink-25);
  box-shadow: 0 18px 40px rgba(110, 168, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.relic__icon {
  width: 112px;
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.relic__icon::before {
  content: '';
  position: absolute;
  inset: 6%;
  background: radial-gradient(circle, rgba(110, 168, 255, 0.18), transparent 65%);
  filter: blur(14px);
  z-index: -1;
  opacity: 0.7;
  transition: opacity 0.4s var(--ease-out);
}
.relic:hover .relic__icon::before { opacity: 1; }
.relic__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
  transition: transform 0.4s var(--ease-out);
}
.relic:hover .relic__icon img { transform: scale(1.06); }
.relic__icon-fallback {
  width: 44px; height: 44px;
  opacity: 0.35;
  color: var(--ink-65);
}

.relic__name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-100);
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-wrap: balance;
}

/* ===========================================================
   Footer
   =========================================================== */
.foot {
  text-align: center;
  padding: 48px 0 16px;
  font-size: 13px;
  color: var(--ink-45);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.foot__sep { color: var(--ink-25); }
.foot a {
  color: var(--ink-65);
  text-decoration: none;
  transition: color 0.3s var(--ease-out);
}
.foot a:hover { color: var(--ink-100); }

/* ===========================================================
   Responsive
   =========================================================== */
@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
    padding: 16px 0 56px;
    min-height: auto;
  }
  .hero__content { align-items: center; }
  .hero__tag { max-width: 480px; }
  .hero__shot { order: -1; }
  .hero__shot img {
    width: 100%;
    max-width: 520px;
    margin: 0;
  }
}
@media (max-width: 560px) {
  .page { padding: 16px 18px 64px; }
  .hero__logo { max-width: 260px; }
  .section { padding: 56px 0; }
  .relics { grid-template-columns: repeat(2, 1fr); }
  .relic { padding: 18px 12px 16px; gap: 10px; }
  .relic__icon { width: 92px; height: 92px; }
  .relic__name { font-size: 15px; }
  .stores, .platforms__row { justify-content: center; }
  .platforms { text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
