/* assets/css/base.css */
/* Design Language v1 – calc.tartarani.ir */
/* Scope: tokens, reset, base typography */
/* =================================
   Font Face – Yekan Bakh FaNum
   Brand font (locked)
   ================================= */

@font-face {
  font-family: 'YekanBakh';
  src:
    url('/assets/fonts/yekan-bakh/YekanBakhFaNum-Regular.woff2') format('woff2'),
    url('/assets/fonts/yekan-bakh/YekanBakhFaNum-Regular.woff') format('woff');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'YekanBakh';
  src:
    url('/assets/fonts/yekan-bakh/YekanBakhFaNum-Bold.woff2') format('woff2'),
    url('/assets/fonts/yekan-bakh/YekanBakhFaNum-Bold.woff') format('woff');
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'YekanBakhFallback';
  src: local('Tahoma'), local('Segoe UI');
  font-style: normal;
  font-weight: 400 600;
  size-adjust: 98%;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'YekanBakhFallback';
  src: local('Tahoma Bold'), local('Segoe UI Bold'), local('Tahoma'), local('Segoe UI');
  font-style: normal;
  font-weight: 700 900;
  size-adjust: 98%;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
}


/* Tokens are defined in /assets/css/tokens.css and loaded globally via partials/header.php */

/* =================================
   Minimal reset (sane, not aggressive)
   ================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  padding: 0;

  background: var(--bg-main);
  color: var(--text-main);

  font-family: 'YekanBakh', 'YekanBakhFallback', Tahoma, "Segoe UI", system-ui,
    -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;

  font-size: var(--fs-2);
  line-height: 1.6;
  font-synthesis: none;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}

/* =================================
   Base elements
   ================================= */
a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

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

::placeholder {
  color: var(--text-muted);
  opacity: 0.85;
}

:focus {
  outline: none;
}

:focus-visible {
  box-shadow: var(--focus-ring);
  border-radius: 10px;
}

button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* =================================
   Utility text styles
   ================================= */
.muted {
  color: var(--text-muted);
}

.err {
  color: var(--danger);
}