/* =============================================================
   FantasyX marketing site shared stylesheet
   Design tokens mirror the Flutter app (lib/core/theme/app_colors.dart
   and app_text_styles.dart) so the web presence stays uniform with
   the product: same dark navy palette, green accent, and the
   Oswald / Inter / JetBrains Mono type system.
   ============================================================= */

/* ---------- Self-hosted fonts (copied from the app's assets) ---------- */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter/Inter-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter/Inter-Medium.ttf') format('truetype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter/Inter-SemiBold.ttf') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter/Inter-Bold.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Oswald';
  src: url('../fonts/Oswald/Oswald-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Oswald';
  src: url('../fonts/Oswald/Oswald-Medium.ttf') format('truetype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Oswald';
  src: url('../fonts/Oswald/Oswald-SemiBold.ttf') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Oswald';
  src: url('../fonts/Oswald/Oswald-Bold.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrains_Mono/JetBrainsMono-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrains_Mono/JetBrainsMono-SemiBold.ttf') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}

/* ---------- Design tokens (dark theme, mirrors _dark palette) ---------- */
:root {
  color-scheme: dark;

  --bg:          #0B1120;
  --card:        #131D2F;
  --card-hover:  #1A2740;
  --accent:      #00E676;
  --accent-dark: #00C853;
  --orange:      #FF6D00;
  --blue:        #2979FF;
  --purple:      #7C4DFF;
  --red:         #FF1744;
  --white:       #FFFFFF;
  --gray:        #8899AA;
  --light-gray:  #B0BEC5;
  --border:      #1E2D42;
  --input-bg:    #0D1526;

  --accent-soft:        rgba(0, 230, 118, 0.10);
  --accent-soft-strong: rgba(0, 230, 118, 0.15);
  --accent-border-soft: rgba(0, 230, 118, 0.20);

  --font-display: 'Oswald', 'Segoe UI', Roboto, sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  --maxw: 1120px;
  --radius: 20px;
  --radius-sm: 12px;
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Ambient accent glows that echo the app's hero gradients */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60vw 60vw at 78% -8%, rgba(0, 230, 118, 0.12), transparent 60%),
    radial-gradient(50vw 50vw at 12% 8%, rgba(41, 121, 255, 0.10), transparent 55%),
    radial-gradient(70vw 60vw at 50% 110%, rgba(124, 77, 255, 0.08), transparent 60%);
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.5px; margin: 0; }

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

.accent { color: var(--accent); }
.muted  { color: var(--gray); }

/* ---------- Wordmark ---------- */
.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 2px;
  font-size: 22px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  color: var(--white);
}
.wordmark .x { color: var(--accent); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(11, 17, 32, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--light-gray);
  transition: color 0.18s ease;
}
.nav-links a:hover { color: var(--white); }
/* Buttons in the nav must keep their own text color, not inherit the
   muted link color (the .nav-links a rule otherwise wins on specificity). */
.nav-links a.btn-primary,
.nav-links a.btn-primary:hover { color: #06231b; }
.nav-links a.btn-ghost,
.nav-links a.btn-ghost:hover { color: var(--white); }
.nav-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.4px;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #06231b;
  box-shadow: 0 8px 24px rgba(0, 230, 118, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0, 230, 118, 0.35); }
.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--card-hover); border-color: var(--accent-border-soft); }
.btn-sm { padding: 9px 16px; font-size: 13px; }

/* ---------- Cards / sections ---------- */
.section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 14px;
}
.section-title { font-size: clamp(28px, 4vw, 42px); line-height: 1.05; }
.section-sub { color: var(--gray); max-width: 620px; margin-top: 14px; font-size: 17px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent-border-soft); background: var(--card-hover); }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.feature-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border-soft);
  margin-bottom: 16px;
  font-size: 22px;
}
.card h3 { font-size: 19px; margin-bottom: 8px; font-family: var(--font-display); }
.card p { color: var(--gray); margin: 0; font-size: 14.5px; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: rgba(13, 21, 38, 0.6);
  padding: 56px 0 36px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer h4 {
  font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--gray); margin-bottom: 16px; font-family: var(--font-display); font-weight: 600;
}
.footer a { display: block; color: var(--light-gray); font-size: 14px; padding: 6px 0; }
.footer a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  color: var(--gray); font-size: 13px; flex-wrap: wrap;
}

/* ---------- Pill / badge ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-size: 13.5px; font-weight: 600;
  letter-spacing: 0.2px;
  padding: 8px 16px; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid var(--accent-border-soft);
  color: var(--accent);
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.5); }
  70%  { box-shadow: 0 0 0 10px rgba(0, 230, 118, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0); }
}

/* ---------- Generic page hero (sub-pages) ---------- */
.page-hero { padding: 72px 0 24px; }
.page-hero h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.02; }
.prose { max-width: 760px; }
.prose p { color: var(--light-gray); font-size: 16px; margin: 0 0 18px; }
.prose h2 { font-size: 24px; margin: 36px 0 12px; }
.prose ul { color: var(--light-gray); padding-left: 20px; }
.prose li { margin: 8px 0; }
.prose a { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    gap: 0;
    background: rgba(11, 17, 32, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 8px 24px 20px;
    transform: translateY(-120%);
    transition: transform 0.25s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 14px 0; width: 100%; border-bottom: 1px solid var(--border); }
  .nav-links .btn { margin-top: 12px; }
  .nav-toggle {
    display: inline-flex; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 8px;
  }
  .nav-toggle span { width: 24px; height: 2px; background: var(--white); border-radius: 2px; }
}
@media (max-width: 560px) {
  .grid-3, .grid-2, .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
}
