/* ==========================================================
   NESIS GAMING — Design tokens
   Base: deep indigo-aubergine (not pure black)
   Accent: warm amber (currency/reward), muted violet secondary
   Type: Sora (display) + Inter (body)
   ========================================================== */

:root {
  --bg:        #14121F;
  --surface:   #1C1930;
  --surface-2: #241F3D;
  --border:    #322C4E;
  --text:      #F5F3FA;
  --text-muted:#A9A3C2;
  --amber:     #FFB238;
  --amber-ink: #241706;
  --violet:    #6C5CE7;
  --ok:        #4ADE80;

  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --container: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--text);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 600; }

p { color: var(--text-muted); margin: 0 0 1em; max-width: 62ch; }

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn--primary { background: var(--amber); color: var(--amber-ink); }
.btn--primary:hover { transform: translateY(-1px); }
.btn--ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--amber); }
.btn--sm { padding: 8px 14px; font-size: 0.85rem; }
.btn--block { width: 100%; padding: 14px; font-size: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(20, 18, 31, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 16px; padding-bottom: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand__mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--amber); color: var(--amber-ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800;
}
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.brand__name em { font-style: normal; color: var(--amber); }

.main-nav { display: flex; gap: 28px; }
.main-nav a { color: var(--text-muted); font-size: 0.92rem; font-weight: 500; }
.main-nav a:hover { color: var(--text); }

.site-header__actions { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 20px; height: 2px; background: var(--text); display: block; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 40px; }
.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr;
  gap: 56px;
  align-items: center;
}
.hero__eyebrow { color: var(--amber); font-weight: 600; font-size: 0.9rem; margin-bottom: 14px; }
.hero__lead { font-size: 1.05rem; max-width: 46ch; }

.hero__search {
  display: flex; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px;
  border-radius: var(--radius-md);
  max-width: 460px;
  margin: 28px 0 32px;
}
.hero__search input {
  flex: 1; background: transparent; border: none; color: var(--text);
  padding: 10px 12px; font-size: 0.95rem; font-family: var(--font-body);
}
.hero__search input:focus { outline: none; }
.hero__search button {
  background: var(--amber); color: var(--amber-ink); border: none;
  border-radius: var(--radius-sm); padding: 0 20px; font-weight: 600; cursor: pointer;
  font-family: var(--font-body);
}

.hero__trust { display: flex; gap: 32px; }
.hero__trust div { display: flex; flex-direction: column; }
.hero__trust strong { font-family: var(--font-display); font-size: 1.3rem; }
.hero__trust span { color: var(--text-muted); font-size: 0.82rem; }

.hero__panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.hero__panel-row {
  display: flex; justify-content: space-between;
  padding: 12px 0; font-size: 0.9rem; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.hero__panel-row:last-child { border-bottom: none; }
.hero__panel-row--head { color: var(--text); font-weight: 600; }
.hero__panel-row--foot span:last-child { color: var(--ok); font-weight: 600; }
.badge { padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.badge--ok { background: rgba(74, 222, 128, 0.15); color: var(--ok); }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section--muted { background: var(--surface); }
.section__head { max-width: 60ch; margin-bottom: 32px; }
.section__head h2 { margin-bottom: 8px; }

/* ---------- Filter chips ---------- */
.filter-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.chip {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 9px 18px;
  border-radius: 20px;
  font-size: 0.87rem;
  font-family: var(--font-body);
  cursor: pointer;
}
.chip.is-active { border-color: var(--amber); color: var(--amber); }

/* ---------- Game grid ---------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.game-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent, var(--amber));
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.game-card:hover { transform: translateY(-2px); }
.game-card__icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 0.85rem;
}
.game-card__icon--lg { width: 64px; height: 64px; border-radius: 14px; font-size: 1.1rem; }
.game-card__name { font-weight: 600; font-size: 0.98rem; }
.game-card__meta { color: var(--text-muted); font-size: 0.8rem; }
.game-card__tag {
  position: absolute; top: 16px; right: 16px;
  font-size: 0.7rem; font-weight: 600; color: var(--amber);
}

/* ---------- Steps ---------- */
.steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.steps li {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}
.steps__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--violet); color: var(--text);
  font-family: var(--font-display); font-weight: 700; font-size: 0.85rem;
  margin-bottom: 14px;
}

/* ---------- FAQ ---------- */
.faq { max-width: 68ch; display: flex; flex-direction: column; gap: 10px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.faq summary {
  cursor: pointer; font-weight: 600; font-family: var(--font-display);
  font-size: 0.95rem; color: var(--text);
}
.faq p { margin-top: 12px; margin-bottom: 0; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  padding: 18px 24px 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex; gap: 6px; flex-wrap: wrap;
}
.breadcrumb a:hover { color: var(--amber); }

/* ---------- Game detail / order form ---------- */
.game-detail { padding: 24px 0 64px; max-width: 720px; }
.game-detail__head { display: flex; align-items: center; gap: 18px; margin-bottom: 32px; }
.game-detail__publisher { margin: 0; font-size: 0.9rem; }

.order-form__section { margin-bottom: 28px; }
.order-form__section label { display: block; font-size: 0.88rem; color: var(--text-muted); margin-bottom: 8px; }
.order-form__section input[type="text"] {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); padding: 13px 14px; border-radius: var(--radius-sm);
  font-size: 0.95rem; font-family: var(--font-body);
}
.order-form__section input[type="text"]:focus { outline: none; border-color: var(--amber); }

.item-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.item-option {
  position: relative;
  display: flex; flex-direction: column; gap: 4px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px; cursor: pointer;
}
.item-option input { position: absolute; opacity: 0; }
.item-option:has(input:checked) { border-color: var(--amber); }
.item-option__label { font-weight: 600; font-size: 0.92rem; }
.item-option__price { color: var(--amber); font-size: 0.85rem; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 0; }
.footer__grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
  padding-bottom: 36px;
}
.brand--footer { margin-bottom: 12px; display: flex; }
.footer__about p { font-size: 0.88rem; }
.footer__col h3 { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; margin-bottom: 14px; }
.footer__col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer__col a { font-size: 0.88rem; color: var(--text-muted); }
.footer__col a:hover { color: var(--amber); }
.footer__bottom {
  border-top: 1px solid var(--border);
  padding: 18px 24px; font-size: 0.8rem; color: var(--text-muted);
}

/* ---------- Install-to-homescreen toast ---------- */
.install-toast {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 60;
  max-width: 420px;
  margin: 0 auto;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.35);
  animation: toast-in 0.35s ease;
}
.install-toast[hidden] { display: none; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.install-toast__icon {
  flex-shrink: 0;
  width: 38px; height: 38px; border-radius: 9px;
  background: var(--amber); color: var(--amber-ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800;
}
.install-toast__body { flex: 1; min-width: 0; }
.install-toast__title { margin: 0 0 2px; font-size: 0.9rem; font-weight: 600; color: var(--text); }
.install-toast__desc { margin: 0; font-size: 0.8rem; color: var(--text-muted); }
.install-toast__actions { display: flex; flex-direction: column; gap: 8px; }

@media (min-width: 640px) {
  .install-toast { left: auto; right: 24px; bottom: 24px; align-items: center; }
  .install-toast__actions { flex-direction: row; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__panel { order: -1; }
  .steps { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .hero { padding: 40px 0 24px; }
  .hero__trust { flex-wrap: wrap; row-gap: 16px; }
  .item-grid { grid-template-columns: 1fr; }
}
