/* CAST — استایل پایه‌ی همه‌ی صفحه‌ها (معادل globals.css + reset تیلویند v4).
   فایل‌های فونت همان پوشه‌ی public/fonts سایت قدیمی‌اند که در public_html/fonts کپی می‌شوند. */

/* ---------- فونت پیدا ---------- */
@font-face { font-family: 'Peyda'; src: url('/fonts/Peyda-Thin.ttf') format('truetype'); font-weight: 100; font-style: normal; font-display: swap; }
@font-face { font-family: 'Peyda'; src: url('/fonts/peyda-extralight.ttf') format('truetype'); font-weight: 200; font-style: normal; font-display: swap; }
@font-face { font-family: 'Peyda'; src: url('/fonts/peyda-light.ttf') format('truetype'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Peyda'; src: url('/fonts/Peyda-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Peyda'; src: url('/fonts/Peyda-Medium.ttf') format('truetype'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Peyda'; src: url('/fonts/Peyda-SemiBold.ttf') format('truetype'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Peyda'; src: url('/fonts/Peyda-Bold.ttf') format('truetype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Peyda'; src: url('/fonts/Peyda-ExtraBold.ttf') format('truetype'); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Peyda'; src: url('/fonts/Peyda-Black.ttf') format('truetype'); font-weight: 900; font-style: normal; font-display: swap; }

/* ---------- فونت دوران (تیترها و اعداد پنل مدیریت) ---------- */
@font-face { font-family: 'Doran'; src: url('/fonts/Doran-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Doran'; src: url('/fonts/Doran-Bold.otf') format('opentype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Doran'; src: url('/fonts/Doran-ExtraBold.ttf') format('truetype'); font-weight: 800; font-display: swap; }

/* ---------- reset (Tailwind v4 preflight) ---------- */
*, ::after, ::before, ::backdrop, ::file-selector-button {
  box-sizing: border-box; margin: 0; padding: 0; border: 0 solid;
}
html, :host {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  font-feature-settings: normal;
  font-variation-settings: normal;
  -webkit-tap-highlight-color: transparent;
}
hr { height: 0; color: inherit; border-top-width: 1px; }
abbr:where([title]) { -webkit-text-decoration: underline dotted; text-decoration: underline dotted; }
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }
a { color: inherit; -webkit-text-decoration: inherit; text-decoration: inherit; }
b, strong { font-weight: bolder; }
code, kbd, samp, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-feature-settings: normal; font-variation-settings: normal; font-size: 1em;
}
small { font-size: 80%; }
sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
sub { bottom: -0.25em; }
sup { top: -0.5em; }
table { text-indent: 0; border-color: inherit; border-collapse: collapse; }
:-moz-focusring { outline: auto; }
progress { vertical-align: baseline; }
summary { display: list-item; }
ol, ul, menu { list-style: none; }
img, svg, video, canvas, audio, iframe, embed, object { display: block; vertical-align: middle; }
img, video { max-width: 100%; height: auto; }
button, input, select, optgroup, textarea, ::file-selector-button {
  font: inherit; font-feature-settings: inherit; font-variation-settings: inherit;
  letter-spacing: inherit; color: inherit; border-radius: 0; background-color: transparent; opacity: 1;
}
:where(select:is([multiple], [size])) optgroup { font-weight: bolder; }
:where(select:is([multiple], [size])) optgroup option { padding-inline-start: 20px; }
::file-selector-button { margin-inline-end: 4px; }
::placeholder { opacity: 1; }
@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {
  ::placeholder { color: color-mix(in oklab, currentcolor 50%, transparent); }
}
textarea { resize: vertical; }
::-webkit-search-decoration { -webkit-appearance: none; }
::-webkit-date-and-time-value { min-height: 1lh; text-align: inherit; }
::-webkit-datetime-edit { display: inline-flex; }
::-webkit-datetime-edit-fields-wrapper { padding: 0; }
::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field,
::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field,
::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field,
::-webkit-datetime-edit-meridiem-field { padding-block: 0; }
::-webkit-calendar-picker-indicator { line-height: 1; }
:-moz-ui-invalid { box-shadow: none; }
button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button { appearance: button; }
::-webkit-inner-spin-button, ::-webkit-outer-spin-button { height: auto; }
[hidden]:where(:not([hidden="until-found"])) { display: none !important; }

/* ---------- پایه‌ی سایت (globals.css) ---------- */
:root {
  --background: #ffffff;
  --foreground: #171717;
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: #0a0a0a;
    --foreground: #ededed;
  }
}

/* کلاس‌های html/body در layout.tsx: h-full antialiased / min-h-full flex flex-col */
.h-full { height: 100%; }
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body, .cast-body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--foreground);
  font-family: 'Peyda', 'Segoe UI', Tahoma, Arial, sans-serif;
}

/* ---------- نشان کست (BrandMark.module.css → پیشوند bm-) ---------- */
.bm-mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: currentColor;
  text-decoration: none;
  flex-shrink: 0;
}
.bm-glyph { width: 27px; height: auto; display: block; }
.bm-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1;
}

/* ---------- دکمه‌ی MENU (GlobalMenuButton.tsx، کلاس‌های تیلویند → gm-) ---------- */
.gm-wrap { position: relative; }
.gm-label {
  color: rgba(255,255,255,.85); letter-spacing: .18em; font-size: 13px; font-weight: 600;
  cursor: pointer; -webkit-user-select: none; user-select: none;
}
.gm-nav {
  position: absolute; top: 38px; left: 0; min-width: 160px;
  border-radius: 1rem; padding: .5rem; display: flex; flex-direction: column; gap: .125rem; z-index: 30;
  transition: all .2s cubic-bezier(.4,0,.2,1);
  background: rgba(12,12,14,0.96); border: 1px solid rgba(255,255,255,0.12);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
}
.gm-wrap.gm-open .gm-nav { opacity: 1; visibility: visible; transform: translateY(0); }
.gm-link {
  color: rgba(255,255,255,.75); font-size: 13px; border-radius: .5rem; padding: .5rem .75rem;
  transition: color .15s cubic-bezier(.4,0,.2,1), background-color .15s cubic-bezier(.4,0,.2,1);
}
.gm-link:hover { color: #fff; background: rgba(255,255,255,0.08); }
