_typography.scss 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. // ==========================================================================
  2. // TYPOGRAPHY
  3. // ==========================================================================
  4. @use 'sass:map';
  5. @use '../abstracts/variables' as v;
  6. @use '../abstracts/mixins' as mix;
  7. @use 'sass:color';
  8. // Font face declarations for locally hosted Poppins font
  9. @font-face {
  10. font-family: 'Poppins';
  11. src: url('../fonts/Poppins/Poppins-Regular.ttf') format('truetype');
  12. font-weight: 400;
  13. font-style: normal;
  14. font-display: swap;
  15. }
  16. @font-face {
  17. font-family: 'Poppins';
  18. src: url('../fonts/Poppins/Poppins-Medium.ttf') format('truetype');
  19. font-weight: 500;
  20. font-style: normal;
  21. font-display: swap;
  22. }
  23. @font-face {
  24. font-family: 'Poppins';
  25. src: url('../fonts/Poppins/Poppins-SemiBold.ttf') format('truetype');
  26. font-weight: 600;
  27. font-style: normal;
  28. font-display: swap;
  29. }
  30. @font-face {
  31. font-family: 'Poppins';
  32. src: url('../fonts/Poppins/Poppins-Bold.ttf') format('truetype');
  33. font-weight: 700;
  34. font-style: normal;
  35. font-display: swap;
  36. }
  37. // Font face declarations for locally hosted Inter font - Optimized version
  38. @font-face {
  39. font-family: 'Inter';
  40. src: url('../fonts/Inter/static/Inter_18pt-Regular.ttf') format('truetype');
  41. font-weight: 400;
  42. font-style: normal;
  43. font-display: swap;
  44. }
  45. @font-face {
  46. font-family: 'Inter';
  47. src: url('../fonts/Inter/static/Inter_18pt-Medium.ttf') format('truetype');
  48. font-weight: 500;
  49. font-style: normal;
  50. font-display: swap;
  51. }
  52. @font-face {
  53. font-family: 'Inter';
  54. src: url('../fonts/Inter/static/Inter_18pt-SemiBold.ttf') format('truetype');
  55. font-weight: 600;
  56. font-style: normal;
  57. font-display: swap;
  58. }
  59. @font-face {
  60. font-family: 'Inter';
  61. src: url('../fonts/Inter/static/Inter_18pt-Bold.ttf') format('truetype');
  62. font-weight: 700;
  63. font-style: normal;
  64. font-display: swap;
  65. }
  66. // Base typography
  67. body {
  68. font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  69. font-weight: map.get(v.$font-weights, 'regular');
  70. font-size: map.get(v.$font-sizes, 'base');
  71. line-height: 1.6;
  72. color: var(--color-text-secondary);
  73. }
  74. // Headings
  75. h1, h2, h3, h4, h5, h6 {
  76. font-family: 'Poppins', sans-serif;
  77. font-weight: map.get(v.$font-weights, 'bold');
  78. color: var(--color-text-primary);
  79. margin-bottom: map.get(v.$spacers, 3);
  80. line-height: 1.2;
  81. }
  82. h1 {
  83. font-size: map.get(v.$font-sizes, '2xl');
  84. @include mix.respond-to-min('md') {
  85. font-size: map.get(v.$font-sizes, '3xl');
  86. }
  87. }
  88. h2 {
  89. font-size: map.get(v.$font-sizes, '3xl');
  90. @include mix.respond-to-max('sm') {
  91. font-size: map.get(v.$font-sizes, 'lg');
  92. }
  93. }
  94. h3 {
  95. font-size: map.get(v.$font-sizes, '2xl');
  96. font-weight: map.get(v.$font-weights, 'semibold');
  97. }
  98. h4 {
  99. font-size: map.get(v.$font-sizes, 'xl');
  100. font-weight: map.get(v.$font-weights, 'semibold');
  101. }
  102. h5 {
  103. font-size: map.get(v.$font-sizes, 'lg');
  104. font-weight: map.get(v.$font-weights, 'medium');
  105. }
  106. h6 {
  107. font-size: map.get(v.$font-sizes, 'base');
  108. font-weight: map.get(v.$font-weights, 'medium');
  109. }
  110. // Paragraphs
  111. p {
  112. margin-bottom: map.get(v.$spacers, 3);
  113. &:last-child {
  114. margin-bottom: 0;
  115. }
  116. }
  117. // Links
  118. a {
  119. color: v.$primary;
  120. text-decoration: none;
  121. transition: v.$transition-base;
  122. &:hover {
  123. color: color.scale(v.$primary, $lightness: -10%);
  124. }
  125. }
  126. // Text utilities
  127. .text-primary {
  128. color: v.$primary !important;
  129. }
  130. .text-gradient {
  131. background: v.$primary-gradient;
  132. -webkit-background-clip: text;
  133. -webkit-text-fill-color: transparent;
  134. background-clip: text;
  135. }
  136. .font-light {
  137. font-weight: map.get(v.$font-weights, 'light') !important;
  138. }
  139. .font-normal {
  140. font-weight: map.get(v.$font-weights, 'regular') !important;
  141. }
  142. .font-medium {
  143. font-weight: map.get(v.$font-weights, 'medium') !important;
  144. }
  145. .font-semibold {
  146. font-weight: map.get(v.$font-weights, 'semibold') !important;
  147. }
  148. .font-bold {
  149. font-weight: map.get(v.$font-weights, 'bold') !important;
  150. }
  151. .text-center {
  152. text-align: center !important;
  153. }
  154. .text-left {
  155. text-align: left !important;
  156. }
  157. .text-right {
  158. text-align: right !important;
  159. }
  160. // Heading custom classes
  161. .heading-lg {
  162. font-size: map.get(v.$font-sizes, '4xl');
  163. font-weight: map.get(v.$font-weights, 'bold');
  164. margin-bottom: map.get(v.$spacers, 4);
  165. }
  166. .heading-md {
  167. font-size: map.get(v.$font-sizes, '3xl');
  168. font-weight: map.get(v.$font-weights, 'semibold');
  169. margin-bottom: map.get(v.$spacers, 3);
  170. }
  171. .subtitle {
  172. font-size: map.get(v.$font-sizes, 'lg');
  173. color: v.$gray;
  174. margin-bottom: map.get(v.$spacers, 4);
  175. }
  176. // Font family utilities
  177. .font-heading {
  178. font-family: 'Space Grotesk', sans-serif !important;
  179. }
  180. .font-body {
  181. font-family: 'Urbanist', -apple-system, BlinkMacSystemFont, sans-serif !important;
  182. }
  183. .font-mono {
  184. font-family: 'Fira Code', monospace !important;
  185. }
  186. // Font size utility classes
  187. .font-size-xs {
  188. font-size: map.get(v.$font-sizes, 'xs') !important;
  189. }
  190. .font-size-sm {
  191. font-size: map.get(v.$font-sizes, 'sm') !important;
  192. }
  193. .font-size-base {
  194. font-size: map.get(v.$font-sizes, 'base') !important;
  195. }
  196. .font-size-lg {
  197. font-size: map.get(v.$font-sizes, 'lg') !important;
  198. }
  199. .font-size-xl {
  200. font-size: map.get(v.$font-sizes, 'xl') !important;
  201. }
  202. .font-size-2xl {
  203. font-size: map.get(v.$font-sizes, '2xl') !important;
  204. }
  205. .font-size-3xl {
  206. font-size: map.get(v.$font-sizes, '3xl') !important;
  207. }
  208. .font-size-4xl {
  209. font-size: map.get(v.$font-sizes, '4xl') !important;
  210. }
  211. .font-size-5xl {
  212. font-size: map.get(v.$font-sizes, '5xl') !important;
  213. }