*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
  font-family: var(--font-sans);
  color: var(--color-ink-800);
  background: var(--color-ink-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main,
.tc-page-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

img {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

input,
textarea {
  font: inherit;
}

/* Urdu font swap — keyed off [lang="ur"] set by the JS language toggle */
[lang="ur"] body,
[dir="rtl"] .tc-font-urdu {
  font-family: var(--font-urdu);
  line-height: 1.85;
  letter-spacing: 0;
}

[lang="ur"] h1,
[lang="ur"] h2,
[lang="ur"] h3,
[lang="ur"] h4 {
  line-height: 1.55;
  letter-spacing: 0;
}

[dir="rtl"] {
  text-align: right;
}

/* Escape hatch for elements that must never mirror under RTL (logo, phone numbers, brand names) */
.tc-ltr {
  direction: ltr;
}

:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px var(--color-primary-500);
}

[hidden] {
  display: none;
}
