/* ==========================================================
   base.css — ডিজাইন টোকেন, রিসেট, টাইপোগ্রাফি, অ্যাক্সেসিবিলিটি
   ব্রেকপয়েন্ট (মোবাইল-ফার্স্ট): 640px, 768px, 1024px, 1280px
   ========================================================== */

:root {
  /* রং */
  --c-primary: #d7000f;
  --c-primary-dark: #a8000b;
  --c-primary-soft: #fdecee;
  --c-text: #111827;
  --c-text-soft: #4b5563;
  --c-muted: #6b7280;
  --c-border: #e5e7eb;
  --c-bg: #ffffff;
  --c-bg-soft: #f3f4f6;
  --c-dark: #0b3b2e;
  --c-dark-2: #0f4d3b;
  --c-gold: #f5b301;

  /* ফন্ট */
  --font-sans: "Noto Sans Bengali", "Kalpurush", "SolaimanLipi", system-ui,
    -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-serif: "Noto Serif Bengali", Georgia, "Times New Roman", serif;

  /* ফন্ট সাইজ */
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
  --fs-xl: clamp(1.45rem, 1.15rem + 1.2vw, 2rem);
  --fs-2xl: clamp(1.7rem, 1.25rem + 2vw, 2.75rem);

  /* স্পেসিং */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;

  /* আকৃতি */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);

  /* লেআউট */
  --container: 1200px;
  --gutter: 1rem;
  --header-h: 56px;
  --z-header: 100;
  --z-overlay: 200;
  --z-modal: 300;
}

@media (min-width: 768px) {
  :root {
    --gutter: 1.5rem;
  }
}

/* ---------- রিসেট ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.75; /* বাংলা হরফের জন্য বেশি লাইন-হাইট দরকার */
  color: var(--c-text);
  background: var(--c-bg);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1 0 auto;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
  line-height: 1.45;
}

p {
  margin: 0;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

img, video {
  height: auto;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

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

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--c-primary);
}

ul[class], ol[class] {
  margin: 0;
  padding: 0;
  list-style: none;
}

table {
  width: 100%;
  border-collapse: collapse;
}

[hidden] {
  display: none !important;
}

/* ---------- অ্যাক্সেসিবিলিটি ---------- */
:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--sp-3);
  z-index: var(--z-modal);
  padding: var(--sp-2) var(--sp-4);
  color: #fff;
  background: var(--c-primary);
  border-radius: var(--radius);
}

.skip-link:focus {
  top: var(--sp-3);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
