/* ==========================================================================
   Modex Typography System — Inspired by Whop (whop.com)
   Primary Interface: Inter (Regular, Medium, SemiBold, Bold)
   Headings & Display: Acid Grotesk (Regular, Medium, Book, Bold)
   Arabic Localization: IBM Plex Sans Arabic
   ========================================================================== */

/* --- Acid Grotesk Font Faces (Identical to Whop's Display Typeface) --- */
@font-face {
  font-family: 'Acid Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/acid-grotesk-regular-core.woff2') format('woff2');
  unicode-range: U+0-17F, U+2000-206F, U+2070-209F, U+20A0-20CF, U+2100-214F, U+2190-21BB, U+2200-22FF, U+25A0-25FF, U+FB00-FB4F, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Acid Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/acid-grotesk-regular-ext.woff2') format('woff2');
  unicode-range: U+18F, U+1A0-1A1, U+1AF-1B0, U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: 'Acid Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/static/fonts/acid-grotesk-medium-core.woff2') format('woff2');
  unicode-range: U+0-17F, U+2000-206F, U+2070-209F, U+20A0-20CF, U+2100-214F, U+2190-21BB, U+2200-22FF, U+25A0-25FF, U+FB00-FB4F, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Acid Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/static/fonts/acid-grotesk-medium-ext.woff2') format('woff2');
  unicode-range: U+18F, U+1A0-1A1, U+1AF-1B0, U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: 'Acid Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/static/fonts/acid-grotesk-book-core.woff2') format('woff2');
  unicode-range: U+0-17F, U+2000-206F, U+2070-209F, U+20A0-20CF, U+2100-214F, U+2190-21BB, U+2200-22FF, U+25A0-25FF, U+FB00-FB4F, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Acid Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/static/fonts/acid-grotesk-book-ext.woff2') format('woff2');
  unicode-range: U+18F, U+1A0-1A1, U+1AF-1B0, U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: 'Acid Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/static/fonts/acid-grotesk-bold-core.woff2') format('woff2');
  unicode-range: U+0-17F, U+2000-206F, U+2070-209F, U+20A0-20CF, U+2100-214F, U+2190-21BB, U+2200-22FF, U+25A0-25FF, U+FB00-FB4F, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Acid Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/static/fonts/acid-grotesk-bold-ext.woff2') format('woff2');
  unicode-range: U+18F, U+1A0-1A1, U+1AF-1B0, U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: 'Acid Grotesk Fallback';
  src: local('Arial');
  ascent-override: 91.62%;
  descent-override: 32.25%;
  line-gap-override: 0%;
  size-adjust: 112.86%;
}

@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial');
  ascent-override: 90.44%;
  descent-override: 22.52%;
  line-gap-override: 0%;
  size-adjust: 107.12%;
}

/* --- Global Typography Variables --- */
:root {
  --whop-font-sans: 'Inter', 'Inter Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', system-ui, sans-serif;
  --whop-font-display: 'Acid Grotesk', 'Acid Grotesk Fallback', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --whop-font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Harmonize with Modex design tokens */
  --mx-font-sans: var(--whop-font-sans);
  --mx-font-display: var(--whop-font-display);
  --mx-font-mono: var(--whop-font-mono);
  --font-sans: var(--whop-font-sans);
  --font-display: var(--whop-font-display);
}

/* --- Base Body & UI Elements --- */
html,
body,
button,
input,
optgroup,
select,
textarea {
  font-family: var(--whop-font-sans) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  letter-spacing: -0.011em;
}

/* --- Brand Typography (modex.) --- */
.brand,
.discovery-logo > div,
.auth-brand {
  font-family: var(--whop-font-display) !important;
  font-weight: 700 !important;
  letter-spacing: -0.04em !important;
}

/* --- Headings & Display Titles (Acid Grotesk with Whop Tight Tracking) --- */
h1,
h2,
h3,
.discovery-toolbar h1,
.section-heading h2,
.editorial-copy h2,
.auth-card h1,
.page-header h1,
.creator-hero h1,
.package-title,
.modal-title {
  font-family: var(--whop-font-display) !important;
  letter-spacing: -0.028em !important;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

/* --- Explore Games World Tiles (Clean Whop Aesthetic instead of Condensed) --- */
.world-title h2,
.world-title.fivem h2,
.world-title.samp h2,
.world-title.mta h2,
.world-title.minecraft h2,
.world-title.roblox h2 {
  font-family: var(--whop-font-display) !important;
  font-weight: 800 !important;
  letter-spacing: -0.035em !important;
  text-transform: uppercase !important;
}

.world-kicker {
  font-family: var(--whop-font-sans) !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  font-size: 10px !important;
}

.world-subtitle {
  font-family: var(--whop-font-sans) !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em !important;
}

/* --- Cards, Grids & Resource Meta --- */
.resource-card h3,
.game-card h3,
.resource-card .title,
.category-card h3 {
  font-family: var(--whop-font-sans) !important;
  font-weight: 600 !important;
  letter-spacing: -0.018em !important;
}

.resource-info .eyebrow,
.card-tag,
.badge,
.tag {
  font-family: var(--whop-font-sans) !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em !important;
}

.resource-info .meta,
.card-stats {
  font-family: var(--whop-font-sans) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: -0.006em !important;
}

/* --- Buttons & Interactive Controls (Whop Style) --- */
.button,
button,
.discovery-search input,
.discovery-toolbar a,
.category-grid a span,
.nav a,
header nav a,
.home-publish-button,
.home-discord-link {
  font-family: var(--whop-font-sans) !important;
  letter-spacing: -0.012em !important;
}

.button,
.home-publish-button {
  font-weight: 600 !important;
}

/* --- Desktop Navigation Guard --- */
@media (min-width: 1101px) {
  .mobile-menu-toggle,
  .mobile-menu-backdrop,
  .mobile-nav-extra {
    display: none !important;
  }
}

/* --- Arabic Localization (IBM Plex Sans Arabic) --- */
html[dir="rtl"],
html[lang="ar"],
body[dir="rtl"] {
  --whop-font-sans: 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --whop-font-display: 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-family: var(--whop-font-sans) !important;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] .brand,
html[dir="rtl"] .world-title h2 {
  font-family: var(--whop-font-display) !important;
  letter-spacing: normal !important;
}
