/* Tusa landing — palette mirrors Tusa.UI.Maui/Resources/Styles/Theme.xaml */
:root {
  --surface-raised: #17163a;
  --surface-input: #12122e;
  --stroke: #2a2a55;
  --accent: #6c5ce7;
  --highlight: #2bc0ff;
  --text: #ffffff;
  --text-secondary: #aea8ce;
  --text-muted: #7c77a0;
  --bg-base: #080914;
  --radius: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  background: radial-gradient(ellipse 120% 70% at 50% 0%, #1b1b44 0%, #0d0e22 55%, var(--bg-base) 100%) fixed;
  background-color: var(--bg-base);
}

a { color: var(--highlight); }

.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Hero */
.hero { text-align: center; padding: 56px 0 40px; }
.hero img.logo { width: min(460px, 90%); height: auto; }
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 8px 0 12px; line-height: 1.2; }
.hero p.lead { max-width: 620px; margin: 0 auto 28px; color: var(--text-secondary); font-size: 1.1rem; }
.age-note { color: var(--text-muted); font-size: .9rem; margin-top: 16px; }

.stores { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.store-btn {
  display: inline-flex; flex-direction: column; align-items: flex-start;
  min-width: 190px; padding: 10px 22px;
  background: var(--accent); color: var(--text); text-decoration: none;
  border-radius: var(--radius); border: 1px solid transparent;
  transition: transform .12s ease;
}
.store-btn:hover { transform: translateY(-2px); }
.store-btn small { font-size: .72rem; opacity: .85; text-transform: uppercase; letter-spacing: .04em; }
.store-btn strong { font-size: 1.15rem; }
.store-btn[aria-disabled="true"] { background: var(--surface-raised); border-color: var(--stroke); color: var(--text-secondary); cursor: default; }
.store-btn[aria-disabled="true"]:hover { transform: none; }

/* Sections */
section { padding: 44px 0; }
section h2 { font-size: 1.7rem; margin: 0 0 8px; text-align: center; }
section .sub { text-align: center; color: var(--text-secondary); max-width: 620px; margin: 0 auto 28px; }

.grid { display: grid; gap: 16px; }
.grid.steps { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid.levels { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid.cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); }

.panel {
  background: var(--surface-raised);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 22px;
}
.panel h3 { margin: 0 0 6px; font-size: 1.1rem; }
.panel p { margin: 0; color: var(--text-secondary); }

.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); font-weight: 700; margin-bottom: 10px;
}

.level { text-align: center; }
.level img { width: 96px; height: 96px; object-fit: contain; margin-bottom: 6px; }

/* Example cards */
.game-card {
  background: radial-gradient(ellipse 120% 100% at 50% 20%, #201c4a 0%, #101126 60%, #0b0c1c 100%);
  border: 1px solid var(--stroke);
  border-radius: 22px;
  padding: 24px;
  min-height: 190px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 0 24px rgba(43, 192, 255, .08);
}
.game-card .tag {
  align-self: flex-start;
  font-size: .75rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--highlight); background: rgba(43, 192, 255, .19);
  padding: 3px 10px; border-radius: 999px;
}
.game-card p { font-size: 1.1rem; margin: 14px 0; color: var(--text); }
.game-card .hint { color: var(--text-muted); font-size: .85rem; margin: 0; }

.features { list-style: none; padding: 0; margin: 0 auto; max-width: 560px; }
.features li { padding: 10px 0 10px 34px; position: relative; color: var(--text-secondary); border-bottom: 1px solid var(--stroke); }
.features li::before { content: "✓"; position: absolute; left: 6px; color: var(--highlight); font-weight: 700; }

/* Footer */
footer { padding: 32px 0 40px; text-align: center; color: var(--text-muted); font-size: .9rem; border-top: 1px solid var(--stroke); margin-top: 24px; }
footer nav { display: flex; gap: 20px; justify-content: center; margin-bottom: 10px; }
footer a { color: var(--text-secondary); }

/* Legal pages: plain white document */
body.legal { background: #fff; color: #1a1a1a; }
body.legal .doc { max-width: 780px; margin: 0 auto; padding: 32px 20px 64px; }
body.legal h1 { font-size: 2rem; margin-top: 40px; }
body.legal h2 { font-size: 1.15rem; margin-top: 28px; }
body.legal a { color: #3a2fb5; }
body.legal .back { display: inline-block; margin-bottom: 8px; }
body.legal .updated { color: #666; font-size: .9rem; }
body.legal hr { border: 0; border-top: 1px solid #ddd; margin: 48px 0 0; }
body.legal .todo { background: #fff6d6; padding: 0 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .store-btn { transition: none; }
}

/* Language switcher */
.lang { display: flex; gap: 6px; justify-content: flex-end; padding-top: 14px; }
.lang a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600;
  color: var(--text-secondary); text-decoration: none; border: 1px solid var(--stroke);
}
.lang a:hover { color: var(--text); border-color: var(--accent); }
.lang a[aria-current="true"] { color: var(--text); background: var(--surface-raised); border-color: var(--accent); }
.lang img { width: 20px; height: 14px; border-radius: 2px; border: 1px solid rgba(128, 128, 128, .55); object-fit: cover; }
body.legal .lang { padding-top: 0; margin-bottom: 8px; }
body.legal .lang a { color: #444; border-color: #ccc; }
body.legal .lang a[aria-current="true"] { background: #f1efff; border-color: #6c5ce7; color: #1a1a1a; }
.legal-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }

/* About */
.about { max-width: 720px; margin: 0 auto; text-align: center; color: var(--text-secondary); font-size: 1.05rem; }
.about strong { color: var(--text); }

/* Top bar: home link + language switcher */
.topbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.topbar .lang { padding-top: 0; margin-left: auto; }
.home-link { padding-top: 14px; color: var(--text-secondary); text-decoration: none; font-size: .9rem; }
.home-link:hover { color: var(--text); }

/* Company home */
.brand { font-size: clamp(2rem, 6vw, 3.2rem); margin: 28px 0 12px; line-height: 1.1; letter-spacing: -.01em; }
.brand span { color: var(--highlight); }
.grid.games { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.game-tile { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; transition: transform .12s ease, border-color .12s ease; }
.game-tile:hover { transform: translateY(-3px); border-color: var(--accent); }
.game-tile img { width: 100%; max-width: 300px; height: auto; align-self: center; }
.game-tile h3 { font-size: 1.3rem; }
.game-tile .more { color: var(--highlight); font-weight: 600; margin-top: auto; }
.game-tile.soon { border-style: dashed; justify-content: center; text-align: center; color: var(--text-muted); min-height: 160px; }
.game-tile.soon:hover { transform: none; border-color: var(--stroke); }
@media (prefers-reduced-motion: reduce) { .game-tile { transition: none; } }
