/* ==========================================================================
   AI RolePlay — Base layer: fonts, design tokens, reset, typography, layout
   Every color, radius, duration and easing lives in :root. Change the brand
   here, nowhere else.
   ========================================================================== */

@font-face { font-family: "Vazirmatn"; src: url("../fonts/vazirmatn-400.e0240b99aa85.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/vazirmatn-700.baf32fc3780b.woff2") format("woff2"); font-weight: 600 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/vazirmatn-900.77846cfcc203.woff2") format("woff2"); font-weight: 800 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Rajdhani"; src: url("../fonts/rajdhani-600.8a7572726f2e.woff2") format("woff2"); font-weight: 500 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Rajdhani"; src: url("../fonts/rajdhani-700.24014f9762c6.woff2") format("woff2"); font-weight: 700 900; font-style: normal; font-display: swap; }

:root {
  color-scheme: dark;

  /* Surfaces */
  --bg-primary: #05070b;
  --bg-secondary: #090d14;
  --bg-tertiary: #0e121b;
  --bg-elevated: #131a27;
  --bg-overlay: rgba(5, 7, 11, 0.78);

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.045);
  --glass-bg-strong: rgba(255, 255, 255, 0.075);
  --glass-bg-hover: rgba(255, 255, 255, 0.11);
  --glass-border: rgba(255, 255, 255, 0.085);
  --glass-border-strong: rgba(255, 255, 255, 0.15);
  --glass-highlight: rgba(255, 255, 255, 0.22);
  --glass-blur: 16px;

  /* Brand accents */
  --accent-primary: #00d7ff;          /* electric cyan */
  --accent-primary-rgb: 0, 215, 255;
  --accent-secondary: #9b7bff;        /* soft violet */
  --accent-secondary-rgb: 155, 123, 255;
  --accent-tertiary: #4d7cff;         /* electric blue */
  --accent-tertiary-rgb: 77, 124, 255;
  --accent-crimson: #ff3d71;          /* subtle crimson / magenta */
  --accent-crimson-rgb: 255, 61, 113;
  --accent-gold: #f3c35b;
  --accent-gold-rgb: 243, 195, 91;
  --gradient-brand: linear-gradient(120deg, var(--accent-primary) 0%, var(--accent-tertiary) 48%, var(--accent-secondary) 100%);
  --gradient-steel: linear-gradient(180deg, #f5f8ff 0%, #b9c3d6 48%, #7d879c 100%);

  /* Semantic */
  --success: #2fe49a;
  --success-rgb: 47, 228, 154;
  --warning: #ffc857;
  --warning-rgb: 255, 200, 87;
  --danger: #ff4d67;
  --danger-rgb: 255, 77, 103;
  --info: #4d7cff;

  /* Text */
  --text-primary: #f2f6fc;
  --text-secondary: #a9b3c7;
  --text-muted: #6f7a93;
  --text-faint: #475066;
  --text-on-accent: #031018;

  /* Shape */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-pill: 999px;

  /* Depth */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 30px 80px -24px rgba(0, 0, 0, 0.75);
  --glow-primary: 0 0 0 1px rgba(var(--accent-primary-rgb), 0.35), 0 8px 32px -6px rgba(var(--accent-primary-rgb), 0.45);
  --glow-secondary: 0 0 0 1px rgba(var(--accent-secondary-rgb), 0.35), 0 8px 32px -6px rgba(var(--accent-secondary-rgb), 0.45);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 160ms;
  --dur: 280ms;
  --dur-slow: 520ms;
  --dur-xslow: 700ms;

  /* Type */
  --font-fa: "Vazirmatn", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-display: "Rajdhani", "Vazirmatn", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", monospace;

  /* Layout */
  --container: 1240px;
  --container-narrow: 860px;
  --gutter: clamp(16px, 4vw, 32px);
  --nav-h: 68px;
  --section-y: clamp(64px, 10vw, 128px);
  --z-bg: 0;
  --z-content: 1;
  --z-nav: 50;
  --z-overlay: 80;
  --z-modal: 90;
  --z-toast: 100;
  --z-intro: 120;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); }
body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-fa);
  font-size: 15.5px;
  line-height: 1.8;
  font-feature-settings: "ss01", "ss02";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, picture, video, canvas, svg { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
table { border-collapse: collapse; }
::selection { background: rgba(var(--accent-primary-rgb), 0.28); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

/* Scrollbar */
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.14) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 10px; border: 3px solid var(--bg-primary); }
::-webkit-scrollbar-track { background: transparent; }

/* ── Typography ────────────────────────────────────────────────────────── */
h1, h2, h3, h4 { font-weight: 800; line-height: 1.35; letter-spacing: -0.01em; color: var(--text-primary); }
h1 { font-size: clamp(2rem, 1.2rem + 3.6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 1.15rem + 1.9vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem); font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }
p { color: var(--text-secondary); }
small { font-size: 0.82em; }
strong { font-weight: 700; color: var(--text-primary); }
code, kbd, .mono { font-family: var(--font-mono); font-size: 0.9em; }

.display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  direction: ltr;
  unicode-bidi: isolate;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-primary);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}
.eyebrow.is-plain::before { display: none; }
.lead { font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem); color: var(--text-secondary); max-width: 62ch; }
.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.text-steel {
  background: var(--gradient-steel);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.accent { color: var(--accent-primary); }
.success-text { color: var(--success); }
.danger-text { color: var(--danger); }
.warning-text { color: var(--warning); }

/* LTR islands: IDs, addresses, URLs, emails, transaction IDs, logs */
.ltr, bdi.ltr {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.92em;
  letter-spacing: 0.01em;
}
input.ltr, textarea.ltr { text-align: left; }
.num { font-feature-settings: "tnum"; }

/* ── Layout ────────────────────────────────────────────────────────────── */
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.container.narrow { width: min(100% - 2 * var(--gutter), var(--container-narrow)); }
.section { padding-block: var(--section-y); position: relative; }
.section.tight { padding-block: clamp(40px, 6vw, 72px); }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(32px, 5vw, 56px); max-width: 720px; }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }
.section-head.split { max-width: none; grid-template-columns: 1fr auto; align-items: end; gap: 24px; }
.page-main { position: relative; z-index: var(--z-content); min-height: 70vh; }
.page-top { padding-top: calc(var(--nav-h) + clamp(32px, 6vw, 72px)); }

.grid { display: grid; gap: clamp(16px, 2vw, 24px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.stack { display: flex; flex-direction: column; gap: var(--stack-gap, 16px); }
.row { display: flex; align-items: center; gap: var(--row-gap, 12px); flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.nowrap { flex-wrap: nowrap; }
.spacer { flex: 1; }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--glass-border-strong), transparent); border: 0; margin-block: 28px; }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section-head.split { grid-template-columns: 1fr; }
  body { font-size: 15px; }
}

/* ── Utilities ─────────────────────────────────────────────────────────── */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 12px; right: 12px; z-index: calc(var(--z-intro) + 1);
  padding: 10px 16px; border-radius: var(--radius-sm);
  background: var(--accent-primary); color: var(--text-on-accent); font-weight: 700;
  transform: translateY(-160%); transition: transform var(--dur) var(--ease-out);
}
.skip-link:focus { transform: none; }
.center { text-align: center; }
.w-full { width: 100%; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.hide-mobile { }
@media (max-width: 680px) { .hide-mobile { display: none !important; } }
.show-mobile { display: none !important; }
@media (max-width: 680px) { .show-mobile { display: revert !important; } }
