/* ============================================================
   Namla Support & Feedback — Base Styles & Local Webfonts
   ============================================================ */

/* Local Fonts (Only existing files from /font, font-display: swap) */
@font-face {
  font-family: "PPEditorialNew";
  src: url("../font/PPEditorialNew-Regular.woff2") format("woff2"),
       url("../fonts/PPEditorialNew-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "PPEditorialNew";
  src: url("../font/pp-editorial-new-italic.woff2") format("woff2"),
       url("../fonts/pp-editorial-new-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "NeueMontreal";
  src: url("../font/NeueMontreal-Regular.woff2") format("woff2"),
       url("../fonts/NeueMontreal-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "NeueMontreal";
  src: url("../font/NeueMontreal-Italic.woff2") format("woff2"),
       url("../fonts/NeueMontreal-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Noto Nastaliq Urdu";
  src: url("../font/NotoNastaliqUrdu-VariableFont_wght.ttf") format("truetype"),
       url("../fonts/NotoNastaliqUrdu-VariableFont_wght.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* CSS Reset & Universal Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--warm-background);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

main {
  flex: 1 0 auto;
}

/* Typography Defaults */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--dark);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  line-height: 1.12;
}

h2 {
  font-size: clamp(1.65rem, 3.6vw, 2.35rem);
  line-height: 1.2;
}

h3 {
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
}

h4 {
  font-size: 1.15rem;
}

p {
  max-width: 68ch;
  color: var(--dark);
}

a {
  color: var(--orange-dark);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--orange);
}

a:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

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

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

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

/* Accessible Focus Styling (WCAG 2.2 AA) */
:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

/* Accessibility: Skip Link */
.skip-link {
  position: absolute;
  inset-inline-start: var(--space-4);
  top: -6rem;
  z-index: 1000;
  padding: var(--space-3) var(--space-5);
  background: var(--dark);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 2px solid var(--orange);
  box-shadow: var(--shadow-lg);
  transition: top var(--transition-fast);
}

.skip-link:focus-visible {
  top: var(--space-4);
}

/* Screen Reader Only Utility */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Live Status Region (polite AT announcement) */
.live-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Reduced Motion Support */
@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;
  }
}
