index.styl 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680
  1. // Переменные цветов
  2. $primary-50 = #fef2f2
  3. $primary-100 = #fee2e2
  4. $primary-200 = #fecaca
  5. $primary-300 = #fca5a5
  6. $primary-400 = #f87171
  7. $primary-500 = #ef4444
  8. $primary-600 = #dc2626
  9. $primary-700 = #b91c1c
  10. $primary-800 = #991b1b
  11. $primary-900 = #7f1d1d
  12. $accent-50 = #f0f9ff
  13. $accent-100 = #e0f2fe
  14. $accent-200 = #bae6fd
  15. $accent-300 = #7dd3fc
  16. $accent-400 = #38bdf8
  17. $accent-500 = #0ea5e9
  18. $accent-600 = #0284c7
  19. $accent-700 = #0369a1
  20. $accent-800 = #075985
  21. $accent-900 = #0c4a6e
  22. $gray-50 = #f9fafb
  23. $gray-100 = #f3f4f6
  24. $gray-200 = #e5e7eb
  25. $gray-300 = #d1d5db
  26. $gray-400 = #9ca3af
  27. $gray-500 = #6b7280
  28. $gray-600 = #4b5563
  29. $gray-700 = #374151
  30. $gray-800 = #1f2937
  31. $gray-900 = #111827
  32. $white = #ffffff
  33. $black = #000000
  34. // Типографика
  35. $font-family-sans = 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif
  36. $font-family-serif = 'Georgia', 'Times New Roman', serif
  37. $font-family-mono = 'SF Mono', 'Fira Code', 'Consolas', 'Liberation Mono', monospace
  38. $font-size-xs = 0.75rem // 12px
  39. $font-size-sm = 0.875rem // 14px
  40. $font-size-base = 1rem // 16px
  41. $font-size-lg = 1.125rem // 18px
  42. $font-size-xl = 1.25rem // 20px
  43. $font-size-2xl = 1.5rem // 24px
  44. $font-size-3xl = 1.875rem // 30px
  45. $font-size-4xl = 2.25rem // 36px
  46. $font-size-5xl = 3rem // 48px
  47. $font-weight-light = 300
  48. $font-weight-normal = 400
  49. $font-weight-medium = 500
  50. $font-weight-semibold = 600
  51. $font-weight-bold = 700
  52. $font-weight-extrabold = 800
  53. $line-height-tight = 1.25
  54. $line-height-normal = 1.5
  55. $line-height-relaxed = 1.75
  56. $letter-spacing-tight = -0.025em
  57. $letter-spacing-normal = 0
  58. $letter-spacing-wide = 0.025em
  59. // Макеты и отступы
  60. $spacing-1 = 0.25rem // 4px
  61. $spacing-2 = 0.5rem // 8px
  62. $spacing-3 = 0.75rem // 12px
  63. $spacing-4 = 1rem // 16px
  64. $spacing-5 = 1.25rem // 20px
  65. $spacing-6 = 1.5rem // 24px
  66. $spacing-8 = 2rem // 32px
  67. $spacing-10 = 2.5rem // 40px
  68. $spacing-12 = 3rem // 48px
  69. $spacing-16 = 4rem // 64px
  70. $spacing-20 = 5rem // 80px
  71. // Брейкпоинты
  72. $breakpoint-sm = 640px
  73. $breakpoint-md = 768px
  74. $breakpoint-lg = 1024px
  75. $breakpoint-xl = 1280px
  76. $breakpoint-2xl = 1536px
  77. // Тени
  78. $shadow-sm = 0 1px 2px 0 rgba(0, 0, 0, 0.05)
  79. $shadow-base = 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)
  80. $shadow-md = 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)
  81. $shadow-lg = 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)
  82. $shadow-xl = 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)
  83. // Скругления
  84. $radius-sm = 0.125rem
  85. $radius-base = 0.25rem
  86. $radius-md = 0.375rem
  87. $radius-lg = 0.5rem
  88. $radius-xl = 0.75rem
  89. $radius-2xl = 1rem
  90. $radius-full = 9999px
  91. // Миксины
  92. flex-center()
  93. display: flex
  94. align-items: center
  95. justify-content: center
  96. flex-between()
  97. display: flex
  98. align-items: center
  99. justify-content: space-between
  100. flex-col()
  101. display: flex
  102. flex-direction: column
  103. container()
  104. max-width: 1200px
  105. margin: 0 auto
  106. padding: 0 $spacing-4
  107. transition-all($duration = 0.3s)
  108. transition: all $duration ease-in-out
  109. text-ellipsis()
  110. overflow: hidden
  111. text-overflow: ellipsis
  112. white-space: nowrap
  113. // Базовые сбросы
  114. *
  115. margin: 0
  116. padding: 0
  117. box-sizing: border-box
  118. html
  119. font-size: 16px
  120. line-height: $line-height-normal
  121. -webkit-text-size-adjust: 100%
  122. scroll-behavior: smooth
  123. body
  124. font-family: $font-family-sans
  125. font-size: $font-size-base
  126. font-weight: $font-weight-normal
  127. line-height: $line-height-normal
  128. color: $gray-900
  129. background-color: $white
  130. -webkit-font-smoothing: antialiased
  131. -moz-osx-font-smoothing: grayscale
  132. .dark &
  133. color: $white
  134. background-color: $gray-900
  135. // Типографические классы
  136. .text-xs
  137. font-size: $font-size-xs
  138. line-height: $line-height-tight
  139. .text-sm
  140. font-size: $font-size-sm
  141. line-height: $line-height-tight
  142. .text-base
  143. font-size: $font-size-base
  144. line-height: $line-height-normal
  145. .text-lg
  146. font-size: $font-size-lg
  147. line-height: $line-height-normal
  148. .text-xl
  149. font-size: $font-size-xl
  150. line-height: $line-height-normal
  151. .text-2xl
  152. font-size: $font-size-2xl
  153. line-height: $line-height-tight
  154. .text-3xl
  155. font-size: $font-size-3xl
  156. line-height: $line-height-tight
  157. .text-4xl
  158. font-size: $font-size-4xl
  159. line-height: $line-height-tight
  160. .text-5xl
  161. font-size: $font-size-5xl
  162. line-height: 1
  163. .font-light
  164. font-weight: $font-weight-light
  165. .font-normal
  166. font-weight: $font-weight-normal
  167. .font-medium
  168. font-weight: $font-weight-medium
  169. .font-semibold
  170. font-weight: $font-weight-semibold
  171. .font-bold
  172. font-weight: $font-weight-bold
  173. .font-extrabold
  174. font-weight: $font-weight-extrabold
  175. .leading-tight
  176. line-height: $line-height-tight
  177. .leading-normal
  178. line-height: $line-height-normal
  179. .leading-relaxed
  180. line-height: $line-height-relaxed
  181. .tracking-tight
  182. letter-spacing: $letter-spacing-tight
  183. .tracking-normal
  184. letter-spacing: $letter-spacing-normal
  185. .tracking-wide
  186. letter-spacing: $letter-spacing-wide
  187. .text-center
  188. text-align: center
  189. .text-left
  190. text-align: left
  191. .text-right
  192. text-align: right
  193. // Базовые стили приложения
  194. #app
  195. min-height: 100vh
  196. background-color: $white
  197. display: flex
  198. flex-direction: column
  199. .dark &
  200. background-color: $gray-900
  201. // Header
  202. .header
  203. background-color: $white
  204. box-shadow: $shadow-sm
  205. position: sticky
  206. top: 0
  207. z-index: 100
  208. border-bottom: 1px solid $gray-200
  209. .dark &
  210. background-color: $gray-800
  211. border-bottom-color: $gray-700
  212. .header__nav
  213. container()
  214. padding-top: $spacing-3
  215. padding-bottom: $spacing-3
  216. .header__nav-block
  217. flex-between()
  218. gap: $spacing-4
  219. .header__nav-name
  220. font-size: $font-size-2xl
  221. font-weight: $font-weight-bold
  222. background: linear-gradient(135deg, $primary-500, $accent-500)
  223. -webkit-background-clip: text
  224. -webkit-text-fill-color: transparent
  225. background-clip: text
  226. letter-spacing: $letter-spacing-tight
  227. .header__nav-menu
  228. display: flex
  229. align-items: center
  230. gap: $spacing-4
  231. .header__menu-item
  232. display: flex
  233. align-items: center
  234. .header__menu-link
  235. font-size: $font-size-sm
  236. font-weight: $font-weight-medium
  237. color: $gray-600
  238. text-decoration: none
  239. padding: $spacing-2 $spacing-3
  240. border-radius: $radius-md
  241. transition: all 0.2s ease-in-out
  242. position: relative
  243. &:hover
  244. color: $primary-600
  245. background-color: $primary-50
  246. .dark &
  247. color: $gray-300
  248. &:hover
  249. color: $primary-400
  250. background-color: $primary-900
  251. .header__theme-toggle
  252. padding: $spacing-2
  253. border-radius: $radius-md
  254. background-color: $gray-100
  255. color: $gray-600
  256. transition: all 0.2s ease-in-out
  257. border: none
  258. cursor: pointer
  259. flex-center()
  260. width: 2.5rem
  261. height: 2.5rem
  262. &:hover
  263. background-color: $gray-200
  264. transform: scale(1.05)
  265. .dark &
  266. background-color: $gray-700
  267. color: $gray-300
  268. &:hover
  269. background-color: $gray-600
  270. // Main content
  271. .main
  272. flex: 1
  273. display: flex
  274. flex-direction: column
  275. // Page transitions
  276. .page-slide
  277. &-enter-active,
  278. &-leave-active
  279. transition: all 0.3s ease-in-out
  280. &-enter-from
  281. opacity: 0
  282. transform: translateX($spacing-4)
  283. &-leave-to
  284. opacity: 0
  285. transform: translateX(-$spacing-4)
  286. // Footer
  287. .footer
  288. background: linear-gradient(135deg, $gray-800, $gray-900)
  289. color: $white
  290. padding: $spacing-12 0 $spacing-8
  291. margin-top: auto
  292. .dark &
  293. background: linear-gradient(135deg, $gray-900, $black)
  294. .footer__content
  295. container()
  296. .footer__sections
  297. display: grid
  298. grid-template-columns: 1fr
  299. gap: $spacing-8
  300. margin-bottom: $spacing-8
  301. @media (min-width: $breakpoint-md)
  302. grid-template-columns: repeat(3, 1fr)
  303. .footer__section
  304. flex-col()
  305. gap: $spacing-4
  306. .footer__section-title
  307. font-size: $font-size-lg
  308. font-weight: $font-weight-semibold
  309. color: $white
  310. margin-bottom: $spacing-2
  311. .footer__section-text
  312. font-size: $font-size-sm
  313. color: $gray-400
  314. line-height: $line-height-relaxed
  315. .footer__links
  316. flex-col()
  317. gap: $spacing-2
  318. .footer__link
  319. font-size: $font-size-sm
  320. color: $gray-400
  321. text-decoration: none
  322. transition: color 0.2s ease-in-out
  323. padding: $spacing-1 0
  324. &:hover
  325. color: $white
  326. transform: translateX($spacing-1)
  327. .footer__bottom
  328. border-top: 1px solid $gray-700
  329. padding-top: $spacing-6
  330. text-align: center
  331. .footer__copyright
  332. font-size: $font-size-sm
  333. color: $gray-500
  334. // Утилитарные классы
  335. .btn
  336. display: inline-flex
  337. align-items: center
  338. justify-content: center
  339. padding: $spacing-2 $spacing-4
  340. border-radius: $radius-lg
  341. font-size: $font-size-sm
  342. font-weight: $font-weight-medium
  343. text-decoration: none
  344. border: none
  345. cursor: pointer
  346. transition: all 0.2s ease-in-out
  347. gap: $spacing-2
  348. position: relative
  349. overflow: hidden
  350. &:focus
  351. outline: none
  352. box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2)
  353. &::before
  354. content: ''
  355. position: absolute
  356. top: 0
  357. left: -100%
  358. width: 100%
  359. height: 100%
  360. background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent)
  361. transition: left 0.5s
  362. &:hover::before
  363. left: 100%
  364. .btn-primary
  365. background: linear-gradient(135deg, $primary-500, $primary-600)
  366. color: $white
  367. box-shadow: $shadow-md
  368. &:hover
  369. transform: translateY(-1px)
  370. box-shadow: $shadow-lg
  371. .btn-secondary
  372. background-color: $gray-100
  373. color: $gray-700
  374. border: 1px solid $gray-300
  375. &:hover
  376. background-color: $gray-200
  377. transform: translateY(-1px)
  378. .dark &
  379. background-color: $gray-700
  380. color: $gray-300
  381. border-color: $gray-600
  382. &:hover
  383. background-color: $gray-600
  384. .btn-outline
  385. background-color: transparent
  386. color: $primary-600
  387. border: 2px solid $primary-500
  388. &:hover
  389. background-color: $primary-500
  390. color: $white
  391. transform: translateY(-1px)
  392. .card
  393. background-color: $white
  394. border-radius: $radius-xl
  395. box-shadow: $shadow-base
  396. border: 1px solid $gray-200
  397. overflow: hidden
  398. transition: all 0.3s ease-in-out
  399. .dark &
  400. background-color: $gray-800
  401. border-color: $gray-700
  402. &:hover
  403. transform: translateY(-2px)
  404. box-shadow: $shadow-lg
  405. .card__header
  406. padding: $spacing-6
  407. border-bottom: 1px solid $gray-200
  408. .dark &
  409. border-bottom-color: $gray-700
  410. .card__title
  411. font-size: $font-size-xl
  412. font-weight: $font-weight-semibold
  413. color: $gray-900
  414. margin-bottom: $spacing-2
  415. .dark &
  416. color: $white
  417. .card__content
  418. padding: $spacing-6
  419. .card__footer
  420. padding: $spacing-6
  421. border-top: 1px solid $gray-200
  422. background-color: $gray-50
  423. .dark &
  424. border-top-color: $gray-700
  425. background-color: $gray-700
  426. .form-group
  427. flex-col()
  428. gap: $spacing-2
  429. margin-bottom: $spacing-4
  430. .form-label
  431. font-size: $font-size-sm
  432. font-weight: $font-weight-medium
  433. color: $gray-700
  434. display: block
  435. .dark &
  436. color: $gray-300
  437. .form-input
  438. width: 100%
  439. padding: $spacing-3
  440. border: 2px solid $gray-300
  441. border-radius: $radius-lg
  442. background-color: $white
  443. color: $gray-900
  444. font-size: $font-size-base
  445. font-family: $font-family-sans
  446. transition: all 0.2s ease-in-out
  447. &:focus
  448. outline: none
  449. border-color: $primary-500
  450. box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1)
  451. transform: translateY(-1px)
  452. .dark &
  453. background-color: $gray-700
  454. color: $white
  455. border-color: $gray-600
  456. &:focus
  457. border-color: $primary-500
  458. .form-textarea
  459. @extend .form-input
  460. resize: vertical
  461. min-height: 6rem
  462. line-height: $line-height-relaxed
  463. .form-select
  464. @extend .form-input
  465. // Сетка
  466. .grid
  467. display: grid
  468. gap: $spacing-6
  469. .grid-cols-1
  470. grid-template-columns: 1fr
  471. .grid-cols-2
  472. grid-template-columns: repeat(2, 1fr)
  473. .grid-cols-3
  474. grid-template-columns: repeat(3, 1fr)
  475. .grid-cols-4
  476. grid-template-columns: repeat(4, 1fr)
  477. @media (min-width: $breakpoint-sm)
  478. .sm\:grid-cols-2
  479. grid-template-columns: repeat(2, 1fr)
  480. @media (min-width: $breakpoint-md)
  481. .md\:grid-cols-2
  482. grid-template-columns: repeat(2, 1fr)
  483. .md\:grid-cols-3
  484. grid-template-columns: repeat(3, 1fr)
  485. @media (min-width: $breakpoint-lg)
  486. .lg\:grid-cols-3
  487. grid-template-columns: repeat(3, 1fr)
  488. .lg\:grid-cols-4
  489. grid-template-columns: repeat(4, 1fr)
  490. // Отступы
  491. .p-0 { padding: 0 }
  492. .p-1 { padding: $spacing-1 }
  493. .p-2 { padding: $spacing-2 }
  494. .p-3 { padding: $spacing-3 }
  495. .p-4 { padding: $spacing-4 }
  496. .p-6 { padding: $spacing-6 }
  497. .p-8 { padding: $spacing-8 }
  498. .py-2 { padding-top: $spacing-2; padding-bottom: $spacing-2 }
  499. .py-3 { padding-top: $spacing-3; padding-bottom: $spacing-3 }
  500. .py-4 { padding-top: $spacing-4; padding-bottom: $spacing-4 }
  501. .py-6 { padding-top: $spacing-6; padding-bottom: $spacing-6 }
  502. .py-8 { padding-top: $spacing-8; padding-bottom: $spacing-8 }
  503. .px-3 { padding-left: $spacing-3; padding-right: $spacing-3 }
  504. .px-4 { padding-left: $spacing-4; padding-right: $spacing-4 }
  505. .px-6 { padding-left: $spacing-6; padding-right: $spacing-6 }
  506. // Маржины
  507. .m-0 { margin: 0 }
  508. .m-4 { margin: $spacing-4 }
  509. .m-6 { margin: $spacing-6 }
  510. .mt-2 { margin-top: $spacing-2 }
  511. .mt-4 { margin-top: $spacing-4 }
  512. .mt-6 { margin-top: $spacing-6 }
  513. .mt-8 { margin-top: $spacing-8 }
  514. .mb-2 { margin-bottom: $spacing-2 }
  515. .mb-4 { margin-bottom: $spacing-4 }
  516. .mb-6 { margin-bottom: $spacing-6 }
  517. .mb-8 { margin-bottom: $spacing-8 }
  518. // Темная тема
  519. @media (prefers-color-scheme: dark)
  520. :root
  521. color-scheme: dark
  522. // Адаптивность
  523. @media (max-width: $breakpoint-md)
  524. .header__nav-block
  525. flex-direction: column
  526. gap: $spacing-3
  527. .header__nav-menu
  528. width: 100%
  529. justify-content: center
  530. flex-wrap: wrap
  531. .footer__sections
  532. grid-template-columns: 1fr
  533. gap: $spacing-6
  534. @media (max-width: $breakpoint-sm)
  535. .header__nav-name
  536. font-size: $font-size-xl
  537. text-align: center
  538. .header__menu-link
  539. padding: $spacing-1 $spacing-2
  540. font-size: $font-size-xs
  541. .btn
  542. padding: $spacing-2 $spacing-3
  543. font-size: $font-size-xs
  544. .card__header,
  545. .card__content,
  546. .card__footer
  547. padding: $spacing-4