/* ==========================================================================
   Design tokens — dark-luxury gaming direction (black field, metallic gold)
   ========================================================================== */

:root {
  /* Surfaces */
  --c-page: #000000;
  --c-surface: #0e0e11;
  --c-surface-2: #17171c;
  --c-surface-3: #202027;
  --c-line: rgba(255, 255, 255, 0.09);
  --c-line-strong: rgba(255, 255, 255, 0.16);

  /* Ink */
  --c-text: #ffffff;
  --c-text-dim: rgba(255, 255, 255, 0.64);
  --c-text-faint: rgba(255, 255, 255, 0.36);
  --c-ink: #0a0a0c;

  /* Accents */
  --c-gold: #f3c357;
  --c-gold-soft: #ffeab4;
  --c-gold-deep: #a9750f;
  --c-orange: #ff9a1f;
  --c-green: #3ad13f;
  --c-red: #e6212b;
  --c-violet: #b07bff;
  --c-magenta: #ff5fa8;

  /* Metallic fills */
  --grad-gold-text: linear-gradient(178deg, #fff6d6 4%, #f6cb61 34%, #c9902a 58%, #ffeab4 82%);
  --grad-gold-btn: linear-gradient(180deg, #ffeab4 0%, #f0bb47 48%, #c9901f 100%);
  --grad-gold-line: linear-gradient(90deg, rgba(243, 195, 87, 0) 0%, #f3c357 50%, rgba(243, 195, 87, 0) 100%);
  --grad-card-light: linear-gradient(168deg, #ffffff 0%, #eef1f6 58%, #dfe4ec 100%);

  /* Brand palettes (per-card overrides) */
  --brand: var(--c-gold);
  --brand-dim: rgba(243, 195, 87, 0.4);

  /* Type */
  --font-body: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC",
    "Noto Sans", Arial, sans-serif;
  --font-display: "Arial Black", "Segoe UI Black", "Helvetica Neue", Impact, var(--font-body);

  --text-xs: 0.625rem;
  --text-sm: 0.75rem;
  --text-md: 0.875rem;
  --text-lg: clamp(1rem, 0.9rem + 0.6vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1rem + 1.4vw, 1.75rem);
  --text-display: clamp(2.75rem, 1.5rem + 7vw, 4.5rem);

  --track-caps: 0.06em;

  /* Rhythm — deliberately uneven: tight inside cards, generous between blocks */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --gutter: clamp(0.75rem, 0.4rem + 1.6vw, 1.125rem);

  /* Shape */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --r-pill: 999px;

  /* Depth */
  --shadow-card: 0 18px 38px -18px rgba(0, 0, 0, 0.95);
  --shadow-lift: 0 10px 26px -10px rgba(0, 0, 0, 0.8);
  --glow-gold: 0 0 22px -4px rgba(243, 195, 87, 0.45);

  /* Motion */
  --dur-fast: 140ms;
  --dur-normal: 280ms;
  --dur-slow: 620ms;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.4, 0.64, 1);

  /* Layout */
  --shell: 32rem;
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--c-page);
  background-image:
    radial-gradient(120% 46% at 50% 0%, rgba(243, 195, 87, 0.11) 0%, transparent 62%),
    radial-gradient(90% 40% at 50% 100%, rgba(243, 195, 87, 0.07) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
figure,
ul {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--c-gold);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

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

.icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: currentColor;
}

/* Shared metallic-gold text treatment */
.gold-text {
  background: var(--grad-gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@supports not (background-clip: text) {
  .gold-text {
    color: var(--c-gold);
  }
}

/* --------------------------------------------------------------------------
   Shell
   -------------------------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.page {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  /* Bottom room for the fixed tab bar so the footer is never trapped beneath it */
  padding-block: var(--space-3) calc(6.25rem + env(safe-area-inset-bottom, 0px));
}

/* The page gap only separates header / main / footer — main owns its own rhythm */
.page > main {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
